@code-yeongyu/senpi 2026.5.29 → 2026.6.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 (310) hide show
  1. package/CHANGELOG.md +131 -1
  2. package/README.md +12 -2
  3. package/dist/cli/args.d.ts +3 -0
  4. package/dist/cli/args.d.ts.map +1 -1
  5. package/dist/cli/args.js +28 -0
  6. package/dist/cli/args.js.map +1 -1
  7. package/dist/config.d.ts.map +1 -1
  8. package/dist/config.js +9 -1
  9. package/dist/config.js.map +1 -1
  10. package/dist/core/agent-session-services.d.ts +1 -0
  11. package/dist/core/agent-session-services.d.ts.map +1 -1
  12. package/dist/core/agent-session-services.js +1 -0
  13. package/dist/core/agent-session-services.js.map +1 -1
  14. package/dist/core/agent-session.d.ts +9 -2
  15. package/dist/core/agent-session.d.ts.map +1 -1
  16. package/dist/core/agent-session.js +36 -13
  17. package/dist/core/agent-session.js.map +1 -1
  18. package/dist/core/compaction/branch-summarization.d.ts +3 -1
  19. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  20. package/dist/core/compaction/branch-summarization.js +9 -3
  21. package/dist/core/compaction/branch-summarization.js.map +1 -1
  22. package/dist/core/extensions/index.d.ts +1 -1
  23. package/dist/core/extensions/index.d.ts.map +1 -1
  24. package/dist/core/extensions/index.js.map +1 -1
  25. package/dist/core/extensions/runner.d.ts +5 -3
  26. package/dist/core/extensions/runner.d.ts.map +1 -1
  27. package/dist/core/extensions/runner.js +21 -3
  28. package/dist/core/extensions/runner.js.map +1 -1
  29. package/dist/core/extensions/types.d.ts +14 -6
  30. package/dist/core/extensions/types.d.ts.map +1 -1
  31. package/dist/core/extensions/types.js.map +1 -1
  32. package/dist/core/footer-data-provider.d.ts +2 -0
  33. package/dist/core/footer-data-provider.d.ts.map +1 -1
  34. package/dist/core/footer-data-provider.js +29 -1
  35. package/dist/core/footer-data-provider.js.map +1 -1
  36. package/dist/core/model-registry.d.ts.map +1 -1
  37. package/dist/core/model-registry.js +82 -21
  38. package/dist/core/model-registry.js.map +1 -1
  39. package/dist/core/model-resolver.d.ts.map +1 -1
  40. package/dist/core/model-resolver.js +2 -1
  41. package/dist/core/model-resolver.js.map +1 -1
  42. package/dist/core/provider-attribution.d.ts +4 -0
  43. package/dist/core/provider-attribution.d.ts.map +1 -0
  44. package/dist/core/provider-attribution.js +73 -0
  45. package/dist/core/provider-attribution.js.map +1 -0
  46. package/dist/core/provider-display-names.d.ts.map +1 -1
  47. package/dist/core/provider-display-names.js +1 -0
  48. package/dist/core/provider-display-names.js.map +1 -1
  49. package/dist/core/resolve-config-value.d.ts +9 -1
  50. package/dist/core/resolve-config-value.d.ts.map +1 -1
  51. package/dist/core/resolve-config-value.js +134 -11
  52. package/dist/core/resolve-config-value.js.map +1 -1
  53. package/dist/core/sdk.d.ts +2 -0
  54. package/dist/core/sdk.d.ts.map +1 -1
  55. package/dist/core/sdk.js +18 -40
  56. package/dist/core/sdk.js.map +1 -1
  57. package/dist/core/session-manager.d.ts +6 -7
  58. package/dist/core/session-manager.d.ts.map +1 -1
  59. package/dist/core/session-manager.js +167 -96
  60. package/dist/core/session-manager.js.map +1 -1
  61. package/dist/core/settings-manager.d.ts +3 -1
  62. package/dist/core/settings-manager.d.ts.map +1 -1
  63. package/dist/core/settings-manager.js +15 -11
  64. package/dist/core/settings-manager.js.map +1 -1
  65. package/dist/core/system-prompt.d.ts.map +1 -1
  66. package/dist/core/system-prompt.js +0 -3
  67. package/dist/core/system-prompt.js.map +1 -1
  68. package/dist/core/thinking-levels.d.ts.map +1 -1
  69. package/dist/core/thinking-levels.js +6 -2
  70. package/dist/core/thinking-levels.js.map +1 -1
  71. package/dist/core/tools/edit.d.ts.map +1 -1
  72. package/dist/core/tools/edit.js +7 -10
  73. package/dist/core/tools/edit.js.map +1 -1
  74. package/dist/core/tools/find.d.ts.map +1 -1
  75. package/dist/core/tools/find.js.map +1 -1
  76. package/dist/core/tools/grep.d.ts.map +1 -1
  77. package/dist/core/tools/grep.js.map +1 -1
  78. package/dist/core/tools/ls.d.ts.map +1 -1
  79. package/dist/core/tools/ls.js +5 -7
  80. package/dist/core/tools/ls.js.map +1 -1
  81. package/dist/core/tools/read.d.ts.map +1 -1
  82. package/dist/core/tools/read.js +6 -7
  83. package/dist/core/tools/read.js.map +1 -1
  84. package/dist/core/tools/render-utils.d.ts +5 -2
  85. package/dist/core/tools/render-utils.d.ts.map +1 -1
  86. package/dist/core/tools/render-utils.js +17 -1
  87. package/dist/core/tools/render-utils.js.map +1 -1
  88. package/dist/core/tools/write.d.ts.map +1 -1
  89. package/dist/core/tools/write.js +5 -6
  90. package/dist/core/tools/write.js.map +1 -1
  91. package/dist/index.d.ts +2 -0
  92. package/dist/index.d.ts.map +1 -1
  93. package/dist/index.js +2 -0
  94. package/dist/index.js.map +1 -1
  95. package/dist/main.d.ts.map +1 -1
  96. package/dist/main.js +76 -16
  97. package/dist/main.js.map +1 -1
  98. package/dist/migrations.d.ts.map +1 -1
  99. package/dist/migrations.js +118 -1
  100. package/dist/migrations.js.map +1 -1
  101. package/dist/modes/interactive/components/login-dialog.d.ts +1 -3
  102. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  103. package/dist/modes/interactive/components/login-dialog.js +2 -4
  104. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  105. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  106. package/dist/modes/interactive/components/tool-execution.js +25 -1
  107. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  108. package/dist/modes/interactive/interactive-mode.d.ts +3 -0
  109. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  110. package/dist/modes/interactive/interactive-mode.js +64 -6
  111. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  112. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  113. package/dist/modes/interactive/theme/theme.js +10 -0
  114. package/dist/modes/interactive/theme/theme.js.map +1 -1
  115. package/dist/modes/print-mode.d.ts.map +1 -1
  116. package/dist/modes/print-mode.js +1 -0
  117. package/dist/modes/print-mode.js.map +1 -1
  118. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  119. package/dist/modes/rpc/rpc-mode.js +4 -1
  120. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  121. package/dist/modes/rpc/rpc-types.d.ts +1 -0
  122. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  123. package/dist/modes/rpc/rpc-types.js.map +1 -1
  124. package/dist/utils/deprecation.d.ts +4 -0
  125. package/dist/utils/deprecation.d.ts.map +1 -0
  126. package/dist/utils/deprecation.js +13 -0
  127. package/dist/utils/deprecation.js.map +1 -0
  128. package/dist/utils/json.d.ts +3 -0
  129. package/dist/utils/json.d.ts.map +1 -0
  130. package/dist/utils/json.js +7 -0
  131. package/dist/utils/json.js.map +1 -0
  132. package/docs/custom-provider.md +13 -10
  133. package/docs/extensions.md +47 -17
  134. package/docs/models.md +25 -12
  135. package/docs/providers.md +15 -5
  136. package/docs/quickstart.md +1 -0
  137. package/docs/rpc.md +3 -2
  138. package/docs/sdk.md +6 -0
  139. package/docs/session-format.md +1 -1
  140. package/docs/sessions.md +8 -0
  141. package/docs/settings.md +4 -2
  142. package/docs/terminal-setup.md +2 -0
  143. package/docs/tui.md +12 -3
  144. package/docs/usage.md +10 -1
  145. package/examples/extensions/README.md +1 -0
  146. package/examples/extensions/custom-header.ts +1 -1
  147. package/examples/extensions/custom-provider-anthropic/index.ts +1 -1
  148. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  149. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  150. package/examples/extensions/custom-provider-gitlab-duo/index.ts +54 -3
  151. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  152. package/examples/extensions/doom-overlay/index.ts +1 -1
  153. package/examples/extensions/git-merge-and-resolve.ts +115 -0
  154. package/examples/extensions/handoff.ts +1 -1
  155. package/examples/extensions/input-transform-streaming.ts +39 -0
  156. package/examples/extensions/interactive-shell.ts +1 -1
  157. package/examples/extensions/overlay-qa-tests.ts +152 -81
  158. package/examples/extensions/qna.ts +1 -1
  159. package/examples/extensions/question.ts +1 -1
  160. package/examples/extensions/questionnaire.ts +1 -1
  161. package/examples/extensions/sandbox/package-lock.json +2 -2
  162. package/examples/extensions/sandbox/package.json +1 -1
  163. package/examples/extensions/snake.ts +1 -1
  164. package/examples/extensions/space-invaders.ts +1 -1
  165. package/examples/extensions/summarize.ts +1 -1
  166. package/examples/extensions/tic-tac-toe.ts +1 -1
  167. package/examples/extensions/todo.ts +1 -1
  168. package/examples/extensions/tools.ts +5 -0
  169. package/examples/extensions/with-deps/package-lock.json +2 -2
  170. package/examples/extensions/with-deps/package.json +1 -1
  171. package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +1 -0
  172. package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
  173. package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +15 -0
  174. package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
  175. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +5 -2
  176. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
  177. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +81 -18
  178. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
  179. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +1 -1
  180. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +1 -0
  181. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +1 -1
  182. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
  183. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +1 -0
  184. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
  185. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +1 -0
  186. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
  187. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +14 -1
  188. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
  189. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +22 -8
  190. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
  191. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
  192. package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  193. package/node_modules/@earendil-works/pi-ai/README.md +5 -3
  194. package/node_modules/@earendil-works/pi-ai/dist/cli.js +0 -0
  195. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
  196. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -0
  197. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
  198. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +15 -0
  199. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
  200. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +15 -0
  201. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
  202. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +2 -2
  203. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
  204. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +1294 -412
  205. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  206. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +1278 -652
  207. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
  208. package/node_modules/@earendil-works/pi-ai/dist/models.js +9 -4
  209. package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
  210. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts +1 -1
  211. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
  212. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +89 -21
  213. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
  214. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
  215. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +27 -14
  216. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
  217. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
  218. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +5 -9
  219. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
  220. package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.d.ts.map +1 -1
  221. package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js +1 -1
  222. package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js.map +1 -1
  223. package/node_modules/@earendil-works/pi-ai/dist/providers/google.d.ts.map +1 -1
  224. package/node_modules/@earendil-works/pi-ai/dist/providers/google.js +5 -3
  225. package/node_modules/@earendil-works/pi-ai/dist/providers/google.js.map +1 -1
  226. package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.d.ts.map +1 -1
  227. package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js +2 -3
  228. package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js.map +1 -1
  229. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.d.ts.map +1 -1
  230. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js +2 -3
  231. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js.map +1 -1
  232. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
  233. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +118 -52
  234. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
  235. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
  236. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +27 -17
  237. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js.map +1 -1
  238. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts +1 -0
  239. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
  240. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +5 -1
  241. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
  242. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
  243. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +5 -9
  244. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -1
  245. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts.map +1 -1
  246. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +1 -0
  247. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js.map +1 -1
  248. package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.d.ts +7 -0
  249. package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.d.ts.map +1 -1
  250. package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.js +8 -4
  251. package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.js.map +1 -1
  252. package/node_modules/@earendil-works/pi-ai/dist/stream.d.ts.map +1 -1
  253. package/node_modules/@earendil-works/pi-ai/dist/stream.js +18 -4
  254. package/node_modules/@earendil-works/pi-ai/dist/stream.js.map +1 -1
  255. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +21 -5
  256. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  257. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  258. package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.d.ts +6 -0
  259. package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.d.ts.map +1 -0
  260. package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js +34 -0
  261. package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js.map +1 -0
  262. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.d.ts +9 -7
  263. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.d.ts.map +1 -1
  264. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js +8 -7
  265. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js.map +1 -1
  266. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
  267. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js +1 -1
  268. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
  269. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.d.ts +1 -1
  270. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.d.ts.map +1 -1
  271. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js +1 -1
  272. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js.map +1 -1
  273. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts +10 -1
  274. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
  275. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +179 -79
  276. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
  277. package/node_modules/@earendil-works/pi-ai/package.json +2 -2
  278. package/node_modules/@earendil-works/pi-tui/README.md +15 -3
  279. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  280. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +9 -53
  281. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  282. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
  283. package/node_modules/@earendil-works/pi-tui/dist/components/input.js +6 -54
  284. package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
  285. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -1
  286. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  287. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  288. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +1 -1
  289. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
  290. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +34 -7
  291. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
  292. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +33 -10
  293. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  294. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +173 -39
  295. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  296. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +18 -3
  297. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  298. package/node_modules/@earendil-works/pi-tui/dist/tui.js +166 -22
  299. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  300. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +1 -0
  301. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  302. package/node_modules/@earendil-works/pi-tui/dist/utils.js +11 -3
  303. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  304. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts +25 -0
  305. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts.map +1 -0
  306. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js +96 -0
  307. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js.map +1 -0
  308. package/node_modules/@earendil-works/pi-tui/package.json +2 -2
  309. package/npm-shrinkwrap.json +56 -56
  310. package/package.json +5 -5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"word-navigation.d.ts","sourceRoot":"","sources":["../src/word-navigation.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACrC,mEAAmE;IACnE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACvD,yGAAyG;IACzG,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;CAC/C;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAgDtG;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAuCrG","sourcesContent":["import { getWordSegmenter, isWhitespaceChar, PUNCTUATION_REGEX } from \"./utils.ts\";\n\nconst wordSegmenter = getWordSegmenter();\n\n/**\n * Options for word navigation functions.\n * When omitted, uses the default Intl.Segmenter word segmentation.\n */\nexport interface WordNavigationOptions {\n\t/** Custom segmenter returning word segments for the given text. */\n\tsegment?: (text: string) => Iterable<Intl.SegmentData>;\n\t/** Predicate identifying atomic segments that should be treated as single units (e.g. paste markers). */\n\tisAtomicSegment?: (segment: string) => boolean;\n}\n\n/**\n * Find the cursor position after moving one word backward from `cursor` in `text`.\n * Skips trailing whitespace, then stops at the next word/punctuation boundary.\n *\n * Pure function - does not mutate any state.\n */\nexport function findWordBackward(text: string, cursor: number, options?: WordNavigationOptions): number {\n\tif (cursor <= 0) return 0;\n\n\tconst textBeforeCursor = text.slice(0, cursor);\n\tconst segmentFn = options?.segment;\n\tconst isAtomic = options?.isAtomicSegment;\n\tconst segments = segmentFn ? [...segmentFn(textBeforeCursor)] : [...wordSegmenter.segment(textBeforeCursor)];\n\tlet newCursor = cursor;\n\n\t// Skip trailing whitespace\n\twhile (\n\t\tsegments.length > 0 &&\n\t\t!isAtomic?.(segments[segments.length - 1]?.segment || \"\") &&\n\t\tisWhitespaceChar(segments[segments.length - 1]?.segment || \"\")\n\t) {\n\t\tnewCursor -= segments.pop()?.segment.length || 0;\n\t}\n\n\tif (segments.length === 0) return newCursor;\n\n\tconst last = segments[segments.length - 1]!;\n\n\tif (isAtomic?.(last.segment)) {\n\t\t// Skip one atomic segment.\n\t\tnewCursor -= last.segment.length;\n\t} else if (last.isWordLike) {\n\t\t// Skip inside one word-like segment, preserving ASCII punctuation boundaries.\n\t\tconst segment = last.segment;\n\t\tconst matches = [...segment.matchAll(new RegExp(PUNCTUATION_REGEX, \"g\"))];\n\t\tif (matches.length <= 0) {\n\t\t\tnewCursor -= segment.length;\n\t\t} else {\n\t\t\tconst lastMatch = matches[matches.length - 1]!;\n\t\t\tnewCursor -= segment.length - (lastMatch.index + lastMatch[0].length);\n\t\t}\n\t} else {\n\t\t// Skip non-word non-whitespace run (punctuation)\n\t\twhile (\n\t\t\tsegments.length > 0 &&\n\t\t\t!isAtomic?.(segments[segments.length - 1]?.segment || \"\") &&\n\t\t\t!segments[segments.length - 1]?.isWordLike &&\n\t\t\t!isWhitespaceChar(segments[segments.length - 1]?.segment || \"\")\n\t\t) {\n\t\t\tnewCursor -= segments.pop()?.segment.length || 0;\n\t\t}\n\t}\n\n\treturn newCursor;\n}\n\n/**\n * Find the cursor position after moving one word forward from `cursor` in `text`.\n * Skips leading whitespace, then stops at the next word/punctuation boundary.\n *\n * Pure function - does not mutate any state.\n */\nexport function findWordForward(text: string, cursor: number, options?: WordNavigationOptions): number {\n\tif (cursor >= text.length) return text.length;\n\n\tconst textAfterCursor = text.slice(cursor);\n\tconst segmentFn = options?.segment;\n\tconst isAtomic = options?.isAtomicSegment;\n\tconst segments = segmentFn ? segmentFn(textAfterCursor) : wordSegmenter.segment(textAfterCursor);\n\tconst iterator = segments[Symbol.iterator]();\n\tlet next = iterator.next();\n\tlet newCursor = cursor;\n\n\t// Skip leading whitespace\n\twhile (!next.done && !isAtomic?.(next.value.segment) && isWhitespaceChar(next.value.segment)) {\n\t\tnewCursor += next.value.segment.length;\n\t\tnext = iterator.next();\n\t}\n\n\tif (next.done) return newCursor;\n\n\tif (isAtomic?.(next.value.segment)) {\n\t\t// Skip one atomic segment.\n\t\tnewCursor += next.value.segment.length;\n\t} else if (next.value.isWordLike) {\n\t\t// Skip inside one word-like segment, preserving ASCII punctuation boundaries.\n\t\tnewCursor += PUNCTUATION_REGEX.exec(next.value.segment)?.index ?? next.value.segment.length;\n\t} else {\n\t\t// Skip non-word non-whitespace run (punctuation)\n\t\twhile (\n\t\t\t!next.done &&\n\t\t\t!isAtomic?.(next.value.segment) &&\n\t\t\t!next.value.isWordLike &&\n\t\t\t!isWhitespaceChar(next.value.segment)\n\t\t) {\n\t\t\tnewCursor += next.value.segment.length;\n\t\t\tnext = iterator.next();\n\t\t}\n\t}\n\n\treturn newCursor;\n}\n"]}
