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
@@ -6,7 +6,7 @@
6
6
  #
7
7
  import logging
8
8
 
9
- __version__ = '0.4.0'
9
+ __version__ = '0.4.2'
10
10
 
11
11
 
12
12
  class DistlibException(Exception):
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2013-2017 Vinay Sajip.
3
+ # Copyright (C) 2013-2026 Vinay Sajip.
4
4
  # Licensed to the Python Software Foundation under a contributor agreement.
5
5
  # See LICENSE.txt and CONTRIBUTORS.txt.
6
6
  #
@@ -24,8 +24,8 @@ if sys.version_info[0] < 3: # pragma: no cover
24
24
  import __builtin__ as builtins
25
25
  import ConfigParser as configparser
26
26
  from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
27
- from urllib import (urlretrieve, quote as _quote, unquote, url2pathname,
28
- pathname2url, ContentTooShortError, splittype)
27
+ from urllib import (urlretrieve, quote as _quote, unquote, url2pathname, pathname2url, ContentTooShortError,
28
+ splittype)
29
29
 
30
30
  def quote(s):
31
31
  if isinstance(s, unicode):
@@ -33,8 +33,7 @@ if sys.version_info[0] < 3: # pragma: no cover
33
33
  return _quote(s)
34
34
 
35
35
  import urllib2
36
- from urllib2 import (Request, urlopen, URLError, HTTPError,
37
- HTTPBasicAuthHandler, HTTPPasswordMgr, HTTPHandler,
36
+ from urllib2 import (Request, urlopen, URLError, HTTPError, HTTPBasicAuthHandler, HTTPPasswordMgr, HTTPHandler,
38
37
  HTTPRedirectHandler, build_opener)
39
38
  if ssl:
40
39
  from urllib2 import HTTPSHandler
@@ -67,12 +66,9 @@ else: # pragma: no cover
67
66
  from io import TextIOWrapper as file_type
68
67
  import builtins
69
68
  import configparser
70
- from urllib.parse import (urlparse, urlunparse, urljoin, quote, unquote,
71
- urlsplit, urlunsplit, splittype)
72
- from urllib.request import (urlopen, urlretrieve, Request, url2pathname,
73
- pathname2url, HTTPBasicAuthHandler,
74
- HTTPPasswordMgr, HTTPHandler,
75
- HTTPRedirectHandler, build_opener)
69
+ from urllib.parse import (urlparse, urlunparse, urljoin, quote, unquote, urlsplit, urlunsplit, splittype)
70
+ from urllib.request import (urlopen, urlretrieve, Request, url2pathname, pathname2url, HTTPBasicAuthHandler,
71
+ HTTPPasswordMgr, HTTPHandler, HTTPRedirectHandler, build_opener)
76
72
  if ssl:
77
73
  from urllib.request import HTTPSHandler
78
74
  from urllib.error import HTTPError, URLError, ContentTooShortError
@@ -111,8 +107,7 @@ except ImportError: # pragma: no cover
111
107
  # than one wildcard per fragment. A survey of established
112
108
  # policy among SSL implementations showed it to be a
113
109
  # reasonable choice.
114
- raise CertificateError(
115
- "too many wildcards in certificate DNS name: " + repr(dn))
110
+ raise CertificateError('Too many wildcards in certificate DNS name: %r' % dn)
116
111
 
117
112
  # speed up common case w/o wildcards
118
113
  if not wildcards:
@@ -174,12 +169,10 @@ except ImportError: # pragma: no cover
174
169
  dnsnames.append(value)
175
170
  if len(dnsnames) > 1:
176
171
  raise CertificateError("hostname %r "
177
- "doesn't match either of %s" %
178
- (hostname, ', '.join(map(repr, dnsnames))))
172
+ "doesn't match either of %s" % (hostname, ', '.join(map(repr, dnsnames))))
179
173
  elif len(dnsnames) == 1:
180
174
  raise CertificateError("hostname %r "
181
- "doesn't match %r" %
182
- (hostname, dnsnames[0]))
175
+ "doesn't match %r" % (hostname, dnsnames[0]))
183
176
  else:
184
177
  raise CertificateError("no appropriate commonName or "
185
178
  "subjectAltName fields were found")
@@ -348,8 +341,7 @@ except AttributeError: # pragma: no cover
348
341
  elif isinstance(filename, text_type):
349
342
  return filename.encode(_fsencoding, _fserrors)
350
343
  else:
