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,183 @@
1
+ """
2
+ requests._types
3
+ ~~~~~~~~~~~~~~~
4
+
5
+ This module contains type aliases used internally by the Requests library.
6
+ These types are not part of the public API and must not be relied upon
7
+ by external code.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence
13
+ from typing import (
14
+ TYPE_CHECKING,
15
+ Any,
16
+ Protocol,
17
+ TypeAlias,
18
+ TypeVar,
19
+ runtime_checkable,
20
+ )
21
+
22
+ _T_co = TypeVar("_T_co", covariant=True)
23
+ _KT_co = TypeVar("_KT_co", covariant=True)
24
+ _VT_co = TypeVar("_VT_co", covariant=True)
25
+
26
+
27
+ @runtime_checkable
28
+ class SupportsRead(Protocol[_T_co]):
29
+ def read(self, length: int = ..., /) -> _T_co: ...
30
+
31
+
32
+ @runtime_checkable
33
+ class SupportsItems(Protocol[_KT_co, _VT_co]):
34
+ def items(self) -> Iterable[tuple[_KT_co, _VT_co]]: ...
35
+
36
+
37
+ # These are needed at runtime for default_hooks() return type
38
+ HookType: TypeAlias = Callable[["Response"], Any]
39
+ HooksInputType: TypeAlias = Mapping[str, Iterable[HookType] | HookType]
40
+
41
+
42
+ def is_prepared(request: PreparedRequest) -> TypeIs[_ValidatedRequest]:
43
+ """Verify a PreparedRequest has been fully prepared."""
44
+ if TYPE_CHECKING:
45
+ return request.url is not None and request.method is not None
46
+ # noop at runtime to avoid AssertionError
47
+ return True
48
+
49
+
50
+ if TYPE_CHECKING:
51
+ from http.cookiejar import CookieJar
52
+ from typing import TypeAlias, TypedDict
53
+
54
+ from typing_extensions import (
55
+ Buffer, # TODO: move to collections.abc when Python >= 3.12
56
+ TypeIs, # TODO: move to typing when Python >= 3.13
57
+ )
58
+
59
+ from .auth import AuthBase
60
+ from .cookies import RequestsCookieJar
61
+ from .models import PreparedRequest, Response
62
+ from .structures import CaseInsensitiveDict
63
+
64
+ class _ValidatedRequest(PreparedRequest):
65
+ """Subtype asserting a PreparedRequest has been fully prepared before calling.
66
+
67
+ The override suppression is required because mutable attribute types are
68
+ invariant (Liskov), but we only narrow after preparation is complete. This
69
+ is the explicit contract for Requests but Python's typing doesn't have a
70
+ better way to represent the requirement.
71
+ """
72
+
73
+ url: str # type: ignore[reportIncompatibleVariableOverride]
74
+ method: str # type: ignore[reportIncompatibleVariableOverride]
75
+
76
+ # Type aliases for core API concepts (ordered by request() signature)
77
+ UriType: TypeAlias = str | bytes
78
+
79
+ _ParamsMappingKeyType: TypeAlias = str | bytes | int | float
80
+ _ParamsMappingValueType: TypeAlias = (
81
+ str | bytes | int | float | Iterable[str | bytes | int | float] | None
82
+ )
83
+ ParamsType: TypeAlias = (
84
+ SupportsItems[_ParamsMappingKeyType, _ParamsMappingValueType]
85
+ | tuple[tuple[_ParamsMappingKeyType, _ParamsMappingValueType], ...]
86
+ | Iterable[tuple[_ParamsMappingKeyType, _ParamsMappingValueType]]
87
+ | str
88
+ | bytes
89
+ | None
90
+ )
91
+
92
+ KVDataType: TypeAlias = Iterable[tuple[Any, Any]] | SupportsItems[Any, Any]
93
+
94
+ RawDataType: TypeAlias = KVDataType | str | bytes
95
+ StreamDataType: TypeAlias = SupportsRead[str | bytes]
96
+ EncodableDataType: TypeAlias = RawDataType | StreamDataType
97
+
98
+ DataType: TypeAlias = (
99
+ KVDataType
100
+ | Iterable[bytes | str]
101
+ | str
102
+ | bytes
103
+ | Buffer
104
+ | SupportsRead[str | bytes]
105
+ | None
106
+ )
107
+
108
+ BodyType: TypeAlias = (
109
+ bytes | str | Iterable[bytes | str] | SupportsRead[bytes | str] | None
110
+ )
111
+
112
+ HeadersType: TypeAlias = Mapping[str, str | bytes] | None
113
+
114
+ CookiesType: TypeAlias = RequestsCookieJar | Mapping[str, str]
115
+
116
+ # Building blocks for FilesType
117
+ _FileName: TypeAlias = str | None
118
+ _FileContent: TypeAlias = SupportsRead[str | bytes] | str | bytes
119
+ _FileSpecBasic: TypeAlias = tuple[_FileName, _FileContent]
120
+ _FileSpecWithContentType: TypeAlias = tuple[_FileName, _FileContent, str]
121
+ _FileSpecWithHeaders: TypeAlias = tuple[
122
+ _FileName, _FileContent, str, CaseInsensitiveDict[str] | Mapping[str, str]
123
+ ]
124
+ _FileSpec: TypeAlias = (
125
+ _FileContent | _FileSpecBasic | _FileSpecWithContentType | _FileSpecWithHeaders
126
+ )
127
+ FilesType: TypeAlias = (
128
+ Mapping[str, _FileSpec] | Iterable[tuple[str, _FileSpec]] | None
129
+ )
130
+
131
+ AuthType: TypeAlias = (
132
+ tuple[str, str] | AuthBase | Callable[[PreparedRequest], PreparedRequest] | None
133
+ )
134
+
135
+ TimeoutType: TypeAlias = float | tuple[float | None, float | None] | None
136
+ ProxiesType: TypeAlias = MutableMapping[str, str]
137
+ HooksType: TypeAlias = dict[str, list[HookType]] | None
138
+ VerifyType: TypeAlias = bool | str
139
+ CertType: TypeAlias = str | tuple[str, str] | None
140
+ JsonType: TypeAlias = (
141
+ None
142
+ | bool
143
+ | int
144
+ | float
145
+ | str
146
+ | Sequence["JsonType"]
147
+ | Mapping[str, "JsonType"]
148
+ )
149
+
150
+ # TypedDicts for Unpack kwargs (PEP 692)
151
+
152
+ class BaseRequestKwargs(TypedDict, total=False):
153
+ headers: HeadersType
154
+ cookies: RequestsCookieJar | CookieJar | dict[str, str] | None
155
+ files: FilesType
156
+ auth: AuthType
157
+ timeout: TimeoutType
158
+ allow_redirects: bool
159
+ proxies: dict[str, str] | None
160
+ hooks: HooksInputType | None
161
+ stream: bool | None
162
+ verify: VerifyType | None
163
+ cert: CertType
164
+
165
+ class RequestKwargs(BaseRequestKwargs, total=False):
166
+ """kwargs for request(), options(), head(), delete()."""
167
+
168
+ params: ParamsType
169
+ data: DataType
170
+ json: JsonType
171
+
172
+ class GetKwargs(BaseRequestKwargs, total=False):
173
+ data: DataType
174
+ json: JsonType
175
+
176
+ class PostKwargs(BaseRequestKwargs, total=False):
177
+ params: ParamsType
178
+
179
+ class DataKwargs(BaseRequestKwargs, total=False):
180
+ """kwargs for put(), patch()."""
181
+
182
+ params: ParamsType
183
+ json: JsonType
@@ -6,10 +6,13 @@ This module contains the transport adapters that Requests uses to define
6
6
  and maintain connections.
7
7
  """
