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,13 +4,10 @@
|
|
|
4
4
|
* Explores the workbook, asks clarifying questions, and produces an
|
|
5
5
|
* implementation plan before switching to action mode for execution.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { EXECUTE_CODE, EXECUTE_TOOL, FIND, GET_TOOL_INFO, GREP, LLM_ANALYSIS, LS, MCP_TOOL_NAMES, PLAN_SWITCH_MODE, READ, TAKE_SCREENSHOT } from '../../../tool-names.js';
|
|
8
|
+
import { PLAN_MODE_METADATA } from '../metadata.js';
|
|
9
9
|
import { buildPlanPrompt } from './prompt.js';
|
|
10
|
-
const DESCRIPTION = `\
|
|
11
|
-
Read-only planning mode for exploration, clarifying requirements and drafting an implementation plan.`;
|
|
12
10
|
const TOOLS = [
|
|
13
|
-
BASH,
|
|
14
11
|
EXECUTE_CODE,
|
|
15
12
|
READ,
|
|
16
13
|
GREP,
|
|
@@ -25,11 +22,11 @@ const TOOLS = [
|
|
|
25
22
|
];
|
|
26
23
|
export function planAgent() {
|
|
27
24
|
return {
|
|
28
|
-
name:
|
|
29
|
-
description:
|
|
25
|
+
name: PLAN_MODE_METADATA.name,
|
|
26
|
+
description: PLAN_MODE_METADATA.description,
|
|
30
27
|
systemPrompt: buildPlanPrompt(),
|
|
31
28
|
tools: TOOLS,
|
|
32
|
-
switchTo:
|
|
29
|
+
switchTo: PLAN_MODE_METADATA.switchTo
|
|
33
30
|
};
|
|
34
31
|
}
|
|
35
32
|
//# sourceMappingURL=agent.js.map
|
|
@@ -37,7 +37,7 @@ ${engine.execTool}
|
|
|
37
37
|
1. Gauge user experience: If unclear from their query, ASK about their spreadsheet familiarity first - then adapt all explanations accordingly (beginners need more context, experts want concise trade-offs)
|
|
38
38
|
2. After exploration: State (1) task understanding (MAX 3-4 lines), (2) list ALL open questions upfront with a brief description of each (e.g., "I need to clarify 3 things: 1) how to handle missing data, 2) whether to use formulas or static values, 3) where to place output"), (3) first question
|
|
39
39
|
3. ONE question per response. Before each question, state which open items remain (e.g., "Still need to resolve: output location, formula vs static values."). If a user's answer resolves multiple items, acknowledge that and move on. Do NOT re-count or renumber — just reference the open items by topic.
|
|
40
|
-
4.
|
|
40
|
+
4. Pass the final plan directly to switch_from_plan_mode(mode: "action", reason: "<the full plan>").
|
|
41
41
|
5. If plan rejected: Restart question cycle to understand needed changes
|
|
42
42
|
|
|
43
43
|
**Critical Rules:**
|
|
@@ -66,7 +66,7 @@ Structure:
|
|
|
66
66
|
- **[Bold question]?**
|
|
67
67
|
|
|
68
68
|
**Final Plan Format:**
|
|
69
|
-
|
|
69
|
+
Pass the full plan as markdown directly in the reason argument to switch_from_plan_mode(mode: "action", reason: "<the full plan>").
|
|
70
70
|
|
|
71
71
|
\`\`\`
|
|
72
72
|
Task: [One sentence]
|
|
@@ -83,7 +83,7 @@ Things to Watch Out For:
|
|
|
83
83
|
- [Key considerations and edge cases]
|
|
84
84
|
\`\`\`
|
|
85
85
|
|
|
86
|
-
MUST call switch_from_plan_mode(mode: "action",
|
|
86
|
+
MUST call switch_from_plan_mode(mode: "action", reason: "<the full plan>") - do NOT output plan directly.
|
|
87
87
|
`;
|
|
88
88
|
// ---------------------------------------------------------------------------
|
|
89
89
|
// Assembly
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { ToolExecutionContext } from '../../core/core-types.js';
|
|
8
8
|
import type { RuntimeFilesystemPermissionPolicy, RuntimeShellPermissionPolicy } from '../../core/permission-policy.js';
|
|
9
|
-
import { type ApprovalChoice, type ApprovalRequest, type BashApprovalData, type FileAccessApprovalData
|
|
9
|
+
import { type ApprovalChoice, type ApprovalRequest, type BashApprovalData, type FileAccessApprovalData } from '../approvals/types.js';
|
|
10
10
|
import type { SettingsManager } from '../settings-manager.js';
|
|
11
11
|
type RiskyShellOperationRule = {
|
|
12
12
|
label: string;
|
|
@@ -26,13 +26,9 @@ export declare function isFilesystemInvocationSafe(absolutePath: string, access:
|
|
|
26
26
|
export declare function applyFilesystemApprovalChoice(choice: ApprovalChoice, request: ApprovalRequest<FileAccessApprovalData>, access: 'read' | 'write', settingsManager: SettingsManager, ctx: ToolExecutionContext | undefined): ToolExecutionContext | undefined;
|
|
27
27
|
/** Build the approval request payload for a shell command. */
|
|
28
28
|
export declare function buildShellApprovalRequest(params: Record<string, unknown>, toolName: string): ApprovalRequest<BashApprovalData>;
|
|
29
|
-
/** Build the approval request payload for a task subagent spawn. */
|
|
30
|
-
export declare function buildTaskSpawnApprovalRequest(payload: TaskSpawnApprovalData): ApprovalRequest<TaskSpawnApprovalData>;
|
|
31
29
|
/** Check whether the shell policy allows invocations without prompting. */
|
|
32
30
|
export declare function isShellInvocationSafe(policy: RuntimeShellPermissionPolicy | undefined, command?: string): boolean;
|
|
33
31
|
/** Record an approved shell command on the tool execution context. */
|
|
34
32
|
export declare function applyShellApprovalChoice(ctx: ToolExecutionContext | undefined, params: Record<string, unknown>): ToolExecutionContext | undefined;
|
|
35
|
-
/** Translate a task-spawn approval choice into a one-shot subagent spawn grant. */
|
|
36
|
-
export declare function applyTaskSpawnApprovalChoice(ctx: ToolExecutionContext | undefined, request: ApprovalRequest<TaskSpawnApprovalData>, choice?: ApprovalChoice): ToolExecutionContext | undefined;
|
|
37
33
|
export {};
|
|
38
34
|
//# sourceMappingURL=runtime-approval-flow.d.ts.map
|
|
@@ -133,16 +133,6 @@ export function buildShellApprovalRequest(params, toolName) {
|
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
/** Build the approval request payload for a task subagent spawn. */
|
|
137
|
-
export function buildTaskSpawnApprovalRequest(payload) {
|
|
138
|
-
return {
|
|
139
|
-
kind: 'task',
|
|
140
|
-
title: 'Review subagent spawn',
|
|
141
|
-
choices: [APPROVAL.RUN_FOREGROUND, APPROVAL.RUN_BACKGROUND, APPROVAL.REJECT],
|
|
142
|
-
alwaysRequireExplicitApproval: true,
|
|
143
|
-
payload
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
136
|
/** Check whether the shell policy allows invocations without prompting. */
|
|
147
137
|
export function isShellInvocationSafe(policy, command) {
|
|
148
138
|
if (command !== undefined && hasRiskyShellOperation(command)) {
|
|
@@ -160,22 +150,4 @@ export function applyShellApprovalChoice(ctx, params) {
|
|
|
160
150
|
}
|
|
161
151
|
};
|
|
162
152
|
}
|
|
163
|
-
/** Translate a task-spawn approval choice into a one-shot subagent spawn grant. */
|
|
164
|
-
export function applyTaskSpawnApprovalChoice(ctx, request, choice = APPROVAL.ACCEPT) {
|
|
165
|
-
const runInBackground = choice === APPROVAL.RUN_BACKGROUND
|
|
166
|
-
? true
|
|
167
|
-
: choice === APPROVAL.RUN_FOREGROUND
|
|
168
|
-
? false
|
|
169
|
-
: request.payload.requestedRunInBackground;
|
|
170
|
-
return {
|
|
171
|
-
...ctx,
|
|
172
|
-
// Task spawn approval is a one-shot child launch authorization. Approved
|
|
173
|
-
// spawns become full-worker child sessions; the approval does not create a
|
|
174
|
-
// reusable grant for later task calls.
|
|
175
|
-
subagentSpawnGrant: {
|
|
176
|
-
fullWorker: true,
|
|
177
|
-
runInBackground
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
153
|
//# sourceMappingURL=runtime-approval-flow.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Central permission gate for deciding which runtime tool actions require approval. */
|
|
2
2
|
import type { ToolDefinition } from '../../core/core-types.js';
|
|
3
3
|
import { BASH, EDIT, EXECUTE_CODE, FIND, GREP, LS, READ, TASK, WRITE } from '../../tool-names.js';
|
|
4
|
-
import { type ApprovalGate, type BashApprovalData, type FileAccessApprovalData
|
|
4
|
+
import { type ApprovalGate, type BashApprovalData, type FileAccessApprovalData } from '../approvals/types.js';
|
|
5
5
|
import type { ShortcutClientLogger } from '../observability/client-logging/client-logger.js';
|
|
6
6
|
import type { SettingsManager } from '../settings-manager.js';
|
|
7
7
|
export type PermissionedRuntimeToolName = typeof READ | typeof WRITE | typeof EDIT | typeof LS | typeof FIND | typeof GREP | typeof BASH | typeof EXECUTE_CODE | typeof TASK;
|
|
@@ -43,7 +43,7 @@ export declare const TOOL_GATES: {
|
|
|
43
43
|
readonly kind: "self-gated";
|
|
44
44
|
};
|
|
45
45
|
readonly task: {
|
|
46
|
-
readonly kind: "
|
|
46
|
+
readonly kind: "passthrough";
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
export declare const PERMISSIONED_RUNTIME_TOOL_NAMES: PermissionedRuntimeToolName[];
|
|
@@ -53,7 +53,6 @@ export interface RegisterRuntimeToolDeps {
|
|
|
53
53
|
settingsManager?: SettingsManager;
|
|
54
54
|
filesystemApproval?: ApprovalGate<FileAccessApprovalData>;
|
|
55
55
|
shellApproval?: ApprovalGate<BashApprovalData>;
|
|
56
|
-
taskApproval?: ApprovalGate<TaskSpawnApprovalData>;
|
|
57
56
|
observability?: Pick<ShortcutClientLogger, 'info' | 'warn' | 'error'>;
|
|
58
57
|
}
|
|
59
58
|
/** Register a runtime tool with the appropriate permission/approval wrapper. */
|
|
@@ -2,10 +2,8 @@ import { resolveReadPath, resolveToCwd } from '../../shared/files/path-utils.js'
|
|
|
2
2
|
import { BASH, EDIT, EXECUTE_CODE, FIND, GREP, LS, READ, TASK, WRITE } from '../../tool-names.js';
|
|
3
3
|
import { withPreApproval } from '../approvals/tool-approval.js';
|
|
4
4
|
import { APPROVAL } from '../approvals/types.js';
|
|
5
|
-
import { getSubagent } from '../subagents/index.js';
|
|
6
|
-
import { readTaskQueryFile, resolveTaskQuery } from '../tools/task/query.js';
|
|
7
5
|
import { requirePermissionPolicy } from './require-policy.js';
|
|
8
|
-
import { applyFilesystemApprovalChoice, applyShellApprovalChoice,
|
|
6
|
+
import { applyFilesystemApprovalChoice, applyShellApprovalChoice, buildFilesystemApprovalRequest, buildShellApprovalRequest, describeFilesystemApprovalChoice, isFilesystemInvocationSafe, isShellInvocationSafe } from './runtime-approval-flow.js';
|
|
9
7
|
export const TOOL_GATES = {
|
|
10
8
|
[READ]: {
|
|
11
9
|
kind: 'filesystem',
|
|
@@ -39,7 +37,7 @@ export const TOOL_GATES = {
|
|
|
39
37
|
},
|
|
40
38
|
[BASH]: { kind: 'shell' },
|
|
41
39
|
[EXECUTE_CODE]: { kind: 'self-gated' },
|
|
42
|
-
[TASK]: { kind: '
|
|
40
|
+
[TASK]: { kind: 'passthrough' }
|
|
43
41
|
};
|
|
44
42
|
export const PERMISSIONED_RUNTIME_TOOL_NAMES = Object.keys(TOOL_GATES);
|
|
45
43
|
/** Type guard: check whether a tool name has a registered permission gate. */
|
|
@@ -175,80 +173,6 @@ function wrapShellTool(tool, deps) {
|
|
|
175
173
|
applyApprovalContext: async (ctx, params) => applyShellApprovalChoice(ctx, params)
|
|
176
174
|
});
|
|
177
175
|
}
|
|
178
|
-
/** Wrap the task tool with subagent-spawn approval and observability. */
|
|
179
|
-
function wrapTaskTool(tool, deps) {
|
|
180
|
-
if (!deps.taskApproval) {
|
|
181
|
-
return tool;
|
|
182
|
-
}
|
|
183
|
-
return wrapToolWithAgentApproval(tool, {
|
|
184
|
-
approval: deps.taskApproval,
|
|
185
|
-
buildRequest: (params) => {
|
|
186
|
-
const subagentType = String(params.subagent_type ?? '');
|
|
187
|
-
const subagent = getSubagent(subagentType);
|
|
188
|
-
let query;
|
|
189
|
-
if (typeof params.query_file === 'string' && params.query_file.trim().length > 0) {
|
|
190
|
-
try {
|
|
191
|
-
query = readTaskQueryFile(params.query_file);
|
|
192
|
-
}
|
|
193
|
-
catch {
|
|
194
|
-
query = params.query_file;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
query = resolveTaskQuery(String(params.query ?? ''));
|
|
199
|
-
}
|
|
200
|
-
return buildTaskSpawnApprovalRequest({
|
|
201
|
-
subagentType: String(params.subagent_type ?? ''),
|
|
202
|
-
name: String(params.name ?? ''),
|
|
203
|
-
query,
|
|
204
|
-
model: typeof params.model === 'string' ? params.model : undefined,
|
|
205
|
-
fullWorker: true,
|
|
206
|
-
canSpawnSubagents: subagent?.tools.includes(TASK) === true,
|
|
207
|
-
requestedRunInBackground: params.run_in_background === true
|
|
208
|
-
});
|
|
209
|
-
},
|
|
210
|
-
isContentSafe: (_params, ctx) => requirePermissionPolicy(ctx, tool.name).dangerouslySkipRuntimePermissions === true,
|
|
211
|
-
onRequested: (request) => {
|
|
212
|
-
deps.observability?.info({
|
|
213
|
-
module: 'tool',
|
|
214
|
-
event: 'tool_approval_requested',
|
|
215
|
-
data: {
|
|
216
|
-
tool_name: tool.name,
|
|
217
|
-
approval_kind: 'subagent_spawn',
|
|
218
|
-
subagent_type: request.payload.subagentType
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
},
|
|
222
|
-
onAccepted: (request, choice) => {
|
|
223
|
-
deps.observability?.info({
|
|
224
|
-
module: 'tool',
|
|
225
|
-
event: 'tool_approval_accepted',
|
|
226
|
-
data: {
|
|
227
|
-
tool_name: tool.name,
|
|
228
|
-
approval_kind: 'subagent_spawn',
|
|
229
|
-
accept_all: choice === APPROVAL.ACCEPT_ALL,
|
|
230
|
-
subagent_type: request.payload.subagentType
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
},
|
|
234
|
-
onRejected: (request) => {
|
|
235
|
-
deps.observability?.warn({
|
|
236
|
-
module: 'tool',
|
|
237
|
-
event: 'tool_approval_rejected',
|
|
238
|
-
data: {
|
|
239
|
-
tool_name: tool.name,
|
|
240
|
-
approval_kind: 'subagent_spawn',
|
|
241
|
-
subagent_type: request.payload.subagentType
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
},
|
|
245
|
-
isApprovedChoiceAllowed: (_request, choice) => choice === APPROVAL.ACCEPT ||
|
|
246
|
-
choice === APPROVAL.RUN_FOREGROUND ||
|
|
247
|
-
choice === APPROVAL.RUN_BACKGROUND,
|
|
248
|
-
describeApprovedChoice: (request) => `User approved subagent spawn: ${request.payload.name} [${request.payload.subagentType}]`,
|
|
249
|
-
applyApprovalContext: async (ctx, _params, request, choice) => applyTaskSpawnApprovalChoice(ctx, request, choice)
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
176
|
/** Register a runtime tool with the appropriate permission/approval wrapper. */
|
|
253
177
|
export function registerRuntimeTool(tools, tool, deps) {
|
|
254
178
|
if (!isPermissionedRuntimeToolName(tool.name)) {
|
|
@@ -263,10 +187,8 @@ export function registerRuntimeTool(tools, tool, deps) {
|
|
|
263
187
|
case 'shell':
|
|
264
188
|
tools.push(wrapShellTool(permissionedTool, deps));
|
|
265
189
|
return;
|
|
266
|
-
case 'task':
|
|
267
|
-
tools.push(wrapTaskTool(permissionedTool, deps));
|
|
268
|
-
return;
|
|
269
190
|
case 'self-gated':
|
|
191
|
+
case 'passthrough':
|
|
270
192
|
tools.push(permissionedTool);
|
|
271
193
|
}
|
|
272
194
|
}
|
|
@@ -52,7 +52,7 @@ Multiple agents may operate on the same Excel instance concurrently. Follow thes
|
|
|
52
52
|
|
|
53
53
|
### Guidelines
|
|
54
54
|
- Use wb.getWorkbookSummary() to get sheet names and used ranges for a workbook before deeper reads
|
|
55
|
-
- Use
|
|
55
|
+
- Use wrapper methods for cell writes so their exact destination ranges are tracked; raw COM writes execute but do not produce cell diffs. Use COM when no wrapper exists
|
|
56
56
|
- NEVER use Sheet.Copy — it silently creates new workbooks via pywin32. Use range.Copy for data transfer
|
|
57
57
|
- NEVER use Sheet.Move with keyword args (After=x, Before=x) — pywin32 bug creates new workbooks. Use wb.moveSheet(name, index) instead
|
|
58
58
|
- Watch out for indexing: COM collections are 1-based (ws.Cells(1,1) is A1), but Python tuples are 0-based
|
|
@@ -8,7 +8,7 @@ import { homedir } from 'node:os';
|
|
|
8
8
|
import { isAbsolute, join, resolve } from 'node:path';
|
|
9
9
|
import { CONFIG_DIR_NAME, getAgentDir, getBundledSkillsDir, isNewSheetEnabled } from '../../config.js';
|
|
10
10
|
import { RuntimeSkillSource } from '../../contracts/agent-resources.js';
|
|
11
|
-
import {
|
|
11
|
+
import { COMMUNICATION, DATA_FORMATTING, TASK_EXECUTION, WRITING_CODE } from '../../core/prompts/agent-guidelines.js';
|
|
12
12
|
import { buildMogHeadlessApiReferenceSection } from '../../utils/mog-headless-api-reference.js';
|
|
13
13
|
import { inferExternalSkillProviderFromPath } from '../resources/external-skill-roots.js';
|
|
14
14
|
import { loadSkills } from '../resources/skills.js';
|
|
@@ -31,6 +31,10 @@ const COM_RUNTIME_TROUBLESHOOTING = `## Debugging HTTP server health
|
|
|
31
31
|
- if a single Excel process is running and execute_code fails, it could be due to pop-up blockage. Confirm and debug however you can and then stop. Don't do anything fancy, just tell the user that nothing can proceed until popups are gone
|
|
32
32
|
- if that did not work, we need to close the excel process and restart it. Ask the user to save work, close Excel, and then re-open
|
|
33
33
|
- always wait ~2 seconds to health check`;
|
|
34
|
+
const LOCAL_FILE_LINKS = `
|
|
35
|
+
- Markdown file links will be rendered such that the user can click and open the file in their OS.
|
|
36
|
+
- For auditability, you MUST ALWAYS expose local filesystem changes to the user using Markdown links whose destination is the canonical absolute file URL.
|
|
37
|
+
- Keep the visible label concise while preserving the full path in the destination.`;
|
|
34
38
|
/**
|
|
35
39
|
* Return the correct engine prompts for the given engine.
|
|
36
40
|
*
|
|
@@ -112,10 +116,10 @@ export function buildCurrentSkillsSection(options = {}) {
|
|
|
112
116
|
// ---------------------------------------------------------------------------
|
|
113
117
|
/** Append action-mode shared guidelines + engine API reference to a sections array. */
|
|
114
118
|
export function pushActionSharedGuidelines(sections, engine) {
|
|
115
|
-
sections.push(
|
|
119
|
+
sections.push(TASK_EXECUTION, COMMUNICATION, LOCAL_FILE_LINKS, WRITING_CODE, DATA_FORMATTING, engine.apiGuidelines);
|
|
116
120
|
}
|
|
117
121
|
/** Append read-only shared guidelines + engine API reference to a sections array. */
|
|
118
122
|
export function pushReadOnlySharedGuidelines(sections, engine) {
|
|
119
|
-
sections.push(COMMUNICATION, engine.apiGuidelines);
|
|
123
|
+
sections.push(COMMUNICATION, LOCAL_FILE_LINKS, engine.apiGuidelines);
|
|
120
124
|
}
|
|
121
125
|
//# sourceMappingURL=shared-guidelines.js.map
|
|
@@ -15,15 +15,11 @@
|
|
|
15
15
|
* bodies reuse the shared Google converters so the wire format cannot drift from
|
|
16
16
|
* the built-in and embedded paths.
|
|
17
17
|
*/
|
|
18
|
-
import {
|
|
18
|
+
import { mapStopReasonString } from '../../ai/providers/google-shared.js';
|
|
19
|
+
import { buildGoogleVertexRequest, googleVertexGatewayEndpoint } from '../../ai/providers/google-vertex.js';
|
|
19
20
|
import { AssistantMessageEventStream } from '../../ai/utils/event-stream.js';
|
|
20
21
|
import { isContextOverflowErrorMessage } from '../../ai/utils/overflow.js';
|
|
21
|
-
import { sanitizeSurrogates } from '../../ai/utils/sanitize-unicode.js';
|
|
22
22
|
import { extractStructuredHttpErrorPayload, LLMErrorMetadataHeaders, parseStreamErrorPayload, safeModelStreamErrorMessage } from '../../contracts/model-stream.js';
|
|
23
|
-
// The gateway fronts Vertex with a fixed project/location; the CLI never needs
|
|
24
|
-
// real GCP project credentials. Mirrors the embedded transport's constants.
|
|
25
|
-
const GATEWAY_PROJECT = '-';
|
|
26
|
-
const GATEWAY_LOCATION = 'global';
|
|
27
23
|
class GoogleGatewayHttpError extends Error {
|
|
28
24
|
details;
|
|
29
25
|
constructor(details) {
|
|
@@ -43,49 +39,6 @@ function emptyUsage() {
|
|
|
43
39
|
totalTokens: 0
|
|
44
40
|
};
|
|
45
41
|
}
|
|
46
|
-
function normalizeBaseUrl(baseUrl) {
|
|
47
|
-
return baseUrl.replace(/\/+$/, '');
|
|
48
|
-
}
|
|
49
|
-
function gatewayEndpoint(baseUrl, modelId) {
|
|
50
|
-
const model = encodeURIComponent(modelId);
|
|
51
|
-
return (`${normalizeBaseUrl(baseUrl)}/v1/projects/${GATEWAY_PROJECT}` +
|
|
52
|
-
`/locations/${GATEWAY_LOCATION}/publishers/google/models/${model}:streamGenerateContent?alt=sse`);
|
|
53
|
-
}
|
|
54
|
-
function mapThinkingLevel(reasoning) {
|
|
55
|
-
switch (reasoning) {
|
|
56
|
-
case 'minimal':
|
|
57
|
-
return 'MINIMAL';
|
|
58
|
-
case 'low':
|
|
59
|
-
return 'LOW';
|
|
60
|
-
case 'medium':
|
|
61
|
-
return 'MEDIUM';
|
|
62
|
-
case 'high':
|
|
63
|
-
case 'xhigh':
|
|
64
|
-
return 'HIGH';
|
|
65
|
-
default:
|
|
66
|
-
return undefined;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
function buildRequestBody(model, context, options) {
|
|
70
|
-
const generationConfig = {};
|
|
71
|
-
if (options?.maxTokens !== undefined)
|
|
72
|
-
generationConfig.maxOutputTokens = options.maxTokens;
|
|
73
|
-
if (options?.temperature !== undefined)
|
|
74
|
-
generationConfig.temperature = options.temperature;
|
|
75
|
-
const thinkingLevel = model.reasoning ? mapThinkingLevel(options?.reasoning) : undefined;
|
|
76
|
-
if (thinkingLevel) {
|
|
77
|
-
generationConfig.thinkingConfig = { includeThoughts: true, thinkingLevel };
|
|
78
|
-
}
|
|
79
|
-
const tools = context.tools?.length ? convertTools(context.tools) : undefined;
|
|
80
|
-
return {
|
|
81
|
-
contents: convertMessages(model, context),
|
|
82
|
-
...(context.systemPrompt
|
|
83
|
-
? { systemInstruction: { parts: [{ text: sanitizeSurrogates(context.systemPrompt) }] } }
|
|
84
|
-
: {}),
|
|
85
|
-
...(tools ? { tools } : {}),
|
|
86
|
-
...(Object.keys(generationConfig).length > 0 ? { generationConfig } : {})
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
42
|
/** Parse Vertex SSE frames into decoded JSON payloads. */
|
|
90
43
|
async function* sseEvents(response) {
|
|
91
44
|
const parseFrame = (frame) => {
|
|
@@ -194,10 +147,10 @@ export function streamSimpleGoogleVertexGateway(model, context, options) {
|
|
|
194
147
|
let textIndex;
|
|
195
148
|
let stopReason = 'stop';
|
|
196
149
|
try {
|
|
197
|
-
const response = await (options?.fetch ?? fetch)(
|
|
150
|
+
const response = await (options?.fetch ?? fetch)(`${googleVertexGatewayEndpoint(model.baseUrl, model.id, 'streamGenerateContent')}?alt=sse`, {
|
|
198
151
|
method: 'POST',
|
|
199
152
|
headers: { 'content-type': 'application/json', ...options?.headers },
|
|
200
|
-
body: JSON.stringify(
|
|
153
|
+
body: JSON.stringify(buildGoogleVertexRequest(model, context, options)),
|
|
201
154
|
signal: options?.signal
|
|
202
155
|
});
|
|
203
156
|
if (!response.ok) {
|
|
@@ -36,6 +36,28 @@ const OpenAICompletionsCompatSchema = Type.Object({
|
|
|
36
36
|
openRouterRouting: Type.Optional(OpenRouterRoutingSchema),
|
|
37
37
|
vercelGatewayRouting: Type.Optional(VercelGatewayRoutingSchema)
|
|
38
38
|
});
|
|
39
|
+
const EnabledReasoningLevelSchema = Type.Union([
|
|
40
|
+
Type.Literal('minimal'),
|
|
41
|
+
Type.Literal('low'),
|
|
42
|
+
Type.Literal('medium'),
|
|
43
|
+
Type.Literal('high'),
|
|
44
|
+
Type.Literal('xhigh'),
|
|
45
|
+
Type.Literal('max')
|
|
46
|
+
]);
|
|
47
|
+
const ModelCapabilitiesSchema = Type.Object({
|
|
48
|
+
reasoning: Type.Optional(Type.Object({
|
|
49
|
+
control: Type.Union([
|
|
50
|
+
Type.Literal('adaptive-effort'),
|
|
51
|
+
Type.Literal('effort'),
|
|
52
|
+
Type.Literal('thinking-level'),
|
|
53
|
+
Type.Literal('budget'),
|
|
54
|
+
Type.Literal('fixed')
|
|
55
|
+
]),
|
|
56
|
+
levels: Type.Array(EnabledReasoningLevelSchema, { minItems: 1, uniqueItems: true }),
|
|
57
|
+
defaultLevel: EnabledReasoningLevelSchema,
|
|
58
|
+
supportsOff: Type.Boolean()
|
|
59
|
+
}))
|
|
60
|
+
});
|
|
39
61
|
// Schema for custom model definition
|
|
40
62
|
// Most fields are optional with sensible defaults for local models (Ollama, LM Studio, etc.)
|
|
41
63
|
const ModelDefinitionSchema = Type.Object({
|
|
@@ -52,6 +74,7 @@ const ModelDefinitionSchema = Type.Object({
|
|
|
52
74
|
})),
|
|
53
75
|
contextWindow: Type.Optional(Type.Number()),
|
|
54
76
|
maxTokens: Type.Optional(Type.Number()),
|
|
77
|
+
capabilities: Type.Optional(ModelCapabilitiesSchema),
|
|
55
78
|
headers: Type.Optional(Type.Record(Type.String(), Type.String())),
|
|
56
79
|
compat: Type.Optional(OpenAICompletionsCompatSchema)
|
|
57
80
|
});
|
|
@@ -68,6 +91,7 @@ const ModelOverrideSchema = Type.Object({
|
|
|
68
91
|
})),
|
|
69
92
|
contextWindow: Type.Optional(Type.Number()),
|
|
70
93
|
maxTokens: Type.Optional(Type.Number()),
|
|
94
|
+
capabilities: Type.Optional(ModelCapabilitiesSchema),
|
|
71
95
|
headers: Type.Optional(Type.Record(Type.String(), Type.String())),
|
|
72
96
|
compat: Type.Optional(OpenAICompletionsCompatSchema)
|
|
73
97
|
});
|
|
@@ -141,6 +165,9 @@ function applyModelOverride(model, override) {
|
|
|
141
165
|
result.contextWindow = override.contextWindow;
|
|
142
166
|
if (override.maxTokens !== undefined)
|
|
143
167
|
result.maxTokens = override.maxTokens;
|
|
168
|
+
if (override.capabilities !== undefined) {
|
|
169
|
+
result.capabilities = override.capabilities;
|
|
170
|
+
}
|
|
144
171
|
// Merge cost (partial override)
|
|
145
172
|
if (override.cost) {
|
|
146
173
|
result.cost = {
|
|
@@ -321,6 +348,12 @@ export class ModelRegistry {
|
|
|
321
348
|
}
|
|
322
349
|
}
|
|
323
350
|
validateConfig(config) {
|
|
351
|
+
const validateReasoningCapabilities = (label, capabilities) => {
|
|
352
|
+
const reasoning = capabilities?.reasoning;
|
|
353
|
+
if (reasoning && !reasoning.levels.includes(reasoning.defaultLevel)) {
|
|
354
|
+
throw new Error(`${label}: capabilities.reasoning.defaultLevel must be included in levels.`);
|
|
355
|
+
}
|
|
356
|
+
};
|
|
324
357
|
for (const [providerName, providerConfig] of Object.entries(config.providers)) {
|
|
325
358
|
const hasProviderApi = !!providerConfig.api;
|
|
326
359
|
const models = providerConfig.models ?? [];
|
|
@@ -352,6 +385,10 @@ export class ModelRegistry {
|
|
|
352
385
|
throw new Error(`Provider ${providerName}, model ${modelDef.id}: invalid contextWindow`);
|
|
353
386
|
if (modelDef.maxTokens !== undefined && modelDef.maxTokens <= 0)
|
|
354
387
|
throw new Error(`Provider ${providerName}, model ${modelDef.id}: invalid maxTokens`);
|
|
388
|
+
validateReasoningCapabilities(`Provider ${providerName}, model ${modelDef.id}`, modelDef.capabilities);
|
|
389
|
+
}
|
|
390
|
+
for (const [modelId, override] of Object.entries(providerConfig.modelOverrides ?? {})) {
|
|
391
|
+
validateReasoningCapabilities(`Provider ${providerName}, model override ${modelId}`, override.capabilities);
|
|
355
392
|
}
|
|
356
393
|
}
|
|
357
394
|
}
|
|
@@ -398,6 +435,7 @@ export class ModelRegistry {
|
|
|
398
435
|
cost: modelDef.cost ?? defaultCost,
|
|
399
436
|
contextWindow: modelDef.contextWindow ?? 128000,
|
|
400
437
|
maxTokens: modelDef.maxTokens ?? 16384,
|
|
438
|
+
capabilities: modelDef.capabilities,
|
|
401
439
|
headers,
|
|
402
440
|
compat: modelDef.compat
|
|
403
441
|
});
|
|
@@ -538,6 +576,7 @@ export class ModelRegistry {
|
|
|
538
576
|
cost: modelDef.cost,
|
|
539
577
|
contextWindow: modelDef.contextWindow,
|
|
540
578
|
maxTokens: modelDef.maxTokens,
|
|
579
|
+
capabilities: modelDef.capabilities,
|
|
541
580
|
headers,
|
|
542
581
|
compat: modelDef.compat
|
|
543
582
|
});
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Model resolution, scoping, and initial selection
|
|
3
3
|
*/
|
|
4
4
|
import chalk from 'chalk';
|
|
5
|
+
import { resolveModelReasoningLevel } from '../../ai/models.js';
|
|
5
6
|
import { DEFAULT_THINKING_LEVEL, isValidThinkingLevel } from '../../core/defaults.js';
|
|
6
7
|
import { SHORTCUT_MODEL_ID, SHORTCUT_OPENAI_MODEL_ID, SHORTCUT_PROVIDER_ID } from '../../model-ids.js';
|
|
7
8
|
export function formatModelRef(model) {
|
|
@@ -40,7 +41,7 @@ export const defaultModelPerProvider = {
|
|
|
40
41
|
anthropic: SHORTCUT_MODEL_ID.ClaudeOpus5,
|
|
41
42
|
openai: SHORTCUT_OPENAI_MODEL_ID,
|
|
42
43
|
'azure-openai-responses': SHORTCUT_OPENAI_MODEL_ID,
|
|
43
|
-
google: 'gemini-
|
|
44
|
+
google: 'gemini-3-flash-preview',
|
|
44
45
|
'google-vertex': 'gemini-3-pro-preview',
|
|
45
46
|
openrouter: `openai/${SHORTCUT_OPENAI_MODEL_ID}`,
|
|
46
47
|
'vercel-ai-gateway': 'anthropic/claude-opus-5',
|
|
@@ -321,16 +322,18 @@ export async function findInitialModel(options) {
|
|
|
321
322
|
console.error(chalk.red(`Model ${cliProvider}/${cliModel} not found`));
|
|
322
323
|
process.exit(1);
|
|
323
324
|
}
|
|
324
|
-
return {
|
|
325
|
+
return {
|
|
326
|
+
model: found,
|
|
327
|
+
thinkingLevel: resolveModelReasoningLevel(found, undefined),
|
|
328
|
+
fallbackMessage: undefined
|
|
329
|
+
};
|
|
325
330
|
}
|
|
326
331
|
// 2. Try saved default from settings
|
|
327
332
|
if (defaultProvider && defaultModelId) {
|
|
328
333
|
const found = modelRegistry.find(defaultProvider, defaultModelId);
|
|
329
334
|
if (found) {
|
|
330
335
|
model = found;
|
|
331
|
-
|
|
332
|
-
thinkingLevel = defaultThinkingLevel;
|
|
333
|
-
}
|
|
336
|
+
thinkingLevel = resolveModelReasoningLevel(found, defaultThinkingLevel);
|
|
334
337
|
return { model, thinkingLevel, fallbackMessage: undefined };
|
|
335
338
|
}
|
|
336
339
|
}
|
|
@@ -344,7 +347,7 @@ export async function findInitialModel(options) {
|
|
|
344
347
|
if (match) {
|
|
345
348
|
return {
|
|
346
349
|
model: match,
|
|
347
|
-
thinkingLevel:
|
|
350
|
+
thinkingLevel: resolveModelReasoningLevel(match, undefined),
|
|
348
351
|
fallbackMessage: undefined
|
|
349
352
|
};
|
|
350
353
|
}
|
|
@@ -353,7 +356,7 @@ export async function findInitialModel(options) {
|
|
|
353
356
|
// If no default found, use first available
|
|
354
357
|
return {
|
|
355
358
|
model: availableModels[0],
|
|
356
|
-
thinkingLevel:
|
|
359
|
+
thinkingLevel: resolveModelReasoningLevel(availableModels[0], undefined),
|
|
357
360
|
fallbackMessage: undefined
|
|
358
361
|
};
|
|
359
362
|
}
|
|
@@ -14,7 +14,7 @@ import { streamSimpleOpenAICompletions } from '../../ai/providers/openai-complet
|
|
|
14
14
|
import { streamSimpleOpenAIResponses } from '../../ai/providers/openai-responses.js';
|
|
15
15
|
import { createRunContinuationFetch } from '../../ai/run-continuation.js';
|
|
16
16
|
import { NPM_PACKAGE_NAME, VERSION } from '../../config.js';
|
|
17
|
-
import {
|
|
17
|
+
import { gatewayModelForTransport } from '../../embedded-agent/gateway-base-url.js';
|
|
18
18
|
import { OPENAI_PRIORITY_SERVICE_TIER, shortcutProviderFastModeForContext, shortcutSpeedFromOptions, withProviderFastModeHeaders, withProviderFastModePayloadOverride } from '../../embedded-agent/provider-fast-mode.js';
|
|
19
19
|
import { SHORTCUT_PROVIDER_ID } from '../../model-ids.js';
|
|
20
20
|
import { createShortcutModelDefinitions } from '../../shortcut-model-catalog.js';
|
|
@@ -58,6 +58,9 @@ function createShortcutApiV2AttributionHeaders(options) {
|
|
|
58
58
|
};
|
|
59
59
|
const userMessageId = headerValue(attribution?.userMessageId);
|
|
60
60
|
const continuationRunId = headerValue(attribution?.continuationRunId) ?? userMessageId;
|
|
61
|
+
const sessionId = headerValue(attribution?.sessionId);
|
|
62
|
+
if (sessionId)
|
|
63
|
+
headers['X-Session-Id'] = sessionId;
|
|
61
64
|
if (continuationRunId)
|
|
62
65
|
headers['X-Agent-Run-Id'] = continuationRunId;
|
|
63
66
|
if (userMessageId)
|
|
@@ -116,11 +119,7 @@ export function createShortcutApiV2Dispatcher(getExtraHeaders) {
|
|
|
116
119
|
// SDK appends "/chat/completions" to baseURL and needs the "/v1" segment;
|
|
117
120
|
// Anthropic builds its own full path). Shared with the standalone transports
|
|
118
121
|
// so the two paths cannot disagree.
|
|
119
|
-
const nativeModel =
|
|
120
|
-
...model,
|
|
121
|
-
api: transport,
|
|
122
|
-
baseUrl: gatewayBaseUrlForTransport(model.baseUrl, transport)
|
|
123
|
-
};
|
|
122
|
+
const nativeModel = gatewayModelForTransport(model, model.baseUrl, transport);
|
|
124
123
|
const providerFastModeKind = providerFastModeKindForTransport(transport);
|
|
125
124
|
const fastMode = providerFastModeKind
|
|
126
125
|
? shortcutProviderFastModeForContext({
|
|
@@ -143,6 +142,7 @@ export function createShortcutApiV2Dispatcher(getExtraHeaders) {
|
|
|
143
142
|
export function registerShortcutProvider(modelRegistry, apiV2Url, options) {
|
|
144
143
|
const getExtraHeaders = () => ({
|
|
145
144
|
'X-Client-Platform': 'shortcutxl',
|
|
145
|
+
'X-Client-Version': VERSION,
|
|
146
146
|
// Override the provider SDK's default User-Agent (e.g. "Anthropic/JS <ver>").
|
|
147
147
|
// The api-v2 gateway's WAF blocks provider-SDK user-agents to prevent the
|
|
148
148
|
// gateway being used as a raw upstream proxy, which otherwise surfaces to
|
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
* Returns `undefined` for anything else so callers can decide how to fail.
|
|
14
14
|
*/
|
|
15
15
|
import { SHORTCUT_MODEL_ID } from '../../model-ids.js';
|
|
16
|
+
import { resolveShortcutModelProtocol } from '../../shortcut-model-catalog.js';
|
|
16
17
|
export function resolveShortcutApiV2Transport(modelId) {
|
|
18
|
+
const catalogProtocol = resolveShortcutModelProtocol(modelId);
|
|
19
|
+
if (catalogProtocol)
|
|
20
|
+
return catalogProtocol;
|
|
17
21
|
const normalized = modelId.trim().toLowerCase();
|
|
18
22
|
// Shortcut-hosted "Pivot" and Fireworks GLM both speak OpenAI completions.
|
|
19
23
|
if (normalized === SHORTCUT_MODEL_ID.Hosted ||
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* call funnels through one transport keyed by model — there is no separate
|
|
10
10
|
* `/api/llm` proxy for helpers.
|
|
11
11
|
*/
|
|
12
|
+
import type { ReasoningLevel } from '../../ai/types.js';
|
|
12
13
|
import type { AgentModelRegistry } from '../../contracts/agent-model.js';
|
|
13
14
|
export interface ShortcutLlmAttribution {
|
|
14
15
|
continuationRunId?: string;
|
|
@@ -25,8 +26,7 @@ export interface ShortcutLlmProxyRequest {
|
|
|
25
26
|
model: string;
|
|
26
27
|
messages: ShortcutLlmMessage[];
|
|
27
28
|
tools?: unknown[];
|
|
28
|
-
|
|
29
|
-
thinking_type?: string;
|
|
29
|
+
reasoning?: ReasoningLevel;
|
|
30
30
|
max_tokens?: number;
|
|
31
31
|
max_output_tokens?: number;
|
|
32
32
|
speed?: 'fast' | 'standard';
|
|
@@ -146,6 +146,7 @@ export function createShortcutLlmProxyClient(options) {
|
|
|
146
146
|
apiKey,
|
|
147
147
|
continuationRunId: attribution?.continuationRunId,
|
|
148
148
|
maxTokens: request.max_tokens ?? request.max_output_tokens,
|
|
149
|
+
reasoning: request.reasoning,
|
|
149
150
|
signal: callOptions?.signal,
|
|
150
151
|
headers,
|
|
151
152
|
userMessageId: attribution?.userMessageId,
|