shortcutxl 0.3.76 → 0.3.78

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 (480) hide show
  1. package/BINARY-INVENTORY.json +813 -813
  2. package/CHANGELOG.md +14 -0
  3. package/dist/ai/models.d.ts +10 -6
  4. package/dist/ai/models.generated.d.ts +72 -0
  5. package/dist/ai/models.generated.js +33 -0
  6. package/dist/ai/models.js +36 -13
  7. package/dist/ai/providers/anthropic.d.ts +4 -2
  8. package/dist/ai/providers/anthropic.js +59 -29
  9. package/dist/ai/providers/azure-openai-responses.d.ts +2 -1
  10. package/dist/ai/providers/azure-openai-responses.js +4 -20
  11. package/dist/ai/providers/google-vertex.d.ts +8 -2
  12. package/dist/ai/providers/google-vertex.js +66 -54
  13. package/dist/ai/providers/google.js +15 -48
  14. package/dist/ai/providers/openai-completions.d.ts +4 -1
  15. package/dist/ai/providers/openai-completions.js +26 -10
  16. package/dist/ai/providers/openai-reasoning.d.ts +5 -0
  17. package/dist/ai/providers/openai-reasoning.js +13 -0
  18. package/dist/ai/providers/openai-responses-shared.js +1 -1
  19. package/dist/ai/providers/openai-responses.d.ts +6 -2
  20. package/dist/ai/providers/openai-responses.js +28 -23
  21. package/dist/ai/providers/simple-options.d.ts +2 -3
  22. package/dist/ai/providers/simple-options.js +4 -6
  23. package/dist/ai/types.d.ts +19 -2
  24. package/dist/app/agent-session-runtime-adapter.js +7 -6
  25. package/dist/app/agent-session.d.ts +0 -15
  26. package/dist/app/agent-session.js +0 -37
  27. package/dist/app/approvals/approval-errors.d.ts +15 -0
  28. package/dist/app/approvals/approval-errors.js +14 -0
  29. package/dist/app/approvals/runtime-approval-gates.d.ts +1 -2
  30. package/dist/app/approvals/tool-approval.d.ts +1 -0
  31. package/dist/app/approvals/tool-approval.js +11 -23
  32. package/dist/app/approvals/types.d.ts +0 -14
  33. package/dist/app/approvals/types.js +0 -2
  34. package/dist/app/background/tool-summaries.js +0 -2
  35. package/dist/app/extensions/slash-commands.js +1 -3
  36. package/dist/app/local/tools/execute-code/executor.d.ts +1 -1
  37. package/dist/app/local/tools/execute-code/executor.js +20 -10
  38. package/dist/app/local/tools/execute-code/tool.js +21 -2
  39. package/dist/app/modes/action/agent.js +4 -5
  40. package/dist/app/modes/ask/agent.js +4 -6
  41. package/dist/app/modes/index.js +20 -10
  42. package/dist/app/modes/installation/agent.js +4 -5
  43. package/dist/app/modes/manage/agent.js +3 -4
  44. package/dist/app/modes/manage/prompt.js +1 -2
  45. package/dist/app/modes/metadata.d.ts +31 -0
  46. package/dist/app/modes/metadata.js +35 -0
  47. package/dist/app/modes/plan/agent.js +5 -8
  48. package/dist/app/modes/plan/prompt.js +3 -3
  49. package/dist/app/permissions/runtime-approval-flow.d.ts +1 -5
  50. package/dist/app/permissions/runtime-approval-flow.js +0 -28
  51. package/dist/app/permissions/tool-gates.d.ts +2 -3
  52. package/dist/app/permissions/tool-gates.js +3 -81
  53. package/dist/app/prompts/com-api.js +1 -1
  54. package/dist/app/prompts/shared-guidelines.js +7 -3
  55. package/dist/app/providers/google-vertex-gateway.js +4 -51
  56. package/dist/app/providers/model-registry.d.ts +1 -0
  57. package/dist/app/providers/model-registry.js +39 -0
  58. package/dist/app/providers/model-resolver.js +10 -7
  59. package/dist/app/providers/register-shortcut-provider.js +6 -6
  60. package/dist/app/providers/shortcut-api-v2-transport.js +4 -0
  61. package/dist/app/providers/shortcut-llm-proxy-client.d.ts +2 -2
  62. package/dist/app/providers/shortcut-llm-proxy-client.js +1 -0
  63. package/dist/app/resources/package-manager.js +2 -123
  64. package/dist/app/resources/resource-patterns.d.ts +9 -0
  65. package/dist/app/resources/resource-patterns.js +120 -0
  66. package/dist/app/session/forked-agent.d.ts +2 -2
  67. package/dist/app/session/model-manager.js +3 -2
  68. package/dist/app/session/session-lifecycle.js +3 -2
  69. package/dist/app/session/session-models.d.ts +2 -0
  70. package/dist/app/session/session-models.js +14 -6
  71. package/dist/app/settings-manager.d.ts +3 -3
  72. package/dist/app/shared/tools/execute-code/mog.d.ts +3 -1
  73. package/dist/app/shared/tools/execute-code/mog.js +18 -2
  74. package/dist/app/tools/bash.js +3 -3
  75. package/dist/app/tools/execute-code/index.d.ts +1 -0
  76. package/dist/app/tools/execute-code/index.js +3 -1
  77. package/dist/app/tools/find-ignore-files.d.ts +3 -0
  78. package/dist/app/tools/find-ignore-files.js +33 -0
  79. package/dist/app/tools/find.js +2 -21
  80. package/dist/app/tools/llm-analysis.js +0 -2
  81. package/dist/app/tools/refresh-context.d.ts +1 -1
  82. package/dist/app/tools/session-settings/update-session-settings.js +2 -2
  83. package/dist/app/tools/switch-mode.js +2 -2
  84. package/dist/app/tools/take-screenshot.js +0 -2
  85. package/dist/app/tools/task/runner.js +1 -2
  86. package/dist/app/tools/task/task.d.ts +1 -3
  87. package/dist/app/tools/task/task.js +20 -40
  88. package/dist/app/tools/web-search.js +12 -2
  89. package/dist/autocomplete/core.d.ts +33 -0
  90. package/dist/autocomplete/core.js +113 -0
  91. package/dist/{tui → autocomplete}/fuzzy.d.ts +0 -1
  92. package/dist/{tui → autocomplete}/fuzzy.js +0 -1
  93. package/dist/{tui/autocomplete.d.ts → autocomplete/index.d.ts} +0 -1
  94. package/dist/{tui/autocomplete.js → autocomplete/index.js} +62 -158
  95. package/dist/cli/args.js +1 -1
  96. package/dist/cli/list-models.js +1 -1
  97. package/dist/cli.js +26227 -30480
  98. package/dist/constants.d.ts +0 -2
  99. package/dist/constants.js +0 -3
  100. package/dist/contracts/agent-session-store.d.ts +1 -1
  101. package/dist/contracts/agent-settings.d.ts +1 -0
  102. package/dist/contracts/agent-settings.js +2 -1
  103. package/dist/contracts/model-call.d.ts +1 -2
  104. package/dist/contracts/model-call.js +1 -2
  105. package/dist/contracts/model-stream.d.ts +1 -0
  106. package/dist/contracts/model-stream.js +1 -0
  107. package/dist/contracts/wire.d.ts +10 -7
  108. package/dist/contracts/wire.js +8 -0
  109. package/dist/core/agent-engine.js +1 -1
  110. package/dist/core/core-types.d.ts +1 -21
  111. package/dist/core/defaults.d.ts +1 -1
  112. package/dist/core/defaults.js +9 -1
  113. package/dist/core/prompts/agent-guidelines.d.ts +4 -5
  114. package/dist/core/prompts/agent-guidelines.js +28 -42
  115. package/dist/core/session-schema.d.ts +1 -1
  116. package/dist/embedded-agent/ai-invoke.d.ts +1 -2
  117. package/dist/embedded-agent/ai-invoke.js +2 -70
  118. package/dist/embedded-agent/anthropic-messages-transport.d.ts +4 -20
  119. package/dist/embedded-agent/anthropic-messages-transport.js +23 -786
  120. package/dist/embedded-agent/bootstrap.js +2 -2
  121. package/dist/embedded-agent/compose.js +8 -7
  122. package/dist/embedded-agent/gateway-base-url.d.ts +3 -0
  123. package/dist/embedded-agent/gateway-base-url.js +35 -0
  124. package/dist/embedded-agent/google-vertex-transport.d.ts +2 -11
  125. package/dist/embedded-agent/google-vertex-transport.js +20 -117
  126. package/dist/embedded-agent/host-runtime-options.d.ts +0 -8
  127. package/dist/embedded-agent/host-runtime-options.js +10 -2
  128. package/dist/embedded-agent/host-tools/invoke-llm/contract.d.ts +2 -2
  129. package/dist/embedded-agent/host-tools/invoke-llm/contract.js +4 -2
  130. package/dist/embedded-agent/host-tools/sandbox-llm/contract.d.ts +8 -3
  131. package/dist/embedded-agent/host-tools/sandbox-llm/contract.js +12 -8
  132. package/dist/embedded-agent/host-tools/sandbox-llm/index.d.ts +1 -1
  133. package/dist/embedded-agent/host-tools/sandbox-llm/index.js +1 -1
  134. package/dist/embedded-agent/host-tools/shared/index.d.ts +1 -1
  135. package/dist/embedded-agent/host-tools/shared/index.js +1 -1
  136. package/dist/embedded-agent/host-tools/shared/llm-stream-error.d.ts +7 -0
  137. package/dist/embedded-agent/host-tools/shared/llm-stream-error.js +10 -0
  138. package/dist/embedded-agent/host-tools/take-screenshot/contract.d.ts +0 -2
  139. package/dist/embedded-agent/host-tools/take-screenshot/contract.js +1 -3
  140. package/dist/embedded-agent/host-tools/take-screenshot/index.d.ts +1 -1
  141. package/dist/embedded-agent/host-tools/take-screenshot/index.js +1 -1
  142. package/dist/embedded-agent/host-tools/task/agents/clone.js +1 -2
  143. package/dist/embedded-agent/host-tools/task/contract.js +1 -1
  144. package/dist/embedded-agent/index.d.ts +3 -4
  145. package/dist/embedded-agent/index.js +2 -3
  146. package/dist/embedded-agent/model-selection.d.ts +0 -6
  147. package/dist/embedded-agent/model-selection.js +15 -8
  148. package/dist/embedded-agent/openai-completions-transport.d.ts +2 -11
  149. package/dist/embedded-agent/openai-completions-transport.js +20 -120
  150. package/dist/embedded-agent/openai-responses-transport.d.ts +2 -11
  151. package/dist/embedded-agent/openai-responses-transport.js +15 -170
  152. package/dist/embedded-agent/prompt/build.js +1 -2
  153. package/dist/embedded-agent/prompt/sections.d.ts +1 -1
  154. package/dist/embedded-agent/prompt/sections.js +2 -0
  155. package/dist/embedded-agent/provider-native-request.d.ts +29 -0
  156. package/dist/embedded-agent/provider-native-request.js +65 -0
  157. package/dist/embedded-agent/run-stats.d.ts +1 -1
  158. package/dist/embedded-agent/stream.d.ts +10 -96
  159. package/dist/embedded-agent/stream.js +31 -556
  160. package/dist/embedded-agent/suggestions.d.ts +1 -1
  161. package/dist/embedded-agent/suggestions.js +1 -1
  162. package/dist/embedded-agent/worker-bridge/host-client.d.ts +7 -0
  163. package/dist/embedded-agent/worker-bridge/host-client.js +15 -0
  164. package/dist/embedded-agent/worker-bridge/worker-port.js +17 -1
  165. package/dist/main.js +18 -14
  166. package/dist/rpc/index.d.ts +1 -1
  167. package/dist/rpc/rpc-approval-gates.js +1 -2
  168. package/dist/rpc/rpc-host.d.ts +4 -0
  169. package/dist/rpc/rpc-host.js +13 -24
  170. package/dist/rpc/rpc-types.d.ts +6 -17
  171. package/dist/shared/platform/open.d.ts +4 -1
  172. package/dist/shared/platform/open.js +14 -2
  173. package/dist/shell/approvals/runtime-approval-gates.js +1 -3
  174. package/dist/shell/components/selectors/model-selector.js +2 -1
  175. package/dist/shell/components/selectors/session-selector-search.js +1 -1
  176. package/dist/shell/components/selectors/thinking-selector.js +7 -6
  177. package/dist/shell/index.d.ts +0 -1
  178. package/dist/shell/index.js +0 -1
  179. package/dist/shell/interactive/interactive-mode-options.d.ts +10 -0
  180. package/dist/shell/interactive/interactive-mode.d.ts +6 -12
  181. package/dist/shell/interactive/interactive-mode.js +39 -158
  182. package/dist/shell/interactive/slash-commands.d.ts +0 -34
  183. package/dist/shell/interactive/slash-commands.js +0 -2
  184. package/dist/shell/links/local-file-link-input.d.ts +15 -0
  185. package/dist/shell/links/local-file-link-input.js +38 -0
  186. package/dist/shell/links/local-file-link.d.ts +7 -0
  187. package/dist/shell/links/local-file-link.js +35 -0
  188. package/dist/shell/links/local-file-opener.d.ts +16 -0
  189. package/dist/shell/links/local-file-opener.js +90 -0
  190. package/dist/shell/session-client.d.ts +0 -1
  191. package/dist/shell/session-client.js +0 -6
  192. package/dist/shell/status/update-check-scheduler.d.ts +30 -0
  193. package/dist/shell/status/update-check-scheduler.js +71 -0
  194. package/dist/shell/status/update-reminder-controller.d.ts +22 -0
  195. package/dist/shell/status/update-reminder-controller.js +40 -0
  196. package/dist/shell/status/update-reminder.d.ts +6 -0
  197. package/dist/shell/status/update-reminder.js +4 -0
  198. package/dist/shell/theme/dark.json +1 -2
  199. package/dist/shell/theme/light.json +1 -2
  200. package/dist/shell/theme/runtime.d.ts +2 -3
  201. package/dist/shell/theme/runtime.js +2 -6
  202. package/dist/shell/theme/theme-schema.json +1 -6
  203. package/dist/shortcut-model-catalog.d.ts +7 -2
  204. package/dist/shortcut-model-catalog.js +134 -10
  205. package/dist/startup/update-manager.d.ts +6 -6
  206. package/dist/startup/update-manager.js +23 -38
  207. package/dist/startup/update-prompt.d.ts +1 -0
  208. package/dist/startup/update-prompt.js +2 -2
  209. package/dist/tui/components/editor.d.ts +1 -1
  210. package/dist/tui/components/editor.js +1 -1
  211. package/dist/tui/components/markdown.js +15 -6
  212. package/dist/tui/components/settings-list.js +1 -1
  213. package/dist/tui/editor-component.d.ts +1 -1
  214. package/dist/tui/index.d.ts +7 -8
  215. package/dist/tui/index.js +7 -6
  216. package/dist/tui/tui.d.ts +2 -0
  217. package/dist/tui/tui.js +16 -1
  218. package/dist/tui/utils.d.ts +7 -0
  219. package/dist/tui/utils.js +58 -8
  220. package/native-app/main/index.js +3200 -48
  221. package/native-app/main/{photon_rs-SoVDgheu.js → photon_rs-XkYyYTVA.js} +2 -2
  222. package/native-app/package.json +1 -1
  223. package/native-app/preload/index.cjs +2 -0
  224. package/native-app/renderer/assets/{index-CFc-oZuS.js → index-B4jz6epR.js} +825 -155
  225. package/native-app/renderer/assets/{index-OhGE0UY4.css → index-C__g36ft.css} +412 -162
  226. package/native-app/renderer/assets/shortcutagent-DxFsGSkw.png +0 -0
  227. package/native-app/renderer/index.html +2 -2
  228. package/package.json +17 -3
  229. package/skills/add-custom-model/SKILL.md +52 -0
  230. package/user-docs/dist/index.html +1 -1
  231. package/user-docs/dist/shortcutxl-docs.pdf +0 -0
  232. package/xll/ShortcutXL.xll +0 -0
  233. package/xll/modules/shortcut_xl/_managed.py +26 -7
  234. package/xll/modules/shortcut_xl/_tracking.py +141 -251
  235. package/xll/modules/shortcut_xl/api/__init__.py +60 -0
  236. package/xll/modules/shortcut_xl/api/workbook.py +9 -1
  237. package/xll/modules/shortcut_xl/api/worksheet.py +4 -1
  238. package/xll/python/Lib/site-packages/httpx-0.28.1.dist-info/RECORD +1 -1
  239. package/xll/python/Lib/site-packages/idna-3.18.dist-info/RECORD +1 -1
  240. package/xll/python/Lib/site-packages/pip/__init__.py +1 -1
  241. package/xll/python/Lib/site-packages/pip/_internal/build_env/__init__.py +25 -0
  242. package/xll/python/Lib/site-packages/pip/_internal/build_env/base.py +103 -0
  243. package/xll/python/Lib/site-packages/pip/_internal/build_env/installer.py +333 -0
  244. package/xll/python/Lib/site-packages/pip/_internal/build_env/noop.py +42 -0
  245. package/xll/python/Lib/site-packages/pip/_internal/build_env/venv.py +145 -0
  246. package/xll/python/Lib/site-packages/pip/_internal/build_env/virtual.py +139 -0
  247. package/xll/python/Lib/site-packages/pip/_internal/cache.py +4 -1
  248. package/xll/python/Lib/site-packages/pip/_internal/cli/autocompletion.py +4 -1
  249. package/xll/python/Lib/site-packages/pip/_internal/cli/base_command.py +11 -14
  250. package/xll/python/Lib/site-packages/pip/_internal/cli/cmdoptions.py +133 -22
  251. package/xll/python/Lib/site-packages/pip/_internal/cli/index_command.py +11 -6
  252. package/xll/python/Lib/site-packages/pip/_internal/cli/main.py +2 -1
  253. package/xll/python/Lib/site-packages/pip/_internal/cli/main_parser.py +1 -2
  254. package/xll/python/Lib/site-packages/pip/_internal/cli/parser.py +10 -2
  255. package/xll/python/Lib/site-packages/pip/_internal/cli/progress_bars.py +2 -2
  256. package/xll/python/Lib/site-packages/pip/_internal/cli/req_command.py +57 -25
  257. package/xll/python/Lib/site-packages/pip/_internal/cli/status_codes.py +1 -0
  258. package/xll/python/Lib/site-packages/pip/_internal/commands/cache.py +7 -6
  259. package/xll/python/Lib/site-packages/pip/_internal/commands/configuration.py +2 -1
  260. package/xll/python/Lib/site-packages/pip/_internal/commands/debug.py +4 -5
  261. package/xll/python/Lib/site-packages/pip/_internal/commands/download.py +4 -0
  262. package/xll/python/Lib/site-packages/pip/_internal/commands/freeze.py +1 -1
  263. package/xll/python/Lib/site-packages/pip/_internal/commands/index.py +10 -3
  264. package/xll/python/Lib/site-packages/pip/_internal/commands/inspect.py +1 -1
  265. package/xll/python/Lib/site-packages/pip/_internal/commands/install.py +6 -6
  266. package/xll/python/Lib/site-packages/pip/_internal/commands/list.py +11 -6
  267. package/xll/python/Lib/site-packages/pip/_internal/commands/lock.py +4 -6
  268. package/xll/python/Lib/site-packages/pip/_internal/commands/show.py +14 -8
  269. package/xll/python/Lib/site-packages/pip/_internal/commands/wheel.py +7 -1
  270. package/xll/python/Lib/site-packages/pip/_internal/configuration.py +2 -3
  271. package/xll/python/Lib/site-packages/pip/_internal/distributions/base.py +5 -3
  272. package/xll/python/Lib/site-packages/pip/_internal/distributions/installed.py +3 -2
  273. package/xll/python/Lib/site-packages/pip/_internal/distributions/sdist.py +45 -20
  274. package/xll/python/Lib/site-packages/pip/_internal/distributions/wheel.py +3 -2
  275. package/xll/python/Lib/site-packages/pip/_internal/exceptions.py +174 -0
  276. package/xll/python/Lib/site-packages/pip/_internal/index/collector.py +70 -48
  277. package/xll/python/Lib/site-packages/pip/_internal/index/package_finder.py +46 -7
  278. package/xll/python/Lib/site-packages/pip/_internal/index/sources.py +1 -2
  279. package/xll/python/Lib/site-packages/pip/_internal/locations/_sysconfig.py +1 -1
  280. package/xll/python/Lib/site-packages/pip/_internal/locations/base.py +1 -1
  281. package/xll/python/Lib/site-packages/pip/_internal/metadata/base.py +10 -5
  282. package/xll/python/Lib/site-packages/pip/_internal/metadata/importlib/_dists.py +1 -1
  283. package/xll/python/Lib/site-packages/pip/_internal/metadata/importlib/_envs.py +8 -3
  284. package/xll/python/Lib/site-packages/pip/_internal/models/candidate.py +5 -1
  285. package/xll/python/Lib/site-packages/pip/_internal/models/link.py +53 -13
  286. package/xll/python/Lib/site-packages/pip/_internal/network/auth.py +38 -21
  287. package/xll/python/Lib/site-packages/pip/_internal/network/cache.py +2 -2
  288. package/xll/python/Lib/site-packages/pip/_internal/network/download.py +58 -11
  289. package/xll/python/Lib/site-packages/pip/_internal/network/session.py +35 -40
  290. package/xll/python/Lib/site-packages/pip/_internal/network/utils.py +109 -1
  291. package/xll/python/Lib/site-packages/pip/_internal/operations/check.py +2 -3
  292. package/xll/python/Lib/site-packages/pip/_internal/operations/install/wheel.py +23 -18
  293. package/xll/python/Lib/site-packages/pip/_internal/operations/prepare.py +152 -7
  294. package/xll/python/Lib/site-packages/pip/_internal/req/__init__.py +2 -0
  295. package/xll/python/Lib/site-packages/pip/_internal/req/constructors.py +54 -69
  296. package/xll/python/Lib/site-packages/pip/_internal/req/req_file.py +6 -6
  297. package/xll/python/Lib/site-packages/pip/_internal/req/req_install.py +25 -21
  298. package/xll/python/Lib/site-packages/pip/_internal/req/req_uninstall.py +13 -8
  299. package/xll/python/Lib/site-packages/pip/_internal/resolution/base.py +2 -2
  300. package/xll/python/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +2 -2
  301. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +1 -1
  302. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +0 -1
  303. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +39 -52
  304. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +3 -3
  305. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +3 -0
  306. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +9 -0
  307. package/xll/python/Lib/site-packages/pip/_internal/utils/compat.py +15 -9
  308. package/xll/python/Lib/site-packages/pip/_internal/utils/deprecation.py +6 -1
  309. package/xll/python/Lib/site-packages/pip/_internal/utils/filesystem.py +2 -2
  310. package/xll/python/Lib/site-packages/pip/_internal/utils/logging.py +11 -3
  311. package/xll/python/Lib/site-packages/pip/_internal/utils/misc.py +48 -4
  312. package/xll/python/Lib/site-packages/pip/_internal/utils/pylock.py +18 -2
  313. package/xll/python/Lib/site-packages/pip/_internal/utils/retry.py +2 -1
  314. package/xll/python/Lib/site-packages/pip/_internal/utils/subprocess.py +4 -3
  315. package/xll/python/Lib/site-packages/pip/_internal/utils/temp_dir.py +1 -2
  316. package/xll/python/Lib/site-packages/pip/_internal/utils/unpacking.py +30 -4
  317. package/xll/python/Lib/site-packages/pip/_internal/utils/urls.py +5 -2
  318. package/xll/python/Lib/site-packages/pip/_internal/utils/virtualenv.py +2 -36
  319. package/xll/python/Lib/site-packages/pip/_internal/vcs/git.py +8 -5
  320. package/xll/python/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +1 -2
  321. package/xll/python/Lib/site-packages/pip/_internal/wheel_builder.py +5 -1
  322. package/xll/python/Lib/site-packages/pip/_vendor/bom.cdx.json +231 -0
  323. package/xll/python/Lib/site-packages/pip/_vendor/certifi/__init__.py +1 -1
  324. package/xll/python/Lib/site-packages/pip/_vendor/certifi/cacert.pem +0 -631
  325. package/xll/python/Lib/site-packages/pip/_vendor/distlib/__init__.py +1 -1
  326. package/xll/python/Lib/site-packages/pip/_vendor/distlib/compat.py +34 -64
  327. package/xll/python/Lib/site-packages/pip/_vendor/distlib/resources.py +28 -14
  328. package/xll/python/Lib/site-packages/pip/_vendor/distlib/scripts.py +7 -3
  329. package/xll/python/Lib/site-packages/pip/_vendor/distlib/util.py +48 -11
  330. package/xll/python/Lib/site-packages/pip/_vendor/idna/LICENSE.md +1 -1
  331. package/xll/python/Lib/site-packages/pip/_vendor/idna/__main__.py +6 -0
  332. package/xll/python/Lib/site-packages/pip/_vendor/idna/cli.py +128 -0
  333. package/xll/python/Lib/site-packages/pip/_vendor/idna/codec.py +50 -13
  334. package/xll/python/Lib/site-packages/pip/_vendor/idna/compat.py +26 -0
  335. package/xll/python/Lib/site-packages/pip/_vendor/idna/core.py +352 -141
  336. package/xll/python/Lib/site-packages/pip/_vendor/idna/idnadata.py +571 -2983
  337. package/xll/python/Lib/site-packages/pip/_vendor/idna/intranges.py +5 -7
  338. package/xll/python/Lib/site-packages/pip/_vendor/idna/package_data.py +1 -1
  339. package/xll/python/Lib/site-packages/pip/_vendor/idna/uts46data.py +16887 -8832
  340. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/__init__.py +352 -66
  341. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/__main__.py +11 -0
  342. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/_xdg.py +171 -0
  343. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/android.py +92 -41
  344. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/api.py +213 -49
  345. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/macos.py +128 -51
  346. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/unix.py +176 -127
  347. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/version.py +8 -18
  348. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/windows.py +185 -68
  349. package/xll/python/Lib/site-packages/pip/_vendor/pygments/__init__.py +2 -2
  350. package/xll/python/Lib/site-packages/pip/_vendor/pygments/__main__.py +1 -1
  351. package/xll/python/Lib/site-packages/pip/_vendor/pygments/console.py +1 -1
  352. package/xll/python/Lib/site-packages/pip/_vendor/pygments/filter.py +1 -1
  353. package/xll/python/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py +10 -8
  354. package/xll/python/Lib/site-packages/pip/_vendor/pygments/formatter.py +1 -1
  355. package/xll/python/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py +1 -1
  356. package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexer.py +7 -5
  357. package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py +1 -1
  358. package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py +9 -8
  359. package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/python.py +35 -32
  360. package/xll/python/Lib/site-packages/pip/_vendor/pygments/modeline.py +1 -1
  361. package/xll/python/Lib/site-packages/pip/_vendor/pygments/plugin.py +3 -1
  362. package/xll/python/Lib/site-packages/pip/_vendor/pygments/regexopt.py +13 -2
  363. package/xll/python/Lib/site-packages/pip/_vendor/pygments/scanner.py +1 -1
  364. package/xll/python/Lib/site-packages/pip/_vendor/pygments/sphinxext.py +1 -1
  365. package/xll/python/Lib/site-packages/pip/_vendor/pygments/style.py +1 -1
  366. package/xll/python/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py +1 -1
  367. package/xll/python/Lib/site-packages/pip/_vendor/pygments/token.py +1 -1
  368. package/xll/python/Lib/site-packages/pip/_vendor/pygments/unistring.py +1 -1
  369. package/xll/python/Lib/site-packages/pip/_vendor/pygments/util.py +2 -2
  370. package/xll/python/Lib/site-packages/pip/_vendor/requests/__init__.py +52 -16
  371. package/xll/python/Lib/site-packages/pip/_vendor/requests/__version__.py +2 -2
  372. package/xll/python/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +2 -2
  373. package/xll/python/Lib/site-packages/pip/_vendor/requests/_types.py +183 -0
  374. package/xll/python/Lib/site-packages/pip/_vendor/requests/adapters.py +101 -50
  375. package/xll/python/Lib/site-packages/pip/_vendor/requests/api.py +31 -8
  376. package/xll/python/Lib/site-packages/pip/_vendor/requests/auth.py +80 -40
  377. package/xll/python/Lib/site-packages/pip/_vendor/requests/compat.py +9 -3
  378. package/xll/python/Lib/site-packages/pip/_vendor/requests/cookies.py +143 -79
  379. package/xll/python/Lib/site-packages/pip/_vendor/requests/exceptions.py +15 -5
  380. package/xll/python/Lib/site-packages/pip/_vendor/requests/help.py +13 -10
  381. package/xll/python/Lib/site-packages/pip/_vendor/requests/hooks.py +23 -9
  382. package/xll/python/Lib/site-packages/pip/_vendor/requests/models.py +265 -126
  383. package/xll/python/Lib/site-packages/pip/_vendor/requests/py.typed +0 -0
  384. package/xll/python/Lib/site-packages/pip/_vendor/requests/sessions.py +164 -78
  385. package/xll/python/Lib/site-packages/pip/_vendor/requests/status_codes.py +2 -2
  386. package/xll/python/Lib/site-packages/pip/_vendor/requests/structures.py +51 -20
  387. package/xll/python/Lib/site-packages/pip/_vendor/requests/utils.py +161 -89
  388. package/xll/python/Lib/site-packages/pip/_vendor/tomli/__init__.py +1 -1
  389. package/xll/python/Lib/site-packages/pip/_vendor/tomli/_parser.py +9 -4
  390. package/xll/python/Lib/site-packages/pip/_vendor/tomli/_re.py +13 -9
  391. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_base_connection.py +3 -1
  392. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_collections.py +0 -1
  393. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_version.py +8 -18
  394. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/connection.py +4 -4
  395. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +23 -10
  396. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/response.py +5 -1
  397. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +7 -8
  398. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +1 -1
  399. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +2 -2
  400. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/fields.py +14 -14
  401. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +8 -6
  402. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/response.py +35 -22
  403. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +8 -0
  404. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +11 -61
  405. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +5 -11
  406. package/xll/python/Lib/site-packages/pip/_vendor/vendor.txt +8 -8
  407. package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/METADATA +3 -2
  408. package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/RECORD +208 -188
  409. package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/AUTHORS.txt +20 -0
  410. package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/idna/LICENSE.md +1 -1
  411. package/xll/python/Lib/site-packages/pywin32-311.dist-info/RECORD +2 -2
  412. package/xll/python/Scripts/httpx.exe +0 -0
  413. package/xll/python/Scripts/idna.exe +0 -0
  414. package/xll/python/Scripts/pip.exe +0 -0
  415. package/xll/python/Scripts/pip3.13.exe +0 -0
  416. package/xll/python/Scripts/pip3.exe +0 -0
  417. package/xll/python/Scripts/pywin32_postinstall.exe +0 -0
  418. package/xll/python/Scripts/pywin32_testall.exe +0 -0
  419. package/dist/app/collab/awareness.d.ts +0 -32
  420. package/dist/app/collab/awareness.js +0 -52
  421. package/dist/app/collab/collab-client.d.ts +0 -37
  422. package/dist/app/collab/collab-client.js +0 -208
  423. package/dist/app/collab/collab-manager.d.ts +0 -91
  424. package/dist/app/collab/collab-manager.js +0 -218
  425. package/dist/app/collab/collab-sync.d.ts +0 -62
  426. package/dist/app/collab/collab-sync.js +0 -215
  427. package/dist/app/collab/index.d.ts +0 -9
  428. package/dist/app/collab/index.js +0 -6
  429. package/dist/app/collab/super-fight.d.ts +0 -90
  430. package/dist/app/collab/super-fight.js +0 -310
  431. package/dist/app/collab/sync-bridge.d.ts +0 -35
  432. package/dist/app/collab/sync-bridge.js +0 -109
  433. package/dist/app/collab/types.d.ts +0 -75
  434. package/dist/app/collab/types.js +0 -5
  435. package/dist/embedded-agent/ai-content.d.ts +0 -52
  436. package/dist/embedded-agent/ai-content.js +0 -101
  437. package/dist/embedded-agent/host-tools/shared/llm-stream.d.ts +0 -31
  438. package/dist/embedded-agent/host-tools/shared/llm-stream.js +0 -136
  439. package/dist/embedded-agent/model-call-orchestrator.d.ts +0 -22
  440. package/dist/embedded-agent/model-call-orchestrator.js +0 -22
  441. package/dist/embedded-agent/stream-errors.d.ts +0 -10
  442. package/dist/embedded-agent/stream-errors.js +0 -73
  443. package/dist/embedded-agent/stream-message-state.d.ts +0 -14
  444. package/dist/embedded-agent/stream-message-state.js +0 -271
  445. package/dist/embedded-agent/stream-sse.d.ts +0 -78
  446. package/dist/embedded-agent/stream-sse.js +0 -73
  447. package/dist/shell/approvals/task-spawn-approval.d.ts +0 -20
  448. package/dist/shell/approvals/task-spawn-approval.js +0 -93
  449. package/dist/shell/interactive/collab-command.d.ts +0 -9
  450. package/dist/shell/interactive/collab-command.js +0 -115
  451. package/dist/shell/interactive/super-fight-ui.d.ts +0 -80
  452. package/dist/shell/interactive/super-fight-ui.js +0 -484
  453. package/dist/shell/status/collab-status.d.ts +0 -18
  454. package/dist/shell/status/collab-status.js +0 -46
  455. package/xll/python/Lib/site-packages/pip/_internal/build_env.py +0 -606
  456. /package/dist/{tui → autocomplete}/skill-autocomplete.js +0 -0
  457. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/INSTALLER +0 -0
  458. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/REQUESTED +0 -0
  459. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/WHEEL +0 -0
  460. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/entry_points.txt +0 -0
  461. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/LICENSE.txt +0 -0
  462. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt +0 -0
  463. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/certifi/LICENSE +0 -0
  464. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/distlib/LICENSE.txt +0 -0
  465. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/distro/LICENSE +0 -0
  466. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/msgpack/COPYING +0 -0
  467. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE +0 -0
  468. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.APACHE +0 -0
  469. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.BSD +0 -0
  470. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pkg_resources/LICENSE +0 -0
  471. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/platformdirs/LICENSE +0 -0
  472. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pygments/LICENSE +0 -0
  473. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pyproject_hooks/LICENSE +0 -0
  474. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/requests/LICENSE +0 -0
  475. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/resolvelib/LICENSE +0 -0
  476. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/rich/LICENSE +0 -0
  477. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/tomli/LICENSE +0 -0
  478. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/tomli_w/LICENSE +0 -0
  479. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/truststore/LICENSE +0 -0
  480. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/urllib3/LICENSE.txt +0 -0