8
8
 
9
+ from __future__ import annotations
10
+
9
11
  import os.path
10
- import socket # noqa: F401
12
+ import socket # noqa: F401 # type: ignore[reportUnusedImport]
11
13
  import typing
12
14
  import warnings
15
+ from typing import Any
13
16
 
14
17
  from pip._vendor.urllib3.exceptions import (
15
18
  ClosedPoolError,
@@ -30,7 +33,7 @@ from pip._vendor.urllib3.util import Timeout as TimeoutSauce
30
33
  from pip._vendor.urllib3.util import parse_url
31
34
  from pip._vendor.urllib3.util.retry import Retry
32
35
 
33
- from .auth import _basic_auth_str
36
+ from .auth import _basic_auth_str # type: ignore[reportPrivateUsage]
34
37
  from .compat import basestring, urlparse
35
38
  from .cookies import extract_cookies_to_jar
36
39
  from .exceptions import (
@@ -57,16 +60,21 @@ from .utils import (
57
60
  )
58
61
 
59
62
  try:
60
- from pip._vendor.urllib3.contrib.socks import SOCKSProxyManager
63
+ from pip._vendor.urllib3.contrib.socks import SOCKSProxyManager # type: ignore[assignment]
61
64
  except ImportError:
62
65
 
63
- def SOCKSProxyManager(*args, **kwargs):
66
+ def SOCKSProxyManager(*args: Any, **kwargs: Any) -> None:
64
67
  raise InvalidSchema("Missing dependencies for SOCKS support.")
65
68
 
66
69
 
67
70
  if typing.TYPE_CHECKING:
71
+ from pip._vendor.urllib3.connectionpool import HTTPConnectionPool
72
+ from pip._vendor.urllib3.poolmanager import PoolManager as _PoolManager
73
+
74
+ from . import _types as _t
68
75
  from .models import PreparedRequest
69
76
 
77
+ from ._types import is_prepared as _is_prepared
70
78
 
71
79
  DEFAULT_POOLBLOCK = False
72
80
  DEFAULT_POOLSIZE = 10
@@ -75,13 +83,13 @@ DEFAULT_POOL_TIMEOUT = None
75
83
 
76
84
 
77
85
  def _urllib3_request_context(
78
- request: "PreparedRequest",
79
- verify: "bool | str | None",
80
- client_cert: "tuple[str, str] | str | None",
81
- poolmanager: "PoolManager",
82
- ) -> "(dict[str, typing.Any], dict[str, typing.Any])":
83
- host_params = {}
84
- pool_kwargs = {}
86
+ request: PreparedRequest,
87
+ verify: bool | str | None,
88
+ client_cert: tuple[str, str] | str | None,
89
+ poolmanager: PoolManager,
90
+ ) -> tuple[dict[str, Any], dict[str, Any]]:
91
+ host_params: dict[str, Any] = {}
92
+ pool_kwargs: dict[str, Any] = {}
85
93
  parsed_request_url = urlparse(request.url)
86
94
  scheme = parsed_request_url.scheme.lower()
87
95
  port = parsed_request_url.port
@@ -114,12 +122,18 @@ def _urllib3_request_context(
114
122
  class BaseAdapter:
115
123
  """The Base Transport Adapter"""
116
124
 
117
- def __init__(self):
125
+ def __init__(self) -> None:
118
126
  super().__init__()
119
127
 
120
128
  def send(
121
- self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None
122
- ):
129
+ self,
130
+ request: PreparedRequest,
131
+ stream: bool = False,
132
+ timeout: _t.TimeoutType = None,
133
+ verify: _t.VerifyType = True,
134
+ cert: _t.CertType = None,
135
+ proxies: dict[str, str] | None = None,
136
+ ) -> Response:
123
137
  """Sends PreparedRequest object. Returns Response object.
124
138
 
125
139
  :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
@@ -136,7 +150,7 @@ class BaseAdapter:
136
150
  """
137
151
  raise NotImplementedError
138
152
 
139
- def close(self):
153
+ def close(self) -> None:
140
154
  """Cleans up adapter specific items."""
141
155
  raise NotImplementedError
142
156
 
@@ -168,7 +182,7 @@ class HTTPAdapter(BaseAdapter):
168
182
  >>> s.mount('http://', a)
169
183
  """
170
184
 
171
- __attrs__ = [
185
+ __attrs__: list[str] = [
172
186
  "max_retries",
173
187
  "config",
174
188
  "_pool_connections",
@@ -176,13 +190,21 @@ class HTTPAdapter(BaseAdapter):
176
190
  "_pool_block",
177
191
  ]
178
192
 
193
+ max_retries: Retry
194
+ config: dict[str, Any]
195
+ proxy_manager: dict[str, Any]
196
+ _pool_connections: int
197
+ _pool_maxsize: int
198
+ _pool_block: bool
199
+ poolmanager: _PoolManager
200
+
179
201
  def __init__(
180
202
  self,
181
- pool_connections=DEFAULT_POOLSIZE,
182
- pool_maxsize=DEFAULT_POOLSIZE,
183
- max_retries=DEFAULT_RETRIES,
184
- pool_block=DEFAULT_POOLBLOCK,
185
- ):
203
+ pool_connections: int = DEFAULT_POOLSIZE,
204
+ pool_maxsize: int = DEFAULT_POOLSIZE,
205
+ max_retries: int | Retry = DEFAULT_RETRIES,
206
+ pool_block: bool = DEFAULT_POOLBLOCK,
207
+ ) -> None:
186
208
  if max_retries == DEFAULT_RETRIES:
187
209
  self.max_retries = Retry(0, read=False)
188
210
  else:
@@ -198,10 +220,10 @@ class HTTPAdapter(BaseAdapter):
198
220
 
199
221
  self.init_poolmanager(pool_connections, pool_maxsize, block=pool_block)
200
222
 
201
- def __getstate__(self):
223
+ def __getstate__(self) -> dict[str, Any]:
202
224
  return {attr: getattr(self, attr, None) for attr in self.__attrs__}
203
225
 
204
- def __setstate__(self, state):
226
+ def __setstate__(self, state: dict[str, Any]) -> None:
205
227
  # Can't handle by adding 'proxy_manager' to self.__attrs__ because
206
228
  # self.poolmanager uses a lambda function, which isn't pickleable.
207
229
  self.proxy_manager = {}
@@ -215,8 +237,12 @@ class HTTPAdapter(BaseAdapter):
215
237
  )
216
238
 
217
239
  def init_poolmanager(
218
- self, connections, maxsize, block=DEFAULT_POOLBLOCK, **pool_kwargs
219
- ):
240
+ self,
241
+ connections: int,
242
+ maxsize: int,
243
+ block: bool = DEFAULT_POOLBLOCK,
244
+ **pool_kwargs: Any,
245
+ ) -> None:
220
246
  """Initializes a urllib3 PoolManager.
221
247
 
222
248
  This method should not be called from user code, and is only
@@ -240,7 +266,7 @@ class HTTPAdapter(BaseAdapter):
240
266
  **pool_kwargs,
241
267
  )
