@psnext/slingcli 2.4.20260507-3 → 2.4.20260509-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 (393) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/bin/sling.js +12 -12
  4. package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +2 -2
  5. package/node_modules/@aws-sdk/token-providers/package.json +1 -1
  6. package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/agent-loop.js +1 -1
  7. package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/agent.js +4 -3
  8. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +526 -0
  9. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +243 -0
  10. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +616 -0
  11. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +348 -0
  12. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js +3 -0
  13. package/node_modules/@earendil-works/pi-agent-core/dist/harness/factory.js +9 -0
  14. package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js +102 -0
  15. package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +194 -0
  16. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js +92 -0
  17. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js +42 -0
  18. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js +31 -0
  19. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +196 -0
  20. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js +170 -0
  21. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js +90 -0
  22. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +258 -0
  23. package/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.js +30 -0
  24. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +16 -0
  25. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +97 -0
  26. package/node_modules/@earendil-works/pi-agent-core/dist/index.js +26 -0
  27. package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/proxy.js +1 -1
  28. package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/package.json +7 -5
  29. package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/cli.js +6 -6
  30. package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/env-api-keys.js +1 -0
  31. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +307 -0
  32. package/node_modules/@earendil-works/pi-ai/dist/image-models.js +23 -0
  33. package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.js +22 -0
  34. package/node_modules/@earendil-works/pi-ai/dist/images.js +14 -0
  35. package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/index.js +4 -0
  36. package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/models.generated.js +427 -122
  37. package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js +129 -0
  38. package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.js +34 -0
  39. package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-codex-responses.js +1 -1
  40. package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-completions.js +150 -122
  41. package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-responses-shared.js +14 -1
  42. package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/openai-codex.js +25 -14
  43. package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/overflow.js +3 -0
  44. package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/package.json +5 -4
  45. package/node_modules/@earendil-works/pi-coding-agent/dist/bun/register-bedrock.js +4 -0
  46. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/args.js +1 -0
  47. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/config-selector.js +1 -1
  48. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/list-models.js +1 -1
  49. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/session-picker.js +1 -1
  50. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/config.js +52 -30
  51. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/agent-session.js +1 -1
  52. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/auth-storage.js +2 -2
  53. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/compaction/branch-summarization.js +1 -1
  54. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/compaction/compaction.js +1 -1
  55. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js +153 -0
  56. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/template.css +45 -1
  57. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/template.js +68 -4
  58. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/loader.js +26 -12
  59. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/keybindings.js +1 -1
  60. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/model-registry.js +3 -2
  61. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/model-resolver.js +2 -1
  62. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/package-manager.js +22 -5
  63. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/provider-display-names.js +1 -0
  64. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/sdk.js +3 -3
  65. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/bash.js +1 -1
  66. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/edit.js +1 -1
  67. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/find.js +1 -1
  68. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/grep.js +1 -1
  69. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/ls.js +1 -1
  70. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/read.js +3 -2
  71. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/render-utils.js +1 -1
  72. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/truncate.js +205 -0
  73. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/write.js +1 -1
  74. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/main.js +2 -2
  75. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/migrations.js +3 -3
  76. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/assistant-message.js +1 -1
  77. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +1 -1
  78. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/bordered-loader.js +1 -1
  79. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.js +1 -1
  80. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.js +1 -1
  81. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/config-selector.js +25 -3
  82. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/custom-editor.js +1 -1
  83. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/custom-message.js +1 -1
  84. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/earendil-announcement.js +1 -1
  85. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/extension-editor.js +1 -1
  86. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/extension-input.js +1 -1
  87. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/extension-selector.js +1 -1
  88. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/footer.js +1 -1
  89. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/keybinding-hints.js +36 -0
  90. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +4 -3
  91. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/model-selector.js +2 -2
  92. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/oauth-selector.js +1 -1
  93. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/scoped-models-selector.js +1 -1
  94. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/session-selector-search.js +1 -1
  95. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/session-selector.js +1 -1
  96. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +4 -2
  97. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/show-images-selector.js +1 -1
  98. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.js +1 -1
  99. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/theme-selector.js +1 -1
  100. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/thinking-selector.js +1 -1
  101. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +1 -1
  102. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/tree-selector.js +3 -2
  103. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/user-message-selector.js +1 -1
  104. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/user-message.js +1 -1
  105. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/visual-truncate.js +1 -1
  106. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/interactive-mode.js +47 -32
  107. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/dark.json +1 -1
  108. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/light.json +1 -1
  109. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/theme.js +1 -1
  110. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/package-manager-cli.js +42 -39
  111. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/clipboard.js +9 -2
  112. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/paths.js +16 -0
  113. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/version-check.js +9 -2
  114. package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/package.json +9 -8
  115. package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/image.js +14 -7
  116. package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/markdown.js +24 -84
  117. package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/terminal-image.js +10 -4
  118. package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/tui.js +73 -4
  119. package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/utils.js +33 -7
  120. package/node_modules/{@mariozechner → @earendil-works}/pi-tui/package.json +3 -3
  121. package/node_modules/@mariozechner/clipboard/README.md +58 -0
  122. package/node_modules/@mariozechner/clipboard/index.d.ts +23 -0
  123. package/node_modules/@mariozechner/clipboard-linux-x64-gnu/README.md +3 -0
  124. package/node_modules/@types/node/README.md +1 -1
  125. package/node_modules/@types/node/http2.d.ts +4 -1
  126. package/node_modules/@types/node/package.json +2 -2
  127. package/node_modules/@types/node/stream/web.d.ts +4 -0
  128. package/node_modules/brace-expansion/dist/commonjs/index.js +1 -1
  129. package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
  130. package/node_modules/brace-expansion/dist/esm/index.js +1 -1
  131. package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
  132. package/node_modules/brace-expansion/package.json +1 -1
  133. package/node_modules/fast-xml-builder/CHANGELOG.md +4 -0
  134. package/node_modules/fast-xml-builder/lib/fxb.cjs +1 -1
  135. package/node_modules/fast-xml-builder/lib/fxb.d.cts +91 -1
  136. package/node_modules/fast-xml-builder/lib/fxb.min.js +1 -1
  137. package/node_modules/fast-xml-builder/lib/fxb.min.js.map +1 -1
  138. package/node_modules/fast-xml-builder/package.json +3 -2
  139. package/node_modules/fast-xml-builder/src/fxb.d.ts +92 -3
  140. package/node_modules/fast-xml-builder/src/fxb.js +92 -31
  141. package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +87 -33
  142. package/node_modules/get-east-asian-width/lookup-data.js +15 -12
  143. package/node_modules/get-east-asian-width/lookup.js +25 -22
  144. package/node_modules/get-east-asian-width/package.json +1 -1
  145. package/node_modules/jiti/README.md +258 -0
  146. package/node_modules/jiti/dist/babel.cjs +257 -0
  147. package/node_modules/jiti/dist/jiti.cjs +1 -0
  148. package/node_modules/jiti/lib/jiti.mjs +29 -0
  149. package/node_modules/jiti/lib/types.d.ts +420 -0
  150. package/node_modules/jiti/package.json +146 -0
  151. package/node_modules/protobufjs/dist/light/protobuf.js +5 -3
  152. package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
  153. package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
  154. package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
  155. package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
  156. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
  157. package/node_modules/protobufjs/dist/protobuf.js +5 -3
  158. package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
  159. package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  160. package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
  161. package/node_modules/protobufjs/package.json +1 -1
  162. package/node_modules/protobufjs/src/namespace.js +3 -1
  163. package/node_modules/semver/README.md +19 -4
  164. package/node_modules/semver/bin/semver.js +14 -10
  165. package/node_modules/semver/functions/truncate.js +48 -0
  166. package/node_modules/semver/index.js +2 -0
  167. package/node_modules/semver/internal/re.js +1 -1
  168. package/node_modules/semver/package.json +3 -3
  169. package/node_modules/semver/range.bnf +5 -4
  170. package/node_modules/socks/package.json +2 -2
  171. package/node_modules/xml-naming/README.md +189 -0
  172. package/node_modules/xml-naming/package.json +54 -0
  173. package/node_modules/xml-naming/src/index.d.ts +74 -0
  174. package/node_modules/xml-naming/src/index.js +270 -0
  175. package/package.json +6 -6
  176. package/sling-default-packages.json +2 -1
  177. package/slingshot/index.js +442 -23
  178. package/node_modules/@mariozechner/jiti/dist/babel.cjs +0 -246
  179. package/node_modules/@mariozechner/jiti/dist/jiti.cjs +0 -1
  180. package/node_modules/@mariozechner/jiti/package.json +0 -96
  181. package/node_modules/@mariozechner/pi-agent-core/dist/index.js +0 -9
  182. package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/cli.js +0 -116
  183. package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/env-api-keys.js +0 -166
  184. package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/index.js +0 -15
  185. package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/models.generated.js +0 -16568
  186. package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/providers/amazon-bedrock.js +0 -753
  187. package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/providers/openai-codex-responses.js +0 -909
  188. package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/providers/openai-responses-shared.js +0 -479
  189. package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/utils/oauth/openai-codex.js +0 -374
  190. package/node_modules/@mariozechner/pi-ai/dist/api-registry.js +0 -44
  191. package/node_modules/@mariozechner/pi-ai/dist/bedrock-provider.js +0 -6
  192. package/node_modules/@mariozechner/pi-ai/dist/models.js +0 -71
  193. package/node_modules/@mariozechner/pi-ai/dist/oauth.js +0 -2
  194. package/node_modules/@mariozechner/pi-ai/dist/providers/anthropic.js +0 -951
  195. package/node_modules/@mariozechner/pi-ai/dist/providers/azure-openai-responses.js +0 -208
  196. package/node_modules/@mariozechner/pi-ai/dist/providers/cloudflare.js +0 -26
  197. package/node_modules/@mariozechner/pi-ai/dist/providers/faux.js +0 -368
  198. package/node_modules/@mariozechner/pi-ai/dist/providers/github-copilot-headers.js +0 -29
  199. package/node_modules/@mariozechner/pi-ai/dist/providers/google-shared.js +0 -329
  200. package/node_modules/@mariozechner/pi-ai/dist/providers/google-vertex.js +0 -442
  201. package/node_modules/@mariozechner/pi-ai/dist/providers/google.js +0 -400
  202. package/node_modules/@mariozechner/pi-ai/dist/providers/mistral.js +0 -535
  203. package/node_modules/@mariozechner/pi-ai/dist/providers/openai-completions.js +0 -908
  204. package/node_modules/@mariozechner/pi-ai/dist/providers/openai-responses.js +0 -220
  205. package/node_modules/@mariozechner/pi-ai/dist/providers/register-builtins.js +0 -243
  206. package/node_modules/@mariozechner/pi-ai/dist/providers/simple-options.js +0 -39
  207. package/node_modules/@mariozechner/pi-ai/dist/providers/transform-messages.js +0 -184
  208. package/node_modules/@mariozechner/pi-ai/dist/stream.js +0 -27
  209. package/node_modules/@mariozechner/pi-ai/dist/types.js +0 -2
  210. package/node_modules/@mariozechner/pi-ai/dist/utils/event-stream.js +0 -81
  211. package/node_modules/@mariozechner/pi-ai/dist/utils/hash.js +0 -14
  212. package/node_modules/@mariozechner/pi-ai/dist/utils/headers.js +0 -8
  213. package/node_modules/@mariozechner/pi-ai/dist/utils/json-parse.js +0 -113
  214. package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/anthropic.js +0 -335
  215. package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/github-copilot.js +0 -292
  216. package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/index.js +0 -121
  217. package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/oauth-page.js +0 -105
  218. package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/pkce.js +0 -31
  219. package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/types.js +0 -2
  220. package/node_modules/@mariozechner/pi-ai/dist/utils/overflow.js +0 -146
  221. package/node_modules/@mariozechner/pi-ai/dist/utils/sanitize-unicode.js +0 -26
  222. package/node_modules/@mariozechner/pi-ai/dist/utils/typebox-helpers.js +0 -21
  223. package/node_modules/@mariozechner/pi-ai/dist/utils/validation.js +0 -281
  224. package/node_modules/@mariozechner/pi-ai/package.json +0 -108
  225. package/node_modules/@mariozechner/pi-coding-agent/dist/bun/register-bedrock.js +0 -4
  226. package/node_modules/@mariozechner/pi-coding-agent/dist/modes/interactive/components/keybinding-hints.js +0 -22
  227. package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/agent-loop.js +0 -458
  228. package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/agent.js +0 -398
  229. package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/index.js +0 -9
  230. package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/proxy.js +0 -278
  231. package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/types.js +0 -2
  232. package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/package.json +0 -45
  233. package/node_modules/socks/.claude/settings.local.json +0 -26
  234. package/node_modules/std-env/LICENCE +0 -22
  235. package/node_modules/std-env/README.md +0 -118
  236. package/node_modules/std-env/dist/index.cjs +0 -1
  237. package/node_modules/std-env/dist/index.d.cts +0 -92
  238. package/node_modules/std-env/dist/index.d.mts +0 -92
  239. package/node_modules/std-env/dist/index.d.ts +0 -92
  240. package/node_modules/std-env/dist/index.mjs +0 -1
  241. package/node_modules/std-env/package.json +0 -46
  242. package/node_modules/yoctocolors/base.d.ts +0 -47
  243. package/node_modules/yoctocolors/base.js +0 -94
  244. package/node_modules/yoctocolors/index.d.ts +0 -2
  245. package/node_modules/yoctocolors/index.js +0 -2
  246. package/node_modules/yoctocolors/license +0 -9
  247. package/node_modules/yoctocolors/package.json +0 -69
  248. package/node_modules/yoctocolors/readme.md +0 -138
  249. /package/node_modules/{@mariozechner/pi-coding-agent/dist/core → @earendil-works/pi-agent-core/dist/harness}/compaction/utils.js +0 -0
  250. /package/node_modules/{@mariozechner/pi-coding-agent/dist/core/tools → @earendil-works/pi-agent-core/dist/harness/utils}/truncate.js +0 -0
  251. /package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/types.js +0 -0
  252. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/api-registry.js +0 -0
  253. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/bedrock-provider.js +0 -0
  254. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/models.js +0 -0
  255. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/oauth.js +0 -0
  256. /package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/providers/amazon-bedrock.js +0 -0
  257. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/anthropic.js +0 -0
  258. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/azure-openai-responses.js +0 -0
  259. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/cloudflare.js +0 -0
  260. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/faux.js +0 -0
  261. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/github-copilot-headers.js +0 -0
  262. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/google-shared.js +0 -0
  263. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/google-vertex.js +0 -0
  264. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/google.js +0 -0
  265. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/mistral.js +0 -0
  266. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-responses.js +0 -0
  267. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/register-builtins.js +0 -0
  268. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/simple-options.js +0 -0
  269. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/transform-messages.js +0 -0
  270. /package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/session-resources.js +0 -0
  271. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/stream.js +0 -0
  272. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/types.js +0 -0
  273. /package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/utils/diagnostics.js +0 -0
  274. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/event-stream.js +0 -0
  275. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/hash.js +0 -0
  276. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/headers.js +0 -0
  277. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/json-parse.js +0 -0
  278. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/anthropic.js +0 -0
  279. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/github-copilot.js +0 -0
  280. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/index.js +0 -0
  281. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/oauth-page.js +0 -0
  282. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/pkce.js +0 -0
  283. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/types.js +0 -0
  284. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/sanitize-unicode.js +0 -0
  285. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/typebox-helpers.js +0 -0
  286. /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/validation.js +0 -0
  287. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/bun/cli.js +0 -0
  288. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/bun/restore-sandbox-env.js +0 -0
  289. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/file-processor.js +0 -0
  290. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/initial-message.js +0 -0
  291. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli.js +0 -0
  292. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/agent-session-runtime.js +0 -0
  293. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/agent-session-services.js +0 -0
  294. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/auth-guidance.js +0 -0
  295. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/bash-executor.js +0 -0
  296. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/compaction/index.js +0 -0
  297. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/defaults.js +0 -0
  298. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/diagnostics.js +0 -0
  299. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/event-bus.js +0 -0
  300. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/exec.js +0 -0
  301. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/ansi-to-html.js +0 -0
  302. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/index.js +0 -0
  303. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/template.html +0 -0
  304. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/tool-renderer.js +0 -0
  305. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/vendor/highlight.min.js +0 -0
  306. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/vendor/marked.min.js +0 -0
  307. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/index.js +0 -0
  308. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/runner.js +0 -0
  309. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/types.js +0 -0
  310. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/wrapper.js +0 -0
  311. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/footer-data-provider.js +0 -0
  312. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/index.js +0 -0
  313. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/messages.js +0 -0
  314. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/output-guard.js +0 -0
  315. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/prompt-templates.js +0 -0
  316. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/resolve-config-value.js +0 -0
  317. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/resource-loader.js +0 -0
  318. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/session-cwd.js +0 -0
  319. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/session-manager.js +0 -0
  320. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/settings-manager.js +0 -0
  321. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/skills.js +0 -0
  322. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/slash-commands.js +0 -0
  323. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/source-info.js +0 -0
  324. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/system-prompt.js +0 -0
  325. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/telemetry.js +0 -0
  326. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/timings.js +0 -0
  327. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/edit-diff.js +0 -0
  328. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/file-mutation-queue.js +0 -0
  329. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/index.js +0 -0
  330. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/output-accumulator.js +0 -0
  331. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/path-utils.js +0 -0
  332. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/tool-definition-wrapper.js +0 -0
  333. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/index.js +0 -0
  334. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/index.js +0 -0
  335. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/assets/clankolas.png +0 -0
  336. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/armin.js +0 -0
  337. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/countdown-timer.js +0 -0
  338. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/daxnuts.js +0 -0
  339. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/diff.js +0 -0
  340. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/dynamic-border.js +0 -0
  341. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/index.js +0 -0
  342. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/theme-schema.json +0 -0
  343. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/print-mode.js +0 -0
  344. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/jsonl.js +0 -0
  345. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/rpc-client.js +0 -0
  346. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/rpc-mode.js +0 -0
  347. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/rpc-types.js +0 -0
  348. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/changelog.js +0 -0
  349. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/child-process.js +0 -0
  350. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/clipboard-image.js +0 -0
  351. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/clipboard-native.js +0 -0
  352. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/exif-orientation.js +0 -0
  353. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/frontmatter.js +0 -0
  354. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/fs-watch.js +0 -0
  355. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/git.js +0 -0
  356. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/image-convert.js +0 -0
  357. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/image-resize.js +0 -0
  358. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/mime.js +0 -0
  359. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/photon.js +0 -0
  360. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/pi-user-agent.js +0 -0
  361. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/shell.js +0 -0
  362. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/sleep.js +0 -0
  363. /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/tools-manager.js +0 -0
  364. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/autocomplete.js +0 -0
  365. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/box.js +0 -0
  366. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/cancellable-loader.js +0 -0
  367. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/editor.js +0 -0
  368. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/input.js +0 -0
  369. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/loader.js +0 -0
  370. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/select-list.js +0 -0
  371. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/settings-list.js +0 -0
  372. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/spacer.js +0 -0
  373. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/text.js +0 -0
  374. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/truncated-text.js +0 -0
  375. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/editor-component.js +0 -0
  376. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/fuzzy.js +0 -0
  377. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/index.js +0 -0
  378. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/keybindings.js +0 -0
  379. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/keys.js +0 -0
  380. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/kill-ring.js +0 -0
  381. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/stdin-buffer.js +0 -0
  382. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/terminal.js +0 -0
  383. /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/undo-stack.js +0 -0
  384. /package/node_modules/{@mariozechner/jiti → jiti}/LICENSE +0 -0
  385. /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-cli.mjs +0 -0
  386. /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-hooks.mjs +0 -0
  387. /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-native.mjs +0 -0
  388. /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-register.d.mts +0 -0
  389. /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-register.mjs +0 -0
  390. /package/node_modules/{@mariozechner/jiti/lib/jiti.mjs → jiti/lib/jiti-static.mjs} +0 -0
  391. /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti.cjs +0 -0
  392. /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti.d.cts +0 -0
  393. /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti.d.mts +0 -0