@@ -0,0 +1,145 @@
1
+ from __future__ import annotations
2
+
3
+ import os
4
+ import sys
5
+ import sysconfig
6
+ from collections.abc import Iterable
7
+ from types import TracebackType
8
+ from typing import TYPE_CHECKING
9
+
10
+ from pip._internal.build_env.base import (
11
+ BuildEnvironment,
12
+ BuildEnvironmentInstaller,
13
+ Prefix,
14
+ )
15
+ from pip._internal.exceptions import VenvCreationError, VenvImportError
16
+ from pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds
17
+
18
+ if TYPE_CHECKING:
19
+ from pip._internal.req.req_install import InstallRequirement
20
+
21
+
22
+ def _get_venv_path_from_sysconfig(name: str, env_dir: str) -> str:
23
+ vars = {
24
+ "base": env_dir,
25
+ "platbase": env_dir,
26
+ }
27
+ return sysconfig.get_path(name, scheme="venv", vars=vars)
28
+
29
+
30
+ class VenvBuildEnvironment(BuildEnvironment):
31
+ """A venv-based build environment."""
32
+
33
+ def __init__(self, installer: BuildEnvironmentInstaller) -> None:
34
+ # We defer this import because certain distributions of Python do not include
35
+ # a functional venv out of the box.
36
+ try:
37
+ import venv
38
+ except ImportError:
39
+ raise VenvImportError
40
+
41
+ self._env_path = TempDirectory(
42
+ kind=tempdir_kinds.BUILD_ENV, globally_managed=True
43
+ ).path
44
+ # Use symlinks to support relocatable Python installations on POSIX, including
45
+ # python-build-standalone. This matches upstream venv CLI's behaviour.
46
+ env = venv.EnvBuilder(symlinks=(os.name != "nt"))
47
+ try:
48
+ context = env.ensure_directories(self._env_path)
49
+ env.create(self._env_path)
50
+ except OSError as e:
51
+ raise VenvCreationError(str(e))
52
+
53
+ if sys.version_info >= (3, 12):
54
+ # The context object was only documented in Python 3.12
55
+ self.lib_dirs = [context.lib_path]
56
+ self._bin_path = context.bin_path
57
+ elif sys.version_info[:2] == (3, 11):
58
+ # On Python 3.11, we can use sysconfig.
59
+ self.lib_dirs = [_get_venv_path_from_sysconfig("purelib", self._env_path)]
60
+ self._bin_path = _get_venv_path_from_sysconfig("scripts", self._env_path)
61
+ else:
62
+ # Otherwise, we need to manually construct all the paths... sigh.
63
+ if sys.platform == "win32":
64
+ libpath = os.path.join(self._env_path, "Lib", "site-packages")
65
+ else:
66
+ python = "pypy" if sys.implementation.name == "pypy" else "python"
67
+ libpath = os.path.join(
68
+ self._env_path,
69
+ "lib",
70
+ f"{python}{sys.version_info.major}.{sys.version_info.minor}",
71
+ "site-packages",
72
+ )
73
+ self.lib_dirs = [libpath]
74
+ # Same reasoning for try-except as for python_executable below.
75
+ try:
76
+ self._bin_path = context.bin_path
77
+ except AttributeError:
78
+ scripts_dir = "Scripts" if os.name == "nt" else "bin"
79
+ self._bin_path = os.path.join(self._env_path, scripts_dir)
80
+
81
+ # There are enough ways trying to construct the Python executable path can go
82
+ # wrong that we're better off assuming that the context object has the right
83
+ # attributes, and only when they don't exist do we try to guess.
84
+ #
85
+ # These attributes seem to exist in every CPython version after 3.10.1 and
86
+ # are documented to exist on 3.12 and higher.
87
+ try:
88
+ self.python_executable = context.env_exec_cmd
89
+ except AttributeError:
90
+ try:
91
+ self.python_executable = context.env_exe
92
+ except AttributeError:
93
+ executable_name = "python.exe" if os.name == "nt" else "python"
94
+ self.python_executable = os.path.join(self._bin_path, executable_name)
95
+
96
+ self._save_env: dict[str, str | None] = {}
97
+ self._installer = installer
98
+
99
+ if not os.path.exists(self.python_executable):
100
+ # This error is only likely on Windows due to interference from AV software.
101
+ raise VenvCreationError(
102
+ f"Python executable failed to copy to {self.python_executable}"
103
+ )
104
+
105
+ def __enter__(self) -> None:
106
+ # We want backend calls to be able to use binaries installed as if this
107
+ # virtual environment was "activated".
108
+ self._save_env = {
109
+ name: os.environ.get(name, None) for name in ("PATH", "PYTHONPATH")
110
+ }
111
+
112
+ new_path = [self._bin_path]
113
+ if old_path := self._save_env["PATH"]:
114
+ new_path.extend(old_path.split(os.pathsep))
115
+ # However, we don't want a pre-existing PYTHONPATH to influence the
116
+ # backend calls.
117
+ os.environ.update({"PATH": os.pathsep.join(new_path), "PYTHONPATH": ""})
118
+
119
+ def __exit__(
120
+ self,
121
+ exc_type: type[BaseException] | None,
122
+ exc_val: BaseException | None,
123
+ exc_tb: TracebackType | None,
124
+ ) -> None:
125
+ for varname, old_value in self._save_env.items():
126
+ if old_value is None:
127
+ os.environ.pop(varname, None)
128
+ else:
129
+ os.environ[varname] = old_value
130
+
131
+ def install_requirements(
132
+ self,
133
+ requirements: Iterable[str],
134
+ prefix_as_string: str,
135
+ *,
136
+ kind: str,
137
+ for_req: InstallRequirement | None = None,
138
+ ) -> None:
139
+ if not requirements:
140
+ return
141
+
142
+ # TODO: when better support for installing to arbitrary Python environments
143
+ # is added, replace this prefix hack with that.
144
+ prefix = Prefix(self._env_path, venv_executable=self.python_executable)
145
+ self._installer.install(requirements, prefix, kind=kind, for_req=for_req)
@@ -0,0 +1,139 @@
1
+ from __future__ import annotations
2
+
3
+ import os
4
+ import site
5
+ import sys
6
+ import textwrap
7
+ from collections import OrderedDict
8
+ from collections.abc import Iterable
9
+ from types import TracebackType
10
+ from typing import TYPE_CHECKING
11
+
12
+ from pip._internal.build_env.base import (
13
+ BuildEnvironment,
14
+ BuildEnvironmentInstaller,
15
+ Prefix,
16
+ )
17
+ from pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds
18
+
19
+ if TYPE_CHECKING:
20
+ from pip._internal.req.req_install import InstallRequirement
21
+
22
+
23
+ def get_system_sitepackages() -> set[str]:
24
+ """Get system site packages, as a normalized set of strings."""
25
+ system_sites = site.getsitepackages()
26
+ return {os.path.normcase(path) for path in system_sites}
27
+
28
+
29
+ class VirtualBuildEnvironment(BuildEnvironment):
30
+ """Legacy build environment implementation.
31
+
32
+ Patches sys.path and uses sitecustomize.py to isolate Python processes. It has
33
+ known bugs and weird edge cases, but it exists as a fallback for platforms where
34
+ the venv module is unavailable or dysfunctional.
35
+ """
36
+
37
+ def __init__(self, installer: BuildEnvironmentInstaller) -> None:
38
+ self.python_executable = sys.executable
39
+ self.installer = installer
40
+ temp_dir = TempDirectory(kind=tempdir_kinds.BUILD_ENV, globally_managed=True)
41
+
42
+ self._prefixes = OrderedDict(
43
+ (name, Prefix(os.path.join(temp_dir.path, name)))
44
+ for name in ("normal", "overlay")
45
+ )
46
+
47
+ self._bin_dirs: list[str] = []
48
+ self.lib_dirs: list[str] = []
49
+ for prefix in reversed(list(self._prefixes.values())):
50
+ self._bin_dirs.append(prefix.bin_dir)
51
+ self.lib_dirs.extend(prefix.lib_dirs)
52
+
53
+ # Customize site to:
54
+ # - ensure .pth files are honored
55
+ # - prevent access to system site packages
56
+ system_sites = get_system_sitepackages()
57
+
58
+ self._site_dir = os.path.join(temp_dir.path, "site")
59
+ if not os.path.exists(self._site_dir):
60
+ os.mkdir(self._site_dir)
61
+ with open(
62
+ os.path.join(self._site_dir, "sitecustomize.py"), "w", encoding="utf-8"
63
+ ) as fp:
64
+ fp.write(textwrap.dedent("""
65
+ import os, site, sys
66
+
67
+ # First, discover all system-sites related paths.
68
+ original_sys_path = sys.path[:]
69
+ # Clear sys.path so addsitedir() will add system site paths and paths
70
+ # added by contained .pth files to sys.path reliably. This is necessary
71
+ # since Python 3.15, which notably no longer re-executes .pth files for
72
+ # known paths.
73
+ sys.path = []
74
+ known_paths = set()
75
+ for path in {system_sites!r}:
76
+ site.addsitedir(path, known_paths=known_paths)
77
+ system_paths = set(os.path.normcase(path) for path in sys.path)
78
+
79
+ # Drop discovered system-sites related paths.
80
+ original_sys_path = [
81
+ path for path in original_sys_path
82
+ if os.path.normcase(path) not in system_paths
83
+ ]
84
+ sys.path = original_sys_path
85
+
86
+ # Second, add lib directories.
87
+ # ensuring .pth file are processed.
88
+ for path in {lib_dirs!r}:
89
+ assert not path in sys.path
90
+ site.addsitedir(path)
91
+ """).format(system_sites=system_sites, lib_dirs=self.lib_dirs))
92
+
93
+ def __enter__(self) -> None:
94
+ self._save_env = {
95
+ name: os.environ.get(name, None)
96
+ for name in ("PATH", "PYTHONNOUSERSITE", "PYTHONPATH")
97
+ }
98
+
99
+ path = self._bin_dirs[:]
100
+ old_path = self._save_env["PATH"]
101
+ if old_path:
102
+ path.extend(old_path.split(os.pathsep))
103
+
104
+ pythonpath = [self._site_dir]
105
+
106
+ os.environ.update(
107
+ {
108
+ "PATH": os.pathsep.join(path),
109
+ "PYTHONNOUSERSITE": "1",
110
+ "PYTHONPATH": os.pathsep.join(pythonpath),
111
+ }
112
+ )
113
+
114
+ def __exit__(
115
+ self,
116
+ exc_type: type[BaseException] | None,
117
+ exc_val: BaseException | None,
118
+ exc_tb: TracebackType | None,
119
+ ) -> None:
120
+ for varname, old_value in self._save_env.items():
121
+ if old_value is None:
122
+ os.environ.pop(varname, None)
123
+ else:
124
+ os.environ[varname] = old_value
125
+
126
+ def install_requirements(
127
+ self,
128
+ requirements: Iterable[str],
129
+ prefix_as_string: str,
130
+ *,
131
+ kind: str,
132
+ for_req: InstallRequirement | None = None,
133
+ ) -> None:
134
+ prefix = self._prefixes[prefix_as_string]
135
+ assert not prefix.setup
136
+ prefix.setup = True
137
+ if not requirements:
138
+ return
139
+ self.installer.install(requirements, prefix, kind=kind, for_req=for_req)
@@ -134,10 +134,13 @@ class SimpleWheelCache(Cache):
134
134
  ) -> Link:
