shortcutxl 0.2.0
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/README.md +59 -0
- package/agent-docs/README.md +397 -0
- package/agent-docs/docs/compaction.md +390 -0
- package/agent-docs/docs/custom-provider.md +580 -0
- package/agent-docs/docs/development.md +69 -0
- package/agent-docs/docs/extensions.md +1971 -0
- package/agent-docs/docs/json.md +79 -0
- package/agent-docs/docs/keybindings.md +174 -0
- package/agent-docs/docs/models.md +293 -0
- package/agent-docs/docs/packages.md +209 -0
- package/agent-docs/docs/prompt-templates.md +67 -0
- package/agent-docs/docs/providers.md +186 -0
- package/agent-docs/docs/rpc.md +1317 -0
- package/agent-docs/docs/sdk.md +962 -0
- package/agent-docs/docs/session.md +412 -0
- package/agent-docs/docs/settings.md +223 -0
- package/agent-docs/docs/shell-aliases.md +13 -0
- package/agent-docs/docs/skills.md +231 -0
- package/agent-docs/docs/terminal-setup.md +70 -0
- package/agent-docs/docs/termux.md +127 -0
- package/agent-docs/docs/themes.md +295 -0
- package/agent-docs/docs/tree.md +219 -0
- package/agent-docs/docs/tui.md +887 -0
- package/agent-docs/docs/windows.md +17 -0
- package/agent-docs/examples/README.md +25 -0
- package/agent-docs/examples/extensions/README.md +205 -0
- package/agent-docs/examples/extensions/antigravity-image-gen.ts +447 -0
- package/agent-docs/examples/extensions/auto-commit-on-exit.ts +49 -0
- package/agent-docs/examples/extensions/bash-spawn-hook.ts +30 -0
- package/agent-docs/examples/extensions/bookmark.ts +50 -0
- package/agent-docs/examples/extensions/built-in-tool-renderer.ts +256 -0
- package/agent-docs/examples/extensions/claude-rules.ts +86 -0
- package/agent-docs/examples/extensions/commands.ts +75 -0
- package/agent-docs/examples/extensions/confirm-destructive.ts +59 -0
- package/agent-docs/examples/extensions/custom-compaction.ts +126 -0
- package/agent-docs/examples/extensions/custom-footer.ts +63 -0
- package/agent-docs/examples/extensions/custom-header.ts +73 -0
- package/agent-docs/examples/extensions/custom-provider-anthropic/index.ts +660 -0
- package/agent-docs/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
- package/agent-docs/examples/extensions/custom-provider-anthropic/package.json +19 -0
- package/agent-docs/examples/extensions/custom-provider-gitlab-duo/index.ts +362 -0
- package/agent-docs/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
- package/agent-docs/examples/extensions/custom-provider-gitlab-duo/test.ts +88 -0
- package/agent-docs/examples/extensions/custom-provider-qwen-cli/index.ts +349 -0
- package/agent-docs/examples/extensions/custom-provider-qwen-cli/package.json +16 -0
- package/agent-docs/examples/extensions/dirty-repo-guard.ts +56 -0
- package/agent-docs/examples/extensions/doom-overlay/README.md +46 -0
- package/agent-docs/examples/extensions/doom-overlay/doom/build.sh +152 -0
- package/agent-docs/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +72 -0
- package/agent-docs/examples/extensions/doom-overlay/doom-component.ts +133 -0
- package/agent-docs/examples/extensions/doom-overlay/doom-engine.ts +186 -0
- package/agent-docs/examples/extensions/doom-overlay/doom-keys.ts +108 -0
- package/agent-docs/examples/extensions/doom-overlay/index.ts +74 -0
- package/agent-docs/examples/extensions/doom-overlay/wad-finder.ts +51 -0
- package/agent-docs/examples/extensions/dynamic-resources/SKILL.md +8 -0
- package/agent-docs/examples/extensions/dynamic-resources/dynamic.json +79 -0
- package/agent-docs/examples/extensions/dynamic-resources/dynamic.md +5 -0
- package/agent-docs/examples/extensions/dynamic-resources/index.ts +15 -0
- package/agent-docs/examples/extensions/dynamic-tools.ts +77 -0
- package/agent-docs/examples/extensions/event-bus.ts +43 -0
- package/agent-docs/examples/extensions/file-trigger.ts +41 -0
- package/agent-docs/examples/extensions/git-checkpoint.ts +53 -0
- package/agent-docs/examples/extensions/handoff.ts +155 -0
- package/agent-docs/examples/extensions/hello.ts +25 -0
- package/agent-docs/examples/extensions/inline-bash.ts +94 -0
- package/agent-docs/examples/extensions/input-transform.ts +43 -0
- package/agent-docs/examples/extensions/interactive-shell.ts +209 -0
- package/agent-docs/examples/extensions/mac-system-theme.ts +47 -0
- package/agent-docs/examples/extensions/message-renderer.ts +59 -0
- package/agent-docs/examples/extensions/minimal-mode.ts +430 -0
- package/agent-docs/examples/extensions/modal-editor.ts +90 -0
- package/agent-docs/examples/extensions/model-status.ts +31 -0
- package/agent-docs/examples/extensions/notify.ts +55 -0
- package/agent-docs/examples/extensions/overlay-qa-tests.ts +936 -0
- package/agent-docs/examples/extensions/overlay-test.ts +159 -0
- package/agent-docs/examples/extensions/permission-gate.ts +37 -0
- package/agent-docs/examples/extensions/pirate.ts +47 -0
- package/agent-docs/examples/extensions/plan-mode/README.md +65 -0
- package/agent-docs/examples/extensions/plan-mode/index.ts +363 -0
- package/agent-docs/examples/extensions/plan-mode/utils.ts +173 -0
- package/agent-docs/examples/extensions/preset.ts +418 -0
- package/agent-docs/examples/extensions/protected-paths.ts +30 -0
- package/agent-docs/examples/extensions/qna.ts +122 -0
- package/agent-docs/examples/extensions/question.ts +278 -0
- package/agent-docs/examples/extensions/questionnaire.ts +440 -0
- package/agent-docs/examples/extensions/rainbow-editor.ts +90 -0
- package/agent-docs/examples/extensions/reload-runtime.ts +37 -0
- package/agent-docs/examples/extensions/rpc-demo.ts +124 -0
- package/agent-docs/examples/extensions/sandbox/index.ts +324 -0
- package/agent-docs/examples/extensions/sandbox/package-lock.json +92 -0
- package/agent-docs/examples/extensions/sandbox/package.json +19 -0
- package/agent-docs/examples/extensions/send-user-message.ts +97 -0
- package/agent-docs/examples/extensions/session-name.ts +27 -0
- package/agent-docs/examples/extensions/shutdown-command.ts +69 -0
- package/agent-docs/examples/extensions/snake.ts +343 -0
- package/agent-docs/examples/extensions/space-invaders.ts +566 -0
- package/agent-docs/examples/extensions/ssh.ts +233 -0
- package/agent-docs/examples/extensions/status-line.ts +40 -0
- package/agent-docs/examples/extensions/subagent/README.md +172 -0
- package/agent-docs/examples/extensions/subagent/agents/planner.md +37 -0
- package/agent-docs/examples/extensions/subagent/agents/reviewer.md +35 -0
- package/agent-docs/examples/extensions/subagent/agents/scout.md +50 -0
- package/agent-docs/examples/extensions/subagent/agents/worker.md +24 -0
- package/agent-docs/examples/extensions/subagent/agents.ts +130 -0
- package/agent-docs/examples/extensions/subagent/index.ts +1068 -0
- package/agent-docs/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
- package/agent-docs/examples/extensions/subagent/prompts/implement.md +10 -0
- package/agent-docs/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
- package/agent-docs/examples/extensions/summarize.ts +206 -0
- package/agent-docs/examples/extensions/system-prompt-header.ts +17 -0
- package/agent-docs/examples/extensions/timed-confirm.ts +72 -0
- package/agent-docs/examples/extensions/titlebar-spinner.ts +58 -0
- package/agent-docs/examples/extensions/todo.ts +314 -0
- package/agent-docs/examples/extensions/tool-override.ts +146 -0
- package/agent-docs/examples/extensions/tools.ts +145 -0
- package/agent-docs/examples/extensions/trigger-compact.ts +40 -0
- package/agent-docs/examples/extensions/truncated-tool.ts +194 -0
- package/agent-docs/examples/extensions/widget-placement.ts +17 -0
- package/agent-docs/examples/extensions/with-deps/index.ts +37 -0
- package/agent-docs/examples/extensions/with-deps/package-lock.json +31 -0
- package/agent-docs/examples/extensions/with-deps/package.json +22 -0
- package/agent-docs/examples/rpc-extension-ui.ts +654 -0
- package/agent-docs/examples/sdk/01-minimal.ts +22 -0
- package/agent-docs/examples/sdk/02-custom-model.ts +48 -0
- package/agent-docs/examples/sdk/03-custom-prompt.ts +55 -0
- package/agent-docs/examples/sdk/04-skills.ts +53 -0
- package/agent-docs/examples/sdk/05-tools.ts +56 -0
- package/agent-docs/examples/sdk/06-extensions.ts +88 -0
- package/agent-docs/examples/sdk/07-context-files.ts +40 -0
- package/agent-docs/examples/sdk/08-prompt-templates.ts +47 -0
- package/agent-docs/examples/sdk/09-api-keys-and-oauth.ts +48 -0
- package/agent-docs/examples/sdk/10-settings.ts +54 -0
- package/agent-docs/examples/sdk/11-sessions.ts +48 -0
- package/agent-docs/examples/sdk/12-full-control.ts +82 -0
- package/agent-docs/examples/sdk/README.md +144 -0
- package/agent-docs/xll-skill.md +61 -0
- package/agent-docs/xll-spec.md +110 -0
- package/dist/cli/args.js +290 -0
- package/dist/cli/config-selector.js +31 -0
- package/dist/cli/file-processor.js +79 -0
- package/dist/cli/list-models.js +92 -0
- package/dist/cli/package-commands.js +210 -0
- package/dist/cli/report-settings-errors.js +11 -0
- package/dist/cli/session-picker.js +34 -0
- package/dist/cli.js +19 -0
- package/dist/config.js +288 -0
- package/dist/core/abort.js +15 -0
- package/dist/core/agent-loop.js +352 -0
- package/dist/core/agent-session.js +2019 -0
- package/dist/core/agent.js +410 -0
- package/dist/core/auth-storage.js +456 -0
- package/dist/core/bash-executor.js +222 -0
- package/dist/core/compaction/branch-summarization.js +242 -0
- package/dist/core/compaction/compaction.js +610 -0
- package/dist/core/compaction/index.js +7 -0
- package/dist/core/compaction/utils.js +139 -0
- package/dist/core/defaults.js +6 -0
- package/dist/core/diagnostics.js +2 -0
- package/dist/core/event-bus.js +25 -0
- package/dist/core/exec.js +71 -0
- package/dist/core/export-html/ansi-to-html.js +256 -0
- package/dist/core/export-html/index.js +238 -0
- package/dist/core/export-html/session-view-model.js +342 -0
- package/dist/core/export-html/template.css +1110 -0
- package/dist/core/export-html/template.html +76 -0
- package/dist/core/export-html/template.js +1990 -0
- package/dist/core/export-html/tool-renderer.js +63 -0
- package/dist/core/export-html/vendor/highlight.min.js +7725 -0
- package/dist/core/export-html/vendor/marked.min.js +1803 -0
- package/dist/core/extensions/index.js +9 -0
- package/dist/core/extensions/loader.js +422 -0
- package/dist/core/extensions/runner.js +651 -0
- package/dist/core/extensions/types.js +35 -0
- package/dist/core/extensions/wrapper.js +102 -0
- package/dist/core/footer-data-provider.js +162 -0
- package/dist/core/index.js +9 -0
- package/dist/core/keybindings.js +153 -0
- package/dist/core/messages.js +133 -0
- package/dist/core/model-registry.js +539 -0
- package/dist/core/model-resolver.js +370 -0
- package/dist/core/package-manager.js +1485 -0
- package/dist/core/prompt-templates.js +253 -0
- package/dist/core/resolve-config-value.js +59 -0
- package/dist/core/resource-loader.js +700 -0
- package/dist/core/sdk.js +197 -0
- package/dist/core/session-bash.js +99 -0
- package/dist/core/session-compaction.js +165 -0
- package/dist/core/session-manager.js +1153 -0
- package/dist/core/session-models.js +99 -0
- package/dist/core/session-retry.js +155 -0
- package/dist/core/settings-manager.js +572 -0
- package/dist/core/skills.js +382 -0
- package/dist/core/slash-commands.js +31 -0
- package/dist/core/system-prompt.js +161 -0
- package/dist/core/theme.js +770 -0
- package/dist/core/timings.js +26 -0
- package/dist/core/tools/bash.js +258 -0
- package/dist/core/tools/edit-diff.js +245 -0
- package/dist/core/tools/edit.js +148 -0
- package/dist/core/tools/find.js +208 -0
- package/dist/core/tools/grep.js +246 -0
- package/dist/core/tools/index.js +67 -0
- package/dist/core/tools/ls.js +123 -0
- package/dist/core/tools/path-utils.js +81 -0
- package/dist/core/tools/read.js +160 -0
- package/dist/core/tools/truncate.js +70 -0
- package/dist/core/tools/write.js +82 -0
- package/dist/custom/agents/action.js +13 -0
- package/dist/custom/agents/document-reader.js +70 -0
- package/dist/custom/agents/general.js +26 -0
- package/dist/custom/agents/index.js +49 -0
- package/dist/custom/agents/installation.js +13 -0
- package/dist/custom/agents/types.js +7 -0
- package/dist/custom/auth/refresh-timer.js +33 -0
- package/dist/custom/auth/shortcut-oauth.js +145 -0
- package/dist/custom/constants.js +21 -0
- package/dist/custom/context/workbook-summary.js +73 -0
- package/dist/custom/credits/shortcut-credits.js +29 -0
- package/dist/custom/cron/cron-daemon-entry.js +18 -0
- package/dist/custom/cron/daemon-ipc.js +131 -0
- package/dist/custom/cron/daemon.js +224 -0
- package/dist/custom/cron/jobs.js +226 -0
- package/dist/custom/cron/run-log.js +51 -0
- package/dist/custom/cron/schedule.js +72 -0
- package/dist/custom/cron/status-line.js +98 -0
- package/dist/custom/cron/store.js +87 -0
- package/dist/custom/cron/types.js +8 -0
- package/dist/custom/dev/index.js +59 -0
- package/dist/custom/dev/trace-export.js +58 -0
- package/dist/custom/ensure-excel.js +63 -0
- package/dist/custom/excel-config.js +36 -0
- package/dist/custom/preflight.js +422 -0
- package/dist/custom/prompts/action.js +100 -0
- package/dist/custom/prompts/api.js +66 -0
- package/dist/custom/prompts/installation.js +124 -0
- package/dist/custom/prompts/shared.js +138 -0
- package/dist/custom/providers/llm-usage.js +42 -0
- package/dist/custom/providers/message-converter.js +74 -0
- package/dist/custom/providers/provider-ids.js +9 -0
- package/dist/custom/providers/register-openai-codex-provider.js +27 -0
- package/dist/custom/providers/register-shortcut-provider.js +52 -0
- package/dist/custom/providers/shortcut-invoke.js +117 -0
- package/dist/custom/providers/shortcut-stream.js +252 -0
- package/dist/custom/providers/sse-protocol.js +38 -0
- package/dist/custom/sync-xll.js +130 -0
- package/dist/custom/tools/cron.js +413 -0
- package/dist/custom/tools/excel-exec.js +167 -0
- package/dist/custom/tools/excel-range.js +50 -0
- package/dist/custom/tools/llm-analysis.js +265 -0
- package/dist/custom/tools/render-helpers.js +38 -0
- package/dist/custom/tools/switch-mode.js +94 -0
- package/dist/custom/tools/task/agents.js +6 -0
- package/dist/custom/tools/task/index.js +8 -0
- package/dist/custom/tools/task/render.js +348 -0
- package/dist/custom/tools/task/subprocess.js +320 -0
- package/dist/custom/tools/task/task.js +205 -0
- package/dist/custom/tools/todo-list.js +195 -0
- package/dist/custom/tracing/session-upload.js +93 -0
- package/dist/index.js +45 -0
- package/dist/main.js +613 -0
- package/dist/migrations.js +265 -0
- package/dist/modes/index.js +8 -0
- package/dist/modes/interactive/components/armin.js +337 -0
- package/dist/modes/interactive/components/assistant-message.js +94 -0
- package/dist/modes/interactive/components/bash-execution.js +171 -0
- package/dist/modes/interactive/components/bordered-loader.js +51 -0
- package/dist/modes/interactive/components/branch-summary-message.js +45 -0
- package/dist/modes/interactive/components/compaction-summary-message.js +46 -0
- package/dist/modes/interactive/components/config-selector.js +488 -0
- package/dist/modes/interactive/components/countdown-timer.js +33 -0
- package/dist/modes/interactive/components/custom-editor.js +93 -0
- package/dist/modes/interactive/components/custom-message.js +81 -0
- package/dist/modes/interactive/components/daxnuts.js +140 -0
- package/dist/modes/interactive/components/diff.js +133 -0
- package/dist/modes/interactive/components/dynamic-border.js +21 -0
- package/dist/modes/interactive/components/extension-editor.js +105 -0
- package/dist/modes/interactive/components/extension-input.js +61 -0
- package/dist/modes/interactive/components/extension-selector.js +78 -0
- package/dist/modes/interactive/components/footer.js +309 -0
- package/dist/modes/interactive/components/index.js +33 -0
- package/dist/modes/interactive/components/keybinding-hints.js +61 -0
- package/dist/modes/interactive/components/layout.js +64 -0
- package/dist/modes/interactive/components/login-dialog.js +148 -0
- package/dist/modes/interactive/components/model-selector.js +237 -0
- package/dist/modes/interactive/components/oauth-selector.js +111 -0
- package/dist/modes/interactive/components/session-selector-search.js +157 -0
- package/dist/modes/interactive/components/session-selector.js +860 -0
- package/dist/modes/interactive/components/settings-selector.js +123 -0
- package/dist/modes/interactive/components/show-images-selector.js +35 -0
- package/dist/modes/interactive/components/skill-invocation-message.js +48 -0
- package/dist/modes/interactive/components/theme-selector.js +47 -0
- package/dist/modes/interactive/components/thinking-selector.js +47 -0
- package/dist/modes/interactive/components/tool-execution.js +789 -0
- package/dist/modes/interactive/components/tool-group.js +106 -0
- package/dist/modes/interactive/components/tree-selector.js +962 -0
- package/dist/modes/interactive/components/user-message-selector.js +115 -0
- package/dist/modes/interactive/components/user-message.js +48 -0
- package/dist/modes/interactive/components/visual-truncate.js +33 -0
- package/dist/modes/interactive/file-attachments.js +135 -0
- package/dist/modes/interactive/interactive-mode.js +3775 -0
- package/dist/modes/interactive/theme/dark.json +85 -0
- package/dist/modes/interactive/theme/light.json +85 -0
- package/dist/modes/interactive/theme/theme-schema.json +335 -0
- package/dist/modes/interactive/theme/theme.js +177 -0
- package/dist/modes/print-mode.js +101 -0
- package/dist/modes/rpc/rpc-client.js +387 -0
- package/dist/modes/rpc/rpc-mode.js +509 -0
- package/dist/modes/rpc/rpc-types.js +8 -0
- package/dist/subagent-entry.js +145 -0
- package/dist/tool-names.js +34 -0
- package/dist/tui/autocomplete.js +596 -0
- package/dist/tui/components/box.js +104 -0
- package/dist/tui/components/cancellable-loader.js +35 -0
- package/dist/tui/components/editor.js +1679 -0
- package/dist/tui/components/image.js +69 -0
- package/dist/tui/components/input.js +433 -0
- package/dist/tui/components/loader.js +49 -0
- package/dist/tui/components/markdown.js +629 -0
- package/dist/tui/components/select-list.js +152 -0
- package/dist/tui/components/settings-list.js +185 -0
- package/dist/tui/components/spacer.js +23 -0
- package/dist/tui/components/text.js +89 -0
- package/dist/tui/components/truncated-text.js +51 -0
- package/dist/tui/editor-component.js +2 -0
- package/dist/tui/fuzzy.js +107 -0
- package/dist/tui/get-east-asian-width/index.js +32 -0
- package/dist/tui/get-east-asian-width/lookup.js +404 -0
- package/dist/tui/index.js +32 -0
- package/dist/tui/keybindings.js +114 -0
- package/dist/tui/keys.js +959 -0
- package/dist/tui/kill-ring.js +44 -0
- package/dist/tui/stdin-buffer.js +317 -0
- package/dist/tui/terminal-image.js +288 -0
- package/dist/tui/terminal.js +249 -0
- package/dist/tui/tui/autocomplete.js +596 -0
- package/dist/tui/tui/components/box.js +106 -0
- package/dist/tui/tui/components/cancellable-loader.js +35 -0
- package/dist/tui/tui/components/editor.js +1679 -0
- package/dist/tui/tui/components/image.js +69 -0
- package/dist/tui/tui/components/input.js +433 -0
- package/dist/tui/tui/components/loader.js +49 -0
- package/dist/tui/tui/components/markdown.js +629 -0
- package/dist/tui/tui/components/select-list.js +152 -0
- package/dist/tui/tui/components/settings-list.js +185 -0
- package/dist/tui/tui/components/spacer.js +23 -0
- package/dist/tui/tui/components/text.js +91 -0
- package/dist/tui/tui/components/truncated-text.js +51 -0
- package/dist/tui/tui/editor-component.js +2 -0
- package/dist/tui/tui/fuzzy.js +107 -0
- package/dist/tui/tui/get-east-asian-width/index.js +32 -0
- package/dist/tui/tui/get-east-asian-width/lookup.js +404 -0
- package/dist/tui/tui/index.js +32 -0
- package/dist/tui/tui/keybindings.js +114 -0
- package/dist/tui/tui/keys.js +959 -0
- package/dist/tui/tui/kill-ring.js +44 -0
- package/dist/tui/tui/stdin-buffer.js +317 -0
- package/dist/tui/tui/terminal-image.js +288 -0
- package/dist/tui/tui/terminal.js +249 -0
- package/dist/tui/tui/tui.js +955 -0
- package/dist/tui/tui/undo-stack.js +25 -0
- package/dist/tui/tui/utils.js +800 -0
- package/dist/tui/tui.js +955 -0
- package/dist/tui/undo-stack.js +25 -0
- package/dist/tui/utils.js +800 -0
- package/dist/utils/changelog.js +87 -0
- package/dist/utils/clipboard-image.js +164 -0
- package/dist/utils/clipboard-native.js +14 -0
- package/dist/utils/clipboard.js +67 -0
- package/dist/utils/frontmatter.js +26 -0
- package/dist/utils/git.js +166 -0
- package/dist/utils/image-convert.js +35 -0
- package/dist/utils/image-resize.js +183 -0
- package/dist/utils/mime.js +26 -0
- package/dist/utils/photon.js +121 -0
- package/dist/utils/shell.js +217 -0
- package/dist/utils/sleep.js +17 -0
- package/dist/utils/tools-manager.js +259 -0
- package/package.json +78 -0
- package/skills/excel-com-api/SKILL.md +74 -0
- package/skills/excel-com-api/excel-type-library.py +27767 -0
- package/skills/excel-com-api/office-type-library.py +10867 -0
- package/skills/integrations/SKILL.md +138 -0
- package/skills/integrations/alphasense.md +457 -0
- package/skills/integrations/bloomberg.md +803 -0
- package/skills/integrations/calcbench.md +315 -0
- package/skills/integrations/capiq.md +848 -0
- package/skills/integrations/dynamics-365-finance.md +354 -0
- package/skills/integrations/earnings_transcripts.md +387 -0
- package/skills/integrations/factset.md +758 -0
- package/skills/integrations/ice-fixed-income.md +344 -0
- package/skills/integrations/moodys-analytics.md +313 -0
- package/skills/integrations/morningstar.md +433 -0
- package/skills/integrations/nasdaq-data-link.md +249 -0
- package/skills/integrations/pitchbook.md +413 -0
- package/skills/integrations/preqin.md +422 -0
- package/skills/integrations/quickbooks.md +289 -0
- package/skills/integrations/quickfs.md +314 -0
- package/skills/integrations/refinitiv.md +473 -0
- package/skills/integrations/sage-intacct.md +401 -0
- package/skills/integrations/visible-alpha.md +320 -0
- package/skills/integrations/xero.md +393 -0
- package/skills/integrations/ycharts.md +306 -0
- package/skills/pdf-creation/SKILL.md +93 -0
- package/skills/pdf-extraction/SKILL.md +32 -0
- package/skills/powerpoint-creation/SKILL.md +110 -0
- package/skills/sec-edgar/SKILL.md +127 -0
- package/skills/sec-edgar/sec_to_pdf.py +109 -0
- package/xll/ShortcutXL.xll +0 -0
- package/xll/modules/debug_render.py +272 -0
- package/xll/modules/gameboy.py +241 -0
- package/xll/modules/pong.py +188 -0
- package/xll/modules/shortcut_xl/__init__.py +18 -0
- package/xll/modules/shortcut_xl/_categorize.py +200 -0
- package/xll/modules/shortcut_xl/_com.py +108 -0
- package/xll/modules/shortcut_xl/_format.py +252 -0
- package/xll/modules/shortcut_xl/_log.py +12 -0
- package/xll/modules/shortcut_xl/_managed.py +116 -0
- package/xll/modules/shortcut_xl/_registry.py +44 -0
- package/xll/modules/shortcut_xl/_threading.py +161 -0
- package/xll/modules/shortcut_xl/_tracking.py +283 -0
- package/xll/modules/stocks.py +100 -0
- package/xll/python3.dll +0 -0
- package/xll/python312.dll +0 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model resolution, scoping, and initial selection
|
|
3
|
+
*/
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
import { DEFAULT_THINKING_LEVEL, isValidThinkingLevel } from './defaults.js';
|
|
6
|
+
/** Default model IDs for each known provider */
|
|
7
|
+
export const defaultModelPerProvider = {
|
|
8
|
+
'amazon-bedrock': 'us.anthropic.claude-opus-4-6-v1',
|
|
9
|
+
anthropic: 'claude-opus-4-6',
|
|
10
|
+
openai: 'gpt-5.1-codex',
|
|
11
|
+
'azure-openai-responses': 'gpt-5.2',
|
|
12
|
+
'openai-codex': 'gpt-5.3-codex',
|
|
13
|
+
google: 'gemini-2.5-pro',
|
|
14
|
+
'google-gemini-cli': 'gemini-2.5-pro',
|
|
15
|
+
'google-antigravity': 'gemini-3-pro-high',
|
|
16
|
+
'google-vertex': 'gemini-3-pro-preview',
|
|
17
|
+
'github-copilot': 'gpt-4o',
|
|
18
|
+
openrouter: 'openai/gpt-5.1-codex',
|
|
19
|
+
'vercel-ai-gateway': 'anthropic/claude-opus-4-6',
|
|
20
|
+
xai: 'grok-4-fast-non-reasoning',
|
|
21
|
+
groq: 'openai/gpt-oss-120b',
|
|
22
|
+
cerebras: 'zai-glm-4.6',
|
|
23
|
+
zai: 'glm-4.6',
|
|
24
|
+
mistral: 'devstral-medium-latest',
|
|
25
|
+
minimax: 'MiniMax-M2.1',
|
|
26
|
+
'minimax-cn': 'MiniMax-M2.1',
|
|
27
|
+
huggingface: 'moonshotai/Kimi-K2.5',
|
|
28
|
+
opencode: 'claude-opus-4-6',
|
|
29
|
+
'kimi-coding': 'kimi-k2-thinking'
|
|
30
|
+
};
|
|
31
|
+
// SHORTCUT PATCH: removed ScopedModel interface and resolveModelScope — all authed models available for cycling
|
|
32
|
+
/**
|
|
33
|
+
* Helper to check if a model ID looks like an alias (no date suffix)
|
|
34
|
+
* Dates are typically in format: -20241022 or -20250929
|
|
35
|
+
*/
|
|
36
|
+
function isAlias(id) {
|
|
37
|
+
// Check if ID ends with -latest
|
|
38
|
+
if (id.endsWith('-latest'))
|
|
39
|
+
return true;
|
|
40
|
+
// Check if ID ends with a date pattern (-YYYYMMDD)
|
|
41
|
+
const datePattern = /-\d{8}$/;
|
|
42
|
+
return !datePattern.test(id);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Try to match a pattern to a model from the available models list.
|
|
46
|
+
* Returns the matched model or undefined if no match found.
|
|
47
|
+
*/
|
|
48
|
+
function tryMatchModel(modelPattern, availableModels) {
|
|
49
|
+
// Check for provider/modelId format (provider is everything before the first /)
|
|
50
|
+
const slashIndex = modelPattern.indexOf('/');
|
|
51
|
+
if (slashIndex !== -1) {
|
|
52
|
+
const provider = modelPattern.substring(0, slashIndex);
|
|
53
|
+
const modelId = modelPattern.substring(slashIndex + 1);
|
|
54
|
+
const providerMatch = availableModels.find((m) => m.provider.toLowerCase() === provider.toLowerCase() &&
|
|
55
|
+
m.id.toLowerCase() === modelId.toLowerCase());
|
|
56
|
+
if (providerMatch) {
|
|
57
|
+
return providerMatch;
|
|
58
|
+
}
|
|
59
|
+
// Provider was explicitly specified but model not found for that provider.
|
|
60
|
+
// Do NOT fall through to matching other providers — respect the explicit provider.
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
// Check for exact ID match (case-insensitive)
|
|
64
|
+
const exactMatch = availableModels.find((m) => m.id.toLowerCase() === modelPattern.toLowerCase());
|
|
65
|
+
if (exactMatch) {
|
|
66
|
+
return exactMatch;
|
|
67
|
+
}
|
|
68
|
+
// No exact match - fall back to partial matching
|
|
69
|
+
const matches = availableModels.filter((m) => m.id.toLowerCase().includes(modelPattern.toLowerCase()) ||
|
|
70
|
+
m.name?.toLowerCase().includes(modelPattern.toLowerCase()));
|
|
71
|
+
if (matches.length === 0) {
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
// Separate into aliases and dated versions
|
|
75
|
+
const aliases = matches.filter((m) => isAlias(m.id));
|
|
76
|
+
const datedVersions = matches.filter((m) => !isAlias(m.id));
|
|
77
|
+
if (aliases.length > 0) {
|
|
78
|
+
// Prefer alias - if multiple aliases, pick the one that sorts highest
|
|
79
|
+
aliases.sort((a, b) => b.id.localeCompare(a.id));
|
|
80
|
+
return aliases[0];
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
// No alias found, pick latest dated version
|
|
84
|
+
datedVersions.sort((a, b) => b.id.localeCompare(a.id));
|
|
85
|
+
return datedVersions[0];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Parse a pattern to extract model and thinking level.
|
|
90
|
+
* Handles models with colons in their IDs (e.g., OpenRouter's :exacto suffix).
|
|
91
|
+
*
|
|
92
|
+
* Algorithm:
|
|
93
|
+
* 1. Try to match full pattern as a model
|
|
94
|
+
* 2. If found, return it with "off" thinking level
|
|
95
|
+
* 3. If not found and has colons, split on last colon:
|
|
96
|
+
* - If suffix is valid thinking level, use it and recurse on prefix
|
|
97
|
+
* - If suffix is invalid, warn and recurse on prefix with "off"
|
|
98
|
+
*
|
|
99
|
+
* @internal Exported for testing
|
|
100
|
+
*/
|
|
101
|
+
export function parseModelPattern(pattern, availableModels, options) {
|
|
102
|
+
// Try exact match first
|
|
103
|
+
const exactMatch = tryMatchModel(pattern, availableModels);
|
|
104
|
+
if (exactMatch) {
|
|
105
|
+
return { model: exactMatch, thinkingLevel: undefined, warning: undefined };
|
|
106
|
+
}
|
|
107
|
+
// No match - try splitting on last colon if present
|
|
108
|
+
const lastColonIndex = pattern.lastIndexOf(':');
|
|
109
|
+
if (lastColonIndex === -1) {
|
|
110
|
+
// No colons, pattern simply doesn't match any model
|
|
111
|
+
return { model: undefined, thinkingLevel: undefined, warning: undefined };
|
|
112
|
+
}
|
|
113
|
+
const prefix = pattern.substring(0, lastColonIndex);
|
|
114
|
+
const suffix = pattern.substring(lastColonIndex + 1);
|
|
115
|
+
if (isValidThinkingLevel(suffix)) {
|
|
116
|
+
// Valid thinking level - recurse on prefix and use this level
|
|
117
|
+
const result = parseModelPattern(prefix, availableModels, options);
|
|
118
|
+
if (result.model) {
|
|
119
|
+
// Only use this thinking level if no warning from inner recursion
|
|
120
|
+
return {
|
|
121
|
+
model: result.model,
|
|
122
|
+
thinkingLevel: result.warning ? undefined : suffix,
|
|
123
|
+
warning: result.warning
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
return result;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
// Invalid suffix
|
|
130
|
+
const allowFallback = options?.allowInvalidThinkingLevelFallback ?? true;
|
|
131
|
+
if (!allowFallback) {
|
|
132
|
+
// In strict mode (CLI --model parsing), treat it as part of the model id and fail.
|
|
133
|
+
// This avoids accidentally resolving to a different model.
|
|
134
|
+
return { model: undefined, thinkingLevel: undefined, warning: undefined };
|
|
135
|
+
}
|
|
136
|
+
// Scope mode: recurse on prefix and warn
|
|
137
|
+
const result = parseModelPattern(prefix, availableModels, options);
|
|
138
|
+
if (result.model) {
|
|
139
|
+
return {
|
|
140
|
+
model: result.model,
|
|
141
|
+
thinkingLevel: undefined,
|
|
142
|
+
warning: `Invalid thinking level "${suffix}" in pattern "${pattern}". Using default instead.`
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return result;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Resolve a single model from CLI flags.
|
|
150
|
+
*
|
|
151
|
+
* Supports:
|
|
152
|
+
* - --provider <provider> --model <pattern>
|
|
153
|
+
* - --model <provider>/<pattern>
|
|
154
|
+
* - Fuzzy matching (same rules as model scoping: exact id, then partial id/name)
|
|
155
|
+
*
|
|
156
|
+
* Note: This does not apply the thinking level by itself, but it may *parse* and
|
|
157
|
+
* return a thinking level from "<pattern>:<thinking>" so the caller can apply it.
|
|
158
|
+
*/
|
|
159
|
+
export function resolveCliModel(options) {
|
|
160
|
+
const { cliProvider, cliModel, modelRegistry } = options;
|
|
161
|
+
if (!cliModel) {
|
|
162
|
+
return { model: undefined, warning: undefined, error: undefined };
|
|
163
|
+
}
|
|
164
|
+
// Important: use *all* models here, not just models with pre-configured auth.
|
|
165
|
+
// This allows "--api-key" to be used for first-time setup.
|
|
166
|
+
const availableModels = modelRegistry.getAll();
|
|
167
|
+
if (availableModels.length === 0) {
|
|
168
|
+
return {
|
|
169
|
+
model: undefined,
|
|
170
|
+
warning: undefined,
|
|
171
|
+
error: 'No models available. Check your installation or add models to models.json.'
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
// Build canonical provider lookup (case-insensitive)
|
|
175
|
+
const providerMap = new Map();
|
|
176
|
+
for (const m of availableModels) {
|
|
177
|
+
providerMap.set(m.provider.toLowerCase(), m.provider);
|
|
178
|
+
}
|
|
179
|
+
let provider = cliProvider ? providerMap.get(cliProvider.toLowerCase()) : undefined;
|
|
180
|
+
if (cliProvider && !provider) {
|
|
181
|
+
return {
|
|
182
|
+
model: undefined,
|
|
183
|
+
warning: undefined,
|
|
184
|
+
error: `Unknown provider "${cliProvider}". Use --list-models to see available providers/models.`
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
// If no explicit --provider, try to interpret "provider/model" format first.
|
|
188
|
+
// When the prefix before the first slash matches a known provider, prefer that
|
|
189
|
+
// interpretation over matching models whose IDs literally contain slashes
|
|
190
|
+
// (e.g. "zai/glm-5" should resolve to provider=zai, model=glm-5, not to a
|
|
191
|
+
// vercel-ai-gateway model with id "zai/glm-5").
|
|
192
|
+
let pattern = cliModel;
|
|
193
|
+
let inferredProvider = false;
|
|
194
|
+
if (!provider) {
|
|
195
|
+
const slashIndex = cliModel.indexOf('/');
|
|
196
|
+
if (slashIndex !== -1) {
|
|
197
|
+
const maybeProvider = cliModel.substring(0, slashIndex);
|
|
198
|
+
const canonical = providerMap.get(maybeProvider.toLowerCase());
|
|
199
|
+
if (canonical) {
|
|
200
|
+
provider = canonical;
|
|
201
|
+
pattern = cliModel.substring(slashIndex + 1);
|
|
202
|
+
inferredProvider = true;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
// If no provider was inferred from the slash, try exact matches without provider inference.
|
|
207
|
+
// This handles models whose IDs naturally contain slashes (e.g. OpenRouter-style IDs).
|
|
208
|
+
if (!provider) {
|
|
209
|
+
const lower = cliModel.toLowerCase();
|
|
210
|
+
const exact = availableModels.find((m) => m.id.toLowerCase() === lower || `${m.provider}/${m.id}`.toLowerCase() === lower);
|
|
211
|
+
if (exact) {
|
|
212
|
+
return { model: exact, warning: undefined, thinkingLevel: undefined, error: undefined };
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
if (cliProvider && provider) {
|
|
216
|
+
// If both were provided, tolerate --model <provider>/<pattern> by stripping the provider prefix
|
|
217
|
+
const prefix = `${provider}/`;
|
|
218
|
+
if (cliModel.toLowerCase().startsWith(prefix.toLowerCase())) {
|
|
219
|
+
pattern = cliModel.substring(prefix.length);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
const candidates = provider
|
|
223
|
+
? availableModels.filter((m) => m.provider === provider)
|
|
224
|
+
: availableModels;
|
|
225
|
+
const { model, thinkingLevel, warning } = parseModelPattern(pattern, candidates, {
|
|
226
|
+
allowInvalidThinkingLevelFallback: false
|
|
227
|
+
});
|
|
228
|
+
if (model) {
|
|
229
|
+
return { model, thinkingLevel, warning, error: undefined };
|
|
230
|
+
}
|
|
231
|
+
// If we inferred a provider from the slash but found no match within that provider,
|
|
232
|
+
// fall back to matching the full input as a raw model id across all models.
|
|
233
|
+
// This handles OpenRouter-style IDs like "openai/gpt-4o:extended" where "openai"
|
|
234
|
+
// looks like a provider but the full string is actually a model id on openrouter.
|
|
235
|
+
if (inferredProvider) {
|
|
236
|
+
const lower = cliModel.toLowerCase();
|
|
237
|
+
const exact = availableModels.find((m) => m.id.toLowerCase() === lower || `${m.provider}/${m.id}`.toLowerCase() === lower);
|
|
238
|
+
if (exact) {
|
|
239
|
+
return { model: exact, warning: undefined, thinkingLevel: undefined, error: undefined };
|
|
240
|
+
}
|
|
241
|
+
// Also try parseModelPattern on the full input against all models
|
|
242
|
+
const fallback = parseModelPattern(cliModel, availableModels, {
|
|
243
|
+
allowInvalidThinkingLevelFallback: false
|
|
244
|
+
});
|
|
245
|
+
if (fallback.model) {
|
|
246
|
+
return {
|
|
247
|
+
model: fallback.model,
|
|
248
|
+
thinkingLevel: fallback.thinkingLevel,
|
|
249
|
+
warning: fallback.warning,
|
|
250
|
+
error: undefined
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
const display = provider ? `${provider}/${pattern}` : cliModel;
|
|
255
|
+
return {
|
|
256
|
+
model: undefined,
|
|
257
|
+
thinkingLevel: undefined,
|
|
258
|
+
warning,
|
|
259
|
+
error: `Model "${display}" not found. Use --list-models to see available models.`
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
// SHORTCUT PATCH: simplified findInitialModel — removed scopedModels parameter
|
|
263
|
+
/**
|
|
264
|
+
* Find the initial model to use based on priority:
|
|
265
|
+
* 1. CLI args (provider + model)
|
|
266
|
+
* 2. Saved default from settings
|
|
267
|
+
* 3. First available model with valid API key
|
|
268
|
+
*/
|
|
269
|
+
export async function findInitialModel(options) {
|
|
270
|
+
const { cliProvider, cliModel, defaultProvider, defaultModelId, defaultThinkingLevel, modelRegistry } = options;
|
|
271
|
+
let model;
|
|
272
|
+
let thinkingLevel = DEFAULT_THINKING_LEVEL;
|
|
273
|
+
// 1. CLI args take priority
|
|
274
|
+
if (cliProvider && cliModel) {
|
|
275
|
+
const found = modelRegistry.find(cliProvider, cliModel);
|
|
276
|
+
if (!found) {
|
|
277
|
+
console.error(chalk.red(`Model ${cliProvider}/${cliModel} not found`));
|
|
278
|
+
process.exit(1);
|
|
279
|
+
}
|
|
280
|
+
return { model: found, thinkingLevel: DEFAULT_THINKING_LEVEL, fallbackMessage: undefined };
|
|
281
|
+
}
|
|
282
|
+
// 2. Try saved default from settings
|
|
283
|
+
if (defaultProvider && defaultModelId) {
|
|
284
|
+
const found = modelRegistry.find(defaultProvider, defaultModelId);
|
|
285
|
+
if (found) {
|
|
286
|
+
model = found;
|
|
287
|
+
if (defaultThinkingLevel) {
|
|
288
|
+
thinkingLevel = defaultThinkingLevel;
|
|
289
|
+
}
|
|
290
|
+
return { model, thinkingLevel, fallbackMessage: undefined };
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
// 4. Try first available model with valid API key
|
|
294
|
+
const availableModels = await modelRegistry.getAvailable();
|
|
295
|
+
if (availableModels.length > 0) {
|
|
296
|
+
// Try to find a default model from known providers
|
|
297
|
+
for (const provider of Object.keys(defaultModelPerProvider)) {
|
|
298
|
+
const defaultId = defaultModelPerProvider[provider];
|
|
299
|
+
const match = availableModels.find((m) => m.provider === provider && m.id === defaultId);
|
|
300
|
+
if (match) {
|
|
301
|
+
return { model: match, thinkingLevel: DEFAULT_THINKING_LEVEL, fallbackMessage: undefined };
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
// If no default found, use first available
|
|
305
|
+
return {
|
|
306
|
+
model: availableModels[0],
|
|
307
|
+
thinkingLevel: DEFAULT_THINKING_LEVEL,
|
|
308
|
+
fallbackMessage: undefined
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
// 5. No model found
|
|
312
|
+
return { model: undefined, thinkingLevel: DEFAULT_THINKING_LEVEL, fallbackMessage: undefined };
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Restore model from session, with fallback to available models
|
|
316
|
+
*/
|
|
317
|
+
export async function restoreModelFromSession(savedProvider, savedModelId, currentModel, shouldPrintMessages, modelRegistry) {
|
|
318
|
+
const restoredModel = modelRegistry.find(savedProvider, savedModelId);
|
|
319
|
+
// Check if restored model exists and has a valid API key
|
|
320
|
+
const hasApiKey = restoredModel ? !!(await modelRegistry.getApiKey(restoredModel)) : false;
|
|
321
|
+
if (restoredModel && hasApiKey) {
|
|
322
|
+
if (shouldPrintMessages) {
|
|
323
|
+
console.log(chalk.dim(`Restored model: ${savedProvider}/${savedModelId}`));
|
|
324
|
+
}
|
|
325
|
+
return { model: restoredModel, fallbackMessage: undefined };
|
|
326
|
+
}
|
|
327
|
+
// Model not found or no API key - fall back
|
|
328
|
+
const reason = !restoredModel ? 'model no longer exists' : 'no API key available';
|
|
329
|
+
if (shouldPrintMessages) {
|
|
330
|
+
console.error(chalk.yellow(`Warning: Could not restore model ${savedProvider}/${savedModelId} (${reason}).`));
|
|
331
|
+
}
|
|
332
|
+
// If we already have a model, use it as fallback
|
|
333
|
+
if (currentModel) {
|
|
334
|
+
if (shouldPrintMessages) {
|
|
335
|
+
console.log(chalk.dim(`Falling back to: ${currentModel.provider}/${currentModel.id}`));
|
|
336
|
+
}
|
|
337
|
+
return {
|
|
338
|
+
model: currentModel,
|
|
339
|
+
fallbackMessage: `Could not restore model ${savedProvider}/${savedModelId} (${reason}). Using ${currentModel.provider}/${currentModel.id}.`
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
// Try to find any available model
|
|
343
|
+
const availableModels = await modelRegistry.getAvailable();
|
|
344
|
+
if (availableModels.length > 0) {
|
|
345
|
+
// Try to find a default model from known providers
|
|
346
|
+
let fallbackModel;
|
|
347
|
+
for (const provider of Object.keys(defaultModelPerProvider)) {
|
|
348
|
+
const defaultId = defaultModelPerProvider[provider];
|
|
349
|
+
const match = availableModels.find((m) => m.provider === provider && m.id === defaultId);
|
|
350
|
+
if (match) {
|
|
351
|
+
fallbackModel = match;
|
|
352
|
+
break;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
// If no default found, use first available
|
|
356
|
+
if (!fallbackModel) {
|
|
357
|
+
fallbackModel = availableModels[0];
|
|
358
|
+
}
|
|
359
|
+
if (shouldPrintMessages) {
|
|
360
|
+
console.log(chalk.dim(`Falling back to: ${fallbackModel.provider}/${fallbackModel.id}`));
|
|
361
|
+
}
|
|
362
|
+
return {
|
|
363
|
+
model: fallbackModel,
|
|
364
|
+
fallbackMessage: `Could not restore model ${savedProvider}/${savedModelId} (${reason}). Using ${fallbackModel.provider}/${fallbackModel.id}.`
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
// No models available
|
|
368
|
+
return { model: undefined, fallbackMessage: undefined };
|
|
369
|
+
}
|
|
370
|
+
//# sourceMappingURL=model-resolver.js.map
|