351
- raise TypeError("expect bytes or str, not %s" %
352
- type(filename).__name__)
344
+ raise TypeError("expect bytes or str, not %s" % type(filename).__name__)
353
345
 
354
346
  def fsdecode(filename):
355
347
  if isinstance(filename, text_type):
@@ -357,8 +349,7 @@ except AttributeError: # pragma: no cover
357
349
  elif isinstance(filename, bytes):
358
350
  return filename.decode(_fsencoding, _fserrors)
359
351
  else:
360
- raise TypeError("expect bytes or str, not %s" %
361
- type(filename).__name__)
352
+ raise TypeError("expect bytes or str, not %s" % type(filename).__name__)
362
353
 
363
354
 
364
355
  try:
@@ -433,18 +424,16 @@ except ImportError: # pragma: no cover
433
424
  if filename is None:
434
425
  msg = "unknown encoding: " + encoding
435
426
  else:
436
- msg = "unknown encoding for {!r}: {}".format(
437
- filename, encoding)
427
+ msg = "unknown encoding for {!r}: {}".format(filename, encoding)
438
428
  raise SyntaxError(msg)
439
429
 
440
430
  if bom_found:
441
431
  if codec.name != 'utf-8':
442
432
  # This behaviour mimics the Python interpreter
443
433
  if filename is None:
444
- msg = 'encoding problem: utf-8'
434
+ msg = 'Encoding problem: utf-8'
445
435
  else:
446
- msg = 'encoding problem for {!r}: utf-8'.format(
447
- filename)
436
+ msg = 'Encoding problem for %r: utf-8' % filename
448
437
  raise SyntaxError(msg)
449
438
  encoding += '-sig'
450
439
  return encoding
@@ -515,8 +504,7 @@ except ImportError: # pragma: no cover
515
504
  wrapper.__module__ = getattr(user_function, '__module__')
516
505
  wrapper.__doc__ = getattr(user_function, '__doc__')
517
506
  wrapper.__name__ = getattr(user_function, '__name__')
518
- wrapper.__annotations__ = getattr(user_function,
519
- '__annotations__', {})
507
+ wrapper.__annotations__ = getattr(user_function, '__annotations__', {})
520
508
  return wrapper
521
509
 
522
510
  return decorating_function
@@ -547,19 +535,16 @@ except ImportError: # pragma: no cover
547
535
  def __getitem__(self, key):
548
536
  for mapping in self.maps:
549
537
  try:
550
- return mapping[
551
- key] # can't use 'key in mapping' with defaultdict
538
+ return mapping[key] # can't use 'key in mapping' with defaultdict
552
539
  except KeyError:
553
540
  pass
554
- return self.__missing__(
555
- key) # support subclasses that define __missing__
541
+ return self.__missing__(key) # support subclasses that define __missing__
556
542
 
557
543
  def get(self, key, default=None):
558
544
  return self[key] if key in self else default
559
545
 
560
546
  def __len__(self):
561
- return len(set().union(
562
- *self.maps)) # reuses stored hash values if possible
547
+ return len(set().union(*self.maps)) # reuses stored hash values if possible
563
548
 
564
549
  def __iter__(self):
565
550
  return iter(set().union(*self.maps))
@@ -572,8 +557,7 @@ except ImportError: # pragma: no cover
572
557
 
573
558
  @_recursive_repr()
574
559
  def __repr__(self):
575
- return '{0.__class__.__name__}({1})'.format(
576
- self, ', '.join(map(repr, self.maps)))
560
+ return '{0.__class__.__name__}({1})'.format(self, ', '.join(map(repr, self.maps)))
577
561
 
578
562
  @classmethod
579
563
  def fromkeys(cls, iterable, *args):
@@ -602,8 +586,7 @@ except ImportError: # pragma: no cover
602
586
  try:
603
587
  del self.maps[0][key]
604
588
  except KeyError:
605
- raise KeyError(
606
- 'Key not found in the first mapping: {!r}'.format(key))
589
+ raise KeyError('Key not found in the first mapping: {!r}'.format(key))
607
590
 
608
591
  def popitem(self):
609
592
  'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.'
@@ -617,8 +600,7 @@ except ImportError: # pragma: no cover
617
600
  try:
618
601
  return self.maps[0].pop(key, *args)
619
602
  except KeyError:
620
- raise KeyError(
621
- 'Key not found in the first mapping: {!r}'.format(key))
603
+ raise KeyError('Key not found in the first mapping: {!r}'.format(key))
622
604
 
623
605
  def clear(self):
624
606
  'Clear maps[0], leaving maps[1:] intact.'
