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.
- package/BINARY-INVENTORY.json +813 -813
- package/CHANGELOG.md +14 -0
- package/dist/ai/models.d.ts +10 -6
- package/dist/ai/models.generated.d.ts +72 -0
- package/dist/ai/models.generated.js +33 -0
- package/dist/ai/models.js +36 -13
- package/dist/ai/providers/anthropic.d.ts +4 -2
- package/dist/ai/providers/anthropic.js +59 -29
- package/dist/ai/providers/azure-openai-responses.d.ts +2 -1
- package/dist/ai/providers/azure-openai-responses.js +4 -20
- package/dist/ai/providers/google-vertex.d.ts +8 -2
- package/dist/ai/providers/google-vertex.js +66 -54
- package/dist/ai/providers/google.js +15 -48
- package/dist/ai/providers/openai-completions.d.ts +4 -1
- package/dist/ai/providers/openai-completions.js +26 -10
- package/dist/ai/providers/openai-reasoning.d.ts +5 -0
- package/dist/ai/providers/openai-reasoning.js +13 -0
- package/dist/ai/providers/openai-responses-shared.js +1 -1
- package/dist/ai/providers/openai-responses.d.ts +6 -2
- package/dist/ai/providers/openai-responses.js +28 -23
- package/dist/ai/providers/simple-options.d.ts +2 -3
- package/dist/ai/providers/simple-options.js +4 -6
- package/dist/ai/types.d.ts +19 -2
- package/dist/app/agent-session-runtime-adapter.js +7 -6
- package/dist/app/agent-session.d.ts +0 -15
- package/dist/app/agent-session.js +0 -37
- package/dist/app/approvals/approval-errors.d.ts +15 -0
- package/dist/app/approvals/approval-errors.js +14 -0
- package/dist/app/approvals/runtime-approval-gates.d.ts +1 -2
- package/dist/app/approvals/tool-approval.d.ts +1 -0
- package/dist/app/approvals/tool-approval.js +11 -23
- package/dist/app/approvals/types.d.ts +0 -14
- package/dist/app/approvals/types.js +0 -2
- package/dist/app/background/tool-summaries.js +0 -2
- package/dist/app/extensions/slash-commands.js +1 -3
- package/dist/app/local/tools/execute-code/executor.d.ts +1 -1
- package/dist/app/local/tools/execute-code/executor.js +20 -10
- package/dist/app/local/tools/execute-code/tool.js +21 -2
- package/dist/app/modes/action/agent.js +4 -5
- package/dist/app/modes/ask/agent.js +4 -6
- package/dist/app/modes/index.js +20 -10
- package/dist/app/modes/installation/agent.js +4 -5
- package/dist/app/modes/manage/agent.js +3 -4
- package/dist/app/modes/manage/prompt.js +1 -2
- package/dist/app/modes/metadata.d.ts +31 -0
- package/dist/app/modes/metadata.js +35 -0
- package/dist/app/modes/plan/agent.js +5 -8
- package/dist/app/modes/plan/prompt.js +3 -3
- package/dist/app/permissions/runtime-approval-flow.d.ts +1 -5
- package/dist/app/permissions/runtime-approval-flow.js +0 -28
- package/dist/app/permissions/tool-gates.d.ts +2 -3
- package/dist/app/permissions/tool-gates.js +3 -81
- package/dist/app/prompts/com-api.js +1 -1
- package/dist/app/prompts/shared-guidelines.js +7 -3
- package/dist/app/providers/google-vertex-gateway.js +4 -51
- package/dist/app/providers/model-registry.d.ts +1 -0
- package/dist/app/providers/model-registry.js +39 -0
- package/dist/app/providers/model-resolver.js +10 -7
- package/dist/app/providers/register-shortcut-provider.js +6 -6
- package/dist/app/providers/shortcut-api-v2-transport.js +4 -0
- package/dist/app/providers/shortcut-llm-proxy-client.d.ts +2 -2
- package/dist/app/providers/shortcut-llm-proxy-client.js +1 -0
- package/dist/app/resources/package-manager.js +2 -123
- package/dist/app/resources/resource-patterns.d.ts +9 -0
- package/dist/app/resources/resource-patterns.js +120 -0
- package/dist/app/session/forked-agent.d.ts +2 -2
- package/dist/app/session/model-manager.js +3 -2
- package/dist/app/session/session-lifecycle.js +3 -2
- package/dist/app/session/session-models.d.ts +2 -0
- package/dist/app/session/session-models.js +14 -6
- package/dist/app/settings-manager.d.ts +3 -3
- package/dist/app/shared/tools/execute-code/mog.d.ts +3 -1
- package/dist/app/shared/tools/execute-code/mog.js +18 -2
- package/dist/app/tools/bash.js +3 -3
- package/dist/app/tools/execute-code/index.d.ts +1 -0
- package/dist/app/tools/execute-code/index.js +3 -1
- package/dist/app/tools/find-ignore-files.d.ts +3 -0
- package/dist/app/tools/find-ignore-files.js +33 -0
- package/dist/app/tools/find.js +2 -21
- package/dist/app/tools/llm-analysis.js +0 -2
- package/dist/app/tools/refresh-context.d.ts +1 -1
- package/dist/app/tools/session-settings/update-session-settings.js +2 -2
- package/dist/app/tools/switch-mode.js +2 -2
- package/dist/app/tools/take-screenshot.js +0 -2
- package/dist/app/tools/task/runner.js +1 -2
- package/dist/app/tools/task/task.d.ts +1 -3
- package/dist/app/tools/task/task.js +20 -40
- package/dist/app/tools/web-search.js +12 -2
- package/dist/autocomplete/core.d.ts +33 -0
- package/dist/autocomplete/core.js +113 -0
- package/dist/{tui → autocomplete}/fuzzy.d.ts +0 -1
- package/dist/{tui → autocomplete}/fuzzy.js +0 -1
- package/dist/{tui/autocomplete.d.ts → autocomplete/index.d.ts} +0 -1
- package/dist/{tui/autocomplete.js → autocomplete/index.js} +62 -158
- package/dist/cli/args.js +1 -1
- package/dist/cli/list-models.js +1 -1
- package/dist/cli.js +26227 -30480
- package/dist/constants.d.ts +0 -2
- package/dist/constants.js +0 -3
- package/dist/contracts/agent-session-store.d.ts +1 -1
- package/dist/contracts/agent-settings.d.ts +1 -0
- package/dist/contracts/agent-settings.js +2 -1
- package/dist/contracts/model-call.d.ts +1 -2
- package/dist/contracts/model-call.js +1 -2
- package/dist/contracts/model-stream.d.ts +1 -0
- package/dist/contracts/model-stream.js +1 -0
- package/dist/contracts/wire.d.ts +10 -7
- package/dist/contracts/wire.js +8 -0
- package/dist/core/agent-engine.js +1 -1
- package/dist/core/core-types.d.ts +1 -21
- package/dist/core/defaults.d.ts +1 -1
- package/dist/core/defaults.js +9 -1
- package/dist/core/prompts/agent-guidelines.d.ts +4 -5
- package/dist/core/prompts/agent-guidelines.js +28 -42
- package/dist/core/session-schema.d.ts +1 -1
- package/dist/embedded-agent/ai-invoke.d.ts +1 -2
- package/dist/embedded-agent/ai-invoke.js +2 -70
- package/dist/embedded-agent/anthropic-messages-transport.d.ts +4 -20
- package/dist/embedded-agent/anthropic-messages-transport.js +23 -786
- package/dist/embedded-agent/bootstrap.js +2 -2
- package/dist/embedded-agent/compose.js +8 -7
- package/dist/embedded-agent/gateway-base-url.d.ts +3 -0
- package/dist/embedded-agent/gateway-base-url.js +35 -0
- package/dist/embedded-agent/google-vertex-transport.d.ts +2 -11
- package/dist/embedded-agent/google-vertex-transport.js +20 -117
- package/dist/embedded-agent/host-runtime-options.d.ts +0 -8
- package/dist/embedded-agent/host-runtime-options.js +10 -2
- package/dist/embedded-agent/host-tools/invoke-llm/contract.d.ts +2 -2
- package/dist/embedded-agent/host-tools/invoke-llm/contract.js +4 -2
- package/dist/embedded-agent/host-tools/sandbox-llm/contract.d.ts +8 -3
- package/dist/embedded-agent/host-tools/sandbox-llm/contract.js +12 -8
- package/dist/embedded-agent/host-tools/sandbox-llm/index.d.ts +1 -1
- package/dist/embedded-agent/host-tools/sandbox-llm/index.js +1 -1
- package/dist/embedded-agent/host-tools/shared/index.d.ts +1 -1
- package/dist/embedded-agent/host-tools/shared/index.js +1 -1
- package/dist/embedded-agent/host-tools/shared/llm-stream-error.d.ts +7 -0
- package/dist/embedded-agent/host-tools/shared/llm-stream-error.js +10 -0
- package/dist/embedded-agent/host-tools/take-screenshot/contract.d.ts +0 -2
- package/dist/embedded-agent/host-tools/take-screenshot/contract.js +1 -3
- package/dist/embedded-agent/host-tools/take-screenshot/index.d.ts +1 -1
- package/dist/embedded-agent/host-tools/take-screenshot/index.js +1 -1
- package/dist/embedded-agent/host-tools/task/agents/clone.js +1 -2
- package/dist/embedded-agent/host-tools/task/contract.js +1 -1
- package/dist/embedded-agent/index.d.ts +3 -4
- package/dist/embedded-agent/index.js +2 -3
- package/dist/embedded-agent/model-selection.d.ts +0 -6
- package/dist/embedded-agent/model-selection.js +15 -8
- package/dist/embedded-agent/openai-completions-transport.d.ts +2 -11
- package/dist/embedded-agent/openai-completions-transport.js +20 -120
- package/dist/embedded-agent/openai-responses-transport.d.ts +2 -11
- package/dist/embedded-agent/openai-responses-transport.js +15 -170
- package/dist/embedded-agent/prompt/build.js +1 -2
- package/dist/embedded-agent/prompt/sections.d.ts +1 -1
- package/dist/embedded-agent/prompt/sections.js +2 -0
- package/dist/embedded-agent/provider-native-request.d.ts +29 -0
- package/dist/embedded-agent/provider-native-request.js +65 -0
- package/dist/embedded-agent/run-stats.d.ts +1 -1
- package/dist/embedded-agent/stream.d.ts +10 -96
- package/dist/embedded-agent/stream.js +31 -556
- package/dist/embedded-agent/suggestions.d.ts +1 -1
- package/dist/embedded-agent/suggestions.js +1 -1
- package/dist/embedded-agent/worker-bridge/host-client.d.ts +7 -0
- package/dist/embedded-agent/worker-bridge/host-client.js +15 -0
- package/dist/embedded-agent/worker-bridge/worker-port.js +17 -1
- package/dist/main.js +18 -14
- package/dist/rpc/index.d.ts +1 -1
- package/dist/rpc/rpc-approval-gates.js +1 -2
- package/dist/rpc/rpc-host.d.ts +4 -0
- package/dist/rpc/rpc-host.js +13 -24
- package/dist/rpc/rpc-types.d.ts +6 -17
- package/dist/shared/platform/open.d.ts +4 -1
- package/dist/shared/platform/open.js +14 -2
- package/dist/shell/approvals/runtime-approval-gates.js +1 -3
- package/dist/shell/components/selectors/model-selector.js +2 -1
- package/dist/shell/components/selectors/session-selector-search.js +1 -1
- package/dist/shell/components/selectors/thinking-selector.js +7 -6
- package/dist/shell/index.d.ts +0 -1
- package/dist/shell/index.js +0 -1
- package/dist/shell/interactive/interactive-mode-options.d.ts +10 -0
- package/dist/shell/interactive/interactive-mode.d.ts +6 -12
- package/dist/shell/interactive/interactive-mode.js +39 -158
- package/dist/shell/interactive/slash-commands.d.ts +0 -34
- package/dist/shell/interactive/slash-commands.js +0 -2
- package/dist/shell/links/local-file-link-input.d.ts +15 -0
- package/dist/shell/links/local-file-link-input.js +38 -0
- package/dist/shell/links/local-file-link.d.ts +7 -0
- package/dist/shell/links/local-file-link.js +35 -0
- package/dist/shell/links/local-file-opener.d.ts +16 -0
- package/dist/shell/links/local-file-opener.js +90 -0
- package/dist/shell/session-client.d.ts +0 -1
- package/dist/shell/session-client.js +0 -6
- package/dist/shell/status/update-check-scheduler.d.ts +30 -0
- package/dist/shell/status/update-check-scheduler.js +71 -0
- package/dist/shell/status/update-reminder-controller.d.ts +22 -0
- package/dist/shell/status/update-reminder-controller.js +40 -0
- package/dist/shell/status/update-reminder.d.ts +6 -0
- package/dist/shell/status/update-reminder.js +4 -0
- package/dist/shell/theme/dark.json +1 -2
- package/dist/shell/theme/light.json +1 -2
- package/dist/shell/theme/runtime.d.ts +2 -3
- package/dist/shell/theme/runtime.js +2 -6
- package/dist/shell/theme/theme-schema.json +1 -6
- package/dist/shortcut-model-catalog.d.ts +7 -2
- package/dist/shortcut-model-catalog.js +134 -10
- package/dist/startup/update-manager.d.ts +6 -6
- package/dist/startup/update-manager.js +23 -38
- package/dist/startup/update-prompt.d.ts +1 -0
- package/dist/startup/update-prompt.js +2 -2
- package/dist/tui/components/editor.d.ts +1 -1
- package/dist/tui/components/editor.js +1 -1
- package/dist/tui/components/markdown.js +15 -6
- package/dist/tui/components/settings-list.js +1 -1
- package/dist/tui/editor-component.d.ts +1 -1
- package/dist/tui/index.d.ts +7 -8
- package/dist/tui/index.js +7 -6
- package/dist/tui/tui.d.ts +2 -0
- package/dist/tui/tui.js +16 -1
- package/dist/tui/utils.d.ts +7 -0
- package/dist/tui/utils.js +58 -8
- package/native-app/main/index.js +3200 -48
- package/native-app/main/{photon_rs-SoVDgheu.js → photon_rs-XkYyYTVA.js} +2 -2
- package/native-app/package.json +1 -1
- package/native-app/preload/index.cjs +2 -0
- package/native-app/renderer/assets/{index-CFc-oZuS.js → index-B4jz6epR.js} +825 -155
- package/native-app/renderer/assets/{index-OhGE0UY4.css → index-C__g36ft.css} +412 -162
- package/native-app/renderer/assets/shortcutagent-DxFsGSkw.png +0 -0
- package/native-app/renderer/index.html +2 -2
- package/package.json +17 -3
- package/skills/add-custom-model/SKILL.md +52 -0
- package/user-docs/dist/index.html +1 -1
- package/user-docs/dist/shortcutxl-docs.pdf +0 -0
- package/xll/ShortcutXL.xll +0 -0
- package/xll/modules/shortcut_xl/_managed.py +26 -7
- package/xll/modules/shortcut_xl/_tracking.py +141 -251
- package/xll/modules/shortcut_xl/api/__init__.py +60 -0
- package/xll/modules/shortcut_xl/api/workbook.py +9 -1
- package/xll/modules/shortcut_xl/api/worksheet.py +4 -1
- package/xll/python/Lib/site-packages/httpx-0.28.1.dist-info/RECORD +1 -1
- package/xll/python/Lib/site-packages/idna-3.18.dist-info/RECORD +1 -1
- package/xll/python/Lib/site-packages/pip/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/build_env/__init__.py +25 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/base.py +103 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/installer.py +333 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/noop.py +42 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/venv.py +145 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/virtual.py +139 -0
- package/xll/python/Lib/site-packages/pip/_internal/cache.py +4 -1
- package/xll/python/Lib/site-packages/pip/_internal/cli/autocompletion.py +4 -1
- package/xll/python/Lib/site-packages/pip/_internal/cli/base_command.py +11 -14
- package/xll/python/Lib/site-packages/pip/_internal/cli/cmdoptions.py +133 -22
- package/xll/python/Lib/site-packages/pip/_internal/cli/index_command.py +11 -6
- package/xll/python/Lib/site-packages/pip/_internal/cli/main.py +2 -1
- package/xll/python/Lib/site-packages/pip/_internal/cli/main_parser.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/cli/parser.py +10 -2
- package/xll/python/Lib/site-packages/pip/_internal/cli/progress_bars.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/cli/req_command.py +57 -25
- package/xll/python/Lib/site-packages/pip/_internal/cli/status_codes.py +1 -0
- package/xll/python/Lib/site-packages/pip/_internal/commands/cache.py +7 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/configuration.py +2 -1
- package/xll/python/Lib/site-packages/pip/_internal/commands/debug.py +4 -5
- package/xll/python/Lib/site-packages/pip/_internal/commands/download.py +4 -0
- package/xll/python/Lib/site-packages/pip/_internal/commands/freeze.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/commands/index.py +10 -3
- package/xll/python/Lib/site-packages/pip/_internal/commands/inspect.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/commands/install.py +6 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/list.py +11 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/lock.py +4 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/show.py +14 -8
- package/xll/python/Lib/site-packages/pip/_internal/commands/wheel.py +7 -1
- package/xll/python/Lib/site-packages/pip/_internal/configuration.py +2 -3
- package/xll/python/Lib/site-packages/pip/_internal/distributions/base.py +5 -3
- package/xll/python/Lib/site-packages/pip/_internal/distributions/installed.py +3 -2
- package/xll/python/Lib/site-packages/pip/_internal/distributions/sdist.py +45 -20
- package/xll/python/Lib/site-packages/pip/_internal/distributions/wheel.py +3 -2
- package/xll/python/Lib/site-packages/pip/_internal/exceptions.py +174 -0
- package/xll/python/Lib/site-packages/pip/_internal/index/collector.py +70 -48
- package/xll/python/Lib/site-packages/pip/_internal/index/package_finder.py +46 -7
- package/xll/python/Lib/site-packages/pip/_internal/index/sources.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/locations/_sysconfig.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/locations/base.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/metadata/base.py +10 -5
- package/xll/python/Lib/site-packages/pip/_internal/metadata/importlib/_dists.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/metadata/importlib/_envs.py +8 -3
- package/xll/python/Lib/site-packages/pip/_internal/models/candidate.py +5 -1
- package/xll/python/Lib/site-packages/pip/_internal/models/link.py +53 -13
- package/xll/python/Lib/site-packages/pip/_internal/network/auth.py +38 -21
- package/xll/python/Lib/site-packages/pip/_internal/network/cache.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/network/download.py +58 -11
- package/xll/python/Lib/site-packages/pip/_internal/network/session.py +35 -40
- package/xll/python/Lib/site-packages/pip/_internal/network/utils.py +109 -1
- package/xll/python/Lib/site-packages/pip/_internal/operations/check.py +2 -3
- package/xll/python/Lib/site-packages/pip/_internal/operations/install/wheel.py +23 -18
- package/xll/python/Lib/site-packages/pip/_internal/operations/prepare.py +152 -7
- package/xll/python/Lib/site-packages/pip/_internal/req/__init__.py +2 -0
- package/xll/python/Lib/site-packages/pip/_internal/req/constructors.py +54 -69
- package/xll/python/Lib/site-packages/pip/_internal/req/req_file.py +6 -6
- package/xll/python/Lib/site-packages/pip/_internal/req/req_install.py +25 -21
- package/xll/python/Lib/site-packages/pip/_internal/req/req_uninstall.py +13 -8
- package/xll/python/Lib/site-packages/pip/_internal/resolution/base.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +0 -1
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +39 -52
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +3 -3
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +3 -0
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +9 -0
- package/xll/python/Lib/site-packages/pip/_internal/utils/compat.py +15 -9
- package/xll/python/Lib/site-packages/pip/_internal/utils/deprecation.py +6 -1
- package/xll/python/Lib/site-packages/pip/_internal/utils/filesystem.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/logging.py +11 -3
- package/xll/python/Lib/site-packages/pip/_internal/utils/misc.py +48 -4
- package/xll/python/Lib/site-packages/pip/_internal/utils/pylock.py +18 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/retry.py +2 -1
- package/xll/python/Lib/site-packages/pip/_internal/utils/subprocess.py +4 -3
- package/xll/python/Lib/site-packages/pip/_internal/utils/temp_dir.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/unpacking.py +30 -4
- package/xll/python/Lib/site-packages/pip/_internal/utils/urls.py +5 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/virtualenv.py +2 -36
- package/xll/python/Lib/site-packages/pip/_internal/vcs/git.py +8 -5
- package/xll/python/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/wheel_builder.py +5 -1
- package/xll/python/Lib/site-packages/pip/_vendor/bom.cdx.json +231 -0
- package/xll/python/Lib/site-packages/pip/_vendor/certifi/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/certifi/cacert.pem +0 -631
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/compat.py +34 -64
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/resources.py +28 -14
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/scripts.py +7 -3
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/util.py +48 -11
- package/xll/python/Lib/site-packages/pip/_vendor/idna/LICENSE.md +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/idna/__main__.py +6 -0
- package/xll/python/Lib/site-packages/pip/_vendor/idna/cli.py +128 -0
- package/xll/python/Lib/site-packages/pip/_vendor/idna/codec.py +50 -13
- package/xll/python/Lib/site-packages/pip/_vendor/idna/compat.py +26 -0
- package/xll/python/Lib/site-packages/pip/_vendor/idna/core.py +352 -141
- package/xll/python/Lib/site-packages/pip/_vendor/idna/idnadata.py +571 -2983
- package/xll/python/Lib/site-packages/pip/_vendor/idna/intranges.py +5 -7
- package/xll/python/Lib/site-packages/pip/_vendor/idna/package_data.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/idna/uts46data.py +16887 -8832
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/__init__.py +352 -66
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/__main__.py +11 -0
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/_xdg.py +171 -0
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/android.py +92 -41
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/api.py +213 -49
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/macos.py +128 -51
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/unix.py +176 -127
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/version.py +8 -18
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/windows.py +185 -68
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/__init__.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/__main__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/console.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/filter.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py +10 -8
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/formatter.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexer.py +7 -5
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py +9 -8
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/python.py +35 -32
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/modeline.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/plugin.py +3 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/regexopt.py +13 -2
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/scanner.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/sphinxext.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/style.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/token.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/unistring.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/util.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/__init__.py +52 -16
- package/xll/python/Lib/site-packages/pip/_vendor/requests/__version__.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/_types.py +183 -0
- package/xll/python/Lib/site-packages/pip/_vendor/requests/adapters.py +101 -50
- package/xll/python/Lib/site-packages/pip/_vendor/requests/api.py +31 -8
- package/xll/python/Lib/site-packages/pip/_vendor/requests/auth.py +80 -40
- package/xll/python/Lib/site-packages/pip/_vendor/requests/compat.py +9 -3
- package/xll/python/Lib/site-packages/pip/_vendor/requests/cookies.py +143 -79
- package/xll/python/Lib/site-packages/pip/_vendor/requests/exceptions.py +15 -5
- package/xll/python/Lib/site-packages/pip/_vendor/requests/help.py +13 -10
- package/xll/python/Lib/site-packages/pip/_vendor/requests/hooks.py +23 -9
- package/xll/python/Lib/site-packages/pip/_vendor/requests/models.py +265 -126
- package/xll/python/Lib/site-packages/pip/_vendor/requests/py.typed +0 -0
- package/xll/python/Lib/site-packages/pip/_vendor/requests/sessions.py +164 -78
- package/xll/python/Lib/site-packages/pip/_vendor/requests/status_codes.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/structures.py +51 -20
- package/xll/python/Lib/site-packages/pip/_vendor/requests/utils.py +161 -89
- package/xll/python/Lib/site-packages/pip/_vendor/tomli/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/tomli/_parser.py +9 -4
- package/xll/python/Lib/site-packages/pip/_vendor/tomli/_re.py +13 -9
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_base_connection.py +3 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_collections.py +0 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_version.py +8 -18
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/connection.py +4 -4
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +23 -10
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/response.py +5 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +7 -8
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/fields.py +14 -14
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +8 -6
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/response.py +35 -22
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +8 -0
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +11 -61
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +5 -11
- package/xll/python/Lib/site-packages/pip/_vendor/vendor.txt +8 -8
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/METADATA +3 -2
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/RECORD +208 -188
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/AUTHORS.txt +20 -0
- 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
- package/xll/python/Lib/site-packages/pywin32-311.dist-info/RECORD +2 -2
- package/xll/python/Scripts/httpx.exe +0 -0
- package/xll/python/Scripts/idna.exe +0 -0
- package/xll/python/Scripts/pip.exe +0 -0
- package/xll/python/Scripts/pip3.13.exe +0 -0
- package/xll/python/Scripts/pip3.exe +0 -0
- package/xll/python/Scripts/pywin32_postinstall.exe +0 -0
- package/xll/python/Scripts/pywin32_testall.exe +0 -0
- package/dist/app/collab/awareness.d.ts +0 -32
- package/dist/app/collab/awareness.js +0 -52
- package/dist/app/collab/collab-client.d.ts +0 -37
- package/dist/app/collab/collab-client.js +0 -208
- package/dist/app/collab/collab-manager.d.ts +0 -91
- package/dist/app/collab/collab-manager.js +0 -218
- package/dist/app/collab/collab-sync.d.ts +0 -62
- package/dist/app/collab/collab-sync.js +0 -215
- package/dist/app/collab/index.d.ts +0 -9
- package/dist/app/collab/index.js +0 -6
- package/dist/app/collab/super-fight.d.ts +0 -90
- package/dist/app/collab/super-fight.js +0 -310
- package/dist/app/collab/sync-bridge.d.ts +0 -35
- package/dist/app/collab/sync-bridge.js +0 -109
- package/dist/app/collab/types.d.ts +0 -75
- package/dist/app/collab/types.js +0 -5
- package/dist/embedded-agent/ai-content.d.ts +0 -52
- package/dist/embedded-agent/ai-content.js +0 -101
- package/dist/embedded-agent/host-tools/shared/llm-stream.d.ts +0 -31
- package/dist/embedded-agent/host-tools/shared/llm-stream.js +0 -136
- package/dist/embedded-agent/model-call-orchestrator.d.ts +0 -22
- package/dist/embedded-agent/model-call-orchestrator.js +0 -22
- package/dist/embedded-agent/stream-errors.d.ts +0 -10
- package/dist/embedded-agent/stream-errors.js +0 -73
- package/dist/embedded-agent/stream-message-state.d.ts +0 -14
- package/dist/embedded-agent/stream-message-state.js +0 -271
- package/dist/embedded-agent/stream-sse.d.ts +0 -78
- package/dist/embedded-agent/stream-sse.js +0 -73
- package/dist/shell/approvals/task-spawn-approval.d.ts +0 -20
- package/dist/shell/approvals/task-spawn-approval.js +0 -93
- package/dist/shell/interactive/collab-command.d.ts +0 -9
- package/dist/shell/interactive/collab-command.js +0 -115
- package/dist/shell/interactive/super-fight-ui.d.ts +0 -80
- package/dist/shell/interactive/super-fight-ui.js +0 -484
- package/dist/shell/status/collab-status.d.ts +0 -18
- package/dist/shell/status/collab-status.js +0 -46
- package/xll/python/Lib/site-packages/pip/_internal/build_env.py +0 -606
- /package/dist/{tui → autocomplete}/skill-autocomplete.js +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/INSTALLER +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/REQUESTED +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/WHEEL +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/entry_points.txt +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/LICENSE.txt +0 -0
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
|
@@ -4,18 +4,20 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
6
|
import sys
|
|
7
|
-
from
|
|
8
|
-
from typing import TYPE_CHECKING
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import TYPE_CHECKING, Final
|
|
9
9
|
|
|
10
10
|
from .api import PlatformDirsABC
|
|
11
11
|
|
|
12
12
|
if TYPE_CHECKING:
|
|
13
13
|
from collections.abc import Callable
|
|
14
14
|
|
|
15
|
+
# Not exposed by CPython; defined in the Windows SDK (shlobj_core.h)
|
|
16
|
+
_KF_FLAG_DONT_VERIFY: Final[int] = 0x00004000
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
`MSDN on where to store app data files <https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid>`_.
|
|
18
|
+
|
|
19
|
+
class Windows(PlatformDirsABC): # noqa: PLR0904
|
|
20
|
+
"""`MSDN on where to store app data files <https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid>`_.
|
|
19
21
|
|
|
20
22
|
Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>`, `appauthor
|
|
21
23
|
<platformdirs.api.PlatformDirsABC.appauthor>`, `version <platformdirs.api.PlatformDirsABC.version>`, `roaming
|
|
@@ -26,11 +28,7 @@ class Windows(PlatformDirsABC):
|
|
|
26
28
|
|
|
27
29
|
@property
|
|
28
30
|
def user_data_dir(self) -> str:
|
|
29
|
-
"""
|
|
30
|
-
:return: data directory tied to the user, e.g.
|
|
31
|
-
``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname`` (not roaming) or
|
|
32
|
-
``%USERPROFILE%\\AppData\\Roaming\\$appauthor\\$appname`` (roaming)
|
|
33
|
-
"""
|
|
31
|
+
r""":returns: data directory tied to the user, e.g. ``%USERPROFILE%\AppData\Local\$appauthor\$appname`` (not roaming) or ``%USERPROFILE%\AppData\Roaming\$appauthor\$appname`` (roaming)"""
|
|
34
32
|
const = "CSIDL_APPDATA" if self.roaming else "CSIDL_LOCAL_APPDATA"
|
|
35
33
|
path = os.path.normpath(get_win_folder(const))
|
|
36
34
|
return self._append_parts(path)
|
|
@@ -52,91 +50,144 @@ class Windows(PlatformDirsABC):
|
|
|
52
50
|
|
|
53
51
|
@property
|
|
54
52
|
def site_data_dir(self) -> str:
|
|
55
|
-
""":
|
|
53
|
+
r""":returns: data directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname``"""
|
|
56
54
|
path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA"))
|
|
57
55
|
return self._append_parts(path)
|
|
58
56
|
|
|
59
57
|
@property
|
|
60
58
|
def user_config_dir(self) -> str:
|
|
61
|
-
""":
|
|
59
|
+
""":returns: config directory tied to the user, same as `user_data_dir`"""
|
|
62
60
|
return self.user_data_dir
|
|
63
61
|
|
|
64
62
|
@property
|
|
65
63
|
def site_config_dir(self) -> str:
|
|
66
|
-
""":
|
|
64
|
+
""":returns: config directory shared by users, same as `site_data_dir`"""
|
|
67
65
|
return self.site_data_dir
|
|
68
66
|
|
|
69
67
|
@property
|
|
70
68
|
def user_cache_dir(self) -> str:
|
|
71
|
-
"""
|
|
72
|
-
:return: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g.
|
|
73
|
-
``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname\\Cache\\$version``
|
|
74
|
-
"""
|
|
69
|
+
r""":returns: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g. ``%USERPROFILE%\AppData\Local\$appauthor\$appname\Cache\$version``"""
|
|
75
70
|
path = os.path.normpath(get_win_folder("CSIDL_LOCAL_APPDATA"))
|
|
76
71
|
return self._append_parts(path, opinion_value="Cache")
|
|
77
72
|
|
|
78
73
|
@property
|
|
79
74
|
def site_cache_dir(self) -> str:
|
|
80
|
-
""":
|
|
75
|
+
r""":returns: cache directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname\Cache\$version``"""
|
|
81
76
|
path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA"))
|
|
82
77
|
return self._append_parts(path, opinion_value="Cache")
|
|
83
78
|
|
|
84
79
|
@property
|
|
85
80
|
def user_state_dir(self) -> str:
|
|
86
|
-
""":
|
|
81
|
+
""":returns: state directory tied to the user, same as `user_data_dir`"""
|
|
87
82
|
return self.user_data_dir
|
|
88
83
|
|
|
84
|
+
@property
|
|
85
|
+
def site_state_dir(self) -> str:
|
|
86
|
+
""":returns: state directory shared by users, same as `site_data_dir`"""
|
|
87
|
+
return self.site_data_dir
|
|
88
|
+
|
|
89
89
|
@property
|
|
90
90
|
def user_log_dir(self) -> str:
|
|
91
|
-
""":
|
|
91
|
+
""":returns: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it"""
|
|
92
92
|
path = self.user_data_dir
|
|
93
93
|
if self.opinion:
|
|
94
94
|
path = os.path.join(path, "Logs") # noqa: PTH118
|
|
95
95
|
self._optionally_create_directory(path)
|
|
96
96
|
return path
|
|
97
97
|
|
|
98
|
+
@property
|
|
99
|
+
def site_log_dir(self) -> str:
|
|
100
|
+
""":returns: log directory shared by users, same as `site_data_dir` if not opinionated else ``Logs`` in it"""
|
|
101
|
+
path = self.site_data_dir
|
|
102
|
+
if self.opinion:
|
|
103
|
+
path = os.path.join(path, "Logs") # noqa: PTH118
|
|
104
|
+
self._optionally_create_directory(path)
|
|
105
|
+
return path
|
|
106
|
+
|
|
98
107
|
@property
|
|
99
108
|
def user_documents_dir(self) -> str:
|
|
100
|
-
""":
|
|
109
|
+
r""":returns: documents directory tied to the user e.g. ``%USERPROFILE%\Documents``"""
|
|
101
110
|
return os.path.normpath(get_win_folder("CSIDL_PERSONAL"))
|
|
102
111
|
|
|
103
112
|
@property
|
|
104
113
|
def user_downloads_dir(self) -> str:
|
|
105
|
-
""":
|
|
114
|
+
r""":returns: downloads directory tied to the user e.g. ``%USERPROFILE%\Downloads``"""
|
|
106
115
|
return os.path.normpath(get_win_folder("CSIDL_DOWNLOADS"))
|
|
107
116
|
|
|
108
117
|
@property
|
|
109
118
|
def user_pictures_dir(self) -> str:
|
|
110
|
-
""":
|
|
119
|
+
r""":returns: pictures directory tied to the user e.g. ``%USERPROFILE%\Pictures``"""
|
|
111
120
|
return os.path.normpath(get_win_folder("CSIDL_MYPICTURES"))
|
|
112
121
|
|
|
113
122
|
@property
|
|
114
123
|
def user_videos_dir(self) -> str:
|
|
115
|
-
""":
|
|
124
|
+
r""":returns: videos directory tied to the user e.g. ``%USERPROFILE%\Videos``"""
|
|
116
125
|
return os.path.normpath(get_win_folder("CSIDL_MYVIDEO"))
|
|
117
126
|
|
|
118
127
|
@property
|
|
119
128
|
def user_music_dir(self) -> str:
|
|
120
|
-
""":
|
|
129
|
+
r""":returns: music directory tied to the user e.g. ``%USERPROFILE%\Music``"""
|
|
121
130
|
return os.path.normpath(get_win_folder("CSIDL_MYMUSIC"))
|
|
122
131
|
|
|
123
132
|
@property
|
|
124
133
|
def user_desktop_dir(self) -> str:
|
|
125
|
-
""":
|
|
134
|
+
r""":returns: desktop directory tied to the user, e.g. ``%USERPROFILE%\Desktop``"""
|
|
126
135
|
return os.path.normpath(get_win_folder("CSIDL_DESKTOPDIRECTORY"))
|
|
127
136
|
|
|
137
|
+
@property
|
|
138
|
+
def user_projects_dir(self) -> str:
|
|
139
|
+
r""":returns: projects directory tied to the user, e.g. ``%USERPROFILE%\Projects``"""
|
|
140
|
+
return os.path.normpath(os.path.expanduser("~/Projects")) # noqa: PTH111
|
|
141
|
+
|
|
142
|
+
@property
|
|
143
|
+
def user_publicshare_dir(self) -> str:
|
|
144
|
+
r""":returns: public share directory e.g. ``C:\Users\Public``"""
|
|
145
|
+
return os.path.normpath(os.environ.get("PUBLIC", str(Path("~").expanduser().parent / "Public")))
|
|
146
|
+
|
|
147
|
+
@property
|
|
148
|
+
def user_templates_dir(self) -> str:
|
|
149
|
+
r""":returns: templates directory tied to the user e.g. ``%APPDATA%\Microsoft\Windows\Templates``"""
|
|
150
|
+
return os.path.normpath(str(Path(get_win_folder("CSIDL_APPDATA")) / "Microsoft" / "Windows" / "Templates"))
|
|
151
|
+
|
|
152
|
+
@property
|
|
153
|
+
def user_fonts_dir(self) -> str:
|
|
154
|
+
r""":returns: fonts directory tied to the user e.g. ``%LOCALAPPDATA%\Microsoft\Windows\Fonts``"""
|
|
155
|
+
return os.path.normpath(str(Path(get_win_folder("CSIDL_LOCAL_APPDATA")) / "Microsoft" / "Windows" / "Fonts"))
|
|
156
|
+
|
|
157
|
+
@property
|
|
158
|
+
def user_preference_dir(self) -> str:
|
|
159
|
+
r""":returns: preference directory tied to the user, same as ``user_config_dir``"""
|
|
160
|
+
return self.user_config_dir
|
|
161
|
+
|
|
162
|
+
@property
|
|
163
|
+
def user_bin_dir(self) -> str:
|
|
164
|
+
r""":returns: bin directory tied to the user, e.g. ``%LOCALAPPDATA%\Programs``"""
|
|
165
|
+
return os.path.normpath(os.path.join(get_win_folder("CSIDL_LOCAL_APPDATA"), "Programs")) # noqa: PTH118
|
|
166
|
+
|
|
167
|
+
@property
|
|
168
|
+
def site_bin_dir(self) -> str:
|
|
169
|
+
""":returns: bin directory shared by users, e.g. ``C:\\ProgramData\bin``"""
|
|
170
|
+
return os.path.normpath(os.path.join(get_win_folder("CSIDL_COMMON_APPDATA"), "bin")) # noqa: PTH118
|
|
171
|
+
|
|
172
|
+
@property
|
|
173
|
+
def user_applications_dir(self) -> str:
|
|
174
|
+
r""":returns: applications directory tied to the user, e.g. ``Start Menu\Programs``"""
|
|
175
|
+
return os.path.normpath(get_win_folder("CSIDL_PROGRAMS"))
|
|
176
|
+
|
|
177
|
+
@property
|
|
178
|
+
def site_applications_dir(self) -> str:
|
|
179
|
+
r""":returns: applications directory shared by users, e.g. ``C:\ProgramData\Microsoft\Windows\Start Menu\Programs``"""
|
|
180
|
+
return os.path.normpath(get_win_folder("CSIDL_COMMON_PROGRAMS"))
|
|
181
|
+
|
|
128
182
|
@property
|
|
129
183
|
def user_runtime_dir(self) -> str:
|
|
130
|
-
"""
|
|
131
|
-
:return: runtime directory tied to the user, e.g.
|
|
132
|
-
``%USERPROFILE%\\AppData\\Local\\Temp\\$appauthor\\$appname``
|
|
133
|
-
"""
|
|
184
|
+
r""":returns: runtime directory tied to the user, e.g. ``%USERPROFILE%\AppData\Local\Temp\$appauthor\$appname``"""
|
|
134
185
|
path = os.path.normpath(os.path.join(get_win_folder("CSIDL_LOCAL_APPDATA"), "Temp")) # noqa: PTH118
|
|
135
186
|
return self._append_parts(path)
|
|
136
187
|
|
|
137
188
|
@property
|
|
138
189
|
def site_runtime_dir(self) -> str:
|
|
139
|
-
""":
|
|
190
|
+
""":returns: runtime directory shared by users, same as `user_runtime_dir`"""
|
|
140
191
|
return self.user_runtime_dir
|
|
141
192
|
|
|
142
193
|
|
|
@@ -161,7 +212,7 @@ def get_win_folder_from_env_vars(csidl_name: str) -> str:
|
|
|
161
212
|
return result
|
|
162
213
|
|
|
163
214
|
|
|
164
|
-
def get_win_folder_if_csidl_name_not_env_var(csidl_name: str) -> str | None:
|
|
215
|
+
def get_win_folder_if_csidl_name_not_env_var(csidl_name: str) -> str | None: # noqa: PLR0911
|
|
165
216
|
"""Get a folder for a CSIDL name that does not exist as an environment variable."""
|
|
166
217
|
if csidl_name == "CSIDL_PERSONAL":
|
|
167
218
|
return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Documents") # noqa: PTH118
|
|
@@ -177,12 +228,29 @@ def get_win_folder_if_csidl_name_not_env_var(csidl_name: str) -> str | None:
|
|
|
177
228
|
|
|
178
229
|
if csidl_name == "CSIDL_MYMUSIC":
|
|
179
230
|
return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Music") # noqa: PTH118
|
|
231
|
+
|
|
232
|
+
if csidl_name == "CSIDL_PROGRAMS":
|
|
233
|
+
return os.path.join( # noqa: PTH118
|
|
234
|
+
os.path.normpath(os.environ["APPDATA"]),
|
|
235
|
+
"Microsoft",
|
|
236
|
+
"Windows",
|
|
237
|
+
"Start Menu",
|
|
238
|
+
"Programs",
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
if csidl_name == "CSIDL_COMMON_PROGRAMS":
|
|
242
|
+
return os.path.join( # noqa: PTH118
|
|
243
|
+
os.path.normpath(os.environ.get("PROGRAMDATA", os.environ.get("ALLUSERSPROFILE", "C:\\ProgramData"))),
|
|
244
|
+
"Microsoft",
|
|
245
|
+
"Windows",
|
|
246
|
+
"Start Menu",
|
|
247
|
+
"Programs",
|
|
248
|
+
)
|
|
180
249
|
return None
|
|
181
250
|
|
|
182
251
|
|
|
183
252
|
def get_win_folder_from_registry(csidl_name: str) -> str:
|
|
184
|
-
"""
|
|
185
|
-
Get folder from the registry.
|
|
253
|
+
"""Get folder from the registry.
|
|
186
254
|
|
|
187
255
|
This is a fallback technique at best. I'm not sure if using the registry for these guarantees us the correct answer
|
|
188
256
|
for all CSIDL_* names.
|
|
@@ -190,6 +258,7 @@ def get_win_folder_from_registry(csidl_name: str) -> str:
|
|
|
190
258
|
"""
|
|
191
259
|
machine_names = {
|
|
192
260
|
"CSIDL_COMMON_APPDATA",
|
|
261
|
+
"CSIDL_COMMON_PROGRAMS",
|
|
193
262
|
}
|
|
194
263
|
shell_folder_name = {
|
|
195
264
|
"CSIDL_APPDATA": "AppData",
|
|
@@ -200,6 +269,8 @@ def get_win_folder_from_registry(csidl_name: str) -> str:
|
|
|
200
269
|
"CSIDL_MYPICTURES": "My Pictures",
|
|
201
270
|
"CSIDL_MYVIDEO": "My Video",
|
|
202
271
|
"CSIDL_MYMUSIC": "My Music",
|
|
272
|
+
"CSIDL_PROGRAMS": "Programs",
|
|
273
|
+
"CSIDL_COMMON_PROGRAMS": "Common Programs",
|
|
203
274
|
}.get(csidl_name)
|
|
204
275
|
if shell_folder_name is None:
|
|
205
276
|
msg = f"Unknown CSIDL name: {csidl_name}"
|
|
@@ -216,53 +287,86 @@ def get_win_folder_from_registry(csidl_name: str) -> str:
|
|
|
216
287
|
return str(directory)
|
|
217
288
|
|
|
218
289
|
|
|
290
|
+
_KNOWN_FOLDER_GUIDS: dict[str, str] = {
|
|
291
|
+
"CSIDL_APPDATA": "{3EB685DB-65F9-4CF6-A03A-E3EF65729F3D}",
|
|
292
|
+
"CSIDL_COMMON_APPDATA": "{62AB5D82-FDC1-4DC3-A9DD-070D1D495D97}",
|
|
293
|
+
"CSIDL_LOCAL_APPDATA": "{F1B32785-6FBA-4FCF-9D55-7B8E7F157091}",
|
|
294
|
+
"CSIDL_PERSONAL": "{FDD39AD0-238F-46AF-ADB4-6C85480369C7}",
|
|
295
|
+
"CSIDL_MYPICTURES": "{33E28130-4E1E-4676-835A-98395C3BC3BB}",
|
|
296
|
+
"CSIDL_MYVIDEO": "{18989B1D-99B5-455B-841C-AB7C74E4DDFC}",
|
|
297
|
+
"CSIDL_MYMUSIC": "{4BD8D571-6D19-48D3-BE97-422220080E43}",
|
|
298
|
+
"CSIDL_DOWNLOADS": "{374DE290-123F-4565-9164-39C4925E467B}",
|
|
299
|
+
"CSIDL_DESKTOPDIRECTORY": "{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}",
|
|
300
|
+
"CSIDL_PROGRAMS": "{A77F5D77-2E2B-44C3-A6A2-ABA601054A51}",
|
|
301
|
+
"CSIDL_COMMON_PROGRAMS": "{0139D44E-6AFE-49F2-8690-3DAFCAE6FFB8}",
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
|
|
219
305
|
def get_win_folder_via_ctypes(csidl_name: str) -> str:
|
|
220
|
-
"""Get folder
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
306
|
+
"""Get folder via :func:`SHGetKnownFolderPath`.
|
|
307
|
+
|
|
308
|
+
See https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath.
|
|
309
|
+
|
|
310
|
+
"""
|
|
311
|
+
if sys.platform != "win32": # only needed for type checker to know that this code runs only on Windows
|
|
312
|
+
raise NotImplementedError
|
|
313
|
+
from ctypes import HRESULT, POINTER, Structure, WinDLL, byref, create_unicode_buffer, wintypes # noqa: PLC0415
|
|
314
|
+
|
|
315
|
+
class _GUID(Structure):
|
|
316
|
+
_fields_ = [
|
|
317
|
+
("Data1", wintypes.DWORD),
|
|
318
|
+
("Data2", wintypes.WORD),
|
|
319
|
+
("Data3", wintypes.WORD),
|
|
320
|
+
("Data4", wintypes.BYTE * 8),
|
|
321
|
+
]
|
|
322
|
+
|
|
323
|
+
ole32 = WinDLL("ole32")
|
|
324
|
+
ole32.CLSIDFromString.restype = HRESULT
|
|
325
|
+
ole32.CLSIDFromString.argtypes = [wintypes.LPCOLESTR, POINTER(_GUID)]
|
|
326
|
+
ole32.CoTaskMemFree.restype = None
|
|
327
|
+
ole32.CoTaskMemFree.argtypes = [wintypes.LPVOID]
|
|
328
|
+
|
|
329
|
+
shell32 = WinDLL("shell32")
|
|
330
|
+
shell32.SHGetKnownFolderPath.restype = HRESULT
|
|
331
|
+
shell32.SHGetKnownFolderPath.argtypes = [POINTER(_GUID), wintypes.DWORD, wintypes.HANDLE, POINTER(wintypes.LPWSTR)]
|
|
332
|
+
|
|
333
|
+
kernel32 = WinDLL("kernel32")
|
|
334
|
+
kernel32.GetShortPathNameW.restype = wintypes.DWORD
|
|
335
|
+
kernel32.GetShortPathNameW.argtypes = [wintypes.LPWSTR, wintypes.LPWSTR, wintypes.DWORD]
|
|
336
|
+
|
|
337
|
+
folder_guid = _KNOWN_FOLDER_GUIDS.get(csidl_name)
|
|
338
|
+
if folder_guid is None:
|
|
239
339
|
msg = f"Unknown CSIDL name: {csidl_name}"
|
|
240
340
|
raise ValueError(msg)
|
|
241
341
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf)
|
|
342
|
+
guid = _GUID()
|
|
343
|
+
ole32.CLSIDFromString(folder_guid, byref(guid))
|
|
245
344
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
buf = buf2
|
|
345
|
+
path_ptr = wintypes.LPWSTR()
|
|
346
|
+
shell32.SHGetKnownFolderPath(byref(guid), _KF_FLAG_DONT_VERIFY, None, byref(path_ptr))
|
|
347
|
+
result = path_ptr.value
|
|
348
|
+
ole32.CoTaskMemFree(path_ptr)
|
|
251
349
|
|
|
252
|
-
if
|
|
253
|
-
|
|
350
|
+
if result is None:
|
|
351
|
+
msg = f"SHGetKnownFolderPath returned NULL for {csidl_name}"
|
|
352
|
+
raise ValueError(msg)
|
|
353
|
+
|
|
354
|
+
if any(ord(c) > 255 for c in result): # noqa: PLR2004
|
|
355
|
+
buf = create_unicode_buffer(1024)
|
|
356
|
+
if kernel32.GetShortPathNameW(result, buf, 1024):
|
|
357
|
+
result = buf.value
|
|
254
358
|
|
|
255
|
-
return
|
|
359
|
+
return result
|
|
256
360
|
|
|
257
361
|
|
|
258
362
|
def _pick_get_win_folder() -> Callable[[str], str]:
|
|
363
|
+
"""Select the best method to resolve Windows folder paths: ctypes, then registry, then environment variables."""
|
|
259
364
|
try:
|
|
260
|
-
import ctypes # noqa: PLC0415
|
|
365
|
+
import ctypes # noqa: PLC0415, F401
|
|
261
366
|
except ImportError:
|
|
262
367
|
pass
|
|
263
368
|
else:
|
|
264
|
-
|
|
265
|
-
return get_win_folder_via_ctypes
|
|
369
|
+
return get_win_folder_via_ctypes
|
|
266
370
|
try:
|
|
267
371
|
import winreg # noqa: PLC0415, F401
|
|
268
372
|
except ImportError:
|
|
@@ -271,7 +375,20 @@ def _pick_get_win_folder() -> Callable[[str], str]:
|
|
|
271
375
|
return get_win_folder_from_registry
|
|
272
376
|
|
|
273
377
|
|
|
274
|
-
|
|
378
|
+
_resolve_win_folder = _pick_get_win_folder()
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
def get_win_folder(csidl_name: str) -> str:
|
|
382
|
+
"""Get a Windows folder path, checking for ``WIN_PD_OVERRIDE_*`` environment variable overrides first.
|
|
383
|
+
|
|
384
|
+
For example, ``CSIDL_LOCAL_APPDATA`` can be overridden by setting ``WIN_PD_OVERRIDE_LOCAL_APPDATA``.
|
|
385
|
+
|
|
386
|
+
"""
|
|
387
|
+
env_var = f"WIN_PD_OVERRIDE_{csidl_name.removeprefix('CSIDL_')}"
|
|
388
|
+
if override := os.environ.get(env_var, "").strip():
|
|
389
|
+
return override
|
|
390
|
+
return _resolve_win_folder(csidl_name)
|
|
391
|
+
|
|
275
392
|
|
|
276
393
|
__all__ = [
|
|
277
394
|
"Windows",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
.. _Pygments master branch:
|
|
22
22
|
https://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev
|
|
23
23
|
|
|
24
|
-
:copyright: Copyright 2006-
|
|
24
|
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
|
25
25
|
:license: BSD, see LICENSE for details.
|
|
26
26
|
"""
|
|
27
27
|
from io import StringIO, BytesIO
|
|
28
28
|
|
|
29
|
-
__version__ = '2.
|
|
29
|
+
__version__ = '2.20.0'
|
|
30
30
|
__docformat__ = 'restructuredtext'
|
|
31
31
|
|
|
32
32
|
__all__ = ['lex', 'format', 'highlight']
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Module containing filter lookup functions and default
|
|
6
6
|
filters.
|
|
7
7
|
|
|
8
|
-
:copyright: Copyright 2006-
|
|
8
|
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
|
9
9
|
:license: BSD, see LICENSE for details.
|
|
10
10
|
"""
|
|
11
11
|
|
|
@@ -95,8 +95,10 @@ class CodeTagFilter(Filter):
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
class SymbolFilter(Filter):
|
|
98
|
-
"""Convert mathematical symbols
|
|
99
|
-
|
|
98
|
+
"""Convert mathematical symbols into Unicode characters.
|
|
99
|
+
|
|
100
|
+
Examples are ``\\<longrightarrow>`` in Isabelle or
|
|
101
|
+
``\\longrightarrow`` in LaTeX.
|
|
100
102
|
|
|
101
103
|
This is mostly useful for HTML or console output when you want to
|
|
102
104
|
approximate the source rendering you'd see in an IDE.
|
|
@@ -685,8 +687,9 @@ class SymbolFilter(Filter):
|
|
|
685
687
|
|
|
686
688
|
|
|
687
689
|
class KeywordCaseFilter(Filter):
|
|
688
|
-
"""Convert keywords to lowercase or uppercase or capitalize them
|
|
689
|
-
|
|
690
|
+
"""Convert keywords to lowercase or uppercase or capitalize them.
|
|
691
|
+
|
|
692
|
+
This means first letter uppercase, rest lowercase.
|
|
690
693
|
|
|
691
694
|
This can be useful e.g. if you highlight Pascal code and want to adapt the
|
|
692
695
|
code to your styleguide.
|
|
@@ -866,7 +869,7 @@ class VisibleWhitespaceFilter(Filter):
|
|
|
866
869
|
|
|
867
870
|
|
|
868
871
|
class GobbleFilter(Filter):
|
|
869
|
-
"""
|
|
872
|
+
"""Gobble source code lines (eats initial characters).
|
|
870
873
|
|
|
871
874
|
This filter drops the first ``n`` characters off every line of code. This
|
|
872
875
|
may be useful when the source code fed to the lexer is indented by a fixed
|
|
@@ -905,8 +908,7 @@ class GobbleFilter(Filter):
|
|
|
905
908
|
|
|
906
909
|
|
|
907
910
|
class TokenMergeFilter(Filter):
|
|
908
|
-
"""
|
|
909
|
-
stream of a lexer.
|
|
911
|
+
"""Merge consecutive tokens with the same token type in the output stream.
|
|
910
912
|
|
|
911
913
|
.. versionadded:: 1.2
|
|
912
914
|
"""
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Base lexer classes.
|
|
6
6
|
|
|
7
|
-
:copyright: Copyright 2006-
|
|
7
|
+
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
|
8
8
|
:license: BSD, see LICENSE for details.
|
|
9
9
|
"""
|
|
10
10
|
|
|
@@ -446,8 +446,9 @@ def using(_other, **kwargs):
|
|
|
446
446
|
# function has to create a new lexer instance
|
|
447
447
|
if kwargs:
|
|
448
448
|
# XXX: cache that somehow
|
|
449
|
-
|
|
450
|
-
|
|
449
|
+
d = dict(lexer.options)
|
|
450
|
+
d.update(kwargs)
|
|
451
|
+
lx = lexer.__class__(**d)
|
|
451
452
|
else:
|
|
452
453
|
lx = lexer
|
|
453
454
|
s = match.start()
|
|
@@ -458,8 +459,9 @@ def using(_other, **kwargs):
|
|
|
458
459
|
else:
|
|
459
460
|
def callback(lexer, match, ctx=None):
|
|
460
461
|
# XXX: cache that somehow
|
|
461
|
-
|
|
462
|
-
|
|
462
|
+
d = dict(lexer.options)
|
|
463
|
+
d.update(kwargs)
|
|
464
|
+
lx = _other(**d)
|
|
463
465
|
|
|
464
466
|
s = match.start()
|
|
465
467
|
for i, t, v in lx.get_tokens_unprocessed(match.group(), **gt_kwargs):
|