oh-my-opencode-kikokikok 2.13.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 +1029 -0
- package/README.ko.md +1022 -0
- package/README.md +1100 -0
- package/README.zh-cn.md +1032 -0
- package/dist/agents/api-designer.d.ts +5 -0
- package/dist/agents/build-prompt.d.ts +31 -0
- package/dist/agents/code-indexer.d.ts +5 -0
- package/dist/agents/code-reviewer.d.ts +5 -0
- package/dist/agents/dba.d.ts +5 -0
- package/dist/agents/debugger.d.ts +5 -0
- package/dist/agents/devops-engineer.d.ts +5 -0
- package/dist/agents/document-writer.d.ts +5 -0
- package/dist/agents/enterprise-agents.test.d.ts +1 -0
- package/dist/agents/estimator.d.ts +5 -0
- package/dist/agents/explore.d.ts +5 -0
- package/dist/agents/frontend-ui-ux-engineer.d.ts +5 -0
- package/dist/agents/incident-commander.d.ts +5 -0
- package/dist/agents/index.d.ts +5 -0
- package/dist/agents/knowledge-curator.d.ts +5 -0
- package/dist/agents/librarian.d.ts +5 -0
- package/dist/agents/multimodal-looker.d.ts +5 -0
- package/dist/agents/oracle.d.ts +5 -0
- package/dist/agents/performance-analyst.d.ts +5 -0
- package/dist/agents/plan-prompt.d.ts +61 -0
- package/dist/agents/project-manager.d.ts +5 -0
- package/dist/agents/security-reviewer.d.ts +5 -0
- package/dist/agents/sisyphus-prompt-builder.d.ts +25 -0
- package/dist/agents/sisyphus.d.ts +4 -0
- package/dist/agents/test-engineer.d.ts +5 -0
- package/dist/agents/types.d.ts +49 -0
- package/dist/agents/utils.d.ts +10 -0
- package/dist/agents/utils.test.d.ts +1 -0
- package/dist/auth/antigravity/constants.d.ts +36 -0
- package/dist/auth/antigravity/fetch.d.ts +68 -0
- package/dist/auth/antigravity/index.d.ts +13 -0
- package/dist/auth/antigravity/message-converter.d.ts +54 -0
- package/dist/auth/antigravity/oauth.d.ts +85 -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 +104 -0
- package/dist/auth/antigravity/response.d.ts +137 -0
- package/dist/auth/antigravity/thinking.d.ts +234 -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/tools.d.ts +119 -0
- package/dist/auth/antigravity/types.d.ts +205 -0
- package/dist/cli/config-manager.d.ts +94 -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 +23400 -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 +2 -0
- package/dist/config/schema.d.ts +2717 -0
- package/dist/features/background-agent/index.d.ts +2 -0
- package/dist/features/background-agent/manager.d.ts +41 -0
- package/dist/features/background-agent/manager.test.d.ts +1 -0
- package/dist/features/background-agent/types.d.ts +38 -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/types.d.ts +6 -0
- package/dist/features/builtin-skills/api/index.d.ts +1 -0
- package/dist/features/builtin-skills/api/types.d.ts +193 -0
- package/dist/features/builtin-skills/code-index/index.d.ts +1 -0
- package/dist/features/builtin-skills/code-index/types.d.ts +95 -0
- package/dist/features/builtin-skills/db/index.d.ts +1 -0
- package/dist/features/builtin-skills/db/types.d.ts +210 -0
- package/dist/features/builtin-skills/debug/index.d.ts +1 -0
- package/dist/features/builtin-skills/debug/types.d.ts +229 -0
- package/dist/features/builtin-skills/deploy/index.d.ts +1 -0
- package/dist/features/builtin-skills/deploy/types.d.ts +215 -0
- package/dist/features/builtin-skills/incident/index.d.ts +4 -0
- package/dist/features/builtin-skills/incident/types.d.ts +39 -0
- package/dist/features/builtin-skills/index.d.ts +2 -0
- package/dist/features/builtin-skills/oncall/index.d.ts +1 -0
- package/dist/features/builtin-skills/oncall/types.d.ts +223 -0
- package/dist/features/builtin-skills/perf/index.d.ts +1 -0
- package/dist/features/builtin-skills/perf/types.d.ts +170 -0
- package/dist/features/builtin-skills/project/index.d.ts +1 -0
- package/dist/features/builtin-skills/project/types.d.ts +190 -0
- package/dist/features/builtin-skills/review/index.d.ts +4 -0
- package/dist/features/builtin-skills/review/types.d.ts +29 -0
- package/dist/features/builtin-skills/security/index.d.ts +4 -0
- package/dist/features/builtin-skills/security/types.d.ts +35 -0
- package/dist/features/builtin-skills/skills.d.ts +2 -0
- package/dist/features/builtin-skills/test/index.d.ts +1 -0
- package/dist/features/builtin-skills/test/types.d.ts +231 -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 +5 -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/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 +43 -0
- package/dist/features/knowledge-repo/cache.d.ts +28 -0
- package/dist/features/knowledge-repo/client.d.ts +39 -0
- package/dist/features/knowledge-repo/client.test.d.ts +1 -0
- package/dist/features/knowledge-repo/conflict-detector.d.ts +28 -0
- package/dist/features/knowledge-repo/index.d.ts +4 -0
- package/dist/features/knowledge-repo/types.d.ts +338 -0
- package/dist/features/mem0-memory/adapter.d.ts +19 -0
- package/dist/features/mem0-memory/adapter.test.d.ts +1 -0
- package/dist/features/mem0-memory/index.d.ts +3 -0
- package/dist/features/mem0-memory/layers.d.ts +29 -0
- package/dist/features/mem0-memory/layers.test.d.ts +1 -0
- package/dist/features/mem0-memory/types.d.ts +45 -0
- package/dist/features/opencode-skill-loader/index.d.ts +3 -0
- package/dist/features/opencode-skill-loader/loader.d.ts +41 -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/types.d.ts +28 -0
- package/dist/features/skill-mcp-manager/index.d.ts +2 -0
- package/dist/features/skill-mcp-manager/manager.d.ts +21 -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/google-auth.d.ts +3 -0
- package/dist/google-auth.js +1865 -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 +7 -0
- package/dist/hooks/auto-slash-command/index.d.ts +8 -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 +13 -0
- package/dist/hooks/auto-update-checker/types.d.ts +25 -0
- package/dist/hooks/background-notification/index.d.ts +12 -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 +47 -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 +182 -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/index.d.ts +27 -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 +6 -0
- package/dist/hooks/keyword-detector/detector.d.ts +11 -0
- package/dist/hooks/keyword-detector/index.d.ts +22 -0
- package/dist/hooks/keyword-detector/types.d.ts +4 -0
- package/dist/hooks/knowledge-monitor/conflict-handler.d.ts +19 -0
- package/dist/hooks/knowledge-monitor/conflict-handler.test.d.ts +1 -0
- package/dist/hooks/knowledge-monitor/constants.d.ts +8 -0
- package/dist/hooks/knowledge-monitor/index.d.ts +28 -0
- package/dist/hooks/knowledge-monitor/interruption.d.ts +18 -0
- package/dist/hooks/knowledge-monitor/types.d.ts +41 -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/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 +15 -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/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 +16 -0
- package/dist/hooks/todo-continuation-enforcer.test.d.ts +1 -0
- package/dist/hooks/tool-output-truncator.d.ts +17 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +50332 -0
- package/dist/mcp/context7.d.ts +5 -0
- package/dist/mcp/cypress.d.ts +5 -0
- package/dist/mcp/grep-app.d.ts +5 -0
- package/dist/mcp/honeycomb.d.ts +5 -0
- package/dist/mcp/index.d.ts +7 -0
- package/dist/mcp/index.test.d.ts +1 -0
- package/dist/mcp/types.d.ts +10 -0
- package/dist/mcp/vault.d.ts +5 -0
- package/dist/mcp/websearch-exa.d.ts +5 -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/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/file-reference-resolver.d.ts +1 -0
- package/dist/shared/file-utils.d.ts +6 -0
- package/dist/shared/frontmatter.d.ts +5 -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 +18 -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 +11 -0
- package/dist/shared/migration.test.d.ts +1 -0
- package/dist/shared/model-sanitizer.d.ts +3 -0
- package/dist/shared/pattern-matcher.d.ts +3 -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-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/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/index.d.ts +11 -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/knowledge/constants.d.ts +8 -0
- package/dist/tools/knowledge/index.d.ts +2 -0
- package/dist/tools/knowledge/tools.d.ts +5 -0
- package/dist/tools/knowledge/types.d.ts +79 -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 +59 -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 +10 -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 +2 -0
- package/dist/tools/slashcommand/types.d.ts +16 -0
- package/package.json +81 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { BackgroundTask, LaunchInput } from "./types";
|
|
3
|
+
interface EventProperties {
|
|
4
|
+
sessionID?: string;
|
|
5
|
+
info?: {
|
|
6
|
+
id?: string;
|
|
7
|
+
};
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
interface Event {
|
|
11
|
+
type: string;
|
|
12
|
+
properties?: EventProperties;
|
|
13
|
+
}
|
|
14
|
+
export declare class BackgroundManager {
|
|
15
|
+
private tasks;
|
|
16
|
+
private notifications;
|
|
17
|
+
private client;
|
|
18
|
+
private directory;
|
|
19
|
+
private pollingInterval?;
|
|
20
|
+
constructor(ctx: PluginInput);
|
|
21
|
+
launch(input: LaunchInput): Promise<BackgroundTask>;
|
|
22
|
+
getTask(id: string): BackgroundTask | undefined;
|
|
23
|
+
getTasksByParentSession(sessionID: string): BackgroundTask[];
|
|
24
|
+
getAllDescendantTasks(sessionID: string): BackgroundTask[];
|
|
25
|
+
findBySession(sessionID: string): BackgroundTask | undefined;
|
|
26
|
+
private checkSessionTodos;
|
|
27
|
+
handleEvent(event: Event): void;
|
|
28
|
+
markForNotification(task: BackgroundTask): void;
|
|
29
|
+
getPendingNotifications(sessionID: string): BackgroundTask[];
|
|
30
|
+
clearNotifications(sessionID: string): void;
|
|
31
|
+
private clearNotificationsForTask;
|
|
32
|
+
private startPolling;
|
|
33
|
+
private stopPolling;
|
|
34
|
+
cleanup(): void;
|
|
35
|
+
private notifyParentSession;
|
|
36
|
+
private formatDuration;
|
|
37
|
+
private hasRunningTasks;
|
|
38
|
+
private pruneStaleTasksAndNotifications;
|
|
39
|
+
private pollRunningTasks;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type BackgroundTaskStatus = "running" | "completed" | "error" | "cancelled";
|
|
2
|
+
export interface TaskProgress {
|
|
3
|
+
toolCalls: number;
|
|
4
|
+
lastTool?: string;
|
|
5
|
+
lastUpdate: Date;
|
|
6
|
+
lastMessage?: string;
|
|
7
|
+
lastMessageAt?: Date;
|
|
8
|
+
}
|
|
9
|
+
export interface BackgroundTask {
|
|
10
|
+
id: string;
|
|
11
|
+
sessionID: string;
|
|
12
|
+
parentSessionID: string;
|
|
13
|
+
parentMessageID: string;
|
|
14
|
+
description: string;
|
|
15
|
+
prompt: string;
|
|
16
|
+
agent: string;
|
|
17
|
+
status: BackgroundTaskStatus;
|
|
18
|
+
startedAt: Date;
|
|
19
|
+
completedAt?: Date;
|
|
20
|
+
result?: string;
|
|
21
|
+
error?: string;
|
|
22
|
+
progress?: TaskProgress;
|
|
23
|
+
parentModel?: {
|
|
24
|
+
providerID: string;
|
|
25
|
+
modelID: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface LaunchInput {
|
|
29
|
+
description: string;
|
|
30
|
+
prompt: string;
|
|
31
|
+
agent: string;
|
|
32
|
+
parentSessionID: string;
|
|
33
|
+
parentMessageID: string;
|
|
34
|
+
parentModel?: {
|
|
35
|
+
providerID: string;
|
|
36
|
+
modelID: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const INIT_DEEP_TEMPLATE = "# /init-deep\n\nGenerate hierarchical AGENTS.md files. Root + complexity-scored subdirectories.\n\n## Usage\n\n```\n/init-deep # Update mode: modify existing + create new where warranted\n/init-deep --create-new # Read existing \u2192 remove all \u2192 regenerate from scratch\n/init-deep --max-depth=2 # Limit directory depth (default: 3)\n```\n\n---\n\n## Workflow (High-Level)\n\n1. **Discovery + Analysis** (concurrent)\n - Fire background explore agents immediately\n - Main session: bash structure + LSP codemap + read existing AGENTS.md\n2. **Score & Decide** - Determine AGENTS.md locations from merged findings\n3. **Generate** - Root first, then subdirs in parallel\n4. **Review** - Deduplicate, trim, validate\n\n<critical>\n**TodoWrite ALL phases. Mark in_progress \u2192 completed in real-time.**\n```\nTodoWrite([\n { id: \"discovery\", content: \"Fire explore agents + LSP codemap + read existing\", status: \"pending\", priority: \"high\" },\n { id: \"scoring\", content: \"Score directories, determine locations\", status: \"pending\", priority: \"high\" },\n { id: \"generate\", content: \"Generate AGENTS.md files (root + subdirs)\", status: \"pending\", priority: \"high\" },\n { id: \"review\", content: \"Deduplicate, validate, trim\", status: \"pending\", priority: \"medium\" }\n])\n```\n</critical>\n\n---\n\n## Phase 1: Discovery + Analysis (Concurrent)\n\n**Mark \"discovery\" as in_progress.**\n\n### Fire Background Explore Agents IMMEDIATELY\n\nDon't wait\u2014these run async while main session works.\n\n```\n// Fire all at once, collect results later\nbackground_task(agent=\"explore\", prompt=\"Project structure: PREDICT standard patterns for detected language \u2192 REPORT deviations only\")\nbackground_task(agent=\"explore\", prompt=\"Entry points: FIND main files \u2192 REPORT non-standard organization\")\nbackground_task(agent=\"explore\", prompt=\"Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig) \u2192 REPORT project-specific rules\")\nbackground_task(agent=\"explore\", prompt=\"Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments \u2192 LIST forbidden patterns\")\nbackground_task(agent=\"explore\", prompt=\"Build/CI: FIND .github/workflows, Makefile \u2192 REPORT non-standard patterns\")\nbackground_task(agent=\"explore\", prompt=\"Test patterns: FIND test configs, test structure \u2192 REPORT unique conventions\")\n```\n\n<dynamic-agents>\n**DYNAMIC AGENT SPAWNING**: After bash analysis, spawn ADDITIONAL explore agents based on project scale:\n\n| Factor | Threshold | Additional Agents |\n|--------|-----------|-------------------|\n| **Total files** | >100 | +1 per 100 files |\n| **Total lines** | >10k | +1 per 10k lines |\n| **Directory depth** | \u22654 | +2 for deep exploration |\n| **Large files (>500 lines)** | >10 files | +1 for complexity hotspots |\n| **Monorepo** | detected | +1 per package/workspace |\n| **Multiple languages** | >1 | +1 per language |\n\n```bash\n# Measure project scale first\ntotal_files=$(find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' | wc -l)\ntotal_lines=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" -o -name \"*.go\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | tail -1 | awk '{print $1}')\nlarge_files=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | awk '$1 > 500 {count++} END {print count+0}')\nmax_depth=$(find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' | awk -F/ '{print NF}' | sort -rn | head -1)\n```\n\nExample spawning:\n```\n// 500 files, 50k lines, depth 6, 15 large files \u2192 spawn 5+5+2+1 = 13 additional agents\nbackground_task(agent=\"explore\", prompt=\"Large file analysis: FIND files >500 lines, REPORT complexity hotspots\")\nbackground_task(agent=\"explore\", prompt=\"Deep modules at depth 4+: FIND hidden patterns, internal conventions\")\nbackground_task(agent=\"explore\", prompt=\"Cross-cutting concerns: FIND shared utilities across directories\")\n// ... more based on calculation\n```\n</dynamic-agents>\n\n### Main Session: Concurrent Analysis\n\n**While background agents run**, main session does:\n\n#### 1. Bash Structural Analysis\n```bash\n# Directory depth + file counts\nfind . -type d -not -path '*/\\.*' -not -path '*/node_modules/*' -not -path '*/venv/*' -not -path '*/dist/*' -not -path '*/build/*' | awk -F/ '{print NF-1}' | sort -n | uniq -c\n\n# Files per directory (top 30)\nfind . -type f -not -path '*/\\.*' -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -30\n\n# Code concentration by extension\nfind . -type f \\( -name \"*.py\" -o -name \"*.ts\" -o -name \"*.tsx\" -o -name \"*.js\" -o -name \"*.go\" -o -name \"*.rs\" \\) -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20\n\n# Existing AGENTS.md / CLAUDE.md\nfind . -type f \\( -name \"AGENTS.md\" -o -name \"CLAUDE.md\" \\) -not -path '*/node_modules/*' 2>/dev/null\n```\n\n#### 2. Read Existing AGENTS.md\n```\nFor each existing file found:\n Read(filePath=file)\n Extract: key insights, conventions, anti-patterns\n Store in EXISTING_AGENTS map\n```\n\nIf `--create-new`: Read all existing first (preserve context) \u2192 then delete all \u2192 regenerate.\n\n#### 3. LSP Codemap (if available)\n```\nlsp_servers() # Check availability\n\n# Entry points (parallel)\nlsp_document_symbols(filePath=\"src/index.ts\")\nlsp_document_symbols(filePath=\"main.py\")\n\n# Key symbols (parallel)\nlsp_workspace_symbols(filePath=\".\", query=\"class\")\nlsp_workspace_symbols(filePath=\".\", query=\"interface\")\nlsp_workspace_symbols(filePath=\".\", query=\"function\")\n\n# Centrality for top exports\nlsp_find_references(filePath=\"...\", line=X, character=Y)\n```\n\n**LSP Fallback**: If unavailable, rely on explore agents + AST-grep.\n\n### Collect Background Results\n\n```\n// After main session analysis done, collect all task results\nfor each task_id: background_output(task_id=\"...\")\n```\n\n**Merge: bash + LSP + existing + explore findings. Mark \"discovery\" as completed.**\n\n---\n\n## Phase 2: Scoring & Location Decision\n\n**Mark \"scoring\" as in_progress.**\n\n### Scoring Matrix\n\n| Factor | Weight | High Threshold | Source |\n|--------|--------|----------------|--------|\n| File count | 3x | >20 | bash |\n| Subdir count | 2x | >5 | bash |\n| Code ratio | 2x | >70% | bash |\n| Unique patterns | 1x | Has own config | explore |\n| Module boundary | 2x | Has index.ts/__init__.py | bash |\n| Symbol density | 2x | >30 symbols | LSP |\n| Export count | 2x | >10 exports | LSP |\n| Reference centrality | 3x | >20 refs | LSP |\n\n### Decision Rules\n\n| Score | Action |\n|-------|--------|\n| **Root (.)** | ALWAYS create |\n| **>15** | Create AGENTS.md |\n| **8-15** | Create if distinct domain |\n| **<8** | Skip (parent covers) |\n\n### Output\n```\nAGENTS_LOCATIONS = [\n { path: \".\", type: \"root\" },\n { path: \"src/hooks\", score: 18, reason: \"high complexity\" },\n { path: \"src/api\", score: 12, reason: \"distinct domain\" }\n]\n```\n\n**Mark \"scoring\" as completed.**\n\n---\n\n## Phase 3: Generate AGENTS.md\n\n**Mark \"generate\" as in_progress.**\n\n### Root AGENTS.md (Full Treatment)\n\n```markdown\n# PROJECT KNOWLEDGE BASE\n\n**Generated:** {TIMESTAMP}\n**Commit:** {SHORT_SHA}\n**Branch:** {BRANCH}\n\n## OVERVIEW\n{1-2 sentences: what + core stack}\n\n## STRUCTURE\n\\`\\`\\`\n{root}/\n\u251C\u2500\u2500 {dir}/ # {non-obvious purpose only}\n\u2514\u2500\u2500 {entry}\n\\`\\`\\`\n\n## WHERE TO LOOK\n| Task | Location | Notes |\n|------|----------|-------|\n\n## CODE MAP\n{From LSP - skip if unavailable or project <10 files}\n\n| Symbol | Type | Location | Refs | Role |\n|--------|------|----------|------|------|\n\n## CONVENTIONS\n{ONLY deviations from standard}\n\n## ANTI-PATTERNS (THIS PROJECT)\n{Explicitly forbidden here}\n\n## UNIQUE STYLES\n{Project-specific}\n\n## COMMANDS\n\\`\\`\\`bash\n{dev/test/build}\n\\`\\`\\`\n\n## NOTES\n{Gotchas}\n```\n\n**Quality gates**: 50-150 lines, no generic advice, no obvious info.\n\n### Subdirectory AGENTS.md (Parallel)\n\nLaunch document-writer agents for each location:\n\n```\nfor loc in AGENTS_LOCATIONS (except root):\n background_task(agent=\"document-writer\", prompt=\\`\n Generate AGENTS.md for: ${loc.path}\n - Reason: ${loc.reason}\n - 30-80 lines max\n - NEVER repeat parent content\n - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS\n \\`)\n```\n\n**Wait for all. Mark \"generate\" as completed.**\n\n---\n\n## Phase 4: Review & Deduplicate\n\n**Mark \"review\" as in_progress.**\n\nFor each generated file:\n- Remove generic advice\n- Remove parent duplicates\n- Trim to size limits\n- Verify telegraphic style\n\n**Mark \"review\" as completed.**\n\n---\n\n## Final Report\n\n```\n=== init-deep Complete ===\n\nMode: {update | create-new}\n\nFiles:\n \u2713 ./AGENTS.md (root, {N} lines)\n \u2713 ./src/hooks/AGENTS.md ({N} lines)\n\nDirs Analyzed: {N}\nAGENTS.md Created: {N}\nAGENTS.md Updated: {N}\n\nHierarchy:\n ./AGENTS.md\n \u2514\u2500\u2500 src/hooks/AGENTS.md\n```\n\n---\n\n## Anti-Patterns\n\n- **Static agent count**: MUST vary agents based on project size/depth\n- **Sequential execution**: MUST parallel (explore + LSP concurrent)\n- **Ignoring existing**: ALWAYS read existing first, even with --create-new\n- **Over-documenting**: Not every dir needs AGENTS.md\n- **Redundancy**: Child never repeats parent\n- **Generic content**: Remove anything that applies to ALL projects\n- **Verbose style**: Telegraphic or die";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const RALPH_LOOP_TEMPLATE = "You are starting a Ralph Loop - a self-referential development loop that runs until task completion.\n\n## How Ralph Loop Works\n\n1. You will work on the task continuously\n2. When you believe the task is FULLY complete, output: `<promise>{{COMPLETION_PROMISE}}</promise>`\n3. If you don't output the promise, the loop will automatically inject another prompt to continue\n4. Maximum iterations: Configurable (default 100)\n\n## Rules\n\n- Focus on completing the task fully, not partially\n- Don't output the completion promise until the task is truly done\n- Each iteration should make meaningful progress toward the goal\n- If stuck, try different approaches\n- Use todos to track your progress\n\n## Exit Conditions\n\n1. **Completion**: Output `<promise>DONE</promise>` (or custom promise text) when fully complete\n2. **Max Iterations**: Loop stops automatically at limit\n3. **Cancel**: User runs `/cancel-ralph` command\n\n## Your Task\n\nParse the arguments below and begin working on the task. The format is:\n`\"task description\" [--completion-promise=TEXT] [--max-iterations=N]`\n\nDefault completion promise is \"DONE\" and default max iterations is 100.";
|
|
2
|
+
export declare const CANCEL_RALPH_TEMPLATE = "Cancel the currently active Ralph Loop.\n\nThis will:\n1. Stop the loop from continuing\n2. Clear the loop state file\n3. Allow the session to end normally\n\nCheck if a loop is active and cancel it. Inform the user of the result.";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CommandDefinition } from "../claude-code-command-loader";
|
|
2
|
+
export type BuiltinCommandName = "init-deep" | "ralph-loop" | "cancel-ralph";
|
|
3
|
+
export interface BuiltinCommandConfig {
|
|
4
|
+
disabled_commands?: BuiltinCommandName[];
|
|
5
|
+
}
|
|
6
|
+
export type BuiltinCommands = Record<string, CommandDefinition>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types";
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
export type ApiSubcommand = "design" | "document" | "validate" | "generate" | "test" | "mock" | "diff" | "lint";
|
|
2
|
+
export type ApiSpecFormat = "openapi3" | "openapi2" | "asyncapi" | "graphql" | "grpc" | "json-schema";
|
|
3
|
+
export type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4
|
+
export interface DesignInput {
|
|
5
|
+
description: string;
|
|
6
|
+
style?: "rest" | "graphql" | "grpc" | "event-driven";
|
|
7
|
+
version?: string;
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface DesignResult {
|
|
11
|
+
spec: string;
|
|
12
|
+
format: ApiSpecFormat;
|
|
13
|
+
endpoints: EndpointSummary[];
|
|
14
|
+
schemas: SchemaSummary[];
|
|
15
|
+
suggestions?: DesignSuggestion[];
|
|
16
|
+
}
|
|
17
|
+
export interface EndpointSummary {
|
|
18
|
+
method: HttpMethod;
|
|
19
|
+
path: string;
|
|
20
|
+
operationId: string;
|
|
21
|
+
summary: string;
|
|
22
|
+
tags?: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface SchemaSummary {
|
|
25
|
+
name: string;
|
|
26
|
+
type: "object" | "array" | "enum" | "union";
|
|
27
|
+
properties?: number;
|
|
28
|
+
required?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface DesignSuggestion {
|
|
31
|
+
type: "naming" | "structure" | "security" | "versioning" | "pagination";
|
|
32
|
+
message: string;
|
|
33
|
+
location?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface DocumentInput {
|
|
36
|
+
source: string;
|
|
37
|
+
format?: ApiSpecFormat;
|
|
38
|
+
outputFormat?: "markdown" | "html" | "pdf";
|
|
39
|
+
includeExamples?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface DocumentResult {
|
|
42
|
+
documentation: string;
|
|
43
|
+
format: string;
|
|
44
|
+
sections: DocSection[];
|
|
45
|
+
}
|
|
46
|
+
export interface DocSection {
|
|
47
|
+
title: string;
|
|
48
|
+
anchor: string;
|
|
49
|
+
level: number;
|
|
50
|
+
content?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface ValidateInput {
|
|
53
|
+
spec: string;
|
|
54
|
+
format?: ApiSpecFormat;
|
|
55
|
+
rules?: string[];
|
|
56
|
+
severity?: "error" | "warning" | "info";
|
|
57
|
+
}
|
|
58
|
+
export interface ValidateResult {
|
|
59
|
+
valid: boolean;
|
|
60
|
+
errors: ValidationIssue[];
|
|
61
|
+
warnings: ValidationIssue[];
|
|
62
|
+
info: ValidationIssue[];
|
|
63
|
+
score?: number;
|
|
64
|
+
}
|
|
65
|
+
export interface ValidationIssue {
|
|
66
|
+
code: string;
|
|
67
|
+
message: string;
|
|
68
|
+
path: string;
|
|
69
|
+
line?: number;
|
|
70
|
+
severity: "error" | "warning" | "info";
|
|
71
|
+
suggestion?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface GenerateInput {
|
|
74
|
+
spec: string;
|
|
75
|
+
target: "client" | "server" | "types" | "mocks";
|
|
76
|
+
language: string;
|
|
77
|
+
framework?: string;
|
|
78
|
+
outputPath?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface GenerateResult {
|
|
81
|
+
files: GeneratedFile[];
|
|
82
|
+
language: string;
|
|
83
|
+
framework?: string;
|
|
84
|
+
}
|
|
85
|
+
export interface GeneratedFile {
|
|
86
|
+
path: string;
|
|
87
|
+
content: string;
|
|
88
|
+
type: "code" | "config" | "types";
|
|
89
|
+
}
|
|
90
|
+
export interface TestInput {
|
|
91
|
+
spec: string;
|
|
92
|
+
baseUrl: string;
|
|
93
|
+
auth?: AuthConfig;
|
|
94
|
+
coverage?: boolean;
|
|
95
|
+
}
|
|
96
|
+
export interface AuthConfig {
|
|
97
|
+
type: "bearer" | "basic" | "apikey" | "oauth2";
|
|
98
|
+
credentials: Record<string, string>;
|
|
99
|
+
}
|
|
100
|
+
export interface TestResult {
|
|
101
|
+
total: number;
|
|
102
|
+
passed: number;
|
|
103
|
+
failed: number;
|
|
104
|
+
skipped: number;
|
|
105
|
+
duration: number;
|
|
106
|
+
results: EndpointTestResult[];
|
|
107
|
+
coverage?: CoverageReport;
|
|
108
|
+
}
|
|
109
|
+
export interface EndpointTestResult {
|
|
110
|
+
endpoint: string;
|
|
111
|
+
method: HttpMethod;
|
|
112
|
+
status: "passed" | "failed" | "skipped";
|
|
113
|
+
duration: number;
|
|
114
|
+
statusCode?: number;
|
|
115
|
+
error?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface CoverageReport {
|
|
118
|
+
endpoints: {
|
|
119
|
+
covered: number;
|
|
120
|
+
total: number;
|
|
121
|
+
percent: number;
|
|
122
|
+
};
|
|
123
|
+
methods: {
|
|
124
|
+
covered: number;
|
|
125
|
+
total: number;
|
|
126
|
+
percent: number;
|
|
127
|
+
};
|
|
128
|
+
statusCodes: {
|
|
129
|
+
covered: number;
|
|
130
|
+
total: number;
|
|
131
|
+
percent: number;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export interface MockInput {
|
|
135
|
+
spec: string;
|
|
136
|
+
port?: number;
|
|
137
|
+
delay?: number;
|
|
138
|
+
dynamic?: boolean;
|
|
139
|
+
}
|
|
140
|
+
export interface MockResult {
|
|
141
|
+
url: string;
|
|
142
|
+
port: number;
|
|
143
|
+
endpoints: number;
|
|
144
|
+
status: "running" | "stopped";
|
|
145
|
+
}
|
|
146
|
+
export interface DiffInput {
|
|
147
|
+
oldSpec: string;
|
|
148
|
+
newSpec: string;
|
|
149
|
+
format?: "text" | "json" | "markdown";
|
|
150
|
+
}
|
|
151
|
+
export interface DiffResult {
|
|
152
|
+
breaking: ApiChange[];
|
|
153
|
+
nonBreaking: ApiChange[];
|
|
154
|
+
summary: DiffSummary;
|
|
155
|
+
}
|
|
156
|
+
export interface ApiChange {
|
|
157
|
+
type: "added" | "removed" | "modified" | "deprecated";
|
|
158
|
+
path: string;
|
|
159
|
+
description: string;
|
|
160
|
+
breaking: boolean;
|
|
161
|
+
}
|
|
162
|
+
export interface DiffSummary {
|
|
163
|
+
added: number;
|
|
164
|
+
removed: number;
|
|
165
|
+
modified: number;
|
|
166
|
+
deprecated: number;
|
|
167
|
+
breakingChanges: number;
|
|
168
|
+
}
|
|
169
|
+
export interface LintInput {
|
|
170
|
+
spec: string;
|
|
171
|
+
ruleset?: string;
|
|
172
|
+
fix?: boolean;
|
|
173
|
+
}
|
|
174
|
+
export interface LintResult {
|
|
175
|
+
issues: LintIssue[];
|
|
176
|
+
fixed?: number;
|
|
177
|
+
score: number;
|
|
178
|
+
}
|
|
179
|
+
export interface LintIssue {
|
|
180
|
+
rule: string;
|
|
181
|
+
message: string;
|
|
182
|
+
path: string;
|
|
183
|
+
severity: "error" | "warning" | "info";
|
|
184
|
+
fixable: boolean;
|
|
185
|
+
}
|
|
186
|
+
export interface ApiConfig {
|
|
187
|
+
defaultFormat?: ApiSpecFormat;
|
|
188
|
+
lintRuleset?: string;
|
|
189
|
+
generateDefaults?: {
|
|
190
|
+
language?: string;
|
|
191
|
+
framework?: string;
|
|
192
|
+
};
|
|
193
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types";
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export type CodeIndexSubcommand = "search" | "similar" | "index" | "status" | "symbols" | "references" | "dependencies" | "explain";
|
|
2
|
+
export type IndexLanguage = "typescript" | "javascript" | "python" | "rust" | "go" | "java" | "kotlin" | "csharp" | "cpp" | "c" | "ruby" | "php" | "swift" | "scala";
|
|
3
|
+
export interface SearchInput {
|
|
4
|
+
query: string;
|
|
5
|
+
semantic?: boolean;
|
|
6
|
+
language?: IndexLanguage;
|
|
7
|
+
paths?: string[];
|
|
8
|
+
limit?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface SearchResult {
|
|
11
|
+
filePath: string;
|
|
12
|
+
line: number;
|
|
13
|
+
column: number;
|
|
14
|
+
snippet: string;
|
|
15
|
+
score: number;
|
|
16
|
+
symbolName?: string;
|
|
17
|
+
symbolKind?: SymbolKind;
|
|
18
|
+
}
|
|
19
|
+
export type SymbolKind = "function" | "method" | "class" | "interface" | "type" | "variable" | "constant" | "enum" | "module" | "namespace";
|
|
20
|
+
export interface SimilarInput {
|
|
21
|
+
filePath: string;
|
|
22
|
+
line?: number;
|
|
23
|
+
symbolName?: string;
|
|
24
|
+
limit?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface SimilarResult {
|
|
27
|
+
filePath: string;
|
|
28
|
+
symbolName: string;
|
|
29
|
+
symbolKind: SymbolKind;
|
|
30
|
+
similarity: number;
|
|
31
|
+
snippet: string;
|
|
32
|
+
}
|
|
33
|
+
export interface IndexInput {
|
|
34
|
+
paths?: string[];
|
|
35
|
+
languages?: IndexLanguage[];
|
|
36
|
+
force?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface IndexStatus {
|
|
39
|
+
indexed: boolean;
|
|
40
|
+
lastIndexedAt?: string;
|
|
41
|
+
fileCount: number;
|
|
42
|
+
symbolCount: number;
|
|
43
|
+
languages: IndexLanguage[];
|
|
44
|
+
vectorDbStatus: "connected" | "disconnected" | "indexing";
|
|
45
|
+
}
|
|
46
|
+
export interface SymbolInfo {
|
|
47
|
+
name: string;
|
|
48
|
+
kind: SymbolKind;
|
|
49
|
+
filePath: string;
|
|
50
|
+
line: number;
|
|
51
|
+
column: number;
|
|
52
|
+
signature?: string;
|
|
53
|
+
documentation?: string;
|
|
54
|
+
references: number;
|
|
55
|
+
}
|
|
56
|
+
export interface DependencyInfo {
|
|
57
|
+
name: string;
|
|
58
|
+
version?: string;
|
|
59
|
+
usedBy: string[];
|
|
60
|
+
imports: string[];
|
|
61
|
+
}
|
|
62
|
+
export interface ExplainInput {
|
|
63
|
+
filePath: string;
|
|
64
|
+
line?: number;
|
|
65
|
+
symbolName?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface ExplainResult {
|
|
68
|
+
summary: string;
|
|
69
|
+
purpose: string;
|
|
70
|
+
inputs?: ParameterInfo[];
|
|
71
|
+
outputs?: string;
|
|
72
|
+
sideEffects?: string[];
|
|
73
|
+
relatedSymbols: string[];
|
|
74
|
+
usageExamples?: string[];
|
|
75
|
+
}
|
|
76
|
+
export interface ParameterInfo {
|
|
77
|
+
name: string;
|
|
78
|
+
type: string;
|
|
79
|
+
description?: string;
|
|
80
|
+
optional?: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface CodeIndexConfig {
|
|
83
|
+
qdrant?: {
|
|
84
|
+
url: string;
|
|
85
|
+
apiKey?: string;
|
|
86
|
+
collectionName?: string;
|
|
87
|
+
};
|
|
88
|
+
chroma?: {
|
|
89
|
+
url?: string;
|
|
90
|
+
collectionName?: string;
|
|
91
|
+
};
|
|
92
|
+
embeddingModel?: string;
|
|
93
|
+
excludePaths?: string[];
|
|
94
|
+
includeTests?: boolean;
|
|
95
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types";
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
export type DbSubcommand = "query" | "schema" | "migrate" | "analyze" | "optimize" | "explain" | "backup" | "seed";
|
|
2
|
+
export type DbType = "postgresql" | "mysql" | "sqlite" | "mongodb" | "redis" | "elasticsearch" | "dynamodb";
|
|
3
|
+
export interface QueryInput {
|
|
4
|
+
query: string;
|
|
5
|
+
database?: string;
|
|
6
|
+
params?: unknown[];
|
|
7
|
+
limit?: number;
|
|
8
|
+
format?: "table" | "json" | "csv";
|
|
9
|
+
}
|
|
10
|
+
export interface QueryResult {
|
|
11
|
+
rows: Record<string, unknown>[];
|
|
12
|
+
rowCount: number;
|
|
13
|
+
duration: number;
|
|
14
|
+
columns: ColumnInfo[];
|
|
15
|
+
}
|
|
16
|
+
export interface ColumnInfo {
|
|
17
|
+
name: string;
|
|
18
|
+
type: string;
|
|
19
|
+
nullable: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface SchemaInput {
|
|
22
|
+
database?: string;
|
|
23
|
+
table?: string;
|
|
24
|
+
action?: "show" | "create" | "alter" | "drop";
|
|
25
|
+
}
|
|
26
|
+
export interface SchemaResult {
|
|
27
|
+
tables: TableSchema[];
|
|
28
|
+
views?: ViewSchema[];
|
|
29
|
+
indexes?: IndexSchema[];
|
|
30
|
+
constraints?: ConstraintSchema[];
|
|
31
|
+
}
|
|
32
|
+
export interface TableSchema {
|
|
33
|
+
name: string;
|
|
34
|
+
columns: ColumnSchema[];
|
|
35
|
+
primaryKey?: string[];
|
|
36
|
+
indexes?: IndexSchema[];
|
|
37
|
+
foreignKeys?: ForeignKeySchema[];
|
|
38
|
+
}
|
|
39
|
+
export interface ColumnSchema {
|
|
40
|
+
name: string;
|
|
41
|
+
type: string;
|
|
42
|
+
nullable: boolean;
|
|
43
|
+
defaultValue?: string;
|
|
44
|
+
autoIncrement?: boolean;
|
|
45
|
+
comment?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface ViewSchema {
|
|
48
|
+
name: string;
|
|
49
|
+
definition: string;
|
|
50
|
+
columns: string[];
|
|
51
|
+
}
|
|
52
|
+
export interface IndexSchema {
|
|
53
|
+
name: string;
|
|
54
|
+
table: string;
|
|
55
|
+
columns: string[];
|
|
56
|
+
unique: boolean;
|
|
57
|
+
type?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface ConstraintSchema {
|
|
60
|
+
name: string;
|
|
61
|
+
type: "primary" | "foreign" | "unique" | "check";
|
|
62
|
+
table: string;
|
|
63
|
+
columns: string[];
|
|
64
|
+
reference?: {
|
|
65
|
+
table: string;
|
|
66
|
+
columns: string[];
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export interface ForeignKeySchema {
|
|
70
|
+
name: string;
|
|
71
|
+
columns: string[];
|
|
72
|
+
referencedTable: string;
|
|
73
|
+
referencedColumns: string[];
|
|
74
|
+
onDelete?: string;
|
|
75
|
+
onUpdate?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface MigrateInput {
|
|
78
|
+
action: "status" | "up" | "down" | "create" | "generate";
|
|
79
|
+
name?: string;
|
|
80
|
+
steps?: number;
|
|
81
|
+
dryRun?: boolean;
|
|
82
|
+
}
|
|
83
|
+
export interface MigrateResult {
|
|
84
|
+
action: string;
|
|
85
|
+
migrations: MigrationInfo[];
|
|
86
|
+
applied?: number;
|
|
87
|
+
pending?: number;
|
|
88
|
+
}
|
|
89
|
+
export interface MigrationInfo {
|
|
90
|
+
id: string;
|
|
91
|
+
name: string;
|
|
92
|
+
status: "applied" | "pending" | "failed";
|
|
93
|
+
appliedAt?: string;
|
|
94
|
+
duration?: number;
|
|
95
|
+
}
|
|
96
|
+
export interface AnalyzeInput {
|
|
97
|
+
table?: string;
|
|
98
|
+
query?: string;
|
|
99
|
+
includeSlowQueries?: boolean;
|
|
100
|
+
}
|
|
101
|
+
export interface AnalyzeResult {
|
|
102
|
+
statistics: TableStats[];
|
|
103
|
+
slowQueries?: SlowQuery[];
|
|
104
|
+
recommendations: DbRecommendation[];
|
|
105
|
+
}
|
|
106
|
+
export interface TableStats {
|
|
107
|
+
table: string;
|
|
108
|
+
rowCount: number;
|
|
109
|
+
sizeBytes: number;
|
|
110
|
+
indexSizeBytes: number;
|
|
111
|
+
lastAnalyzed?: string;
|
|
112
|
+
bloatPercent?: number;
|
|
113
|
+
}
|
|
114
|
+
export interface SlowQuery {
|
|
115
|
+
query: string;
|
|
116
|
+
duration: number;
|
|
117
|
+
frequency: number;
|
|
118
|
+
lastExecuted: string;
|
|
119
|
+
suggestions?: string[];
|
|
120
|
+
}
|
|
121
|
+
export interface DbRecommendation {
|
|
122
|
+
type: "index" | "query" | "schema" | "maintenance";
|
|
123
|
+
priority: "high" | "medium" | "low";
|
|
124
|
+
table?: string;
|
|
125
|
+
message: string;
|
|
126
|
+
sql?: string;
|
|
127
|
+
}
|
|
128
|
+
export interface OptimizeInput {
|
|
129
|
+
target: "query" | "table" | "index";
|
|
130
|
+
query?: string;
|
|
131
|
+
table?: string;
|
|
132
|
+
}
|
|
133
|
+
export interface OptimizeResult {
|
|
134
|
+
original?: string;
|
|
135
|
+
optimized?: string;
|
|
136
|
+
improvement?: number;
|
|
137
|
+
suggestions: OptimizeSuggestion[];
|
|
138
|
+
}
|
|
139
|
+
export interface OptimizeSuggestion {
|
|
140
|
+
type: string;
|
|
141
|
+
description: string;
|
|
142
|
+
impact: "high" | "medium" | "low";
|
|
143
|
+
sql?: string;
|
|
144
|
+
}
|
|
145
|
+
export interface ExplainInput {
|
|
146
|
+
query: string;
|
|
147
|
+
analyze?: boolean;
|
|
148
|
+
format?: "text" | "json" | "yaml";
|
|
149
|
+
}
|
|
150
|
+
export interface ExplainResult {
|
|
151
|
+
plan: QueryPlan;
|
|
152
|
+
cost: number;
|
|
153
|
+
rows: number;
|
|
154
|
+
actualTime?: number;
|
|
155
|
+
warnings?: string[];
|
|
156
|
+
}
|
|
157
|
+
export interface QueryPlan {
|
|
158
|
+
operation: string;
|
|
159
|
+
details: string;
|
|
160
|
+
cost: number;
|
|
161
|
+
rows: number;
|
|
162
|
+
children?: QueryPlan[];
|
|
163
|
+
actualTime?: number;
|
|
164
|
+
loops?: number;
|
|
165
|
+
}
|
|
166
|
+
export interface BackupInput {
|
|
167
|
+
target: string;
|
|
168
|
+
format?: "sql" | "binary" | "archive";
|
|
169
|
+
compress?: boolean;
|
|
170
|
+
tables?: string[];
|
|
171
|
+
}
|
|
172
|
+
export interface BackupResult {
|
|
173
|
+
path: string;
|
|
174
|
+
size: number;
|
|
175
|
+
duration: number;
|
|
176
|
+
tables: number;
|
|
177
|
+
rows: number;
|
|
178
|
+
}
|
|
179
|
+
export interface SeedInput {
|
|
180
|
+
source: string;
|
|
181
|
+
table?: string;
|
|
182
|
+
truncate?: boolean;
|
|
183
|
+
count?: number;
|
|
184
|
+
}
|
|
185
|
+
export interface SeedResult {
|
|
186
|
+
tables: SeedTableResult[];
|
|
187
|
+
totalRows: number;
|
|
188
|
+
duration: number;
|
|
189
|
+
}
|
|
190
|
+
export interface SeedTableResult {
|
|
191
|
+
table: string;
|
|
192
|
+
inserted: number;
|
|
193
|
+
errors: number;
|
|
194
|
+
}
|
|
195
|
+
export interface DbConfig {
|
|
196
|
+
connections?: Record<string, ConnectionConfig>;
|
|
197
|
+
defaultConnection?: string;
|
|
198
|
+
migrationsPath?: string;
|
|
199
|
+
seedsPath?: string;
|
|
200
|
+
}
|
|
201
|
+
export interface ConnectionConfig {
|
|
202
|
+
type: DbType;
|
|
203
|
+
host?: string;
|
|
204
|
+
port?: number;
|
|
205
|
+
database: string;
|
|
206
|
+
user?: string;
|
|
207
|
+
password?: string;
|
|
208
|
+
ssl?: boolean;
|
|
209
|
+
uri?: string;
|
|
210
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types";
|