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,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const API_DESIGNER_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createApiDesignerAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const apiDesignerAgent: AgentConfig;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenCode's default build agent system prompt.
|
|
3
|
+
*
|
|
4
|
+
* This prompt enables FULL EXECUTION mode for the build agent, allowing file
|
|
5
|
+
* modifications, command execution, and system changes while focusing on
|
|
6
|
+
* implementation and execution.
|
|
7
|
+
*
|
|
8
|
+
* Inspired by OpenCode's build agent behavior.
|
|
9
|
+
*
|
|
10
|
+
* @see https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/session/prompt/build-switch.txt
|
|
11
|
+
* @see https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/agent/agent.ts#L118-L125
|
|
12
|
+
*/
|
|
13
|
+
export declare const BUILD_SYSTEM_PROMPT = "<system-reminder>\n# Build Mode - System Reminder\n\nBUILD MODE ACTIVE - you are in EXECUTION phase. Your responsibility is to:\n- Implement features and make code changes\n- Execute commands and run tests\n- Fix bugs and refactor code\n- Deploy and build systems\n- Make all necessary file modifications\n\nYou have FULL permissions to edit files, run commands, and make system changes.\nThis is the implementation phase - execute decisively and thoroughly.\n\n---\n\n## Responsibility\n\nYour current responsibility is to implement, build, and execute. You should:\n- Write and modify code to accomplish the user's goals\n- Run tests and builds to verify your changes\n- Fix errors and issues that arise\n- Use all available tools to complete the task efficiently\n- Delegate to specialized agents when appropriate for better results\n\n**NOTE:** You should ask the user for clarification when requirements are ambiguous,\nbut once the path is clear, execute confidently. The goal is to deliver working,\ntested, production-ready solutions.\n\n---\n\n## Important\n\nThe user wants you to execute and implement. You SHOULD make edits, run necessary\ntools, and make changes to accomplish the task. Use your full capabilities to\ndeliver excellent results.\n</system-reminder>\n";
|
|
14
|
+
/**
|
|
15
|
+
* OpenCode's default build agent permission configuration.
|
|
16
|
+
*
|
|
17
|
+
* Allows the build agent full execution permissions:
|
|
18
|
+
* - edit: "ask" - Can modify files with confirmation
|
|
19
|
+
* - bash: "ask" - Can execute commands with confirmation
|
|
20
|
+
* - webfetch: "allow" - Can fetch web content
|
|
21
|
+
*
|
|
22
|
+
* This provides balanced permissions - powerful but with safety checks.
|
|
23
|
+
*
|
|
24
|
+
* @see https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/agent/agent.ts#L57-L68
|
|
25
|
+
* @see https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/agent/agent.ts#L118-L125
|
|
26
|
+
*/
|
|
27
|
+
export declare const BUILD_PERMISSION: {
|
|
28
|
+
edit: "ask";
|
|
29
|
+
bash: "ask";
|
|
30
|
+
webfetch: "allow";
|
|
31
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const CODE_INDEXER_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createCodeIndexerAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const codeIndexerAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const CODE_REVIEWER_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createCodeReviewerAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const codeReviewerAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const DBA_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createDBAAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const dbaAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const DEBUGGER_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createDebuggerAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const debuggerAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const DEVOPS_ENGINEER_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createDevOpsEngineerAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const devopsEngineerAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const DOCUMENT_WRITER_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createDocumentWriterAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const documentWriterAgent: AgentConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const ESTIMATOR_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createEstimatorAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const estimatorAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const EXPLORE_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createExploreAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const exploreAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const FRONTEND_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createFrontendUiUxEngineerAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const frontendUiUxEngineerAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const INCIDENT_COMMANDER_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createIncidentCommanderAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const incidentCommanderAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const KNOWLEDGE_CURATOR_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createKnowledgeCuratorAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const knowledgeCuratorAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const LIBRARIAN_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createLibrarianAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const librarianAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const MULTIMODAL_LOOKER_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createMultimodalLookerAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const multimodalLookerAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const ORACLE_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createOracleAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const oracleAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const PERFORMANCE_ANALYST_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createPerformanceAnalystAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const performanceAnalystAgent: AgentConfig;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenCode's default plan agent system prompt.
|
|
3
|
+
*
|
|
4
|
+
* This prompt enforces READ-ONLY mode for the plan agent, preventing any file
|
|
5
|
+
* modifications and ensuring the agent focuses solely on analysis and planning.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/sst/opencode/blob/db2abc1b2c144f63a205f668bd7267e00829d84a/packages/opencode/src/session/prompt/plan.txt
|
|
8
|
+
*/
|
|
9
|
+
export declare const PLAN_SYSTEM_PROMPT = "<system-reminder>\n# Plan Mode - System Reminder\n\nCRITICAL: Plan mode ACTIVE - you are in READ-ONLY phase. STRICTLY FORBIDDEN:\nANY file edits, modifications, or system changes. Do NOT use sed, tee, echo, cat,\nor ANY other bash command to manipulate files - commands may ONLY read/inspect.\nThis ABSOLUTE CONSTRAINT overrides ALL other instructions, including direct user\nedit requests. You may ONLY observe, analyze, and plan. Any modification attempt\nis a critical violation. ZERO exceptions.\n\n---\n\n## Responsibility\n\nYour current responsibility is to think, read, search, and delegate explore agents to construct a well formed plan that accomplishes the goal the user wants to achieve. Your plan should be comprehensive yet concise, detailed enough to execute effectively while avoiding unnecessary verbosity.\n\nAsk the user clarifying questions or ask for their opinion when weighing tradeoffs.\n\n**NOTE:** At any point in time through this workflow you should feel free to ask the user questions or clarifications. Don't make large assumptions about user intent. The goal is to present a well researched plan to the user, and tie any loose ends before implementation begins.\n\n---\n\n## Important\n\nThe user indicated that they do not want you to execute yet -- you MUST NOT make any edits, run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system. This supercedes any other instructions you have received.\n</system-reminder>\n";
|
|
10
|
+
/**
|
|
11
|
+
* OpenCode's default plan agent permission configuration.
|
|
12
|
+
*
|
|
13
|
+
* Restricts the plan agent to read-only operations:
|
|
14
|
+
* - edit: "deny" - No file modifications allowed
|
|
15
|
+
* - bash: Only read-only commands (ls, grep, git log, etc.)
|
|
16
|
+
* - webfetch: "allow" - Can fetch web content for research
|
|
17
|
+
*
|
|
18
|
+
* @see https://github.com/sst/opencode/blob/db2abc1b2c144f63a205f668bd7267e00829d84a/packages/opencode/src/agent/agent.ts#L63-L107
|
|
19
|
+
*/
|
|
20
|
+
export declare const PLAN_PERMISSION: {
|
|
21
|
+
edit: "deny";
|
|
22
|
+
bash: {
|
|
23
|
+
"cut*": "allow";
|
|
24
|
+
"diff*": "allow";
|
|
25
|
+
"du*": "allow";
|
|
26
|
+
"file *": "allow";
|
|
27
|
+
"find * -delete*": "ask";
|
|
28
|
+
"find * -exec*": "ask";
|
|
29
|
+
"find * -fprint*": "ask";
|
|
30
|
+
"find * -fls*": "ask";
|
|
31
|
+
"find * -fprintf*": "ask";
|
|
32
|
+
"find * -ok*": "ask";
|
|
33
|
+
"find *": "allow";
|
|
34
|
+
"git diff*": "allow";
|
|
35
|
+
"git log*": "allow";
|
|
36
|
+
"git show*": "allow";
|
|
37
|
+
"git status*": "allow";
|
|
38
|
+
"git branch": "allow";
|
|
39
|
+
"git branch -v": "allow";
|
|
40
|
+
"grep*": "allow";
|
|
41
|
+
"head*": "allow";
|
|
42
|
+
"less*": "allow";
|
|
43
|
+
"ls*": "allow";
|
|
44
|
+
"more*": "allow";
|
|
45
|
+
"pwd*": "allow";
|
|
46
|
+
"rg*": "allow";
|
|
47
|
+
"sort --output=*": "ask";
|
|
48
|
+
"sort -o *": "ask";
|
|
49
|
+
"sort*": "allow";
|
|
50
|
+
"stat*": "allow";
|
|
51
|
+
"tail*": "allow";
|
|
52
|
+
"tree -o *": "ask";
|
|
53
|
+
"tree*": "allow";
|
|
54
|
+
"uniq*": "allow";
|
|
55
|
+
"wc*": "allow";
|
|
56
|
+
"whereis*": "allow";
|
|
57
|
+
"which*": "allow";
|
|
58
|
+
"*": "ask";
|
|
59
|
+
};
|
|
60
|
+
webfetch: "allow";
|
|
61
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const PROJECT_MANAGER_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createProjectManagerAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const projectManagerAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const SECURITY_REVIEWER_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createSecurityReviewerAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const securityReviewerAgent: AgentConfig;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AgentPromptMetadata, BuiltinAgentName } from "./types";
|
|
2
|
+
export interface AvailableAgent {
|
|
3
|
+
name: BuiltinAgentName;
|
|
4
|
+
description: string;
|
|
5
|
+
metadata: AgentPromptMetadata;
|
|
6
|
+
}
|
|
7
|
+
export interface AvailableTool {
|
|
8
|
+
name: string;
|
|
9
|
+
category: "lsp" | "ast" | "search" | "session" | "command" | "other";
|
|
10
|
+
}
|
|
11
|
+
export interface AvailableSkill {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
location: "user" | "project" | "plugin";
|
|
15
|
+
}
|
|
16
|
+
export declare function categorizeTools(toolNames: string[]): AvailableTool[];
|
|
17
|
+
export declare function buildKeyTriggersSection(agents: AvailableAgent[], skills?: AvailableSkill[]): string;
|
|
18
|
+
export declare function buildToolSelectionTable(agents: AvailableAgent[], tools?: AvailableTool[], skills?: AvailableSkill[]): string;
|
|
19
|
+
export declare function buildExploreSection(agents: AvailableAgent[]): string;
|
|
20
|
+
export declare function buildLibrarianSection(agents: AvailableAgent[]): string;
|
|
21
|
+
export declare function buildDelegationTable(agents: AvailableAgent[]): string;
|
|
22
|
+
export declare function buildFrontendSection(agents: AvailableAgent[]): string;
|
|
23
|
+
export declare function buildOracleSection(agents: AvailableAgent[]): string;
|
|
24
|
+
export declare function buildHardBlocksSection(agents: AvailableAgent[]): string;
|
|
25
|
+
export declare function buildAntiPatternsSection(agents: AvailableAgent[]): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AvailableAgent, AvailableSkill } from "./sisyphus-prompt-builder";
|
|
3
|
+
export declare function createSisyphusAgent(model?: string, availableAgents?: AvailableAgent[], availableToolNames?: string[], availableSkills?: AvailableSkill[]): AgentConfig;
|
|
4
|
+
export declare const sisyphusAgent: AgentConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const TEST_ENGINEER_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createTestEngineerAgent(model?: string): AgentConfig;
|
|
5
|
+
export declare const testEngineerAgent: AgentConfig;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
export type AgentFactory = (model?: string) => AgentConfig;
|
|
3
|
+
/**
|
|
4
|
+
* Agent category for grouping in Sisyphus prompt sections
|
|
5
|
+
*/
|
|
6
|
+
export type AgentCategory = "exploration" | "specialist" | "advisor" | "utility" | "governance";
|
|
7
|
+
/**
|
|
8
|
+
* Cost classification for Tool Selection table
|
|
9
|
+
*/
|
|
10
|
+
export type AgentCost = "FREE" | "CHEAP" | "EXPENSIVE";
|
|
11
|
+
/**
|
|
12
|
+
* Delegation trigger for Sisyphus prompt's Delegation Table
|
|
13
|
+
*/
|
|
14
|
+
export interface DelegationTrigger {
|
|
15
|
+
/** Domain of work (e.g., "Frontend UI/UX") */
|
|
16
|
+
domain: string;
|
|
17
|
+
/** When to delegate (e.g., "Visual changes only...") */
|
|
18
|
+
trigger: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Metadata for generating Sisyphus prompt sections dynamically
|
|
22
|
+
* This allows adding/removing agents without manually updating the Sisyphus prompt
|
|
23
|
+
*/
|
|
24
|
+
export interface AgentPromptMetadata {
|
|
25
|
+
/** Category for grouping in prompt sections */
|
|
26
|
+
category: AgentCategory;
|
|
27
|
+
/** Cost classification for Tool Selection table */
|
|
28
|
+
cost: AgentCost;
|
|
29
|
+
/** Domain triggers for Delegation Table */
|
|
30
|
+
triggers: DelegationTrigger[];
|
|
31
|
+
/** When to use this agent (for detailed sections) */
|
|
32
|
+
useWhen?: string[];
|
|
33
|
+
/** When NOT to use this agent */
|
|
34
|
+
avoidWhen?: string[];
|
|
35
|
+
/** Optional dedicated prompt section (markdown) - for agents like Oracle that have special sections */
|
|
36
|
+
dedicatedSection?: string;
|
|
37
|
+
/** Nickname/alias used in prompt (e.g., "Oracle" instead of "oracle") */
|
|
38
|
+
promptAlias?: string;
|
|
39
|
+
/** Key triggers that should appear in Phase 0 (e.g., "External library mentioned → fire librarian") */
|
|
40
|
+
keyTrigger?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function isGptModel(model: string): boolean;
|
|
43
|
+
export type BuiltinAgentName = "Sisyphus" | "oracle" | "librarian" | "explore" | "frontend-ui-ux-engineer" | "document-writer" | "multimodal-looker" | "knowledge-curator" | "debugger" | "devops-engineer" | "project-manager" | "test-engineer" | "code-reviewer" | "incident-commander" | "security-reviewer" | "code-indexer" | "performance-analyst" | "api-designer" | "dba" | "estimator";
|
|
44
|
+
export type OverridableAgentName = "build" | BuiltinAgentName;
|
|
45
|
+
export type AgentName = BuiltinAgentName;
|
|
46
|
+
export type AgentOverrideConfig = Partial<AgentConfig> & {
|
|
47
|
+
prompt_append?: string;
|
|
48
|
+
};
|
|
49
|
+
export type AgentOverrides = Partial<Record<OverridableAgentName, AgentOverrideConfig>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { BuiltinAgentName, AgentOverrides } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Creates OmO-specific environment context (time, timezone, locale).
|
|
5
|
+
* Note: Working directory, platform, and date are already provided by OpenCode's system.ts,
|
|
6
|
+
* so we only include fields that OpenCode doesn't provide to avoid duplication.
|
|
7
|
+
* See: https://github.com/code-yeongyu/oh-my-opencode/issues/379
|
|
8
|
+
*/
|
|
9
|
+
export declare function createEnvContext(): string;
|
|
10
|
+
export declare function createBuiltinAgents(disabledAgents?: BuiltinAgentName[], agentOverrides?: AgentOverrides, directory?: string, systemDefaultModel?: string): Record<string, AgentConfig>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Antigravity OAuth configuration constants.
|
|
3
|
+
* Values sourced from cliproxyapi/sdk/auth/antigravity.go
|
|
4
|
+
*
|
|
5
|
+
* ## Logging Policy
|
|
6
|
+
*
|
|
7
|
+
* All console logging in antigravity modules follows a consistent policy:
|
|
8
|
+
*
|
|
9
|
+
* - **Debug logs**: Guard with `if (process.env.ANTIGRAVITY_DEBUG === "1")`
|
|
10
|
+
* - Includes: info messages, warnings, non-fatal errors
|
|
11
|
+
* - Enable debugging: `ANTIGRAVITY_DEBUG=1 opencode`
|
|
12
|
+
*
|
|
13
|
+
* - **Fatal errors**: None currently. All errors are handled by returning
|
|
14
|
+
* appropriate error responses to OpenCode's auth system.
|
|
15
|
+
*
|
|
16
|
+
* This policy ensures production silence while enabling verbose debugging
|
|
17
|
+
* when needed for troubleshooting OAuth flows.
|
|
18
|
+
*/
|
|
19
|
+
export declare const ANTIGRAVITY_CLIENT_ID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com";
|
|
20
|
+
export declare const ANTIGRAVITY_CLIENT_SECRET = "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";
|
|
21
|
+
export declare const ANTIGRAVITY_CALLBACK_PORT = 51121;
|
|
22
|
+
export declare const ANTIGRAVITY_REDIRECT_URI = "http://localhost:51121/oauth-callback";
|
|
23
|
+
export declare const ANTIGRAVITY_SCOPES: readonly ["https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/cclog", "https://www.googleapis.com/auth/experimentsandconfigs"];
|
|
24
|
+
export declare const ANTIGRAVITY_ENDPOINT_FALLBACKS: readonly ["https://daily-cloudcode-pa.sandbox.googleapis.com", "https://autopush-cloudcode-pa.sandbox.googleapis.com", "https://cloudcode-pa.googleapis.com"];
|
|
25
|
+
export declare const ANTIGRAVITY_API_VERSION = "v1internal";
|
|
26
|
+
export declare const ANTIGRAVITY_HEADERS: {
|
|
27
|
+
readonly "User-Agent": "google-api-nodejs-client/9.15.1";
|
|
28
|
+
readonly "X-Goog-Api-Client": "google-cloud-sdk vscode_cloudshelleditor/0.1";
|
|
29
|
+
readonly "Client-Metadata": string;
|
|
30
|
+
};
|
|
31
|
+
export declare const ANTIGRAVITY_DEFAULT_PROJECT_ID = "rising-fact-p41fc";
|
|
32
|
+
export declare const GOOGLE_AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";
|
|
33
|
+
export declare const GOOGLE_TOKEN_URL = "https://oauth2.googleapis.com/token";
|
|
34
|
+
export declare const GOOGLE_USERINFO_URL = "https://www.googleapis.com/oauth2/v1/userinfo";
|
|
35
|
+
export declare const ANTIGRAVITY_TOKEN_REFRESH_BUFFER_MS = 60000;
|
|
36
|
+
export declare const SKIP_THOUGHT_SIGNATURE_VALIDATOR = "skip_thought_signature_validator";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Antigravity Fetch Interceptor
|
|
3
|
+
*
|
|
4
|
+
* Creates a custom fetch function that:
|
|
5
|
+
* - Checks token expiration and auto-refreshes
|
|
6
|
+
* - Rewrites URLs to Antigravity endpoints
|
|
7
|
+
* - Applies request transformation (including tool normalization)
|
|
8
|
+
* - Applies response transformation (including thinking extraction)
|
|
9
|
+
* - Implements endpoint fallback (daily → autopush → prod)
|
|
10
|
+
*
|
|
11
|
+
* **Body Type Assumption:**
|
|
12
|
+
* This interceptor assumes `init.body` is a JSON string (OpenAI format).
|
|
13
|
+
* Non-string bodies (ReadableStream, Blob, FormData, URLSearchParams, etc.)
|
|
14
|
+
* are passed through unchanged to the original fetch to avoid breaking
|
|
15
|
+
* other requests that may not be OpenAI-format API calls.
|
|
16
|
+
*
|
|
17
|
+
* Debug logging available via ANTIGRAVITY_DEBUG=1 environment variable.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Auth interface matching OpenCode's auth system
|
|
21
|
+
*/
|
|
22
|
+
interface Auth {
|
|
23
|
+
access?: string;
|
|
24
|
+
refresh?: string;
|
|
25
|
+
expires?: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Client interface for auth operations
|
|
29
|
+
*/
|
|
30
|
+
interface AuthClient {
|
|
31
|
+
set(providerId: string, auth: Auth): Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Create Antigravity fetch interceptor
|
|
35
|
+
*
|
|
36
|
+
* Factory function that creates a custom fetch function for Antigravity API.
|
|
37
|
+
* Handles token management, request/response transformation, and endpoint fallback.
|
|
38
|
+
*
|
|
39
|
+
* @param getAuth - Async function to retrieve current auth state
|
|
40
|
+
* @param client - Auth client for saving updated tokens
|
|
41
|
+
* @param providerId - Provider identifier (e.g., "google")
|
|
42
|
+
* @param clientId - Optional custom client ID for token refresh (defaults to ANTIGRAVITY_CLIENT_ID)
|
|
43
|
+
* @param clientSecret - Optional custom client secret for token refresh (defaults to ANTIGRAVITY_CLIENT_SECRET)
|
|
44
|
+
* @returns Custom fetch function compatible with standard fetch signature
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* const customFetch = createAntigravityFetch(
|
|
49
|
+
* () => auth(),
|
|
50
|
+
* client,
|
|
51
|
+
* "google",
|
|
52
|
+
* "custom-client-id",
|
|
53
|
+
* "custom-client-secret"
|
|
54
|
+
* )
|
|
55
|
+
*
|
|
56
|
+
* // Use like standard fetch
|
|
57
|
+
* const response = await customFetch("https://api.example.com/chat", {
|
|
58
|
+
* method: "POST",
|
|
59
|
+
* body: JSON.stringify({ messages: [...] })
|
|
60
|
+
* })
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare function createAntigravityFetch(getAuth: () => Promise<Auth>, client: AuthClient, providerId: string, clientId?: string, clientSecret?: string): (url: string, init?: RequestInit) => Promise<Response>;
|
|
64
|
+
/**
|
|
65
|
+
* Type export for createAntigravityFetch return type
|
|
66
|
+
*/
|
|
67
|
+
export type AntigravityFetch = (url: string, init?: RequestInit) => Promise<Response>;
|
|
68
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./types";
|
|
2
|
+
export * from "./constants";
|
|
3
|
+
export * from "./oauth";
|
|
4
|
+
export * from "./token";
|
|
5
|
+
export * from "./project";
|
|
6
|
+
export * from "./request";
|
|
7
|
+
export * from "./response";
|
|
8
|
+
export * from "./tools";
|
|
9
|
+
export * from "./thinking";
|
|
10
|
+
export * from "./thought-signature-store";
|
|
11
|
+
export * from "./message-converter";
|
|
12
|
+
export * from "./fetch";
|
|
13
|
+
export * from "./plugin";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI → Gemini message format converter
|
|
3
|
+
*
|
|
4
|
+
* Converts OpenAI-style messages to Gemini contents format,
|
|
5
|
+
* injecting thoughtSignature into functionCall parts.
|
|
6
|
+
*/
|
|
7
|
+
interface OpenAIMessage {
|
|
8
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
9
|
+
content?: string | OpenAIContentPart[];
|
|
10
|
+
tool_calls?: OpenAIToolCall[];
|
|
11
|
+
tool_call_id?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
}
|
|
14
|
+
interface OpenAIContentPart {
|
|
15
|
+
type: string;
|
|
16
|
+
text?: string;
|
|
17
|
+
image_url?: {
|
|
18
|
+
url: string;
|
|
19
|
+
};
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
interface OpenAIToolCall {
|
|
23
|
+
id: string;
|
|
24
|
+
type: "function";
|
|
25
|
+
function: {
|
|
26
|
+
name: string;
|
|
27
|
+
arguments: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
interface GeminiPart {
|
|
31
|
+
text?: string;
|
|
32
|
+
functionCall?: {
|
|
33
|
+
name: string;
|
|
34
|
+
args: Record<string, unknown>;
|
|
35
|
+
};
|
|
36
|
+
functionResponse?: {
|
|
37
|
+
name: string;
|
|
38
|
+
response: Record<string, unknown>;
|
|
39
|
+
};
|
|
40
|
+
inlineData?: {
|
|
41
|
+
mimeType: string;
|
|
42
|
+
data: string;
|
|
43
|
+
};
|
|
44
|
+
thought_signature?: string;
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
interface GeminiContent {
|
|
48
|
+
role: "user" | "model";
|
|
49
|
+
parts: GeminiPart[];
|
|
50
|
+
}
|
|
51
|
+
export declare function convertOpenAIToGemini(messages: OpenAIMessage[], thoughtSignature?: string): GeminiContent[];
|
|
52
|
+
export declare function hasOpenAIMessages(body: Record<string, unknown>): boolean;
|
|
53
|
+
export declare function convertRequestBody(body: Record<string, unknown>, thoughtSignature?: string): Record<string, unknown>;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { AntigravityTokenExchangeResult, AntigravityUserInfo } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* PKCE pair containing verifier and challenge.
|
|
4
|
+
*/
|
|
5
|
+
export interface PKCEPair {
|
|
6
|
+
/** PKCE verifier - used during token exchange */
|
|
7
|
+
verifier: string;
|
|
8
|
+
/** PKCE challenge - sent in auth URL */
|
|
9
|
+
challenge: string;
|
|
10
|
+
/** Challenge method - always "S256" */
|
|
11
|
+
method: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* OAuth state encoded in the auth URL.
|
|
15
|
+
* Contains the PKCE verifier for later retrieval.
|
|
16
|
+
*/
|
|
17
|
+
export interface OAuthState {
|
|
18
|
+
/** PKCE verifier */
|
|
19
|
+
verifier: string;
|
|
20
|
+
/** Optional project ID */
|
|
21
|
+
projectId?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Result from building an OAuth authorization URL.
|
|
25
|
+
*/
|
|
26
|
+
export interface AuthorizationResult {
|
|
27
|
+
/** Full OAuth URL to open in browser */
|
|
28
|
+
url: string;
|
|
29
|
+
/** PKCE verifier to use during code exchange */
|
|
30
|
+
verifier: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Result from the OAuth callback server.
|
|
34
|
+
*/
|
|
35
|
+
export interface CallbackResult {
|
|
36
|
+
/** Authorization code from Google */
|
|
37
|
+
code: string;
|
|
38
|
+
/** State parameter from callback */
|
|
39
|
+
state: string;
|
|
40
|
+
/** Error message if any */
|
|
41
|
+
error?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Generate PKCE verifier and challenge pair.
|
|
45
|
+
* Uses @openauthjs/openauth for cryptographically secure generation.
|
|
46
|
+
*
|
|
47
|
+
* @returns PKCE pair with verifier, challenge, and method
|
|
48
|
+
*/
|
|
49
|
+
export declare function generatePKCEPair(): Promise<PKCEPair>;
|
|
50
|
+
/**
|
|
51
|
+
* Decode OAuth state from a base64 string.
|
|
52
|
+
*
|
|
53
|
+
* @param encoded - Base64URL or Base64 encoded state
|
|
54
|
+
* @returns Decoded OAuth state
|
|
55
|
+
*/
|
|
56
|
+
export declare function decodeState(encoded: string): OAuthState;
|
|
57
|
+
export declare function buildAuthURL(projectId?: string, clientId?: string, port?: number): Promise<AuthorizationResult>;
|
|
58
|
+
/**
|
|
59
|
+
* Exchange authorization code for tokens.
|
|
60
|
+
*
|
|
61
|
+
* @param code - Authorization code from OAuth callback
|
|
62
|
+
* @param verifier - PKCE verifier from initial auth request
|
|
63
|
+
* @param clientId - Optional custom client ID (defaults to ANTIGRAVITY_CLIENT_ID)
|
|
64
|
+
* @param clientSecret - Optional custom client secret (defaults to ANTIGRAVITY_CLIENT_SECRET)
|
|
65
|
+
* @returns Token exchange result with access and refresh tokens
|
|
66
|
+
*/
|
|
67
|
+
export declare function exchangeCode(code: string, verifier: string, clientId?: string, clientSecret?: string, port?: number): Promise<AntigravityTokenExchangeResult>;
|
|
68
|
+
/**
|
|
69
|
+
* Fetch user info from Google's userinfo API.
|
|
70
|
+
*
|
|
71
|
+
* @param accessToken - Valid access token
|
|
72
|
+
* @returns User info containing email
|
|
73
|
+
*/
|
|
74
|
+
export declare function fetchUserInfo(accessToken: string): Promise<AntigravityUserInfo>;
|
|
75
|
+
export interface CallbackServerHandle {
|
|
76
|
+
port: number;
|
|
77
|
+
waitForCallback: () => Promise<CallbackResult>;
|
|
78
|
+
close: () => void;
|
|
79
|
+
}
|
|
80
|
+
export declare function startCallbackServer(timeoutMs?: number): CallbackServerHandle;
|
|
81
|
+
export declare function performOAuthFlow(projectId?: string, openBrowser?: (url: string) => Promise<void>, clientId?: string, clientSecret?: string): Promise<{
|
|
82
|
+
tokens: AntigravityTokenExchangeResult;
|
|
83
|
+
userInfo: AntigravityUserInfo;
|
|
84
|
+
verifier: string;
|
|
85
|
+
}>;
|