242
268
 
243
- def proxy_manager_for(self, proxy, **proxy_kwargs):
269
+ def proxy_manager_for(self, proxy: str, **proxy_kwargs: Any) -> Any:
244
270
  """Return urllib3 ProxyManager for the given proxy.
245
271
 
246
272
  This method should not be called from user code, and is only
@@ -278,7 +304,9 @@ class HTTPAdapter(BaseAdapter):
278
304
 
279
305
  return manager
280
306
 
281
- def cert_verify(self, conn, url, verify, cert):
307
+ def cert_verify(
308
+ self, conn: Any, url: str, verify: _t.VerifyType, cert: _t.CertType
309
+ ) -> None:
282
310
  """Verify a SSL certificate. This method should not be called from user
283
311
  code, and is only exposed for use when subclassing the
284
312
  :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
@@ -334,7 +362,7 @@ class HTTPAdapter(BaseAdapter):
334
362
  f"Could not find the TLS key file, invalid path: {conn.key_file}"
335
363
  )
336
364
 
337
- def build_response(self, req, resp):
365
+ def build_response(self, req: PreparedRequest, resp: Any) -> Response:
338
366
  """Builds a :class:`Response <requests.Response>` object from a urllib3
339
367
  response. This should not be called from user code, and is only exposed
340
368
  for use when subclassing the
@@ -344,10 +372,11 @@ class HTTPAdapter(BaseAdapter):
344
372
  :param resp: The urllib3 response object.
345
373
  :rtype: requests.Response
346
374
  """