@@ -0,0 +1,96 @@
1
+ import { getWordSegmenter, isWhitespaceChar, PUNCTUATION_REGEX } from "./utils.js";
2
+ const wordSegmenter = getWordSegmenter();
3
+ /**
4
+ * Find the cursor position after moving one word backward from `cursor` in `text`.
5
+ * Skips trailing whitespace, then stops at the next word/punctuation boundary.
6
+ *
7
+ * Pure function - does not mutate any state.
8
+ */
9
+ export function findWordBackward(text, cursor, options) {
10
+ if (cursor <= 0)
11
+ return 0;
12
+ const textBeforeCursor = text.slice(0, cursor);
13
+ const segmentFn = options?.segment;
14
+ const isAtomic = options?.isAtomicSegment;
15
+ const segments = segmentFn ? [...segmentFn(textBeforeCursor)] : [...wordSegmenter.segment(textBeforeCursor)];
16
+ let newCursor = cursor;
17
+ // Skip trailing whitespace
18
+ while (segments.length > 0 &&
19
+ !isAtomic?.(segments[segments.length - 1]?.segment || "") &&
20
+ isWhitespaceChar(segments[segments.length - 1]?.segment || "")) {
21
+ newCursor -= segments.pop()?.segment.length || 0;
22
+ }
23
+ if (segments.length === 0)
24
+ return newCursor;
25
+ const last = segments[segments.length - 1];
26
+ if (isAtomic?.(last.segment)) {
27
+ // Skip one atomic segment.
28
+ newCursor -= last.segment.length;
29
+ }
30
+ else if (last.isWordLike) {
31
+ // Skip inside one word-like segment, preserving ASCII punctuation boundaries.
32
+ const segment = last.segment;
33
+ const matches = [...segment.matchAll(new RegExp(PUNCTUATION_REGEX, "g"))];
34
+ if (matches.length <= 0) {
35
+ newCursor -= segment.length;
36
+ }
37
+ else {
38
+ const lastMatch = matches[matches.length - 1];
39
+ newCursor -= segment.length - (lastMatch.index + lastMatch[0].length);
40
+ }
41
+ }
42
+ else {
43
+ // Skip non-word non-whitespace run (punctuation)
44
+ while (segments.length > 0 &&
45
+ !isAtomic?.(segments[segments.length - 1]?.segment || "") &&
46
+ !segments[segments.length - 1]?.isWordLike &&
47
+ !isWhitespaceChar(segments[segments.length - 1]?.segment || "")) {
48
+ newCursor -= segments.pop()?.segment.length || 0;
49
+ }
50
+ }
51
+ return newCursor;
52
+ }
53
+ /**
54
+ * Find the cursor position after moving one word forward from `cursor` in `text`.
55
+ * Skips leading whitespace, then stops at the next word/punctuation boundary.
56
+ *
57
+ * Pure function - does not mutate any state.
58
+ */
59
+ export function findWordForward(text, cursor, options) {
60
+ if (cursor >= text.length)
61
+ return text.length;
62
+ const textAfterCursor = text.slice(cursor);
63
+ const segmentFn = options?.segment;
64
+ const isAtomic = options?.isAtomicSegment;
65
+ const segments = segmentFn ? segmentFn(textAfterCursor) : wordSegmenter.segment(textAfterCursor);
66
+ const iterator = segments[Symbol.iterator]();
67
+ let next = iterator.next();
68
+ let newCursor = cursor;
69
+ // Skip leading whitespace
70
+ while (!next.done && !isAtomic?.(next.value.segment) && isWhitespaceChar(next.value.segment)) {
71
+ newCursor += next.value.segment.length;
72
+ next = iterator.next();
73
+ }
74
+ if (next.done)
75
+ return newCursor;
76
+ if (isAtomic?.(next.value.segment)) {
77
+ // Skip one atomic segment.
78
+ newCursor += next.value.segment.length;
79
+ }
80
+ else if (next.value.isWordLike) {
81
+ // Skip inside one word-like segment, preserving ASCII punctuation boundaries.
82
+ newCursor += PUNCTUATION_REGEX.exec(next.value.segment)?.index ?? next.value.segment.length;
83
+ }
84
+ else {
85
+ // Skip non-word non-whitespace run (punctuation)
86
+ while (!next.done &&
87
+ !isAtomic?.(next.value.segment) &&
88
+ !next.value.isWordLike &&
89
+ !isWhitespaceChar(next.value.segment)) {
90
+ newCursor += next.value.segment.length;
91
+ next = iterator.next();
92
+ }
93
+ }
94
+ return newCursor;
95
+ }
96
+ //# sourceMappingURL=word-navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"word-navigation.js","sourceRoot":"","sources":["../src/word-navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEnF,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAazC;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,MAAc,EAAE,OAA+B,EAAU;IACvG,IAAI,MAAM,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IAE1B,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/C,MAAM,SAAS,GAAG,OAAO,EAAE,OAAO,CAAC;IACnC,MAAM,QAAQ,GAAG,OAAO,EAAE,eAAe,CAAC;IAC1C,MAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,gB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;IAED,OAAO,SAAS,CAAC;AAAA,CACjB","sourcesContent":["import { getWordSegmenter, isWhitespaceChar, PUNCTUATION_REGEX } from \"./utils.ts\";\n\nconst wordSegmenter = getWordSegmenter();\n\n/**\n * Options for word navigation functions.\n * When omitted, uses the default Intl.Segmenter word segmentation.\n */\nexport interface WordNavigationOptions {\n\t/** Custom segmenter returning word segments for the given text. */\n\tsegment?: (text: string) => Iterable<Intl.SegmentData>;\n\t/** Predicate identifying atomic segments that should be treated as single units (e.g. paste markers). */\n\tisAtomicSegment?: (segment: string) => boolean;\n}\n\n/**\n * Find the cursor position after moving one word backward from `cursor` in `text`.\n * Skips trailing whitespace, then stops at the next word/punctuation boundary.\n *\n * Pure function - does not mutate any state.\n */\nexport function findWordBackward(text: string, cursor: number, options?: WordNavigationOptions): number {\n\tif (cursor <= 0) return 0;\n\n\tconst textBeforeCursor = text.slice(0, cursor);\n\tconst segmentFn = options?.segment;\n\tconst isAtomic = options?.isAtomicSegment;\n\tconst segments = segmentFn ? [...segmentFn(textBeforeCursor)] : [...wordSegmenter.segment(textBeforeCursor)];\n\tlet newCursor = cursor;\n\n\t// Skip trailing whitespace\n\twhile (\n\t\tsegments.length > 0 &&\n\t\t!isAtomic?.(segments[segments.length - 1]?.segment || \"\") &&\n\t\tisWhitespaceChar(segments[segments.length - 1]?.segment || \"\")\n\t) {\n\t\tnewCursor -= segments.pop()?.segment.length || 0;\n\t}\n\n\tif (segments.length === 0) return newCursor;\n\n\tconst last = segments[segments.length - 1]!;\n\n\tif (isAtomic?.(last.segment)) {\n\t\t// Skip one atomic segment.\n\t\tnewCursor -= last.segment.length;\n\t} else if (last.isWordLike) {\n\t\t// Skip inside one word-like segment, preserving ASCII punctuation boundaries.\n\t\tconst segment = last.segment;\n\t\tconst matches = [...segment.matchAll(new RegExp(PUNCTUATION_REGEX, \"g\"))];\n\t\tif (matches.length <= 0) {\n\t\t\tnewCursor -= segment.length;\n\t\t} else {\n\t\t\tconst lastMatch = matches[matches.length - 1]!;\n\t\t\tnewCursor -= segment.length - (lastMatch.index + lastMatch[0].length);\n\t\t}\n\t} else {\n\t\t// Skip non-word non-whitespace run (punctuation)\n\t\twhile (\n\t\t\tsegments.length > 0 &&\n\t\t\t!isAtomic?.(segments[segments.length - 1]?.segment || \"\") &&\n\t\t\t!segments[segments.length - 1]?.isWordLike &&\n\t\t\t!isWhitespaceChar(segments[segments.length - 1]?.segment || \"\")\n\t\t) {\n\t\t\tnewCursor -= segments.pop()?.segment.length || 0;\n\t\t}\n\t}\n\n\treturn newCursor;\n}\n\n/**\n * Find the cursor position after moving one word forward from `cursor` in `text`.\n * Skips leading whitespace, then stops at the next word/punctuation boundary.\n *\n * Pure function - does not mutate any state.\n */\nexport function findWordForward(text: string, cursor: number, options?: WordNavigationOptions): number {\n\tif (cursor >= text.length) return text.length;\n\n\tconst textAfterCursor = text.slice(cursor);\n\tconst segmentFn = options?.segment;\n\tconst isAtomic = options?.isAtomicSegment;\n\tconst segments = segmentFn ? segmentFn(textAfterCursor) : wordSegmenter.segment(textAfterCursor);\n\tconst iterator = segments[Symbol.iterator]();\n\tlet next = iterator.next();\n\tlet newCursor = cursor;\n\n\t// Skip leading whitespace\n\twhile (!next.done && !isAtomic?.(next.value.segment) && isWhitespaceChar(next.value.segment)) {\n\t\tnewCursor += next.value.segment.length;\n\t\tnext = iterator.next();\n\t}\n\n\tif (next.done) return newCursor;\n\n\tif (isAtomic?.(next.value.segment)) {\n\t\t// Skip one atomic segment.\n\t\tnewCursor += next.value.segment.length;\n\t} else if (next.value.isWordLike) {\n\t\t// Skip inside one word-like segment, preserving ASCII punctuation boundaries.\n\t\tnewCursor += PUNCTUATION_REGEX.exec(next.value.segment)?.index ?? next.value.segment.length;\n\t} else {\n\t\t// Skip non-word non-whitespace run (punctuation)\n\t\twhile (\n\t\t\t!next.done &&\n\t\t\t!isAtomic?.(next.value.segment) &&\n\t\t\t!next.value.isWordLike &&\n\t\t\t!isWhitespaceChar(next.value.segment)\n\t\t) {\n\t\t\tnewCursor += next.value.segment.length;\n\t\t\tnext = iterator.next();\n\t\t}\n\t}\n\n\treturn newCursor;\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@earendil-works/pi-tui",
3
3
  "private": true,
