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,28 @@
|
|
|
1
|
+
import type { KnowledgeCommit, KnowledgeManifest } from "./types";
|
|
2
|
+
interface CacheConfig {
|
|
3
|
+
memoryEnabled: boolean;
|
|
4
|
+
diskEnabled: boolean;
|
|
5
|
+
ttlMs: number;
|
|
6
|
+
diskCacheDir: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class KnowledgeCache {
|
|
9
|
+
private config;
|
|
10
|
+
private memoryCache;
|
|
11
|
+
private initialized;
|
|
12
|
+
constructor(config: Partial<CacheConfig> & {
|
|
13
|
+
diskCacheDir: string;
|
|
14
|
+
});
|
|
15
|
+
initialize(): Promise<void>;
|
|
16
|
+
getCommit(id: string): Promise<KnowledgeCommit | null>;
|
|
17
|
+
setCommit(commit: KnowledgeCommit): Promise<void>;
|
|
18
|
+
getManifest(): Promise<KnowledgeManifest | null>;
|
|
19
|
+
setManifest(manifest: KnowledgeManifest): Promise<void>;
|
|
20
|
+
invalidateCommit(id: string): Promise<void>;
|
|
21
|
+
invalidateManifest(): Promise<void>;
|
|
22
|
+
clear(): Promise<void>;
|
|
23
|
+
private get;
|
|
24
|
+
private set;
|
|
25
|
+
private invalidate;
|
|
26
|
+
private getDiskPath;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { KnowledgeCommit, KnowledgeLayer, KnowledgeType, KnowledgeAuthor, KnowledgeManifest, KnowledgeQueryFilter, KnowledgeQueryResult, PromotionRequest, PromotionRecord, KnowledgeRepositoryConfig, RepositoryStats, Constraint, Severity, KnowledgeMetadata } from "./types";
|
|
2
|
+
export declare class KnowledgeRepository {
|
|
3
|
+
private config;
|
|
4
|
+
private commitsDir;
|
|
5
|
+
private manifestPath;
|
|
6
|
+
private promotionsDir;
|
|
7
|
+
constructor(config: KnowledgeRepositoryConfig);
|
|
8
|
+
initialize(): Promise<void>;
|
|
9
|
+
createCommit(params: {
|
|
10
|
+
type: KnowledgeType;
|
|
11
|
+
title: string;
|
|
12
|
+
content: string;
|
|
13
|
+
layer: KnowledgeLayer;
|
|
14
|
+
severity: Severity;
|
|
15
|
+
constraints?: Constraint[];
|
|
16
|
+
metadata?: KnowledgeMetadata;
|
|
17
|
+
author: KnowledgeAuthor;
|
|
18
|
+
tags?: string[];
|
|
19
|
+
triggerKeywords?: string[];
|
|
20
|
+
parentId?: string;
|
|
21
|
+
}): Promise<KnowledgeCommit>;
|
|
22
|
+
getCommit(layer: KnowledgeLayer, id: string): Promise<KnowledgeCommit | null>;
|
|
23
|
+
getCommitById(id: string): Promise<KnowledgeCommit | null>;
|
|
24
|
+
query(filter: KnowledgeQueryFilter): Promise<KnowledgeQueryResult>;
|
|
25
|
+
getManifest(): Promise<KnowledgeManifest>;
|
|
26
|
+
rebuildManifest(): Promise<KnowledgeManifest>;
|
|
27
|
+
promote(request: PromotionRequest): Promise<PromotionRecord>;
|
|
28
|
+
getHistory(id: string): Promise<KnowledgeCommit[]>;
|
|
29
|
+
getStats(): Promise<RepositoryStats>;
|
|
30
|
+
findByKeyword(keyword: string): Promise<KnowledgeCommit[]>;
|
|
31
|
+
getMergedKnowledge(layer: KnowledgeLayer): Promise<KnowledgeCommit[]>;
|
|
32
|
+
private getCommitPath;
|
|
33
|
+
private generateCommitId;
|
|
34
|
+
private generateSummary;
|
|
35
|
+
private commitToManifestEntry;
|
|
36
|
+
private createEmptyManifest;
|
|
37
|
+
private updateManifest;
|
|
38
|
+
private normalizeFilter;
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ConstraintViolation, KnowledgeCommit, Severity } from "./types";
|
|
2
|
+
interface DetectionContext {
|
|
3
|
+
projectRoot: string;
|
|
4
|
+
targetFiles?: string[];
|
|
5
|
+
}
|
|
6
|
+
interface DetectionResult {
|
|
7
|
+
violations: ConstraintViolation[];
|
|
8
|
+
filesScanned: number;
|
|
9
|
+
constraintsChecked: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class ConflictDetector {
|
|
12
|
+
detect(commits: KnowledgeCommit[], context: DetectionContext): Promise<DetectionResult>;
|
|
13
|
+
checkFile(commits: KnowledgeCommit[], filePath: string, context: DetectionContext): Promise<ConstraintViolation[]>;
|
|
14
|
+
private shouldApplyConstraint;
|
|
15
|
+
private checkConstraint;
|
|
16
|
+
private checkMustNotUse;
|
|
17
|
+
private checkMustUse;
|
|
18
|
+
private checkMustMatch;
|
|
19
|
+
private checkMustNotMatch;
|
|
20
|
+
private checkMustExist;
|
|
21
|
+
private checkMustNotExist;
|
|
22
|
+
private createViolation;
|
|
23
|
+
private generateRemediation;
|
|
24
|
+
private collectFiles;
|
|
25
|
+
}
|
|
26
|
+
export declare function groupViolationsBySeverity(violations: ConstraintViolation[]): Record<Severity, ConstraintViolation[]>;
|
|
27
|
+
export declare function hasBlockingViolations(violations: ConstraintViolation[]): boolean;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Repository Types
|
|
3
|
+
*
|
|
4
|
+
* Git-like immutable knowledge storage with hierarchical layers.
|
|
5
|
+
* Supports ADRs, Policies, Patterns, and Specs with constraint-based conflict detection.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Hierarchical layers for knowledge organization.
|
|
9
|
+
* Lower layers inherit from and can override higher layers.
|
|
10
|
+
*/
|
|
11
|
+
export type KnowledgeLayer = "company" | "org" | "project";
|
|
12
|
+
/**
|
|
13
|
+
* Severity levels for policy enforcement.
|
|
14
|
+
* - info: Informational, no action required
|
|
15
|
+
* - warn: Warning, agent should acknowledge
|
|
16
|
+
* - block: Blocking, agent must stop and report violation
|
|
17
|
+
*/
|
|
18
|
+
export type Severity = "info" | "warn" | "block";
|
|
19
|
+
/**
|
|
20
|
+
* Types of knowledge artifacts.
|
|
21
|
+
* - adr: Architectural Decision Record
|
|
22
|
+
* - policy: Organizational policy with enforcement rules
|
|
23
|
+
* - pattern: Reusable code/design pattern
|
|
24
|
+
* - spec: Technical specification
|
|
25
|
+
*/
|
|
26
|
+
export type KnowledgeType = "adr" | "policy" | "pattern" | "spec";
|
|
27
|
+
/**
|
|
28
|
+
* Status of an ADR (Architectural Decision Record).
|
|
29
|
+
*/
|
|
30
|
+
export type ADRStatus = "proposed" | "accepted" | "deprecated" | "superseded";
|
|
31
|
+
/**
|
|
32
|
+
* Constraint operators for the DSL.
|
|
33
|
+
*/
|
|
34
|
+
export type ConstraintOperator = "must_not_use" | "must_use" | "must_match" | "must_not_match" | "must_exist" | "must_not_exist";
|
|
35
|
+
/**
|
|
36
|
+
* Constraint target types.
|
|
37
|
+
*/
|
|
38
|
+
export type ConstraintTarget = "file" | "code" | "dependency" | "import" | "config";
|
|
39
|
+
/**
|
|
40
|
+
* A single constraint rule in the DSL.
|
|
41
|
+
*/
|
|
42
|
+
export interface Constraint {
|
|
43
|
+
id: string;
|
|
44
|
+
operator: ConstraintOperator;
|
|
45
|
+
target: ConstraintTarget;
|
|
46
|
+
/** Glob pattern, regex, or exact string depending on target */
|
|
47
|
+
pattern: string;
|
|
48
|
+
/** Optional message to show on violation */
|
|
49
|
+
message?: string;
|
|
50
|
+
/** Severity when this constraint is violated */
|
|
51
|
+
severity: Severity;
|
|
52
|
+
/** Glob patterns for files this constraint applies to */
|
|
53
|
+
appliesTo?: string[];
|
|
54
|
+
/** Glob patterns for files this constraint does NOT apply to */
|
|
55
|
+
excludes?: string[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Result of a constraint check.
|
|
59
|
+
*/
|
|
60
|
+
export interface ConstraintViolation {
|
|
61
|
+
constraintId: string;
|
|
62
|
+
knowledgeId: string;
|
|
63
|
+
severity: Severity;
|
|
64
|
+
message: string;
|
|
65
|
+
/** File path where violation occurred */
|
|
66
|
+
file?: string;
|
|
67
|
+
/** Line number where violation occurred */
|
|
68
|
+
line?: number;
|
|
69
|
+
/** The matching content that violated the constraint */
|
|
70
|
+
match?: string;
|
|
71
|
+
/** Suggested remediation */
|
|
72
|
+
remediation?: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Author information for a knowledge commit.
|
|
76
|
+
*/
|
|
77
|
+
export interface KnowledgeAuthor {
|
|
78
|
+
id: string;
|
|
79
|
+
name: string;
|
|
80
|
+
email?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Metadata for ADR-type knowledge.
|
|
84
|
+
*/
|
|
85
|
+
export interface ADRMetadata {
|
|
86
|
+
status: ADRStatus;
|
|
87
|
+
/** ID of the ADR that supersedes this one */
|
|
88
|
+
supersededBy?: string;
|
|
89
|
+
/** IDs of related ADRs */
|
|
90
|
+
relatedTo?: string[];
|
|
91
|
+
/** Context/background for the decision */
|
|
92
|
+
context?: string;
|
|
93
|
+
/** Available options that were considered */
|
|
94
|
+
options?: Array<{
|
|
95
|
+
title: string;
|
|
96
|
+
description: string;
|
|
97
|
+
pros?: string[];
|
|
98
|
+
cons?: string[];
|
|
99
|
+
}>;
|
|
100
|
+
/** Final decision made */
|
|
101
|
+
decision?: string;
|
|
102
|
+
/** Expected consequences of the decision */
|
|
103
|
+
consequences?: string[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Metadata for Policy-type knowledge.
|
|
107
|
+
*/
|
|
108
|
+
export interface PolicyMetadata {
|
|
109
|
+
/** Whether this policy is currently active */
|
|
110
|
+
active: boolean;
|
|
111
|
+
/** Date when this policy takes effect */
|
|
112
|
+
effectiveDate?: string;
|
|
113
|
+
/** Date when this policy expires */
|
|
114
|
+
expiresAt?: string;
|
|
115
|
+
/** IDs of exceptions to this policy */
|
|
116
|
+
exceptions?: string[];
|
|
117
|
+
/** Owner responsible for this policy */
|
|
118
|
+
owner?: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Metadata for Pattern-type knowledge.
|
|
122
|
+
*/
|
|
123
|
+
export interface PatternMetadata {
|
|
124
|
+
/** Programming languages this pattern applies to */
|
|
125
|
+
languages?: string[];
|
|
126
|
+
/** Frameworks this pattern applies to */
|
|
127
|
+
frameworks?: string[];
|
|
128
|
+
/** Difficulty level */
|
|
129
|
+
difficulty?: "beginner" | "intermediate" | "advanced";
|
|
130
|
+
/** Example code snippets */
|
|
131
|
+
examples?: Array<{
|
|
132
|
+
language: string;
|
|
133
|
+
code: string;
|
|
134
|
+
description?: string;
|
|
135
|
+
}>;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Metadata for Spec-type knowledge.
|
|
139
|
+
*/
|
|
140
|
+
export interface SpecMetadata {
|
|
141
|
+
/** Version of the specification */
|
|
142
|
+
version?: string;
|
|
143
|
+
/** Specification status */
|
|
144
|
+
status?: "draft" | "review" | "approved" | "deprecated";
|
|
145
|
+
/** API endpoints or interfaces defined */
|
|
146
|
+
endpoints?: string[];
|
|
147
|
+
/** Data schemas defined */
|
|
148
|
+
schemas?: string[];
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Union type for type-specific metadata.
|
|
152
|
+
*/
|
|
153
|
+
export type KnowledgeMetadata = {
|
|
154
|
+
type: "adr";
|
|
155
|
+
data: ADRMetadata;
|
|
156
|
+
} | {
|
|
157
|
+
type: "policy";
|
|
158
|
+
data: PolicyMetadata;
|
|
159
|
+
} | {
|
|
160
|
+
type: "pattern";
|
|
161
|
+
data: PatternMetadata;
|
|
162
|
+
} | {
|
|
163
|
+
type: "spec";
|
|
164
|
+
data: SpecMetadata;
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* An immutable knowledge commit.
|
|
168
|
+
* Once created, commits cannot be modified - only new commits can be added.
|
|
169
|
+
*/
|
|
170
|
+
export interface KnowledgeCommit {
|
|
171
|
+
/** Unique identifier (SHA-like hash) */
|
|
172
|
+
id: string;
|
|
173
|
+
/** Type of knowledge artifact */
|
|
174
|
+
type: KnowledgeType;
|
|
175
|
+
/** Human-readable title */
|
|
176
|
+
title: string;
|
|
177
|
+
/** One-line summary for manifest (max 100 chars) */
|
|
178
|
+
summary: string;
|
|
179
|
+
/** Full content in markdown format */
|
|
180
|
+
content: string;
|
|
181
|
+
/** Hierarchical layer */
|
|
182
|
+
layer: KnowledgeLayer;
|
|
183
|
+
/** Default severity for violations */
|
|
184
|
+
severity: Severity;
|
|
185
|
+
/** Constraint rules for this knowledge */
|
|
186
|
+
constraints: Constraint[];
|
|
187
|
+
/** Type-specific metadata */
|
|
188
|
+
metadata?: KnowledgeMetadata;
|
|
189
|
+
/** Author of this commit */
|
|
190
|
+
author: KnowledgeAuthor;
|
|
191
|
+
/** ISO 8601 timestamp */
|
|
192
|
+
createdAt: string;
|
|
193
|
+
/** ID of the parent commit (for versioning) */
|
|
194
|
+
parentId?: string;
|
|
195
|
+
/** Tags for categorization */
|
|
196
|
+
tags: string[];
|
|
197
|
+
/** Keywords that trigger loading this knowledge */
|
|
198
|
+
triggerKeywords: string[];
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* A single entry in the knowledge manifest.
|
|
202
|
+
* Designed to be extremely compact for initial context loading.
|
|
203
|
+
*/
|
|
204
|
+
export interface ManifestEntry {
|
|
205
|
+
/** Knowledge ID */
|
|
206
|
+
id: string;
|
|
207
|
+
/** Type abbreviation */
|
|
208
|
+
type: KnowledgeType;
|
|
209
|
+
/** Layer abbreviation */
|
|
210
|
+
layer: KnowledgeLayer;
|
|
211
|
+
/** One-line summary (max 100 chars) */
|
|
212
|
+
summary: string;
|
|
213
|
+
/** Severity indicator */
|
|
214
|
+
severity: Severity;
|
|
215
|
+
/** Keywords that trigger full loading */
|
|
216
|
+
keywords: string[];
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* The knowledge manifest for a session.
|
|
220
|
+
* Must be under 2K tokens for efficient context usage.
|
|
221
|
+
*/
|
|
222
|
+
export interface KnowledgeManifest {
|
|
223
|
+
/** Version of the manifest format */
|
|
224
|
+
version: string;
|
|
225
|
+
/** When this manifest was generated */
|
|
226
|
+
generatedAt: string;
|
|
227
|
+
/** Total number of knowledge items */
|
|
228
|
+
totalCount: number;
|
|
229
|
+
/** Entries by layer */
|
|
230
|
+
entries: {
|
|
231
|
+
company: ManifestEntry[];
|
|
232
|
+
org: ManifestEntry[];
|
|
233
|
+
project: ManifestEntry[];
|
|
234
|
+
};
|
|
235
|
+
/** Aggregate statistics */
|
|
236
|
+
stats: {
|
|
237
|
+
byType: Record<KnowledgeType, number>;
|
|
238
|
+
bySeverity: Record<Severity, number>;
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Filter options for querying knowledge.
|
|
243
|
+
*/
|
|
244
|
+
export interface KnowledgeQueryFilter {
|
|
245
|
+
/** Filter by type */
|
|
246
|
+
type?: KnowledgeType | KnowledgeType[];
|
|
247
|
+
/** Filter by layer */
|
|
248
|
+
layer?: KnowledgeLayer | KnowledgeLayer[];
|
|
249
|
+
/** Filter by severity */
|
|
250
|
+
severity?: Severity | Severity[];
|
|
251
|
+
/** Filter by tags */
|
|
252
|
+
tags?: string[];
|
|
253
|
+
/** Filter by keywords */
|
|
254
|
+
keywords?: string[];
|
|
255
|
+
/** Full-text search in title and content */
|
|
256
|
+
search?: string;
|
|
257
|
+
/** Filter by author ID */
|
|
258
|
+
authorId?: string;
|
|
259
|
+
/** Filter by date range */
|
|
260
|
+
createdAfter?: string;
|
|
261
|
+
/** Filter by date range */
|
|
262
|
+
createdBefore?: string;
|
|
263
|
+
/** Maximum results */
|
|
264
|
+
limit?: number;
|
|
265
|
+
/** Pagination offset */
|
|
266
|
+
offset?: number;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Result of a knowledge query.
|
|
270
|
+
*/
|
|
271
|
+
export interface KnowledgeQueryResult {
|
|
272
|
+
items: KnowledgeCommit[];
|
|
273
|
+
total: number;
|
|
274
|
+
hasMore: boolean;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* A request to promote knowledge from one layer to another.
|
|
278
|
+
*/
|
|
279
|
+
export interface PromotionRequest {
|
|
280
|
+
/** ID of the knowledge to promote */
|
|
281
|
+
knowledgeId: string;
|
|
282
|
+
/** Target layer */
|
|
283
|
+
targetLayer: KnowledgeLayer;
|
|
284
|
+
/** Justification for the promotion */
|
|
285
|
+
justification: string;
|
|
286
|
+
/** Promoter information */
|
|
287
|
+
promoter: KnowledgeAuthor;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Record of a promotion event.
|
|
291
|
+
*/
|
|
292
|
+
export interface PromotionRecord {
|
|
293
|
+
id: string;
|
|
294
|
+
knowledgeId: string;
|
|
295
|
+
fromLayer: KnowledgeLayer;
|
|
296
|
+
toLayer: KnowledgeLayer;
|
|
297
|
+
promoter: KnowledgeAuthor;
|
|
298
|
+
justification: string;
|
|
299
|
+
promotedAt: string;
|
|
300
|
+
/** New knowledge ID after promotion (may change) */
|
|
301
|
+
newKnowledgeId: string;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Configuration for a knowledge repository.
|
|
305
|
+
*/
|
|
306
|
+
export interface KnowledgeRepositoryConfig {
|
|
307
|
+
/** Root directory for knowledge storage */
|
|
308
|
+
rootDir: string;
|
|
309
|
+
/** Organization identifier */
|
|
310
|
+
orgId?: string;
|
|
311
|
+
/** Project identifier */
|
|
312
|
+
projectId?: string;
|
|
313
|
+
/** Cache configuration */
|
|
314
|
+
cache?: {
|
|
315
|
+
/** Enable memory caching */
|
|
316
|
+
memory?: boolean;
|
|
317
|
+
/** Enable disk caching */
|
|
318
|
+
disk?: boolean;
|
|
319
|
+
/** TTL for cache entries in seconds */
|
|
320
|
+
ttlSeconds?: number;
|
|
321
|
+
};
|
|
322
|
+
/** Mem0 integration configuration */
|
|
323
|
+
mem0?: {
|
|
324
|
+
enabled: boolean;
|
|
325
|
+
apiKey?: string;
|
|
326
|
+
endpoint?: string;
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Statistics about the knowledge repository.
|
|
331
|
+
*/
|
|
332
|
+
export interface RepositoryStats {
|
|
333
|
+
totalCommits: number;
|
|
334
|
+
byLayer: Record<KnowledgeLayer, number>;
|
|
335
|
+
byType: Record<KnowledgeType, number>;
|
|
336
|
+
bySeverity: Record<Severity, number>;
|
|
337
|
+
lastUpdated: string;
|
|
338
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Memory, MemorySearchResult, AddMemoryInput, SearchMemoryInput, UpdateMemoryInput, Mem0Config, MemoryStats, MemoryLayer } from "./types";
|
|
2
|
+
export declare class Mem0Adapter {
|
|
3
|
+
private config;
|
|
4
|
+
private endpoint;
|
|
5
|
+
constructor(config: Mem0Config);
|
|
6
|
+
add(input: AddMemoryInput): Promise<Memory>;
|
|
7
|
+
search(input: SearchMemoryInput): Promise<MemorySearchResult[]>;
|
|
8
|
+
get(id: string): Promise<Memory | null>;
|
|
9
|
+
update(input: UpdateMemoryInput): Promise<Memory>;
|
|
10
|
+
delete(id: string): Promise<void>;
|
|
11
|
+
getAll(layer?: MemoryLayer): Promise<Memory[]>;
|
|
12
|
+
getStats(): Promise<MemoryStats>;
|
|
13
|
+
private request;
|
|
14
|
+
private getUserId;
|
|
15
|
+
private normalizeLayers;
|
|
16
|
+
private getAllLayers;
|
|
17
|
+
private parseMemory;
|
|
18
|
+
private parseSearchResults;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { MemoryLayer, Memory, MemorySearchResult } from "./types";
|
|
2
|
+
import { Mem0Adapter } from "./adapter";
|
|
3
|
+
interface LayerManagerConfig {
|
|
4
|
+
adapter: Mem0Adapter;
|
|
5
|
+
defaultLayer: MemoryLayer;
|
|
6
|
+
}
|
|
7
|
+
export declare class MemoryLayerManager {
|
|
8
|
+
private adapter;
|
|
9
|
+
private defaultLayer;
|
|
10
|
+
private layerPriority;
|
|
11
|
+
constructor(config: LayerManagerConfig);
|
|
12
|
+
addToLayer(content: string, layer?: MemoryLayer, metadata?: Record<string, unknown>): Promise<Memory>;
|
|
13
|
+
searchAcrossLayers(query: string, options?: {
|
|
14
|
+
layers?: MemoryLayer[];
|
|
15
|
+
limit?: number;
|
|
16
|
+
threshold?: number;
|
|
17
|
+
}): Promise<MemorySearchResult[]>;
|
|
18
|
+
searchLayer(query: string, layer: MemoryLayer, limit?: number): Promise<MemorySearchResult[]>;
|
|
19
|
+
getLayerMemories(layer: MemoryLayer): Promise<Memory[]>;
|
|
20
|
+
getMergedContext(query: string, options?: {
|
|
21
|
+
maxTokens?: number;
|
|
22
|
+
limit?: number;
|
|
23
|
+
}): Promise<string>;
|
|
24
|
+
promoteMemory(id: string, targetLayer: MemoryLayer): Promise<Memory>;
|
|
25
|
+
clearLayer(layer: MemoryLayer): Promise<number>;
|
|
26
|
+
clearSession(): Promise<number>;
|
|
27
|
+
private formatLayerName;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type MemoryLayer = "user" | "session" | "project" | "org" | "company";
|
|
2
|
+
export interface Memory {
|
|
3
|
+
id: string;
|
|
4
|
+
content: string;
|
|
5
|
+
layer: MemoryLayer;
|
|
6
|
+
metadata?: Record<string, unknown>;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
updatedAt?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MemorySearchResult {
|
|
11
|
+
memory: Memory;
|
|
12
|
+
score: number;
|
|
13
|
+
}
|
|
14
|
+
export interface AddMemoryInput {
|
|
15
|
+
content: string;
|
|
16
|
+
layer: MemoryLayer;
|
|
17
|
+
metadata?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
export interface SearchMemoryInput {
|
|
20
|
+
query: string;
|
|
21
|
+
layer?: MemoryLayer | MemoryLayer[];
|
|
22
|
+
limit?: number;
|
|
23
|
+
threshold?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface UpdateMemoryInput {
|
|
26
|
+
id: string;
|
|
27
|
+
content?: string;
|
|
28
|
+
metadata?: Record<string, unknown>;
|
|
29
|
+
}
|
|
30
|
+
export interface DeleteMemoryInput {
|
|
31
|
+
id: string;
|
|
32
|
+
}
|
|
33
|
+
export interface Mem0Config {
|
|
34
|
+
enabled: boolean;
|
|
35
|
+
apiKey?: string;
|
|
36
|
+
endpoint?: string;
|
|
37
|
+
userId?: string;
|
|
38
|
+
projectId?: string;
|
|
39
|
+
orgId?: string;
|
|
40
|
+
companyId?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface MemoryStats {
|
|
43
|
+
totalMemories: number;
|
|
44
|
+
byLayer: Record<MemoryLayer, number>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { CommandDefinition } from "../claude-code-command-loader/types";
|
|
2
|
+
import type { LoadedSkill } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Load skills from Claude Code user directory (~/.claude/skills/)
|
|
5
|
+
*/
|
|
6
|
+
export declare function loadUserSkills(): Record<string, CommandDefinition>;
|
|
7
|
+
/**
|
|
8
|
+
* Load skills from Claude Code project directory (.claude/skills/)
|
|
9
|
+
*/
|
|
10
|
+
export declare function loadProjectSkills(): Record<string, CommandDefinition>;
|
|
11
|
+
/**
|
|
12
|
+
* Load skills from OpenCode global directory (~/.config/opencode/skill/)
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadOpencodeGlobalSkills(): Record<string, CommandDefinition>;
|
|
15
|
+
/**
|
|
16
|
+
* Load skills from OpenCode project directory (.opencode/skill/)
|
|
17
|
+
*/
|
|
18
|
+
export declare function loadOpencodeProjectSkills(): Record<string, CommandDefinition>;
|
|
19
|
+
/**
|
|
20
|
+
* Discover all skills from all sources with priority ordering.
|
|
21
|
+
* Priority order: opencode-project > project > opencode > user
|
|
22
|
+
*
|
|
23
|
+
* @returns Array of LoadedSkill objects for use in slashcommand discovery
|
|
24
|
+
*/
|
|
25
|
+
export declare function discoverAllSkills(): LoadedSkill[];
|
|
26
|
+
export interface DiscoverSkillsOptions {
|
|
27
|
+
includeClaudeCodePaths?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Discover skills with optional filtering.
|
|
31
|
+
* When includeClaudeCodePaths is false, only loads from OpenCode paths.
|
|
32
|
+
*/
|
|
33
|
+
export declare function discoverSkills(options?: DiscoverSkillsOptions): LoadedSkill[];
|
|
34
|
+
/**
|
|
35
|
+
* Get a skill by name from all available sources.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getSkillByName(name: string, options?: DiscoverSkillsOptions): LoadedSkill | undefined;
|
|
38
|
+
export declare function discoverUserClaudeSkills(): LoadedSkill[];
|
|
39
|
+
export declare function discoverProjectClaudeSkills(): LoadedSkill[];
|
|
40
|
+
export declare function discoverOpencodeGlobalSkills(): LoadedSkill[];
|
|
41
|
+
export declare function discoverOpencodeProjectSkills(): LoadedSkill[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LoadedSkill } from "./types";
|
|
2
|
+
import type { SkillsConfig } from "../../config/schema";
|
|
3
|
+
import type { BuiltinSkill } from "../builtin-skills/types";
|
|
4
|
+
export interface MergeSkillsOptions {
|
|
5
|
+
configDir?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function mergeSkills(builtinSkills: BuiltinSkill[], config: SkillsConfig | undefined, userClaudeSkills: LoadedSkill[], userOpencodeSkills: LoadedSkill[], projectClaudeSkills: LoadedSkill[], projectOpencodeSkills: LoadedSkill[], options?: MergeSkillsOptions): LoadedSkill[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { CommandDefinition } from "../claude-code-command-loader/types";
|
|
2
|
+
import type { SkillMcpConfig } from "../skill-mcp-manager/types";
|
|
3
|
+
export type SkillScope = "builtin" | "config" | "user" | "project" | "opencode" | "opencode-project";
|
|
4
|
+
export interface SkillMetadata {
|
|
5
|
+
name?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
model?: string;
|
|
8
|
+
"argument-hint"?: string;
|
|
9
|
+
agent?: string;
|
|
10
|
+
subtask?: boolean;
|
|
11
|
+
license?: string;
|
|
12
|
+
compatibility?: string;
|
|
13
|
+
metadata?: Record<string, string>;
|
|
14
|
+
"allowed-tools"?: string;
|
|
15
|
+
mcp?: SkillMcpConfig;
|
|
16
|
+
}
|
|
17
|
+
export interface LoadedSkill {
|
|
18
|
+
name: string;
|
|
19
|
+
path?: string;
|
|
20
|
+
resolvedPath?: string;
|
|
21
|
+
definition: CommandDefinition;
|
|
22
|
+
scope: SkillScope;
|
|
23
|
+
license?: string;
|
|
24
|
+
compatibility?: string;
|
|
25
|
+
metadata?: Record<string, string>;
|
|
26
|
+
allowedTools?: string[];
|
|
27
|
+
mcpConfig?: SkillMcpConfig;
|
|
28
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
|
+
import type { Tool, Resource, Prompt } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
+
import type { ClaudeCodeMcpServer } from "../claude-code-mcp-loader/types";
|
|
4
|
+
import type { SkillMcpClientInfo, SkillMcpServerContext } from "./types";
|
|
5
|
+
export declare class SkillMcpManager {
|
|
6
|
+
private clients;
|
|
7
|
+
private getClientKey;
|
|
8
|
+
getOrCreateClient(info: SkillMcpClientInfo, config: ClaudeCodeMcpServer): Promise<Client>;
|
|
9
|
+
private createClient;
|
|
10
|
+
disconnectSession(sessionID: string): Promise<void>;
|
|
11
|
+
disconnectAll(): Promise<void>;
|
|
12
|
+
listTools(info: SkillMcpClientInfo, context: SkillMcpServerContext): Promise<Tool[]>;
|
|
13
|
+
listResources(info: SkillMcpClientInfo, context: SkillMcpServerContext): Promise<Resource[]>;
|
|
14
|
+
listPrompts(info: SkillMcpClientInfo, context: SkillMcpServerContext): Promise<Prompt[]>;
|
|
15
|
+
callTool(info: SkillMcpClientInfo, context: SkillMcpServerContext, name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
16
|
+
readResource(info: SkillMcpClientInfo, context: SkillMcpServerContext, uri: string): Promise<unknown>;
|
|
17
|
+
getPrompt(info: SkillMcpClientInfo, context: SkillMcpServerContext, name: string, args: Record<string, string>): Promise<unknown>;
|
|
18
|
+
private getOrCreateClientWithRetry;
|
|
19
|
+
getConnectedServers(): string[];
|
|
20
|
+
isConnected(info: SkillMcpClientInfo): boolean;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ClaudeCodeMcpServer } from "../claude-code-mcp-loader/types";
|
|
2
|
+
export type SkillMcpConfig = Record<string, ClaudeCodeMcpServer>;
|
|
3
|
+
export interface SkillMcpClientInfo {
|
|
4
|
+
serverName: string;
|
|
5
|
+
skillName: string;
|
|
6
|
+
sessionID: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SkillMcpServerContext {
|
|
9
|
+
config: ClaudeCodeMcpServer;
|
|
10
|
+
skillName: string;
|
|
11
|
+
}
|