@@ -629,7 +611,7 @@ try:
629
611
  from importlib.util import cache_from_source # Python >= 3.4
630
612
  except ImportError: # pragma: no cover
631
613
 
632
- def cache_from_source(path, debug_override=None):
614
+ def cache_from_source(path, debug_override=None, optimization=None):
633
615
  assert path.endswith('.py')
634
616
  if debug_override is None:
635
617
  debug_override = __debug__
@@ -676,8 +658,7 @@ except ImportError: # pragma: no cover
676
658
 
677
659
  '''
678
660
  if len(args) > 1:
679
- raise TypeError('expected at most 1 arguments, got %d' %
680
- len(args))
661
+ raise TypeError('expected at most 1 arguments, got %d' % len(args))
681
662
  try:
682
663
  self.__root
683
664
  except AttributeError:
@@ -885,8 +866,7 @@ except ImportError: # pragma: no cover
885
866
 
886
867
  '''
887
868
  if isinstance(other, OrderedDict):
888
- return len(self) == len(
889
- other) and self.items() == other.items()
869
+ return len(self) == len(other) and self.items() == other.items()
890
870
  return dict.__eq__(self, other)
891
871
 
892
872
  def __ne__(self, other):
@@ -936,8 +916,7 @@ except ImportError: # pragma: no cover
936
916
  # If the converted value is different, save for next time
937
917
  if value is not result:
938
918
  self[key] = result
939
- if type(result) in (ConvertingDict, ConvertingList,
940
- ConvertingTuple):
919
+ if type(result) in (ConvertingDict, ConvertingList, ConvertingTuple):
941
920
  result.parent = self
942
921
  result.key = key
943
922
  return result
@@ -948,8 +927,7 @@ except ImportError: # pragma: no cover
948
927
  # If the converted value is different, save for next time
949
928
  if value is not result:
950
929
  self[key] = result
951
- if type(result) in (ConvertingDict, ConvertingList,
952
- ConvertingTuple):
930
+ if type(result) in (ConvertingDict, ConvertingList, ConvertingTuple):
953
931
  result.parent = self
954
932
  result.key = key
955
933
  return result
@@ -958,8 +936,7 @@ except ImportError: # pragma: no cover
958
936
  value = dict.pop(self, key, default)
959
937
  result = self.configurator.convert(value)
960
938
  if value is not result:
961
- if type(result) in (ConvertingDict, ConvertingList,
962
- ConvertingTuple):
939
+ if type(result) in (ConvertingDict, ConvertingList, ConvertingTuple):
963
940
  result.parent = self
964
941
  result.key = key
965
942
  return result
@@ -973,8 +950,7 @@ except ImportError: # pragma: no cover
973
950
  # If the converted value is different, save for next time
974
951
  if value is not result:
975
952
  self[key] = result
976
- if type(result) in (ConvertingDict, ConvertingList,
977
- ConvertingTuple):
953
+ if type(result) in (ConvertingDict, ConvertingList, ConvertingTuple):
978
954
  result.parent = self
979
955
  result.key = key
980
956
  return result
@@ -983,8 +959,7 @@ except ImportError: # pragma: no cover
983
959
  value = list.pop(self, idx)
984
960
  result = self.configurator.convert(value)
985
961
  if value is not result:
986
- if type(result) in (ConvertingDict, ConvertingList,
987
- ConvertingTuple):
962
+ if type(result) in (ConvertingDict, ConvertingList, ConvertingTuple):
988
963
  result.parent = self
989
964
  return result
990
965
 
@@ -995,8 +970,7 @@ except ImportError: # pragma: no cover
995
970
  value = tuple.__getitem__(self, key)
996
971
  result = self.configurator.convert(value)
997
972
  if value is not result:
998
- if type(result) in (ConvertingDict, ConvertingList,
999
- ConvertingTuple):
973
+ if type(result) in (ConvertingDict, ConvertingList, ConvertingTuple):
1000
974
  result.parent = self
1001
975
  result.key = key
1002
976
  return result
@@ -1073,9 +1047,7 @@ except ImportError: # pragma: no cover
1073
1047
  d = d[idx]
1074
1048
  else:
1075
1049
  try:
1076
- n = int(
1077
- idx
1078
- ) # try as number first (most likely)
1050
+ n = int(idx) # try as number first (most likely)
1079
1051
  d = d[n]
1080
1052
  except TypeError:
1081
1053
  d = d[idx]