4
- "version": "2026.5.29",
4
+ "version": "2026.6.3",
5
5
  "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -30,7 +30,7 @@
30
30
  "license": "MIT",
31
31
  "repository": {
32
32
  "type": "git",
33
- "url": "git+https://github.com/earendil-works/pi-mono.git",
33
+ "url": "git+https://github.com/earendil-works/pi.git",
34
34
  "directory": "packages/tui"
35
35
  },
36
36
  "engines": {
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@code-yeongyu/senpi",
3
- "version": "2026.5.29",
3
+ "version": "2026.6.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@code-yeongyu/senpi",
9
- "version": "2026.5.29",
9
+ "version": "2026.6.3",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@anthropic-ai/sdk": "0.91.1",
13
13
  "@aws-sdk/client-bedrock-runtime": "3.1048.0",
14
- "@earendil-works/pi-agent-core": "^2026.5.29",
15
- "@earendil-works/pi-ai": "^2026.5.29",
16
- "@earendil-works/pi-tui": "^2026.5.29",
14
+ "@earendil-works/pi-agent-core": "^2026.6.3",
15
+ "@earendil-works/pi-ai": "^2026.6.3",
16
+ "@earendil-works/pi-tui": "^2026.6.3",
17
17
  "@mistralai/mistralai": "2.2.1",
18
18
  "@silvia-odwyer/photon-node": "0.3.4",
19
19
  "@smithy/node-http-handler": "4.7.3",
@@ -40,7 +40,7 @@
40
40
  "yaml": "2.9.0"
41
41
  },
