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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveShortcutModelDefaultReasoningLevel } from '../shortcut-model-catalog.js';
|
|
2
2
|
import { ShortcutXLAgentProviderId } from './model-registry.js';
|
|
3
3
|
export function createShortcutXLDefaultSessionContext(modelId, provider = ShortcutXLAgentProviderId.Shortcut) {
|
|
4
4
|
return {
|
|
5
5
|
messages: [],
|
|
6
6
|
model: { modelId, provider },
|
|
7
|
-
thinkingLevel:
|
|
7
|
+
thinkingLevel: resolveShortcutModelDefaultReasoningLevel(modelId) ?? 'high'
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
10
|
export function createShortcutXLAgentSettingsStore() {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* loop, session persistence, compaction, run stats, credit gate, suggestions,
|
|
4
4
|
* and pending host-tool requests into the public runtime facade.
|
|
5
5
|
*/
|
|
6
|
+
import { resolveModelReasoningLevel } from '../ai/models.js';
|
|
6
7
|
import { AGENT_TOOL_IN_FLIGHT_DISPLAY_DELAY_MS, AgentEventKind, AgentMainMessageStreamEventType, AgentTaskControlAction, AgentTelemetryEventType, AgentTelemetryTerminalPhase } from '../contracts/agent-api.js';
|
|
7
8
|
import { AgentStopReason } from '../contracts/agent-snapshot.js';
|
|
8
9
|
import { AgentController } from '../core/agent-controller.js';
|
|
@@ -34,7 +35,7 @@ import { buildUserMessage } from './prompt/build-user-message.js';
|
|
|
34
35
|
import { createEmbeddedRecoveryWiring } from './recovery-wiring.js';
|
|
35
36
|
import { createRunStatsAccumulator } from './run-stats.js';
|
|
36
37
|
import { createRunTelemetryFinalizer } from './run-telemetry-finalizer.js';
|
|
37
|
-
import {
|
|
38
|
+
import { toShortcutEffortLevel } from './stream.js';
|
|
38
39
|
import { runSuggestionsViaBridge } from './suggestions.js';
|
|
39
40
|
import { EmbeddedTaskNotificationTurnQueue } from './task-notification-turn-queue.js';
|
|
40
41
|
import { EmbeddedSubmitOverlapPolicy, EmbeddedTurnLifecycle, EmbeddedTurnPhase, getSubmitOverlapPolicy } from './turn-lifecycle.js';
|
|
@@ -205,12 +206,12 @@ function applySubmitSelections(agent, modelRegistry, sessionStore, submitOptions
|
|
|
205
206
|
}
|
|
206
207
|
agent.setModel(overrideModel);
|
|
207
208
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
agent.setThinkingLevel(submitOptions.thinkingLevel);
|
|
209
|
+
const requestedThinking = submitOptions?.thinkingLevel ?? agent.state.thinkingLevel;
|
|
210
|
+
const effectiveThinking = resolveModelReasoningLevel(agent.state.model, requestedThinking);
|
|
211
|
+
if (agent.state.thinkingLevel !== effectiveThinking) {
|
|
212
|
+
sessionStore.appendThinkingLevelChange(effectiveThinking);
|
|
213
213
|
}
|
|
214
|
+
agent.setThinkingLevel(effectiveThinking);
|
|
214
215
|
if (submitOptions?.speed !== undefined) {
|
|
215
216
|
if (agent.speed !== submitOptions.speed) {
|
|
216
217
|
sessionStore.appendSpeedChange(submitOptions.speed);
|
|
@@ -658,7 +659,7 @@ export async function composeEmbeddedAgentRuntimeInternal(options) {
|
|
|
658
659
|
// actually streams against, including host-degraded Pivot runs.
|
|
659
660
|
// `RunMetricsDropdown` keys its display off this value.
|
|
660
661
|
resolveRunConfig: () => {
|
|
661
|
-
const effortLevel =
|
|
662
|
+
const effortLevel = toShortcutEffortLevel(agent.state.thinkingLevel);
|
|
662
663
|
return {
|
|
663
664
|
modelName: agent.state.model?.id,
|
|
664
665
|
effortLevel,
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* transports and the Shortcut api-v2 dispatcher route through it so they cannot
|
|
14
14
|
* disagree (which previously broke GLM 5.2 over the OpenAI-completions path).
|
|
15
15
|
*/
|
|
16
|
+
import type { Api, Model } from '../ai/types.js';
|
|
16
17
|
/** Ensure the base URL ends with exactly one "/v1" segment. */
|
|
17
18
|
export declare function withV1Segment(baseUrl: string): string;
|
|
18
19
|
/** Ensure the base URL does NOT end with a "/v1" segment. */
|
|
@@ -24,4 +25,6 @@ export declare function withoutV1Segment(baseUrl: string): string;
|
|
|
24
25
|
export type GatewayTransport = 'anthropic-messages' | 'openai-completions' | 'openai-responses' | 'google-vertex';
|
|
25
26
|
/** Shape the gateway base URL the way the given transport's SDK expects. */
|
|
26
27
|
export declare function gatewayBaseUrlForTransport(baseUrl: string, transport: GatewayTransport): string;
|
|
28
|
+
/** Present a gateway model to the shared provider layer with its native identity. */
|
|
29
|
+
export declare function gatewayModelForTransport<TApi extends GatewayTransport>(model: Model<Api>, baseUrl: string, transport: TApi): Model<TApi>;
|
|
27
30
|
//# sourceMappingURL=gateway-base-url.d.ts.map
|
|
@@ -38,4 +38,39 @@ export function gatewayBaseUrlForTransport(baseUrl, transport) {
|
|
|
38
38
|
return stripTrailingSlashes(baseUrl);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
+
function providerForTransport(transport) {
|
|
42
|
+
switch (transport) {
|
|
43
|
+
case 'anthropic-messages':
|
|
44
|
+
return 'anthropic';
|
|
45
|
+
case 'google-vertex':
|
|
46
|
+
return 'google';
|
|
47
|
+
case 'openai-completions':
|
|
48
|
+
case 'openai-responses':
|
|
49
|
+
return 'openai';
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/** Present a gateway model to the shared provider layer with its native identity. */
|
|
53
|
+
export function gatewayModelForTransport(model, baseUrl, transport) {
|
|
54
|
+
return {
|
|
55
|
+
...model,
|
|
56
|
+
api: transport,
|
|
57
|
+
baseUrl: gatewayBaseUrlForTransport(baseUrl, transport),
|
|
58
|
+
provider: providerForTransport(transport),
|
|
59
|
+
// Dynamic Anthropic aliases use the current adaptive-effort contract.
|
|
60
|
+
// Curated catalog metadata still wins, including Haiku's budget control.
|
|
61
|
+
...(transport === 'anthropic-messages' && !model.capabilities?.reasoning
|
|
62
|
+
? {
|
|
63
|
+
capabilities: {
|
|
64
|
+
...model.capabilities,
|
|
65
|
+
reasoning: {
|
|
66
|
+
control: 'adaptive-effort',
|
|
67
|
+
defaultLevel: 'high',
|
|
68
|
+
levels: ['low', 'medium', 'high', 'xhigh', 'max'],
|
|
69
|
+
supportsOff: true
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
: {})
|
|
74
|
+
};
|
|
75
|
+
}
|
|
41
76
|
//# sourceMappingURL=gateway-base-url.js.map
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { type ShortcutXLModelInvokeResponse } from '../contracts/model-call.js';
|
|
2
2
|
import type { ShortcutXLAiModelInvokeRequest, ShortcutXLAiModelStreamRequest } from '../contracts/wire.js';
|
|
3
|
-
import type
|
|
3
|
+
import { type ProviderGatewayOptions, type ShortcutXLModelUsageStatusLogger } from './provider-native-request.js';
|
|
4
4
|
import type { RunShortcutXLModelStreamRequestOptions } from './stream.js';
|
|
5
|
-
export interface
|
|
6
|
-
readonly headerName: 'Authorization' | 'x-api-key';
|
|
7
|
-
readonly token: string;
|
|
8
|
-
}
|
|
9
|
-
export interface GoogleVertexTransportOptions {
|
|
10
|
-
readonly auth: GoogleVertexGatewayAuth;
|
|
11
|
-
readonly baseUrl: string;
|
|
12
|
-
readonly fetchImpl?: typeof fetch;
|
|
13
|
-
readonly fetchOptions?: RequestInit;
|
|
14
|
-
readonly headers?: Readonly<Record<string, string | null>>;
|
|
5
|
+
export interface GoogleVertexTransportOptions extends ProviderGatewayOptions {
|
|
15
6
|
readonly usageStatusLogger?: ShortcutXLModelUsageStatusLogger;
|
|
16
7
|
}
|
|
17
8
|
export declare function streamAiGoogleVertexModelRequest(request: ShortcutXLAiModelStreamRequest, options: GoogleVertexTransportOptions & {
|
|
@@ -1,111 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { mapStopReasonString } from '../ai/providers/google-shared.js';
|
|
2
|
+
import { buildGoogleVertexRequest, googleVertexGatewayEndpoint } from '../ai/providers/google-vertex.js';
|
|
3
3
|
import { ShortcutXLModelCallTransportKind, ShortcutXLProviderUsageStatus } from '../contracts/model-call.js';
|
|
4
4
|
import { toProviderUsageFromAi, toShortcutXLModelStreamEvent } from './anthropic-messages-transport.js';
|
|
5
|
+
import { applyGatewayProviderPayload, concreteProviderHeaders, createGatewayProviderModel, createGatewayProviderOptions } from './provider-native-request.js';
|
|
5
6
|
import { normalizeTransportFetchError, normalizeTransportStreamError, throwInvalidResponse, throwTransportHttpError } from './transport-errors.js';
|
|
6
|
-
const ApiV2GoogleProject = '-';
|
|
7
|
-
const ApiV2GoogleLocation = 'global';
|
|
8
|
-
function normalizeBaseUrl(baseUrl) {
|
|
9
|
-
return baseUrl.replace(/\/+$/, '');
|
|
10
|
-
}
|
|
11
|
-
function createAuthHeader(auth) {
|
|
12
|
-
if (auth.headerName === 'Authorization') {
|
|
13
|
-
return {
|
|
14
|
-
Authorization: auth.token.startsWith('Bearer ') ? auth.token : `Bearer ${auth.token}`
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
return { 'x-api-key': auth.token };
|
|
18
|
-
}
|
|
19
|
-
function concreteHeaders(headers) {
|
|
20
|
-
const result = {};
|
|
21
|
-
for (const [key, value] of Object.entries(headers ?? {})) {
|
|
22
|
-
if (value !== null)
|
|
23
|
-
result[key] = value;
|
|
24
|
-
}
|
|
25
|
-
return result;
|
|
26
|
-
}
|
|
27
|
-
function buildGatewayAiModel(request, baseUrl) {
|
|
28
|
-
return {
|
|
29
|
-
api: 'google-vertex',
|
|
30
|
-
baseUrl: normalizeBaseUrl(baseUrl),
|
|
31
|
-
contextWindow: request.model.contextWindow,
|
|
32
|
-
cost: { cacheRead: 0, cacheWrite: 0, input: 0, output: 0 },
|
|
33
|
-
id: request.model.id,
|
|
34
|
-
input: request.model.input ?? ['text', 'image'],
|
|
35
|
-
maxTokens: request.model.maxTokens,
|
|
36
|
-
name: request.model.name,
|
|
37
|
-
provider: 'google',
|
|
38
|
-
reasoning: request.model.reasoning
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function mapThinkingLevel(effort) {
|
|
42
|
-
switch (effort) {
|
|
43
|
-
case 'minimal':
|
|
44
|
-
return 'MINIMAL';
|
|
45
|
-
case 'low':
|
|
46
|
-
return 'LOW';
|
|
47
|
-
case 'medium':
|
|
48
|
-
return 'MEDIUM';
|
|
49
|
-
case 'high':
|
|
50
|
-
case 'xhigh':
|
|
51
|
-
return 'HIGH';
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function buildToolConfig(request) {
|
|
55
|
-
const toolChoice = request.options && 'toolChoice' in request.options ? request.options.toolChoice : undefined;
|
|
56
|
-
if (!request.context.tools || request.context.tools.length === 0 || !toolChoice) {
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|
|
59
|
-
if (typeof toolChoice === 'object') {
|
|
60
|
-
return {
|
|
61
|
-
functionCallingConfig: {
|
|
62
|
-
allowedFunctionNames: [toolChoice.name],
|
|
63
|
-
mode: 'ANY'
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
functionCallingConfig: {
|
|
69
|
-
mode: mapToolChoice(toolChoice === 'required' ? 'any' : toolChoice)
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function buildRequestBody(request, baseUrl) {
|
|
74
|
-
const model = buildGatewayAiModel(request, baseUrl);
|
|
75
|
-
const generationConfig = {};
|
|
76
|
-
if (request.options?.maxTokens !== undefined) {
|
|
77
|
-
generationConfig.maxOutputTokens = request.options.maxTokens;
|
|
78
|
-
}
|
|
79
|
-
if (request.options?.temperature !== undefined) {
|
|
80
|
-
generationConfig.temperature = request.options.temperature;
|
|
81
|
-
}
|
|
82
|
-
if (request.options?.reasoning && model.reasoning) {
|
|
83
|
-
generationConfig.thinkingConfig = {
|
|
84
|
-
includeThoughts: true,
|
|
85
|
-
thinkingLevel: mapThinkingLevel(request.options.reasoning)
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
const toolConfig = buildToolConfig(request);
|
|
89
|
-
return {
|
|
90
|
-
contents: convertMessages(model, request.context),
|
|
91
|
-
...(request.context.systemPrompt
|
|
92
|
-
? {
|
|
93
|
-
systemInstruction: {
|
|
94
|
-
parts: [{ text: sanitizeSurrogates(request.context.systemPrompt) }]
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
: {}),
|
|
98
|
-
...(request.context.tools && request.context.tools.length > 0
|
|
99
|
-
? { tools: convertTools(request.context.tools) }
|
|
100
|
-
: {}),
|
|
101
|
-
...(toolConfig ? { toolConfig } : {}),
|
|
102
|
-
...(Object.keys(generationConfig).length > 0 ? { generationConfig } : {})
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
function googleEndpoint(baseUrl, modelId, operation) {
|
|
106
|
-
const model = encodeURIComponent(modelId);
|
|
107
|
-
return `${normalizeBaseUrl(baseUrl)}/v1/projects/${ApiV2GoogleProject}/locations/${ApiV2GoogleLocation}/publishers/google/models/${model}:${operation}`;
|
|
108
|
-
}
|
|
109
7
|
function toUsage(usage) {
|
|
110
8
|
const input = usage?.promptTokenCount ?? 0;
|
|
111
9
|
const output = (usage?.candidatesTokenCount ?? 0) + (usage?.thoughtsTokenCount ?? 0);
|
|
@@ -231,16 +129,18 @@ function createInitialMessage(model) {
|
|
|
231
129
|
}
|
|
232
130
|
export async function streamAiGoogleVertexModelRequest(request, options) {
|
|
233
131
|
const fetchImpl = options.fetchImpl ?? fetch;
|
|
234
|
-
const model =
|
|
132
|
+
const model = createGatewayProviderModel(request, 'google-vertex', options.baseUrl);
|
|
133
|
+
const requestOptions = createGatewayProviderOptions(request, 'google-vertex', options, {
|
|
134
|
+
signal: options.signal
|
|
135
|
+
});
|
|
235
136
|
let response;
|
|
236
137
|
try {
|
|
237
|
-
response = await fetchImpl(`${
|
|
238
|
-
body: JSON.stringify(
|
|
138
|
+
response = await fetchImpl(`${googleVertexGatewayEndpoint(options.baseUrl, model.id, 'streamGenerateContent')}?alt=sse`, {
|
|
139
|
+
body: JSON.stringify(applyGatewayProviderPayload(request, 'google-vertex', buildGoogleVertexRequest(model, request.context, requestOptions))),
|
|
239
140
|
credentials: options.fetchOptions?.credentials,
|
|
240
|
-
headers:
|
|
141
|
+
headers: concreteProviderHeaders({
|
|
241
142
|
'content-type': 'application/json',
|
|
242
|
-
...
|
|
243
|
-
...createAuthHeader(options.auth)
|
|
143
|
+
...requestOptions.headers
|
|
244
144
|
}),
|
|
245
145
|
method: 'POST',
|
|
246
146
|
signal: options.signal
|
|
@@ -390,16 +290,19 @@ export async function streamAiGoogleVertexModelRequest(request, options) {
|
|
|
390
290
|
}
|
|
391
291
|
export async function invokeGoogleVertexModel(request, options) {
|
|
392
292
|
const fetchImpl = options.fetchImpl ?? fetch;
|
|
393
|
-
const model =
|
|
293
|
+
const model = createGatewayProviderModel(request, 'google-vertex', options.baseUrl);
|
|
294
|
+
const requestOptions = createGatewayProviderOptions(request, 'google-vertex', options, {
|
|
295
|
+
maxTokens: 4096,
|
|
296
|
+
signal: options.signal
|
|
297
|
+
});
|
|
394
298
|
let response;
|
|
395
299
|
try {
|
|
396
|
-
response = await fetchImpl(
|
|
397
|
-
body: JSON.stringify(
|
|
300
|
+
response = await fetchImpl(googleVertexGatewayEndpoint(options.baseUrl, model.id, 'generateContent'), {
|
|
301
|
+
body: JSON.stringify(applyGatewayProviderPayload(request, 'google-vertex', buildGoogleVertexRequest(model, request.context, requestOptions))),
|
|
398
302
|
credentials: options.fetchOptions?.credentials,
|
|
399
|
-
headers:
|
|
303
|
+
headers: concreteProviderHeaders({
|
|
400
304
|
'content-type': 'application/json',
|
|
401
|
-
...
|
|
402
|
-
...createAuthHeader(options.auth)
|
|
305
|
+
...requestOptions.headers
|
|
403
306
|
}),
|
|
404
307
|
method: 'POST',
|
|
405
308
|
signal: options.signal
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Composition-root helper for both the production worker boot and the
|
|
3
|
-
* in-process test transport. Everything the embedded runtime needs that
|
|
4
|
-
* doesn't depend on host-specific infrastructure (credit-balance fetchers,
|
|
5
|
-
* host prompt platform) is wired here so the two transports cannot
|
|
6
|
-
* drift on lock-step state, the `onAgentStart` reset hook, and tool
|
|
7
|
-
* composition. Host-specific bits stay at the call sites.
|
|
8
|
-
*/
|
|
9
1
|
import type { Api, Model } from '../ai/types.js';
|
|
10
2
|
import { type AgentConfiguration, type ChildAgentEventEmitter } from '../contracts/agent-api.js';
|
|
11
3
|
import { AgentExecuteCodeMode } from '../contracts/agent-execute-code.js';
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composition-root helper for both the production worker boot and the
|
|
3
|
+
* in-process test transport. Everything the embedded runtime needs that
|
|
4
|
+
* doesn't depend on host-specific infrastructure (credit-balance fetchers,
|
|
5
|
+
* host prompt platform) is wired here so the two transports cannot
|
|
6
|
+
* drift on lock-step state, the `onAgentStart` reset hook, and tool
|
|
7
|
+
* composition. Host-specific bits stay at the call sites.
|
|
8
|
+
*/
|
|
9
|
+
import { resolveModelReasoningLevel } from '../ai/models.js';
|
|
1
10
|
import { AgentTaskControlAction } from '../contracts/agent-api.js';
|
|
2
11
|
import { AgentExecuteCodeMode } from '../contracts/agent-execute-code.js';
|
|
3
|
-
import { DEFAULT_THINKING_LEVEL } from '../core/defaults.js';
|
|
4
12
|
import { createShortcutXLAgentSettingsStore } from './bootstrap.js';
|
|
5
13
|
import { buildSubagentRuntimeOptions } from './host-tools/build-tool-list.js';
|
|
6
14
|
import { createDefaultHostTools, createSessionToolInfoState } from './host-tools/index.js';
|
|
@@ -133,7 +141,7 @@ export function buildHostEmbeddedAgentOptions(input) {
|
|
|
133
141
|
controlTask: (request, context) => controlEmbeddedTask(request, createSubagentRuntimeOptions(input, taskManager, sessionToolInfoState, context)),
|
|
134
142
|
streamFn: input.streamFn,
|
|
135
143
|
compactionCompleteFn: createStreamBackedCompactionComplete(input.streamFn),
|
|
136
|
-
thinkingLevel:
|
|
144
|
+
thinkingLevel: resolveModelReasoningLevel(input.model, undefined),
|
|
137
145
|
...(suggestionsSkillsPrompt?.trim() ? { suggestionsSkillsPrompt } : {}),
|
|
138
146
|
...(input.creditGate ? { creditGate: input.creditGate } : {}),
|
|
139
147
|
...(input.extraTools ? { tools: [...input.extraTools] } : {})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bridge contract for `invoke_llm` — non-streaming LLM call dispatched to the
|
|
3
|
-
* client-side
|
|
3
|
+
* client-side provider-native model worker. Not a user-callable tool; the runtime
|
|
4
4
|
* uses this for internal one-shot LLM jobs (e.g. follow-up suggestions).
|
|
5
5
|
*/
|
|
6
6
|
import type { AssistantMessage, ToolResultMessage, UserMessage } from '../../../ai/types.js';
|
|
@@ -23,7 +23,7 @@ export interface InvokeLlmParams {
|
|
|
23
23
|
readonly messages: readonly InvokeLlmMessage[];
|
|
24
24
|
readonly tools?: readonly InvokeLlmToolSchema[];
|
|
25
25
|
readonly tool_choice?: InvokeLlmToolChoice;
|
|
26
|
-
readonly effort_level?: 'low' | 'medium' | 'high';
|
|
26
|
+
readonly effort_level?: 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
27
27
|
readonly thinking_type?: 'on' | 'off';
|
|
28
28
|
readonly max_tokens?: number;
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bridge contract for `invoke_llm` — non-streaming LLM call dispatched to the
|
|
3
|
-
* client-side
|
|
3
|
+
* client-side provider-native model worker. Not a user-callable tool; the runtime
|
|
4
4
|
* uses this for internal one-shot LLM jobs (e.g. follow-up suggestions).
|
|
5
5
|
*/
|
|
6
6
|
import { Type } from '@sinclair/typebox';
|
|
@@ -107,7 +107,9 @@ function validateParams(value) {
|
|
|
107
107
|
if (candidate.effort_level !== undefined &&
|
|
108
108
|
candidate.effort_level !== 'low' &&
|
|
109
109
|
candidate.effort_level !== 'medium' &&
|
|
110
|
-
candidate.effort_level !== 'high'
|
|
110
|
+
candidate.effort_level !== 'high' &&
|
|
111
|
+
candidate.effort_level !== 'xhigh' &&
|
|
112
|
+
candidate.effort_level !== 'max') {
|
|
111
113
|
return false;
|
|
112
114
|
}
|
|
113
115
|
if (candidate.thinking_type !== undefined &&
|
|
@@ -7,15 +7,16 @@ import { type ShortcutXLModelStreamErrorDetails } from '../../../contracts/model
|
|
|
7
7
|
export declare const SANDBOX_LLM_KIND: "sandboxLlm";
|
|
8
8
|
export type SandboxLlmKind = typeof SANDBOX_LLM_KIND;
|
|
9
9
|
export declare const SANDBOX_LLM_GEMINI_MODEL: "gemini-3-flash-preview";
|
|
10
|
-
export declare const SANDBOX_LLM_GEMINI_LITE_MODEL: "gemini-3.5-flash-lite";
|
|
11
|
-
export declare const SANDBOX_LLM_GEMINI_36_MODEL: "gemini-3.6-flash";
|
|
12
10
|
export declare const SANDBOX_LLM_HAIKU_MODEL: "claude-haiku-4-5-20251001";
|
|
13
|
-
export declare const SANDBOX_LLM_MAX_FILE_PATHS =
|
|
11
|
+
export declare const SANDBOX_LLM_MAX_FILE_PATHS = 10;
|
|
12
|
+
export declare const SANDBOX_LLM_MAX_COMBINED_FILE_SIZE_MIB = 45;
|
|
13
|
+
export declare const SANDBOX_LLM_MAX_COMBINED_FILE_BYTES: number;
|
|
14
14
|
export declare const SANDBOX_LLM_OUTPUT_TOKENS = 32768;
|
|
15
15
|
export declare const SANDBOX_LLM_TIMEOUT_SECONDS = 300;
|
|
16
16
|
export declare const SANDBOX_LLM_PDF_PAGE_LIMIT = 100;
|
|
17
17
|
export declare const SANDBOX_LLM_PDF_SIZE_LIMIT_MB = 10;
|
|
18
18
|
export declare const SANDBOX_UPLOADS_PATH = "/workspace";
|
|
19
|
+
export declare const SANDBOX_LLM_INPUT_TOO_LARGE_MESSAGE = "Sandbox LLM input limits exceeded: maximum 10 files and 45 MiB combined.";
|
|
19
20
|
export declare const SANDBOX_LLM_IMAGE_EXTENSIONS: {
|
|
20
21
|
readonly '.png': "image/png";
|
|
21
22
|
readonly '.jpg': "image/jpeg";
|
|
@@ -36,12 +37,16 @@ export interface SandboxLlmDetails {
|
|
|
36
37
|
readonly body?: string;
|
|
37
38
|
/** Renderer flips to error styling when true. */
|
|
38
39
|
readonly error?: boolean;
|
|
40
|
+
/** Number of requested files when a local input limit rejects the request. */
|
|
41
|
+
readonly file_count?: number;
|
|
39
42
|
/** Structured model/helper failure details, when available. */
|
|
40
43
|
readonly llm_error?: ShortcutXLModelStreamErrorDetails;
|
|
41
44
|
/** Sandbox path the analysis was saved to (success path). */
|
|
42
45
|
readonly save_path?: string;
|
|
43
46
|
/** Resolved model id actually invoked. */
|
|
44
47
|
readonly model?: string;
|
|
48
|
+
/** Raw bytes read when a local input limit rejects the request. */
|
|
49
|
+
readonly total_bytes?: number;
|
|
45
50
|
}
|
|
46
51
|
export type SandboxLlmRequest = HostToolRequest & {
|
|
47
52
|
readonly kind: SandboxLlmKind;
|
|
@@ -10,15 +10,16 @@ import { withAbort } from '../../../utils/abort.js';
|
|
|
10
10
|
import { SANDBOX_LLM } from '../tool-names.js';
|
|
11
11
|
export const SANDBOX_LLM_KIND = 'sandboxLlm';
|
|
12
12
|
export const SANDBOX_LLM_GEMINI_MODEL = SHORTCUT_MODEL_ID.Gemini3Flash;
|
|
13
|
-
export const SANDBOX_LLM_GEMINI_LITE_MODEL = SHORTCUT_MODEL_ID.Gemini35FlashLite;
|
|
14
|
-
export const SANDBOX_LLM_GEMINI_36_MODEL = SHORTCUT_MODEL_ID.Gemini36Flash;
|
|
15
13
|
export const SANDBOX_LLM_HAIKU_MODEL = 'claude-haiku-4-5-20251001';
|
|
16
|
-
export const SANDBOX_LLM_MAX_FILE_PATHS =
|
|
14
|
+
export const SANDBOX_LLM_MAX_FILE_PATHS = 10;
|
|
15
|
+
export const SANDBOX_LLM_MAX_COMBINED_FILE_SIZE_MIB = 45;
|
|
16
|
+
export const SANDBOX_LLM_MAX_COMBINED_FILE_BYTES = SANDBOX_LLM_MAX_COMBINED_FILE_SIZE_MIB * 1024 * 1024;
|
|
17
17
|
export const SANDBOX_LLM_OUTPUT_TOKENS = 32_768;
|
|
18
18
|
export const SANDBOX_LLM_TIMEOUT_SECONDS = 300;
|
|
19
19
|
export const SANDBOX_LLM_PDF_PAGE_LIMIT = 100;
|
|
20
20
|
export const SANDBOX_LLM_PDF_SIZE_LIMIT_MB = 10;
|
|
21
21
|
export const SANDBOX_UPLOADS_PATH = '/workspace';
|
|
22
|
+
export const SANDBOX_LLM_INPUT_TOO_LARGE_MESSAGE = `Sandbox LLM input limits exceeded: maximum ${SANDBOX_LLM_MAX_FILE_PATHS} files and ${SANDBOX_LLM_MAX_COMBINED_FILE_SIZE_MIB} MiB combined.`;
|
|
22
23
|
export const SANDBOX_LLM_IMAGE_EXTENSIONS = {
|
|
23
24
|
'.png': 'image/png',
|
|
24
25
|
'.jpg': 'image/jpeg',
|
|
@@ -55,9 +56,11 @@ export const SANDBOX_LLM_TEXT_EXTENSIONS = new Set([
|
|
|
55
56
|
const sandboxLlmDetailsSchema = Type.Object({
|
|
56
57
|
body: Type.Optional(Type.String()),
|
|
57
58
|
error: Type.Optional(Type.Boolean()),
|
|
59
|
+
file_count: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
58
60
|
llm_error: Type.Optional(Type.Unknown()),
|
|
59
61
|
save_path: Type.Optional(Type.String()),
|
|
60
|
-
model: Type.Optional(Type.String())
|
|
62
|
+
model: Type.Optional(Type.String()),
|
|
63
|
+
total_bytes: Type.Optional(Type.Integer({ minimum: 0 }))
|
|
61
64
|
});
|
|
62
65
|
const sandboxLlmDetailsHelpers = createResultDetailsSchemaHelpers(sandboxLlmDetailsSchema);
|
|
63
66
|
const LLM_ERROR_OBSERVABILITY_FIELDS = {
|
|
@@ -97,8 +100,6 @@ Also supports: .pdf
|
|
|
97
100
|
|
|
98
101
|
MODEL SELECTION:
|
|
99
102
|
- "${SANDBOX_LLM_GEMINI_MODEL}" (default): Best for careful extraction, tables, and especially images
|
|
100
|
-
- "${SANDBOX_LLM_GEMINI_LITE_MODEL}": Fast, cost-efficient document parsing and structured extraction
|
|
101
|
-
- "${SANDBOX_LLM_GEMINI_36_MODEL}": Complex visual and multimodal reasoning
|
|
102
103
|
- "${SANDBOX_LLM_HAIKU_MODEL}": Quick scanning, structure discovery, fallback to ${SANDBOX_LLM_GEMINI_MODEL} if it doesn't work.
|
|
103
104
|
|
|
104
105
|
FOR EXTRACTION TASKS:
|
|
@@ -109,12 +110,13 @@ Output filename is always saved to the file's stem folder:
|
|
|
109
110
|
- For example, blah/report.pdf -> blah/report/analysis.md
|
|
110
111
|
- uploads/report/analysis.pdf -> uploads/report/analysis/final_analysis.md
|
|
111
112
|
|
|
112
|
-
⚠️
|
|
113
|
+
⚠️ INPUT LIMITS: Each request accepts at most ${SANDBOX_LLM_MAX_FILE_PATHS} files and ${SANDBOX_LLM_MAX_COMBINED_FILE_SIZE_MIB} MiB of raw file data combined.
|
|
114
|
+
⚠️ PDF SIZE LIMIT: Each PDF cannot exceed ${SANDBOX_LLM_PDF_SIZE_LIMIT_MB} MiB (exceeding causes LLM failures). Slice the PDF into smaller chunks or downsample to 150 dpi (use ghostscript for PDFs).
|
|
113
115
|
⚠️ PDF PAGE LIMIT: Claude Haiku has a ${SANDBOX_LLM_PDF_PAGE_LIMIT} page HARD LIMIT (exceeding causes instant failure).`;
|
|
114
116
|
export const SANDBOX_LLM_DESCRIPTION_DESCRIPTION = "Brief human-readable description of what this analysis will do (e.g., 'Extracting sales data from Q4 report')";
|
|
115
117
|
export const SANDBOX_LLM_FILE_PATHS_DESCRIPTION = `List of file paths in sandbox (e.g., ['${SANDBOX_UPLOADS_PATH}/chart.png']). Omit if the query already contains all needed information.`;
|
|
116
118
|
export const SANDBOX_LLM_QUERY_DESCRIPTION = "The question/instruction for the LLM about the content. Can also be a file path ending in .txt (e.g., '/uploads/report/query.txt') — the file contents will be used as the query. Useful for batch/parallel calls to programmatically write .txt query files with variables.";
|
|
117
|
-
export const SANDBOX_LLM_MODEL_DESCRIPTION = `Model to use: '${SANDBOX_LLM_GEMINI_MODEL}' (default)
|
|
119
|
+
export const SANDBOX_LLM_MODEL_DESCRIPTION = `Model to use: '${SANDBOX_LLM_GEMINI_MODEL}' (default) or '${SANDBOX_LLM_HAIKU_MODEL}' (fallback/verifier)`;
|
|
118
120
|
export const SANDBOX_LLM_OUTPUT_FILENAME_DESCRIPTION = "Optional output filename (e.g., 'analysis.md'). If empty, auto-generates a unique filename.";
|
|
119
121
|
const sandboxLlmLlmSchema = Type.Object({
|
|
120
122
|
description: Type.String({
|
|
@@ -205,6 +207,8 @@ function getResultObservabilityFields(details) {
|
|
|
205
207
|
const metadata = {
|
|
206
208
|
...(details.model !== undefined ? { model: details.model } : {}),
|
|
207
209
|
...(details.error !== undefined ? { error: details.error } : {}),
|
|
210
|
+
...(details.file_count !== undefined ? { file_count: details.file_count } : {}),
|
|
211
|
+
...(details.total_bytes !== undefined ? { total_bytes: details.total_bytes } : {}),
|
|
208
212
|
...getLlmErrorObservabilityFields(details.llm_error)
|
|
209
213
|
};
|
|
210
214
|
return Object.keys(metadata).length > 0 ? metadata : undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Public entrypoint for the `sandbox_llm` host tool. */
|
|
2
|
-
export { SANDBOX_LLM_DESCRIPTION_DESCRIPTION, SANDBOX_LLM_FILE_PATHS_DESCRIPTION,
|
|
2
|
+
export { SANDBOX_LLM_DESCRIPTION_DESCRIPTION, SANDBOX_LLM_FILE_PATHS_DESCRIPTION, SANDBOX_LLM_GEMINI_MODEL, SANDBOX_LLM_HAIKU_MODEL, SANDBOX_LLM_IMAGE_EXTENSIONS, SANDBOX_LLM_INPUT_TOO_LARGE_MESSAGE, SANDBOX_LLM_KIND, SANDBOX_LLM_MAX_COMBINED_FILE_BYTES, SANDBOX_LLM_MAX_COMBINED_FILE_SIZE_MIB, SANDBOX_LLM_MAX_FILE_PATHS, SANDBOX_LLM_MODEL_DESCRIPTION, SANDBOX_LLM_OUTPUT_FILENAME_DESCRIPTION, SANDBOX_LLM_OUTPUT_TOKENS, SANDBOX_LLM_PDF_PAGE_LIMIT, SANDBOX_LLM_PDF_SIZE_LIMIT_MB, SANDBOX_LLM_QUERY_DESCRIPTION, SANDBOX_LLM_SYSTEM_PROMPT, SANDBOX_LLM_TEXT_EXTENSIONS, SANDBOX_LLM_TIMEOUT_SECONDS, SANDBOX_LLM_TOOL_DESCRIPTION, SANDBOX_LLM_TOOL_SUMMARY, SANDBOX_UPLOADS_PATH, sandboxLlmContract, type SandboxLlmDetails, type SandboxLlmKind, type SandboxLlmParams, type SandboxLlmRequest } from './contract.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Public entrypoint for the `sandbox_llm` host tool. */
|
|
2
|
-
export { SANDBOX_LLM_DESCRIPTION_DESCRIPTION, SANDBOX_LLM_FILE_PATHS_DESCRIPTION,
|
|
2
|
+
export { SANDBOX_LLM_DESCRIPTION_DESCRIPTION, SANDBOX_LLM_FILE_PATHS_DESCRIPTION, SANDBOX_LLM_GEMINI_MODEL, SANDBOX_LLM_HAIKU_MODEL, SANDBOX_LLM_IMAGE_EXTENSIONS, SANDBOX_LLM_INPUT_TOO_LARGE_MESSAGE, SANDBOX_LLM_KIND, SANDBOX_LLM_MAX_COMBINED_FILE_BYTES, SANDBOX_LLM_MAX_COMBINED_FILE_SIZE_MIB, SANDBOX_LLM_MAX_FILE_PATHS, SANDBOX_LLM_MODEL_DESCRIPTION, SANDBOX_LLM_OUTPUT_FILENAME_DESCRIPTION, SANDBOX_LLM_OUTPUT_TOKENS, SANDBOX_LLM_PDF_PAGE_LIMIT, SANDBOX_LLM_PDF_SIZE_LIMIT_MB, SANDBOX_LLM_QUERY_DESCRIPTION, SANDBOX_LLM_SYSTEM_PROMPT, SANDBOX_LLM_TEXT_EXTENSIONS, SANDBOX_LLM_TIMEOUT_SECONDS, SANDBOX_LLM_TOOL_DESCRIPTION, SANDBOX_LLM_TOOL_SUMMARY, SANDBOX_UPLOADS_PATH, sandboxLlmContract } from './contract.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { base64ToBytes, bytesToBase64, bytesToUtf8 } from './base64.js';
|
|
2
|
-
export { LlmStreamError
|
|
2
|
+
export { LlmStreamError } from './llm-stream-error.js';
|
|
3
3
|
export { MultimodalContentBlockFormat, buildAnthropicBlock, buildContentBlock, buildGeminiBlock } from './multimodal.js';
|
|
4
4
|
export type { MultimodalBlock, MultimodalBlockInput, MultimodalBlockResult } from './multimodal.js';
|
|
5
5
|
export { baseName, dirName, getFileDataDir, lowerExt, stem } from './sandbox-paths.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { base64ToBytes, bytesToBase64, bytesToUtf8 } from './base64.js';
|
|
2
|
-
export { LlmStreamError
|
|
2
|
+
export { LlmStreamError } from './llm-stream-error.js';
|
|
3
3
|
export { MultimodalContentBlockFormat, buildAnthropicBlock, buildContentBlock, buildGeminiBlock } from './multimodal.js';
|
|
4
4
|
export { baseName, dirName, getFileDataDir, lowerExt, stem } from './sandbox-paths.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ShortcutXLModelStreamErrorDetails } from '../../../contracts/model-stream.js';
|
|
2
|
+
/** Structured provider-native model-stream failure surfaced to helper tools. */
|
|
3
|
+
export declare class LlmStreamError extends Error {
|
|
4
|
+
readonly details?: ShortcutXLModelStreamErrorDetails | undefined;
|
|
5
|
+
constructor(message: string, details?: ShortcutXLModelStreamErrorDetails | undefined);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=llm-stream-error.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Structured provider-native model-stream failure surfaced to helper tools. */
|
|
2
|
+
export class LlmStreamError extends Error {
|
|
3
|
+
details;
|
|
4
|
+
constructor(message, details) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.details = details;
|
|
7
|
+
this.name = 'LlmStreamError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=llm-stream-error.js.map
|
|
@@ -8,8 +8,6 @@ import { type HostToolRequest, type ToolContract, type ToolLlmOptionsBase } from
|
|
|
8
8
|
export declare const TAKE_SCREENSHOT_KIND: "takeScreenshot";
|
|
9
9
|
export type TakeScreenshotKind = typeof TAKE_SCREENSHOT_KIND;
|
|
10
10
|
export declare const TAKE_SCREENSHOT_GEMINI_MODEL: "gemini-3-flash-preview";
|
|
11
|
-
export declare const TAKE_SCREENSHOT_GEMINI_LITE_MODEL: "gemini-3.5-flash-lite";
|
|
12
|
-
export declare const TAKE_SCREENSHOT_GEMINI_36_MODEL: "gemini-3.6-flash";
|
|
13
11
|
export declare const TAKE_SCREENSHOT_HAIKU_MODEL: "claude-haiku-4-5-20251001";
|
|
14
12
|
export declare const TAKE_SCREENSHOT_MIN_RANGES = 1;
|
|
15
13
|
export declare const TAKE_SCREENSHOT_MAX_RANGES = 10;
|
|
@@ -12,8 +12,6 @@ import { withAbort } from '../../../utils/abort.js';
|
|
|
12
12
|
import { TAKE_SCREENSHOT } from '../tool-names.js';
|
|
13
13
|
export const TAKE_SCREENSHOT_KIND = 'takeScreenshot';
|
|
14
14
|
export const TAKE_SCREENSHOT_GEMINI_MODEL = SHORTCUT_MODEL_ID.Gemini3Flash;
|
|
15
|
-
export const TAKE_SCREENSHOT_GEMINI_LITE_MODEL = SHORTCUT_MODEL_ID.Gemini35FlashLite;
|
|
16
|
-
export const TAKE_SCREENSHOT_GEMINI_36_MODEL = SHORTCUT_MODEL_ID.Gemini36Flash;
|
|
17
15
|
export const TAKE_SCREENSHOT_HAIKU_MODEL = 'claude-haiku-4-5-20251001';
|
|
18
16
|
export const TAKE_SCREENSHOT_MIN_RANGES = 1;
|
|
19
17
|
export const TAKE_SCREENSHOT_MAX_RANGES = 10;
|
|
@@ -25,7 +23,7 @@ export const TAKE_SCREENSHOT_RANGES_DESCRIPTION = 'List of sheet:range pairs to
|
|
|
25
23
|
export const TAKE_SCREENSHOT_SHEET_DESCRIPTION = 'Sheet name to capture.';
|
|
26
24
|
export const TAKE_SCREENSHOT_CELL_RANGE_DESCRIPTION = 'Range to capture, e.g. "A1:G10".';
|
|
27
25
|
export const TAKE_SCREENSHOT_QUERY_DESCRIPTION = 'What to analyze about the screenshots.';
|
|
28
|
-
export const TAKE_SCREENSHOT_MODEL_DESCRIPTION = `Vision model to use for analysis. Default: '${TAKE_SCREENSHOT_GEMINI_MODEL}'
|
|
26
|
+
export const TAKE_SCREENSHOT_MODEL_DESCRIPTION = `Vision model to use for analysis. Default: '${TAKE_SCREENSHOT_GEMINI_MODEL}'.`;
|
|
29
27
|
const screenshotRangeSchema = Type.Object({
|
|
30
28
|
sheet: Type.String({ description: TAKE_SCREENSHOT_SHEET_DESCRIPTION }),
|
|
31
29
|
cell_range: Type.String({ description: TAKE_SCREENSHOT_CELL_RANGE_DESCRIPTION })
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Public entrypoint for the `take_screenshot` host tool.
|
|
3
3
|
*/
|
|
4
|
-
export { TAKE_SCREENSHOT_CELL_RANGE_DESCRIPTION,
|
|
4
|
+
export { TAKE_SCREENSHOT_CELL_RANGE_DESCRIPTION, TAKE_SCREENSHOT_GEMINI_MODEL, TAKE_SCREENSHOT_HAIKU_MODEL, TAKE_SCREENSHOT_KIND, TAKE_SCREENSHOT_MAX_RANGES, TAKE_SCREENSHOT_MIN_RANGES, TAKE_SCREENSHOT_MODEL_DESCRIPTION, TAKE_SCREENSHOT_OUTPUT_TOKENS, TAKE_SCREENSHOT_QUERY_DESCRIPTION, TAKE_SCREENSHOT_RANGES_DESCRIPTION, TAKE_SCREENSHOT_SHEET_DESCRIPTION, TAKE_SCREENSHOT_SYSTEM_PROMPT, TAKE_SCREENSHOT_TIMEOUT_SECONDS, TAKE_SCREENSHOT_TOOL_DESCRIPTION, takeScreenshotContract, type ScreenshotRange, type TakeScreenshotDetails, type TakeScreenshotKind, type TakeScreenshotParams, type TakeScreenshotRequest } from './contract.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Public entrypoint for the `take_screenshot` host tool.
|
|
3
3
|
*/
|
|
4
|
-
export { TAKE_SCREENSHOT_CELL_RANGE_DESCRIPTION,
|
|
4
|
+
export { TAKE_SCREENSHOT_CELL_RANGE_DESCRIPTION, TAKE_SCREENSHOT_GEMINI_MODEL, TAKE_SCREENSHOT_HAIKU_MODEL, TAKE_SCREENSHOT_KIND, TAKE_SCREENSHOT_MAX_RANGES, TAKE_SCREENSHOT_MIN_RANGES, TAKE_SCREENSHOT_MODEL_DESCRIPTION, TAKE_SCREENSHOT_OUTPUT_TOKENS, TAKE_SCREENSHOT_QUERY_DESCRIPTION, TAKE_SCREENSHOT_RANGES_DESCRIPTION, TAKE_SCREENSHOT_SHEET_DESCRIPTION, TAKE_SCREENSHOT_SYSTEM_PROMPT, TAKE_SCREENSHOT_TIMEOUT_SECONDS, TAKE_SCREENSHOT_TOOL_DESCRIPTION, takeScreenshotContract } from './contract.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* can spawn leaf subagents, but cannot recursively spawn another clone.
|
|
6
6
|
*/
|
|
7
7
|
import { RUNTIME_THINKING_LEVEL } from '../../../../contracts/agent-settings.js';
|
|
8
|
-
import {
|
|
8
|
+
import { COMMUNICATION, DATA_FORMATTING, TASK_EXECUTION, WRITING_CODE } from '../../../../core/prompts/agent-guidelines.js';
|
|
9
9
|
import { buildSubagentApiReferenceSection } from '../../../../utils/api-reference.js';
|
|
10
10
|
import { buildActionModeMainSection } from '../../../prompt/modes/action.js';
|
|
11
11
|
import { API_HIERARCHY_SECTION, SANDBOX_FILESYSTEM, getPlatformIdentity } from '../../../prompt/sections.js';
|
|
@@ -33,7 +33,6 @@ function buildSystemPrompt(ctx) {
|
|
|
33
33
|
const apiReference = buildSubagentApiReferenceSection(ctx.platform, ctx.spreadsheetReadOnly);
|
|
34
34
|
return [
|
|
35
35
|
buildActionModeMainSection(platformIdentity, currentDate),
|
|
36
|
-
AGENT_PHILOSOPHY,
|
|
37
36
|
TASK_EXECUTION,
|
|
38
37
|
COMMUNICATION,
|
|
39
38
|
SANDBOX_FILESYSTEM,
|
|
@@ -126,7 +126,7 @@ function buildTaskLlmSchema(allowedSubagents) {
|
|
|
126
126
|
run_in_background: Type.Optional(Type.Boolean({ description: TASK_RUN_IN_BACKGROUND_DESCRIPTION }))
|
|
127
127
|
}, { additionalProperties: false });
|
|
128
128
|
}
|
|
129
|
-
/** Task spawns
|
|
129
|
+
/** Task spawns do not require host approval because children inherit the parent boundary. */
|
|
130
130
|
function evaluateApproval() {
|
|
131
131
|
return { required: false };
|
|
132
132
|
}
|