@@ -1093,12 +1065,10 @@ except ImportError: # pragma: no cover
1093
1065
  replaced by their converting alternatives. Strings are checked to
1094
1066
  see if they have a conversion format and are converted if they do.
1095
1067
  """
1096
- if not isinstance(value, ConvertingDict) and isinstance(
1097
- value, dict):
1068
+ if not isinstance(value, ConvertingDict) and isinstance(value, dict):
1098
1069
  value = ConvertingDict(value)
1099
1070
  value.configurator = self
1100
- elif not isinstance(value, ConvertingList) and isinstance(
1101
- value, list):
1071
+ elif not isinstance(value, ConvertingList) and isinstance(value, list):
1102
1072
  value = ConvertingList(value)
1103
1073
  value.configurator = self
1104
1074
  elif not isinstance(value, ConvertingTuple) and isinstance(value, tuple):
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2013-2017 Vinay Sajip.
3
+ # Copyright (C) 2013-2026 Vinay Sajip.
4
4
  # Licensed to the Python Software Foundation under a contributor agreement.
5
5
  # See LICENSE.txt and CONTRIBUTORS.txt.
6
6
  #
@@ -20,11 +20,11 @@ from .util import cached_property, get_cache_base, Cache
20
20
 
21
21
  logger = logging.getLogger(__name__)
22
22
 
23
-
24
- cache = None # created when needed
23
+ cache = None # created when needed
25
24
 
26
25
 
27
26
  class ResourceCache(Cache):
27
+
28
28
  def __init__(self, base=None):
29
29
  if base is None:
30
30
  # Use native string to avoid issues on 2.x: see Python #20140.
@@ -69,6 +69,7 @@ class ResourceCache(Cache):
69
69
 
70
70
 
71
71
  class ResourceBase(object):
72
+
72
73
  def __init__(self, finder, name):
73
74
  self.finder = finder
74
75
  self.name = name
@@ -80,7 +81,7 @@ class Resource(ResourceBase):
80
81
  not normally instantiated by user code, but rather by a
81
82
  :class:`ResourceFinder` which manages the resource.
82
83
  """
83
- is_container = False # Backwards compatibility
84
+ is_container = False # Backwards compatibility
84
85
 
85
86
  def as_stream(self):
86
87
  """
@@ -108,7 +109,7 @@ class Resource(ResourceBase):
108
109
 
109
110
 
110
111
  class ResourceContainer(ResourceBase):
111
- is_container = True # Backwards compatibility
112
+ is_container = True # Backwards compatibility
112
113
 
113
114
  @cached_property
114
115
  def resources(self):
@@ -133,17 +134,31 @@ class ResourceFinder(object):
133
134
  def _adjust_path(self, path):
134
135
  return os.path.realpath(path)
135
136
 
137
+ def _is_in_base(self, path):
138
+ base = self._adjust_path(self.base)
139
+ if path == base:
140
+ return True
141
+ if not base.endswith(os.sep):
142
+ base = base + os.sep
143
+ return path.startswith(base)
144
+
136
145
  def _make_path(self, resource_name):
137
146
  # Issue #50: need to preserve type of path on Python 2.x
138
147
  # like os.path._get_sep
139
- if isinstance(resource_name, bytes): # should only happen on 2.x
148
+ if isinstance(resource_name, bytes): # should only happen on 2.x
140
149
  sep = b'/'
141
150
  else:
142
151
  sep = '/'
143
152
  parts = resource_name.split(sep)
144
153
  parts.insert(0, self.base)
145
154
  result = os.path.join(*parts)
146
- return self._adjust_path(result)
155
+ result = self._adjust_path(result)
156
+ # Confine the resolved resource to the package base so a resource
157
+ # name containing '..' cannot read files outside the package.
158
+ if not self._is_in_base(result):
159
+ raise DistlibException('Resource name escapes package: '
160
+ '%r' % resource_name)
161
+ return result
147
162
 
148
163
  def _find(self, path):
149
164
  return os.path.exists(path)
@@ -174,9 +189,10 @@ class ResourceFinder(object):
174
189
  return os.path.getsize(resource.path)
175
190
 
176
191
  def get_resources(self, resource):
192
+
177
193
  def allowed(f):
178
- return (f != '__pycache__' and not
179
- f.endswith(self.skipped_extensions))
194
+ return (f != '__pycache__' and not f.endswith(self.skipped_extensions))
195
+
180
196
  return set([f for f in os.listdir(resource.path) if allowed(f)])
181
197
 
182
198
  def is_container(self, resource):
@@ -209,6 +225,7 @@ class ZipResourceFinder(ResourceFinder):
209
225
  """
