@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
package/LICENSE CHANGED
@@ -25,4 +25,4 @@ SOFTWARE.
25
25
  Publicis Sapient. Licensing for these portions is to be determined.
26
26
  Until then, no license is granted to use, copy, modify, or redistribute
27
27
  the @psnext-authored portions beyond what npm's distribution model implies.
28
- The bundled @mariozechner/pi-* code remains under the MIT license above.
28
+ The bundled @earendil-works/pi-* code remains under the MIT license above.
package/README.md CHANGED
@@ -103,4 +103,4 @@ rm -rf ~/.sling
103
103
 
104
104
  Licensing for `@psnext/slingcli` is to be determined.
105
105
 
106
- This package bundles `@mariozechner/pi-*` (MIT, © 2025 Mario Zechner). The upstream MIT license is preserved in the `LICENSE` file.
106
+ This package bundles `@earendil-works/pi-*` (MIT, © 2025 Mario Zechner). The upstream MIT license is preserved in the `LICENSE` file.
package/bin/sling.js CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- process.title = "sling";
2
+ process.title = "⭕️ sling";
3
3
 
4
- const SLING_VERSION = "2.4.20260507-3";
4
+ const SLING_VERSION = "2.4.20260509-1";
5
5
 
6
- import { setBedrockProviderModule } from "@mariozechner/pi-ai";
7
- import { bedrockProviderModule } from "@mariozechner/pi-ai/bedrock-provider";
6
+ import { setBedrockProviderModule } from "@earendil-works/pi-ai";
7
+ import { bedrockProviderModule } from "@earendil-works/pi-ai/bedrock-provider";
8
8
  import { EnvHttpProxyAgent, setGlobalDispatcher } from "undici";
9
- import { main } from "@mariozechner/pi-coding-agent";
9
+ import { main } from "@earendil-works/pi-coding-agent";
10
10
  import path from "node:path";
11
11
  import { fileURLToPath } from "node:url";
12
12
  import { existsSync, readFileSync, writeFileSync } from "node:fs";
