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,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Process @file CLI arguments into text content and image attachments
|
|
3
|
+
*/
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
import { access, readFile, stat } from 'node:fs/promises';
|
|
6
|
+
import { resolve } from 'path';
|
|
7
|
+
import { resolveReadPath } from '../core/tools/path-utils.js';
|
|
8
|
+
import { formatDimensionNote, resizeImage } from '../utils/image-resize.js';
|
|
9
|
+
import { detectSupportedImageMimeTypeFromFile } from '../utils/mime.js';
|
|
10
|
+
/** Process @file arguments into text content and image attachments */
|
|
11
|
+
export async function processFileArguments(fileArgs, options) {
|
|
12
|
+
const autoResizeImages = options?.autoResizeImages ?? true;
|
|
13
|
+
let text = '';
|
|
14
|
+
const images = [];
|
|
15
|
+
for (const fileArg of fileArgs) {
|
|
16
|
+
// Expand and resolve path (handles ~ expansion and macOS screenshot Unicode spaces)
|
|
17
|
+
const absolutePath = resolve(resolveReadPath(fileArg, process.cwd()));
|
|
18
|
+
// Check if file exists
|
|
19
|
+
try {
|
|
20
|
+
await access(absolutePath);
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
console.error(chalk.red(`Error: File not found: ${absolutePath}`));
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
// Check if file is empty
|
|
27
|
+
const stats = await stat(absolutePath);
|
|
28
|
+
if (stats.size === 0) {
|
|
29
|
+
// Skip empty files
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const mimeType = await detectSupportedImageMimeTypeFromFile(absolutePath);
|
|
33
|
+
if (mimeType) {
|
|
34
|
+
// Handle image file
|
|
35
|
+
const content = await readFile(absolutePath);
|
|
36
|
+
const base64Content = content.toString('base64');
|
|
37
|
+
let attachment;
|
|
38
|
+
let dimensionNote;
|
|
39
|
+
if (autoResizeImages) {
|
|
40
|
+
const resized = await resizeImage({ type: 'image', data: base64Content, mimeType });
|
|
41
|
+
dimensionNote = formatDimensionNote(resized);
|
|
42
|
+
attachment = {
|
|
43
|
+
type: 'image',
|
|
44
|
+
mimeType: resized.mimeType,
|
|
45
|
+
data: resized.data
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
attachment = {
|
|
50
|
+
type: 'image',
|
|
51
|
+
mimeType,
|
|
52
|
+
data: base64Content
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
images.push(attachment);
|
|
56
|
+
// Add text reference to image with optional dimension note
|
|
57
|
+
if (dimensionNote) {
|
|
58
|
+
text += `<file name="${absolutePath}">${dimensionNote}</file>\n`;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
text += `<file name="${absolutePath}"></file>\n`;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
// Handle text file
|
|
66
|
+
try {
|
|
67
|
+
const content = await readFile(absolutePath, 'utf-8');
|
|
68
|
+
text += `<file name="${absolutePath}">\n${content}\n</file>\n`;
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
72
|
+
console.error(chalk.red(`Error: Could not read file ${absolutePath}: ${message}`));
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return { text, images };
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=file-processor.js.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List available models with optional fuzzy search
|
|
3
|
+
*/
|
|
4
|
+
import { fuzzyFilter } from '../tui/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* Format a number as human-readable (e.g., 200000 -> "200K", 1000000 -> "1M")
|
|
7
|
+
*/
|
|
8
|
+
function formatTokenCount(count) {
|
|
9
|
+
if (count >= 1_000_000) {
|
|
10
|
+
const millions = count / 1_000_000;
|
|
11
|
+
return millions % 1 === 0 ? `${millions}M` : `${millions.toFixed(1)}M`;
|
|
12
|
+
}
|
|
13
|
+
if (count >= 1_000) {
|
|
14
|
+
const thousands = count / 1_000;
|
|
15
|
+
return thousands % 1 === 0 ? `${thousands}K` : `${thousands.toFixed(1)}K`;
|
|
16
|
+
}
|
|
17
|
+
return count.toString();
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* List available models, optionally filtered by search pattern
|
|
21
|
+
*/
|
|
22
|
+
export async function listModels(modelRegistry, searchPattern) {
|
|
23
|
+
const models = modelRegistry.getAvailable();
|
|
24
|
+
if (models.length === 0) {
|
|
25
|
+
console.log('No models available. Set API keys in environment variables.');
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
// Apply fuzzy filter if search pattern provided
|
|
29
|
+
let filteredModels = models;
|
|
30
|
+
if (searchPattern) {
|
|
31
|
+
filteredModels = fuzzyFilter(models, searchPattern, (m) => `${m.provider} ${m.id}`);
|
|
32
|
+
}
|
|
33
|
+
if (filteredModels.length === 0) {
|
|
34
|
+
console.log(`No models matching "${searchPattern}"`);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
// Sort by provider, then by model id
|
|
38
|
+
filteredModels.sort((a, b) => {
|
|
39
|
+
const providerCmp = a.provider.localeCompare(b.provider);
|
|
40
|
+
if (providerCmp !== 0)
|
|
41
|
+
return providerCmp;
|
|
42
|
+
return a.id.localeCompare(b.id);
|
|
43
|
+
});
|
|
44
|
+
// Calculate column widths
|
|
45
|
+
const rows = filteredModels.map((m) => ({
|
|
46
|
+
provider: m.provider,
|
|
47
|
+
model: m.id,
|
|
48
|
+
context: formatTokenCount(m.contextWindow),
|
|
49
|
+
maxOut: formatTokenCount(m.maxTokens),
|
|
50
|
+
thinking: m.reasoning ? 'yes' : 'no',
|
|
51
|
+
images: m.input.includes('image') ? 'yes' : 'no'
|
|
52
|
+
}));
|
|
53
|
+
const headers = {
|
|
54
|
+
provider: 'provider',
|
|
55
|
+
model: 'model',
|
|
56
|
+
context: 'context',
|
|
57
|
+
maxOut: 'max-out',
|
|
58
|
+
thinking: 'thinking',
|
|
59
|
+
images: 'images'
|
|
60
|
+
};
|
|
61
|
+
const widths = {
|
|
62
|
+
provider: Math.max(headers.provider.length, ...rows.map((r) => r.provider.length)),
|
|
63
|
+
model: Math.max(headers.model.length, ...rows.map((r) => r.model.length)),
|
|
64
|
+
context: Math.max(headers.context.length, ...rows.map((r) => r.context.length)),
|
|
65
|
+
maxOut: Math.max(headers.maxOut.length, ...rows.map((r) => r.maxOut.length)),
|
|
66
|
+
thinking: Math.max(headers.thinking.length, ...rows.map((r) => r.thinking.length)),
|
|
67
|
+
images: Math.max(headers.images.length, ...rows.map((r) => r.images.length))
|
|
68
|
+
};
|
|
69
|
+
// Print header
|
|
70
|
+
const headerLine = [
|
|
71
|
+
headers.provider.padEnd(widths.provider),
|
|
72
|
+
headers.model.padEnd(widths.model),
|
|
73
|
+
headers.context.padEnd(widths.context),
|
|
74
|
+
headers.maxOut.padEnd(widths.maxOut),
|
|
75
|
+
headers.thinking.padEnd(widths.thinking),
|
|
76
|
+
headers.images.padEnd(widths.images)
|
|
77
|
+
].join(' ');
|
|
78
|
+
console.log(headerLine);
|
|
79
|
+
// Print rows
|
|
80
|
+
for (const row of rows) {
|
|
81
|
+
const line = [
|
|
82
|
+
row.provider.padEnd(widths.provider),
|
|
83
|
+
row.model.padEnd(widths.model),
|
|
84
|
+
row.context.padEnd(widths.context),
|
|
85
|
+
row.maxOut.padEnd(widths.maxOut),
|
|
86
|
+
row.thinking.padEnd(widths.thinking),
|
|
87
|
+
row.images.padEnd(widths.images)
|
|
88
|
+
].join(' ');
|
|
89
|
+
console.log(line);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=list-models.js.map
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI package sub-commands: install, remove, update, list.
|
|
3
|
+
*
|
|
4
|
+
* Self-contained — only called from main.ts when the first CLI arg
|
|
5
|
+
* matches a package command name.
|
|
6
|
+
*/
|
|
7
|
+
import chalk from 'chalk';
|
|
8
|
+
import { APP_NAME, getAgentDir } from '../config.js';
|
|
9
|
+
import { DefaultPackageManager } from '../core/package-manager.js';
|
|
10
|
+
import { SettingsManager } from '../core/settings-manager.js';
|
|
11
|
+
import { reportSettingsErrors } from './report-settings-errors.js';
|
|
12
|
+
function getPackageCommandUsage(command) {
|
|
13
|
+
switch (command) {
|
|
14
|
+
case 'install':
|
|
15
|
+
return `${APP_NAME} install <source> [-l]`;
|
|
16
|
+
case 'remove':
|
|
17
|
+
return `${APP_NAME} remove <source> [-l]`;
|
|
18
|
+
case 'update':
|
|
19
|
+
return `${APP_NAME} update [source]`;
|
|
20
|
+
case 'list':
|
|
21
|
+
return `${APP_NAME} list`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function printPackageCommandHelp(command) {
|
|
25
|
+
switch (command) {
|
|
26
|
+
case 'install':
|
|
27
|
+
console.log(`${chalk.bold('Usage:')}
|
|
28
|
+
${getPackageCommandUsage('install')}
|
|
29
|
+
|
|
30
|
+
Install a package and add it to settings.
|
|
31
|
+
|
|
32
|
+
Options:
|
|
33
|
+
-l, --local Install project-locally (.pi/settings.json)
|
|
34
|
+
|
|
35
|
+
Examples:
|
|
36
|
+
${APP_NAME} install npm:@foo/bar
|
|
37
|
+
${APP_NAME} install git:github.com/user/repo
|
|
38
|
+
${APP_NAME} install git:git@github.com:user/repo
|
|
39
|
+
${APP_NAME} install https://github.com/user/repo
|
|
40
|
+
${APP_NAME} install ssh://git@github.com/user/repo
|
|
41
|
+
${APP_NAME} install ./local/path
|
|
42
|
+
`);
|
|
43
|
+
return;
|
|
44
|
+
case 'remove':
|
|
45
|
+
console.log(`${chalk.bold('Usage:')}
|
|
46
|
+
${getPackageCommandUsage('remove')}
|
|
47
|
+
|
|
48
|
+
Remove a package and its source from settings.
|
|
49
|
+
|
|
50
|
+
Options:
|
|
51
|
+
-l, --local Remove from project settings (.pi/settings.json)
|
|
52
|
+
|
|
53
|
+
Example:
|
|
54
|
+
${APP_NAME} remove npm:@foo/bar
|
|
55
|
+
`);
|
|
56
|
+
return;
|
|
57
|
+
case 'update':
|
|
58
|
+
console.log(`${chalk.bold('Usage:')}
|
|
59
|
+
${getPackageCommandUsage('update')}
|
|
60
|
+
|
|
61
|
+
Update installed packages.
|
|
62
|
+
If <source> is provided, only that package is updated.
|
|
63
|
+
`);
|
|
64
|
+
return;
|
|
65
|
+
case 'list':
|
|
66
|
+
console.log(`${chalk.bold('Usage:')}
|
|
67
|
+
${getPackageCommandUsage('list')}
|
|
68
|
+
|
|
69
|
+
List installed packages from user and project settings.
|
|
70
|
+
`);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function parsePackageCommand(args) {
|
|
75
|
+
const [command, ...rest] = args;
|
|
76
|
+
if (command !== 'install' && command !== 'remove' && command !== 'update' && command !== 'list') {
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
let local = false;
|
|
80
|
+
let help = false;
|
|
81
|
+
let invalidOption;
|
|
82
|
+
let source;
|
|
83
|
+
for (const arg of rest) {
|
|
84
|
+
if (arg === '-h' || arg === '--help') {
|
|
85
|
+
help = true;
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
if (arg === '-l' || arg === '--local') {
|
|
89
|
+
if (command === 'install' || command === 'remove') {
|
|
90
|
+
local = true;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
invalidOption = invalidOption ?? arg;
|
|
94
|
+
}
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
if (arg.startsWith('-')) {
|
|
98
|
+
invalidOption = invalidOption ?? arg;
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
if (!source) {
|
|
102
|
+
source = arg;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return { command, source, local, help, invalidOption };
|
|
106
|
+
}
|
|
107
|
+
export async function handlePackageCommand(args) {
|
|
108
|
+
const options = parsePackageCommand(args);
|
|
109
|
+
if (!options) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
if (options.help) {
|
|
113
|
+
printPackageCommandHelp(options.command);
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
if (options.invalidOption) {
|
|
117
|
+
console.error(chalk.red(`Unknown option ${options.invalidOption} for "${options.command}".`));
|
|
118
|
+
console.error(chalk.dim(`Use "${APP_NAME} --help" or "${getPackageCommandUsage(options.command)}".`));
|
|
119
|
+
process.exitCode = 1;
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
const source = options.source;
|
|
123
|
+
if ((options.command === 'install' || options.command === 'remove') && !source) {
|
|
124
|
+
console.error(chalk.red(`Missing ${options.command} source.`));
|
|
125
|
+
console.error(chalk.dim(`Usage: ${getPackageCommandUsage(options.command)}`));
|
|
126
|
+
process.exitCode = 1;
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
const cwd = process.cwd();
|
|
130
|
+
const agentDir = getAgentDir();
|
|
131
|
+
const settingsManager = SettingsManager.create(cwd, agentDir);
|
|
132
|
+
reportSettingsErrors(settingsManager, 'package command');
|
|
133
|
+
const packageManager = new DefaultPackageManager({ cwd, agentDir, settingsManager });
|
|
134
|
+
packageManager.setProgressCallback((event) => {
|
|
135
|
+
if (event.type === 'start') {
|
|
136
|
+
process.stdout.write(chalk.dim(`${event.message}\n`));
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
try {
|
|
140
|
+
switch (options.command) {
|
|
141
|
+
case 'install':
|
|
142
|
+
await packageManager.install(source, { local: options.local });
|
|
143
|
+
packageManager.addSourceToSettings(source, { local: options.local });
|
|
144
|
+
console.log(chalk.green(`Installed ${source}`));
|
|
145
|
+
return true;
|
|
146
|
+
case 'remove': {
|
|
147
|
+
await packageManager.remove(source, { local: options.local });
|
|
148
|
+
const removed = packageManager.removeSourceFromSettings(source, { local: options.local });
|
|
149
|
+
if (!removed) {
|
|
150
|
+
console.error(chalk.red(`No matching package found for ${source}`));
|
|
151
|
+
process.exitCode = 1;
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
console.log(chalk.green(`Removed ${source}`));
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
case 'list': {
|
|
158
|
+
const globalSettings = settingsManager.getGlobalSettings();
|
|
159
|
+
const projectSettings = settingsManager.getProjectSettings();
|
|
160
|
+
const globalPackages = globalSettings.packages ?? [];
|
|
161
|
+
const projectPackages = projectSettings.packages ?? [];
|
|
162
|
+
if (globalPackages.length === 0 && projectPackages.length === 0) {
|
|
163
|
+
console.log(chalk.dim('No packages installed.'));
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
const formatPackage = (pkg, scope) => {
|
|
167
|
+
const source = typeof pkg === 'string' ? pkg : pkg.source;
|
|
168
|
+
const filtered = typeof pkg === 'object';
|
|
169
|
+
const display = filtered ? `${source} (filtered)` : source;
|
|
170
|
+
console.log(` ${display}`);
|
|
171
|
+
const path = packageManager.getInstalledPath(source, scope);
|
|
172
|
+
if (path) {
|
|
173
|
+
console.log(chalk.dim(` ${path}`));
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
if (globalPackages.length > 0) {
|
|
177
|
+
console.log(chalk.bold('User packages:'));
|
|
178
|
+
for (const pkg of globalPackages) {
|
|
179
|
+
formatPackage(pkg, 'user');
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (projectPackages.length > 0) {
|
|
183
|
+
if (globalPackages.length > 0)
|
|
184
|
+
console.log();
|
|
185
|
+
console.log(chalk.bold('Project packages:'));
|
|
186
|
+
for (const pkg of projectPackages) {
|
|
187
|
+
formatPackage(pkg, 'project');
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return true;
|
|
191
|
+
}
|
|
192
|
+
case 'update':
|
|
193
|
+
await packageManager.update(source);
|
|
194
|
+
if (source) {
|
|
195
|
+
console.log(chalk.green(`Updated ${source}`));
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
console.log(chalk.green('Updated packages'));
|
|
199
|
+
}
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
catch (error) {
|
|
204
|
+
const message = error instanceof Error ? error.message : 'Unknown package command error';
|
|
205
|
+
console.error(chalk.red(`Error: ${message}`));
|
|
206
|
+
process.exitCode = 1;
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=package-commands.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
export function reportSettingsErrors(settingsManager, context) {
|
|
3
|
+
const errors = settingsManager.drainErrors();
|
|
4
|
+
for (const { scope, error } of errors) {
|
|
5
|
+
console.error(chalk.yellow(`Warning (${context}, ${scope} settings): ${error.message}`));
|
|
6
|
+
if (error.stack) {
|
|
7
|
+
console.error(chalk.dim(error.stack));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=report-settings-errors.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TUI session selector for --resume flag
|
|
3
|
+
*/
|
|
4
|
+
import { ProcessTerminal, TUI } from '../tui/index.js';
|
|
5
|
+
import { KeybindingsManager } from '../core/keybindings.js';
|
|
6
|
+
import { SessionSelectorComponent } from '../modes/interactive/components/session-selector.js';
|
|
7
|
+
/** Show TUI session selector and return selected session path or null if cancelled */
|
|
8
|
+
export async function selectSession(currentSessionsLoader, allSessionsLoader) {
|
|
9
|
+
return new Promise((resolve) => {
|
|
10
|
+
const ui = new TUI(new ProcessTerminal());
|
|
11
|
+
const keybindings = KeybindingsManager.create();
|
|
12
|
+
let resolved = false;
|
|
13
|
+
const selector = new SessionSelectorComponent(currentSessionsLoader, allSessionsLoader, (path) => {
|
|
14
|
+
if (!resolved) {
|
|
15
|
+
resolved = true;
|
|
16
|
+
ui.stop();
|
|
17
|
+
resolve(path);
|
|
18
|
+
}
|
|
19
|
+
}, () => {
|
|
20
|
+
if (!resolved) {
|
|
21
|
+
resolved = true;
|
|
22
|
+
ui.stop();
|
|
23
|
+
resolve(null);
|
|
24
|
+
}
|
|
25
|
+
}, () => {
|
|
26
|
+
ui.stop();
|
|
27
|
+
process.exit(0);
|
|
28
|
+
}, () => ui.requestRender(), { showRenameHint: false, keybindings });
|
|
29
|
+
ui.addChild(selector);
|
|
30
|
+
ui.setFocus(selector.getSessionList());
|
|
31
|
+
ui.start();
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=session-picker.js.map
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* CLI entry point for the refactored coding agent.
|
|
4
|
+
* Uses main.ts with AgentSession and new mode modules.
|
|
5
|
+
*
|
|
6
|
+
* Test with: npx tsx src/cli-new.ts [args...]
|
|
7
|
+
*/
|
|
8
|
+
// Load .env BEFORE any app imports so constants.ts reads the correct values.
|
|
9
|
+
// Must use dynamic import() because ESM hoists static imports above top-level code.
|
|
10
|
+
import dotenv from 'dotenv';
|
|
11
|
+
import { dirname, resolve } from 'path';
|
|
12
|
+
import { fileURLToPath } from 'url';
|
|
13
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
const agentRoot = resolve(__dirname, '..');
|
|
15
|
+
dotenv.config({ path: resolve(agentRoot, '.env.development') });
|
|
16
|
+
process.title = 'shortcut';
|
|
17
|
+
const { main } = await import('./main.js');
|
|
18
|
+
main(process.argv.slice(2));
|
|
19
|
+
//# sourceMappingURL=cli.js.map
|