@psnext/slingcli 2.4.20260528-1 → 2.5.20260602-1

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 (208) hide show
  1. package/node_modules/@aws-sdk/core/package.json +3 -3
  2. package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
  3. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/LICENSE +201 -0
  4. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/README.md +9 -0
  5. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +888 -0
  6. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +19 -0
  7. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
  8. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +9 -0
  9. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +50 -0
  10. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
  11. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +240 -0
  12. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +136 -0
  13. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +46 -0
  14. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +172 -0
  15. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
  16. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
  17. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
  18. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +23 -0
  19. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +8 -0
  20. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +41 -0
  21. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
  22. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +63 -0
  23. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +10 -0
  24. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +5 -0
  25. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +4 -0
  26. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +46 -0
  27. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -0
  28. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +47 -0
  29. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +46 -0
  30. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +36 -0
  31. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +76 -0
  32. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +2 -0
  33. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +6 -0
  34. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +6 -0
  35. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +2 -0
  36. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +5 -0
  37. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +7 -0
  38. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +9 -0
  39. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +12 -0
  40. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +66 -0
  41. package/node_modules/@aws-sdk/credential-provider-http/package.json +5 -5
  42. package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
  43. package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
  44. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +12 -1
  45. package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +12 -1
  46. package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
  47. package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
  48. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +4 -4
  49. package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
  50. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
  51. package/node_modules/@aws-sdk/eventstream-handler-node/package.json +2 -2
  52. package/node_modules/@aws-sdk/middleware-eventstream/package.json +2 -2
  53. package/node_modules/@aws-sdk/middleware-websocket/package.json +5 -5
  54. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  55. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  56. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  57. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  58. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  59. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/LICENSE +201 -0
  60. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/README.md +9 -0
  61. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +888 -0
  62. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +19 -0
  63. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
  64. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +9 -0
  65. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +50 -0
  66. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
  67. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +240 -0
  68. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +136 -0
  69. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +46 -0
  70. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +172 -0
  71. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
  72. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
  73. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
  74. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +23 -0
  75. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +8 -0
  76. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +41 -0
  77. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
  78. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +63 -0
  79. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +10 -0
  80. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +5 -0
  81. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +4 -0
  82. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +46 -0
  83. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -0
  84. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +47 -0
  85. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +46 -0
  86. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +36 -0
  87. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +76 -0
  88. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +2 -0
  89. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +6 -0
  90. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +6 -0
  91. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +2 -0
  92. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +5 -0
  93. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +7 -0
  94. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +9 -0
  95. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +12 -0
  96. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +66 -0
  97. package/node_modules/@aws-sdk/nested-clients/package.json +6 -6
  98. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
  99. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +81 -18
  100. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +1 -0
  101. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +1 -0
  102. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +14 -1
  103. package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  104. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +733 -523
  105. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +84 -21
  106. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +24 -14
  107. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +5 -9
  108. package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js +1 -1
  109. package/node_modules/@earendil-works/pi-ai/dist/providers/google.js +5 -3
  110. package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js +2 -3
  111. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js +2 -3
  112. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +130 -62
  113. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +18 -12
  114. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +4 -1
  115. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +5 -9
  116. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +1 -0
  117. package/node_modules/@earendil-works/pi-ai/dist/stream.js +14 -2
  118. package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js +34 -0
  119. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js +8 -7
  120. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js +1 -1
  121. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js +1 -1
  122. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +179 -79
  123. package/node_modules/@earendil-works/pi-ai/package.json +2 -2
  124. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +27 -0
  125. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +9 -1
  126. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js +1 -0
  127. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +29 -5
  128. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +21 -3
  129. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js +29 -1
  130. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +65 -13
  131. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +1 -1
  132. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resolve-config-value.js +134 -11
  133. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +12 -6
  134. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +167 -96
  135. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +14 -9
  136. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +0 -3
  137. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js +7 -10
  138. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js +5 -7
  139. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +6 -7
  140. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.js +17 -1
  141. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js +5 -6
  142. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +2 -0
  143. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +69 -16
  144. package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js +118 -1
  145. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/config-selector.js +1 -1
  146. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +2 -4
  147. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +61 -6
  148. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +10 -0
  149. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js +1 -0
  150. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +4 -1
  151. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/deprecation.js +13 -0
  152. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/json.js +7 -0
  153. package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +71 -56
  154. package/node_modules/@earendil-works/pi-coding-agent/package.json +7 -7
  155. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +9 -53
  156. package/node_modules/@earendil-works/pi-tui/dist/components/input.js +6 -54
  157. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +34 -7
  158. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +172 -37
  159. package/node_modules/@earendil-works/pi-tui/dist/tui.js +166 -22
  160. package/node_modules/@earendil-works/pi-tui/dist/utils.js +8 -3
  161. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js +96 -0
  162. package/node_modules/@earendil-works/pi-tui/package.json +2 -2
  163. package/node_modules/@mariozechner/clipboard/Cargo.toml +3 -3
  164. package/node_modules/@mariozechner/clipboard/index.d.ts +34 -20
  165. package/node_modules/@mariozechner/clipboard/index.js +546 -257
  166. package/node_modules/@mariozechner/clipboard/package.json +14 -14
  167. package/node_modules/@mariozechner/clipboard/src/lib.rs +4 -9
  168. package/node_modules/@mariozechner/clipboard-linux-x64-gnu/clipboard.linux-x64-gnu.node +0 -0
  169. package/node_modules/@mariozechner/clipboard-linux-x64-gnu/package.json +2 -2
  170. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +39 -22
  171. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +39 -22
  172. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +19 -6
  173. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +4 -5
  174. package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/constants.js +1 -1
  175. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/ConfiguredRetryStrategy.js +4 -5
  176. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryToken.js +3 -0
  177. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/StandardRetryStrategy.js +9 -5
  178. package/node_modules/@smithy/core/dist-types/submodules/retry/middleware-retry/configurations.d.ts +4 -1
  179. package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/ConfiguredRetryStrategy.d.ts +1 -2
  180. package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/DefaultRetryToken.d.ts +3 -0
  181. package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/StandardRetryStrategy.d.ts +1 -1
  182. package/node_modules/@smithy/core/package.json +2 -2
  183. package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +14 -13
  184. package/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js +14 -13
  185. package/node_modules/@smithy/credential-provider-imds/package.json +3 -3
  186. package/node_modules/@smithy/fetch-http-handler/package.json +4 -4
  187. package/node_modules/@smithy/signature-v4/package.json +3 -3
  188. package/node_modules/@smithy/types/dist-types/retry.d.ts +25 -0
  189. package/node_modules/@smithy/types/package.json +1 -1
  190. package/node_modules/protobufjs/dist/light/protobuf.js +7 -5
  191. package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
  192. package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
  193. package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
  194. package/node_modules/protobufjs/dist/minimal/protobuf.js +3 -3
  195. package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
  196. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
  197. package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
  198. package/node_modules/protobufjs/dist/protobuf.js +7 -5
  199. package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
  200. package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  201. package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
  202. package/node_modules/protobufjs/package.json +1 -1
  203. package/node_modules/protobufjs/src/converter.js +4 -2
  204. package/node_modules/protobufjs/src/roots.js +1 -1
  205. package/node_modules/undici/lib/global.js +10 -1
  206. package/node_modules/undici/package.json +1 -1
  207. package/package.json +6 -6
  208. package/slingshot/index.js +248 -247
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@earendil-works/pi-coding-agent",
3
- "version": "0.75.5",
3
+ "version": "0.78.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@earendil-works/pi-coding-agent",
9
- "version": "0.75.5",
9
+ "version": "0.78.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@earendil-works/pi-agent-core": "^0.75.5",
13
- "@earendil-works/pi-ai": "^0.75.5",
14
- "@earendil-works/pi-tui": "^0.75.5",
12
+ "@earendil-works/pi-agent-core": "^0.78.0",
13
+ "@earendil-works/pi-ai": "^0.78.0",
14
+ "@earendil-works/pi-tui": "^0.78.0",
15
15
  "@silvia-odwyer/photon-node": "0.3.4",