375
+ assert _is_prepared(req)
347
376
  response = Response()
348
377
 
349
378
  # Fallback to None if there's no status_code, for whatever reason.
350
- response.status_code = getattr(resp, "status", None)
379
+ response.status_code = getattr(resp, "status", None) # type: ignore[assignment]
351
380
 
352
381
  # Make headers case-insensitive.
353
382
  response.headers = CaseInsensitiveDict(getattr(resp, "headers", {}))
@@ -371,7 +400,9 @@ class HTTPAdapter(BaseAdapter):
371
400
 
372
401
  return response
373
402
 
374
- def build_connection_pool_key_attributes(self, request, verify, cert=None):
403
+ def build_connection_pool_key_attributes(
404
+ self, request: PreparedRequest, verify: _t.VerifyType, cert: _t.CertType = None
405
+ ) -> tuple[dict[str, Any], dict[str, Any]]:
375
406
  """Build the PoolKey attributes used by urllib3 to return a connection.
376
407
 
377
408
  This looks at the PreparedRequest, the user-specified verify value,
@@ -401,7 +432,7 @@ class HTTPAdapter(BaseAdapter):
401
432
  alter the other keys to ensure the desired behaviour.
402
433
 
403
434
  :param request:
404
- The PreparedReqest being sent over the connection.
435
+ The PreparedRequest being sent over the connection.
405
436
  :type request:
406
437
  :class:`~requests.models.PreparedRequest`
407
438
  :param verify:
@@ -421,7 +452,13 @@ class HTTPAdapter(BaseAdapter):
421
452
  """
