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
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
* resolved resource to support diagnostics and conflict detection.
|
|
9
9
|
*/
|
|
10
10
|
import ignore from 'ignore';
|
|
11
|
-
import { minimatch } from 'minimatch';
|
|
12
11
|
import { spawn, spawnSync } from 'node:child_process';
|
|
13
12
|
import { createHash } from 'node:crypto';
|
|
14
13
|
import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from 'node:fs';
|
|
15
14
|
import { homedir, tmpdir } from 'node:os';
|
|
16
|
-
import {
|
|
15
|
+
import { dirname, join, relative, resolve, sep } from 'node:path';
|
|
17
16
|
import { CONFIG_DIR_NAME, getBundledSkillsDir } from '../../config.js';
|
|
18
17
|
import { parseGitUrl } from '../../shared/scm/git.js';
|
|
18
|
+
import { applyPatterns, isEnabledByOverrides } from './resource-patterns.js';
|
|
19
19
|
/** Timeout for npm/git network operations. */
|
|
20
20
|
const NETWORK_TIMEOUT_MS = 10000;
|
|
21
21
|
function isOfflineModeEnabled() {
|
|
@@ -365,127 +365,6 @@ function collectResourceFiles(dir, resourceType) {
|
|
|
365
365
|
}
|
|
366
366
|
return collectFiles(dir, FILE_PATTERNS[resourceType]);
|
|
367
367
|
}
|
|
368
|
-
function matchesAnyPattern(filePath, patterns, baseDir) {
|
|
369
|
-
const rel = relative(baseDir, filePath);
|
|
370
|
-
const name = basename(filePath);
|
|
371
|
-
const isSkillFile = name === 'SKILL.md';
|
|
372
|
-
const parentDir = isSkillFile ? dirname(filePath) : undefined;
|
|
373
|
-
const parentRel = isSkillFile ? relative(baseDir, parentDir) : undefined;
|
|
374
|
-
const parentName = isSkillFile ? basename(parentDir) : undefined;
|
|
375
|
-
return patterns.some((pattern) => {
|
|
376
|
-
if (minimatch(rel, pattern) || minimatch(name, pattern) || minimatch(filePath, pattern)) {
|
|
377
|
-
return true;
|
|
378
|
-
}
|
|
379
|
-
if (!isSkillFile)
|
|
380
|
-
return false;
|
|
381
|
-
return (minimatch(parentRel, pattern) ||
|
|
382
|
-
minimatch(parentName, pattern) ||
|
|
383
|
-
minimatch(parentDir, pattern));
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
function normalizeExactPattern(pattern) {
|
|
387
|
-
if (pattern.startsWith('./') || pattern.startsWith('.\\')) {
|
|
388
|
-
return pattern.slice(2);
|
|
389
|
-
}
|
|
390
|
-
return pattern;
|
|
391
|
-
}
|
|
392
|
-
function matchesAnyExactPattern(filePath, patterns, baseDir) {
|
|
393
|
-
if (patterns.length === 0)
|
|
394
|
-
return false;
|
|
395
|
-
const rel = relative(baseDir, filePath);
|
|
396
|
-
const name = basename(filePath);
|
|
397
|
-
const isSkillFile = name === 'SKILL.md';
|
|
398
|
-
const parentDir = isSkillFile ? dirname(filePath) : undefined;
|
|
399
|
-
const parentRel = isSkillFile ? relative(baseDir, parentDir) : undefined;
|
|
400
|
-
return patterns.some((pattern) => {
|
|
401
|
-
const normalized = normalizeExactPattern(pattern);
|
|
402
|
-
if (normalized === rel || normalized === filePath) {
|
|
403
|
-
return true;
|
|
404
|
-
}
|
|
405
|
-
if (!isSkillFile)
|
|
406
|
-
return false;
|
|
407
|
-
return normalized === parentRel || normalized === parentDir;
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
function getOverridePatterns(entries) {
|
|
411
|
-
return entries.filter((pattern) => pattern.startsWith('!') || pattern.startsWith('+') || pattern.startsWith('-'));
|
|
412
|
-
}
|
|
413
|
-
function isEnabledByOverrides(filePath, patterns, baseDir) {
|
|
414
|
-
const overrides = getOverridePatterns(patterns);
|
|
415
|
-
const excludes = overrides
|
|
416
|
-
.filter((pattern) => pattern.startsWith('!'))
|
|
417
|
-
.map((pattern) => pattern.slice(1));
|
|
418
|
-
const forceIncludes = overrides
|
|
419
|
-
.filter((pattern) => pattern.startsWith('+'))
|
|
420
|
-
.map((pattern) => pattern.slice(1));
|
|
421
|
-
const forceExcludes = overrides
|
|
422
|
-
.filter((pattern) => pattern.startsWith('-'))
|
|
423
|
-
.map((pattern) => pattern.slice(1));
|
|
424
|
-
let enabled = true;
|
|
425
|
-
if (excludes.length > 0 && matchesAnyPattern(filePath, excludes, baseDir)) {
|
|
426
|
-
enabled = false;
|
|
427
|
-
}
|
|
428
|
-
if (forceIncludes.length > 0 && matchesAnyExactPattern(filePath, forceIncludes, baseDir)) {
|
|
429
|
-
enabled = true;
|
|
430
|
-
}
|
|
431
|
-
if (forceExcludes.length > 0 && matchesAnyExactPattern(filePath, forceExcludes, baseDir)) {
|
|
432
|
-
enabled = false;
|
|
433
|
-
}
|
|
434
|
-
return enabled;
|
|
435
|
-
}
|
|
436
|
-
/**
|
|
437
|
-
* Apply patterns to paths and return a Set of enabled paths.
|
|
438
|
-
* Pattern types:
|
|
439
|
-
* - Plain patterns: include matching paths
|
|
440
|
-
* - `!pattern`: exclude matching paths
|
|
441
|
-
* - `+path`: force-include exact path (overrides exclusions)
|
|
442
|
-
* - `-path`: force-exclude exact path (overrides force-includes)
|
|
443
|
-
*/
|
|
444
|
-
function applyPatterns(allPaths, patterns, baseDir) {
|
|
445
|
-
const includes = [];
|
|
446
|
-
const excludes = [];
|
|
447
|
-
const forceIncludes = [];
|
|
448
|
-
const forceExcludes = [];
|
|
449
|
-
for (const p of patterns) {
|
|
450
|
-
if (p.startsWith('+')) {
|
|
451
|
-
forceIncludes.push(p.slice(1));
|
|
452
|
-
}
|
|
453
|
-
else if (p.startsWith('-')) {
|
|
454
|
-
forceExcludes.push(p.slice(1));
|
|
455
|
-
}
|
|
456
|
-
else if (p.startsWith('!')) {
|
|
457
|
-
excludes.push(p.slice(1));
|
|
458
|
-
}
|
|
459
|
-
else {
|
|
460
|
-
includes.push(p);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
// Step 1: Apply includes (or all if no includes)
|
|
464
|
-
let result;
|
|
465
|
-
if (includes.length === 0) {
|
|
466
|
-
result = [...allPaths];
|
|
467
|
-
}
|
|
468
|
-
else {
|
|
469
|
-
result = allPaths.filter((filePath) => matchesAnyPattern(filePath, includes, baseDir));
|
|
470
|
-
}
|
|
471
|
-
// Step 2: Apply excludes
|
|
472
|
-
if (excludes.length > 0) {
|
|
473
|
-
result = result.filter((filePath) => !matchesAnyPattern(filePath, excludes, baseDir));
|
|
474
|
-
}
|
|
475
|
-
// Step 3: Force-include (add back from allPaths, overriding exclusions)
|
|
476
|
-
if (forceIncludes.length > 0) {
|
|
477
|
-
for (const filePath of allPaths) {
|
|
478
|
-
if (!result.includes(filePath) && matchesAnyExactPattern(filePath, forceIncludes, baseDir)) {
|
|
479
|
-
result.push(filePath);
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
// Step 4: Force-exclude (remove even if included or force-included)
|
|
484
|
-
if (forceExcludes.length > 0) {
|
|
485
|
-
result = result.filter((filePath) => !matchesAnyExactPattern(filePath, forceExcludes, baseDir));
|
|
486
|
-
}
|
|
487
|
-
return new Set(result);
|
|
488
|
-
}
|
|
489
368
|
/**
|
|
490
369
|
* Default PackageManager implementation.
|
|
491
370
|
*
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function isEnabledByOverrides(filePath: string, patterns: string[], baseDir: string): boolean;
|
|
2
|
+
/**
|
|
3
|
+
* Apply resource include/exclude patterns to paths.
|
|
4
|
+
*
|
|
5
|
+
* Plain patterns include glob matches, `!pattern` excludes glob matches,
|
|
6
|
+
* `+path` force-includes an exact path, and `-path` force-excludes one.
|
|
7
|
+
*/
|
|
8
|
+
export declare function applyPatterns(allPaths: string[], patterns: string[], baseDir: string): Set<string>;
|
|
9
|
+
//# sourceMappingURL=resource-patterns.d.ts.map
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Minimatch } from 'minimatch';
|
|
2
|
+
import { basename, dirname, relative, sep } from 'node:path';
|
|
3
|
+
const RESOURCE_PATTERN_OPTIONS = {
|
|
4
|
+
// Resource filters have always been case-sensitive on every platform. Keep
|
|
5
|
+
// that contract explicit rather than inheriting platform-specific behavior.
|
|
6
|
+
nocase: false,
|
|
7
|
+
// Preserve the minimatch semantics used before these helpers were extracted.
|
|
8
|
+
nocomment: false,
|
|
9
|
+
nonegate: false
|
|
10
|
+
};
|
|
11
|
+
function compilePatterns(patterns) {
|
|
12
|
+
return patterns.map((pattern) => new Minimatch(normalizePathSeparators(pattern), RESOURCE_PATTERN_OPTIONS));
|
|
13
|
+
}
|
|
14
|
+
function normalizePathSeparators(path) {
|
|
15
|
+
return path.split(sep).join('/');
|
|
16
|
+
}
|
|
17
|
+
function matchCandidates(filePath, baseDir) {
|
|
18
|
+
const relativePath = relative(baseDir, filePath);
|
|
19
|
+
const candidates = [relativePath, basename(filePath), filePath];
|
|
20
|
+
if (basename(filePath) === 'SKILL.md') {
|
|
21
|
+
const parentDir = dirname(filePath);
|
|
22
|
+
candidates.push(relative(baseDir, parentDir), basename(parentDir), parentDir);
|
|
23
|
+
}
|
|
24
|
+
return candidates.map(normalizePathSeparators);
|
|
25
|
+
}
|
|
26
|
+
function matchesAnyPattern(filePath, patterns, baseDir) {
|
|
27
|
+
const candidates = matchCandidates(filePath, baseDir);
|
|
28
|
+
return patterns.some((pattern) => candidates.some((candidate) => pattern.match(candidate)));
|
|
29
|
+
}
|
|
30
|
+
function normalizeExactPattern(pattern) {
|
|
31
|
+
pattern = normalizePathSeparators(pattern);
|
|
32
|
+
if (pattern.startsWith('./') || pattern.startsWith('.\\')) {
|
|
33
|
+
return pattern.slice(2);
|
|
34
|
+
}
|
|
35
|
+
return pattern;
|
|
36
|
+
}
|
|
37
|
+
function matchesAnyExactPattern(filePath, patterns, baseDir) {
|
|
38
|
+
if (patterns.length === 0)
|
|
39
|
+
return false;
|
|
40
|
+
const relativePath = normalizePathSeparators(relative(baseDir, filePath));
|
|
41
|
+
const candidates = [relativePath, normalizePathSeparators(filePath)];
|
|
42
|
+
if (basename(filePath) === 'SKILL.md') {
|
|
43
|
+
const parentDir = dirname(filePath);
|
|
44
|
+
candidates.push(normalizePathSeparators(relative(baseDir, parentDir)), normalizePathSeparators(parentDir));
|
|
45
|
+
}
|
|
46
|
+
return patterns.some((pattern) => candidates.includes(normalizeExactPattern(pattern)));
|
|
47
|
+
}
|
|
48
|
+
function getOverridePatterns(entries) {
|
|
49
|
+
return entries.filter((pattern) => pattern.startsWith('!') || pattern.startsWith('+') || pattern.startsWith('-'));
|
|
50
|
+
}
|
|
51
|
+
export function isEnabledByOverrides(filePath, patterns, baseDir) {
|
|
52
|
+
const overrides = getOverridePatterns(patterns);
|
|
53
|
+
const excludes = overrides
|
|
54
|
+
.filter((pattern) => pattern.startsWith('!'))
|
|
55
|
+
.map((pattern) => pattern.slice(1));
|
|
56
|
+
const forceIncludes = overrides
|
|
57
|
+
.filter((pattern) => pattern.startsWith('+'))
|
|
58
|
+
.map((pattern) => pattern.slice(1));
|
|
59
|
+
const forceExcludes = overrides
|
|
60
|
+
.filter((pattern) => pattern.startsWith('-'))
|
|
61
|
+
.map((pattern) => pattern.slice(1));
|
|
62
|
+
const excludeMatchers = compilePatterns(excludes);
|
|
63
|
+
let enabled = true;
|
|
64
|
+
if (excludeMatchers.length > 0 && matchesAnyPattern(filePath, excludeMatchers, baseDir)) {
|
|
65
|
+
enabled = false;
|
|
66
|
+
}
|
|
67
|
+
if (forceIncludes.length > 0 && matchesAnyExactPattern(filePath, forceIncludes, baseDir)) {
|
|
68
|
+
enabled = true;
|
|
69
|
+
}
|
|
70
|
+
if (forceExcludes.length > 0 && matchesAnyExactPattern(filePath, forceExcludes, baseDir)) {
|
|
71
|
+
enabled = false;
|
|
72
|
+
}
|
|
73
|
+
return enabled;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Apply resource include/exclude patterns to paths.
|
|
77
|
+
*
|
|
78
|
+
* Plain patterns include glob matches, `!pattern` excludes glob matches,
|
|
79
|
+
* `+path` force-includes an exact path, and `-path` force-excludes one.
|
|
80
|
+
*/
|
|
81
|
+
export function applyPatterns(allPaths, patterns, baseDir) {
|
|
82
|
+
const includes = [];
|
|
83
|
+
const excludes = [];
|
|
84
|
+
const forceIncludes = [];
|
|
85
|
+
const forceExcludes = [];
|
|
86
|
+
for (const pattern of patterns) {
|
|
87
|
+
if (pattern.startsWith('+')) {
|
|
88
|
+
forceIncludes.push(pattern.slice(1));
|
|
89
|
+
}
|
|
90
|
+
else if (pattern.startsWith('-')) {
|
|
91
|
+
forceExcludes.push(pattern.slice(1));
|
|
92
|
+
}
|
|
93
|
+
else if (pattern.startsWith('!')) {
|
|
94
|
+
excludes.push(pattern.slice(1));
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
includes.push(pattern);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const includeMatchers = compilePatterns(includes);
|
|
101
|
+
const excludeMatchers = compilePatterns(excludes);
|
|
102
|
+
let result = includeMatchers.length === 0
|
|
103
|
+
? [...allPaths]
|
|
104
|
+
: allPaths.filter((filePath) => matchesAnyPattern(filePath, includeMatchers, baseDir));
|
|
105
|
+
if (excludeMatchers.length > 0) {
|
|
106
|
+
result = result.filter((filePath) => !matchesAnyPattern(filePath, excludeMatchers, baseDir));
|
|
107
|
+
}
|
|
108
|
+
for (const filePath of allPaths) {
|
|
109
|
+
if (forceIncludes.length > 0 &&
|
|
110
|
+
!result.includes(filePath) &&
|
|
111
|
+
matchesAnyExactPattern(filePath, forceIncludes, baseDir)) {
|
|
112
|
+
result.push(filePath);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (forceExcludes.length > 0) {
|
|
116
|
+
result = result.filter((filePath) => !matchesAnyExactPattern(filePath, forceExcludes, baseDir));
|
|
117
|
+
}
|
|
118
|
+
return new Set(result);
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=resource-patterns.js.map
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Global concurrency is still capped to avoid overwhelming the LLM proxy.
|
|
16
16
|
*/
|
|
17
|
-
import type { AssistantMessage, Message, Model,
|
|
18
|
-
import type { ToolDefinition, ToolExecutionContext } from '../../core/core-types.js';
|
|
17
|
+
import type { AssistantMessage, Message, Model, ToolCall } from '../../ai/types.js';
|
|
18
|
+
import type { ThinkingLevel, ToolDefinition, ToolExecutionContext } from '../../core/core-types.js';
|
|
19
19
|
import type { ShortcutAuthRecovery } from '../providers/shortcut-auth-recovery.js';
|
|
20
20
|
export type { ThinkingLevel };
|
|
21
21
|
export interface ForkedAgentParentContext {
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Stable deps (agent, registries, managers) are constructor-injected.
|
|
7
7
|
* Part of the AgentSession extracted modules.
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import { resolveModelReasoningLevel } from '../../ai/models.js';
|
|
10
|
+
import { computeNextModel, cycleThinkingLevel as computeNextThinkingLevel, filterInteractiveSelectableModels } from './session-models.js';
|
|
10
11
|
// ============================================================================
|
|
11
12
|
// Manager
|
|
12
13
|
// ============================================================================
|
|
@@ -47,7 +48,7 @@ export class ModelManager {
|
|
|
47
48
|
}
|
|
48
49
|
/** Set thinking level, clamped to model capabilities. Persists only on change. */
|
|
49
50
|
setThinkingLevel(level) {
|
|
50
|
-
const effective =
|
|
51
|
+
const effective = resolveModelReasoningLevel(this._agent.state.model, level);
|
|
51
52
|
const isChanging = effective !== this._agent.state.thinkingLevel;
|
|
52
53
|
this._agent.setThinkingLevel(effective);
|
|
53
54
|
if (isChanging) {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* existing sessions. Each function takes an explicit params object containing
|
|
6
6
|
* the dependencies it needs, rather than reaching into class state.
|
|
7
7
|
*/
|
|
8
|
+
import { resolveModelReasoningLevel } from '../../ai/models.js';
|
|
8
9
|
import { configureAgentTempDir } from '../../config.js';
|
|
9
|
-
import { DEFAULT_THINKING_LEVEL } from '../../core/index.js';
|
|
10
10
|
/**
|
|
11
11
|
* Create a new session, optionally with initial messages and parent tracking.
|
|
12
12
|
* Returns true if completed, false if cancelled by extension.
|
|
@@ -119,7 +119,8 @@ export async function executeSwitchSession(params) {
|
|
|
119
119
|
const hasThinkingEntry = sessionManager
|
|
120
120
|
.getBranch()
|
|
121
121
|
.some((entry) => entry.type === 'thinking_level_change');
|
|
122
|
-
const defaultThinkingLevel = settingsManager.getDefaultThinkingLevel() ??
|
|
122
|
+
const defaultThinkingLevel = settingsManager.getDefaultThinkingLevel() ??
|
|
123
|
+
resolveModelReasoningLevel(agent.state.model, undefined);
|
|
123
124
|
if (hasThinkingEntry) {
|
|
124
125
|
// Restore thinking level if saved (setThinkingLevel clamps to model capabilities)
|
|
125
126
|
setThinkingLevel(sessionContext.thinkingLevel);
|
|
@@ -16,6 +16,8 @@ export interface ModelCycleResult {
|
|
|
16
16
|
export declare const THINKING_LEVELS: ThinkingLevel[];
|
|
17
17
|
/** Thinking levels including xhigh (for supported models) */
|
|
18
18
|
export declare const THINKING_LEVELS_WITH_XHIGH: ThinkingLevel[];
|
|
19
|
+
/** Complete ordering used only when clamping a stale selection after a model switch. */
|
|
20
|
+
export declare const ALL_THINKING_LEVELS: ThinkingLevel[];
|
|
19
21
|
/** Check if a model supports thinking/reasoning. */
|
|
20
22
|
export declare function supportsThinking(model: Model<any> | undefined): boolean;
|
|
21
23
|
/** Check if a model supports xhigh thinking. */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* AgentSession delegates to these for cycling math and level clamping,
|
|
6
6
|
* then handles persistence and extension events itself.
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { getModelReasoningLevels, modelsAreEqual } from '../../ai/models.js';
|
|
9
9
|
import { SHORTCUT_MODEL_ID, SHORTCUT_OPENAI_MODEL_ID } from '../../model-ids.js';
|
|
10
10
|
// ============================================================================
|
|
11
11
|
// Constants
|
|
@@ -21,6 +21,16 @@ export const THINKING_LEVELS_WITH_XHIGH = [
|
|
|
21
21
|
'high',
|
|
22
22
|
'xhigh'
|
|
23
23
|
];
|
|
24
|
+
/** Complete ordering used only when clamping a stale selection after a model switch. */
|
|
25
|
+
export const ALL_THINKING_LEVELS = [
|
|
26
|
+
'off',
|
|
27
|
+
'minimal',
|
|
28
|
+
'low',
|
|
29
|
+
'medium',
|
|
30
|
+
'high',
|
|
31
|
+
'xhigh',
|
|
32
|
+
'max'
|
|
33
|
+
];
|
|
24
34
|
/** Models shown in interactive model controls for known providers. Unlisted providers show all. */
|
|
25
35
|
const INTERACTIVE_MODELS_PER_PROVIDER = {
|
|
26
36
|
shortcut: new Set([
|
|
@@ -42,13 +52,11 @@ export function supportsThinking(model) {
|
|
|
42
52
|
}
|
|
43
53
|
/** Check if a model supports xhigh thinking. */
|
|
44
54
|
export function supportsXhighThinking(model) {
|
|
45
|
-
return model ?
|
|
55
|
+
return model ? getModelReasoningLevels(model).includes('xhigh') : false;
|
|
46
56
|
}
|
|
47
57
|
/** Get available thinking levels for a given model. */
|
|
48
58
|
export function getAvailableThinkingLevels(model) {
|
|
49
|
-
|
|
50
|
-
return ['off'];
|
|
51
|
-
return supportsXhighThinking(model) ? THINKING_LEVELS_WITH_XHIGH : THINKING_LEVELS;
|
|
59
|
+
return model ? getModelReasoningLevels(model) : ['off'];
|
|
52
60
|
}
|
|
53
61
|
/**
|
|
54
62
|
* Clamp a thinking level to the nearest available level.
|
|
@@ -57,7 +65,7 @@ export function getAvailableThinkingLevels(model) {
|
|
|
57
65
|
export function clampThinkingLevel(level, availableLevels) {
|
|
58
66
|
if (availableLevels.includes(level))
|
|
59
67
|
return level;
|
|
60
|
-
const ordered =
|
|
68
|
+
const ordered = ALL_THINKING_LEVELS;
|
|
61
69
|
const available = new Set(availableLevels);
|
|
62
70
|
const requestedIndex = ordered.indexOf(level);
|
|
63
71
|
if (requestedIndex === -1) {
|
|
@@ -93,7 +93,7 @@ export interface Settings {
|
|
|
93
93
|
lastChangelogVersion?: string;
|
|
94
94
|
defaultProvider?: string;
|
|
95
95
|
defaultModel?: string;
|
|
96
|
-
defaultThinkingLevel?: 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
96
|
+
defaultThinkingLevel?: 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
97
97
|
transport?: TransportSetting;
|
|
98
98
|
steeringMode?: 'all' | 'one-at-a-time';
|
|
99
99
|
followUpMode?: 'all' | 'one-at-a-time';
|
|
@@ -220,8 +220,8 @@ export declare class SettingsManager {
|
|
|
220
220
|
getFollowUpMode(): 'all' | 'one-at-a-time';
|
|
221
221
|
getTheme(): string | undefined;
|
|
222
222
|
setTheme(theme: string): void;
|
|
223
|
-
getDefaultThinkingLevel(): 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | undefined;
|
|
224
|
-
setDefaultThinkingLevel(level: 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'): void;
|
|
223
|
+
getDefaultThinkingLevel(): 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | undefined;
|
|
224
|
+
setDefaultThinkingLevel(level: 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'): void;
|
|
225
225
|
getTransport(): TransportSetting;
|
|
226
226
|
getRetryEnabled(): boolean;
|
|
227
227
|
setRetryEnabled(enabled: boolean): void;
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { type CellEdit, type SheetEnginePool } from '@shortcut/mog-sandbox-runtime';
|
|
9
9
|
import type { ToolDefinition } from '../../../../core/core-types.js';
|
|
10
|
+
import { type ApprovalGate } from '../../../approvals/types.js';
|
|
11
|
+
import type { ExcelApprovalPayload } from '../../../local/tools/execute-code/approval-payload.js';
|
|
10
12
|
interface SheetExecResult {
|
|
11
13
|
ok: boolean;
|
|
12
14
|
output?: string;
|
|
@@ -20,6 +22,6 @@ declare const schema: import("@sinclair/typebox").TObject<{
|
|
|
20
22
|
description: import("@sinclair/typebox").TString;
|
|
21
23
|
code: import("@sinclair/typebox").TString;
|
|
22
24
|
}>;
|
|
23
|
-
export declare function createSheetExecTool(pool: SheetEnginePool): ToolDefinition<typeof schema, SheetExecResult>;
|
|
25
|
+
export declare function createSheetExecTool(pool: SheetEnginePool, approval?: ApprovalGate<ExcelApprovalPayload>): ToolDefinition<typeof schema, SheetExecResult>;
|
|
24
26
|
export {};
|
|
25
27
|
//# sourceMappingURL=mog.d.ts.map
|
|
@@ -11,6 +11,8 @@ import * as vm from 'node:vm';
|
|
|
11
11
|
import * as ts from 'typescript';
|
|
12
12
|
import { EXECUTE_CODE } from '../../../../tool-names.js';
|
|
13
13
|
import { truncateOutput } from '../../../../utils/truncate.js';
|
|
14
|
+
import { withPreApproval } from '../../../approvals/tool-approval.js';
|
|
15
|
+
import { APPROVAL } from '../../../approvals/types.js';
|
|
14
16
|
function transpileTS(code) {
|
|
15
17
|
const result = ts.transpileModule(code, {
|
|
16
18
|
compilerOptions: {
|
|
@@ -71,7 +73,7 @@ const schema = Type.Object({
|
|
|
71
73
|
description: 'TypeScript code to execute. Use the available globals documented in the tool description. Use console.log() to return values. All API methods are async — use await.'
|
|
72
74
|
})
|
|
73
75
|
});
|
|
74
|
-
export function createSheetExecTool(pool) {
|
|
76
|
+
export function createSheetExecTool(pool, approval) {
|
|
75
77
|
const assertSpreadsheetPolicy = (ctx) => {
|
|
76
78
|
const spreadsheetPolicy = ctx?.permissionPolicy?.spreadsheet;
|
|
77
79
|
if (!spreadsheetPolicy || spreadsheetPolicy.mutationBehavior !== 'deny') {
|
|
@@ -79,7 +81,7 @@ export function createSheetExecTool(pool) {
|
|
|
79
81
|
}
|
|
80
82
|
throw new Error('Spreadsheet execution is denied by the current permission policy.');
|
|
81
83
|
};
|
|
82
|
-
|
|
84
|
+
const tool = {
|
|
83
85
|
name: EXECUTE_CODE,
|
|
84
86
|
label: 'Sheet exec',
|
|
85
87
|
description: TOOL_DESCRIPTION,
|
|
@@ -171,5 +173,19 @@ export function createSheetExecTool(pool) {
|
|
|
171
173
|
};
|
|
172
174
|
}
|
|
173
175
|
};
|
|
176
|
+
if (!approval)
|
|
177
|
+
return tool;
|
|
178
|
+
return withPreApproval(tool, approval, (params) => ({
|
|
179
|
+
kind: EXECUTE_CODE,
|
|
180
|
+
title: 'Review spreadsheet operation',
|
|
181
|
+
choices: [APPROVAL.ACCEPT, APPROVAL.ACCEPT_ALL, APPROVAL.REJECT],
|
|
182
|
+
payload: {
|
|
183
|
+
kind: 'diff',
|
|
184
|
+
description: String(params.description ?? '').trim() || 'Updating the workbook'
|
|
185
|
+
}
|
|
186
|
+
}), {
|
|
187
|
+
isContentSafe: (_params, ctx) => ctx?.permissionPolicy?.spreadsheet.mutationBehavior === 'allow',
|
|
188
|
+
isHeadlessApprovalAllowed: (ctx) => ctx?.permissionPolicy?.spreadsheet.allowHeadlessApproval === true
|
|
189
|
+
});
|
|
174
190
|
}
|
|
175
191
|
//# sourceMappingURL=mog.js.map
|
package/dist/app/tools/bash.js
CHANGED
|
@@ -19,7 +19,7 @@ const TOOL_DESCRIPTION_BASE = `
|
|
|
19
19
|
Execute a bash command in the current working directory. Returns stdout and stderr.
|
|
20
20
|
Output is truncated to ${DEFAULT_MAX_CHARS} characters. If truncated, full output is saved to a temp file.
|
|
21
21
|
For external APIs, prefer Python packages over raw curl (e.g. yfinance for market data). pip install if missing.
|
|
22
|
-
Default timeout is
|
|
22
|
+
Default timeout is 60 seconds. Override with the timeout parameter for long-running commands.
|
|
23
23
|
`;
|
|
24
24
|
const WINDOWS_SECTION = `
|
|
25
25
|
Python and pip are available for data processing, scripting, and package installation.
|
|
@@ -75,7 +75,7 @@ const bashSchema = Type.Object({
|
|
|
75
75
|
}),
|
|
76
76
|
command: Type.String({ description: 'Bash command to execute' }),
|
|
77
77
|
timeout: Type.Optional(Type.Number({
|
|
78
|
-
description: 'Timeout in seconds (default:
|
|
78
|
+
description: 'Timeout in seconds (default: 60). Increase for long-running commands.'
|
|
79
79
|
})),
|
|
80
80
|
connections: Type.Optional(Type.Array(Type.String(), {
|
|
81
81
|
description: 'Names of configured connections whose credentials should be injected as environment variables for this command. ' +
|
|
@@ -209,7 +209,7 @@ export function createBashTool(cwd, options) {
|
|
|
209
209
|
parameters: bashSchema,
|
|
210
210
|
execute: async (_toolCallId, { command, timeout: explicitTimeout, connections }, signal, onUpdate, ctx) => {
|
|
211
211
|
assertShellPolicy(command, ctx);
|
|
212
|
-
const timeout = explicitTimeout ??
|
|
212
|
+
const timeout = explicitTimeout ?? 60;
|
|
213
213
|
const resolvedCommand = commandPrefix ? `${commandPrefix}\n${command}` : command;
|
|
214
214
|
// Resolve connection credentials into env vars for this subprocess only
|
|
215
215
|
let connectionEnv;
|
|
@@ -14,6 +14,7 @@ export type ExecuteCodeFactoryOptions = {
|
|
|
14
14
|
} | {
|
|
15
15
|
platform: 'mog';
|
|
16
16
|
pool: SheetEnginePool;
|
|
17
|
+
approval?: ApprovalGate<ExcelApprovalPayload>;
|
|
17
18
|
};
|
|
18
19
|
export type ExecuteCodeTool = ReturnType<typeof createExcelExecTool> | ReturnType<typeof createSheetExecTool>;
|
|
19
20
|
/**
|
|
@@ -13,7 +13,9 @@ export function createExecuteCodeTool(options) {
|
|
|
13
13
|
}
|
|
14
14
|
return createExcelExecTool(options.httpPort, options.approval, options.observability);
|
|
15
15
|
case 'mog':
|
|
16
|
-
return
|
|
16
|
+
return options.approval
|
|
17
|
+
? createSheetExecTool(options.pool, options.approval)
|
|
18
|
+
: createSheetExecTool(options.pool);
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { readdirSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
const SKIPPED_DIRECTORIES = new Set(['.git', 'node_modules']);
|
|
4
|
+
/** Find repository ignore files without traversing dependency or Git metadata directories. */
|
|
5
|
+
export function collectGitignoreFiles(rootDir) {
|
|
6
|
+
const pendingDirectories = [rootDir];
|
|
7
|
+
const gitignoreFiles = [];
|
|
8
|
+
while (pendingDirectories.length > 0) {
|
|
9
|
+
const currentDir = pendingDirectories.pop();
|
|
10
|
+
if (!currentDir)
|
|
11
|
+
continue;
|
|
12
|
+
let entries;
|
|
13
|
+
try {
|
|
14
|
+
entries = readdirSync(currentDir, { withFileTypes: true });
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
for (const entry of entries) {
|
|
20
|
+
if (entry.isDirectory()) {
|
|
21
|
+
if (!SKIPPED_DIRECTORIES.has(entry.name)) {
|
|
22
|
+
pendingDirectories.push(join(currentDir, entry.name));
|
|
23
|
+
}
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if (entry.name === '.gitignore' && (entry.isFile() || entry.isSymbolicLink())) {
|
|
27
|
+
gitignoreFiles.push(join(currentDir, entry.name));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return gitignoreFiles.sort();
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=find-ignore-files.js.map
|
package/dist/app/tools/find.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Type } from '@sinclair/typebox';
|
|
2
2
|
import { spawnSync } from 'child_process';
|
|
3
3
|
import { existsSync } from 'fs';
|
|
4
|
-
import { globSync } from 'glob';
|
|
5
4
|
import path from 'path';
|
|
6
5
|
import { resolveToCwd } from '../../shared/files/path-utils.js';
|
|
7
6
|
import { FIND } from '../../tool-names.js';
|
|
@@ -9,6 +8,7 @@ import { ABORT_AGENT_MESSAGE } from '../../utils/abort.js';
|
|
|
9
8
|
import { DEFAULT_MAX_CHARS, formatSize, truncateHead } from '../../utils/truncate.js';
|
|
10
9
|
import { enforceFilesystemPolicy } from '../permissions/filesystem-policy.js';
|
|
11
10
|
import { requirePermissionPolicy } from '../permissions/require-policy.js';
|
|
11
|
+
import { collectGitignoreFiles } from './find-ignore-files.js';
|
|
12
12
|
import { ensureTool } from './tool-binaries.js';
|
|
13
13
|
const findSchema = Type.Object({
|
|
14
14
|
pattern: Type.String({
|
|
@@ -114,26 +114,7 @@ export function createFindTool(cwd, options) {
|
|
|
114
114
|
String(effectiveLimit)
|
|
115
115
|
];
|
|
116
116
|
// Include .gitignore files
|
|
117
|
-
const
|
|
118
|
-
const rootGitignore = path.join(searchPath, '.gitignore');
|
|
119
|
-
if (existsSync(rootGitignore)) {
|
|
120
|
-
gitignoreFiles.add(rootGitignore);
|
|
121
|
-
}
|
|
122
|
-
try {
|
|
123
|
-
const nestedGitignores = globSync('**/.gitignore', {
|
|
124
|
-
cwd: searchPath,
|
|
125
|
-
dot: true,
|
|
126
|
-
absolute: true,
|
|
127
|
-
ignore: ['**/node_modules/**', '**/.git/**']
|
|
128
|
-
});
|
|
129
|
-
for (const file of nestedGitignores) {
|
|
130
|
-
gitignoreFiles.add(file);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
catch {
|
|
134
|
-
// Ignore glob errors
|
|
135
|
-
}
|
|
136
|
-
for (const gitignorePath of gitignoreFiles) {
|
|
117
|
+
for (const gitignorePath of collectGitignoreFiles(searchPath)) {
|
|
137
118
|
args.push('--ignore-file', gitignorePath);
|
|
138
119
|
}
|
|
139
120
|
args.push(pattern, searchPath);
|
|
@@ -224,8 +224,6 @@ export function createLlmAnalysisTool() {
|
|
|
224
224
|
text = await extCtx.shortcutLlmProxy.collectText({
|
|
225
225
|
model: MODELS[selectedModel],
|
|
226
226
|
messages,
|
|
227
|
-
effort_level: 'low',
|
|
228
|
-
thinking_type: 'off',
|
|
229
227
|
llmOperation: 'llm_analysis'
|
|
230
228
|
}, { signal });
|
|
231
229
|
}
|
|
@@ -12,7 +12,7 @@ declare const schema: import("@sinclair/typebox").TObject<{
|
|
|
12
12
|
query: import("@sinclair/typebox").TString;
|
|
13
13
|
progressFolder: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
14
14
|
model: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
15
|
-
thinkingLevel: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"minimal" | "low" | "medium" | "high" | "xhigh" | "
|
|
15
|
+
thinkingLevel: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">[]>>;
|
|
16
16
|
}>;
|
|
17
17
|
/** Build the `refresh_context` tool that schedules a fresh session for autonomous workflows. */
|
|
18
18
|
export declare function createRefreshContextTool(session: () => AgentSession): ToolDefinition<typeof schema>;
|
|
@@ -16,7 +16,7 @@ const schema = Type.Object({
|
|
|
16
16
|
description: 'User-requested model to use for subsequent turns. Use provider/model-id, or a bare exact model id if unambiguous.'
|
|
17
17
|
})),
|
|
18
18
|
thinking_level: Type.Optional(Type.String({
|
|
19
|
-
description: 'User-requested thinking level for subsequent turns: off, minimal, low, medium, high, or
|
|
19
|
+
description: 'User-requested thinking level for subsequent turns: off, minimal, low, medium, high, xhigh, or max.'
|
|
20
20
|
}))
|
|
21
21
|
});
|
|
22
22
|
function textResult(text, isError = false) {
|
|
@@ -50,7 +50,7 @@ export function createUpdateSessionSettingsTool(session) {
|
|
|
50
50
|
let targetThinking;
|
|
51
51
|
if (requestedThinking !== undefined) {
|
|
52
52
|
if (!isValidThinkingLevel(requestedThinking)) {
|
|
53
|
-
return textResult(`Invalid thinking_level "${requestedThinking}". Allowed: off, minimal, low, medium, high, xhigh.`, true);
|
|
53
|
+
return textResult(`Invalid thinking_level "${requestedThinking}". Allowed: off, minimal, low, medium, high, xhigh, max.`, true);
|
|
54
54
|
}
|
|
55
55
|
const availableThinking = getAvailableThinkingLevels(targetModel);
|
|
56
56
|
if (!availableThinking.includes(requestedThinking)) {
|