16
16
  "chalk": "5.6.2",
17
17
  "cross-spawn": "7.0.6",
@@ -28,7 +28,7 @@
28
28
  "yaml": "2.9.0"
29
29
  },
30
30
  "optionalDependencies": {
31
- "@mariozechner/clipboard": "0.3.6"
31
+ "@mariozechner/clipboard": "0.3.9"
32
32
  },
33
33
  "bin": {
34
34
  "pi": "dist/cli.js"
@@ -473,11 +473,11 @@
473
473
  }
474
474
  },
475
475
  "node_modules/@earendil-works/pi-agent-core": {
476
- "version": "0.75.5",
477
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-0.75.5.tgz",
476
+ "version": "0.78.0",
477
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-0.78.0.tgz",
478
478
  "license": "MIT",
479
479
  "dependencies": {
480
- "@earendil-works/pi-ai": "^0.75.5",
480
+ "@earendil-works/pi-ai": "^0.78.0",
481
481
  "ignore": "7.0.5",
482
482
  "typebox": "1.1.38",
483
483
  "yaml": "2.9.0"
@@ -487,8 +487,8 @@
487
487
  }
488
488
  },
489
489
  "node_modules/@earendil-works/pi-ai": {
490
- "version": "0.75.5",
491
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-0.75.5.tgz",
490
+ "version": "0.78.0",
491
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-0.78.0.tgz",
492
492
  "license": "MIT",
493
493
  "dependencies": {
494
494
  "@anthropic-ai/sdk": "0.91.1",
@@ -510,8 +510,8 @@
510
510
  }
511
511
  },