210
226
  Resource finder for resources in .zip files.
211
227
  """
228
+
212
229
  def __init__(self, module):
213
230
  super(ZipResourceFinder, self).__init__(module)
214
231
  archive = self.loader.archive
@@ -267,7 +284,7 @@ class ZipResourceFinder(ResourceFinder):
267
284
  if not self.index[i].startswith(path):
268
285
  break
269
286
  s = self.index[i][plen:]
270
- result.add(s.split(os.sep, 1)[0]) # only immediate children
287
+ result.add(s.split(os.sep, 1)[0]) # only immediate children
271
288
  i += 1
272
289
  return result
273
290
 
@@ -283,10 +300,7 @@ class ZipResourceFinder(ResourceFinder):
283
300
  return result
284
301
 
285
302
 
286
- _finder_registry = {
287
- type(None): ResourceFinder,
288
- zipimport.zipimporter: ZipResourceFinder
289
- }
303
+ _finder_registry = {type(None): ResourceFinder, zipimport.zipimporter: ZipResourceFinder}
290
304
 
291
305
  try:
292
306
  # In Python 3.6, _frozen_importlib -> _frozen_importlib_external
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2013-2023 Vinay Sajip.
3
+ # Copyright (C) 2013-2026 Vinay Sajip.
4
4
  # Licensed to the Python Software Foundation under a contributor agreement.
5
5
  # See LICENSE.txt and CONTRIBUTORS.txt.
6
6
  #
@@ -13,9 +13,11 @@ import sys
13
13
  import time
14
14
  from zipfile import ZipInfo
15
15
 
16
+ from . import DistlibException
16
17
  from .compat import sysconfig, detect_encoding, ZipFile
17
18
  from .resources import finder
18
- from .util import (FileOperator, get_export_entry, convert_path, get_executable, get_platform, in_venv)
19
+ from .util import (FileOperator, get_export_entry, convert_path, get_executable, get_platform, in_venv,
20
+ is_in_directory)
19
21
 
20
22
  logger = logging.getLogger(__name__)
21
23
 
@@ -277,7 +279,9 @@ class ScriptMaker(object):
277
279
  zip_data = stream.getvalue()
278
280
  script_bytes = launcher + shebang + zip_data
279
281
  for name in names:
280
- outname = os.path.join(self.target_dir, name)
282
+ outname = os.path.abspath(os.path.join(self.target_dir, name))
283
+ if not is_in_directory(outname, self.target_dir):
284
+ raise DistlibException('Attempt to escape script directory')
281
285
  if use_launcher: # pragma: no cover
282
286
  n, e = os.path.splitext(outname)
283
287
  if e.startswith('.py'):
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (C) 2012-2023 The Python Software Foundation.
2
+ # Copyright (C) 2012-2026 The Python Software Foundation.
3
3
  # See LICENSE.txt and CONTRIBUTORS.txt.
4
4
  #
5
5
  import codecs
@@ -589,7 +589,11 @@ class FileOperator(object):
589
589
  self.dirs_created.add(path)
590
590
 
591
591
  def byte_compile(self, path, optimize=False, force=False, prefix=None, hashed_invalidation=False):
592
- dpath = cache_from_source(path, not optimize)
592
+ if not optimize:
593
+ optimization = ''
594
+ else:
595
+ optimization = '1'
596
+ dpath = cache_from_source(path, optimization=optimization)
593
597
  logger.info('Byte-compiling %s to %s', path, dpath)
594
598
  if not self.dry_run:
595
599
  if force or self.newer(path, dpath):
@@ -703,8 +707,8 @@ class ExportEntry(object):
703
707
  if not isinstance(other, ExportEntry):
704
708
  result = False
705
709
  else:
706
- result = (self.name == other.name and self.prefix == other.prefix and self.suffix == other.suffix and
707
- self.flags == other.flags)
710
+ result = (self.name == other.name and self.prefix == other.prefix and self.suffix == other.suffix
711
+ and self.flags == other.flags)
708
712
  return result
709
713
 
710
714
  __hash__ = object.__hash__
@@ -1223,13 +1227,31 @@ ARCHIVE_EXTENSIONS = ('.tar.gz', '.tar.bz2', '.tar', '.zip', '.tgz', '.tbz', '.w
1223
1227
 
1224
1228
  def unarchive(archive_filename, dest_dir, format=None, check=True):
1225
1229
 
1226
- def check_path(path):
1230
+ def check_path(path, base=None):
1227
1231
  if not isinstance(path, text_type):
1228
1232
  path = path.decode('utf-8')
1229
- p = os.path.abspath(os.path.join(dest_dir, path))
1233
+ if base is None:
1234
+ base = dest_dir
1235
+ p = os.path.abspath(os.path.join(base, path))
1230
1236
  if not p.startswith(dest_dir) or p[plen] != os.sep:
1231
1237
  raise ValueError('path outside destination: %r' % p)
1232
1238
 
1239
+ def check_link(member):
1240
+ # A symlink/hardlink member's name is validated like any other
1241
+ # member, but its target (linkname) is not covered by extractall's
1242
+ # name-based handling. An unchecked target lets a later member be
1243
+ # written through the link to a location outside dest_dir. Validate
1244
+ # the resolved target stays within dest_dir. Symlink targets are
1245
+ # relative to the member's own directory; hardlink targets are
1246
+ # relative to the archive root (i.e. dest_dir).
1247
+ if not (member.issym() or member.islnk()):
1248
+ return
1249
+ if member.issym():
1250
+ link_base = os.path.dirname(os.path.join(dest_dir, member.name))
1251
+ else:
1252
+ link_base = dest_dir
1253
+ check_path(member.linkname, base=link_base)
1254
+
1233
1255
  dest_dir = os.path.abspath(dest_dir)
1234
1256
  plen = len(dest_dir)
1235
1257
  archive = None
@@ -1257,9 +1279,9 @@ def unarchive(archive_filename, dest_dir, format=None, check=True):
1257
1279
  else:
1258
1280
  archive = tarfile.open(archive_filename, mode)
1259
1281
  if check:
1260
- names = archive.getnames()
1261
- for name in names:
1262
- check_path(name)
1282
+ for member in archive.getmembers():
1283
+ check_path(member.name)
1284
+ check_link(member)
1263
1285
  if format != 'zip' and sys.version_info[0] < 3:
1264
1286
  # See Python issue 17153. If the dest path contains Unicode,
1265
1287
  # tarfile extraction fails on Python 2.x if a member path name
@@ -1455,6 +1477,7 @@ if ssl:
1455
1477
  # HTTPSConnection which verifies certificates/matches domains
1456
1478
  #
1457
1479
 
1480
+
1458
1481
  class HTTPSConnection(httplib.HTTPSConnection):
1459
1482
  ca_certs = None # set this to the path to the certs file (.pem)
1460
1483
  check_domain = True # only used if ca_certs is not None
@@ -1776,8 +1799,13 @@ class SubprocessMixin(object):
1776
1799
 
1777
1800
  def normalize_name(name):
1778
1801
  """Normalize a python package name a la PEP 503"""
1779
- # https://www.python.org/dev/peps/pep-0503/#normalized-names
1780
- return re.sub('[-_.]+', '-', name).lower()
1802
+ # https://peps.python.org/pep-0503/#normalized-names
1803
+ # Emulates re.sub(r"[-_.]+", "-", name).lower()
1804
+ # Much faster than re, and even faster than str.translate
1805
+ value = name.lower().replace("_", "-").replace(".", "-")
1806
+ while "--" in value:
1807
+ value = value.replace("--", "-")
1808
+ return value
1781
1809
 
1782
1810
 
1783
1811
  # def _get_pypirc_command():
@@ -1982,3 +2010,12 @@ def get_platform():
1982
2010
  if cross_compilation_target not in _TARGET_TO_PLAT:
1983
2011
  return get_host_platform()
1984
2012
  return _TARGET_TO_PLAT[cross_compilation_target]
2013
+
2014
+
2015
+ def is_in_directory(path, target):
2016
+ """
2017
+ Check if a path is inside a target directory. This doesn't check case (might be an issue on Windows)
2018
+ """
2019
+ path = os.path.abspath(path)
2020
+ target = os.path.abspath(target)
2021
+ return path == target or path.startswith(target + os.sep)
@@ -1,6 +1,6 @@
1
1
  BSD 3-Clause License
2
2
 
3
- Copyright (c) 2013-2025, Kim Davies and contributors.
3
+ Copyright (c) 2013-2026, Kim Davies and contributors.
4
4
  All rights reserved.
5
5
 
6
6
  Redistribution and use in source and binary forms, with or without
@@ -0,0 +1,6 @@
1
+ import sys
2
+
3
+ from .cli import main
4
+
5
+ if __name__ == "__main__":
6
+ sys.exit(main())