422
453
  return _urllib3_request_context(request, verify, cert, self.poolmanager)
423
454
 
424
- def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None):
455
+ def get_connection_with_tls_context(
456
+ self,
457
+ request: PreparedRequest,
458
+ verify: _t.VerifyType,
459
+ proxies: dict[str, str] | None = None,
460
+ cert: _t.CertType = None,
461
+ ) -> HTTPConnectionPool:
425
462
  """Returns a urllib3 connection for the given request and TLS settings.
426
463
  This should not be called from user code, and is only exposed for use
427
464
  when subclassing the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
@@ -439,8 +476,10 @@ class HTTPAdapter(BaseAdapter):
439
476
  (optional) Any user-provided SSL certificate to be used for client
440
477
  authentication (a.k.a., mTLS).
441
478
  :rtype:
442
- urllib3.ConnectionPool
479
+ urllib3.HTTPConnectionPool
443
480
  """
481
+ assert _is_prepared(request)
482
+
444
483
  proxy = select_proxy(request.url, proxies)
445
484
  try:
446
485
  host_params, pool_kwargs = self.build_connection_pool_key_attributes(
@@ -470,7 +509,9 @@ class HTTPAdapter(BaseAdapter):
470
509
 
471
510
  return conn
472
511
 
473
- def get_connection(self, url, proxies=None):
512
+ def get_connection(
513
+ self, url: str, proxies: dict[str, str] | None = None
514
+ ) -> HTTPConnectionPool:
474
515
  """DEPRECATED: Users should move to `get_connection_with_tls_context`
475
516
  for all subclasses of HTTPAdapter using Requests>=2.32.2.
476
517
 
@@ -480,7 +521,7 @@ class HTTPAdapter(BaseAdapter):
480
521
 
481
522
  :param url: The URL to connect to.
482
523
  :param proxies: (optional) A Requests-style dictionary of proxies used on this request.
483
- :rtype: urllib3.ConnectionPool
524
+ :rtype: urllib3.HTTPConnectionPool
484
525
  """
485
526
  warnings.warn(
486
527
  (
@@ -511,7 +552,7 @@ class HTTPAdapter(BaseAdapter):
511
552
 
512
553
  return conn
513
554
 
514
- def close(self):
555
+ def close(self) -> None:
515
556
  """Disposes of any internal state.
516
557
 
517
558
  Currently, this closes the PoolManager and any active ProxyManager,
@@ -521,7 +562,9 @@ class HTTPAdapter(BaseAdapter):
521
562
  for proxy in self.proxy_manager.values():
522
563
  proxy.clear()
523
564
 
524
- def request_url(self, request, proxies):
565
+ def request_url(
566
+ self, request: PreparedRequest, proxies: dict[str, str] | None
567
+ ) -> str:
525
568
  """Obtain the url to use when making the final request.
526
569
 
527
570
  If the message is being sent through a HTTP proxy, the full URL has to
@@ -535,6 +578,8 @@ class HTTPAdapter(BaseAdapter):
535
578
  :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs.
536
579
  :rtype: str
537
580
  """
581
+ assert _is_prepared(request)
582
+
538
583
  proxy = select_proxy(request.url, proxies)
539
584
  scheme = urlparse(request.url).scheme
540
585
 
@@ -545,15 +590,13 @@ class HTTPAdapter(BaseAdapter):
545
590
  using_socks_proxy = proxy_scheme.startswith("socks")
546
591
 
547
592
  url = request.path_url
548
- if url.startswith("//"): # Don't confuse urllib3
549
- url = f"/{url.lstrip('/')}"
550
593
 
551
594
  if is_proxied_http_request and not using_socks_proxy:
552
595
  url = urldefragauth(request.url)
553
596
 
554
597
  return url
555
598
 
556
- def add_headers(self, request, **kwargs):
599
+ def add_headers(self, request: PreparedRequest, **kwargs: Any) -> None:
557
600
  """Add any headers needed by the connection. As of v2.0 this does
558
601
  nothing by default, but is left for overriding by users that subclass
559
602
  the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
@@ -567,7 +610,7 @@ class HTTPAdapter(BaseAdapter):
567
610
  """
568
611
  pass
569
612
 
570
- def proxy_headers(self, proxy):
613
+ def proxy_headers(self, proxy: str) -> dict[str, str]:
571
614
  """Returns a dictionary of the headers to add to any request sent
572
615
  through a proxy. This works with urllib3 magic to ensure that they are
573
616
  correctly sent to the proxy, rather than in a tunnelled request if
@@ -580,7 +623,7 @@ class HTTPAdapter(BaseAdapter):
580
623
  :param proxy: The url of the proxy being used for this request.
581
624
  :rtype: dict
582
625
  """
583
- headers = {}
626
+ headers: dict[str, str] = {}
584
627
  username, password = get_auth_from_url(proxy)
585
628
 
586
629
  if username:
@@ -589,8 +632,14 @@ class HTTPAdapter(BaseAdapter):
589
632
  return headers
590
633
 
591
634
  def send(
592
- self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None
593
- ):
635
+ self,
636
+ request: PreparedRequest,
637
+ stream: bool = False,
638
+ timeout: _t.TimeoutType = None,
639
+ verify: _t.VerifyType = True,
640
+ cert: _t.CertType = None,
641
+ proxies: dict[str, str] | None = None,
642
+ ) -> Response:
594
643
  """Sends PreparedRequest object. Returns Response object.
595
644
 
596
645
  :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
@@ -607,6 +656,8 @@ class HTTPAdapter(BaseAdapter):
607
656
  :rtype: requests.Response
608
657
  """
609
658
 
659
+ assert _is_prepared(request)
660
+
610
661
  try:
611
662
  conn = self.get_connection_with_tls_context(
612
663
  request, verify, proxies=proxies, cert=cert
@@ -630,29 +681,29 @@ class HTTPAdapter(BaseAdapter):
630
681
  if isinstance(timeout, tuple):
631
682
  try:
632
683
  connect, read = timeout
633
- timeout = TimeoutSauce(connect=connect, read=read)
684
+ resolved_timeout = TimeoutSauce(connect=connect, read=read)
634
685
  except ValueError:
635
686
  raise ValueError(
636
687
  f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, "
637
688
  f"or a single float to set both timeouts to the same value."
638
689
  )
639
690
  elif isinstance(timeout, TimeoutSauce):
640
- pass
691
+ resolved_timeout = timeout
641
692
  else:
642
- timeout = TimeoutSauce(connect=timeout, read=timeout)
693
+ resolved_timeout = TimeoutSauce(connect=timeout, read=timeout)
643
694
 
644
695
  try:
645
696
  resp = conn.urlopen(
646
697
  method=request.method,
647
698
  url=url,
648
- body=request.body,
649
- headers=request.headers,
699
+ body=request.body, # type: ignore[arg-type] # urllib3 stubs don't accept Iterable[bytes | str]
700
+ headers=request.headers, # type: ignore[arg-type] # urllib3#3072
650
701
  redirect=False,
651
702
  assert_same_host=False,
652
703
  preload_content=False,
653
704
  decode_content=False,
654
705
  retries=self.max_retries,
655
- timeout=timeout,
706
+ timeout=resolved_timeout,
656
707
  chunked=chunked,
657
708
  )
658
709
 
@@ -8,10 +8,22 @@ This module implements the Requests API.
8
8
  :license: Apache2, see LICENSE for more details.
9
9
  """
10
10
 
11
+ from __future__ import annotations
12
+
13
+ from typing import TYPE_CHECKING
14
+
11
15
  from . import sessions
16
+ from .models import Response
17
+
18
+ if TYPE_CHECKING:
19
+ from typing_extensions import Unpack
20
+
21
+ from . import _types as _t
12
22
 
13
23
 
14
- def request(method, url, **kwargs):
24
+ def request(
25
+ method: str, url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]
26
+ ) -> Response:
15
27
  """Constructs and sends a :class:`Request <Request>`.
16
28
 
17
29
  :param method: method for the new :class:`Request` object: ``GET``, ``OPTIONS``, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``.
@@ -59,7 +71,9 @@ def request(method, url, **kwargs):
59
71
  return session.request(method=method, url=url, **kwargs)
60
72
 
61
73
 
62
- def get(url, params=None, **kwargs):
74
+ def get(
75
+ url: _t.UriType, params: _t.ParamsType = None, **kwargs: Unpack[_t.GetKwargs]
76
+ ) -> Response:
63
77
  r"""Sends a GET request.
64
78
 
65
79
  :param url: URL for the new :class:`Request` object.
@@ -73,7 +87,7 @@ def get(url, params=None, **kwargs):
73
87
  return request("get", url, params=params, **kwargs)
74
88
 
75
89
 
76
- def options(url, **kwargs):
90
+ def options(url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) -> Response:
77
91
  r"""Sends an OPTIONS request.
78
92
 
79
93
  :param url: URL for the new :class:`Request` object.
@@ -85,7 +99,7 @@ def options(url, **kwargs):
85
99
  return request("options", url, **kwargs)
86
100
 
87
101
 
88
- def head(url, **kwargs):
102
+ def head(url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) -> Response:
89
103
  r"""Sends a HEAD request.
90
104
 
91
105
  :param url: URL for the new :class:`Request` object.
@@ -100,7 +114,12 @@ def head(url, **kwargs):
100
114
  return request("head", url, **kwargs)
101
115
 
102
116
 
103
- def post(url, data=None, json=None, **kwargs):
117
+ def post(
118
+ url: _t.UriType,
119
+ data: _t.DataType = None,
120
+ json: _t.JsonType = None,
121
+ **kwargs: Unpack[_t.PostKwargs],
122
+ ) -> Response:
104
123
  r"""Sends a POST request.
105
124
 
106
125
  :param url: URL for the new :class:`Request` object.
@@ -115,7 +134,9 @@ def post(url, data=None, json=None, **kwargs):
115
134
  return request("post", url, data=data, json=json, **kwargs)
116
135
 
117
136
 
118
- def put(url, data=None, **kwargs):
137
+ def put(
138
+ url: _t.UriType, data: _t.DataType = None, **kwargs: Unpack[_t.DataKwargs]
139
+ ) -> Response:
119
140
  r"""Sends a PUT request.
120
141
 
121
142
  :param url: URL for the new :class:`Request` object.
@@ -130,7 +151,9 @@ def put(url, data=None, **kwargs):
130
151
  return request("put", url, data=data, **kwargs)
131
152
 
132
153
 
133
- def patch(url, data=None, **kwargs):
154
+ def patch(
155
+ url: _t.UriType, data: _t.DataType = None, **kwargs: Unpack[_t.DataKwargs]
156
+ ) -> Response:
134
157
  r"""Sends a PATCH request.
135
158
 
136
159
  :param url: URL for the new :class:`Request` object.
@@ -145,7 +168,7 @@ def patch(url, data=None, **kwargs):
145
168
  return request("patch", url, data=data, **kwargs)
146
169
 
147
170
 
148
- def delete(url, **kwargs):
171
+ def delete(url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) -> Response:
149
172
  r"""Sends a DELETE request.
150
173
 
151
174
  :param url: URL for the new :class:`Request` object.