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,259 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { spawnSync } from 'child_process';
|
|
3
|
+
import extractZip from 'extract-zip';
|
|
4
|
+
import { chmodSync, createWriteStream, existsSync, mkdirSync, readdirSync, renameSync, rmSync } from 'fs';
|
|
5
|
+
import { arch, platform } from 'os';
|
|
6
|
+
import { join } from 'path';
|
|
7
|
+
import { Readable } from 'stream';
|
|
8
|
+
import { finished } from 'stream/promises';
|
|
9
|
+
import { APP_NAME, getBinDir } from '../config.js';
|
|
10
|
+
const TOOLS_DIR = getBinDir();
|
|
11
|
+
const NETWORK_TIMEOUT_MS = 10000;
|
|
12
|
+
function isOfflineModeEnabled() {
|
|
13
|
+
// SHORTCUT PATCH: renamed from PI_OFFLINE
|
|
14
|
+
const value = process.env.SHORTCUT_OFFLINE;
|
|
15
|
+
if (!value)
|
|
16
|
+
return false;
|
|
17
|
+
return value === '1' || value.toLowerCase() === 'true' || value.toLowerCase() === 'yes';
|
|
18
|
+
}
|
|
19
|
+
const TOOLS = {
|
|
20
|
+
fd: {
|
|
21
|
+
name: 'fd',
|
|
22
|
+
repo: 'sharkdp/fd',
|
|
23
|
+
binaryName: 'fd',
|
|
24
|
+
tagPrefix: 'v',
|
|
25
|
+
getAssetName: (version, plat, architecture) => {
|
|
26
|
+
if (plat === 'darwin') {
|
|
27
|
+
const archStr = architecture === 'arm64' ? 'aarch64' : 'x86_64';
|
|
28
|
+
return `fd-v${version}-${archStr}-apple-darwin.tar.gz`;
|
|
29
|
+
}
|
|
30
|
+
else if (plat === 'linux') {
|
|
31
|
+
const archStr = architecture === 'arm64' ? 'aarch64' : 'x86_64';
|
|
32
|
+
return `fd-v${version}-${archStr}-unknown-linux-gnu.tar.gz`;
|
|
33
|
+
}
|
|
34
|
+
else if (plat === 'win32') {
|
|
35
|
+
const archStr = architecture === 'arm64' ? 'aarch64' : 'x86_64';
|
|
36
|
+
return `fd-v${version}-${archStr}-pc-windows-msvc.zip`;
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
rg: {
|
|
42
|
+
name: 'ripgrep',
|
|
43
|
+
repo: 'BurntSushi/ripgrep',
|
|
44
|
+
binaryName: 'rg',
|
|
45
|
+
tagPrefix: '',
|
|
46
|
+
getAssetName: (version, plat, architecture) => {
|
|
47
|
+
if (plat === 'darwin') {
|
|
48
|
+
const archStr = architecture === 'arm64' ? 'aarch64' : 'x86_64';
|
|
49
|
+
return `ripgrep-${version}-${archStr}-apple-darwin.tar.gz`;
|
|
50
|
+
}
|
|
51
|
+
else if (plat === 'linux') {
|
|
52
|
+
if (architecture === 'arm64') {
|
|
53
|
+
return `ripgrep-${version}-aarch64-unknown-linux-gnu.tar.gz`;
|
|
54
|
+
}
|
|
55
|
+
return `ripgrep-${version}-x86_64-unknown-linux-musl.tar.gz`;
|
|
56
|
+
}
|
|
57
|
+
else if (plat === 'win32') {
|
|
58
|
+
const archStr = architecture === 'arm64' ? 'aarch64' : 'x86_64';
|
|
59
|
+
return `ripgrep-${version}-${archStr}-pc-windows-msvc.zip`;
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
// Check if a command exists in PATH by trying to run it
|
|
66
|
+
function commandExists(cmd) {
|
|
67
|
+
try {
|
|
68
|
+
const result = spawnSync(cmd, ['--version'], { stdio: 'pipe' });
|
|
69
|
+
// Check for ENOENT error (command not found)
|
|
70
|
+
return result.error === undefined || result.error === null;
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// Get the path to a tool (system-wide or in our tools dir)
|
|
77
|
+
function getToolPath(tool) {
|
|
78
|
+
const config = TOOLS[tool];
|
|
79
|
+
if (!config)
|
|
80
|
+
return null;
|
|
81
|
+
// Check our tools directory first
|
|
82
|
+
const localPath = join(TOOLS_DIR, config.binaryName + (platform() === 'win32' ? '.exe' : ''));
|
|
83
|
+
if (existsSync(localPath)) {
|
|
84
|
+
return localPath;
|
|
85
|
+
}
|
|
86
|
+
// Check system PATH - if found, just return the command name (it's in PATH)
|
|
87
|
+
if (commandExists(config.binaryName)) {
|
|
88
|
+
return config.binaryName;
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
// Fetch latest release version from GitHub
|
|
93
|
+
async function getLatestVersion(repo) {
|
|
94
|
+
const response = await fetch(`https://api.github.com/repos/${repo}/releases/latest`, {
|
|
95
|
+
headers: { 'User-Agent': `${APP_NAME}-coding-agent` },
|
|
96
|
+
signal: AbortSignal.timeout(NETWORK_TIMEOUT_MS)
|
|
97
|
+
});
|
|
98
|
+
if (!response.ok) {
|
|
99
|
+
throw new Error(`GitHub API error: ${response.status}`);
|
|
100
|
+
}
|
|
101
|
+
const data = (await response.json());
|
|
102
|
+
return data.tag_name.replace(/^v/, '');
|
|
103
|
+
}
|
|
104
|
+
// Download a file from URL
|
|
105
|
+
async function downloadFile(url, dest) {
|
|
106
|
+
const response = await fetch(url, {
|
|
107
|
+
signal: AbortSignal.timeout(NETWORK_TIMEOUT_MS)
|
|
108
|
+
});
|
|
109
|
+
if (!response.ok) {
|
|
110
|
+
throw new Error(`Failed to download: ${response.status}`);
|
|
111
|
+
}
|
|
112
|
+
if (!response.body) {
|
|
113
|
+
throw new Error('No response body');
|
|
114
|
+
}
|
|
115
|
+
const fileStream = createWriteStream(dest);
|
|
116
|
+
await finished(Readable.fromWeb(response.body).pipe(fileStream));
|
|
117
|
+
}
|
|
118
|
+
function findBinaryRecursively(rootDir, binaryFileName) {
|
|
119
|
+
const stack = [rootDir];
|
|
120
|
+
while (stack.length > 0) {
|
|
121
|
+
const currentDir = stack.pop();
|
|
122
|
+
if (!currentDir)
|
|
123
|
+
continue;
|
|
124
|
+
const entries = readdirSync(currentDir, { withFileTypes: true });
|
|
125
|
+
for (const entry of entries) {
|
|
126
|
+
const fullPath = join(currentDir, entry.name);
|
|
127
|
+
if (entry.isFile() && entry.name === binaryFileName) {
|
|
128
|
+
return fullPath;
|
|
129
|
+
}
|
|
130
|
+
if (entry.isDirectory()) {
|
|
131
|
+
stack.push(fullPath);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
// Download and install a tool
|
|
138
|
+
async function downloadTool(tool) {
|
|
139
|
+
const config = TOOLS[tool];
|
|
140
|
+
if (!config)
|
|
141
|
+
throw new Error(`Unknown tool: ${tool}`);
|
|
142
|
+
const plat = platform();
|
|
143
|
+
const architecture = arch();
|
|
144
|
+
// Get latest version
|
|
145
|
+
const version = await getLatestVersion(config.repo);
|
|
146
|
+
// Get asset name for this platform
|
|
147
|
+
const assetName = config.getAssetName(version, plat, architecture);
|
|
148
|
+
if (!assetName) {
|
|
149
|
+
throw new Error(`Unsupported platform: ${plat}/${architecture}`);
|
|
150
|
+
}
|
|
151
|
+
// Create tools directory
|
|
152
|
+
mkdirSync(TOOLS_DIR, { recursive: true });
|
|
153
|
+
const downloadUrl = `https://github.com/${config.repo}/releases/download/${config.tagPrefix}${version}/${assetName}`;
|
|
154
|
+
const archivePath = join(TOOLS_DIR, assetName);
|
|
155
|
+
const binaryExt = plat === 'win32' ? '.exe' : '';
|
|
156
|
+
const binaryPath = join(TOOLS_DIR, config.binaryName + binaryExt);
|
|
157
|
+
// Download
|
|
158
|
+
await downloadFile(downloadUrl, archivePath);
|
|
159
|
+
// Extract into a unique temp directory. fd and rg downloads can run concurrently
|
|
160
|
+
// during startup, so sharing a fixed directory causes races.
|
|
161
|
+
const extractDir = join(TOOLS_DIR, `extract_tmp_${config.binaryName}_${process.pid}_${Date.now()}_${Math.random().toString(36).slice(2, 10)}`);
|
|
162
|
+
mkdirSync(extractDir, { recursive: true });
|
|
163
|
+
try {
|
|
164
|
+
if (assetName.endsWith('.tar.gz')) {
|
|
165
|
+
const extractResult = spawnSync('tar', ['xzf', archivePath, '-C', extractDir], {
|
|
166
|
+
stdio: 'pipe'
|
|
167
|
+
});
|
|
168
|
+
if (extractResult.error || extractResult.status !== 0) {
|
|
169
|
+
const errMsg = extractResult.error?.message ??
|
|
170
|
+
extractResult.stderr?.toString().trim() ??
|
|
171
|
+
'unknown error';
|
|
172
|
+
throw new Error(`Failed to extract ${assetName}: ${errMsg}`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
else if (assetName.endsWith('.zip')) {
|
|
176
|
+
await extractZip(archivePath, { dir: extractDir });
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
throw new Error(`Unsupported archive format: ${assetName}`);
|
|
180
|
+
}
|
|
181
|
+
// Find the binary in extracted files. Some archives contain files directly
|
|
182
|
+
// at root, others nest under a versioned subdirectory.
|
|
183
|
+
const binaryFileName = config.binaryName + binaryExt;
|
|
184
|
+
const extractedDir = join(extractDir, assetName.replace(/\.(tar\.gz|zip)$/, ''));
|
|
185
|
+
const extractedBinaryCandidates = [
|
|
186
|
+
join(extractedDir, binaryFileName),
|
|
187
|
+
join(extractDir, binaryFileName)
|
|
188
|
+
];
|
|
189
|
+
let extractedBinary = extractedBinaryCandidates.find((candidate) => existsSync(candidate));
|
|
190
|
+
if (!extractedBinary) {
|
|
191
|
+
extractedBinary = findBinaryRecursively(extractDir, binaryFileName) ?? undefined;
|
|
192
|
+
}
|
|
193
|
+
if (extractedBinary) {
|
|
194
|
+
renameSync(extractedBinary, binaryPath);
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
throw new Error(`Binary not found in archive: expected ${binaryFileName} under ${extractDir}`);
|
|
198
|
+
}
|
|
199
|
+
// Make executable (Unix only)
|
|
200
|
+
if (plat !== 'win32') {
|
|
201
|
+
chmodSync(binaryPath, 0o755);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
finally {
|
|
205
|
+
// Cleanup
|
|
206
|
+
rmSync(archivePath, { force: true });
|
|
207
|
+
rmSync(extractDir, { recursive: true, force: true });
|
|
208
|
+
}
|
|
209
|
+
return binaryPath;
|
|
210
|
+
}
|
|
211
|
+
// Termux package names for tools
|
|
212
|
+
const TERMUX_PACKAGES = {
|
|
213
|
+
fd: 'fd',
|
|
214
|
+
rg: 'ripgrep'
|
|
215
|
+
};
|
|
216
|
+
// Ensure a tool is available, downloading if necessary
|
|
217
|
+
// Returns the path to the tool, or null if unavailable
|
|
218
|
+
export async function ensureTool(tool, silent = false) {
|
|
219
|
+
const existingPath = getToolPath(tool);
|
|
220
|
+
if (existingPath) {
|
|
221
|
+
return existingPath;
|
|
222
|
+
}
|
|
223
|
+
const config = TOOLS[tool];
|
|
224
|
+
if (!config)
|
|
225
|
+
return undefined;
|
|
226
|
+
if (isOfflineModeEnabled()) {
|
|
227
|
+
if (!silent) {
|
|
228
|
+
console.log(chalk.yellow(`${config.name} not found. Offline mode enabled, skipping download.`));
|
|
229
|
+
}
|
|
230
|
+
return undefined;
|
|
231
|
+
}
|
|
232
|
+
// On Android/Termux, Linux binaries don't work due to Bionic libc incompatibility.
|
|
233
|
+
// Users must install via pkg.
|
|
234
|
+
if (platform() === 'android') {
|
|
235
|
+
const pkgName = TERMUX_PACKAGES[tool] ?? tool;
|
|
236
|
+
if (!silent) {
|
|
237
|
+
console.log(chalk.yellow(`${config.name} not found. Install with: pkg install ${pkgName}`));
|
|
238
|
+
}
|
|
239
|
+
return undefined;
|
|
240
|
+
}
|
|
241
|
+
// Tool not found - download it
|
|
242
|
+
if (!silent) {
|
|
243
|
+
console.log(chalk.dim(`${config.name} not found. Downloading...`));
|
|
244
|
+
}
|
|
245
|
+
try {
|
|
246
|
+
const path = await downloadTool(tool);
|
|
247
|
+
if (!silent) {
|
|
248
|
+
console.log(chalk.dim(`${config.name} installed to ${path}`));
|
|
249
|
+
}
|
|
250
|
+
return path;
|
|
251
|
+
}
|
|
252
|
+
catch (e) {
|
|
253
|
+
if (!silent) {
|
|
254
|
+
console.log(chalk.yellow(`Failed to download ${config.name}: ${e instanceof Error ? e.message : e}`));
|
|
255
|
+
}
|
|
256
|
+
return undefined;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
//# sourceMappingURL=tools-manager.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "shortcutxl",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist/",
|
|
7
|
+
"!dist/**/*.map",
|
|
8
|
+
"!dist/**/*.d.ts",
|
|
9
|
+
"!dist/**/*.d.ts.map",
|
|
10
|
+
"!dist/test-helpers/",
|
|
11
|
+
"skills/",
|
|
12
|
+
"agent-docs/",
|
|
13
|
+
"xll/"
|
|
14
|
+
],
|
|
15
|
+
"shortcutConfig": {
|
|
16
|
+
"name": "shortcut",
|
|
17
|
+
"configDir": ".shortcut"
|
|
18
|
+
},
|
|
19
|
+
"bin": {
|
|
20
|
+
"shortcut": "dist/cli.js"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc && npm run copy-assets",
|
|
24
|
+
"sync-modules": "cp -r ../modules/shortcut_xl/*.py xll/modules/shortcut_xl/",
|
|
25
|
+
"copy-assets": "npm run sync-modules && cp -r src/tui dist/tui && cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && cp src/core/export-html/*.{html,css,js} dist/core/export-html/ && cp src/core/export-html/vendor/*.js dist/core/export-html/vendor/",
|
|
26
|
+
"test-install": "npm uninstall -g shortcutxl & npm run build && npm pack && node -e \"const g=require('glob').globSync('shortcutxl-*.tgz')[0];require('child_process').execSync('npm install -g '+g,{stdio:'inherit'});require('fs').unlinkSync(g)\"",
|
|
27
|
+
"test-uninstall": "npm uninstall -g shortcutxl",
|
|
28
|
+
"dev": "tsx src/cli.ts",
|
|
29
|
+
"start": "node dist/cli.js",
|
|
30
|
+
"lint": "eslint src/",
|
|
31
|
+
"check-types": "tsc --noEmit",
|
|
32
|
+
"format": "prettier --write 'src/**/*.{ts,tsx,js,json}'",
|
|
33
|
+
"format:check": "prettier --check 'src/**/*.{ts,tsx,js,json}'",
|
|
34
|
+
"test": "vitest --run",
|
|
35
|
+
"test:e2e": "vitest --run --config vitest.e2e.config.ts",
|
|
36
|
+
"test:watch": "vitest",
|
|
37
|
+
"knip": "knip"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@mariozechner/jiti": "^2.6.5",
|
|
41
|
+
"@mariozechner/pi-agent-core": "^0.55.4",
|
|
42
|
+
"@mariozechner/pi-ai": "^0.55.4",
|
|
43
|
+
"@silvia-odwyer/photon-node": "^0.3.4",
|
|
44
|
+
"@sinclair/typebox": "^0.34.41",
|
|
45
|
+
"chalk": "^5.6.2",
|
|
46
|
+
"cli-highlight": "^2.1.11",
|
|
47
|
+
"croner": "^10.0.1",
|
|
48
|
+
"diff": "^8.0.3",
|
|
49
|
+
"ajv": "^8.17.1",
|
|
50
|
+
"dotenv": "^17.3.1",
|
|
51
|
+
"extract-zip": "^2.0.1",
|
|
52
|
+
"file-type": "^21.3.1",
|
|
53
|
+
"glob": "^13.0.6",
|
|
54
|
+
"hosted-git-info": "^9.0.2",
|
|
55
|
+
"ignore": "^7.0.5",
|
|
56
|
+
"marked": "^15.0.12",
|
|
57
|
+
"minimatch": "^10.2.4",
|
|
58
|
+
"proper-lockfile": "^4.1.2",
|
|
59
|
+
"strip-ansi": "^7.2.0",
|
|
60
|
+
"yaml": "^2.8.2"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@types/hosted-git-info": "^3.0.5",
|
|
64
|
+
"@types/node": "^22.0.0",
|
|
65
|
+
"@types/proper-lockfile": "^4.1.4",
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
67
|
+
"@typescript-eslint/parser": "^8.56.1",
|
|
68
|
+
"eslint": "^9.39.3",
|
|
69
|
+
"knip": "^5.85.0",
|
|
70
|
+
"prettier": "^3.8.1",
|
|
71
|
+
"tsx": "^4.21.0",
|
|
72
|
+
"typescript": "^5.7.3",
|
|
73
|
+
"vitest": "^3.2.4"
|
|
74
|
+
},
|
|
75
|
+
"engines": {
|
|
76
|
+
"node": ">=20.0.0"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: excel-com-api
|
|
3
|
+
description: Excel COM object model reference for win32com/pywin32. Use when you need to look up Excel COM properties, methods, enums, or constants for automation via Python. Covers Application, Workbook, Worksheet, Range, Chart, PivotTable, Shape, formatting, and all xl* constants.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Excel COM API via win32com (pywin32)
|
|
7
|
+
|
|
8
|
+
`app = xl_app()` returns `win32com.client.CDispatch` wrapping `Excel.Application`. The full VBA/COM object model is available — every property, method, and event. Nothing is neutered.
|
|
9
|
+
|
|
10
|
+
## Type Libraries
|
|
11
|
+
|
|
12
|
+
Two auto-generated type stubs from the actual Excel type library (`EXCEL.EXE`) via [pyxll/exceltypes](https://github.com/pyxll/exceltypes). These are `typing.Protocol` classes with full method signatures, return types, and enum definitions.
|
|
13
|
+
|
|
14
|
+
- **`excel-type-library.py`** (~27,800 lines) — Microsoft Excel 16.0 Object Library. All Excel classes: Application, Workbook, Worksheet, Range, Chart, PivotTable, Shape, Style, etc. Plus all `Xl*` enums (XlChartType, XlFileFormat, XlBorderWeight, etc.) and the master `Constants` enum.
|
|
15
|
+
|
|
16
|
+
- **`office-type-library.py`** (~10,900 lines) — Microsoft Office 16.0 Object Library. Shared Office types: CommandBar, Shape (Office-level), FileDialog, DocumentProperties, Ribbon/IRibbonUI, plus all `Mso*` enums (MsoAutoShapeType, MsoThemeColor, etc.).
|
|
17
|
+
|
|
18
|
+
## Searching the API
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Find a class and its methods
|
|
22
|
+
grep -n "class Range" excel-type-library.py
|
|
23
|
+
grep -n "class Range" excel-type-library.py -A 200 | head -100
|
|
24
|
+
|
|
25
|
+
# Search for method/property names
|
|
26
|
+
grep -n "def AutoFilter\|def Sort\|def Find" excel-type-library.py
|
|
27
|
+
|
|
28
|
+
# Find enums and their values
|
|
29
|
+
grep -n "^class Xl" excel-type-library.py | head -50
|
|
30
|
+
grep -n "class XlChartType" excel-type-library.py -A 60
|
|
31
|
+
|
|
32
|
+
# Search for constants by name
|
|
33
|
+
grep -in "xlUp\|xlDown\|xlToLeft\|xlToRight" excel-type-library.py
|
|
34
|
+
|
|
35
|
+
# Find all properties on a class (properties are defined as methods with @property)
|
|
36
|
+
grep -n "class _Worksheet" excel-type-library.py -A 500 | grep "def \|@property" | head -80
|
|
37
|
+
|
|
38
|
+
# Search Office shared types (shapes, command bars, etc.)
|
|
39
|
+
grep -n "class CommandBar\|class Shape" office-type-library.py
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Key Classes (line references for excel-type-library.py)
|
|
43
|
+
|
|
44
|
+
Use `grep -n "class ClassName"` to find exact locations. Key Protocol classes:
|
|
45
|
+
|
|
46
|
+
- `_Application` — app-level settings, calculation, display, macros
|
|
47
|
+
- `_Workbook` — workbook operations, save, protect, connections
|
|
48
|
+
- `_Worksheet` — sheet operations, ranges, charts, pivot tables
|
|
49
|
+
- `Range` — cell operations, values, formulas, formatting, find/replace
|
|
50
|
+
- `_Chart` — chart type, series, axes, title, legend, export
|
|
51
|
+
- `PivotTable` — pivot cache, fields, calculated fields, refresh
|
|
52
|
+
- `ListObject` — structured tables, columns, rows, totals
|
|
53
|
+
- `Shape` — shapes, images, text frames, fills, lines
|
|
54
|
+
- `Style` — named styles, font, borders, interior
|
|
55
|
+
- `FormatCondition` — conditional formatting rules
|
|
56
|
+
- `Validation` — data validation rules
|
|
57
|
+
- `Comment` / `CommentThreaded` — cell comments
|
|
58
|
+
- `AutoFilter` — column filters
|
|
59
|
+
- `PageSetup` — print settings, margins, headers/footers
|
|
60
|
+
- `Name` — named ranges and formulas
|
|
61
|
+
- `Hyperlink` — cell hyperlinks
|
|
62
|
+
|
|
63
|
+
CoClasses (the actual dispatchable COM objects) are at the bottom of the file:
|
|
64
|
+
- `Application(_Application)` — line ~27746
|
|
65
|
+
- `Workbook(_Workbook)` — line ~27762
|
|
66
|
+
- `Worksheet(_Worksheet)` — line ~27766
|
|
67
|
+
|
|
68
|
+
## Python ↔ COM Notes
|
|
69
|
+
|
|
70
|
+
- COM collections are **1-based**: `ws.Cells(1,1)` is A1, `wb.Sheets(1)` is first sheet
|
|
71
|
+
- `.Value` returns **tuples of tuples** (0-based): `data[0][0]` is first cell
|
|
72
|
+
- Colors use **BGR order**: `r + (g << 8) + (b << 16)` — NOT RGB
|
|
73
|
+
- Dates come back as `pywintypes.datetime`, not Python `datetime`
|
|
74
|
+
- Constants can be used as raw integers (always works with late binding)
|