42
42
  "optionalDependencies": {
43
- "@mariozechner/clipboard": "0.3.6"
43
+ "@mariozechner/clipboard": "0.3.9"
44
44
  },
45
45
  "bin": {
46
46
  "senpi": "dist/cli.js"
@@ -485,11 +485,11 @@
485
485
  }
486
486
  },
487
487
  "node_modules/@earendil-works/pi-agent-core": {
488
- "version": "2026.5.29",
489
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-2026.5.29.tgz",
488
+ "version": "2026.6.3",
489
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-2026.6.3.tgz",
490
490
  "license": "MIT",
491
491
  "dependencies": {
492
- "@earendil-works/pi-ai": "^2026.5.29",
492
+ "@earendil-works/pi-ai": "^2026.6.3",
493
493
  "ignore": "7.0.5",
494
494
  "typebox": "1.1.38",
495
495
  "yaml": "2.9.0"
@@ -499,8 +499,8 @@
499
499
  }
500
500
  },
501
501
  "node_modules/@earendil-works/pi-ai": {
502
- "version": "2026.5.29",
503
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-2026.5.29.tgz",
502
+ "version": "2026.6.3",
503
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-2026.6.3.tgz",
504
504
  "license": "MIT",
505
505
  "dependencies": {
506
506
  "@anthropic-ai/sdk": "0.91.1",
@@ -526,8 +526,8 @@
526
526
  }
527
527
  },