@@ -1,4 +1,5 @@
1
1
  import { realpathSync } from "node:fs";
2
+ import { isAbsolute, relative, resolve as resolvePath, sep } from "node:path";
2
3
  /**
3
4
  * Resolve a path to its canonical (real) form, following symlinks.
4
5
  * Falls back to the raw path if resolution fails (e.g. the target does
@@ -31,4 +32,19 @@ export function isLocalPath(value) {
31
32
  }
32
33
  return true;
33
34
  }
35
+ function resolveAgainstCwd(filePath, cwd) {
36
+ return isAbsolute(filePath) ? resolvePath(filePath) : resolvePath(cwd, filePath);
37
+ }
38
+ export function getCwdRelativePath(filePath, cwd) {
39
+ const resolvedCwd = resolvePath(cwd);
40
+ const resolvedPath = resolveAgainstCwd(filePath, resolvedCwd);
41
+ const relativePath = relative(resolvedCwd, resolvedPath);
42
+ const isInsideCwd = relativePath === "" ||
43
+ (relativePath !== ".." && !relativePath.startsWith(`..${sep}`) && !isAbsolute(relativePath));
44
+ return isInsideCwd ? relativePath || "." : undefined;
45
+ }
46
+ export function formatPathRelativeToCwdOrAbsolute(filePath, cwd) {
47
+ const absolutePath = resolveAgainstCwd(filePath, cwd);
48
+ return (getCwdRelativePath(absolutePath, cwd) ?? absolutePath).split(sep).join("/");
49
+ }
34
50
  //# sourceMappingURL=paths.js.map
@@ -40,7 +40,7 @@ export function isNewerPackageVersion(candidateVersion, currentVersion) {
40
40
  }
41
41
  return candidateVersion.trim() !== currentVersion.trim();
42
42
  }
43
- export async function getLatestPiVersion(currentVersion, options = {}) {
43
+ export async function getLatestPiRelease(currentVersion, options = {}) {
44
44
  if (process.env.PI_SKIP_VERSION_CHECK || process.env.PI_OFFLINE)
45
45
  return undefined;
46
46
  const response = await fetch(LATEST_VERSION_URL, {
@@ -53,7 +53,14 @@ export async function getLatestPiVersion(currentVersion, options = {}) {
53
53
  if (!response.ok)
54
54
  return undefined;
55
55
  const data = (await response.json());
56
- return typeof data.version === "string" && data.version.trim() ? data.version.trim() : undefined;
56
+ if (typeof data.version !== "string" || !data.version.trim()) {
57
+ return undefined;
58
+ }
59
+ const packageName = typeof data.packageName === "string" && data.packageName.trim() ? data.packageName.trim() : undefined;
60
+ return { version: data.version.trim(), packageName };
61
+ }
62
+ export async function getLatestPiVersion(currentVersion, options = {}) {
63
+ return (await getLatestPiRelease(currentVersion, options))?.version;
57
64
  }
58
65
  export async function checkForNewPiVersion(currentVersion) {
59
66
  try {
@@ -1,11 +1,12 @@
1
1
  {
2
- "name": "@mariozechner/pi-coding-agent",
3
- "version": "0.73.0",
2
+ "name": "@earendil-works/pi-coding-agent",
3
+ "version": "0.74.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
11
  "bin": {
11
12
  "pi": "dist/cli.js"
@@ -39,10 +40,9 @@
39
40
  "prepublishOnly": "npm run clean && npm run build"
40
41
  },
41
42
  "dependencies": {
42
- "@mariozechner/jiti": "^2.6.2",
43
- "@mariozechner/pi-agent-core": "^0.73.0",
44
- "@mariozechner/pi-ai": "^0.73.0",
45
- "@mariozechner/pi-tui": "^0.73.0",
43
+ "@earendil-works/pi-agent-core": "^0.74.0",
44
+ "@earendil-works/pi-ai": "^0.74.0",
45
+ "@earendil-works/pi-tui": "^0.74.0",
46
46
  "@silvia-odwyer/photon-node": "^0.3.4",
47
47
  "chalk": "^5.5.0",
48
48
  "cli-highlight": "^2.1.11",
@@ -52,6 +52,7 @@
52
52
  "glob": "^13.0.1",
53
53
  "hosted-git-info": "^9.0.2",
54
54
  "ignore": "^7.0.5",
55
+ "jiti": "^2.7.0",
55
56
  "marked": "^15.0.12",
56
57
  "minimatch": "^10.2.3",
57
58
  "proper-lockfile": "^4.1.2",
@@ -92,7 +93,7 @@
92
93
  "license": "MIT",
93
94
  "repository": {
94
95
  "type": "git",
95
- "url": "git+https://github.com/badlogic/pi-mono.git",
96
+ "url": "git+https://github.com/earendil-works/pi-mono.git",
96
97
  "directory": "packages/coding-agent"
97
98
  },
98
99
  "engines": {
@@ -1,4 +1,4 @@
1
- import { getCapabilities, getImageDimensions, imageFallback, renderImage, } from "../terminal-image.js";
1
+ import { allocateImageId, getCapabilities, getImageDimensions, imageFallback, renderImage, } from "../terminal-image.js";
2
2
  export class Image {
3
3
  base64Data;
4
4
  mimeType;
@@ -32,25 +32,32 @@ export class Image {
32
32
  const caps = getCapabilities();
33
33
  let lines;
34
34
  if (caps.images) {
35
+ if (caps.images === "kitty" && this.imageId === undefined) {
36
+ this.imageId = allocateImageId();
37
+ }
35
38
  const result = renderImage(this.base64Data, this.dimensions, {
36
39
  maxWidthCells: maxWidth,
37
40
  imageId: this.imageId,
41
+ moveCursor: false,
38
42
  });
39
43
  if (result) {
40
44
  // Store the image ID for later cleanup
41
45
  if (result.imageId) {
42
46
  this.imageId = result.imageId;
43
47
  }
44
- // Return `rows` lines so TUI accounts for image height
45
- // First (rows-1) lines are empty (TUI clears them)
46
- // Last line: move cursor back up, then output image sequence
48
+ // Return `rows` lines so TUI accounts for image height.
49
+ // First (rows-1) lines are empty and cleared before the image is drawn.
50
+ // Last line: move cursor back up, draw the image, then move back down
51
+ // for Kitty (this component disables Kitty's terminal-side cursor movement)
52
+ // so TUI cursor accounting stays inside the scroll area.
47
53
  lines = [];
48
54
  for (let i = 0; i < result.rows - 1; i++) {
49
55
  lines.push("");
50
56
  }
51
- // Move cursor up to first row, then output image
52
- const moveUp = result.rows > 1 ? `\x1b[${result.rows - 1}A` : "";
53
- lines.push(moveUp + result.sequence);
57
+ const rowOffset = result.rows - 1;
58
+ const moveUp = rowOffset > 0 ? `\x1b[${rowOffset}A` : "";
59
+ const moveDown = caps.images === "kitty" && rowOffset > 0 ? `\x1b[${rowOffset}B` : "";
60
+ lines.push(moveUp + result.sequence + moveDown);
54
61
  }
55
62
  else {
56
63
  const fallback = imageFallback(this.mimeType, this.dimensions, this.options.filename);
@@ -229,6 +229,9 @@ export class Markdown {
229
229
  }
230
230
  break;
231
231
  }
232
+ case "text":
233
+ lines.push(this.renderInlineTokens([token], styleContext));
234
+ break;
232
235
  case "code": {
233
236
  const indent = this.theme.codeBlockIndent ?? " ";
234
237
  lines.push(this.theme.codeBlockBorder(`\`\`\`${token.lang || ""}`));
@@ -252,7 +255,7 @@ export class Markdown {
252
255
  break;
253
256
  }
254
257
  case "list": {
255
- const listLines = this.renderList(token, 0, styleContext);
258
+ const listLines = this.renderList(token, 0, width, styleContext);
256
259
  lines.push(...listLines);
257
260
  // Don't add spacing after lists if a space token follows
258
261
  // (the space token will handle it)
@@ -417,98 +420,35 @@ export class Markdown {
417
420
  /**
418
421
  * Render a list with proper nesting support
419
422
  */
