homer-simpson 0.1.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 +1107 -0
- package/README.md +1274 -0
- package/README.zh-cn.md +1107 -0
- package/dist/agents/architect.d.ts +5 -0
- package/dist/agents/bart.d.ts +3 -0
- package/dist/agents/build-prompt.d.ts +31 -0
- package/dist/agents/comic-book-guy.d.ts +5 -0
- package/dist/agents/consultant.d.ts +19 -0
- package/dist/agents/designer.d.ts +5 -0
- package/dist/agents/edna.d.ts +5 -0
- package/dist/agents/explorer.d.ts +5 -0
- package/dist/agents/grandpa.d.ts +6 -0
- package/dist/agents/homer-prompt-builder.d.ts +26 -0
- package/dist/agents/homer.d.ts +4 -0
- package/dist/agents/index.d.ts +5 -0
- package/dist/agents/lisa.d.ts +5 -0
- package/dist/agents/milhouse.d.ts +5 -0
- package/dist/agents/orchestrator.d.ts +20 -0
- package/dist/agents/plan-prompt.d.ts +64 -0
- package/dist/agents/prometheus-prompt.d.ts +27 -0
- package/dist/agents/researcher.d.ts +5 -0
- package/dist/agents/reviewer.d.ts +6 -0
- package/dist/agents/santas-little-helper.d.ts +5 -0
- package/dist/agents/types.d.ts +49 -0
- package/dist/agents/utils.d.ts +13 -0
- package/dist/agents/utils.test.d.ts +1 -0
- package/dist/agents/viewer.d.ts +5 -0
- package/dist/agents/writer.d.ts +5 -0
- package/dist/auth/antigravity/accounts.d.ts +40 -0
- package/dist/auth/antigravity/accounts.test.d.ts +1 -0
- package/dist/auth/antigravity/browser.d.ts +27 -0
- package/dist/auth/antigravity/browser.test.d.ts +1 -0
- package/dist/auth/antigravity/cli.d.ts +2 -0
- package/dist/auth/antigravity/cli.test.d.ts +1 -0
- package/dist/auth/antigravity/constants.d.ts +98 -0
- package/dist/auth/antigravity/constants.test.d.ts +1 -0
- package/dist/auth/antigravity/fetch.d.ts +69 -0
- package/dist/auth/antigravity/index.d.ts +13 -0
- package/dist/auth/antigravity/integration.test.d.ts +10 -0
- package/dist/auth/antigravity/message-converter.d.ts +54 -0
- package/dist/auth/antigravity/oauth.d.ts +51 -0
- package/dist/auth/antigravity/oauth.test.d.ts +1 -0
- package/dist/auth/antigravity/plugin.d.ts +54 -0
- package/dist/auth/antigravity/project.d.ts +10 -0
- package/dist/auth/antigravity/request.d.ts +116 -0
- package/dist/auth/antigravity/request.test.d.ts +1 -0
- package/dist/auth/antigravity/response.d.ts +137 -0
- package/dist/auth/antigravity/storage.d.ts +5 -0
- package/dist/auth/antigravity/storage.test.d.ts +1 -0
- package/dist/auth/antigravity/thinking.d.ts +278 -0
- package/dist/auth/antigravity/thinking.test.d.ts +10 -0
- package/dist/auth/antigravity/thought-signature-store.d.ts +52 -0
- package/dist/auth/antigravity/token.d.ts +38 -0
- package/dist/auth/antigravity/token.test.d.ts +1 -0
- package/dist/auth/antigravity/tools.d.ts +119 -0
- package/dist/auth/antigravity/types.d.ts +229 -0
- package/dist/cli/commands/auth.d.ts +2 -0
- package/dist/cli/config-manager.d.ts +91 -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/opencode.d.ts +10 -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 +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 +23631 -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 +11 -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 +4 -0
- package/dist/config/presets.d.ts +89 -0
- package/dist/config/schema.d.ts +1952 -0
- package/dist/config/schema.test.d.ts +1 -0
- package/dist/features/background-agent/concurrency.d.ts +10 -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 +70 -0
- package/dist/features/background-agent/manager.test.d.ts +1 -0
- package/dist/features/background-agent/types.d.ts +68 -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 +4 -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/donut-state/constants.d.ts +10 -0
- package/dist/features/donut-state/index.d.ts +3 -0
- package/dist/features/donut-state/storage.d.ts +28 -0
- package/dist/features/donut-state/storage.test.d.ts +1 -0
- package/dist/features/donut-state/types.d.ts +24 -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 +11 -0
- package/dist/features/hook-message-injector/types.d.ts +44 -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 +5 -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/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 +29 -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 +56 -0
- package/dist/features/task-toast-manager/manager.test.d.ts +1 -0
- package/dist/features/task-toast-manager/types.d.ts +16 -0
- package/dist/google-auth.d.ts +3 -0
- package/dist/google-auth.js +3871 -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 +17 -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-executor.d.ts +3 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-purge-errors.d.ts +7 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-storage.d.ts +2 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-supersede.d.ts +6 -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 +42 -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/constants.d.ts +13 -0
- package/dist/hooks/auto-update-checker/index.d.ts +16 -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 +53 -0
- package/dist/hooks/comment-checker/constants.d.ts +3 -0
- package/dist/hooks/comment-checker/downloader.d.ts +25 -0
- package/dist/hooks/comment-checker/filters/bdd.d.ts +2 -0
- package/dist/hooks/comment-checker/filters/directive.d.ts +2 -0
- package/dist/hooks/comment-checker/filters/docstring.d.ts +2 -0
- package/dist/hooks/comment-checker/filters/index.d.ts +7 -0
- package/dist/hooks/comment-checker/filters/shebang.d.ts +2 -0
- package/dist/hooks/comment-checker/index.d.ts +19 -0
- package/dist/hooks/comment-checker/output/formatter.d.ts +2 -0
- package/dist/hooks/comment-checker/output/index.d.ts +2 -0
- package/dist/hooks/comment-checker/output/xml-builder.d.ts +2 -0
- package/dist/hooks/comment-checker/types.d.ts +31 -0
- package/dist/hooks/compaction-context-injector/index.d.ts +2 -0
- package/dist/hooks/context-window-monitor.d.ts +18 -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-message-sanitizer/index.d.ts +12 -0
- package/dist/hooks/empty-task-response-detector.d.ts +12 -0
- package/dist/hooks/homer-orchestrator/index.d.ts +35 -0
- package/dist/hooks/homer-orchestrator/index.test.d.ts +1 -0
- package/dist/hooks/index.d.ts +32 -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 +31 -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/preemptive-compaction/constants.d.ts +3 -0
- package/dist/hooks/preemptive-compaction/index.d.ts +24 -0
- package/dist/hooks/preemptive-compaction/types.d.ts +17 -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 +20 -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 +16 -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/status-recorder/index.d.ts +51 -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 +57170 -0
- package/dist/mcp/context7.d.ts +5 -0
- package/dist/mcp/grep-app.d.ts +5 -0
- package/dist/mcp/index.d.ts +8 -0
- package/dist/mcp/index.test.d.ts +1 -0
- package/dist/mcp/types.d.ts +9 -0
- package/dist/mcp/websearch.d.ts +8 -0
- package/dist/plugin-config.d.ts +4 -0
- package/dist/plugin-handlers/config-handler.d.ts +10 -0
- package/dist/plugin-handlers/index.d.ts +1 -0
- package/dist/plugin-state.d.ts +6 -0
- package/dist/shared/agent-display.d.ts +43 -0
- package/dist/shared/agent-display.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/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/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 +24 -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/messages.d.ts +33 -0
- package/dist/shared/messages.test.d.ts +1 -0
- package/dist/shared/migration.d.ts +17 -0
- package/dist/shared/migration.test.d.ts +1 -0
- package/dist/shared/model-sanitizer.d.ts +3 -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 +10 -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 +12 -0
- package/dist/shared/permission-compat.test.d.ts +1 -0
- package/dist/shared/snake-case.d.ts +4 -0
- package/dist/shared/tool-name.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/napi.d.ts +13 -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-homer-agent/constants.d.ts +2 -0
- package/dist/tools/call-homer-agent/index.d.ts +3 -0
- package/dist/tools/call-homer-agent/tools.d.ts +3 -0
- package/dist/tools/call-homer-agent/types.d.ts +24 -0
- package/dist/tools/glob/cli.d.ts +7 -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 +19 -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/homer-task/constants.d.ts +12 -0
- package/dist/tools/homer-task/index.d.ts +3 -0
- package/dist/tools/homer-task/tools.d.ts +16 -0
- package/dist/tools/homer-task/tools.test.d.ts +1 -0
- package/dist/tools/homer-task/types.d.ts +9 -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/types.d.ts +3 -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 +2 -0
- package/dist/tools/look-at/types.d.ts +4 -0
- package/dist/tools/lsp/client.d.ts +60 -0
- package/dist/tools/lsp/config.d.ts +17 -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 +12 -0
- package/dist/tools/lsp/types.d.ts +156 -0
- package/dist/tools/lsp/utils.d.ts +29 -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 +25 -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/dist/tools/spec-system/clarity-checker.d.ts +23 -0
- package/dist/tools/spec-system/clarity-checker.test.d.ts +1 -0
- package/dist/tools/spec-system/index.d.ts +9 -0
- package/dist/tools/spec-system/scenario-builder.d.ts +56 -0
- package/dist/tools/spec-system/spec-file-manager.d.ts +59 -0
- package/dist/tools/spec-system/types.d.ts +92 -0
- package/dist/tools/status-recorder/attempt-tracker.d.ts +98 -0
- package/dist/tools/status-recorder/failure-analyzer.d.ts +48 -0
- package/dist/tools/status-recorder/index.d.ts +7 -0
- package/dist/tools/status-recorder/types.d.ts +80 -0
- package/package.json +82 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PluginInput, type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
|
+
import type { BackgroundManager } from "../../features/background-agent";
|
|
3
|
+
type OpencodeClient = PluginInput["client"];
|
|
4
|
+
export declare function createBackgroundTask(manager: BackgroundManager): ToolDefinition;
|
|
5
|
+
export declare function createBackgroundOutput(manager: BackgroundManager, client: OpencodeClient): ToolDefinition;
|
|
6
|
+
export declare function createBackgroundCancel(manager: BackgroundManager, client: OpencodeClient): ToolDefinition;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
}
|
|
11
|
+
export interface BackgroundCancelArgs {
|
|
12
|
+
taskId?: string;
|
|
13
|
+
all?: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const ALLOWED_AGENTS: readonly ["Explorer", "Researcher"];
|
|
2
|
+
export declare const CALL_HOMER_AGENT_DESCRIPTION = "Spawn Explorer/Researcher agent. run_in_background REQUIRED (true=async with task_id, false=sync).\n\nAvailable: {agents}\n\nPass `resume=session_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 CallHomerAgentArgs {
|
|
4
|
+
description: string;
|
|
5
|
+
prompt: string;
|
|
6
|
+
subagent_type: string;
|
|
7
|
+
run_in_background: boolean;
|
|
8
|
+
session_id?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface CallHomerAgentSyncResult {
|
|
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,7 @@
|
|
|
1
|
+
import { type GrepBackend } from "./constants";
|
|
2
|
+
import type { GlobOptions, GlobResult } from "./types";
|
|
3
|
+
export interface ResolvedCli {
|
|
4
|
+
path: string;
|
|
5
|
+
backend: GrepBackend;
|
|
6
|
+
}
|
|
7
|
+
export declare function runRgFiles(options: GlobOptions, resolvedCli?: ResolvedCli): Promise<GlobResult>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { resolveGrepCli, resolveGrepCliWithAutoInstall, type GrepBackend } from "../grep/constants";
|
|
2
|
+
export declare const DEFAULT_TIMEOUT_MS = 60000;
|
|
3
|
+
export declare const DEFAULT_LIMIT = 100;
|
|
4
|
+
export declare const DEFAULT_MAX_DEPTH = 20;
|
|
5
|
+
export declare const DEFAULT_MAX_OUTPUT_BYTES: number;
|
|
6
|
+
export declare const RG_FILES_FLAGS: readonly ["--files", "--color=never", "--glob=!.git/*"];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface FileMatch {
|
|
2
|
+
path: string;
|
|
3
|
+
mtime: number;
|
|
4
|
+
}
|
|
5
|
+
export interface GlobResult {
|
|
6
|
+
files: FileMatch[];
|
|
7
|
+
totalFiles: number;
|
|
8
|
+
truncated: boolean;
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GlobOptions {
|
|
12
|
+
pattern: string;
|
|
13
|
+
paths?: string[];
|
|
14
|
+
hidden?: boolean;
|
|
15
|
+
noIgnore?: boolean;
|
|
16
|
+
maxDepth?: number;
|
|
17
|
+
timeout?: number;
|
|
18
|
+
limit?: number;
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type GrepBackend = "rg" | "grep";
|
|
2
|
+
interface ResolvedCli {
|
|
3
|
+
path: string;
|
|
4
|
+
backend: GrepBackend;
|
|
5
|
+
}
|
|
6
|
+
export declare function resolveGrepCli(): ResolvedCli;
|
|
7
|
+
export declare function resolveGrepCliWithAutoInstall(): Promise<ResolvedCli>;
|
|
8
|
+
export declare const DEFAULT_MAX_DEPTH = 20;
|
|
9
|
+
export declare const DEFAULT_MAX_FILESIZE = "10M";
|
|
10
|
+
export declare const DEFAULT_MAX_COUNT = 500;
|
|
11
|
+
export declare const DEFAULT_MAX_COLUMNS = 1000;
|
|
12
|
+
export declare const DEFAULT_CONTEXT = 2;
|
|
13
|
+
export declare const DEFAULT_TIMEOUT_MS = 300000;
|
|
14
|
+
export declare const DEFAULT_MAX_OUTPUT_BYTES: number;
|
|
15
|
+
export declare const RG_SAFETY_FLAGS: readonly ["--no-follow", "--color=never", "--no-heading", "--line-number", "--with-filename"];
|
|
16
|
+
export declare const GREP_SAFETY_FLAGS: readonly ["-n", "-H", "--color=never"];
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface GrepMatch {
|
|
2
|
+
file: string;
|
|
3
|
+
line: number;
|
|
4
|
+
column?: number;
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GrepResult {
|
|
8
|
+
matches: GrepMatch[];
|
|
9
|
+
totalMatches: number;
|
|
10
|
+
filesSearched: number;
|
|
11
|
+
truncated: boolean;
|
|
12
|
+
error?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface GrepOptions {
|
|
15
|
+
pattern: string;
|
|
16
|
+
paths?: string[];
|
|
17
|
+
globs?: string[];
|
|
18
|
+
excludeGlobs?: string[];
|
|
19
|
+
context?: number;
|
|
20
|
+
maxDepth?: number;
|
|
21
|
+
maxFilesize?: string;
|
|
22
|
+
maxCount?: number;
|
|
23
|
+
maxColumns?: number;
|
|
24
|
+
caseSensitive?: boolean;
|
|
25
|
+
wholeWord?: boolean;
|
|
26
|
+
fixedStrings?: boolean;
|
|
27
|
+
multiline?: boolean;
|
|
28
|
+
hidden?: boolean;
|
|
29
|
+
noIgnore?: boolean;
|
|
30
|
+
fileType?: string[];
|
|
31
|
+
timeout?: number;
|
|
32
|
+
}
|
|
33
|
+
export interface CountResult {
|
|
34
|
+
file: string;
|
|
35
|
+
count: number;
|
|
36
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CategoryConfig } from "../../config/schema";
|
|
2
|
+
export declare const VISUAL_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on VISUAL/UI tasks.\n\nDesign-first mindset:\n- Bold aesthetic choices over safe defaults\n- Unexpected layouts, asymmetry, grid-breaking elements\n- Distinctive typography (avoid: Arial, Inter, Roboto, Space Grotesk)\n- Cohesive color palettes with sharp accents\n- High-impact animations with staggered reveals\n- Atmosphere: gradient meshes, noise textures, layered transparencies\n\nAVOID: Generic fonts, purple gradients on white, predictable layouts, cookie-cutter patterns.\n</Category_Context>";
|
|
3
|
+
export declare const STRATEGIC_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on BUSINESS LOGIC / ARCHITECTURE tasks.\n\nStrategic advisor mindset:\n- Bias toward simplicity: least complex solution that fulfills requirements\n- Leverage existing code/patterns over new components\n- Prioritize developer experience and maintainability\n- One clear recommendation with effort estimate (Quick/Short/Medium/Large)\n- Signal when advanced approach warranted\n\nResponse format:\n- Bottom line (2-3 sentences)\n- Action plan (numbered steps)\n- Risks and mitigations (if relevant)\n</Category_Context>";
|
|
4
|
+
export declare const ARTISTRY_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on HIGHLY CREATIVE / ARTISTIC tasks.\n\nArtistic genius mindset:\n- Push far beyond conventional boundaries\n- Explore radical, unconventional directions\n- Surprise and delight: unexpected twists, novel combinations\n- Rich detail and vivid expression\n- Break patterns deliberately when it serves the creative vision\n\nApproach:\n- Generate diverse, bold options first\n- Embrace ambiguity and wild experimentation\n- Balance novelty with coherence\n- This is for tasks requiring exceptional creativity\n</Category_Context>";
|
|
5
|
+
export declare const QUICK_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on SMALL / QUICK tasks.\n\nEfficient execution mindset:\n- Fast, focused, minimal overhead\n- Get to the point immediately\n- No over-engineering\n- Simple solutions for simple problems\n\nApproach:\n- Minimal viable implementation\n- Skip unnecessary abstractions\n- Direct and concise\n</Category_Context>\n\n<Caller_Warning>\n\u26A0\uFE0F THIS CATEGORY USES A LESS CAPABLE MODEL (claude-haiku-4-5).\n\nThe model executing this task has LIMITED reasoning capacity. Your prompt MUST be:\n\n**EXHAUSTIVELY EXPLICIT** - Leave NOTHING to interpretation:\n1. MUST DO: List every required action as atomic, numbered steps\n2. MUST NOT DO: Explicitly forbid likely mistakes and deviations\n3. EXPECTED OUTPUT: Describe exact success criteria with concrete examples\n\n**WHY THIS MATTERS:**\n- Less capable models WILL deviate without explicit guardrails\n- Vague instructions \u2192 unpredictable results\n- Implicit expectations \u2192 missed requirements\n\n**PROMPT STRUCTURE (MANDATORY):**\n```\nTASK: [One-sentence goal]\n\nMUST DO:\n1. [Specific action with exact details]\n2. [Another specific action]\n...\n\nMUST NOT DO:\n- [Forbidden action + why]\n- [Another forbidden action]\n...\n\nEXPECTED OUTPUT:\n- [Exact deliverable description]\n- [Success criteria / verification method]\n```\n\nIf your prompt lacks this structure, REWRITE IT before delegating.\n</Caller_Warning>";
|
|
6
|
+
export declare const MOST_CAPABLE_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on COMPLEX / MOST-CAPABLE tasks.\n\nMaximum capability mindset:\n- Bring full reasoning power to bear\n- Consider all edge cases and implications\n- Deep analysis before action\n- Quality over speed\n\nApproach:\n- Thorough understanding first\n- Comprehensive solution design\n- Meticulous execution\n- This is for the most challenging problems\n</Category_Context>";
|
|
7
|
+
export declare const WRITING_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on WRITING / PROSE tasks.\n\nWordsmith mindset:\n- Clear, flowing prose\n- Appropriate tone and voice\n- Engaging and readable\n- Proper structure and organization\n\nApproach:\n- Understand the audience\n- Draft with care\n- Polish for clarity and impact\n- Documentation, READMEs, articles, technical writing\n</Category_Context>";
|
|
8
|
+
export declare const GENERAL_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on GENERAL tasks.\n\nBalanced execution mindset:\n- Practical, straightforward approach\n- Good enough is good enough\n- Focus on getting things done\n\nApproach:\n- Standard best practices\n- Reasonable trade-offs\n- Efficient completion\n</Category_Context>\n\n<Caller_Warning>\n\u26A0\uFE0F THIS CATEGORY USES A MID-TIER MODEL (claude-sonnet-4-5).\n\nWhile capable, this model benefits significantly from EXPLICIT instructions.\n\n**PROVIDE CLEAR STRUCTURE:**\n1. MUST DO: Enumerate required actions explicitly - don't assume inference\n2. MUST NOT DO: State forbidden actions to prevent scope creep or wrong approaches\n3. EXPECTED OUTPUT: Define concrete success criteria and deliverables\n\n**COMMON PITFALLS WITHOUT EXPLICIT INSTRUCTIONS:**\n- Model may take shortcuts that miss edge cases\n- Implicit requirements get overlooked\n- Output format may not match expectations\n- Scope may expand beyond intended boundaries\n\n**RECOMMENDED PROMPT PATTERN:**\n```\nTASK: [Clear, single-purpose goal]\n\nCONTEXT: [Relevant background the model needs]\n\nMUST DO:\n- [Explicit requirement 1]\n- [Explicit requirement 2]\n\nMUST NOT DO:\n- [Boundary/constraint 1]\n- [Boundary/constraint 2]\n\nEXPECTED OUTPUT:\n- [What success looks like]\n- [How to verify completion]\n```\n\nThe more explicit your prompt, the better the results.\n</Caller_Warning>";
|
|
9
|
+
export declare const DEFAULT_CATEGORIES: Record<string, CategoryConfig>;
|
|
10
|
+
export declare const CATEGORY_PROMPT_APPENDS: Record<string, string>;
|
|
11
|
+
export declare const CATEGORY_DESCRIPTIONS: Record<string, string>;
|
|
12
|
+
export declare const HOMER_TASK_DESCRIPTION: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type PluginInput, type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
|
+
import type { BackgroundManager } from "../../features/background-agent";
|
|
3
|
+
import type { CategoriesConfig } from "../../config/schema";
|
|
4
|
+
type OpencodeClient = PluginInput["client"];
|
|
5
|
+
export interface HomerTaskToolOptions {
|
|
6
|
+
manager: BackgroundManager;
|
|
7
|
+
client: OpencodeClient;
|
|
8
|
+
userCategories?: CategoriesConfig;
|
|
9
|
+
}
|
|
10
|
+
export interface BuildSystemContentInput {
|
|
11
|
+
skillContent?: string;
|
|
12
|
+
categoryPromptAppend?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function buildSystemContent(input: BuildSystemContentInput): string | undefined;
|
|
15
|
+
export declare function createHomerTask(options: HomerTaskToolOptions): ToolDefinition;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { lspManager } from "./lsp";
|
|
2
|
+
export { lspManager };
|
|
3
|
+
export { createSlashcommandTool, discoverCommandsSync } from "./slashcommand";
|
|
4
|
+
export { sessionExists } from "./session-manager/storage";
|
|
5
|
+
export { interactive_bash, startBackgroundCheck as startTmuxCheck } from "./interactive-bash";
|
|
6
|
+
export { createSkillTool } from "./skill";
|
|
7
|
+
export { getTmuxPath } from "./interactive-bash/utils";
|
|
8
|
+
export { createSkillMcpTool } from "./skill-mcp";
|
|
9
|
+
import type { PluginInput, ToolDefinition } from "@opencode-ai/plugin";
|
|
10
|
+
import type { BackgroundManager } from "../features/background-agent";
|
|
11
|
+
type OpencodeClient = PluginInput["client"];
|
|
12
|
+
export { createCallHomerAgent } from "./call-homer-agent";
|
|
13
|
+
export { createLookAt } from "./look-at";
|
|
14
|
+
export { createHomerTask, type HomerTaskToolOptions, DEFAULT_CATEGORIES, CATEGORY_PROMPT_APPENDS } from "./homer-task";
|
|
15
|
+
export declare function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient): Record<string, ToolDefinition>;
|
|
16
|
+
export declare const builtinTools: Record<string, ToolDefinition>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const DEFAULT_TIMEOUT_MS = 60000;
|
|
2
|
+
export declare const BLOCKED_TMUX_SUBCOMMANDS: string[];
|
|
3
|
+
export declare const INTERACTIVE_BASH_DESCRIPTION = "Execute tmux commands. Use \"homer-{name}\" session pattern.\n\nFor: server processes, long-running tasks, background jobs, interactive CLI tools.\n\nBlocked (use bash instead): capture-pane, save-buffer, show-buffer, pipe-pane.";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ToolDefinition } from "@opencode-ai/plugin/tool";
|
|
2
|
+
/**
|
|
3
|
+
* Quote-aware command tokenizer with escape handling
|
|
4
|
+
* Handles single/double quotes and backslash escapes without external dependencies
|
|
5
|
+
*/
|
|
6
|
+
export declare function tokenizeCommand(cmd: string): string[];
|
|
7
|
+
export declare const interactive_bash: ToolDefinition;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const MULTIMODAL_LOOKER_AGENT: "Viewer";
|
|
2
|
+
export declare const LOOK_AT_DESCRIPTION = "Analyze media files (PDFs, images, diagrams) that require interpretation beyond raw text. Extracts specific information or summaries from documents, describes visual content. Use when you need analyzed/extracted data rather than literal file contents.";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { Diagnostic, ResolvedServer } from "./types";
|
|
2
|
+
declare class LSPServerManager {
|
|
3
|
+
private static instance;
|
|
4
|
+
private clients;
|
|
5
|
+
private cleanupInterval;
|
|
6
|
+
private readonly IDLE_TIMEOUT;
|
|
7
|
+
private constructor();
|
|
8
|
+
private registerProcessCleanup;
|
|
9
|
+
static getInstance(): LSPServerManager;
|
|
10
|
+
private getKey;
|
|
11
|
+
private startCleanupTimer;
|
|
12
|
+
private cleanupIdleClients;
|
|
13
|
+
getClient(root: string, server: ResolvedServer): Promise<LSPClient>;
|
|
14
|
+
warmupClient(root: string, server: ResolvedServer): void;
|
|
15
|
+
releaseClient(root: string, serverId: string): void;
|
|
16
|
+
isServerInitializing(root: string, serverId: string): boolean;
|
|
17
|
+
stopAll(): Promise<void>;
|
|
18
|
+
cleanupTempDirectoryClients(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export declare const lspManager: LSPServerManager;
|
|
21
|
+
export declare class LSPClient {
|
|
22
|
+
private root;
|
|
23
|
+
private server;
|
|
24
|
+
private proc;
|
|
25
|
+
private buffer;
|
|
26
|
+
private pending;
|
|
27
|
+
private requestIdCounter;
|
|
28
|
+
private openedFiles;
|
|
29
|
+
private stderrBuffer;
|
|
30
|
+
private processExited;
|
|
31
|
+
private diagnosticsStore;
|
|
32
|
+
constructor(root: string, server: ResolvedServer);
|
|
33
|
+
start(): Promise<void>;
|
|
34
|
+
private startReading;
|
|
35
|
+
private startStderrReading;
|
|
36
|
+
private rejectAllPending;
|
|
37
|
+
private findSequence;
|
|
38
|
+
private processBuffer;
|
|
39
|
+
private send;
|
|
40
|
+
private notify;
|
|
41
|
+
private respond;
|
|
42
|
+
private handleServerRequest;
|
|
43
|
+
initialize(): Promise<void>;
|
|
44
|
+
openFile(filePath: string): Promise<void>;
|
|
45
|
+
hover(filePath: string, line: number, character: number): Promise<unknown>;
|
|
46
|
+
definition(filePath: string, line: number, character: number): Promise<unknown>;
|
|
47
|
+
references(filePath: string, line: number, character: number, includeDeclaration?: boolean): Promise<unknown>;
|
|
48
|
+
documentSymbols(filePath: string): Promise<unknown>;
|
|
49
|
+
workspaceSymbols(query: string): Promise<unknown>;
|
|
50
|
+
diagnostics(filePath: string): Promise<{
|
|
51
|
+
items: Diagnostic[];
|
|
52
|
+
}>;
|
|
53
|
+
prepareRename(filePath: string, line: number, character: number): Promise<unknown>;
|
|
54
|
+
rename(filePath: string, line: number, character: number, newName: string): Promise<unknown>;
|
|
55
|
+
codeAction(filePath: string, startLine: number, startChar: number, endLine: number, endChar: number, only?: string[]): Promise<unknown>;
|
|
56
|
+
codeActionResolve(codeAction: unknown): Promise<unknown>;
|
|
57
|
+
isAlive(): boolean;
|
|
58
|
+
stop(): Promise<void>;
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ServerLookupResult } from "./types";
|
|
2
|
+
export declare function findServerForExtension(ext: string): ServerLookupResult;
|
|
3
|
+
export declare function getLanguageId(ext: string): string;
|
|
4
|
+
export declare function isServerInstalled(command: string[]): boolean;
|
|
5
|
+
export declare function getAllServers(): Array<{
|
|
6
|
+
id: string;
|
|
7
|
+
installed: boolean;
|
|
8
|
+
extensions: string[];
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
source: string;
|
|
11
|
+
priority: number;
|
|
12
|
+
}>;
|
|
13
|
+
export declare function getConfigPaths_(): {
|
|
14
|
+
project: string;
|
|
15
|
+
user: string;
|
|
16
|
+
opencode: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LSPServerConfig } from "./types";
|
|
2
|
+
export declare const SYMBOL_KIND_MAP: Record<number, string>;
|
|
3
|
+
export declare const SEVERITY_MAP: Record<number, string>;
|
|
4
|
+
export declare const DEFAULT_MAX_REFERENCES = 200;
|
|
5
|
+
export declare const DEFAULT_MAX_SYMBOLS = 200;
|
|
6
|
+
export declare const DEFAULT_MAX_DIAGNOSTICS = 200;
|
|
7
|
+
export declare const LSP_INSTALL_HINTS: Record<string, string>;
|
|
8
|
+
export declare const BUILTIN_SERVERS: Record<string, Omit<LSPServerConfig, "id">>;
|
|
9
|
+
export declare const EXT_TO_LANG: Record<string, string>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ToolDefinition } from "@opencode-ai/plugin/tool";
|
|
2
|
+
export declare const lsp_hover: ToolDefinition;
|
|
3
|
+
export declare const lsp_goto_definition: ToolDefinition;
|
|
4
|
+
export declare const lsp_find_references: ToolDefinition;
|
|
5
|
+
export declare const lsp_document_symbols: ToolDefinition;
|
|
6
|
+
export declare const lsp_workspace_symbols: ToolDefinition;
|
|
7
|
+
export declare const lsp_diagnostics: ToolDefinition;
|
|
8
|
+
export declare const lsp_servers: ToolDefinition;
|
|
9
|
+
export declare const lsp_prepare_rename: ToolDefinition;
|
|
10
|
+
export declare const lsp_rename: ToolDefinition;
|
|
11
|
+
export declare const lsp_code_actions: ToolDefinition;
|
|
12
|
+
export declare const lsp_code_action_resolve: ToolDefinition;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
export interface LSPServerConfig {
|
|
2
|
+
id: string;
|
|
3
|
+
command: string[];
|
|
4
|
+
extensions: string[];
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
env?: Record<string, string>;
|
|
7
|
+
initialization?: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export interface Position {
|
|
10
|
+
line: number;
|
|
11
|
+
character: number;
|
|
12
|
+
}
|
|
13
|
+
export interface Range {
|
|
14
|
+
start: Position;
|
|
15
|
+
end: Position;
|
|
16
|
+
}
|
|
17
|
+
export interface Location {
|
|
18
|
+
uri: string;
|
|
19
|
+
range: Range;
|
|
20
|
+
}
|
|
21
|
+
export interface LocationLink {
|
|
22
|
+
targetUri: string;
|
|
23
|
+
targetRange: Range;
|
|
24
|
+
targetSelectionRange: Range;
|
|
25
|
+
originSelectionRange?: Range;
|
|
26
|
+
}
|
|
27
|
+
export interface SymbolInfo {
|
|
28
|
+
name: string;
|
|
29
|
+
kind: number;
|
|
30
|
+
location: Location;
|
|
31
|
+
containerName?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface DocumentSymbol {
|
|
34
|
+
name: string;
|
|
35
|
+
kind: number;
|
|
36
|
+
range: Range;
|
|
37
|
+
selectionRange: Range;
|
|
38
|
+
children?: DocumentSymbol[];
|
|
39
|
+
}
|
|
40
|
+
export interface Diagnostic {
|
|
41
|
+
range: Range;
|
|
42
|
+
severity?: number;
|
|
43
|
+
code?: string | number;
|
|
44
|
+
source?: string;
|
|
45
|
+
message: string;
|
|
46
|
+
}
|
|
47
|
+
export interface HoverResult {
|
|
48
|
+
contents: {
|
|
49
|
+
kind?: string;
|
|
50
|
+
value: string;
|
|
51
|
+
} | string | Array<{
|
|
52
|
+
kind?: string;
|
|
53
|
+
value: string;
|
|
54
|
+
} | string>;
|
|
55
|
+
range?: Range;
|
|
56
|
+
}
|
|
57
|
+
export interface TextDocumentIdentifier {
|
|
58
|
+
uri: string;
|
|
59
|
+
}
|
|
60
|
+
export interface VersionedTextDocumentIdentifier extends TextDocumentIdentifier {
|
|
61
|
+
version: number | null;
|
|
62
|
+
}
|
|
63
|
+
export interface TextEdit {
|
|
64
|
+
range: Range;
|
|
65
|
+
newText: string;
|
|
66
|
+
}
|
|
67
|
+
export interface TextDocumentEdit {
|
|
68
|
+
textDocument: VersionedTextDocumentIdentifier;
|
|
69
|
+
edits: TextEdit[];
|
|
70
|
+
}
|
|
71
|
+
export interface CreateFile {
|
|
72
|
+
kind: "create";
|
|
73
|
+
uri: string;
|
|
74
|
+
options?: {
|
|
75
|
+
overwrite?: boolean;
|
|
76
|
+
ignoreIfExists?: boolean;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export interface RenameFile {
|
|
80
|
+
kind: "rename";
|
|
81
|
+
oldUri: string;
|
|
82
|
+
newUri: string;
|
|
83
|
+
options?: {
|
|
84
|
+
overwrite?: boolean;
|
|
85
|
+
ignoreIfExists?: boolean;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export interface DeleteFile {
|
|
89
|
+
kind: "delete";
|
|
90
|
+
uri: string;
|
|
91
|
+
options?: {
|
|
92
|
+
recursive?: boolean;
|
|
93
|
+
ignoreIfNotExists?: boolean;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
export interface WorkspaceEdit {
|
|
97
|
+
changes?: {
|
|
98
|
+
[uri: string]: TextEdit[];
|
|
99
|
+
};
|
|
100
|
+
documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[];
|
|
101
|
+
}
|
|
102
|
+
export interface PrepareRenameResult {
|
|
103
|
+
range: Range;
|
|
104
|
+
placeholder?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface PrepareRenameDefaultBehavior {
|
|
107
|
+
defaultBehavior: boolean;
|
|
108
|
+
}
|
|
109
|
+
export interface Command {
|
|
110
|
+
title: string;
|
|
111
|
+
command: string;
|
|
112
|
+
arguments?: unknown[];
|
|
113
|
+
}
|
|
114
|
+
export interface CodeActionContext {
|
|
115
|
+
diagnostics: Diagnostic[];
|
|
116
|
+
only?: string[];
|
|
117
|
+
triggerKind?: CodeActionTriggerKind;
|
|
118
|
+
}
|
|
119
|
+
export type CodeActionTriggerKind = 1 | 2;
|
|
120
|
+
export interface CodeAction {
|
|
121
|
+
title: string;
|
|
122
|
+
kind?: string;
|
|
123
|
+
diagnostics?: Diagnostic[];
|
|
124
|
+
isPreferred?: boolean;
|
|
125
|
+
disabled?: {
|
|
126
|
+
reason: string;
|
|
127
|
+
};
|
|
128
|
+
edit?: WorkspaceEdit;
|
|
129
|
+
command?: Command;
|
|
130
|
+
data?: unknown;
|
|
131
|
+
}
|
|
132
|
+
export interface ServerLookupInfo {
|
|
133
|
+
id: string;
|
|
134
|
+
command: string[];
|
|
135
|
+
extensions: string[];
|
|
136
|
+
}
|
|
137
|
+
export type ServerLookupResult = {
|
|
138
|
+
status: "found";
|
|
139
|
+
server: ResolvedServer;
|
|
140
|
+
} | {
|
|
141
|
+
status: "not_configured";
|
|
142
|
+
extension: string;
|
|
143
|
+
availableServers: string[];
|
|
144
|
+
} | {
|
|
145
|
+
status: "not_installed";
|
|
146
|
+
server: ServerLookupInfo;
|
|
147
|
+
installHint: string;
|
|
148
|
+
};
|
|
149
|
+
export interface ResolvedServer {
|
|
150
|
+
id: string;
|
|
151
|
+
command: string[];
|
|
152
|
+
extensions: string[];
|
|
153
|
+
priority: number;
|
|
154
|
+
env?: Record<string, string>;
|
|
155
|
+
initialization?: Record<string, unknown>;
|
|
156
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LSPClient } from "./client";
|
|
2
|
+
import type { HoverResult, DocumentSymbol, SymbolInfo, Location, LocationLink, Diagnostic, PrepareRenameResult, PrepareRenameDefaultBehavior, Range, WorkspaceEdit, TextEdit, CodeAction, Command, ServerLookupResult } from "./types";
|
|
3
|
+
export declare function findWorkspaceRoot(filePath: string): string;
|
|
4
|
+
export declare function uriToPath(uri: string): string;
|
|
5
|
+
export declare function formatServerLookupError(result: Exclude<ServerLookupResult, {
|
|
6
|
+
status: "found";
|
|
7
|
+
}>): string;
|
|
8
|
+
export declare function withLspClient<T>(filePath: string, fn: (client: LSPClient) => Promise<T>): Promise<T>;
|
|
9
|
+
export declare function formatHoverResult(result: HoverResult | null): string;
|
|
10
|
+
export declare function formatLocation(loc: Location | LocationLink): string;
|
|
11
|
+
export declare function formatSymbolKind(kind: number): string;
|
|
12
|
+
export declare function formatSeverity(severity: number | undefined): string;
|
|
13
|
+
export declare function formatDocumentSymbol(symbol: DocumentSymbol, indent?: number): string;
|
|
14
|
+
export declare function formatSymbolInfo(symbol: SymbolInfo): string;
|
|
15
|
+
export declare function formatDiagnostic(diag: Diagnostic): string;
|
|
16
|
+
export declare function filterDiagnosticsBySeverity(diagnostics: Diagnostic[], severityFilter?: "error" | "warning" | "information" | "hint" | "all"): Diagnostic[];
|
|
17
|
+
export declare function formatPrepareRenameResult(result: PrepareRenameResult | PrepareRenameDefaultBehavior | Range | null): string;
|
|
18
|
+
export declare function formatTextEdit(edit: TextEdit): string;
|
|
19
|
+
export declare function formatWorkspaceEdit(edit: WorkspaceEdit | null): string;
|
|
20
|
+
export declare function formatCodeAction(action: CodeAction): string;
|
|
21
|
+
export declare function formatCodeActions(actions: (CodeAction | Command)[] | null): string;
|
|
22
|
+
export interface ApplyResult {
|
|
23
|
+
success: boolean;
|
|
24
|
+
filesModified: string[];
|
|
25
|
+
totalEdits: number;
|
|
26
|
+
errors: string[];
|
|
27
|
+
}
|
|
28
|
+
export declare function applyWorkspaceEdit(edit: WorkspaceEdit | null): ApplyResult;
|
|
29
|
+
export declare function formatApplyResult(result: ApplyResult): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const OPENCODE_STORAGE: string;
|
|
2
|
+
export declare const MESSAGE_STORAGE: string;
|
|
3
|
+
export declare const PART_STORAGE: string;
|
|
4
|
+
export declare const SESSION_STORAGE: string;
|
|
5
|
+
export declare const TODO_DIR: string;
|
|
6
|
+
export declare const TRANSCRIPT_DIR: string;
|
|
7
|
+
export declare const SESSION_LIST_DESCRIPTION = "List all OpenCode sessions with optional filtering.\n\nReturns a list of available session IDs with metadata including message count, date range, and agents used.\n\nArguments:\n- limit (optional): Maximum number of sessions to return\n- from_date (optional): Filter sessions from this date (ISO 8601 format)\n- to_date (optional): Filter sessions until this date (ISO 8601 format)\n\nExample output:\n| Session ID | Messages | First | Last | Agents |\n|------------|----------|-------|------|--------|\n| ses_abc123 | 45 | 2025-12-20 | 2025-12-24 | build, Architect |\n| ses_def456 | 12 | 2025-12-19 | 2025-12-19 | build |";
|
|
8
|
+
export declare const SESSION_READ_DESCRIPTION = "Read messages and history from an OpenCode session.\n\nReturns a formatted view of session messages with role, timestamp, and content. Optionally includes todos and transcript data.\n\nArguments:\n- session_id (required): Session ID to read\n- include_todos (optional): Include todo list if available (default: false)\n- include_transcript (optional): Include transcript log if available (default: false)\n- limit (optional): Maximum number of messages to return (default: all)\n\nExample output:\nSession: ses_abc123\nMessages: 45\nDate Range: 2025-12-20 to 2025-12-24\n\n[Message 1] user (2025-12-20 10:30:00)\nHello, can you help me with...\n\n[Message 2] assistant (2025-12-20 10:30:15)\nOf course! Let me help you with...";
|
|
9
|
+
export declare const SESSION_SEARCH_DESCRIPTION = "Search for content within OpenCode session messages.\n\nPerforms full-text search across session messages and returns matching excerpts with context.\n\nArguments:\n- query (required): Search query string\n- session_id (optional): Search within specific session only (default: all sessions)\n- case_sensitive (optional): Case-sensitive search (default: false)\n- limit (optional): Maximum number of results to return (default: 20)\n\nExample output:\nFound 3 matches across 2 sessions:\n\n[ses_abc123] Message msg_001 (user)\n...implement the **session manager** tool...\n\n[ses_abc123] Message msg_005 (assistant)\n...I'll create a **session manager** with full search...\n\n[ses_def456] Message msg_012 (user)\n...use the **session manager** to find...";
|
|
10
|
+
export declare const SESSION_INFO_DESCRIPTION = "Get metadata and statistics about an OpenCode session.\n\nReturns detailed information about a session including message count, date range, agents used, and available data sources.\n\nArguments:\n- session_id (required): Session ID to inspect\n\nExample output:\nSession ID: ses_abc123\nMessages: 45\nDate Range: 2025-12-20 10:30:00 to 2025-12-24 15:45:30\nDuration: 4 days, 5 hours\nAgents Used: build, Architect, Researcher\nHas Todos: Yes (12 items, 8 completed)\nHas Transcript: Yes (234 entries)";
|
|
11
|
+
export declare const SESSION_DELETE_DESCRIPTION = "Delete an OpenCode session and all associated data.\n\nRemoves session messages, parts, todos, and transcript. This operation cannot be undone.\n\nArguments:\n- session_id (required): Session ID to delete\n- confirm (required): Must be true to confirm deletion\n\nExample:\nsession_delete(session_id=\"ses_abc123\", confirm=true)\nSuccessfully deleted session ses_abc123";
|
|
12
|
+
export declare const TOOL_NAME_PREFIX = "session_";
|