528
528
  "node_modules/@earendil-works/pi-tui": {
529
- "version": "2026.5.29",
530
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-2026.5.29.tgz",
529
+ "version": "2026.6.3",
530
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-2026.6.3.tgz",
531
531
  "license": "MIT",
532
532
  "dependencies": {
533
533
  "get-east-asian-width": "1.6.0",
@@ -562,21 +562,21 @@
562
562
  "hasInstallScript": true
563
563
  },
564
564
  "node_modules/@mariozechner/clipboard": {
565
- "version": "0.3.6",
566
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard/-/clipboard-0.3.6.tgz",
567
- "integrity": "sha512-MXdtr+6+ntlIVHdrZYuZNQydu6o8yZswFJ2Ln81j2O/Y9B/LDHvEaIm95xWNPkjGTWriSOeLnQJRFs6dYb60bg==",
565
+ "version": "0.3.9",
566
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard/-/clipboard-0.3.9.tgz",
567
+ "integrity": "sha512-ABnA53mdfkGZwOFUdZNv2S0CWGO/EIuPj8Vv9xmBFmSYg/qFc7ihO6q5FcQjvoE67kZpWkEc4AhD6B/os04yuA==",
568
568
  "license": "MIT",
569
569
  "optionalDependencies": {
570
- "@mariozechner/clipboard-darwin-arm64": "0.3.6",
571
- "@mariozechner/clipboard-darwin-universal": "0.3.6",
572
- "@mariozechner/clipboard-darwin-x64": "0.3.6",
573
- "@mariozechner/clipboard-linux-arm64-gnu": "0.3.6",
574
- "@mariozechner/clipboard-linux-arm64-musl": "0.3.6",
575
- "@mariozechner/clipboard-linux-riscv64-gnu": "0.3.6",
576
- "@mariozechner/clipboard-linux-x64-gnu": "0.3.6",
577
- "@mariozechner/clipboard-linux-x64-musl": "0.3.6",
578
- "@mariozechner/clipboard-win32-arm64-msvc": "0.3.6",
579
- "@mariozechner/clipboard-win32-x64-msvc": "0.3.6"
570
+ "@mariozechner/clipboard-darwin-arm64": "0.3.9",
571
+ "@mariozechner/clipboard-darwin-universal": "0.3.9",
572
+ "@mariozechner/clipboard-darwin-x64": "0.3.9",
573
+ "@mariozechner/clipboard-linux-arm64-gnu": "0.3.9",
574
+ "@mariozechner/clipboard-linux-arm64-musl": "0.3.9",
575
+ "@mariozechner/clipboard-linux-riscv64-gnu": "0.3.9",
576
+ "@mariozechner/clipboard-linux-x64-gnu": "0.3.9",
577
+ "@mariozechner/clipboard-linux-x64-musl": "0.3.9",
578
+ "@mariozechner/clipboard-win32-arm64-msvc": "0.3.9",
579
+ "@mariozechner/clipboard-win32-x64-msvc": "0.3.9"
580
580
  },
581
581
  "engines": {
582
582
  "node": ">= 10"
@@ -584,9 +584,9 @@
584
584
  "optional": true
585
585
  },
586
586
  "node_modules/@mariozechner/clipboard-darwin-arm64": {
587
- "version": "0.3.6",
588
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-arm64/-/clipboard-darwin-arm64-0.3.6.tgz",
589
- "integrity": "sha512-HjaisYCAbHi/1+N1yDAQHc8ZXGffufIUT5NSOSVR3f3AuMDusxTtnbK8tZ7JFDkShua1oNGZoNwQHsc8MPtE0Q==",
587
+ "version": "0.3.9",
588
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-arm64/-/clipboard-darwin-arm64-0.3.9.tgz",
589
+ "integrity": "sha512-BfgV7vCEWZwJwZJw03r6bP5+tf0iI/ANuQYCxi9RNn7FrWB3yzGuMKCrNLRl6V761vXRdL8+OqZ0wd4TqlsNOQ==",
590
590
  "license": "MIT",
591
591
  "engines": {
592
592
  "node": ">= 10"
@@ -600,9 +600,9 @@
600
600
  "optional": true
601
601
  },
602
602
  "node_modules/@mariozechner/clipboard-darwin-universal": {
603
- "version": "0.3.6",
604
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-universal/-/clipboard-darwin-universal-0.3.6.tgz",
605
- "integrity": "sha512-8BWtPjOtJOJoykml3w0fx0zRrfWP31mXrJwfoA7xzNprkZw1uolCNfgmjDiVBseoKjp16EGITz7bN+61qn8dWA==",
603
+ "version": "0.3.9",
604
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-universal/-/clipboard-darwin-universal-0.3.9.tgz",
605
+ "integrity": "sha512-BGGR4iA9Z2shAjI65eI5xtyb3LYNlDW9X3gxKxDbqtbnREohsrqznov6zpKoIrsRWpzlYVEdKphS7ksJ0/ndSQ==",
606
606
  "license": "MIT",
607
607
  "engines": {
608
608
  "node": ">= 10"
@@ -613,9 +613,9 @@
613
613
  "optional": true
614
614
  },
615
615
  "node_modules/@mariozechner/clipboard-darwin-x64": {
616
- "version": "0.3.6",
617
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-x64/-/clipboard-darwin-x64-0.3.6.tgz",
618
- "integrity": "sha512-p9syiZD1kU4I+1ya7f7g+zD1GiUvR8fdlRlNmgsZNWlyjtc8rlV2EjTLd/35x1LsdBq020GVvtzp0ZmPgBI09Q==",
616
+ "version": "0.3.9",
617
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-x64/-/clipboard-darwin-x64-0.3.9.tgz",
618
+ "integrity": "sha512-4kURmCbS6nt8uYhtmWpUcJWyPHfmAr5dTpXD1nO3pIfa+TSQ9DbrGOYCKH+aEFW47XhQ4Vp8ZTszie+wfFvDKg==",
619
619
  "license": "MIT",
620
620
  "engines": {
621
621
  "node": ">= 10"
@@ -629,9 +629,9 @@
629
629
  "optional": true
630
630
  },
631
631
  "node_modules/@mariozechner/clipboard-linux-arm64-gnu": {
632
- "version": "0.3.6",
633
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-arm64-gnu/-/clipboard-linux-arm64-gnu-0.3.6.tgz",
634
- "integrity": "sha512-5JFf5rGofrm+V29HNF+wLthXphHdQpMbKDUYJ5tML6/Z5DLlLOV/9Ak4kDPtYyZ+Dzf+kAusE0VsFg4+tfP1IA==",
632
+ "version": "0.3.9",
633
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-arm64-gnu/-/clipboard-linux-arm64-gnu-0.3.9.tgz",
634
+ "integrity": "sha512-g59OkUGP2DDfCOIKypHeYgv2M55u/cKvXa5dSxFbEJ34XvIQMdcVmpKCkGUro3ZgefXiGVdwguvTMQGpHWzIXw==",
635
635
  "license": "MIT",
636
636
  "engines": {
637
637
  "node": ">= 10"
@@ -648,9 +648,9 @@
648
648
  "optional": true
649
649
  },
650
650
  "node_modules/@mariozechner/clipboard-linux-arm64-musl": {
651
- "version": "0.3.6",
652
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-arm64-musl/-/clipboard-linux-arm64-musl-0.3.6.tgz",
653
- "integrity": "sha512-JlVjxxw0GbGC0djXYWRIqyteO3J1KZ/QG3udlEFaOD5TLOM1FnmXXAPDQBqr+aBVr720ef9K00dirYnJ0LDCtw==",
651
+ "version": "0.3.9",
652
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-arm64-musl/-/clipboard-linux-arm64-musl-0.3.9.tgz",
653
+ "integrity": "sha512-AGuJdgKsmJdm4Pych7kv3sqe591ERRaAHW3xjLooiFzn8J+PxUyof++7YZrB5Y5tpnTO+K18Og3taj2NpluCRQ==",
654
654
  "license": "MIT",
655
655
  "engines": {
656
656
  "node": ">= 10"
@@ -667,9 +667,9 @@
667
667
  "optional": true
668
668
  },
669
669
  "node_modules/@mariozechner/clipboard-linux-riscv64-gnu": {
670
- "version": "0.3.6",
671
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-riscv64-gnu/-/clipboard-linux-riscv64-gnu-0.3.6.tgz",
672
- "integrity": "sha512-4t8BUi5zZ+L77otFQVnVSlaTyAX4TVk9EqQm4syMrEQp96trFEHEwwNHcNEBGzYv5+K7mxay50TthYkz47OWzQ==",
670
+ "version": "0.3.9",
671
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-riscv64-gnu/-/clipboard-linux-riscv64-gnu-0.3.9.tgz",
672
+ "integrity": "sha512-DXBEAiuMpk7dhS1a9NzNxVAFi1vaKoPu7rQNgY8LIDLGrK3lnIp3nT10DUum+PKVJoJppIP+NAA8IZe4DMNDPw==",
673
673
  "license": "MIT",
674
674
  "engines": {
675
675
  "node": ">= 10"
@@ -686,9 +686,9 @@
686
686
  "optional": true
687
687
  },
688
688
  "node_modules/@mariozechner/clipboard-linux-x64-gnu": {
689
- "version": "0.3.6",
690
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-x64-gnu/-/clipboard-linux-x64-gnu-0.3.6.tgz",
691
- "integrity": "sha512-trtPwcNLW37irwQCJLtCxLw757jjJZk3TSnY/MU9bhtWtA3K9b/eLW0e4RGhUXDoFRds9opNWWaUDuFLa8dm0w==",
689
+ "version": "0.3.9",
690
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-x64-gnu/-/clipboard-linux-x64-gnu-0.3.9.tgz",
691
+ "integrity": "sha512-WORrMLd6EpElEME7JRKfSaY34nW1P5LbdgK5YNCS1ncG2LqmITsSMEJ8nh2mpvxb3TxqbOOKgY7k9eMJYlW9Mw==",
692
692
  "license": "MIT",
693
693
  "engines": {
694
694
  "node": ">= 10"
@@ -705,9 +705,9 @@
705
705
  "optional": true
706
706
  },
707
707
  "node_modules/@mariozechner/clipboard-linux-x64-musl": {
708
- "version": "0.3.6",
709
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-x64-musl/-/clipboard-linux-x64-musl-0.3.6.tgz",
710
- "integrity": "sha512-WfnzIvOCCWQiN0MmltCEo6cLceUDbYe+I7xyFZjaps5A+2Op/M2CY7Rey+C4ucQhrvmpoHmTSFgY9ODWk7snoA==",
708
+ "version": "0.3.9",
709
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-x64-musl/-/clipboard-linux-x64-musl-0.3.9.tgz",
710
+ "integrity": "sha512-/DHn+1DrfL6oRaPPWXaOKvonFFrni666fxd+zFqiQEfvBH0tsHVWjq9iqBk0oDp0qaPA72lIMy5BptxISBEhZQ==",
711
711
  "license": "MIT",
712
712
  "engines": {
713
713
  "node": ">= 10"
@@ -724,9 +724,9 @@
724
724
  "optional": true
725
725
  },
726
726
  "node_modules/@mariozechner/clipboard-win32-arm64-msvc": {
727
- "version": "0.3.6",
728
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-win32-arm64-msvc/-/clipboard-win32-arm64-msvc-0.3.6.tgz",
729
- "integrity": "sha512-+8+1aHYsBPUjmW3otmWlg+Hijt0iJvoBBs5e0mxFeUd4gDaKMB8Bn6x7c6KVtscg7E5j5NFXnwQqNSIAO4p8zQ==",
727
+ "version": "0.3.9",
728
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-win32-arm64-msvc/-/clipboard-win32-arm64-msvc-0.3.9.tgz",
729
+ "integrity": "sha512-O5FHD3ErkMwMhNzAfu3ggy0ug4z7btZuoQgwwxlzPrwV2bxlD6WDpqBY4NCgICAgZdDKdp+loUEKVAVt8aYnhQ==",
730
730
  "license": "MIT",
731
731
  "engines": {
732
732
  "node": ">= 10"
@@ -740,9 +740,9 @@
740
740
  "optional": true
741
741
  },
742
742
  "node_modules/@mariozechner/clipboard-win32-x64-msvc": {
743
- "version": "0.3.6",
744
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-win32-x64-msvc/-/clipboard-win32-x64-msvc-0.3.6.tgz",
745
- "integrity": "sha512-S4xfPmERC8ZkiLHe3vekZCjdDwNEETCuvCgQK2kP6/TnvmUkq1y2Pk+DjM4t8uh9KMX9bH4zs5ePcKa8GTXmfg==",
743
+ "version": "0.3.9",
744
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-win32-x64-msvc/-/clipboard-win32-x64-msvc-0.3.9.tgz",
745
+ "integrity": "sha512-ihQC3EufqEY81vhXBgVBtK4prL+wc62zJsSvxrgz7K1hsdt6OObz6v9p3Rn1OG3GJksTTKMJF0u/guMISHPhSA==",
746
746
  "license": "MIT",
747
747
  "engines": {
748
748
  "node": ">= 10"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/senpi",
3
- "version": "2026.5.29",
3
+ "version": "2026.6.3",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "piConfig": {
@@ -43,9 +43,9 @@
43
43
  "dependencies": {
44
44
  "@anthropic-ai/sdk": "0.91.1",
45
45
  "@aws-sdk/client-bedrock-runtime": "3.1048.0",
46
- "@earendil-works/pi-agent-core": "^2026.5.29",
47
- "@earendil-works/pi-ai": "^2026.5.29",
48
- "@earendil-works/pi-tui": "^2026.5.29",
46
+ "@earendil-works/pi-agent-core": "^2026.6.3",
47
+ "@earendil-works/pi-ai": "^2026.6.3",
48
+ "@earendil-works/pi-tui": "^2026.6.3",
49
49
  "@mistralai/mistralai": "2.2.1",
50
50
  "@silvia-odwyer/photon-node": "0.3.4",
51
51
  "@smithy/node-http-handler": "4.7.3",
@@ -83,7 +83,7 @@
83
83
  }
84
84
  },
85
85
  "optionalDependencies": {
86
- "@mariozechner/clipboard": "0.3.6"
86
+ "@mariozechner/clipboard": "0.3.9"
87
87
  },
88
88
  "devDependencies": {
89
89
  "@types/cross-spawn": "6.0.6",