@@ -70,9 +70,9 @@ async function checkAndInstallPackages() {
70
70
  const packages = config.packages || [];
71
71
  if (packages.length === 0) return;
72
72
 
73
- console.log("\nFirst run detected. Installing default packages...");
73
+ console.log("\\nFirst run detected. Installing default packages...");
74
74
  for (const pkg of packages) {
75
- console.log(`Installing ${pkg}...`);
75
+ console.log(`Installing \${pkg}...`);
76
76
  try {
77
77
  await runCommand(process.execPath, [__filename, "install", pkg]);
78
78
  console.log(`✓ Installed ${pkg}`);
@@ -82,7 +82,7 @@ async function checkAndInstallPackages() {
82
82
  }
83
83
  }
84
84
  writeFileSync(markerFile, new Date().toISOString());
85
- console.log("\nDefault packages installation complete!\n");
85
+ console.log("\\nDefault packages installation complete!\\n");
86
86
  } catch (err) {
87
87
  console.error("Failed to read default packages config:", err.message);
88
88
  }
@@ -132,18 +132,18 @@ async function checkForUpdate(args) {
132
132
  console.log("Installing @psnext/slingcli@" + latestVersion + "...");
133
133
  try {
134
134
  await runCommand("npm", ["install", "-g", "@psnext/slingcli@latest"]);
135
- console.log("\u2713 Updated to " + latestVersion + ". Please run 'sling' again.");
135
+ console.log("\\u2713 Updated to " + latestVersion + ". Please run 'sling' again.");
136
136
  process.exit(0);
137
137
  } catch {
138
- console.error("\u2717 Auto-update failed. Run manually:");
138
+ console.error("\\u2717 Auto-update failed. Run manually:");
139
139
  console.error(" npm install -g @psnext/slingcli@latest");
140
140
  console.error(" (you may need sudo)");
141
141
  }
142
142
  }
143
143
 
144
- // defaults to global (~/.sling/agent). When run from a
144
+ // \`sling install <pkg>\` defaults to global (~/.sling/agent). When run from a
145
145
  // TTY without an explicit scope flag, prompt for global vs local. Pi has no
146
- // flag because global is its default; we only inject when
146
+ // \`-g/--global\` flag because global is its default; we only inject \`-l\` when
147
147
  // the user picks local. Non-TTY (CI/scripts) keeps the current default.
148
148
  async function promptInstallScopeIfNeeded(args) {
149
149
  let isInstall = false;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-bedrock-runtime",
3
3
  "description": "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
4
- "version": "3.1044.0",
4
+ "version": "3.1045.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
@@ -39,7 +39,7 @@
39
39
  "@aws-sdk/middleware-user-agent": "^3.972.38",
40
40
  "@aws-sdk/middleware-websocket": "^3.972.16",
41
41
  "@aws-sdk/region-config-resolver": "^3.972.13",
42
- "@aws-sdk/token-providers": "3.1044.0",
42
+ "@aws-sdk/token-providers": "3.1045.0",
43
43
  "@aws-sdk/types": "^3.973.8",
44
44
  "@aws-sdk/util-endpoints": "^3.996.8",
45
45
  "@aws-sdk/util-user-agent-browser": "^3.972.10",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/token-providers",
3
- "version": "3.1044.0",
3
+ "version": "3.1045.0",
4
4
  "description": "A collection of token providers",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -2,7 +2,7 @@
2
2
  * Agent loop that works with AgentMessage throughout.
3
3
  * Transforms to Message[] only at the LLM call boundary.
4
4
  */
5
- import { EventStream, streamSimple, validateToolArguments, } from "@mariozechner/pi-ai";
5
+ import { EventStream, streamSimple, validateToolArguments, } from "@earendil-works/pi-ai";
6
6
  /**
7
7
  * Start an agent loop with a new prompt message.
8
8
  * The prompt is added to the context and events are emitted for it.
@@ -1,4 +1,4 @@
1
- import { streamSimple, } from "@mariozechner/pi-ai";
1
+ import { streamSimple, } from "@earendil-works/pi-ai";
2
2
  import { runAgentLoop, runAgentLoopContinue } from "./agent-loop.js";
3
3
  function defaultConvertToLlm(messages) {
4
4
  return messages.filter((message) => message.role === "user" || message.role === "assistant" || message.role === "toolResult");
@@ -335,8 +335,9 @@ export class Agent {
335
335
  errorMessage: error instanceof Error ? error.message : String(error),
336
336
  timestamp: Date.now(),
337
337
  };
338
- this._state.messages.push(failureMessage);
339
- this._state.errorMessage = failureMessage.errorMessage;
338
+ await this.processEvents({ type: "message_start", message: failureMessage });
339
+ await this.processEvents({ type: "message_end", message: failureMessage });
340
+ await this.processEvents({ type: "turn_end", message: failureMessage, toolResults: [] });
340
341
  await this.processEvents({ type: "agent_end", messages: [failureMessage] });
341
342
  }
342
343
  finishRun() {
@@ -0,0 +1,526 @@
1
+ import { randomUUID } from "node:crypto";
2
+ import { Agent } from "../agent.js";
3
+ import { collectEntriesForBranchSummary, generateBranchSummary } from "./compaction/branch-summarization.js";
4
+ import { compact, DEFAULT_COMPACTION_SETTINGS, prepareCompaction } from "./compaction/compaction.js";
5
+ import { expandPromptTemplate } from "./prompt-templates.js";
6
+ import { expandSkillCommand } from "./skills.js";
7
+ function createUserMessage(text, images) {
8
+ const content = [{ type: "text", text }];
9
+ if (images)
10
+ content.push(...images);
11
+ return { role: "user", content, timestamp: Date.now() };
12
+ }
13
+ export class AgentHarness {
14
+ agent;
15
+ env;
16
+ conversation;
17
+ operation;
18
+ session;
19
+ resourcesInput;
20
+ systemPrompt;
21
+ requestAuth;
22
+ toolRegistry = new Map();
23
+ listeners = new Set();
24
+ hooks = new Map();
25
+ constructor(options) {
26
+ this.agent = new Agent({
27
+ initialState: {
28
+ model: options.model,
29
+ thinkingLevel: options.thinkingLevel,
30
+ tools: options.tools ?? [],
31
+ },
32
+ });
33
+ this.env = options.env;
34
+ this.session = options.session;
35
+ this.resourcesInput = options.resources;
36
+ this.systemPrompt = options.systemPrompt;
37
+ this.requestAuth = options.requestAuth;
38
+ for (const tool of this.agent.state.tools) {
39
+ this.toolRegistry.set(tool.name, tool);
40
+ }
41
+ this.conversation = {
42
+ session: options.session,
43
+ model: options.model,
44
+ thinkingLevel: options.thinkingLevel ?? this.agent.state.thinkingLevel,
45
+ activeToolNames: options.activeToolNames ?? this.agent.state.tools.map((tool) => tool.name),
46
+ nextTurnQueue: [],
47
+ };
48
+ this.agent.state.model = this.conversation.model;
49
+ this.agent.state.thinkingLevel = this.conversation.thinkingLevel;
50
+ this.agent.getApiKey = async (provider) => {
51
+ const model = this.conversation.model;
52
+ if (!this.requestAuth || model.provider !== provider)
53
+ return undefined;
54
+ return (await this.requestAuth(model))?.apiKey;
55
+ };
56
+ this.operation = {
57
+ idle: true,
58
+ abortRequested: false,
59
+ steerQueue: [],
60
+ followUpQueue: [],
61
+ pendingMutations: {
62
+ appendMessages: [],
63
+ },
64
+ };
65
+ this.agent.transformContext = async (messages, signal) => {
66
+ const result = await this.emitHook("context", { type: "context", messages: [...messages] }, signal);
67
+ return result?.messages ?? messages;
68
+ };
69
+ this.agent.beforeToolCall = async ({ toolCall, args }, signal) => {
70
+ const result = await this.emitHook("tool_call", {
71
+ type: "tool_call",
72
+ toolCallId: toolCall.id,
73
+ toolName: toolCall.name,
74
+ input: args,
75
+ }, signal);
76
+ return result ? { block: result.block, reason: result.reason } : undefined;
77
+ };
78
+ this.agent.afterToolCall = async ({ toolCall, args, result, isError }, signal) => {
79
+ const patch = await this.emitHook("tool_result", {
80
+ type: "tool_result",
81
+ toolCallId: toolCall.id,
82
+ toolName: toolCall.name,
83
+ input: args,
84
+ content: result.content,
85
+ details: result.details,
86
+ isError,
87
+ }, signal);
88
+ return patch
89
+ ? { content: patch.content, details: patch.details, isError: patch.isError, terminate: patch.terminate }
90
+ : undefined;
91
+ };
92
+ this.agent.onPayload = async (payload) => {
93
+ const result = await this.emitHook("before_provider_request", { type: "before_provider_request", payload });
94
+ return result?.payload ?? payload;
95
+ };
96
+ this.agent.onResponse = async (response) => {
97
+ const headers = { ...response.headers };
98
+ await this.emitOwn({ type: "after_provider_response", status: response.status, headers }, this.agent.signal);
99
+ };
100
+ this.agent.subscribe(async (event, signal) => {
101
+ await this.handleAgentEvent(event, signal);
102
+ });
103
+ void this.syncFromTree();
104
+ }
105
+ createContext(signal) {
106
+ return {
107
+ env: this.env,
108
+ conversation: this.conversation,
109
+ operation: this.operation,
110
+ abortSignal: signal,
111
+ };
112
+ }
113
+ async resolveResources(signal) {
114
+ return typeof this.resourcesInput === "function"
115
+ ? await this.resourcesInput(this.createContext(signal))
116
+ : (this.resourcesInput ?? {});
117
+ }
118
+ getActiveTools() {
119
+ return this.conversation.activeToolNames
120
+ .map((name) => this.toolRegistry.get(name))
121
+ .filter((tool) => tool !== undefined);
122
+ }
123
+ async resolveSystemPrompt(resources) {
124
+ if (!this.systemPrompt)
125
+ return "You are a helpful assistant.";
126
+ if (typeof this.systemPrompt === "string")
127
+ return this.systemPrompt;
128
+ return await this.systemPrompt({
129
+ env: this.env,
130
+ session: this.session,
131
+ model: this.conversation.model,
132
+ thinkingLevel: this.conversation.thinkingLevel,
133
+ activeTools: this.getActiveTools(),
134
+ resources,
135
+ });
136
+ }
137
+ async emitOwn(event, signal) {
138
+ for (const listener of this.listeners) {
139
+ await listener(event, signal);
140
+ }
141
+ }
142
+ async emitAny(event, signal) {
143
+ for (const listener of this.listeners) {
144
+ await listener(event, signal);
145
+ }
146
+ }
147
+ async emitHook(type, event, signal) {
148
+ const handlers = this.hooks.get(type);
149
+ if (!handlers || handlers.size === 0)
150
+ return undefined;
151
+ let lastResult;
152
+ for (const handler of handlers) {
153
+ const result = await handler(event, this.createContext(signal));
154
+ if (result !== undefined) {
155
+ lastResult = result;
156
+ }
157
+ }
158
+ return lastResult;
159
+ }
160
+ async emitQueueUpdate() {
161
+ await this.emitOwn({
162
+ type: "queue_update",
163
+ steer: [...this.operation.steerQueue],
164
+ followUp: [...this.operation.followUpQueue],
165
+ nextTurn: [...this.conversation.nextTurnQueue],
166
+ });
167
+ }
168
+ async syncFromTree() {
169
+ const context = await this.session.buildContext();
170
+ this.agent.state.messages = context.messages;
171
+ if (context.model && this.conversation.model) {
172
+ // leave active model untouched; harness-level model is source of truth
173
+ }
174
+ this.agent.state.systemPrompt = await this.resolveSystemPrompt(await this.resolveResources());
175
+ }
176
+ async applyPendingMutations() {
177
+ for (const message of this.operation.pendingMutations.appendMessages) {
178
+ await this.session.appendMessage(message);
179
+ }
180
+ this.operation.pendingMutations.appendMessages = [];
181
+ if (this.operation.pendingMutations.model) {
182
+ const model = this.operation.pendingMutations.model;
183
+ const previousModel = this.conversation.model;
184
+ this.conversation.model = model;
185
+ this.agent.state.model = model;
186
+ await this.session.appendModelChange(model.provider, model.id);
187
+ await this.emitOwn({ type: "model_select", model, previousModel, source: "set" });
188
+ this.operation.pendingMutations.model = undefined;
189
+ }
190
+ if (this.operation.pendingMutations.thinkingLevel !== undefined) {
191
+ const level = this.operation.pendingMutations.thinkingLevel;
192
+ const previousLevel = this.conversation.thinkingLevel;
193
+ this.conversation.thinkingLevel = level;
194
+ this.agent.state.thinkingLevel = level;
195
+ await this.session.appendThinkingLevelChange(level);
196
+ await this.emitOwn({ type: "thinking_level_select", level, previousLevel });
197
+ this.operation.pendingMutations.thinkingLevel = undefined;
198
+ }
199
+ if (this.operation.pendingMutations.activeToolNames) {
200
+ this.conversation.activeToolNames = [...this.operation.pendingMutations.activeToolNames];
201
+ this.agent.state.tools = this.conversation.activeToolNames
202
+ .map((name) => this.toolRegistry.get(name))
203
+ .filter((tool) => tool !== undefined);
204
+ this.operation.pendingMutations.activeToolNames = undefined;
205
+ }
206
+ await this.syncFromTree();
207
+ }
208
+ async handleAgentEvent(event, signal) {
209
+ await this.emitAny(event, signal);
210
+ if (event.type === "message_start") {
211
+ const steerIndex = this.operation.steerQueue.indexOf(event.message);
212
+ if (steerIndex !== -1) {
213
+ this.operation.steerQueue.splice(steerIndex, 1);
214
+ await this.emitQueueUpdate();
215
+ }
216
+ else {
217
+ const followUpIndex = this.operation.followUpQueue.indexOf(event.message);
218
+ if (followUpIndex !== -1) {
219
+ this.operation.followUpQueue.splice(followUpIndex, 1);
220
+ await this.emitQueueUpdate();
221
+ }
222
+ }
223
+ }
224
+ if (event.type === "message_end") {
225
+ await this.session.appendMessage(event.message);
226
+ }
227
+ if (event.type === "turn_end") {
228
+ const hadPendingMutations = this.operation.pendingMutations.appendMessages.length > 0 ||
229
+ this.operation.pendingMutations.model !== undefined ||
230
+ this.operation.pendingMutations.thinkingLevel !== undefined ||
231
+ this.operation.pendingMutations.activeToolNames !== undefined;
232
+ await this.emitOwn({ type: "save_point", liveOperationId: this.operation.liveOperationId ?? "unknown", hadPendingMutations }, signal);
233
+ if (hadPendingMutations) {
234
+ await this.applyPendingMutations();
235
+ }
236
+ }
237
+ if (event.type === "agent_end") {
238
+ this.operation.idle = true;
239
+ this.operation.liveOperationId = undefined;
240
+ this.operation.abortRequested = false;
241
+ await this.syncFromTree();
242
+ await this.emitOwn({ type: "settled", nextTurnCount: this.conversation.nextTurnQueue.length }, signal);
243
+ }
244
+ }
245
+ async prompt(text, options) {
246
+ if (!this.operation.idle)
247
+ throw new Error("AgentHarness is busy");
248
+ const beforeLength = this.agent.state.messages.length;
249
+ this.operation.idle = false;
250
+ this.operation.liveOperationId = randomUUID();
251
+ const resources = await this.resolveResources(this.agent.signal);
252
+ let messages = [createUserMessage(text, options?.images)];
253
+ if (this.conversation.nextTurnQueue.length > 0) {
254
+ messages = [messages[0], ...this.conversation.nextTurnQueue];
255
+ this.conversation.nextTurnQueue = [];
256
+ await this.emitQueueUpdate();
257
+ }
258
+ this.agent.state.systemPrompt = await this.resolveSystemPrompt(resources);
259
+ const beforeResult = await this.emitHook("before_agent_start", {
260
+ type: "before_agent_start",
261
+ prompt: text,
262
+ images: options?.images,
263
+ systemPrompt: this.agent.state.systemPrompt,
264
+ resources,
265
+ }, this.agent.signal);
266
+ if (beforeResult?.messages)
267
+ messages = [...beforeResult.messages, ...messages];
268
+ if (beforeResult?.systemPrompt)
269
+ this.agent.state.systemPrompt = beforeResult.systemPrompt;
270
+ await this.agent.prompt(messages);
271
+ let response;
272
+ const newMessages = this.agent.state.messages.slice(beforeLength);
273
+ for (let i = newMessages.length - 1; i >= 0; i--) {
274
+ const message = newMessages[i];
275
+ if (message.role === "assistant") {
276
+ response = message;
277
+ break;
278
+ }
279
+ }
280
+ if (!response)
281
+ throw new Error("AgentHarness prompt completed without an assistant message");
282
+ return response;
283
+ }
284
+ async skill(name, additionalInstructions) {
285
+ const resources = await this.resolveResources();
286
+ const skill = (resources.skills ?? []).find((candidate) => candidate.name === name);
287
+ if (!skill)
288
+ throw new Error(`Unknown skill: ${name}`);
289
+ return await this.prompt(expandSkillCommand(skill, additionalInstructions));
290
+ }
291
+ async promptFromTemplate(name, args = []) {
292
+ const resources = await this.resolveResources();
293
+ const template = (resources.promptTemplates ?? []).find((candidate) => candidate.name === name);
294
+ if (!template)
295
+ throw new Error(`Unknown prompt template: ${name}`);
296
+ return await this.prompt(expandPromptTemplate(template, args));
297
+ }
298
+ steer(message) {
299
+ if (this.operation.idle)
300
+ throw new Error("Cannot steer while idle");
301
+ this.operation.steerQueue.push(message);
302
+ this.agent.steer(message);
303
+ void this.emitQueueUpdate();
304
+ }
305
+ followUp(message) {
306
+ if (this.operation.idle)
307
+ throw new Error("Cannot follow up while idle");
308
+ this.operation.followUpQueue.push(message);
309
+ this.agent.followUp(message);
310
+ void this.emitQueueUpdate();
311
+ }
312
+ nextTurn(message) {
313
+ this.conversation.nextTurnQueue.push(message);
314
+ void this.emitQueueUpdate();
315
+ }
316
+ async appendMessage(message) {
317
+ if (this.operation.idle) {
318
+ await this.session.appendMessage(message);
319
+ await this.syncFromTree();
320
+ }
321
+ else {
322
+ this.operation.pendingMutations.appendMessages.push(message);
323
+ }
324
+ }
325
+ async shell(command, options) {
326
+ return await this.env.exec(command, options);
327
+ }
328
+ async compact(customInstructions) {
329
+ if (!this.operation.idle)
330
+ throw new Error("compact() requires idle harness");
331
+ const model = this.conversation.model;
332
+ if (!model)
333
+ throw new Error("No model set for compaction");
334
+ const auth = await this.requestAuth?.(model);
335
+ if (!auth)
336
+ throw new Error("No auth available for compaction");
337
+ const branchEntries = await this.session.getBranch();
338
+ const preparation = prepareCompaction(branchEntries, DEFAULT_COMPACTION_SETTINGS);
339
+ if (!preparation)
340
+ throw new Error("Nothing to compact");
341
+ const hookResult = await this.emitHook("session_before_compact", {
342
+ type: "session_before_compact",
343
+ preparation,
344
+ branchEntries,
345
+ customInstructions,
346
+ signal: new AbortController().signal,
347
+ });
348
+ if (hookResult?.cancel)
349
+ throw new Error("Compaction cancelled");
350
+ const provided = hookResult?.compaction;
351
+ const result = provided ??
352
+ (await compact(preparation, model, auth.apiKey, auth.headers, customInstructions, undefined, this.conversation.thinkingLevel));
353
+ const entryId = await this.session.appendCompaction(result.summary, result.firstKeptEntryId, result.tokensBefore, result.details, provided !== undefined);
354
+ const entry = await this.session.getEntry(entryId);
355
+ await this.syncFromTree();
356
+ if (entry?.type === "compaction") {
357
+ await this.emitOwn({ type: "session_compact", compactionEntry: entry, fromHook: provided !== undefined });
358
+ }
359
+ return result;
360
+ }
361
+ async navigateTree(targetId, options) {
362
+ if (!this.operation.idle)
363
+ throw new Error("navigateTree() requires idle harness");
364
+ const oldLeafId = await this.session.getLeafId();
365
+ if (oldLeafId === targetId)
366
+ return { cancelled: false };
367
+ const targetEntry = await this.session.getEntry(targetId);
368
+ if (!targetEntry)
369
+ throw new Error(`Entry ${targetId} not found`);
370
+ const { entries, commonAncestorId } = await collectEntriesForBranchSummary(this.session, oldLeafId, targetId);
371
+ const preparation = {
372
+ targetId,
373
+ oldLeafId,
374
+ commonAncestorId,
375
+ entriesToSummarize: entries,
376
+ userWantsSummary: options?.summarize ?? false,
377
+ customInstructions: options?.customInstructions,
378
+ replaceInstructions: options?.replaceInstructions,
379
+ label: options?.label,
380
+ };
381
+ const signal = new AbortController().signal;
382
+ const hookResult = await this.emitHook("session_before_tree", {
383
+ type: "session_before_tree",
384
+ preparation,
385
+ signal,
386
+ });
387
+ if (hookResult?.cancel)
388
+ return { cancelled: true };
389
+ let summaryEntry;
390
+ let summaryText = hookResult?.summary?.summary;
391
+ let summaryDetails = hookResult?.summary?.details;
392
+ if (!summaryText && options?.summarize && entries.length > 0) {
393
+ const model = this.conversation.model;
394
+ if (!model)
395
+ throw new Error("No model set for branch summary");
396
+ const auth = await this.requestAuth?.(model);
397
+ if (!auth)
398
+ throw new Error("No auth available for branch summary");
399
+ const branchSummary = await generateBranchSummary(entries, {
400
+ model,
401
+ apiKey: auth.apiKey,
402
+ headers: auth.headers,
403
+ signal: new AbortController().signal,
404
+ customInstructions: hookResult?.customInstructions ?? options?.customInstructions,
405
+ replaceInstructions: hookResult?.replaceInstructions ?? options?.replaceInstructions,
406
+ });
407
+ if (branchSummary.aborted)
408
+ return { cancelled: true };
409
+ if (branchSummary.error)
410
+ throw new Error(branchSummary.error);
411
+ summaryText = branchSummary.summary;
412
+ summaryDetails = {
413
+ readFiles: branchSummary.readFiles ?? [],
414
+ modifiedFiles: branchSummary.modifiedFiles ?? [],
415
+ };
416
+ }
417
+ let editorText;
418
+ let newLeafId;
419
+ if (targetEntry.type === "message" && targetEntry.message.role === "user") {
420
+ newLeafId = targetEntry.parentId;
421
+ const content = targetEntry.message.content;
422
+ editorText =
423
+ typeof content === "string"
424
+ ? content
425
+ : content
426
+ .filter((c) => c.type === "text")
427
+ .map((c) => c.text)
428
+ .join("");
429
+ }
430
+ else if (targetEntry.type === "custom_message") {
431
+ newLeafId = targetEntry.parentId;
432
+ editorText =
433
+ typeof targetEntry.content === "string"
434
+ ? targetEntry.content
435
+ : targetEntry.content
436
+ .filter((c) => c.type === "text")
437
+ .map((c) => c.text)
438
+ .join("");
439
+ }
440
+ else {
441
+ newLeafId = targetId;
442
+ }
443
+ const summaryId = await this.session.moveTo(newLeafId, summaryText
444
+ ? {
445
+ summary: summaryText,
446
+ details: summaryDetails,
447
+ fromHook: hookResult?.summary !== undefined,
448
+ }
449
+ : undefined);
450
+ if (summaryId) {
451
+ summaryEntry = await this.session.getEntry(summaryId);
452
+ }
453
+ await this.syncFromTree();
454
+ await this.emitOwn({
455
+ type: "session_tree",
456
+ newLeafId: await this.session.getLeafId(),
457
+ oldLeafId,
458
+ summaryEntry,
459
+ fromHook: hookResult?.summary !== undefined,
460
+ });
461
+ return { cancelled: false, editorText, summaryEntry };
462
+ }
463
+ async setModel(model) {
464
+ if (this.operation.idle) {
465
+ const previousModel = this.conversation.model;
466
+ this.conversation.model = model;
467
+ this.agent.state.model = model;
468
+ await this.session.appendModelChange(model.provider, model.id);
469
+ await this.emitOwn({ type: "model_select", model, previousModel, source: "set" });
470
+ }
471
+ else {
472
+ this.operation.pendingMutations.model = model;
473
+ }
474
+ }
475
+ async setThinkingLevel(level) {
476
+ if (this.operation.idle) {
477
+ const previousLevel = this.conversation.thinkingLevel;
478
+ this.conversation.thinkingLevel = level;
479
+ this.agent.state.thinkingLevel = level;
480
+ await this.session.appendThinkingLevelChange(level);
481
+ await this.emitOwn({ type: "thinking_level_select", level, previousLevel });
482
+ }
483
+ else {
484
+ this.operation.pendingMutations.thinkingLevel = level;
485
+ }
486
+ }
487
+ async setActiveTools(toolNames) {
488
+ if (this.operation.idle) {
489
+ this.conversation.activeToolNames = [...toolNames];
490
+ this.agent.state.tools = this.getActiveTools();
491
+ }
492
+ else {
493
+ this.operation.pendingMutations.activeToolNames = [...toolNames];
494
+ }
495
+ }
496
+ async abort() {
497
+ this.operation.abortRequested = true;
498
+ const clearedSteer = [...this.operation.steerQueue];
499
+ const clearedFollowUp = [...this.operation.followUpQueue];
500
+ this.operation.steerQueue = [];
501
+ this.operation.followUpQueue = [];
502
+ this.agent.clearAllQueues();
503
+ await this.emitQueueUpdate();
504
+ this.agent.abort();
505
+ await this.agent.waitForIdle();
506
+ await this.emitOwn({ type: "abort", clearedSteer, clearedFollowUp });
507
+ return { clearedSteer, clearedFollowUp };
508
+ }
509
+ async waitForIdle() {
510
+ await this.agent.waitForIdle();
511
+ }
512
+ subscribe(listener) {
513
+ this.listeners.add(listener);
514
+ return () => this.listeners.delete(listener);
515
+ }
516
+ on(type, handler) {
517
+ let handlers = this.hooks.get(type);
518
+ if (!handlers) {
519
+ handlers = new Set();
520
+ this.hooks.set(type, handlers);
521
+ }
522
+ handlers.add(handler);
523
+ return () => handlers.delete(handler);
524
+ }
525
+ }
526
+ //# sourceMappingURL=agent-harness.js.map