420
- renderList(token, depth, styleContext) {
423
+ renderList(token, depth, width, styleContext) {
421
424
  const lines = [];
422
- const indent = " ".repeat(depth);
425
+ const indent = " ".repeat(depth);
423
426
  // Use the list's start property (defaults to 1 for ordered lists)
424
- const startNumber = token.start ?? 1;
427
+ const startNumber = typeof token.start === "number" ? token.start : 1;
425
428
  for (let i = 0; i < token.items.length; i++) {
426
429
  const item = token.items[i];
427
430
  const bullet = token.ordered ? `${startNumber + i}. ` : "- ";
428
- // Process item tokens to handle nested lists
429
- const itemLines = this.renderListItem(item.tokens || [], depth, styleContext);
430
- if (itemLines.length > 0) {
431
- // First line - check if it's a nested list
432
- // A nested list will start with indent (spaces) followed by cyan bullet
433
- const firstLine = itemLines[0];
434
- const isNestedList = /^\s+\x1b\[36m[-\d]/.test(firstLine); // starts with spaces + cyan + bullet char
435
- if (isNestedList) {
436
- // This is a nested list, just add it as-is (already has full indent)
437
- lines.push(firstLine);
438
- }
439
- else {
440
- // Regular text content - add indent and bullet
441
- lines.push(indent + this.theme.listBullet(bullet) + firstLine);
431
+ const firstPrefix = indent + this.theme.listBullet(bullet);
432
+ const continuationPrefix = indent + " ".repeat(visibleWidth(bullet));
433
+ const itemWidth = Math.max(1, width - visibleWidth(firstPrefix));
434
+ let renderedAnyLine = false;
435
+ for (const itemToken of item.tokens) {
436
+ if (itemToken.type === "list") {
437
+ lines.push(...this.renderList(itemToken, depth + 1, width, styleContext));
438
+ renderedAnyLine = true;
439
+ continue;
442
440
  }
443
- // Rest of the lines
444
- for (let j = 1; j < itemLines.length; j++) {
445
- const line = itemLines[j];
446
- const isNestedListLine = /^\s+\x1b\[36m[-\d]/.test(line); // starts with spaces + cyan + bullet char
447
- if (isNestedListLine) {
448
- // Nested list line - already has full indent
449
- lines.push(line);
450
- }
451
- else {
452
- // Regular content - add parent indent + 2 spaces for continuation
453
- lines.push(`${indent} ${line}`);
441
+ const itemLines = this.renderToken(itemToken, itemWidth, undefined, styleContext);
442
+ for (const line of itemLines) {
443
+ for (const wrappedLine of wrapTextWithAnsi(line, itemWidth)) {
444
+ const linePrefix = renderedAnyLine ? continuationPrefix : firstPrefix;
445
+ lines.push(linePrefix + wrappedLine);
446
+ renderedAnyLine = true;
454
447
  }
455
448
  }
456
449
  }
457
- else {
458
- lines.push(indent + this.theme.listBullet(bullet));
459
- }
460
- }
461
- return lines;
462
- }
463
- /**
464
- * Render list item tokens, handling nested lists
465
- * Returns lines WITHOUT the parent indent (renderList will add it)
466
- */
467
- renderListItem(tokens, parentDepth, styleContext) {
468
- const lines = [];
469
- for (const token of tokens) {
470
- if (token.type === "list") {
471
- // Nested list - render with one additional indent level
472
- // These lines will have their own indent, so we just add them as-is
473
- const nestedLines = this.renderList(token, parentDepth + 1, styleContext);
474
- lines.push(...nestedLines);
475
- }
476
- else if (token.type === "text") {
477
- // Text content (may have inline tokens)
478
- const text = token.tokens && token.tokens.length > 0
479
- ? this.renderInlineTokens(token.tokens, styleContext)
480
- : token.text || "";
481
- lines.push(text);
482
- }
483
- else if (token.type === "paragraph") {
484
- // Paragraph in list item
485
- const text = this.renderInlineTokens(token.tokens || [], styleContext);
486
- lines.push(text);
487
- }
488
- else if (token.type === "code") {
489
- // Code block in list item
490
- const indent = this.theme.codeBlockIndent ?? " ";
491
- lines.push(this.theme.codeBlockBorder(`\`\`\`${token.lang || ""}`));
492
- if (this.theme.highlightCode) {
493
- const highlightedLines = this.theme.highlightCode(token.text, token.lang);
494
- for (const hlLine of highlightedLines) {
495
- lines.push(`${indent}${hlLine}`);
496
- }
497
- }
498
- else {
499
- const codeLines = token.text.split("\n");
500
- for (const codeLine of codeLines) {
501
- lines.push(`${indent}${this.theme.codeBlock(codeLine)}`);
502
- }
503
- }
504
- lines.push(this.theme.codeBlockBorder("```"));
505
- }
506
- else {
507
- // Other token types - try to render as inline
508
- const text = this.renderInlineTokens([token], styleContext);
509
- if (text) {
510
- lines.push(text);
511
- }
450
+ if (!renderedAnyLine) {
451
+ lines.push(firstPrefix);
512
452
  }
513
453
  }
514
454
  return lines;
@@ -80,6 +80,8 @@ export function allocateImageId() {
80
80
  export function encodeKitty(base64Data, options = {}) {
81
81
  const CHUNK_SIZE = 4096;
82
82
  const params = ["a=T", "f=100", "q=2"];
83
+ if (options.moveCursor === false)
84
+ params.push("C=1");
83
85
  if (options.columns)
84
86
  params.push(`c=${options.columns}`);
85
87
  if (options.rows)
@@ -114,14 +116,14 @@ export function encodeKitty(base64Data, options = {}) {
114
116
  * Uses uppercase 'I' to also free the image data.
115
117
  */
116
118
  export function deleteKittyImage(imageId) {
117
- return `\x1b_Ga=d,d=I,i=${imageId}\x1b\\`;
119
+ return `\x1b_Ga=d,d=I,i=${imageId},q=2\x1b\\`;
118
120
  }
119
121
  /**
120
122
  * Delete all visible Kitty graphics images.
121
123
  * Uses uppercase 'A' to also free the image data.
122
124
  */
123
125
  export function deleteAllKittyImages() {
124
- return `\x1b_Ga=d,d=A\x1b\\`;
126
+ return "\x1b_Ga=d,d=A,q=2\x1b\\";
125
127
  }
126
128
  export function encodeITerm2(base64Data, options = {}) {
127
129
  const params = [`inline=${options.inline !== false ? 1 : 0}`];
@@ -279,8 +281,12 @@ export function renderImage(base64Data, imageDimensions, options = {}) {
279
281
  const maxWidth = options.maxWidthCells ?? 80;
280
282
  const rows = calculateImageRows(imageDimensions, maxWidth, getCellDimensions());
281
283
  if (caps.images === "kitty") {
282
- // Only use imageId if explicitly provided - static images don't need IDs
283
- const sequence = encodeKitty(base64Data, { columns: maxWidth, rows, imageId: options.imageId });
284
+ const sequence = encodeKitty(base64Data, {
285
+ columns: maxWidth,
286
+ rows,
287
+ imageId: options.imageId,
288
+ moveCursor: options.moveCursor,
289
+ });
284
290
  return { sequence, rows, imageId: options.imageId };
285
291
  }
286
292
  if (caps.images === "iterm2") {
@@ -6,8 +6,29 @@ import * as os from "node:os";
6
6
  import * as path from "node:path";
7
7
  import { performance } from "node:perf_hooks";
8
8
  import { isKeyRelease, matchesKey } from "./keys.js";
9
- import { getCapabilities, isImageLine, setCellDimensions } from "./terminal-image.js";
9
+ import { deleteKittyImage, getCapabilities, isImageLine, setCellDimensions } from "./terminal-image.js";
10
10
  import { extractSegments, normalizeTerminalOutput, sliceByColumn, sliceWithWidth, visibleWidth } from "./utils.js";
11
+ const KITTY_SEQUENCE_PREFIX = "\x1b_G";
12
+ function extractKittyImageIds(line) {
13
+ const sequenceStart = line.indexOf(KITTY_SEQUENCE_PREFIX);
14
+ if (sequenceStart === -1)
15
+ return [];
16
+ const paramsStart = sequenceStart + KITTY_SEQUENCE_PREFIX.length;
17
+ const paramsEnd = line.indexOf(";", paramsStart);
18
+ if (paramsEnd === -1)
19
+ return [];
20
+ const params = line.slice(paramsStart, paramsEnd);
21
+ for (const param of params.split(",")) {
22
+ const [key, value] = param.split("=", 2);
23
+ if (key !== "i" || value === undefined)
24
+ continue;
25
+ const id = Number(value);
26
+ if (Number.isInteger(id) && id > 0 && id <= 0xffffffff) {
27
+ return [id];
28
+ }
29
+ }
30
+ return [];
31
+ }
11
32
  /** Type guard to check if a component implements Focusable */
12
33
  export function isFocusable(component) {
13
34
  return component !== null && "focused" in component;
@@ -75,6 +96,7 @@ export class Container {
75
96
  export class TUI extends Container {
76
97
  terminal;
77
98
  previousLines = [];
99
+ previousKittyImageIds = new Set();
78
100
  previousWidth = 0;
79
101
  previousHeight = 0;
80
102
  focusedComponent = null;
@@ -607,6 +629,43 @@ export class TUI extends Container {
607
629
  }
608
630
  return lines;
609
631
  }
632
+ collectKittyImageIds(lines) {
633
+ const ids = new Set();
634
+ for (const line of lines) {
635
+ for (const id of extractKittyImageIds(line)) {
636
+ ids.add(id);
637
+ }
638
+ }
639
+ return ids;
640
+ }
641
+ deleteKittyImages(ids) {
642
+ let buffer = "";
643
+ for (const id of ids) {
644
+ buffer += deleteKittyImage(id);
645
+ }
646
+ return buffer;
647
+ }
648
+ expandLastChangedForKittyImages(firstChanged, lastChanged) {
649
+ let expandedLastChanged = lastChanged;
650
+ for (let i = firstChanged; i < this.previousLines.length; i++) {
651
+ if (extractKittyImageIds(this.previousLines[i]).length > 0) {
652
+ expandedLastChanged = Math.max(expandedLastChanged, i);
653
+ }
654
+ }
655
+ return expandedLastChanged;
656
+ }
657
+ deleteChangedKittyImages(firstChanged, lastChanged) {
658
+ if (firstChanged < 0 || lastChanged < firstChanged)
659
+ return "";
660
+ const ids = new Set();
661
+ const maxLine = Math.min(lastChanged, this.previousLines.length - 1);
662
+ for (let i = firstChanged; i <= maxLine; i++) {
663
+ for (const id of extractKittyImageIds(this.previousLines[i] ?? "")) {
664
+ ids.add(id);
665
+ }
666
+ }
667
+ return this.deleteKittyImages(ids);
668
+ }
610
669
  /** Splice overlay content into a base line at a specific column. Single-pass optimized. */
611
670
  compositeLineAt(baseLine, overlayLine, startCol, overlayWidth, totalWidth) {
612
671
  if (isImageLine(baseLine))
@@ -700,8 +759,10 @@ export class TUI extends Container {
700
759
  const fullRender = (clear) => {
701
760
  this.fullRedrawCount += 1;
702
761
  let buffer = "\x1b[?2026h"; // Begin synchronized output
703
- if (clear)
762
+ if (clear) {
763
+ buffer += this.deleteKittyImages(this.previousKittyImageIds);
704
764
  buffer += "\x1b[2J\x1b[H\x1b[3J"; // Clear screen, home, then clear scrollback
765
+ }
705
766
  for (let i = 0; i < newLines.length; i++) {
706
767
  if (i > 0)
707
768
  buffer += "\r\n";
@@ -722,6 +783,7 @@ export class TUI extends Container {
722
783
  this.previousViewportTop = Math.max(0, bufferLength - height);
723
784
  this.positionHardwareCursor(cursorPos, newLines.length);
724
785
  this.previousLines = newLines;
786
+ this.previousKittyImageIds = this.collectKittyImageIds(newLines);
725
787
  this.previousWidth = width;
726
788
  this.previousHeight = height;
727
789
  };
@@ -729,7 +791,7 @@ export class TUI extends Container {
729
791
  const logRedraw = (reason) => {
730
792
  if (!debugRedraw)
731
793
  return;
732
- const logPath = path.join(os.homedir(), ".sling", "agent", "sling-debug.log");
794
+ const logPath = path.join(os.homedir(), ".pi", "agent", "pi-debug.log");
733
795
  const msg = `[${new Date().toISOString()}] fullRender: ${reason} (prev=${this.previousLines.length}, new=${newLines.length}, height=${height})\n`;
734
796
  fs.appendFileSync(logPath, msg);
735
797
  };
@@ -782,6 +844,9 @@ export class TUI extends Container {
782
844
  }
783
845
  lastChanged = newLines.length - 1;
784
846
  }
847
+ if (firstChanged !== -1) {
848
+ lastChanged = this.expandLastChangedForKittyImages(firstChanged, lastChanged);
849
+ }
785
850
  const appendStart = appendedLines && firstChanged === this.previousLines.length && firstChanged > 0;
786
851
  // No changes - but still need to update hardware cursor position if it moved
787
852
  if (firstChanged === -1) {
@@ -794,6 +859,7 @@ export class TUI extends Container {
794
859
  if (firstChanged >= newLines.length) {
795
860
  if (this.previousLines.length > newLines.length) {
796
861
  let buffer = "\x1b[?2026h";
862
+ buffer += this.deleteChangedKittyImages(firstChanged, lastChanged);
797
863
  // Move to end of new content (clamp to 0 for empty content)
798
864
  const targetRow = Math.max(0, newLines.length - 1);
799
865
  if (targetRow < prevViewportTop) {
@@ -832,6 +898,7 @@ export class TUI extends Container {
832
898
  }
833
899
  this.positionHardwareCursor(cursorPos, newLines.length);
834
900
  this.previousLines = newLines;
901
+ this.previousKittyImageIds = this.collectKittyImageIds(newLines);
835
902
  this.previousWidth = width;
836
903
  this.previousHeight = height;
837
904
  this.previousViewportTop = prevViewportTop;
@@ -847,6 +914,7 @@ export class TUI extends Container {
847
914
  // Render from first changed line to end
848
915
  // Build buffer with all updates wrapped in synchronized output
849
916
  let buffer = "\x1b[?2026h"; // Begin synchronized output
917
+ buffer += this.deleteChangedKittyImages(firstChanged, lastChanged);
850
918
  const prevViewportBottom = prevViewportTop + height - 1;
851
919
  const moveTargetRow = appendStart ? firstChanged - 1 : firstChanged;
852
920
  if (moveTargetRow > prevViewportBottom) {
@@ -881,7 +949,7 @@ export class TUI extends Container {
881
949
  const isImage = isImageLine(line);
882
950
  if (!isImage && visibleWidth(line) > width) {
883
951
  // Log all lines to crash file for debugging
884
- const crashLogPath = path.join(os.homedir(), ".sling", "agent", "sling-crash.log");
952
+ const crashLogPath = path.join(os.homedir(), ".pi", "agent", "pi-crash.log");
885
953
  const crashData = [
886
954
  `Crash at ${new Date().toISOString()}`,
887
955
  `Terminal width: ${width}`,
@@ -966,6 +1034,7 @@ export class TUI extends Container {
966
1034
  // Position hardware cursor for IME
967
1035
  this.positionHardwareCursor(cursorPos, newLines.length);
968
1036
  this.previousLines = newLines;
1037
+ this.previousKittyImageIds = this.collectKittyImageIds(newLines);
969
1038
  this.previousWidth = width;
970
1039
  this.previousHeight = height;
971
1040
  }
@@ -273,6 +273,29 @@ export function extractAnsiCode(str, pos) {
273
273
  }
274
274
  return null;
275
275
  }
276
+ function parseOsc8Hyperlink(ansiCode) {
277
+ if (!ansiCode.startsWith("\x1b]8;")) {
278
+ return undefined;
279
+ }
280
+ const terminator = ansiCode.endsWith("\x07") ? "\x07" : "\x1b\\";
281
+ const body = ansiCode.slice(4, terminator === "\x07" ? -1 : -2);
282
+ const separatorIndex = body.indexOf(";");
283
+ if (separatorIndex === -1) {
284
+ return undefined;
285
+ }
286
+ const params = body.slice(0, separatorIndex);
287
+ const url = body.slice(separatorIndex + 1);
288
+ if (!url) {
289
+ return null;
290
+ }
291
+ return { params, url, terminator };
292
+ }
293
+ function formatOsc8Hyperlink(hyperlink) {
294
+ return `\x1b]8;${hyperlink.params};${hyperlink.url}${hyperlink.terminator}`;
295
+ }
296
+ function formatOsc8Close(terminator) {
297
+ return `\x1b]8;;${terminator}`;
298
+ }
276
299
  /**
277
300
  * Track active ANSI SGR codes to preserve styling across line breaks.
278
301
  */
@@ -288,12 +311,15 @@ class AnsiCodeTracker {
288
311
  strikethrough = false;
289
312
  fgColor = null; // Stores the full code like "31" or "38;5;240"
290
313
  bgColor = null; // Stores the full code like "41" or "48;5;240"
291
- activeHyperlink = null; // Active OSC 8 hyperlink URL, or null
314
+ activeHyperlink = null;
292
315
  process(ansiCode) {
293
- // OSC 8 hyperlink: \x1b]8;;<url>\x1b\\ (open) or \x1b]8;;\x1b\\ (close)
294
- if (ansiCode.startsWith("\x1b]8;")) {
295
- const m = ansiCode.match(/^\x1b\]8;[^;]*;([^\x1b\x07]*)/);
296
- this.activeHyperlink = m?.[1] ? m[1] : null;
316
+ // OSC 8 hyperlink: \x1b]8;;<url>\x1b\\ (open) or \x1b]8;;\x1b\\ (close).
317
+ // Preserve the original terminator because some terminals only make BEL-terminated
318
+ // links clickable. OAuth login URLs use BEL, so reopening wrapped lines with ST
319
+ // made only the first physical line clickable in those terminals.
320
+ const hyperlink = parseOsc8Hyperlink(ansiCode);
321
+ if (hyperlink !== undefined) {
322
+ this.activeHyperlink = hyperlink;
297
323
  return;
298
324
  }
299
325
  if (!ansiCode.endsWith("m")) {
@@ -459,7 +485,7 @@ class AnsiCodeTracker {
459
485
  codes.push(this.bgColor);
460
486
  let result = codes.length > 0 ? `\x1b[${codes.join(";")}m` : "";
461
487
  if (this.activeHyperlink) {
462
- result += `\x1b]8;;${this.activeHyperlink}\x1b\\`;
488
+ result += formatOsc8Hyperlink(this.activeHyperlink);
463
489
  }
464
490
  return result;
465
491
  }
@@ -488,7 +514,7 @@ class AnsiCodeTracker {
488
514
  result += "\x1b[24m"; // Underline off only
489
515
  }
490
516
  if (this.activeHyperlink) {
491
- result += "\x1b]8;;\x1b\\"; // Close hyperlink; re-opened at line start via getActiveCodes()
517
+ result += formatOsc8Close(this.activeHyperlink.terminator); // Re-opened at line start via getActiveCodes()
492
518
  }
493
519
  return result;
494
520
  }
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "@mariozechner/pi-tui",
3
- "version": "0.73.0",
2
+ "name": "@earendil-works/pi-tui",
3
+ "version": "0.74.0",
4
4
  "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "license": "MIT",
29
29
  "repository": {
30
30
  "type": "git",
31
- "url": "git+https://github.com/badlogic/pi-mono.git",
31
+ "url": "git+https://github.com/earendil-works/pi-mono.git",
32
32
  "directory": "packages/tui"
33
33
  },
34
34
  "engines": {
@@ -0,0 +1,58 @@
1
+ # @mariozechner/clipboard
2
+
3
+ > **Fork of [@crosscopy/clipboard](https://github.com/CrossCopy/clipboard)**
4
+ >
5
+ > This fork updates to the latest `clipboard-rs` (0.3.1) and adds musl (Alpine Linux) support.
6
+ > All credit goes to the original authors.
7
+
8
+ ![NPM Version](https://img.shields.io/npm/v/@mariozechner/clipboard)
9
+ [![CI](https://github.com/badlogic/clipboard/actions/workflows/CI.yml/badge.svg)](https://github.com/badlogic/clipboard/actions/workflows/CI.yml)
10
+
11
+ **NPM Package**: https://www.npmjs.com/package/@mariozechner/clipboard
12
+
13
+ **GitHub**: https://github.com/badlogic/clipboard
14
+
15
+ > This is a clipboard API npm package that allows you to copy and paste data to and from the clipboard.
16
+ > There doesn't seem to be a good clipboard package for node.js (that supports data format beyond text), so I decided to make one.
17
+ > Data Format Supported
18
+ >
19
+ > - Text
20
+ > - Image
21
+ > - Rich Text Format
22
+ > - Files
23
+ > - HTML
24
+
25
+ ## Acknowledgements
26
+
27
+ - [ChurchTao/clipboard-rs](https://github.com/ChurchTao/clipboard-rs) is written in rust, which is used to provide the native clipboard support for this package across Linux, Windows and MacOS. This package is basically a wrapper around this rust package.
28
+ - https://crates.io/crates/clipboard-rs
29
+ - [napi.rs](https://napi.rs/) was used to create the node.js addon for this package, so that API calls written in rust can be called from node.js.
30
+
31
+ ## API
32
+
33
+ Detailed API function declarations can be found in the [index.d.ts](./index.d.ts).
34
+
35
+ Or you can refer to the source code in [src/lib.rs](./src/lib.rs).
36
+
37
+ ## Sample
38
+
39
+ ```javascript
40
+ import Clipboard from "@mariozechner/clipboard";
41
+
42
+ console.log(await Clipboard.getText());
43
+
44
+ console.log(await Clipboard.getHtml());
45
+
46
+ if (await Clipboard.hasImage()) {
47
+ console.log(await Clipboard.getImageBase64());
48
+ } else {
49
+ console.log("No Image");
50
+ }
51
+ ```
52
+
53
+ ## Publish
54
+
55
+ Everything is done with GitHub Action.
56
+
57
+ Run `npm version patch` to bump the version.
58
+ Then `git push --follow-tags` to push the changes and tags to GitHub. GitHub Action will automatically build and publish.
@@ -0,0 +1,23 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ /* auto-generated by NAPI-RS */
5
+
6
+ export function availableFormats(): Array<string>
7
+ export function getText(): Promise<string>
8
+ export function setText(text: string): Promise<void>
9
+ export function hasText(): boolean
10
+ export function getImageBinary(): Promise<Array<number>>
11
+ export function getImageBase64(): Promise<string>
12
+ export function setImageBinary(imageBytes: Array<number>): Promise<void>
13
+ export function setImageBase64(base64Str: string): Promise<void>
14
+ export function hasImage(): boolean
15
+ export function getHtml(): Promise<string>
16
+ export function setHtml(html: string): Promise<void>
17
+ export function hasHtml(): boolean
18
+ export function getRtf(): Promise<string>
19
+ export function setRtf(rtf: string): Promise<void>
20
+ export function hasRtf(): boolean
21
+ export function clear(): Promise<void>
22
+ export function watch(): void
23
+ export function callThreadsafeFunction(callback: (...args: any[]) => any): void
@@ -0,0 +1,3 @@
1
+ # `@mariozechner/clipboard-linux-x64-gnu`
2
+
3
+ This is the **x86_64-unknown-linux-gnu** binary for `@mariozechner/clipboard`