512
512
  "node_modules/@earendil-works/pi-tui": {
513
- "version": "0.75.5",
514
- "resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-0.75.5.tgz",
513
+ "version": "0.78.0",
514
+ "resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-0.78.0.tgz",
515
515
  "license": "MIT",
516
516
  "dependencies": {
517
517
  "get-east-asian-width": "1.6.0",
@@ -546,21 +546,21 @@
546
546
  "hasInstallScript": true
547
547
  },
548
548
  "node_modules/@mariozechner/clipboard": {
549
- "version": "0.3.6",
550
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard/-/clipboard-0.3.6.tgz",
551
- "integrity": "sha512-MXdtr+6+ntlIVHdrZYuZNQydu6o8yZswFJ2Ln81j2O/Y9B/LDHvEaIm95xWNPkjGTWriSOeLnQJRFs6dYb60bg==",
549
+ "version": "0.3.9",
550
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard/-/clipboard-0.3.9.tgz",
551
+ "integrity": "sha512-ABnA53mdfkGZwOFUdZNv2S0CWGO/EIuPj8Vv9xmBFmSYg/qFc7ihO6q5FcQjvoE67kZpWkEc4AhD6B/os04yuA==",
552
552
  "license": "MIT",
553
553
  "optionalDependencies": {
554
- "@mariozechner/clipboard-darwin-arm64": "0.3.6",
555
- "@mariozechner/clipboard-darwin-universal": "0.3.6",
556
- "@mariozechner/clipboard-darwin-x64": "0.3.6",
557
- "@mariozechner/clipboard-linux-arm64-gnu": "0.3.6",
558
- "@mariozechner/clipboard-linux-arm64-musl": "0.3.6",
559
- "@mariozechner/clipboard-linux-riscv64-gnu": "0.3.6",
560
- "@mariozechner/clipboard-linux-x64-gnu": "0.3.6",
561
- "@mariozechner/clipboard-linux-x64-musl": "0.3.6",
562
- "@mariozechner/clipboard-win32-arm64-msvc": "0.3.6",
563
- "@mariozechner/clipboard-win32-x64-msvc": "0.3.6"
554
+ "@mariozechner/clipboard-darwin-arm64": "0.3.9",
555
+ "@mariozechner/clipboard-darwin-universal": "0.3.9",
556
+ "@mariozechner/clipboard-darwin-x64": "0.3.9",
557
+ "@mariozechner/clipboard-linux-arm64-gnu": "0.3.9",
558
+ "@mariozechner/clipboard-linux-arm64-musl": "0.3.9",
559
+ "@mariozechner/clipboard-linux-riscv64-gnu": "0.3.9",
560
+ "@mariozechner/clipboard-linux-x64-gnu": "0.3.9",
561
+ "@mariozechner/clipboard-linux-x64-musl": "0.3.9",
562
+ "@mariozechner/clipboard-win32-arm64-msvc": "0.3.9",
563
+ "@mariozechner/clipboard-win32-x64-msvc": "0.3.9"
564
564
  },
565
565
  "engines": {
566
566
  "node": ">= 10"
@@ -568,9 +568,9 @@
568
568
  "optional": true
569
569
  },
570
570
  "node_modules/@mariozechner/clipboard-darwin-arm64": {
571
- "version": "0.3.6",
572
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-arm64/-/clipboard-darwin-arm64-0.3.6.tgz",
573
- "integrity": "sha512-HjaisYCAbHi/1+N1yDAQHc8ZXGffufIUT5NSOSVR3f3AuMDusxTtnbK8tZ7JFDkShua1oNGZoNwQHsc8MPtE0Q==",
571
+ "version": "0.3.9",
572
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-arm64/-/clipboard-darwin-arm64-0.3.9.tgz",
573
+ "integrity": "sha512-BfgV7vCEWZwJwZJw03r6bP5+tf0iI/ANuQYCxi9RNn7FrWB3yzGuMKCrNLRl6V761vXRdL8+OqZ0wd4TqlsNOQ==",
574
574
  "license": "MIT",
575
575
  "engines": {
576
576
  "node": ">= 10"
@@ -584,9 +584,9 @@
584
584
  "optional": true
585
585
  },
586
586
  "node_modules/@mariozechner/clipboard-darwin-universal": {
587
- "version": "0.3.6",
588
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-universal/-/clipboard-darwin-universal-0.3.6.tgz",
589
- "integrity": "sha512-8BWtPjOtJOJoykml3w0fx0zRrfWP31mXrJwfoA7xzNprkZw1uolCNfgmjDiVBseoKjp16EGITz7bN+61qn8dWA==",
587
+ "version": "0.3.9",
588
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-universal/-/clipboard-darwin-universal-0.3.9.tgz",
589
+ "integrity": "sha512-BGGR4iA9Z2shAjI65eI5xtyb3LYNlDW9X3gxKxDbqtbnREohsrqznov6zpKoIrsRWpzlYVEdKphS7ksJ0/ndSQ==",
590
590
  "license": "MIT",
591
591
  "engines": {
592
592
  "node": ">= 10"
@@ -597,9 +597,9 @@
597
597
  "optional": true
598
598
  },
599
599
  "node_modules/@mariozechner/clipboard-darwin-x64": {
600
- "version": "0.3.6",
601
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-x64/-/clipboard-darwin-x64-0.3.6.tgz",
602
- "integrity": "sha512-p9syiZD1kU4I+1ya7f7g+zD1GiUvR8fdlRlNmgsZNWlyjtc8rlV2EjTLd/35x1LsdBq020GVvtzp0ZmPgBI09Q==",
600
+ "version": "0.3.9",
601
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-darwin-x64/-/clipboard-darwin-x64-0.3.9.tgz",
602
+ "integrity": "sha512-4kURmCbS6nt8uYhtmWpUcJWyPHfmAr5dTpXD1nO3pIfa+TSQ9DbrGOYCKH+aEFW47XhQ4Vp8ZTszie+wfFvDKg==",
603
603
  "license": "MIT",
604
604
  "engines": {
605
605
  "node": ">= 10"
@@ -613,9 +613,9 @@
613
613
  "optional": true
614
614
  },
615
615
  "node_modules/@mariozechner/clipboard-linux-arm64-gnu": {
616
- "version": "0.3.6",
617
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-arm64-gnu/-/clipboard-linux-arm64-gnu-0.3.6.tgz",
618
- "integrity": "sha512-5JFf5rGofrm+V29HNF+wLthXphHdQpMbKDUYJ5tML6/Z5DLlLOV/9Ak4kDPtYyZ+Dzf+kAusE0VsFg4+tfP1IA==",
616
+ "version": "0.3.9",
617
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-arm64-gnu/-/clipboard-linux-arm64-gnu-0.3.9.tgz",
618
+ "integrity": "sha512-g59OkUGP2DDfCOIKypHeYgv2M55u/cKvXa5dSxFbEJ34XvIQMdcVmpKCkGUro3ZgefXiGVdwguvTMQGpHWzIXw==",
619
619
  "license": "MIT",
620
620
  "engines": {
621
621
  "node": ">= 10"
@@ -626,12 +626,15 @@
626
626
  "cpu": [
627
627
  "arm64"
628
628
  ],
629
+ "libc": [
630
+ "glibc"
631
+ ],
629
632
  "optional": true
630
633
  },
631
634
  "node_modules/@mariozechner/clipboard-linux-arm64-musl": {
632
- "version": "0.3.6",
633
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-arm64-musl/-/clipboard-linux-arm64-musl-0.3.6.tgz",
634
- "integrity": "sha512-JlVjxxw0GbGC0djXYWRIqyteO3J1KZ/QG3udlEFaOD5TLOM1FnmXXAPDQBqr+aBVr720ef9K00dirYnJ0LDCtw==",
635
+ "version": "0.3.9",
636
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-arm64-musl/-/clipboard-linux-arm64-musl-0.3.9.tgz",
637
+ "integrity": "sha512-AGuJdgKsmJdm4Pych7kv3sqe591ERRaAHW3xjLooiFzn8J+PxUyof++7YZrB5Y5tpnTO+K18Og3taj2NpluCRQ==",
635
638
  "license": "MIT",
636
639
  "engines": {
637
640
  "node": ">= 10"
@@ -642,12 +645,15 @@
642
645
  "cpu": [
643
646
  "arm64"
644
647
  ],
648
+ "libc": [
649
+ "musl"
650
+ ],
645
651
  "optional": true
646
652
  },
647
653
  "node_modules/@mariozechner/clipboard-linux-riscv64-gnu": {
648
- "version": "0.3.6",
649
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-riscv64-gnu/-/clipboard-linux-riscv64-gnu-0.3.6.tgz",
650
- "integrity": "sha512-4t8BUi5zZ+L77otFQVnVSlaTyAX4TVk9EqQm4syMrEQp96trFEHEwwNHcNEBGzYv5+K7mxay50TthYkz47OWzQ==",
654
+ "version": "0.3.9",
655
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-riscv64-gnu/-/clipboard-linux-riscv64-gnu-0.3.9.tgz",
656
+ "integrity": "sha512-DXBEAiuMpk7dhS1a9NzNxVAFi1vaKoPu7rQNgY8LIDLGrK3lnIp3nT10DUum+PKVJoJppIP+NAA8IZe4DMNDPw==",
651
657
  "license": "MIT",
652
658
  "engines": {
653
659
  "node": ">= 10"
@@ -658,12 +664,15 @@
658
664
  "cpu": [
659
665
  "riscv64"
660
666
  ],
667
+ "libc": [
668
+ "glibc"
669
+ ],
661
670
  "optional": true
662
671
  },
663
672
  "node_modules/@mariozechner/clipboard-linux-x64-gnu": {
664
- "version": "0.3.6",
665
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-x64-gnu/-/clipboard-linux-x64-gnu-0.3.6.tgz",
666
- "integrity": "sha512-trtPwcNLW37irwQCJLtCxLw757jjJZk3TSnY/MU9bhtWtA3K9b/eLW0e4RGhUXDoFRds9opNWWaUDuFLa8dm0w==",
673
+ "version": "0.3.9",
674
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-x64-gnu/-/clipboard-linux-x64-gnu-0.3.9.tgz",
675
+ "integrity": "sha512-WORrMLd6EpElEME7JRKfSaY34nW1P5LbdgK5YNCS1ncG2LqmITsSMEJ8nh2mpvxb3TxqbOOKgY7k9eMJYlW9Mw==",
667
676
  "license": "MIT",
668
677
  "engines": {
669
678
  "node": ">= 10"
@@ -674,12 +683,15 @@
674
683
  "cpu": [
675
684
  "x64"
676
685
  ],
686
+ "libc": [
687
+ "glibc"
688
+ ],
677
689
  "optional": true
678
690
  },
679
691
  "node_modules/@mariozechner/clipboard-linux-x64-musl": {
680
- "version": "0.3.6",
681
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-x64-musl/-/clipboard-linux-x64-musl-0.3.6.tgz",
682
- "integrity": "sha512-WfnzIvOCCWQiN0MmltCEo6cLceUDbYe+I7xyFZjaps5A+2Op/M2CY7Rey+C4ucQhrvmpoHmTSFgY9ODWk7snoA==",
692
+ "version": "0.3.9",
693
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-linux-x64-musl/-/clipboard-linux-x64-musl-0.3.9.tgz",
694
+ "integrity": "sha512-/DHn+1DrfL6oRaPPWXaOKvonFFrni666fxd+zFqiQEfvBH0tsHVWjq9iqBk0oDp0qaPA72lIMy5BptxISBEhZQ==",
683
695
  "license": "MIT",
684
696
  "engines": {
685
697
  "node": ">= 10"
@@ -690,12 +702,15 @@
690
702
  "cpu": [
691
703
  "x64"
692
704
  ],
705
+ "libc": [
706
+ "musl"
707
+ ],
693
708
  "optional": true
694
709
  },
695
710
  "node_modules/@mariozechner/clipboard-win32-arm64-msvc": {
696
- "version": "0.3.6",
697
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-win32-arm64-msvc/-/clipboard-win32-arm64-msvc-0.3.6.tgz",
698
- "integrity": "sha512-+8+1aHYsBPUjmW3otmWlg+Hijt0iJvoBBs5e0mxFeUd4gDaKMB8Bn6x7c6KVtscg7E5j5NFXnwQqNSIAO4p8zQ==",
711
+ "version": "0.3.9",
712
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-win32-arm64-msvc/-/clipboard-win32-arm64-msvc-0.3.9.tgz",
713
+ "integrity": "sha512-O5FHD3ErkMwMhNzAfu3ggy0ug4z7btZuoQgwwxlzPrwV2bxlD6WDpqBY4NCgICAgZdDKdp+loUEKVAVt8aYnhQ==",
699
714
  "license": "MIT",
700
715
  "engines": {
701
716
  "node": ">= 10"
@@ -709,9 +724,9 @@
709
724
  "optional": true
710
725
  },
711
726
  "node_modules/@mariozechner/clipboard-win32-x64-msvc": {
712
- "version": "0.3.6",
713
- "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-win32-x64-msvc/-/clipboard-win32-x64-msvc-0.3.6.tgz",
714
- "integrity": "sha512-S4xfPmERC8ZkiLHe3vekZCjdDwNEETCuvCgQK2kP6/TnvmUkq1y2Pk+DjM4t8uh9KMX9bH4zs5ePcKa8GTXmfg==",
727
+ "version": "0.3.9",
728
+ "resolved": "https://registry.npmjs.org/@mariozechner/clipboard-win32-x64-msvc/-/clipboard-win32-x64-msvc-0.3.9.tgz",
729
+ "integrity": "sha512-ihQC3EufqEY81vhXBgVBtK4prL+wc62zJsSvxrgz7K1hsdt6OObz6v9p3Rn1OG3GJksTTKMJF0u/guMISHPhSA==",
715
730
  "license": "MIT",
716
731
  "engines": {
717
732
  "node": ">= 10"
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@earendil-works/pi-coding-agent",
3
- "version": "0.75.5",
3
+ "version": "0.78.0",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "piConfig": {
7
7
  "configDir": ".sling",
8
- "name":"sling"
8
+ "name": "sling"
9
9
  },
10
10
  "bin": {
11
11
  "pi": "dist/cli.js"
@@ -40,9 +40,9 @@
40
40
  "prepublishOnly": "npm run clean && npm run build && npm run shrinkwrap"
41
41
  },
42
42
  "dependencies": {
43
- "@earendil-works/pi-agent-core": "^0.75.5",
44
- "@earendil-works/pi-ai": "^0.75.5",
45
- "@earendil-works/pi-tui": "^0.75.5",
43
+ "@earendil-works/pi-agent-core": "^0.78.0",
44
+ "@earendil-works/pi-ai": "^0.78.0",
45
+ "@earendil-works/pi-tui": "^0.78.0",
46
46
  "@silvia-odwyer/photon-node": "0.3.4",
47
47
  "chalk": "5.6.2",
48
48
  "cross-spawn": "7.0.6",
@@ -65,7 +65,7 @@
65
65
  }
66
66
  },
67
67
  "optionalDependencies": {
68
- "@mariozechner/clipboard": "0.3.6"
68
+ "@mariozechner/clipboard": "0.3.9"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@types/cross-spawn": "6.0.6",
@@ -90,7 +90,7 @@
90
90
  "license": "MIT",
91
91
  "repository": {
92
92
  "type": "git",
93
- "url": "git+https://github.com/earendil-works/pi-mono.git",
93
+ "url": "git+https://github.com/earendil-works/pi.git",
94
94
  "directory": "packages/coding-agent"
95
95
  },
96
96
  "engines": {
@@ -4,6 +4,7 @@ import { KillRing } from "../kill-ring.js";
4
4
  import { CURSOR_MARKER } from "../tui.js";
5
5
  import { UndoStack } from "../undo-stack.js";
6
6
  import { getGraphemeSegmenter, getWordSegmenter, isWhitespaceChar, truncateToWidth, visibleWidth } from "../utils.js";
7
+ import { findWordBackward, findWordForward } from "../word-navigation.js";
7
8
  import { SelectList } from "./select-list.js";
8
9
  const graphemeSegmenter = getGraphemeSegmenter();
9
10
  const wordSegmenter = getWordSegmenter();
@@ -1501,32 +1502,10 @@ export class Editor {
1501
1502
  }
1502
1503
  return;
1503
1504
  }
1504
- const textBeforeCursor = currentLine.slice(0, this.state.cursorCol);
1505
- const segments = [...this.segment(textBeforeCursor, "word")];
1506
- let newCol = this.state.cursorCol;
1507
- // Skip trailing whitespace
1508
- while (segments.length > 0 &&
1509
- !isPasteMarker(segments[segments.length - 1]?.segment || "") &&
1510
- isWhitespaceChar(segments[segments.length - 1]?.segment || "")) {
1511
- newCol -= segments.pop()?.segment.length || 0;
1512
- }
1513
- if (segments.length > 0) {
1514
- const last = segments[segments.length - 1];
1515
- if (isPasteMarker(last.segment) || last.isWordLike) {
1516
- // Skip one word-like segment (or paste marker)
1517
- newCol -= segments.pop()?.segment.length || 0;
1518
- }
1519
- else {
1520
- // Skip non-word non-whitespace run (punctuation)
1521
- while (segments.length > 0 &&
1522
- !isPasteMarker(segments[segments.length - 1]?.segment || "") &&
1523
- !segments[segments.length - 1]?.isWordLike &&
1524
- !isWhitespaceChar(segments[segments.length - 1]?.segment || "")) {
1525
- newCol -= segments.pop()?.segment.length || 0;
1526
- }
1527
- }
1528
- }
1529
- this.setCursorCol(newCol);
1505
+ this.setCursorCol(findWordBackward(currentLine, this.state.cursorCol, {
1506
+ segment: (text) => this.segment(text, "word"),
1507
+ isAtomicSegment: isPasteMarker,
1508
+ }));
1530
1509
  }
1531
1510
  /**
1532
1511
  * Yank (paste) the most recent kill ring entry at cursor position.
@@ -1683,33 +1662,10 @@ export class Editor {
1683
1662
  }
1684
1663
  return;
1685
1664
  }
1686
- const textAfterCursor = currentLine.slice(this.state.cursorCol);
1687
- const segments = this.segment(textAfterCursor, "word");
1688
- const iterator = segments[Symbol.iterator]();
1689
- let next = iterator.next();
1690
- let newCol = this.state.cursorCol;
1691
- // Skip leading whitespace
1692
- while (!next.done && !isPasteMarker(next.value.segment) && isWhitespaceChar(next.value.segment)) {
1693
- newCol += next.value.segment.length;
1694
- next = iterator.next();
1695
- }
1696
- if (!next.done) {
1697
- if (isPasteMarker(next.value.segment) || next.value.isWordLike) {
1698
- // Skip one word-like segment (or paste marker)
1699
- newCol += next.value.segment.length;
1700
- }
1701
- else {
1702
- // Skip non-word non-whitespace run (punctuation)
1703
- while (!next.done &&
1704
- !isPasteMarker(next.value.segment) &&
1705
- !next.value.isWordLike &&
1706
- !isWhitespaceChar(next.value.segment)) {
1707
- newCol += next.value.segment.length;
1708
- next = iterator.next();
1709
- }
1710
- }
1711
- }
1712
- this.setCursorCol(newCol);
1665
+ this.setCursorCol(findWordForward(currentLine, this.state.cursorCol, {
1666
+ segment: (text) => this.segment(text, "word"),
1667
+ isAtomicSegment: isPasteMarker,
1668
+ }));
1713
1669
  }
1714
1670
  // Slash menu only allowed on the first line of the editor
1715
1671
  isSlashMenuAllowed() {
@@ -3,7 +3,8 @@ import { decodeKittyPrintable } from "../keys.js";
3
3
  import { KillRing } from "../kill-ring.js";
4
4
  import { CURSOR_MARKER } from "../tui.js";
5
5
  import { UndoStack } from "../undo-stack.js";
6
- import { getGraphemeSegmenter, isPunctuationChar, isWhitespaceChar, sliceByColumn, visibleWidth } from "../utils.js";
6
+ import { getGraphemeSegmenter, isWhitespaceChar, sliceByColumn, visibleWidth } from "../utils.js";
7
+ import { findWordBackward, findWordForward } from "../word-navigation.js";
7
8
  const segmenter = getGraphemeSegmenter();
8
9
  /**
9
10
  * Input component - single-line text input with horizontal scrolling
@@ -289,65 +290,16 @@ export class Input {
289
290
  this.lastAction = null;
290
291
  }
291
292
  moveWordBackwards() {
292
- if (this.cursor === 0) {
293
+ if (this.cursor === 0)
293
294
  return;
294
- }
295
295
  this.lastAction = null;
296
- const textBeforeCursor = this.value.slice(0, this.cursor);
297
- const graphemes = [...segmenter.segment(textBeforeCursor)];
298
- // Skip trailing whitespace
299
- while (graphemes.length > 0 && isWhitespaceChar(graphemes[graphemes.length - 1]?.segment || "")) {
300
- this.cursor -= graphemes.pop()?.segment.length || 0;
301
- }
302
- if (graphemes.length > 0) {
303
- const lastGrapheme = graphemes[graphemes.length - 1]?.segment || "";
304
- if (isPunctuationChar(lastGrapheme)) {
305
- // Skip punctuation run
306
- while (graphemes.length > 0 && isPunctuationChar(graphemes[graphemes.length - 1]?.segment || "")) {
307
- this.cursor -= graphemes.pop()?.segment.length || 0;
308
- }
309
- }
310
- else {
311
- // Skip word run
312
- while (graphemes.length > 0 &&
313
- !isWhitespaceChar(graphemes[graphemes.length - 1]?.segment || "") &&
314
- !isPunctuationChar(graphemes[graphemes.length - 1]?.segment || "")) {
315
- this.cursor -= graphemes.pop()?.segment.length || 0;
316
- }
317
- }
318
- }
296
+ this.cursor = findWordBackward(this.value, this.cursor);
319
297
  }
320
298
  moveWordForwards() {
321
- if (this.cursor >= this.value.length) {
299
+ if (this.cursor >= this.value.length)
322
300
  return;
323
- }
324
301
  this.lastAction = null;
325
- const textAfterCursor = this.value.slice(this.cursor);
326
- const segments = segmenter.segment(textAfterCursor);
327
- const iterator = segments[Symbol.iterator]();
328
- let next = iterator.next();
329
- // Skip leading whitespace
330
- while (!next.done && isWhitespaceChar(next.value.segment)) {
331
- this.cursor += next.value.segment.length;
332
- next = iterator.next();
333
- }
334
- if (!next.done) {
335
- const firstGrapheme = next.value.segment;
336
- if (isPunctuationChar(firstGrapheme)) {
337
- // Skip punctuation run
338
- while (!next.done && isPunctuationChar(next.value.segment)) {
339
- this.cursor += next.value.segment.length;
340
- next = iterator.next();
341
- }
342
- }
343
- else {
344
- // Skip word run
345
- while (!next.done && !isWhitespaceChar(next.value.segment) && !isPunctuationChar(next.value.segment)) {
346
- this.cursor += next.value.segment.length;
347
- next = iterator.next();
348
- }
349
- }
350
- }
302
+ this.cursor = findWordForward(this.value, this.cursor);
351
303
  }
352
304
  handlePaste(pastedText) {
353
305
  this.lastAction = null;
@@ -1,3 +1,4 @@
1
+ import { execSync } from "node:child_process";
1
2
  let cachedCapabilities = null;
2
3
  // Default cell dimensions - updated by TUI when terminal responds to query
3
4
  let cellDimensions = { widthPx: 9, heightPx: 18 };
@@ -7,17 +8,40 @@ export function getCellDimensions() {
7
8
  export function setCellDimensions(dims) {
8
9
  cellDimensions = dims;
9
10
  }
10
- export function detectCapabilities() {
11
+ /**
12
+ * Checks whether the attached tmux client forwards OSC 8 hyperlinks to the
13
+ * outer terminal. tmux only re-emits them when its `client_termfeatures` lists
14
+ * `hyperlinks`, and strips them otherwise. On any error fallbacks `false`.
15
+ */
16
+ function probeTmuxHyperlinks() {
17
+ try {
18
+ const termfeatures = execSync("tmux display-message -p '#{client_termfeatures}'", {
19
+ encoding: "utf8",
20
+ timeout: 250,
21
+ stdio: ["ignore", "pipe", "ignore"],
22
+ });
23
+ return termfeatures
24
+ .split(",")
25
+ .map((feature) => feature.trim())
26
+ .includes("hyperlinks");
27
+ }
28
+ catch {
29
+ return false;
30
+ }
31
+ }
32
+ export function detectCapabilities(tmuxForwardsHyperlink = probeTmuxHyperlinks) {
11
33
  const termProgram = process.env.TERM_PROGRAM?.toLowerCase() || "";
34
+ const terminalEmulator = process.env.TERMINAL_EMULATOR?.toLowerCase() || "";
12
35
  const term = process.env.TERM?.toLowerCase() || "";
13
36
  const colorTerm = process.env.COLORTERM?.toLowerCase() || "";
14
37
  const hasTrueColorHint = colorTerm === "truecolor" || colorTerm === "24bit";
15
- // tmux and screen swallow OSC 8 by default (passthrough is opt-in and wraps
16
- // sequences differently). Force hyperlinks off whenever we detect them, even
17
- // when the outer terminal would otherwise support OSC 8. Image protocols are
18
- // also unreliable under tmux/screen, so leave `images: null` for safety.
19
- const inTmuxOrScreen = !!process.env.TMUX || term.startsWith("tmux") || term.startsWith("screen");
20
- if (inTmuxOrScreen) {
38
+ // Emit OSC 8 hyperlinks only when tmux confirms it forwards.
39
+ // Image protocols are unreliable under tmux, so leave `images: null`.
40
+ if (process.env.TMUX || term.startsWith("tmux")) {
41
+ return { images: null, trueColor: hasTrueColorHint, hyperlinks: tmuxForwardsHyperlink() };
42
+ }
43
+ // screen does not forward OSC 8 hyperlinks, so keep them off there.
44
+ if (term.startsWith("screen")) {
21
45
  return { images: null, trueColor: hasTrueColorHint, hyperlinks: false };
22
46
  }
23
47
  if (process.env.KITTY_WINDOW_ID || termProgram === "kitty") {
@@ -41,6 +65,9 @@ export function detectCapabilities() {
41
65
  if (termProgram === "alacritty") {
42
66
  return { images: null, trueColor: true, hyperlinks: true };
43
67
  }
68
+ if (terminalEmulator === "jetbrains-jediterm") {
69
+ return { images: null, trueColor: true, hyperlinks: false };
70
+ }
44
71
  // Unknown terminal: be conservative. OSC 8 is rendered invisibly as "just
45
72
  // text" on terminals that swallow it, which means the URL disappears from
46
73
  // the rendered output. Default to the legacy `text (url)` behavior unless we