135
135
  candidates = []
136
136
 
137
+ if link.is_existing_dir():
138
+ return link
137
139
  if not package_name:
138
140
  return link
139
141
 
140
142
  canonical_package_name = canonicalize_name(package_name)
143
+ supported_tags_set = set(supported_tags)
141
144
  for wheel_name, wheel_dir in self._get_candidates(link, canonical_package_name):
142
145
  try:
143
146
  wheel = Wheel(wheel_name)
@@ -152,7 +155,7 @@ class SimpleWheelCache(Cache):
152
155
  package_name,
153
156
  )
154
157
  continue
155
- if not wheel.supported(supported_tags):
158
+ if not wheel.supported(supported_tags_set):
156
159
  # Built for a different python/arch/etc
157
160
  continue
158
161
  candidates.append(
@@ -11,7 +11,6 @@ from typing import Any
11
11
 
12
12
  from pip._internal.cli.main_parser import create_main_parser
13
13
  from pip._internal.commands import commands_dict, create_command
14
- from pip._internal.metadata import get_default_environment
15
14
 
16
15
 
17
16
  def autocomplete() -> None:
@@ -51,6 +50,10 @@ def autocomplete() -> None:
51
50
  "uninstall",
52
51
  ]
53
52
  if should_list_installed:
53
+ # NOTE: this import is deferred until absolutely necessary as it's slow,
54
+ # and it's important that autocompletion is fast.
55
+ from pip._internal.metadata import get_default_environment
56
+
54
57
  env = get_default_environment()
