oh-my-parallel-agent-opencode 0.1.0 → 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/LICENSE.md +82 -0
- package/README.ja.md +392 -0
- package/README.ko.md +397 -0
- package/README.md +375 -56
- package/README.zh-cn.md +402 -0
- package/bin/oh-my-parallel-agent-opencode.js +80 -0
- package/bin/platform.js +38 -0
- package/bin/platform.test.ts +148 -0
- package/dist/agents/atlas.d.ts +22 -0
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +30 -0
- package/dist/agents/explore.d.ts +7 -0
- package/dist/agents/hephaestus.d.ts +6 -0
- package/dist/agents/index.d.ts +12 -0
- package/dist/agents/librarian.d.ts +7 -0
- package/dist/agents/metis.d.ts +21 -0
- package/dist/agents/momus.d.ts +21 -0
- package/dist/agents/momus.test.d.ts +1 -0
- package/dist/agents/multimodal-looker.d.ts +7 -0
- package/dist/agents/oracle.d.ts +7 -0
- package/dist/agents/prometheus/behavioral-summary.d.ts +6 -0
- package/dist/agents/prometheus/high-accuracy-mode.d.ts +6 -0
- package/dist/agents/prometheus/identity-constraints.d.ts +7 -0
- package/dist/agents/prometheus/index.d.ts +39 -0
- package/dist/agents/prometheus/interview-mode.d.ts +7 -0
- package/dist/agents/prometheus/plan-generation.d.ts +7 -0
- package/dist/agents/prometheus/plan-template.d.ts +7 -0
- package/dist/agents/prometheus-prompt.test.d.ts +1 -0
- package/dist/agents/sisyphus-junior.d.ts +10 -0
- package/dist/agents/sisyphus-junior.test.d.ts +1 -0
- package/dist/agents/sisyphus.d.ts +8 -0
- package/dist/agents/types.d.ts +63 -0
- package/dist/agents/utils.d.ts +16 -0
- package/dist/agents/utils.test.d.ts +1 -0
- package/dist/cli/config-manager.d.ts +162 -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 +13 -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-oauth.d.ts +15 -0
- package/dist/cli/doctor/checks/mcp-oauth.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/model-resolution.d.ts +33 -0
- package/dist/cli/doctor/checks/model-resolution.test.d.ts +1 -0
- package/dist/cli/doctor/checks/opencode.d.ts +19 -0
- package/dist/cli/doctor/checks/opencode.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 +42 -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 +26903 -0
- package/dist/cli/index.test.d.ts +1 -0
- package/dist/cli/install.d.ts +2 -0
- package/dist/cli/install.test.d.ts +1 -0
- package/dist/cli/mcp-oauth/index.d.ts +6 -0
- package/dist/cli/mcp-oauth/index.test.d.ts +1 -0
- package/dist/cli/mcp-oauth/login.d.ts +6 -0
- package/dist/cli/mcp-oauth/login.test.d.ts +1 -0
- package/dist/cli/mcp-oauth/logout.d.ts +4 -0
- package/dist/cli/mcp-oauth/logout.test.d.ts +1 -0
- package/dist/cli/mcp-oauth/status.d.ts +1 -0
- package/dist/cli/mcp-oauth/status.test.d.ts +1 -0
- package/dist/cli/model-fallback.d.ts +18 -0
- package/dist/cli/model-fallback.test.d.ts +1 -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 +14 -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 +73 -0
- package/dist/cli/types.d.ts +39 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/schema.d.ts +2651 -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/constants.d.ts +44 -0
- package/dist/features/background-agent/index.d.ts +4 -0
- package/dist/features/background-agent/manager.d.ts +118 -0
- package/dist/features/background-agent/manager.test.d.ts +1 -0
- package/dist/features/background-agent/result-handler.d.ts +15 -0
- package/dist/features/background-agent/spawner.d.ts +14 -0
- package/dist/features/background-agent/state.d.ts +35 -0
- package/dist/features/background-agent/types.d.ts +79 -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/templates/stop-continuation.d.ts +1 -0
- package/dist/features/builtin-commands/templates/stop-continuation.test.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/dev-browser.d.ts +2 -0
- package/dist/features/builtin-skills/skills/frontend-ui-ux.d.ts +2 -0
- package/dist/features/builtin-skills/skills/git-master.d.ts +2 -0
- package/dist/features/builtin-skills/skills/index.d.ts +4 -0
- package/dist/features/builtin-skills/skills/playwright.d.ts +3 -0
- package/dist/features/builtin-skills/skills.d.ts +6 -0
- package/dist/features/builtin-skills/skills.test.d.ts +1 -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 +39 -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 +19 -0
- package/dist/features/hook-message-injector/types.d.ts +46 -0
- package/dist/features/mcp-oauth/callback-server.d.ts +11 -0
- package/dist/features/mcp-oauth/callback-server.test.d.ts +1 -0
- package/dist/features/mcp-oauth/dcr.d.ts +34 -0
- package/dist/features/mcp-oauth/dcr.test.d.ts +1 -0
- package/dist/features/mcp-oauth/discovery.d.ts +8 -0
- package/dist/features/mcp-oauth/discovery.test.d.ts +1 -0
- package/dist/features/mcp-oauth/index.d.ts +1 -0
- package/dist/features/mcp-oauth/provider.d.ts +41 -0
- package/dist/features/mcp-oauth/provider.test.d.ts +1 -0
- package/dist/features/mcp-oauth/resource-indicator.d.ts +2 -0
- package/dist/features/mcp-oauth/resource-indicator.test.d.ts +1 -0
- package/dist/features/mcp-oauth/schema.d.ts +6 -0
- package/dist/features/mcp-oauth/schema.test.d.ts +1 -0
- package/dist/features/mcp-oauth/step-up.d.ts +8 -0
- package/dist/features/mcp-oauth/step-up.test.d.ts +1 -0
- package/dist/features/mcp-oauth/storage.d.ts +17 -0
- package/dist/features/mcp-oauth/storage.test.d.ts +1 -0
- package/dist/features/opencode-skill-loader/async-loader.d.ts +6 -0
- package/dist/features/opencode-skill-loader/async-loader.test.d.ts +1 -0
- package/dist/features/opencode-skill-loader/blocking.d.ts +2 -0
- package/dist/features/opencode-skill-loader/blocking.test.d.ts +1 -0
- package/dist/features/opencode-skill-loader/discover-worker.d.ts +1 -0
- package/dist/features/opencode-skill-loader/index.d.ts +4 -0
- package/dist/features/opencode-skill-loader/loader.d.ts +16 -0
- package/dist/features/opencode-skill-loader/loader.test.d.ts +1 -0
- package/dist/features/opencode-skill-loader/merger.d.ts +7 -0
- package/dist/features/opencode-skill-loader/skill-content.d.ts +21 -0
- package/dist/features/opencode-skill-loader/skill-content.test.d.ts +1 -0
- package/dist/features/opencode-skill-loader/types.d.ts +34 -0
- package/dist/features/sisyphus-swarm/mailbox/types.d.ts +191 -0
- package/dist/features/sisyphus-swarm/mailbox/types.test.d.ts +1 -0
- package/dist/features/sisyphus-tasks/storage.d.ts +9 -0
- package/dist/features/sisyphus-tasks/storage.test.d.ts +1 -0
- package/dist/features/sisyphus-tasks/types.d.ts +47 -0
- package/dist/features/sisyphus-tasks/types.test.d.ts +1 -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 +50 -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 +58 -0
- package/dist/features/task-toast-manager/manager.test.d.ts +1 -0
- package/dist/features/task-toast-manager/types.d.ts +24 -0
- package/dist/features/tmux-subagent/action-executor.d.ts +22 -0
- package/dist/features/tmux-subagent/decision-engine.d.ts +38 -0
- package/dist/features/tmux-subagent/decision-engine.test.d.ts +1 -0
- package/dist/features/tmux-subagent/index.d.ts +5 -0
- package/dist/features/tmux-subagent/manager.d.ts +59 -0
- package/dist/features/tmux-subagent/manager.test.d.ts +1 -0
- package/dist/features/tmux-subagent/pane-state-querier.d.ts +2 -0
- package/dist/features/tmux-subagent/types.d.ts +53 -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 +10 -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-notification/index.d.ts +18 -0
- package/dist/hooks/background-notification/types.d.ts +4 -0
- package/dist/hooks/category-skill-reminder/index.d.ts +22 -0
- package/dist/hooks/category-skill-reminder/index.test.d.ts +1 -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 +34 -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/compaction-context-injector/index.test.d.ts +1 -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 +1 -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 +1 -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 +35 -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/analyze/default.d.ts +12 -0
- package/dist/hooks/keyword-detector/analyze/index.d.ts +1 -0
- package/dist/hooks/keyword-detector/constants.d.ts +10 -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/search/default.d.ts +12 -0
- package/dist/hooks/keyword-detector/search/index.d.ts +1 -0
- package/dist/hooks/keyword-detector/types.d.ts +4 -0
- package/dist/hooks/keyword-detector/ultrawork/default.d.ts +10 -0
- package/dist/hooks/keyword-detector/ultrawork/gpt5.2.d.ts +16 -0
- package/dist/hooks/keyword-detector/ultrawork/index.d.ts +17 -0
- package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +6 -0
- package/dist/hooks/keyword-detector/ultrawork/utils.d.ts +24 -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 +7 -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/question-label-truncator/index.d.ts +7 -0
- package/dist/hooks/question-label-truncator/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/output-path.d.ts +5 -0
- package/dist/hooks/rules-injector/output-path.test.d.ts +1 -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/sisyphus-junior-notepad/constants.d.ts +2 -0
- package/dist/hooks/sisyphus-junior-notepad/index.d.ts +12 -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/stop-continuation-guard/index.d.ts +16 -0
- package/dist/hooks/stop-continuation-guard/index.test.d.ts +1 -0
- package/dist/hooks/subagent-question-blocker/index.d.ts +2 -0
- package/dist/hooks/subagent-question-blocker/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 +69 -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 +19 -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/hooks/unstable-agent-babysitter/index.d.ts +50 -0
- package/dist/hooks/unstable-agent-babysitter/index.test.d.ts +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +76117 -0
- package/dist/index.test.d.ts +1 -0
- package/dist/mcp/context7.d.ts +9 -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/oh-my-parallel-agent-opencode.schema.json +2182 -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 +13 -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-config-integration.test.d.ts +1 -0
- package/dist/shared/agent-display-names.d.ts +12 -0
- package/dist/shared/agent-display-names.test.d.ts +1 -0
- package/dist/shared/agent-tool-restrictions.d.ts +7 -0
- package/dist/shared/agent-variant.d.ts +9 -0
- package/dist/shared/agent-variant.test.d.ts +1 -0
- package/dist/shared/binary-downloader.d.ts +10 -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/connected-providers-cache.d.ts +52 -0
- package/dist/shared/data-path.d.ts +30 -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 +36 -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 +32 -0
- package/dist/shared/migration.test.d.ts +1 -0
- package/dist/shared/model-availability.d.ts +19 -0
- package/dist/shared/model-availability.test.d.ts +1 -0
- package/dist/shared/model-requirements.d.ts +13 -0
- package/dist/shared/model-requirements.test.d.ts +1 -0
- package/dist/shared/model-resolution-pipeline.d.ts +24 -0
- package/dist/shared/model-resolver.d.ts +22 -0
- package/dist/shared/model-resolver.test.d.ts +1 -0
- package/dist/shared/model-sanitizer.d.ts +3 -0
- package/dist/shared/model-suggestion-retry.d.ts +24 -0
- package/dist/shared/model-suggestion-retry.test.d.ts +1 -0
- package/dist/shared/ollama-ndjson-parser.d.ts +108 -0
- package/dist/shared/opencode-config-dir.d.ts +19 -0
- package/dist/shared/opencode-config-dir.test.d.ts +1 -0
- package/dist/shared/opencode-version.d.ts +19 -0
- package/dist/shared/opencode-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/session-injected-paths.d.ts +10 -0
- package/dist/shared/session-utils.d.ts +2 -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 +5 -0
- package/dist/shared/system-directive.d.ts +45 -0
- package/dist/shared/system-directive.test.d.ts +1 -0
- package/dist/shared/tmux/constants.d.ts +5 -0
- package/dist/shared/tmux/index.d.ts +3 -0
- package/dist/shared/tmux/tmux-utils.d.ts +17 -0
- package/dist/shared/tmux/tmux-utils.test.d.ts +1 -0
- package/dist/shared/tmux/types.d.ts +4 -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 +4 -0
- package/dist/tools/background-task/tools.d.ts +47 -0
- package/dist/tools/background-task/tools.test.d.ts +1 -0
- package/dist/tools/background-task/types.d.ts +20 -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/categories.d.ts +17 -0
- package/dist/tools/delegate-task/constants.d.ts +30 -0
- package/dist/tools/delegate-task/executor.d.ts +75 -0
- package/dist/tools/delegate-task/helpers.d.ts +30 -0
- package/dist/tools/delegate-task/index.d.ts +4 -0
- package/dist/tools/delegate-task/prompt-builder.d.ts +6 -0
- package/dist/tools/delegate-task/timing.d.ts +11 -0
- package/dist/tools/delegate-task/tools.d.ts +6 -0
- package/dist/tools/delegate-task/tools.test.d.ts +1 -0
- package/dist/tools/delegate-task/types.d.ts +44 -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 +15 -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 +50 -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/tools.test.d.ts +1 -0
- package/dist/tools/slashcommand/types.d.ts +24 -0
- package/package.json +77 -6
- package/postinstall.mjs +43 -0
- package/__tests__/agents.test.ts +0 -107
- package/__tests__/config-handler.test.ts +0 -198
- package/__tests__/dynamic-agent.test.ts +0 -68
- package/__tests__/schema.test.ts +0 -149
- package/__tests__/setup.test.ts +0 -16
- package/bun.lock +0 -29
- package/oh-my-parallel-agent-opencode.example.json +0 -7
- package/src/agents/explore.ts +0 -117
- package/src/agents/index.ts +0 -69
- package/src/agents/librarian.ts +0 -302
- package/src/agents/metis.ts +0 -341
- package/src/agents/momus.ts +0 -237
- package/src/agents/types.ts +0 -95
- package/src/config/schema.ts +0 -15
- package/src/index.ts +0 -116
- package/src/plugin-handlers/config-handler.ts +0 -129
- package/src/utils/dynamic-agent.ts +0 -37
- package/tsconfig.json +0 -19
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ollama NDJSON Parser
|
|
3
|
+
*
|
|
4
|
+
* Parses newline-delimited JSON (NDJSON) responses from Ollama API.
|
|
5
|
+
*
|
|
6
|
+
* @module ollama-ndjson-parser
|
|
7
|
+
* @see https://github.com/code-yeongyu/oh-my-parallel-agent-opencode/issues/1124
|
|
8
|
+
* @see https://github.com/ollama/ollama/blob/main/docs/api.md
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Ollama message structure
|
|
12
|
+
*/
|
|
13
|
+
export interface OllamaMessage {
|
|
14
|
+
tool_calls?: Array<{
|
|
15
|
+
function: {
|
|
16
|
+
name: string;
|
|
17
|
+
arguments: Record<string, unknown>;
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
content?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Ollama NDJSON line structure
|
|
24
|
+
*/
|
|
25
|
+
export interface OllamaNDJSONLine {
|
|
26
|
+
message?: OllamaMessage;
|
|
27
|
+
done: boolean;
|
|
28
|
+
total_duration?: number;
|
|
29
|
+
load_duration?: number;
|
|
30
|
+
prompt_eval_count?: number;
|
|
31
|
+
prompt_eval_duration?: number;
|
|
32
|
+
eval_count?: number;
|
|
33
|
+
eval_duration?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Merged Ollama response
|
|
37
|
+
*/
|
|
38
|
+
export interface OllamaMergedResponse {
|
|
39
|
+
message: OllamaMessage;
|
|
40
|
+
done: boolean;
|
|
41
|
+
stats?: {
|
|
42
|
+
total_duration?: number;
|
|
43
|
+
load_duration?: number;
|
|
44
|
+
prompt_eval_count?: number;
|
|
45
|
+
prompt_eval_duration?: number;
|
|
46
|
+
eval_count?: number;
|
|
47
|
+
eval_duration?: number;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Parse Ollama streaming NDJSON response into a single merged object.
|
|
52
|
+
*
|
|
53
|
+
* Ollama returns streaming responses as newline-delimited JSON (NDJSON):
|
|
54
|
+
* ```
|
|
55
|
+
* {"message":{"tool_calls":[...]}, "done":false}
|
|
56
|
+
* {"message":{"content":""}, "done":true}
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* This function:
|
|
60
|
+
* 1. Splits the response by newlines
|
|
61
|
+
* 2. Parses each line as JSON
|
|
62
|
+
* 3. Merges tool_calls and content from all lines
|
|
63
|
+
* 4. Returns a single merged response
|
|
64
|
+
*
|
|
65
|
+
* @param response - Raw NDJSON response string from Ollama API
|
|
66
|
+
* @returns Merged response with all tool_calls and content combined
|
|
67
|
+
* @throws {Error} If no valid JSON lines are found
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* const ndjsonResponse = `
|
|
72
|
+
* {"message":{"tool_calls":[{"function":{"name":"read","arguments":{"filePath":"README.md"}}}]}, "done":false}
|
|
73
|
+
* {"message":{"content":""}, "done":true}
|
|
74
|
+
* `;
|
|
75
|
+
*
|
|
76
|
+
* const merged = parseOllamaStreamResponse(ndjsonResponse);
|
|
77
|
+
* // Result:
|
|
78
|
+
* // {
|
|
79
|
+
* // message: {
|
|
80
|
+
* // tool_calls: [{ function: { name: "read", arguments: { filePath: "README.md" } } }],
|
|
81
|
+
* // content: ""
|
|
82
|
+
* // },
|
|
83
|
+
* // done: true
|
|
84
|
+
* // }
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
export declare function parseOllamaStreamResponse(response: string): OllamaMergedResponse;
|
|
88
|
+
/**
|
|
89
|
+
* Check if a response string is NDJSON format.
|
|
90
|
+
*
|
|
91
|
+
* NDJSON is identified by:
|
|
92
|
+
* - Multiple lines
|
|
93
|
+
* - Each line is valid JSON
|
|
94
|
+
* - At least one line has "done" field
|
|
95
|
+
*
|
|
96
|
+
* @param response - Response string to check
|
|
97
|
+
* @returns true if response appears to be NDJSON
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```typescript
|
|
101
|
+
* const ndjson = '{"done":false}\n{"done":true}';
|
|
102
|
+
* const singleJson = '{"done":true}';
|
|
103
|
+
*
|
|
104
|
+
* isNDJSONResponse(ndjson); // true
|
|
105
|
+
* isNDJSONResponse(singleJson); // false
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
export declare function isNDJSONResponse(response: string): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type OpenCodeBinaryType = "opencode" | "opencode-desktop";
|
|
2
|
+
export interface OpenCodeConfigDirOptions {
|
|
3
|
+
binary: OpenCodeBinaryType;
|
|
4
|
+
version?: string | null;
|
|
5
|
+
checkExisting?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface OpenCodeConfigPaths {
|
|
8
|
+
configDir: string;
|
|
9
|
+
configJson: string;
|
|
10
|
+
configJsonc: string;
|
|
11
|
+
packageJson: string;
|
|
12
|
+
omoConfig: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const TAURI_APP_IDENTIFIER = "ai.opencode.desktop";
|
|
15
|
+
export declare const TAURI_APP_IDENTIFIER_DEV = "ai.opencode.desktop.dev";
|
|
16
|
+
export declare function isDevBuild(version: string | null | undefined): boolean;
|
|
17
|
+
export declare function getOpenCodeConfigDir(options: OpenCodeConfigDirOptions): string;
|
|
18
|
+
export declare function getOpenCodeConfigPaths(options: OpenCodeConfigDirOptions): OpenCodeConfigPaths;
|
|
19
|
+
export declare function detectExistingConfigDir(binary: OpenCodeBinaryType, version?: string | null): string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimum OpenCode version required for this plugin.
|
|
3
|
+
* This plugin only supports OpenCode 1.1.1+ which uses the permission system.
|
|
4
|
+
*/
|
|
5
|
+
export declare const MINIMUM_OPENCODE_VERSION = "1.1.1";
|
|
6
|
+
/**
|
|
7
|
+
* OpenCode version that introduced native AGENTS.md injection.
|
|
8
|
+
* PR #10678 merged on Jan 26, 2026 - OpenCode now dynamically resolves
|
|
9
|
+
* AGENTS.md files from subdirectories as the agent explores them.
|
|
10
|
+
* When this version is detected, the directory-agents-injector hook
|
|
11
|
+
* is auto-disabled to prevent duplicate AGENTS.md loading.
|
|
12
|
+
*/
|
|
13
|
+
export declare const OPENCODE_NATIVE_AGENTS_INJECTION_VERSION = "1.1.37";
|
|
14
|
+
export declare function parseVersion(version: string): number[];
|
|
15
|
+
export declare function compareVersions(a: string, b: string): -1 | 0 | 1;
|
|
16
|
+
export declare function getOpenCodeVersion(): string | null;
|
|
17
|
+
export declare function isOpenCodeVersionAtLeast(version: string): boolean;
|
|
18
|
+
export declare function resetVersionCache(): void;
|
|
19
|
+
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 OpenCode 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,10 @@
|
|
|
1
|
+
export interface InjectedPathsData {
|
|
2
|
+
sessionID: string;
|
|
3
|
+
injectedPaths: string[];
|
|
4
|
+
updatedAt: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function createInjectedPathsStorage(storageDir: string): {
|
|
7
|
+
loadInjectedPaths: (sessionID: string) => Set<string>;
|
|
8
|
+
saveInjectedPaths: (sessionID: string, paths: Set<string>) => void;
|
|
9
|
+
clearInjectedPaths: (sessionID: string) => void;
|
|
10
|
+
};
|
|
@@ -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,5 @@
|
|
|
1
|
+
export declare function camelToSnake(str: string): string;
|
|
2
|
+
export declare function snakeToCamel(str: string): string;
|
|
3
|
+
export declare function transformObjectKeys(obj: Record<string, unknown>, transformer: (key: string) => string, deep?: boolean): Record<string, unknown>;
|
|
4
|
+
export declare function objectToSnakeCase(obj: Record<string, unknown>, deep?: boolean): Record<string, unknown>;
|
|
5
|
+
export declare function objectToCamelCase(obj: Record<string, unknown>, deep?: boolean): Record<string, unknown>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified system directive prefix for oh-my-parallel-agent-opencode internal messages.
|
|
3
|
+
* All system-generated messages should use this prefix for consistent filtering.
|
|
4
|
+
*
|
|
5
|
+
* Format: [SYSTEM DIRECTIVE: OH-MY-OPENCODE - {TYPE}]
|
|
6
|
+
*/
|
|
7
|
+
export declare const SYSTEM_DIRECTIVE_PREFIX = "[SYSTEM DIRECTIVE: OH-MY-OPENCODE";
|
|
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-OPENCODE - TODO CONTINUATION]"
|
|
12
|
+
*/
|
|
13
|
+
export declare function createSystemDirective(type: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Checks if a message starts with the oh-my-parallel-agent-opencode 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
|
+
/**
|
|
22
|
+
* Checks if a message contains system-generated content that should be excluded
|
|
23
|
+
* from keyword detection and mode triggering.
|
|
24
|
+
* @param text - The message text to check
|
|
25
|
+
* @returns true if the message contains system-reminder tags
|
|
26
|
+
*/
|
|
27
|
+
export declare function hasSystemReminder(text: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Removes system-reminder tag content from text.
|
|
30
|
+
* This prevents automated system messages from triggering mode keywords.
|
|
31
|
+
* @param text - The message text to clean
|
|
32
|
+
* @returns text with system-reminder content removed
|
|
33
|
+
*/
|
|
34
|
+
export declare function removeSystemReminders(text: string): string;
|
|
35
|
+
export declare const SystemDirectiveTypes: {
|
|
36
|
+
readonly TODO_CONTINUATION: "TODO CONTINUATION";
|
|
37
|
+
readonly RALPH_LOOP: "RALPH LOOP";
|
|
38
|
+
readonly BOULDER_CONTINUATION: "BOULDER CONTINUATION";
|
|
39
|
+
readonly DELEGATION_REQUIRED: "DELEGATION REQUIRED";
|
|
40
|
+
readonly SINGLE_TASK_ONLY: "SINGLE TASK ONLY";
|
|
41
|
+
readonly COMPACTION_CONTEXT: "COMPACTION CONTEXT";
|
|
42
|
+
readonly CONTEXT_WINDOW_MONITOR: "CONTEXT WINDOW MONITOR";
|
|
43
|
+
readonly PROMETHEUS_READ_ONLY: "PROMETHEUS READ-ONLY";
|
|
44
|
+
};
|
|
45
|
+
export type SystemDirectiveType = (typeof SystemDirectiveTypes)[keyof typeof SystemDirectiveTypes];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const POLL_INTERVAL_BACKGROUND_MS = 2000;
|
|
2
|
+
export declare const SESSION_TIMEOUT_MS: number;
|
|
3
|
+
export declare const SESSION_MISSING_GRACE_MS = 6000;
|
|
4
|
+
export declare const SESSION_READY_POLL_INTERVAL_MS = 500;
|
|
5
|
+
export declare const SESSION_READY_TIMEOUT_MS = 10000;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TmuxConfig, TmuxLayout } from "../../config/schema";
|
|
2
|
+
import type { SpawnPaneResult } from "./types";
|
|
3
|
+
export declare function isInsideTmux(): boolean;
|
|
4
|
+
export declare function isServerRunning(serverUrl: string): Promise<boolean>;
|
|
5
|
+
export declare function resetServerCheck(): void;
|
|
6
|
+
export type SplitDirection = "-h" | "-v";
|
|
7
|
+
export declare function getCurrentPaneId(): string | undefined;
|
|
8
|
+
export interface PaneDimensions {
|
|
9
|
+
paneWidth: number;
|
|
10
|
+
windowWidth: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function getPaneDimensions(paneId: string): Promise<PaneDimensions | null>;
|
|
13
|
+
export declare function spawnTmuxPane(sessionId: string, description: string, config: TmuxConfig, serverUrl: string, targetPaneId?: string, splitDirection?: SplitDirection): Promise<SpawnPaneResult>;
|
|
14
|
+
export declare function closeTmuxPane(paneId: string): Promise<boolean>;
|
|
15
|
+
export declare function replaceTmuxPane(paneId: string, sessionId: string, description: string, config: TmuxConfig, serverUrl: string): Promise<SpawnPaneResult>;
|
|
16
|
+
export declare function applyLayout(tmux: string, layout: TmuxLayout, mainPaneSize: number): Promise<void>;
|
|
17
|
+
export declare function enforceMainPaneWidth(mainPaneId: string, windowWidth: number): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare function findSgCliPathSync(): string | null;
|
|
2
|
+
export declare function getSgCliPath(): string;
|
|
3
|
+
export declare function setSgCliPath(path: string): void;
|
|
4
|
+
export declare const CLI_LANGUAGES: readonly ["bash", "c", "cpp", "csharp", "css", "elixir", "go", "haskell", "html", "java", "javascript", "json", "kotlin", "lua", "nix", "php", "python", "ruby", "rust", "scala", "solidity", "swift", "typescript", "tsx", "yaml"];
|
|
5
|
+
export declare const NAPI_LANGUAGES: readonly ["html", "javascript", "tsx", "css", "typescript"];
|
|
6
|
+
export declare const DEFAULT_TIMEOUT_MS = 300000;
|
|
7
|
+
export declare const DEFAULT_MAX_OUTPUT_BYTES: number;
|
|
8
|
+
export declare const DEFAULT_MAX_MATCHES = 500;
|
|
9
|
+
export declare const LANG_EXTENSIONS: Record<string, string[]>;
|
|
10
|
+
export interface EnvironmentCheckResult {
|
|
11
|
+
cli: {
|
|
12
|
+
available: boolean;
|
|
13
|
+
path: string;
|
|
14
|
+
error?: string;
|
|
15
|
+
};
|
|
16
|
+
napi: {
|
|
17
|
+
available: boolean;
|
|
18
|
+
error?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Check if ast-grep CLI and NAPI are available.
|
|
23
|
+
* Call this at startup to provide early feedback about missing dependencies.
|
|
24
|
+
*/
|
|
25
|
+
export declare function checkEnvironment(): EnvironmentCheckResult;
|
|
26
|
+
/**
|
|
27
|
+
* Format environment check result as user-friendly message.
|
|
28
|
+
*/
|
|
29
|
+
export declare function formatEnvironmentCheck(result: EnvironmentCheckResult): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function getCacheDir(): string;
|
|
2
|
+
export declare function getBinaryName(): string;
|
|
3
|
+
export declare function getCachedBinaryPath(): string | null;
|
|
4
|
+
export declare function downloadAstGrep(version?: string): Promise<string | null>;
|
|
5
|
+
export declare function ensureAstGrepBinary(): Promise<string | null>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ToolDefinition } from "@opencode-ai/plugin";
|
|
2
|
+
import { ast_grep_search, ast_grep_replace } from "./tools";
|
|
3
|
+
export declare const builtinTools: Record<string, ToolDefinition>;
|
|
4
|
+
export { ast_grep_search, ast_grep_replace };
|
|
5
|
+
export { ensureAstGrepBinary, getCachedBinaryPath, getCacheDir } from "./downloader";
|
|
6
|
+
export { getAstGrepPath, isCliAvailable, ensureCliAvailable, startBackgroundInit } from "./cli";
|
|
7
|
+
export { checkEnvironment, formatEnvironmentCheck } from "./constants";
|
|
8
|
+
export type { EnvironmentCheckResult } from "./constants";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { CLI_LANGUAGES, NAPI_LANGUAGES } from "./constants";
|
|
2
|
+
export type CliLanguage = (typeof CLI_LANGUAGES)[number];
|
|
3
|
+
export type NapiLanguage = (typeof NAPI_LANGUAGES)[number];
|
|
4
|
+
export interface Position {
|
|
5
|
+
line: number;
|
|
6
|
+
column: number;
|
|
7
|
+
}
|
|
8
|
+
export interface Range {
|
|
9
|
+
start: Position;
|
|
10
|
+
end: Position;
|
|
11
|
+
}
|
|
12
|
+
export interface CliMatch {
|
|
13
|
+
text: string;
|
|
14
|
+
range: {
|
|
15
|
+
byteOffset: {
|
|
16
|
+
start: number;
|
|
17
|
+
end: number;
|
|
18
|
+
};
|
|
19
|
+
start: Position;
|
|
20
|
+
end: Position;
|
|
21
|
+
};
|
|
22
|
+
file: string;
|
|
23
|
+
lines: string;
|
|
24
|
+
charCount: {
|
|
25
|
+
leading: number;
|
|
26
|
+
trailing: number;
|
|
27
|
+
};
|
|
28
|
+
language: string;
|
|
29
|
+
}
|
|
30
|
+
export interface SearchMatch {
|
|
31
|
+
file: string;
|
|
32
|
+
text: string;
|
|
33
|
+
range: Range;
|
|
34
|
+
lines: string;
|
|
35
|
+
}
|
|
36
|
+
export interface MetaVariable {
|
|
37
|
+
name: string;
|
|
38
|
+
text: string;
|
|
39
|
+
kind: string;
|
|
40
|
+
}
|
|
41
|
+
export interface AnalyzeResult {
|
|
42
|
+
text: string;
|
|
43
|
+
range: Range;
|
|
44
|
+
kind: string;
|
|
45
|
+
metaVariables: MetaVariable[];
|
|
46
|
+
}
|
|
47
|
+
export interface TransformResult {
|
|
48
|
+
original: string;
|
|
49
|
+
transformed: string;
|
|
50
|
+
editCount: number;
|
|
51
|
+
}
|
|
52
|
+
export interface SgResult {
|
|
53
|
+
matches: CliMatch[];
|
|
54
|
+
totalMatches: number;
|
|
55
|
+
truncated: boolean;
|
|
56
|
+
truncatedReason?: "max_matches" | "max_output_bytes" | "timeout";
|
|
57
|
+
error?: string;
|
|
58
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AnalyzeResult, SgResult } from "./types";
|
|
2
|
+
export declare function formatSearchResult(result: SgResult): string;
|
|
3
|
+
export declare function formatReplaceResult(result: SgResult, isDryRun: boolean): string;
|
|
4
|
+
export declare function formatAnalyzeResult(results: AnalyzeResult[], extractedMetaVars: boolean): string;
|
|
5
|
+
export declare function formatTransformResult(_original: string, transformed: string, editCount: number): string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const BACKGROUND_TASK_DESCRIPTION = "Run agent task in background. Returns task_id immediately; notifies on completion.\n\nUse `background_output` to get results. Prompts MUST be in English.";
|
|
2
|
+
export declare const BACKGROUND_OUTPUT_DESCRIPTION = "Get output from background task. Use full_session=true to fetch session messages with filters. System notifies on completion, so block=true rarely needed.";
|
|
3
|
+
export declare const BACKGROUND_CANCEL_DESCRIPTION = "Cancel running background task(s). Use all=true to cancel ALL before final answer.";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
|
+
import type { BackgroundManager } from "../../features/background-agent";
|
|
3
|
+
type BackgroundOutputMessage = {
|
|
4
|
+
info?: {
|
|
5
|
+
role?: string;
|
|
6
|
+
time?: string | {
|
|
7
|
+
created?: number;
|
|
8
|
+
};
|
|
9
|
+
agent?: string;
|
|
10
|
+
};
|
|
11
|
+
parts?: Array<{
|
|
12
|
+
type?: string;
|
|
13
|
+
text?: string;
|
|
14
|
+
content?: string | Array<{
|
|
15
|
+
type: string;
|
|
16
|
+
text?: string;
|
|
17
|
+
}>;
|
|
18
|
+
name?: string;
|
|
19
|
+
}>;
|
|
20
|
+
};
|
|
21
|
+
type BackgroundOutputMessagesResult = {
|
|
22
|
+
data?: BackgroundOutputMessage[];
|
|
23
|
+
error?: unknown;
|
|
24
|
+
} | BackgroundOutputMessage[];
|
|
25
|
+
export type BackgroundOutputClient = {
|
|
26
|
+
session: {
|
|
27
|
+
messages: (args: {
|
|
28
|
+
path: {
|
|
29
|
+
id: string;
|
|
30
|
+
};
|
|
31
|
+
}) => Promise<BackgroundOutputMessagesResult>;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export type BackgroundCancelClient = {
|
|
35
|
+
session: {
|
|
36
|
+
abort: (args: {
|
|
37
|
+
path: {
|
|
38
|
+
id: string;
|
|
39
|
+
};
|
|
40
|
+
}) => Promise<unknown>;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export type BackgroundOutputManager = Pick<BackgroundManager, "getTask">;
|
|
44
|
+
export declare function createBackgroundTask(manager: BackgroundManager): ToolDefinition;
|
|
45
|
+
export declare function createBackgroundOutput(manager: BackgroundOutputManager, client: BackgroundOutputClient): ToolDefinition;
|
|
46
|
+
export declare function createBackgroundCancel(manager: BackgroundManager, client: BackgroundCancelClient): ToolDefinition;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface BackgroundTaskArgs {
|
|
2
|
+
description: string;
|
|
3
|
+
prompt: string;
|
|
4
|
+
agent: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BackgroundOutputArgs {
|
|
7
|
+
task_id: string;
|
|
8
|
+
block?: boolean;
|
|
9
|
+
timeout?: number;
|
|
10
|
+
full_session?: boolean;
|
|
11
|
+
include_thinking?: boolean;
|
|
12
|
+
message_limit?: number;
|
|
13
|
+
since_message_id?: string;
|
|
14
|
+
include_tool_results?: boolean;
|
|
15
|
+
thinking_max_chars?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface BackgroundCancelArgs {
|
|
18
|
+
taskId?: string;
|
|
19
|
+
all?: boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const ALLOWED_AGENTS: readonly ["explore", "librarian"];
|
|
2
|
+
export declare const CALL_OMO_AGENT_DESCRIPTION = "Spawn explore/librarian agent. run_in_background REQUIRED (true=async with task_id, false=sync).\n\nAvailable: {agents}\n\nPass `session_id=<id>` to continue previous agent with full context. Prompts MUST be in English. Use `background_output` for async results.";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ALLOWED_AGENTS } from "./constants";
|
|
2
|
+
export type AllowedAgentType = (typeof ALLOWED_AGENTS)[number];
|
|
3
|
+
export interface CallOmoAgentArgs {
|
|
4
|
+
description: string;
|
|
5
|
+
prompt: string;
|
|
6
|
+
subagent_type: string;
|
|
7
|
+
run_in_background: boolean;
|
|
8
|
+
session_id?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface CallOmoAgentSyncResult {
|
|
11
|
+
title: string;
|
|
12
|
+
metadata: {
|
|
13
|
+
summary?: Array<{
|
|
14
|
+
id: string;
|
|
15
|
+
tool: string;
|
|
16
|
+
state: {
|
|
17
|
+
status: string;
|
|
18
|
+
title?: string;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
sessionId: string;
|
|
22
|
+
};
|
|
23
|
+
output: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CategoryConfig, CategoriesConfig } from "../../config/schema";
|
|
2
|
+
export interface ResolveCategoryConfigOptions {
|
|
3
|
+
userCategories?: CategoriesConfig;
|
|
4
|
+
inheritedModel?: string;
|
|
5
|
+
systemDefaultModel?: string;
|
|
6
|
+
availableModels?: Set<string>;
|
|
7
|
+
}
|
|
8
|
+
export interface ResolveCategoryConfigResult {
|
|
9
|
+
config: CategoryConfig;
|
|
10
|
+
promptAppend: string;
|
|
11
|
+
model: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Resolve the configuration for a given category name.
|
|
15
|
+
* Merges default and user configurations, handles model resolution.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveCategoryConfig(categoryName: string, options: ResolveCategoryConfigOptions): ResolveCategoryConfigResult | null;
|