oh-my-musacode 0.0.1
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/LICENSE.md +82 -0
- package/README.ja.md +370 -0
- package/README.md +376 -0
- package/README.zh-cn.md +380 -0
- package/bin/oh-my-musacode-dev.js +80 -0
- package/bin/oh-my-musacode.js +80 -0
- package/bin/platform.js +38 -0
- package/bin/platform.test.ts +148 -0
- package/dist/agents/atlas.d.ts +19 -0
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +30 -0
- package/dist/agents/explore.d.ts +4 -0
- package/dist/agents/index.d.ts +11 -0
- package/dist/agents/librarian.d.ts +4 -0
- package/dist/agents/metis.d.ts +18 -0
- package/dist/agents/momus.d.ts +18 -0
- package/dist/agents/momus.test.d.ts +1 -0
- package/dist/agents/multimodal-looker.d.ts +4 -0
- package/dist/agents/musa-orchestrator-junior.d.ts +7 -0
- package/dist/agents/musa-orchestrator-junior.test.d.ts +1 -0
- package/dist/agents/musa-orchestrator.d.ts +3 -0
- package/dist/agents/oracle.d.ts +4 -0
- package/dist/agents/prometheus-prompt.d.ts +29 -0
- package/dist/agents/prometheus-prompt.test.d.ts +1 -0
- package/dist/agents/sisyphus-junior.d.ts +7 -0
- package/dist/agents/sisyphus-junior.test.d.ts +1 -0
- package/dist/agents/sisyphus.d.ts +3 -0
- package/dist/agents/types.d.ts +50 -0
- package/dist/agents/utils.d.ts +14 -0
- package/dist/agents/utils.test.d.ts +1 -0
- package/dist/cli/config-manager.d.ts +99 -0
- package/dist/cli/config-manager.test.d.ts +1 -0
- package/dist/cli/doctor/checks/auth.d.ts +7 -0
- package/dist/cli/doctor/checks/auth.test.d.ts +1 -0
- package/dist/cli/doctor/checks/config.d.ts +8 -0
- package/dist/cli/doctor/checks/config.test.d.ts +1 -0
- package/dist/cli/doctor/checks/dependencies.d.ts +8 -0
- package/dist/cli/doctor/checks/dependencies.test.d.ts +1 -0
- package/dist/cli/doctor/checks/gh.d.ts +13 -0
- package/dist/cli/doctor/checks/gh.test.d.ts +1 -0
- package/dist/cli/doctor/checks/index.d.ts +11 -0
- package/dist/cli/doctor/checks/lsp.d.ts +8 -0
- package/dist/cli/doctor/checks/lsp.test.d.ts +1 -0
- package/dist/cli/doctor/checks/mcp.d.ts +6 -0
- package/dist/cli/doctor/checks/mcp.test.d.ts +1 -0
- package/dist/cli/doctor/checks/musacode.d.ts +14 -0
- package/dist/cli/doctor/checks/musacode.test.d.ts +1 -0
- package/dist/cli/doctor/checks/plugin.d.ts +4 -0
- package/dist/cli/doctor/checks/plugin.test.d.ts +1 -0
- package/dist/cli/doctor/checks/version.d.ts +4 -0
- package/dist/cli/doctor/checks/version.test.d.ts +1 -0
- package/dist/cli/doctor/constants.d.ts +40 -0
- package/dist/cli/doctor/formatter.d.ts +12 -0
- package/dist/cli/doctor/formatter.test.d.ts +1 -0
- package/dist/cli/doctor/index.d.ts +5 -0
- package/dist/cli/doctor/runner.d.ts +7 -0
- package/dist/cli/doctor/runner.test.d.ts +1 -0
- package/dist/cli/doctor/types.d.ts +91 -0
- package/dist/cli/get-local-version/formatter.d.ts +3 -0
- package/dist/cli/get-local-version/index.d.ts +3 -0
- package/dist/cli/get-local-version/types.d.ts +13 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +25243 -0
- package/dist/cli/install.d.ts +2 -0
- package/dist/cli/run/completion.d.ts +2 -0
- package/dist/cli/run/completion.test.d.ts +1 -0
- package/dist/cli/run/events.d.ts +12 -0
- package/dist/cli/run/events.test.d.ts +1 -0
- package/dist/cli/run/index.d.ts +2 -0
- package/dist/cli/run/runner.d.ts +2 -0
- package/dist/cli/run/types.d.ts +71 -0
- package/dist/cli/types.d.ts +27 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/schema.d.ts +1835 -0
- package/dist/config/schema.test.d.ts +1 -0
- package/dist/features/background-agent/concurrency.d.ts +27 -0
- package/dist/features/background-agent/concurrency.test.d.ts +1 -0
- package/dist/features/background-agent/index.d.ts +3 -0
- package/dist/features/background-agent/manager.d.ts +104 -0
- package/dist/features/background-agent/manager.test.d.ts +1 -0
- package/dist/features/background-agent/types.d.ts +73 -0
- package/dist/features/boulder-state/constants.d.ts +10 -0
- package/dist/features/boulder-state/index.d.ts +3 -0
- package/dist/features/boulder-state/storage.d.ts +28 -0
- package/dist/features/boulder-state/storage.test.d.ts +1 -0
- package/dist/features/boulder-state/types.d.ts +24 -0
- package/dist/features/builtin-commands/commands.d.ts +2 -0
- package/dist/features/builtin-commands/index.d.ts +2 -0
- package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -0
- package/dist/features/builtin-commands/templates/ralph-loop.d.ts +2 -0
- package/dist/features/builtin-commands/templates/refactor.d.ts +1 -0
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -0
- package/dist/features/builtin-commands/types.d.ts +6 -0
- package/dist/features/builtin-skills/index.d.ts +2 -0
- package/dist/features/builtin-skills/skills.d.ts +2 -0
- package/dist/features/builtin-skills/types.d.ts +15 -0
- package/dist/features/claude-code-agent-loader/index.d.ts +2 -0
- package/dist/features/claude-code-agent-loader/loader.d.ts +3 -0
- package/dist/features/claude-code-agent-loader/types.d.ts +14 -0
- package/dist/features/claude-code-command-loader/index.d.ts +2 -0
- package/dist/features/claude-code-command-loader/loader.d.ts +6 -0
- package/dist/features/claude-code-command-loader/types.d.ts +42 -0
- package/dist/features/claude-code-mcp-loader/env-expander.d.ts +2 -0
- package/dist/features/claude-code-mcp-loader/index.d.ts +10 -0
- package/dist/features/claude-code-mcp-loader/loader.d.ts +4 -0
- package/dist/features/claude-code-mcp-loader/loader.test.d.ts +1 -0
- package/dist/features/claude-code-mcp-loader/transformer.d.ts +2 -0
- package/dist/features/claude-code-mcp-loader/types.d.ts +35 -0
- package/dist/features/claude-code-plugin-loader/index.d.ts +3 -0
- package/dist/features/claude-code-plugin-loader/loader.d.ts +20 -0
- package/dist/features/claude-code-plugin-loader/types.d.ts +186 -0
- package/dist/features/claude-code-session-state/index.d.ts +1 -0
- package/dist/features/claude-code-session-state/state.d.ts +9 -0
- package/dist/features/claude-code-session-state/state.test.d.ts +1 -0
- package/dist/features/context-injector/collector.d.ts +11 -0
- package/dist/features/context-injector/collector.test.d.ts +1 -0
- package/dist/features/context-injector/index.d.ts +3 -0
- package/dist/features/context-injector/injector.d.ts +39 -0
- package/dist/features/context-injector/injector.test.d.ts +1 -0
- package/dist/features/context-injector/types.d.ts +83 -0
- package/dist/features/hook-message-injector/constants.d.ts +3 -0
- package/dist/features/hook-message-injector/index.d.ts +4 -0
- package/dist/features/hook-message-injector/injector.d.ts +18 -0
- package/dist/features/hook-message-injector/types.d.ts +44 -0
- package/dist/features/musacode-skill-loader/async-loader.d.ts +6 -0
- package/dist/features/musacode-skill-loader/async-loader.test.d.ts +1 -0
- package/dist/features/musacode-skill-loader/blocking.d.ts +2 -0
- package/dist/features/musacode-skill-loader/blocking.test.d.ts +1 -0
- package/dist/features/musacode-skill-loader/discover-worker.d.ts +1 -0
- package/dist/features/musacode-skill-loader/index.d.ts +4 -0
- package/dist/features/musacode-skill-loader/loader.d.ts +16 -0
- package/dist/features/musacode-skill-loader/loader.test.d.ts +1 -0
- package/dist/features/musacode-skill-loader/merger.d.ts +7 -0
- package/dist/features/musacode-skill-loader/skill-content.d.ts +20 -0
- package/dist/features/musacode-skill-loader/skill-content.test.d.ts +1 -0
- package/dist/features/musacode-skill-loader/types.d.ts +34 -0
- package/dist/features/skill-mcp-manager/env-cleaner.d.ts +2 -0
- package/dist/features/skill-mcp-manager/env-cleaner.test.d.ts +1 -0
- package/dist/features/skill-mcp-manager/index.d.ts +2 -0
- package/dist/features/skill-mcp-manager/manager.d.ts +40 -0
- package/dist/features/skill-mcp-manager/manager.test.d.ts +1 -0
- package/dist/features/skill-mcp-manager/types.d.ts +11 -0
- package/dist/features/task-toast-manager/index.d.ts +2 -0
- package/dist/features/task-toast-manager/manager.d.ts +57 -0
- package/dist/features/task-toast-manager/manager.test.d.ts +1 -0
- package/dist/features/task-toast-manager/types.d.ts +21 -0
- package/dist/hooks/agent-usage-reminder/constants.d.ts +5 -0
- package/dist/hooks/agent-usage-reminder/index.d.ts +22 -0
- package/dist/hooks/agent-usage-reminder/storage.d.ts +4 -0
- package/dist/hooks/agent-usage-reminder/types.d.ts +6 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/executor.d.ts +4 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/executor.test.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/index.d.ts +16 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/parser.d.ts +2 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-deduplication.d.ts +7 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-deduplication.test.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-types.d.ts +36 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/storage.d.ts +28 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/storage.test.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +37 -0
- package/dist/hooks/atlas/index.d.ts +35 -0
- package/dist/hooks/atlas/index.test.d.ts +1 -0
- package/dist/hooks/auto-slash-command/constants.d.ts +5 -0
- package/dist/hooks/auto-slash-command/detector.d.ts +9 -0
- package/dist/hooks/auto-slash-command/detector.test.d.ts +1 -0
- package/dist/hooks/auto-slash-command/executor.d.ts +11 -0
- package/dist/hooks/auto-slash-command/index.d.ts +12 -0
- package/dist/hooks/auto-slash-command/index.test.d.ts +1 -0
- package/dist/hooks/auto-slash-command/types.d.ts +27 -0
- package/dist/hooks/auto-update-checker/cache.d.ts +3 -0
- package/dist/hooks/auto-update-checker/checker.d.ts +20 -0
- package/dist/hooks/auto-update-checker/checker.test.d.ts +1 -0
- package/dist/hooks/auto-update-checker/constants.d.ts +13 -0
- package/dist/hooks/auto-update-checker/index.d.ts +17 -0
- package/dist/hooks/auto-update-checker/index.test.d.ts +1 -0
- package/dist/hooks/auto-update-checker/types.d.ts +25 -0
- package/dist/hooks/background-compaction/index.d.ts +19 -0
- package/dist/hooks/background-notification/index.d.ts +18 -0
- package/dist/hooks/background-notification/types.d.ts +4 -0
- package/dist/hooks/claude-code-hooks/config-loader.d.ts +13 -0
- package/dist/hooks/claude-code-hooks/config.d.ts +3 -0
- package/dist/hooks/claude-code-hooks/index.d.ts +48 -0
- package/dist/hooks/claude-code-hooks/plugin-config.d.ts +8 -0
- package/dist/hooks/claude-code-hooks/post-tool-use.d.ts +40 -0
- package/dist/hooks/claude-code-hooks/pre-compact.d.ts +16 -0
- package/dist/hooks/claude-code-hooks/pre-tool-use.d.ts +25 -0
- package/dist/hooks/claude-code-hooks/stop.d.ts +20 -0
- package/dist/hooks/claude-code-hooks/todo.d.ts +12 -0
- package/dist/hooks/claude-code-hooks/tool-input-cache.d.ts +5 -0
- package/dist/hooks/claude-code-hooks/transcript.d.ts +38 -0
- package/dist/hooks/claude-code-hooks/types.d.ts +183 -0
- package/dist/hooks/claude-code-hooks/user-prompt-submit.d.ts +22 -0
- package/dist/hooks/comment-checker/cli.d.ts +52 -0
- package/dist/hooks/comment-checker/cli.test.d.ts +1 -0
- package/dist/hooks/comment-checker/downloader.d.ts +25 -0
- package/dist/hooks/comment-checker/index.d.ts +19 -0
- package/dist/hooks/comment-checker/types.d.ts +31 -0
- package/dist/hooks/compaction-context-injector/index.d.ts +8 -0
- package/dist/hooks/context-window-monitor.d.ts +18 -0
- package/dist/hooks/delegate-task-retry/index.d.ts +24 -0
- package/dist/hooks/delegate-task-retry/index.test.d.ts +1 -0
- package/dist/hooks/directory-agents-injector/constants.d.ts +3 -0
- package/dist/hooks/directory-agents-injector/index.d.ts +26 -0
- package/dist/hooks/directory-agents-injector/storage.d.ts +3 -0
- package/dist/hooks/directory-agents-injector/types.d.ts +5 -0
- package/dist/hooks/directory-readme-injector/constants.d.ts +3 -0
- package/dist/hooks/directory-readme-injector/index.d.ts +26 -0
- package/dist/hooks/directory-readme-injector/storage.d.ts +3 -0
- package/dist/hooks/directory-readme-injector/types.d.ts +5 -0
- package/dist/hooks/edit-error-recovery/index.d.ts +31 -0
- package/dist/hooks/edit-error-recovery/index.test.d.ts +1 -0
- package/dist/hooks/empty-task-response-detector.d.ts +12 -0
- package/dist/hooks/index.d.ts +29 -0
- package/dist/hooks/interactive-bash-session/constants.d.ts +4 -0
- package/dist/hooks/interactive-bash-session/index.d.ts +23 -0
- package/dist/hooks/interactive-bash-session/storage.d.ts +4 -0
- package/dist/hooks/interactive-bash-session/types.d.ts +10 -0
- package/dist/hooks/keyword-detector/constants.d.ts +12 -0
- package/dist/hooks/keyword-detector/detector.d.ts +11 -0
- package/dist/hooks/keyword-detector/index.d.ts +23 -0
- package/dist/hooks/keyword-detector/index.test.d.ts +1 -0
- package/dist/hooks/keyword-detector/types.d.ts +4 -0
- package/dist/hooks/non-interactive-env/constants.d.ts +34 -0
- package/dist/hooks/non-interactive-env/detector.d.ts +1 -0
- package/dist/hooks/non-interactive-env/index.d.ts +14 -0
- package/dist/hooks/non-interactive-env/index.test.d.ts +1 -0
- package/dist/hooks/non-interactive-env/types.d.ts +3 -0
- package/dist/hooks/prometheus-md-only/constants.d.ts +6 -0
- package/dist/hooks/prometheus-md-only/index.d.ts +12 -0
- package/dist/hooks/prometheus-md-only/index.test.d.ts +1 -0
- package/dist/hooks/ralph-loop/constants.d.ts +5 -0
- package/dist/hooks/ralph-loop/index.d.ts +21 -0
- package/dist/hooks/ralph-loop/index.test.d.ts +1 -0
- package/dist/hooks/ralph-loop/storage.d.ts +6 -0
- package/dist/hooks/ralph-loop/types.d.ts +17 -0
- package/dist/hooks/rules-injector/constants.d.ts +8 -0
- package/dist/hooks/rules-injector/finder.d.ts +33 -0
- package/dist/hooks/rules-injector/finder.test.d.ts +1 -0
- package/dist/hooks/rules-injector/index.d.ts +26 -0
- package/dist/hooks/rules-injector/matcher.d.ts +21 -0
- package/dist/hooks/rules-injector/parser.d.ts +18 -0
- package/dist/hooks/rules-injector/parser.test.d.ts +1 -0
- package/dist/hooks/rules-injector/storage.d.ts +9 -0
- package/dist/hooks/rules-injector/types.d.ts +54 -0
- package/dist/hooks/session-notification-utils.d.ts +9 -0
- package/dist/hooks/session-notification.d.ts +20 -0
- package/dist/hooks/session-notification.test.d.ts +1 -0
- package/dist/hooks/session-recovery/constants.d.ts +6 -0
- package/dist/hooks/session-recovery/index.d.ts +22 -0
- package/dist/hooks/session-recovery/index.test.d.ts +1 -0
- package/dist/hooks/session-recovery/storage.d.ts +19 -0
- package/dist/hooks/session-recovery/types.d.ts +90 -0
- package/dist/hooks/start-work/index.d.ts +16 -0
- package/dist/hooks/start-work/index.test.d.ts +1 -0
- package/dist/hooks/task-resume-info/index.d.ts +11 -0
- package/dist/hooks/think-mode/detector.d.ts +5 -0
- package/dist/hooks/think-mode/index.d.ts +14 -0
- package/dist/hooks/think-mode/index.test.d.ts +1 -0
- package/dist/hooks/think-mode/switcher.d.ts +57 -0
- package/dist/hooks/think-mode/switcher.test.d.ts +1 -0
- package/dist/hooks/think-mode/types.d.ts +21 -0
- package/dist/hooks/thinking-block-validator/index.d.ts +30 -0
- package/dist/hooks/todo-continuation-enforcer.d.ts +17 -0
- package/dist/hooks/todo-continuation-enforcer.test.d.ts +1 -0
- package/dist/hooks/tool-output-truncator.d.ts +17 -0
- package/dist/hooks/tool-output-truncator.test.d.ts +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +67990 -0
- package/dist/mcp/context7.d.ts +6 -0
- package/dist/mcp/grep-app.d.ts +6 -0
- package/dist/mcp/index.d.ts +9 -0
- package/dist/mcp/index.test.d.ts +1 -0
- package/dist/mcp/types.d.ts +9 -0
- package/dist/mcp/websearch.d.ts +9 -0
- package/dist/plugin-config.d.ts +4 -0
- package/dist/plugin-config.test.d.ts +1 -0
- package/dist/plugin-handlers/config-handler.d.ts +12 -0
- package/dist/plugin-handlers/config-handler.test.d.ts +1 -0
- package/dist/plugin-handlers/index.d.ts +1 -0
- package/dist/plugin-state.d.ts +6 -0
- package/dist/shared/agent-tool-restrictions.d.ts +7 -0
- package/dist/shared/agent-variant.d.ts +5 -0
- package/dist/shared/agent-variant.test.d.ts +1 -0
- package/dist/shared/claude-config-dir.d.ts +1 -0
- package/dist/shared/claude-config-dir.test.d.ts +1 -0
- package/dist/shared/command-executor.d.ts +21 -0
- package/dist/shared/config-errors.d.ts +7 -0
- package/dist/shared/config-path.d.ts +17 -0
- package/dist/shared/data-path.d.ts +14 -0
- package/dist/shared/deep-merge.d.ts +13 -0
- package/dist/shared/deep-merge.test.d.ts +1 -0
- package/dist/shared/dynamic-truncator.d.ts +27 -0
- package/dist/shared/external-plugin-detector.d.ts +18 -0
- package/dist/shared/external-plugin-detector.test.d.ts +1 -0
- package/dist/shared/file-reference-resolver.d.ts +1 -0
- package/dist/shared/file-utils.d.ts +7 -0
- package/dist/shared/first-message-variant.d.ts +11 -0
- package/dist/shared/first-message-variant.test.d.ts +1 -0
- package/dist/shared/frontmatter.d.ts +7 -0
- package/dist/shared/frontmatter.test.d.ts +1 -0
- package/dist/shared/hook-disabled.d.ts +2 -0
- package/dist/shared/index.d.ts +29 -0
- package/dist/shared/jsonc-parser.d.ts +15 -0
- package/dist/shared/jsonc-parser.test.d.ts +1 -0
- package/dist/shared/logger.d.ts +2 -0
- package/dist/shared/migration.d.ts +31 -0
- package/dist/shared/migration.test.d.ts +1 -0
- package/dist/shared/model-resolver.d.ts +19 -0
- package/dist/shared/model-resolver.test.d.ts +1 -0
- package/dist/shared/model-sanitizer.d.ts +3 -0
- package/dist/shared/musacode-config-dir.d.ts +19 -0
- package/dist/shared/musacode-config-dir.test.d.ts +1 -0
- package/dist/shared/musacode-version.d.ts +13 -0
- package/dist/shared/musacode-version.test.d.ts +1 -0
- package/dist/shared/pattern-matcher.d.ts +3 -0
- package/dist/shared/permission-compat.d.ts +27 -0
- package/dist/shared/permission-compat.test.d.ts +1 -0
- package/dist/shared/session-cursor.d.ts +13 -0
- package/dist/shared/session-cursor.test.d.ts +1 -0
- package/dist/shared/shell-env.d.ts +41 -0
- package/dist/shared/shell-env.test.d.ts +1 -0
- package/dist/shared/snake-case.d.ts +4 -0
- package/dist/shared/system-directive.d.ts +31 -0
- package/dist/shared/tool-name.d.ts +1 -0
- package/dist/shared/zip-extractor.d.ts +1 -0
- package/dist/tools/ast-grep/cli.d.ts +15 -0
- package/dist/tools/ast-grep/constants.d.ts +29 -0
- package/dist/tools/ast-grep/downloader.d.ts +5 -0
- package/dist/tools/ast-grep/index.d.ts +8 -0
- package/dist/tools/ast-grep/tools.d.ts +3 -0
- package/dist/tools/ast-grep/types.d.ts +58 -0
- package/dist/tools/ast-grep/utils.d.ts +5 -0
- package/dist/tools/background-task/constants.d.ts +3 -0
- package/dist/tools/background-task/index.d.ts +3 -0
- package/dist/tools/background-task/tools.d.ts +7 -0
- package/dist/tools/background-task/types.d.ts +14 -0
- package/dist/tools/call-omo-agent/constants.d.ts +2 -0
- package/dist/tools/call-omo-agent/index.d.ts +3 -0
- package/dist/tools/call-omo-agent/tools.d.ts +3 -0
- package/dist/tools/call-omo-agent/types.d.ts +24 -0
- package/dist/tools/delegate-task/constants.d.ts +12 -0
- package/dist/tools/delegate-task/index.d.ts +3 -0
- package/dist/tools/delegate-task/tools.d.ts +27 -0
- package/dist/tools/delegate-task/tools.test.d.ts +1 -0
- package/dist/tools/delegate-task/types.d.ts +9 -0
- package/dist/tools/glob/cli.d.ts +11 -0
- package/dist/tools/glob/cli.test.d.ts +1 -0
- package/dist/tools/glob/constants.d.ts +6 -0
- package/dist/tools/glob/index.d.ts +2 -0
- package/dist/tools/glob/tools.d.ts +2 -0
- package/dist/tools/glob/types.d.ts +20 -0
- package/dist/tools/glob/utils.d.ts +2 -0
- package/dist/tools/grep/cli.d.ts +3 -0
- package/dist/tools/grep/constants.d.ts +17 -0
- package/dist/tools/grep/downloader.d.ts +3 -0
- package/dist/tools/grep/downloader.test.d.ts +1 -0
- package/dist/tools/grep/index.d.ts +2 -0
- package/dist/tools/grep/tools.d.ts +2 -0
- package/dist/tools/grep/types.d.ts +36 -0
- package/dist/tools/grep/utils.d.ts +3 -0
- package/dist/tools/index.d.ts +16 -0
- package/dist/tools/interactive-bash/constants.d.ts +3 -0
- package/dist/tools/interactive-bash/index.d.ts +3 -0
- package/dist/tools/interactive-bash/tools.d.ts +7 -0
- package/dist/tools/interactive-bash/utils.d.ts +3 -0
- package/dist/tools/look-at/constants.d.ts +2 -0
- package/dist/tools/look-at/index.d.ts +3 -0
- package/dist/tools/look-at/tools.d.ts +9 -0
- package/dist/tools/look-at/tools.test.d.ts +1 -0
- package/dist/tools/look-at/types.d.ts +4 -0
- package/dist/tools/lsp/client.d.ts +57 -0
- package/dist/tools/lsp/config.d.ts +17 -0
- package/dist/tools/lsp/config.test.d.ts +1 -0
- package/dist/tools/lsp/constants.d.ts +9 -0
- package/dist/tools/lsp/index.d.ts +6 -0
- package/dist/tools/lsp/tools.d.ts +7 -0
- package/dist/tools/lsp/types.d.ts +123 -0
- package/dist/tools/lsp/utils.d.ts +26 -0
- package/dist/tools/session-manager/constants.d.ts +12 -0
- package/dist/tools/session-manager/index.d.ts +3 -0
- package/dist/tools/session-manager/storage.d.ts +12 -0
- package/dist/tools/session-manager/storage.test.d.ts +1 -0
- package/dist/tools/session-manager/tools.d.ts +5 -0
- package/dist/tools/session-manager/tools.test.d.ts +1 -0
- package/dist/tools/session-manager/types.d.ts +89 -0
- package/dist/tools/session-manager/utils.d.ts +11 -0
- package/dist/tools/session-manager/utils.test.d.ts +1 -0
- package/dist/tools/skill/constants.d.ts +3 -0
- package/dist/tools/skill/index.d.ts +3 -0
- package/dist/tools/skill/tools.d.ts +4 -0
- package/dist/tools/skill/tools.test.d.ts +1 -0
- package/dist/tools/skill/types.d.ts +28 -0
- package/dist/tools/skill-mcp/constants.d.ts +2 -0
- package/dist/tools/skill-mcp/index.d.ts +3 -0
- package/dist/tools/skill-mcp/tools.d.ts +11 -0
- package/dist/tools/skill-mcp/tools.test.d.ts +1 -0
- package/dist/tools/skill-mcp/types.d.ts +8 -0
- package/dist/tools/slashcommand/index.d.ts +2 -0
- package/dist/tools/slashcommand/tools.d.ts +5 -0
- package/dist/tools/slashcommand/types.d.ts +24 -0
- package/package.json +89 -0
- package/postinstall.mjs +47 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { McpNameSchema, type McpName } from "./types";
|
|
2
|
+
type RemoteMcpConfig = {
|
|
3
|
+
type: "remote";
|
|
4
|
+
url: string;
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
headers?: Record<string, string>;
|
|
7
|
+
oauth?: false;
|
|
8
|
+
};
|
|
9
|
+
export declare function createBuiltinMcps(disabledMcps?: string[]): Record<string, RemoteMcpConfig>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const McpNameSchema: z.ZodEnum<{
|
|
3
|
+
websearch: "websearch";
|
|
4
|
+
context7: "context7";
|
|
5
|
+
grep_app: "grep_app";
|
|
6
|
+
}>;
|
|
7
|
+
export type McpName = z.infer<typeof McpNameSchema>;
|
|
8
|
+
export declare const AnyMcpNameSchema: z.ZodString;
|
|
9
|
+
export type AnyMcpName = z.infer<typeof AnyMcpNameSchema>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type OhMyMusaCodeConfig } from "./config";
|
|
2
|
+
export declare function loadConfigFromPath(configPath: string, ctx: unknown): OhMyMusaCodeConfig | null;
|
|
3
|
+
export declare function mergeConfigs(base: OhMyMusaCodeConfig, override: OhMyMusaCodeConfig): OhMyMusaCodeConfig;
|
|
4
|
+
export declare function loadPluginConfig(directory: string, ctx: unknown): OhMyMusaCodeConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { OhMyMusaCodeConfig } from "../config";
|
|
2
|
+
import type { ModelCacheState } from "../plugin-state";
|
|
3
|
+
import type { CategoryConfig } from "../config/schema";
|
|
4
|
+
export interface ConfigHandlerDeps {
|
|
5
|
+
ctx: {
|
|
6
|
+
directory: string;
|
|
7
|
+
};
|
|
8
|
+
pluginConfig: OhMyMusaCodeConfig;
|
|
9
|
+
modelCacheState: ModelCacheState;
|
|
10
|
+
}
|
|
11
|
+
export declare function resolveCategoryConfig(categoryName: string, userCategories?: Record<string, CategoryConfig>): CategoryConfig | undefined;
|
|
12
|
+
export declare function createConfigHandler(deps: ConfigHandlerDeps): (config: Record<string, unknown>) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createConfigHandler, type ConfigHandlerDeps } from "./config-handler";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface ModelCacheState {
|
|
2
|
+
modelContextLimitsCache: Map<string, number>;
|
|
3
|
+
anthropicContext1MEnabled: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function createModelCacheState(): ModelCacheState;
|
|
6
|
+
export declare function getModelLimit(state: ModelCacheState, providerID: string, modelID: string): number | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent tool restrictions for session.prompt calls.
|
|
3
|
+
* MusaCode SDK's session.prompt `tools` parameter expects boolean values.
|
|
4
|
+
* true = tool allowed, false = tool denied.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getAgentToolRestrictions(agentName: string): Record<string, boolean>;
|
|
7
|
+
export declare function hasAgentToolRestrictions(agentName: string): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { OhMyMusaCodeConfig } from "../config";
|
|
2
|
+
export declare function resolveAgentVariant(config: OhMyMusaCodeConfig, agentName?: string): string | undefined;
|
|
3
|
+
export declare function applyAgentVariant(config: OhMyMusaCodeConfig, agentName: string | undefined, message: {
|
|
4
|
+
variant?: string;
|
|
5
|
+
}): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getClaudeConfigDir(): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface CommandResult {
|
|
2
|
+
exitCode: number;
|
|
3
|
+
stdout?: string;
|
|
4
|
+
stderr?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ExecuteHookOptions {
|
|
7
|
+
forceZsh?: boolean;
|
|
8
|
+
zshPath?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Execute a hook command with stdin input
|
|
12
|
+
*/
|
|
13
|
+
export declare function executeHookCommand(command: string, stdin: string, cwd: string, options?: ExecuteHookOptions): Promise<CommandResult>;
|
|
14
|
+
/**
|
|
15
|
+
* Execute a simple command and return output
|
|
16
|
+
*/
|
|
17
|
+
export declare function executeCommand(command: string): Promise<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Resolve embedded commands in text recursively
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveCommandsInText(text: string, depth?: number, maxDepth?: number): Promise<string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type ConfigLoadError = {
|
|
2
|
+
path: string;
|
|
3
|
+
error: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function getConfigLoadErrors(): ConfigLoadError[];
|
|
6
|
+
export declare function clearConfigLoadErrors(): void;
|
|
7
|
+
export declare function addConfigLoadError(error: ConfigLoadError): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the user-level config directory based on the OS.
|
|
3
|
+
* - Linux/macOS: XDG_CONFIG_HOME or ~/.config
|
|
4
|
+
* - Windows: Checks ~/.config first (cross-platform), then %APPDATA% (fallback)
|
|
5
|
+
*
|
|
6
|
+
* On Windows, prioritizes ~/.config for cross-platform consistency.
|
|
7
|
+
* Falls back to %APPDATA% for backward compatibility with existing installations.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getUserConfigDir(): string;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the full path to the user-level oh-my-musacode config file.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getUserConfigPath(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the full path to the project-level oh-my-musacode config file.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getProjectConfigPath(directory: string): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the user-level data directory.
|
|
3
|
+
* Matches MusaCode's behavior via xdg-basedir:
|
|
4
|
+
* - All platforms: XDG_DATA_HOME or ~/.local/share
|
|
5
|
+
*
|
|
6
|
+
* Note: MusaCode uses xdg-basedir which returns ~/.local/share on ALL platforms
|
|
7
|
+
* including Windows, so we match that behavior exactly.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getDataDir(): string;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the MusaCode storage directory path.
|
|
12
|
+
* All platforms: ~/.local/share.musacode/storage
|
|
13
|
+
*/
|
|
14
|
+
export declare function getMusaCodeStorageDir(): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
|
|
2
|
+
/**
|
|
3
|
+
* Deep merges two objects, with override values taking precedence.
|
|
4
|
+
* - Objects are recursively merged
|
|
5
|
+
* - Arrays are replaced (not concatenated)
|
|
6
|
+
* - undefined values in override do not overwrite base values
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* deepMerge({ a: 1, b: { c: 2, d: 3 } }, { b: { c: 10 }, e: 5 })
|
|
10
|
+
* // => { a: 1, b: { c: 10, d: 3 }, e: 5 }
|
|
11
|
+
*/
|
|
12
|
+
export declare function deepMerge<T extends Record<string, unknown>>(base: T, override: Partial<T>, depth?: number): T;
|
|
13
|
+
export declare function deepMerge<T extends Record<string, unknown>>(base: T | undefined, override: T | undefined, depth?: number): T | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
export interface TruncationResult {
|
|
3
|
+
result: string;
|
|
4
|
+
truncated: boolean;
|
|
5
|
+
removedCount?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface TruncationOptions {
|
|
8
|
+
targetMaxTokens?: number;
|
|
9
|
+
preserveHeaderLines?: number;
|
|
10
|
+
contextWindowLimit?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function truncateToTokenLimit(output: string, maxTokens: number, preserveHeaderLines?: number): TruncationResult;
|
|
13
|
+
export declare function getContextWindowUsage(ctx: PluginInput, sessionID: string): Promise<{
|
|
14
|
+
usedTokens: number;
|
|
15
|
+
remainingTokens: number;
|
|
16
|
+
usagePercentage: number;
|
|
17
|
+
} | null>;
|
|
18
|
+
export declare function dynamicTruncate(ctx: PluginInput, sessionID: string, output: string, options?: TruncationOptions): Promise<TruncationResult>;
|
|
19
|
+
export declare function createDynamicTruncator(ctx: PluginInput): {
|
|
20
|
+
truncate: (sessionID: string, output: string, options?: TruncationOptions) => Promise<TruncationResult>;
|
|
21
|
+
getUsage: (sessionID: string) => Promise<{
|
|
22
|
+
usedTokens: number;
|
|
23
|
+
remainingTokens: number;
|
|
24
|
+
usagePercentage: number;
|
|
25
|
+
} | null>;
|
|
26
|
+
truncateSync: (output: string, maxTokens: number, preserveHeaderLines?: number) => TruncationResult;
|
|
27
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detects external plugins that may conflict with oh-my-musacode features.
|
|
3
|
+
* Used to prevent crashes from concurrent notification plugins.
|
|
4
|
+
*/
|
|
5
|
+
export interface ExternalNotifierResult {
|
|
6
|
+
detected: boolean;
|
|
7
|
+
pluginName: string | null;
|
|
8
|
+
allPlugins: string[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Detect if any external notification plugin is configured.
|
|
12
|
+
* Returns information about detected plugins for logging/warning.
|
|
13
|
+
*/
|
|
14
|
+
export declare function detectExternalNotificationPlugin(directory: string): ExternalNotifierResult;
|
|
15
|
+
/**
|
|
16
|
+
* Generate a warning message for users with conflicting notification plugins.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getNotificationConflictWarning(pluginName: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveFileReferencesInText(text: string, cwd?: string, depth?: number, maxDepth?: number): Promise<string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function isMarkdownFile(entry: {
|
|
2
|
+
name: string;
|
|
3
|
+
isFile: () => boolean;
|
|
4
|
+
}): boolean;
|
|
5
|
+
export declare function isSymbolicLink(filePath: string): boolean;
|
|
6
|
+
export declare function resolveSymlink(filePath: string): string;
|
|
7
|
+
export declare function resolveSymlinkAsync(filePath: string): Promise<string>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type SessionInfo = {
|
|
2
|
+
id?: string;
|
|
3
|
+
parentID?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function createFirstMessageVariantGate(): {
|
|
6
|
+
markSessionCreated(info?: SessionInfo): void;
|
|
7
|
+
shouldOverride(sessionID?: string): boolean;
|
|
8
|
+
markApplied(sessionID?: string): void;
|
|
9
|
+
clear(sessionID?: string): void;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from "./frontmatter";
|
|
2
|
+
export * from "./command-executor";
|
|
3
|
+
export * from "./file-reference-resolver";
|
|
4
|
+
export * from "./model-sanitizer";
|
|
5
|
+
export * from "./logger";
|
|
6
|
+
export * from "./snake-case";
|
|
7
|
+
export * from "./tool-name";
|
|
8
|
+
export * from "./pattern-matcher";
|
|
9
|
+
export * from "./hook-disabled";
|
|
10
|
+
export * from "./deep-merge";
|
|
11
|
+
export * from "./file-utils";
|
|
12
|
+
export * from "./dynamic-truncator";
|
|
13
|
+
export * from "./config-path";
|
|
14
|
+
export * from "./data-path";
|
|
15
|
+
export * from "./config-errors";
|
|
16
|
+
export * from "./claude-config-dir";
|
|
17
|
+
export * from "./jsonc-parser";
|
|
18
|
+
export * from "./migration";
|
|
19
|
+
export * from "./musacode-config-dir";
|
|
20
|
+
export * from "./musacode-version";
|
|
21
|
+
export * from "./permission-compat";
|
|
22
|
+
export * from "./external-plugin-detector";
|
|
23
|
+
export * from "./zip-extractor";
|
|
24
|
+
export * from "./agent-variant";
|
|
25
|
+
export * from "./session-cursor";
|
|
26
|
+
export * from "./shell-env";
|
|
27
|
+
export * from "./system-directive";
|
|
28
|
+
export * from "./agent-tool-restrictions";
|
|
29
|
+
export * from "./model-resolver";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface JsoncParseResult<T> {
|
|
2
|
+
data: T | null;
|
|
3
|
+
errors: Array<{
|
|
4
|
+
message: string;
|
|
5
|
+
offset: number;
|
|
6
|
+
length: number;
|
|
7
|
+
}>;
|
|
8
|
+
}
|
|
9
|
+
export declare function parseJsonc<T = unknown>(content: string): T;
|
|
10
|
+
export declare function parseJsoncSafe<T = unknown>(content: string): JsoncParseResult<T>;
|
|
11
|
+
export declare function readJsoncFile<T = unknown>(filePath: string): T | null;
|
|
12
|
+
export declare function detectConfigFile(basePath: string): {
|
|
13
|
+
format: "json" | "jsonc" | "none";
|
|
14
|
+
path: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const AGENT_NAME_MAP: Record<string, string>;
|
|
2
|
+
export declare const BUILTIN_AGENT_NAMES: Set<string>;
|
|
3
|
+
export declare const HOOK_NAME_MAP: Record<string, string>;
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated LEGACY MIGRATION ONLY
|
|
6
|
+
*
|
|
7
|
+
* This map exists solely for migrating old configs that used hardcoded model strings.
|
|
8
|
+
* It maps legacy model strings to semantic category names, allowing users to migrate
|
|
9
|
+
* from explicit model configs to category-based configs.
|
|
10
|
+
*
|
|
11
|
+
* DO NOT add new entries here. New agents should use:
|
|
12
|
+
* - Category-based config (preferred): { category: "unspecified-high" }
|
|
13
|
+
* - Or inherit from MusaCode's config.model
|
|
14
|
+
*
|
|
15
|
+
* This map will be removed in a future major version once migration period ends.
|
|
16
|
+
*/
|
|
17
|
+
export declare const MODEL_TO_CATEGORY_MAP: Record<string, string>;
|
|
18
|
+
export declare function migrateAgentNames(agents: Record<string, unknown>): {
|
|
19
|
+
migrated: Record<string, unknown>;
|
|
20
|
+
changed: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare function migrateHookNames(hooks: string[]): {
|
|
23
|
+
migrated: string[];
|
|
24
|
+
changed: boolean;
|
|
25
|
+
};
|
|
26
|
+
export declare function migrateAgentConfigToCategory(config: Record<string, unknown>): {
|
|
27
|
+
migrated: Record<string, unknown>;
|
|
28
|
+
changed: boolean;
|
|
29
|
+
};
|
|
30
|
+
export declare function shouldDeleteAgentConfig(config: Record<string, unknown>, category: string): boolean;
|
|
31
|
+
export declare function migrateConfigFile(configPath: string, rawConfig: Record<string, unknown>): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input for model resolution.
|
|
3
|
+
* All model strings are optional except systemDefault which is the terminal fallback.
|
|
4
|
+
*/
|
|
5
|
+
export type ModelResolutionInput = {
|
|
6
|
+
/** Model from user category config */
|
|
7
|
+
userModel?: string;
|
|
8
|
+
/** Model inherited from parent task/session */
|
|
9
|
+
inheritedModel?: string;
|
|
10
|
+
/** System default model from MusaCode config - always required */
|
|
11
|
+
systemDefault: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Resolves the effective model using priority chain:
|
|
15
|
+
* userModel → inheritedModel → systemDefault
|
|
16
|
+
*
|
|
17
|
+
* Empty strings and whitespace-only strings are treated as unset.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveModel(input: ModelResolutionInput): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type MusaCodeBinaryType = "musacode" | "musacode-desktop";
|
|
2
|
+
export interface MusaCodeConfigDirOptions {
|
|
3
|
+
binary: MusaCodeBinaryType;
|
|
4
|
+
version?: string | null;
|
|
5
|
+
checkExisting?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface MusaCodeConfigPaths {
|
|
8
|
+
configDir: string;
|
|
9
|
+
configJson: string;
|
|
10
|
+
configJsonc: string;
|
|
11
|
+
packageJson: string;
|
|
12
|
+
omoConfig: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const TAURI_APP_IDENTIFIER = "ai.musacode.desktop";
|
|
15
|
+
export declare const TAURI_APP_IDENTIFIER_DEV = "ai.musacode.desktop.dev";
|
|
16
|
+
export declare function isDevBuild(version: string | null | undefined): boolean;
|
|
17
|
+
export declare function getMusaCodeConfigDir(options: MusaCodeConfigDirOptions): string;
|
|
18
|
+
export declare function getMusaCodeConfigPaths(options: MusaCodeConfigDirOptions): MusaCodeConfigPaths;
|
|
19
|
+
export declare function detectExistingConfigDir(binary: MusaCodeBinaryType, version?: string | null): string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimum MusaCode version required for this plugin.
|
|
3
|
+
* This plugin only supports MusaCode 1.1.1+ which uses the permission system.
|
|
4
|
+
*/
|
|
5
|
+
export declare const MINIMUM_MUSACODE_VERSION = "1.1.1";
|
|
6
|
+
export declare function parseVersion(version: string): number[];
|
|
7
|
+
export declare function compareVersions(a: string, b: string): -1 | 0 | 1;
|
|
8
|
+
export declare function isVersionGte(a: string, b: string): boolean;
|
|
9
|
+
export declare function isVersionLt(a: string, b: string): boolean;
|
|
10
|
+
export declare function getMusaCodeVersion(): string | null;
|
|
11
|
+
export declare function isMusaCodeVersionAtLeast(version: string): boolean;
|
|
12
|
+
export declare function resetVersionCache(): void;
|
|
13
|
+
export declare function setVersionCache(version: string | null): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ClaudeHooksConfig, HookMatcher } from "../hooks/claude-code-hooks/types";
|
|
2
|
+
export declare function matchesToolMatcher(toolName: string, matcher: string): boolean;
|
|
3
|
+
export declare function findMatchingHooks(config: ClaudeHooksConfig, eventName: keyof ClaudeHooksConfig, toolName?: string): HookMatcher[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Permission system utilities for MusaCode 1.1.1+.
|
|
3
|
+
* This module only supports the new permission format.
|
|
4
|
+
*/
|
|
5
|
+
export type PermissionValue = "ask" | "allow" | "deny";
|
|
6
|
+
export interface PermissionFormat {
|
|
7
|
+
permission: Record<string, PermissionValue>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Creates tool restrictions that deny specified tools.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createAgentToolRestrictions(denyTools: string[]): PermissionFormat;
|
|
13
|
+
/**
|
|
14
|
+
* Creates tool restrictions that ONLY allow specified tools.
|
|
15
|
+
* All other tools are denied by default using `*: deny` pattern.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createAgentToolAllowlist(allowTools: string[]): PermissionFormat;
|
|
18
|
+
/**
|
|
19
|
+
* Converts legacy tools format to permission format.
|
|
20
|
+
* For migrating user configs from older versions.
|
|
21
|
+
*/
|
|
22
|
+
export declare function migrateToolsToPermission(tools: Record<string, boolean>): Record<string, PermissionValue>;
|
|
23
|
+
/**
|
|
24
|
+
* Migrates agent config from legacy tools format to permission format.
|
|
25
|
+
* If config has `tools`, converts to `permission`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function migrateAgentConfig(config: Record<string, unknown>): Record<string, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type MessageTime = {
|
|
2
|
+
created?: number | string;
|
|
3
|
+
} | number | string | undefined;
|
|
4
|
+
type MessageInfo = {
|
|
5
|
+
id?: string;
|
|
6
|
+
time?: MessageTime;
|
|
7
|
+
};
|
|
8
|
+
export type CursorMessage = {
|
|
9
|
+
info?: MessageInfo;
|
|
10
|
+
};
|
|
11
|
+
export declare function consumeNewMessages<T extends CursorMessage>(sessionID: string | undefined, messages: T[]): T[];
|
|
12
|
+
export declare function resetMessageCursor(sessionID?: string): void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type ShellType = "unix" | "powershell" | "cmd";
|
|
2
|
+
/**
|
|
3
|
+
* Detect the current shell type based on environment variables.
|
|
4
|
+
*
|
|
5
|
+
* Detection priority:
|
|
6
|
+
* 1. PSModulePath → PowerShell
|
|
7
|
+
* 2. SHELL env var → Unix shell
|
|
8
|
+
* 3. Platform fallback → win32: cmd, others: unix
|
|
9
|
+
*/
|
|
10
|
+
export declare function detectShellType(): ShellType;
|
|
11
|
+
/**
|
|
12
|
+
* Shell-escape a value for use in environment variable assignment.
|
|
13
|
+
*
|
|
14
|
+
* @param value - The value to escape
|
|
15
|
+
* @param shellType - The target shell type
|
|
16
|
+
* @returns Escaped value appropriate for the shell
|
|
17
|
+
*/
|
|
18
|
+
export declare function shellEscape(value: string, shellType: ShellType): string;
|
|
19
|
+
/**
|
|
20
|
+
* Build environment variable prefix command for the target shell.
|
|
21
|
+
*
|
|
22
|
+
* @param env - Record of environment variables to set
|
|
23
|
+
* @param shellType - The target shell type
|
|
24
|
+
* @returns Command prefix string to prepend to the actual command
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* // Unix: "export VAR1=val1 VAR2=val2; command"
|
|
29
|
+
* buildEnvPrefix({ VAR1: "val1", VAR2: "val2" }, "unix")
|
|
30
|
+
* // => "export VAR1=val1 VAR2=val2;"
|
|
31
|
+
*
|
|
32
|
+
* // PowerShell: "$env:VAR1='val1'; $env:VAR2='val2'; command"
|
|
33
|
+
* buildEnvPrefix({ VAR1: "val1", VAR2: "val2" }, "powershell")
|
|
34
|
+
* // => "$env:VAR1='val1'; $env:VAR2='val2';"
|
|
35
|
+
*
|
|
36
|
+
* // cmd.exe: "set VAR1=val1 && set VAR2=val2 && command"
|
|
37
|
+
* buildEnvPrefix({ VAR1: "val1", VAR2: "val2" }, "cmd")
|
|
38
|
+
* // => "set VAR1=\"val1\" && set VAR2=\"val2\" &&"
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildEnvPrefix(env: Record<string, string>, shellType: ShellType): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function camelToSnake(str: string): string;
|
|
2
|
+
export declare function snakeToCamel(str: string): string;
|
|
3
|
+
export declare function objectToSnakeCase(obj: Record<string, unknown>, deep?: boolean): Record<string, unknown>;
|
|
4
|
+
export declare function objectToCamelCase(obj: Record<string, unknown>, deep?: boolean): Record<string, unknown>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified system directive prefix for oh-my-musacode internal messages.
|
|
3
|
+
* All system-generated messages should use this prefix for consistent filtering.
|
|
4
|
+
*
|
|
5
|
+
* Format: [SYSTEM DIRECTIVE: OH-MY-MUSACODE - {TYPE}]
|
|
6
|
+
*/
|
|
7
|
+
export declare const SYSTEM_DIRECTIVE_PREFIX = "[SYSTEM DIRECTIVE: OH-MY-MUSACODE";
|
|
8
|
+
/**
|
|
9
|
+
* Creates a system directive header with the given type.
|
|
10
|
+
* @param type - The directive type (e.g., "TODO CONTINUATION", "RALPH LOOP")
|
|
11
|
+
* @returns Formatted directive string like "[SYSTEM DIRECTIVE: OH-MY-MUSACODE - TODO CONTINUATION]"
|
|
12
|
+
*/
|
|
13
|
+
export declare function createSystemDirective(type: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Checks if a message starts with the oh-my-musacode system directive prefix.
|
|
16
|
+
* Used by keyword-detector and other hooks to skip system-generated messages.
|
|
17
|
+
* @param text - The message text to check
|
|
18
|
+
* @returns true if the message is a system directive
|
|
19
|
+
*/
|
|
20
|
+
export declare function isSystemDirective(text: string): boolean;
|
|
21
|
+
export declare const SystemDirectiveTypes: {
|
|
22
|
+
readonly TODO_CONTINUATION: "TODO CONTINUATION";
|
|
23
|
+
readonly RALPH_LOOP: "RALPH LOOP";
|
|
24
|
+
readonly BOULDER_CONTINUATION: "BOULDER CONTINUATION";
|
|
25
|
+
readonly DELEGATION_REQUIRED: "DELEGATION REQUIRED";
|
|
26
|
+
readonly SINGLE_TASK_ONLY: "SINGLE TASK ONLY";
|
|
27
|
+
readonly COMPACTION_CONTEXT: "COMPACTION CONTEXT";
|
|
28
|
+
readonly CONTEXT_WINDOW_MONITOR: "CONTEXT WINDOW MONITOR";
|
|
29
|
+
readonly PROMETHEUS_READ_ONLY: "PROMETHEUS READ-ONLY";
|
|
30
|
+
};
|
|
31
|
+
export type SystemDirectiveType = (typeof SystemDirectiveTypes)[keyof typeof SystemDirectiveTypes];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function transformToolName(toolName: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function extractZip(archivePath: string, destDir: string): Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CliLanguage, SgResult } from "./types";
|
|
2
|
+
export interface RunOptions {
|
|
3
|
+
pattern: string;
|
|
4
|
+
lang: CliLanguage;
|
|
5
|
+
paths?: string[];
|
|
6
|
+
globs?: string[];
|
|
7
|
+
rewrite?: string;
|
|
8
|
+
context?: number;
|
|
9
|
+
updateAll?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function getAstGrepPath(): Promise<string | null>;
|
|
12
|
+
export declare function startBackgroundInit(): void;
|
|
13
|
+
export declare function runSg(options: RunOptions): Promise<SgResult>;
|
|
14
|
+
export declare function isCliAvailable(): boolean;
|
|
15
|
+
export declare function ensureCliAvailable(): Promise<boolean>;
|