55
58
  lc = current.lower()
56
59
  installed = [
@@ -9,9 +9,8 @@ import optparse
9
9
  import os
10
10
  import sys
11
11
  import traceback
12
- from collections.abc import Iterator
12
+ from collections.abc import Callable, Iterator
13
13
  from optparse import Values
14
- from typing import Callable
15
14
 
16
15
  from pip._vendor.rich import reconfigure
17
16
  from pip._vendor.rich import traceback as rich_traceback
@@ -20,6 +19,7 @@ from pip._internal.cli import cmdoptions
20
19
  from pip._internal.cli.command_context import CommandContextMixIn
21
20
  from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
22
21
  from pip._internal.cli.status_codes import (
22
+ BROKEN_STDOUT,
23
23
  ERROR,
24
24
  PREVIOUS_BUILD_DIR_ERROR,
25
25
  UNKNOWN_ERROR,
@@ -147,7 +147,15 @@ class Command(CommandContextMixIn):
147
147
  except OSError:
148
148
  pass
149
149
 
150
- return ERROR
150
+ # redirect stdout to os.devnull so that the exit cleanup doesn't
151
+ # produce "BrokenPipeError" when exiting.
152
+ devnull = os.open(os.devnull, os.O_WRONLY)
153
+ try:
154
+ os.dup2(devnull, 1)
155
+ finally:
156
+ os.close(devnull)
157
+
158
+ return BROKEN_STDOUT
151
159
  except KeyboardInterrupt:
152
160
  logger.critical("Operation cancelled by user")
153
161
  logger.debug("Exception information:", exc_info=True)
@@ -244,17 +252,6 @@ class Command(CommandContextMixIn):
244
252
  )
245
253
  options.cache_dir = None
246
254
 
247
- if (
248
- "inprocess-build-deps" in options.features_enabled
249
- and os.environ.get("PIP_CONSTRAINT", "")
250
- and "build-constraint" not in options.features_enabled
251
- ):
252
- logger.warning(
253
- "In-process build dependencies are enabled, "
254
- "PIP_CONSTRAINT will have no effect for build dependencies"
255
- )
256
- options.features_enabled.append("build-constraint")
257
-
258
255
  return self._run_wrapper(level_number, options, args)
259
256
 
260
257
  def handler_map(self) -> dict[str, Callable[[Values, list[str]], None]]:
@@ -16,11 +16,12 @@ import os
16
16
  import pathlib
17
17
  import re
18
18
  import textwrap
19
+ from collections.abc import Callable
19
20
  from datetime import datetime, timedelta, timezone
20
21
  from functools import partial
21
22
  from optparse import SUPPRESS_HELP, Option, OptionGroup, OptionParser, Values
22
23
  from textwrap import dedent
23
- from typing import Any, Callable
24
+ from typing import Any
24
25
 
25
26
  from pip._vendor.packaging.utils import canonicalize_name
26
27
 
@@ -31,7 +32,6 @@ from pip._internal.models.format_control import FormatControl
31
32
  from pip._internal.models.index import PyPI
32
33
  from pip._internal.models.release_control import ReleaseControl
33
34
  from pip._internal.models.target_python import TargetPython
34
- from pip._internal.utils import pylock as pylock_utils
35
35
  from pip._internal.utils.datetime import parse_iso_datetime
36
36
  from pip._internal.utils.hashes import STRONG_HASHES
37
37
  from pip._internal.utils.misc import strtobool
@@ -65,6 +65,37 @@ def make_option_group(group: dict[str, Any], parser: ConfigOptionParser) -> Opti
65
65
  return option_group
66
66
 
67
67
 
68
+ def check_only_deps_option_does_not_conflict(options: Values) -> None:
69
+ """Function for determining if --only-deps and other incompatible options are
70
+ specified.
71
+
72
+ :param options: The OptionParser options.
73
+ """
74
+ if not options.only_dependencies:
75
+ return
76
+ conflicts = []
77
+ if options.ignore_dependencies:
78
+ conflicts.append("'--no-deps'")
79
+ if "legacy-resolver" in options.deprecated_features_enabled:
80
+ conflicts.append("'--use-deprecated legacy-resolver'")
81
+ if options.requirements:
82
+ conflicts.append("'--requirement'")
83
+ if options.requirements_from_scripts:
84
+ conflicts.append("'--requirements-from-script'")
85
+ if options.dependency_groups:
86
+ conflicts.append("'--group'")
87
+ if conflicts:
88
+ if len(conflicts) > 1:
89
+ conflicts[-1] = "or " + conflicts[-1]
90
+ conflict_message = ", ".join(conflicts)
91
+ raise CommandError(
92
+ f"Cannot use '--only-dependencies' in combination with {conflict_message}. "
93
+ "If this is unexpected, please refer to the user guide:\n"
94
+ "\n"
95
+ " https://pip.pypa.io/en/stable/user_guide/#installing-only-dependencies"
96
+ )
97
+
98
+
68
99
  def check_dist_restriction(options: Values, check_target: bool = False) -> None:
69
100
  """Function for determining if custom platform options are allowed.
70
101
 
@@ -104,13 +135,17 @@ def check_dist_restriction(options: Values, check_target: bool = False) -> None:
104
135
  "installing via '--target' or using '--dry-run'"
105
136
  )
106
137
 
107
- for filename in options.requirements:
108
- if dist_restriction_set and pylock_utils.is_valid_pylock_filename(filename):
109
- raise CommandError(
110
- "Patform and interpreter constraints using "
111
- "--python-version, --platform, --abi, or --implementation, "
112
- f"are not supported when selecting requirements from {filename!r}"
113
- )
138
+ if dist_restriction_set:
139
+ # Lazy import to keep CLI startup fast
140
+ from pip._internal.utils import pylock as pylock_utils
141
+
142
+ for filename in options.requirements:
143
+ if pylock_utils.is_valid_pylock_filename(filename):
144
+ raise CommandError(
145
+ "Platform and interpreter constraints using "
146
+ "--python-version, --platform, --abi, or --implementation, "
147
+ f"are not supported when selecting requirements from {filename!r}"
148
+ )
114
149
 
115
150
 
116
151
  def check_build_constraints(options: Values) -> None:
@@ -310,10 +345,19 @@ proxy: Callable[..., Option] = partial(
310
345
  "--proxy",
311
346
  dest="proxy",
312
347
  type="str",
313
- default="",
348
+ default=None,
314
349
  help="Specify a proxy in the form scheme://[user:passwd@]proxy.server:port.",
315
350
  )
316
351
 
352
+ no_proxy_env: Callable[..., Option] = partial(
353
+ Option,
354
+ "--no-proxy-env",
355
+ dest="no_proxy_env",
356
+ action="store_true",
357
+ default=False,
358
+ help="Do not read proxy configuration from environment variables.",
359
+ )
360
+
317
361
  retries: Callable[..., Option] = partial(
318
362
  Option,
319
363
  "--retries",
@@ -497,7 +541,7 @@ def uploaded_prior_to() -> Option:
497
541
  "Accepts an ISO 8601 datetime (e.g., '2023-01-01T00:00:00Z', "
498
542
  "uses local timezone if none specified) or a duration in days "
499
543
  "(e.g., 'P3D' for packages uploaded at least 3 days ago). "
500
- "Only effective when installing from indexes that provide "
544
+ "Only effective when using indexes that provide "
501
545
  "upload-time metadata."
502
546
  ),
503
547
  )
@@ -646,12 +690,13 @@ def no_binary() -> Option:
646
690
  callback=_handle_no_binary,
647
691
  type="str",
648
692
  default=format_control,
649
- help="Do not use binary packages. Can be supplied multiple times, and "
650
- 'each time adds to the existing value. Accepts either ":all:" to '
651
- 'disable all binary packages, ":none:" to empty the set (notice '
652
- "the colons), or one or more package names with commas between "
653
- "them (no colons). Note that some packages are tricky to compile "
654
- "and may fail to install when this option is used on them.",
693
+ help="Do not download binary packages. Cached binary packages may still "
694
+ "be used. Can be supplied multiple times, and each time adds to "
695
+ "the existing value. Accepts either ':all:' to disable all binary "
696
+ "packages, ':none:' to empty the set (notice the colons), or one "
697
+ "or more package names with commas between them (no colons). "
698
+ "Note that some packages are tricky to compile and may fail to "
699
+ "install when this option is used on them.",
655
700
  )
656
701
 
657
702
 
@@ -821,15 +866,13 @@ python_version: Callable[..., Option] = partial(
821
866
  callback=_handle_python_version,
822
867
  type="str",
823
868
  default=None,
824
- help=dedent(
825
- """\
869
+ help=dedent("""\
826
870
  The Python interpreter version to use for wheel and "Requires-Python"
827
871
  compatibility checks. Defaults to a version derived from the running
828
872
  interpreter. The version can be specified using up to three dot-separated
829
873
  integers (e.g. "3" for 3.0.0, "3.7" for 3.7.0, or "3.7.3"). A major-minor
830
874
  version can also be given as a string without dots (e.g. "37" for 3.7.0).
831
- """
832
- ),
875
+ """),
833
876
  )
834
877
 
835
878
 
@@ -958,6 +1001,60 @@ no_deps: Callable[..., Option] = partial(
958
1001
  )
959
1002
 
960
1003
 
1004
+ def _handle_refresh_package(
1005
+ option: Option, opt_str: str, value: str, parser: OptionParser
1006
+ ) -> None:
1007
+ if value.startswith("-"):
1008
+ raise CommandError("--refresh-package option requires 1 argument.")
1009
+
1010
+ existing: set[str] = getattr(parser.values, option.dest)
1011
+
1012
+ new = value.split(",")
1013
+ while ":all:" in new:
1014
+ existing.clear()
1015
+ existing.add(":all:")
1016
+ del new[: new.index(":all:") + 1]
1017
+ if ":none:" not in new:
1018
+ return
1019
+
1020
+ for name in new:
1021
+ if name == ":none:":
1022
+ existing.clear()
1023
+ else:
1024
+ existing.add(canonicalize_name(name))
1025
+
1026
+
1027
+ def refresh_package() -> Option:
1028
+ return Option(
1029
+ "--refresh-package",
1030
+ dest="refresh_package",
1031
+ action="callback",
1032
+ callback=_handle_refresh_package,
1033
+ type="str",
1034
+ default=set(),
1035
+ help="Refresh package index information for the given packages instead "
1036
+ "of using cached responses. Accepts ':all:' to apply "
1037
+ "to all packages, or a comma-separated list of package names.",
1038
+ )
1039
+
1040
+
1041
+ only_deps: Callable[..., Option] = partial(
1042
+ Option,
1043
+ "--only-deps",
1044
+ "--only-dependencies",
1045
+ dest="only_dependencies",
1046
+ action="store_true",
1047
+ default=False,
1048
+ help=(
1049
+ "Take only the dependencies of the provided requirements into account, "
1050
+ "not the requirements themselves. Cannot be used in combination with "
1051
+ "--no-deps, --group, --requirement, or --requirements-from-script. "
1052
+ "No user-supplied requirements will be handled, even if they were "
1053
+ "dependencies of other user-supplied requirements."
1054
+ ),
1055
+ )
1056
+
1057
+
961
1058
  def _handle_dependency_group(
962
1059
  option: Option, opt: str, value: str, parser: OptionParser
963
1060
  ) -> None:
@@ -1165,6 +1262,17 @@ require_hashes: Callable[..., Option] = partial(
1165
1262
  )
1166
1263
 
1167
1264
 
1265
+ no_require_hashes: Callable[..., Option] = partial(
1266
+ Option,
1267
+ "--no-require-hashes",
1268
+ dest="no_require_hashes",
1269
+ action="store_true",
1270
+ default=False,
1271
+ help="Do not automatically enable --require-hashes "
1272
+ "when encountering a requirement with hashes.",
1273
+ )
1274
+
1275
+
1168
1276
  list_path: Callable[..., Option] = partial(
1169
1277
  PipOption,
1170
1278
  "--path",
@@ -1206,6 +1314,7 @@ no_python_version_warning: Callable[..., Option] = partial(
1206
1314
  ALWAYS_ENABLED_FEATURES = [
1207
1315
  "truststore", # always on since 24.2
1208
1316
  "no-binary-enable-wheel-cache", # always on since 23.1
1317
+ "build-constraint", # always on since 26.2
1209
1318
  ]
1210
1319
 
1211
1320
  use_new_feature: Callable[..., Option] = partial(
@@ -1217,8 +1326,8 @@ use_new_feature: Callable[..., Option] = partial(
1217
1326
  default=[],
1218
1327
  choices=[
1219
1328
  "fast-deps",
1220
- "build-constraint",
1221
1329
  "inprocess-build-deps",
1330
+ "venv-isolation",
1222
1331
  ]
1223
1332
  + ALWAYS_ENABLED_FEATURES,
1224
1333
  help="Enable new functionality, that may be backward incompatible.",
@@ -1257,6 +1366,7 @@ general_group: dict[str, Any] = {
1257
1366
  no_input,
1258
1367
  keyring_provider,
1259
1368
  proxy,
1369
+ no_proxy_env,
1260
1370
  retries,
1261
1371
  timeout,
1262
1372
  exists_action,
@@ -1280,6 +1390,7 @@ index_group: dict[str, Any] = {
1280
1390
  index_url,
1281
1391
  extra_index_url,
1282
1392
  no_index,
1393
+ refresh_package,
1283
1394
  find_links,
1284
1395
  uploaded_prior_to,
1285
1396
  ],
@@ -107,6 +107,7 @@ class SessionCommandMixin(CommandContextMixIn):
107
107
  trusted_hosts=options.trusted_hosts,
108
108
  index_urls=self._get_index_urls(options),
109
109
  ssl_context=ssl_context,
110
+ refresh_package=getattr(options, "refresh_package", set()),
110
111
  )
111
112
 
112
113
  # Handle custom ca-bundles from the user
@@ -121,14 +122,18 @@ class SessionCommandMixin(CommandContextMixIn):
121
122
  if options.timeout or timeout:
122
123
  session.timeout = timeout if timeout is not None else options.timeout
123
124
 
124
- # Handle configured proxies
125
- if options.proxy:
126
- session.proxies = {
127
- "http": options.proxy,
128
- "https": options.proxy,
129
- }
125
+ # An explicit --proxy (including "" to disable proxying) or --no-proxy-env
126
+ # makes the session ignore environment proxies; unset --proxy is None.
127
+ if options.proxy is not None or options.no_proxy_env:
128
+ if options.proxy:
129
+ session.proxies = {
130
+ "http": options.proxy,
131
+ "https": options.proxy,
132
+ }
130
133
  session.trust_env = False
134
+ # Keep "" so an empty --proxy reaches build subprocesses.
131
135
  session.pip_proxy = options.proxy
136
+ session.pip_no_proxy_env = options.no_proxy_env
132
137
 
133
138
  # Determine if we can prompt the user for authentication or not
134
139
  session.auth.prompting = not options.no_input