oh-my-opencode 2.9.0 → 2.10.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/README.ja.md +13 -1
- package/README.ko.md +13 -1
- package/README.md +32 -1
- package/README.zh-cn.md +13 -1
- package/dist/agents/sisyphus-prompt-builder.d.ts +7 -2
- package/dist/agents/sisyphus.d.ts +2 -2
- package/dist/agents/utils.d.ts +7 -1
- 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 +1 -0
- package/dist/cli/doctor/constants.d.ts +1 -0
- package/dist/cli/index.js +148 -4
- package/dist/config/schema.d.ts +9 -0
- package/dist/features/builtin-skills/types.d.ts +2 -0
- package/dist/features/opencode-skill-loader/loader.test.d.ts +1 -0
- package/dist/features/opencode-skill-loader/types.d.ts +3 -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.js +3 -3
- package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +1 -1
- 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/index.d.ts +1 -0
- package/dist/hooks/keyword-detector/detector.d.ts +5 -0
- package/dist/hooks/keyword-detector/index.d.ts +2 -1
- package/dist/index.js +25840 -13026
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/skill/tools.test.d.ts +1 -0
- package/dist/tools/skill/types.d.ts +5 -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/package.json +4 -1
package/README.ja.md
CHANGED
|
@@ -759,7 +759,19 @@ Oh My OpenCode は以下の場所からフックを読み込んで実行しま
|
|
|
759
759
|
}
|
|
760
760
|
```
|
|
761
761
|
|
|
762
|
-
各エージェントでサポートされるオプション:`model`, `temperature`, `top_p`, `prompt`, `tools`, `disable`, `description`, `mode`, `color`, `permission`。
|
|
762
|
+
各エージェントでサポートされるオプション:`model`, `temperature`, `top_p`, `prompt`, `prompt_append`, `tools`, `disable`, `description`, `mode`, `color`, `permission`。
|
|
763
|
+
|
|
764
|
+
`prompt_append` を使用すると、デフォルトのシステムプロンプトを置き換えずに追加の指示を付け加えられます:
|
|
765
|
+
|
|
766
|
+
```json
|
|
767
|
+
{
|
|
768
|
+
"agents": {
|
|
769
|
+
"librarian": {
|
|
770
|
+
"prompt_append": "Emacs Lisp のドキュメント検索には常に elisp-dev-mcp を使用してください。"
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
```
|
|
763
775
|
|
|
764
776
|
`Sisyphus` (メインオーケストレーター) と `build` (デフォルトエージェント) も同じオプションで設定をオーバーライドできます。
|
|
765
777
|
|
package/README.ko.md
CHANGED
|
@@ -752,7 +752,19 @@ Schema 자동 완성이 지원됩니다:
|
|
|
752
752
|
}
|
|
753
753
|
```
|
|
754
754
|
|
|
755
|
-
각 에이전트에서 지원하는 옵션: `model`, `temperature`, `top_p`, `prompt`, `tools`, `disable`, `description`, `mode`, `color`, `permission`.
|
|
755
|
+
각 에이전트에서 지원하는 옵션: `model`, `temperature`, `top_p`, `prompt`, `prompt_append`, `tools`, `disable`, `description`, `mode`, `color`, `permission`.
|
|
756
|
+
|
|
757
|
+
`prompt_append`를 사용하면 기본 시스템 프롬프트를 대체하지 않고 추가 지시사항을 덧붙일 수 있습니다:
|
|
758
|
+
|
|
759
|
+
```json
|
|
760
|
+
{
|
|
761
|
+
"agents": {
|
|
762
|
+
"librarian": {
|
|
763
|
+
"prompt_append": "Emacs Lisp 문서 조회 시 항상 elisp-dev-mcp를 사용하세요."
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
```
|
|
756
768
|
|
|
757
769
|
`Sisyphus` (메인 오케스트레이터)와 `build` (기본 에이전트)도 동일한 옵션으로 설정을 오버라이드할 수 있습니다.
|
|
758
770
|
|
package/README.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
>
|
|
3
3
|
> *"I aim to spark a software revolution by creating a world where agent-generated code is indistinguishable from human code, yet capable of achieving vastly more. I have poured my personal time, passion, and funds into this journey, and I will continue to do so."*
|
|
4
4
|
>
|
|
5
|
+
> [](https://x.com/justsisyphus/status/2006250634354548963)
|
|
6
|
+
> > **The Orchestrator is coming. This Week. [Get notified on X](https://x.com/justsisyphus/status/2006250634354548963)**
|
|
7
|
+
>
|
|
5
8
|
> Be with us!
|
|
6
9
|
>
|
|
7
10
|
> | [<img alt="Discord link" src="https://img.shields.io/discord/1452487457085063218?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square" width="156px" />](https://discord.gg/PWpXmbhF) | Join our [Discord community](https://discord.gg/PWpXmbhF) to connect with contributors and fellow `oh-my-opencode` users. |
|
|
@@ -791,7 +794,19 @@ Override built-in agent settings:
|
|
|
791
794
|
}
|
|
792
795
|
```
|
|
793
796
|
|
|
794
|
-
Each agent supports: `model`, `temperature`, `top_p`, `prompt`, `tools`, `disable`, `description`, `mode`, `color`, `permission`.
|
|
797
|
+
Each agent supports: `model`, `temperature`, `top_p`, `prompt`, `prompt_append`, `tools`, `disable`, `description`, `mode`, `color`, `permission`.
|
|
798
|
+
|
|
799
|
+
Use `prompt_append` to add extra instructions without replacing the default system prompt:
|
|
800
|
+
|
|
801
|
+
```json
|
|
802
|
+
{
|
|
803
|
+
"agents": {
|
|
804
|
+
"librarian": {
|
|
805
|
+
"prompt_append": "Always use the elisp-dev-mcp for Emacs Lisp documentation lookups."
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
```
|
|
795
810
|
|
|
796
811
|
You can also override settings for `Sisyphus` (the main orchestrator) and `build` (the default agent) using the same options.
|
|
797
812
|
|
|
@@ -831,6 +846,22 @@ Or disable via `disabled_agents` in `~/.config/opencode/oh-my-opencode.json` or
|
|
|
831
846
|
|
|
832
847
|
Available agents: `oracle`, `librarian`, `explore`, `frontend-ui-ux-engineer`, `document-writer`, `multimodal-looker`
|
|
833
848
|
|
|
849
|
+
### Built-in Skills
|
|
850
|
+
|
|
851
|
+
Oh My OpenCode includes built-in skills that provide additional capabilities:
|
|
852
|
+
|
|
853
|
+
- **playwright**: Browser automation with Playwright MCP. Use for web scraping, testing, screenshots, and browser interactions.
|
|
854
|
+
|
|
855
|
+
Disable built-in skills via `disabled_skills` in `~/.config/opencode/oh-my-opencode.json` or `.opencode/oh-my-opencode.json`:
|
|
856
|
+
|
|
857
|
+
```json
|
|
858
|
+
{
|
|
859
|
+
"disabled_skills": ["playwright"]
|
|
860
|
+
}
|
|
861
|
+
```
|
|
862
|
+
|
|
863
|
+
Available built-in skills: `playwright`
|
|
864
|
+
|
|
834
865
|
### Sisyphus Agent
|
|
835
866
|
|
|
836
867
|
When enabled (default), Sisyphus provides a powerful orchestrator with optional specialized agents:
|
package/README.zh-cn.md
CHANGED
|
@@ -763,7 +763,19 @@ Agent 爽了,你自然也爽。但我还想直接让你爽。
|
|
|
763
763
|
}
|
|
764
764
|
```
|
|
765
765
|
|
|
766
|
-
每个 Agent 能改这些:`model`、`temperature`、`top_p`、`prompt`、`tools`、`disable`、`description`、`mode`、`color`、`permission`。
|
|
766
|
+
每个 Agent 能改这些:`model`、`temperature`、`top_p`、`prompt`、`prompt_append`、`tools`、`disable`、`description`、`mode`、`color`、`permission`。
|
|
767
|
+
|
|
768
|
+
用 `prompt_append` 可以在默认系统提示后面追加额外指令,不用替换整个提示:
|
|
769
|
+
|
|
770
|
+
```json
|
|
771
|
+
{
|
|
772
|
+
"agents": {
|
|
773
|
+
"librarian": {
|
|
774
|
+
"prompt_append": "查 Emacs Lisp 文档时用 elisp-dev-mcp。"
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
```
|
|
767
779
|
|
|
768
780
|
`Sisyphus`(主编排器)和 `build`(默认 Agent)也能改。
|
|
769
781
|
|
|
@@ -8,9 +8,14 @@ export interface AvailableTool {
|
|
|
8
8
|
name: string;
|
|
9
9
|
category: "lsp" | "ast" | "search" | "session" | "command" | "other";
|
|
10
10
|
}
|
|
11
|
+
export interface AvailableSkill {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
location: "user" | "project" | "plugin";
|
|
15
|
+
}
|
|
11
16
|
export declare function categorizeTools(toolNames: string[]): AvailableTool[];
|
|
12
|
-
export declare function buildKeyTriggersSection(agents: AvailableAgent[]): string;
|
|
13
|
-
export declare function buildToolSelectionTable(agents: AvailableAgent[], tools?: AvailableTool[]): string;
|
|
17
|
+
export declare function buildKeyTriggersSection(agents: AvailableAgent[], skills?: AvailableSkill[]): string;
|
|
18
|
+
export declare function buildToolSelectionTable(agents: AvailableAgent[], tools?: AvailableTool[], skills?: AvailableSkill[]): string;
|
|
14
19
|
export declare function buildExploreSection(agents: AvailableAgent[]): string;
|
|
15
20
|
export declare function buildLibrarianSection(agents: AvailableAgent[]): string;
|
|
16
21
|
export declare function buildDelegationTable(agents: AvailableAgent[]): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
-
import type { AvailableAgent } from "./sisyphus-prompt-builder";
|
|
3
|
-
export declare function createSisyphusAgent(model?: string, availableAgents?: AvailableAgent[], availableToolNames?: string[]): AgentConfig;
|
|
2
|
+
import type { AvailableAgent, AvailableSkill } from "./sisyphus-prompt-builder";
|
|
3
|
+
export declare function createSisyphusAgent(model?: string, availableAgents?: AvailableAgent[], availableToolNames?: string[], availableSkills?: AvailableSkill[]): AgentConfig;
|
|
4
4
|
export declare const sisyphusAgent: AgentConfig;
|
package/dist/agents/utils.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
2
|
import type { BuiltinAgentName, AgentOverrides } from "./types";
|
|
3
|
-
|
|
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;
|
|
4
10
|
export declare function createBuiltinAgents(disabledAgents?: BuiltinAgentName[], agentOverrides?: AgentOverrides, directory?: string, systemDefaultModel?: string): Record<string, AgentConfig>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CheckResult, CheckDefinition } from "../types";
|
|
2
|
+
export interface GhCliInfo {
|
|
3
|
+
installed: boolean;
|
|
4
|
+
version: string | null;
|
|
5
|
+
path: string | null;
|
|
6
|
+
authenticated: boolean;
|
|
7
|
+
username: string | null;
|
|
8
|
+
scopes: string[];
|
|
9
|
+
error: string | null;
|
|
10
|
+
}
|
|
11
|
+
export declare function getGhCliInfo(): Promise<GhCliInfo>;
|
|
12
|
+
export declare function checkGhCli(): Promise<CheckResult>;
|
|
13
|
+
export declare function getGhCliCheckDefinition(): CheckDefinition;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -23,6 +23,7 @@ export declare const CHECK_IDS: {
|
|
|
23
23
|
readonly DEP_AST_GREP_CLI: "dep-ast-grep-cli";
|
|
24
24
|
readonly DEP_AST_GREP_NAPI: "dep-ast-grep-napi";
|
|
25
25
|
readonly DEP_COMMENT_CHECKER: "dep-comment-checker";
|
|
26
|
+
readonly GH_CLI: "gh-cli";
|
|
26
27
|
readonly LSP_SERVERS: "lsp-servers";
|
|
27
28
|
readonly MCP_BUILTIN: "mcp-builtin";
|
|
28
29
|
readonly MCP_USER: "mcp-user";
|
package/dist/cli/index.js
CHANGED
|
@@ -2657,7 +2657,7 @@ var require_napi = __commonJS((exports, module) => {
|
|
|
2657
2657
|
var require_package = __commonJS((exports, module) => {
|
|
2658
2658
|
module.exports = {
|
|
2659
2659
|
name: "oh-my-opencode",
|
|
2660
|
-
version: "2.
|
|
2660
|
+
version: "2.9.1",
|
|
2661
2661
|
description: "OpenCode plugin - custom agents (oracle, librarian) and enhanced features",
|
|
2662
2662
|
main: "dist/index.js",
|
|
2663
2663
|
types: "dist/index.d.ts",
|
|
@@ -2711,11 +2711,13 @@ var require_package = __commonJS((exports, module) => {
|
|
|
2711
2711
|
"@ast-grep/napi": "^0.40.0",
|
|
2712
2712
|
"@clack/prompts": "^0.11.0",
|
|
2713
2713
|
"@code-yeongyu/comment-checker": "^0.6.1",
|
|
2714
|
+
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
2714
2715
|
"@openauthjs/openauth": "^0.4.3",
|
|
2715
2716
|
"@opencode-ai/plugin": "^1.0.162",
|
|
2716
2717
|
"@opencode-ai/sdk": "^1.0.162",
|
|
2717
2718
|
commander: "^14.0.2",
|
|
2718
2719
|
hono: "^4.10.4",
|
|
2720
|
+
"js-yaml": "^4.1.1",
|
|
2719
2721
|
"jsonc-parser": "^3.3.1",
|
|
2720
2722
|
picocolors: "^1.1.1",
|
|
2721
2723
|
picomatch: "^4.0.2",
|
|
@@ -2723,6 +2725,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
2723
2725
|
zod: "^4.1.8"
|
|
2724
2726
|
},
|
|
2725
2727
|
devDependencies: {
|
|
2728
|
+
"@types/js-yaml": "^4.0.9",
|
|
2726
2729
|
"@types/picomatch": "^3.0.2",
|
|
2727
2730
|
"bun-types": "latest",
|
|
2728
2731
|
typescript: "^5.7.3"
|
|
@@ -7242,6 +7245,7 @@ var CHECK_IDS = {
|
|
|
7242
7245
|
DEP_AST_GREP_CLI: "dep-ast-grep-cli",
|
|
7243
7246
|
DEP_AST_GREP_NAPI: "dep-ast-grep-napi",
|
|
7244
7247
|
DEP_COMMENT_CHECKER: "dep-comment-checker",
|
|
7248
|
+
GH_CLI: "gh-cli",
|
|
7245
7249
|
LSP_SERVERS: "lsp-servers",
|
|
7246
7250
|
MCP_BUILTIN: "mcp-builtin",
|
|
7247
7251
|
MCP_USER: "mcp-user",
|
|
@@ -7257,6 +7261,7 @@ var CHECK_NAMES = {
|
|
|
7257
7261
|
[CHECK_IDS.DEP_AST_GREP_CLI]: "AST-Grep CLI",
|
|
7258
7262
|
[CHECK_IDS.DEP_AST_GREP_NAPI]: "AST-Grep NAPI",
|
|
7259
7263
|
[CHECK_IDS.DEP_COMMENT_CHECKER]: "Comment Checker",
|
|
7264
|
+
[CHECK_IDS.GH_CLI]: "GitHub CLI",
|
|
7260
7265
|
[CHECK_IDS.LSP_SERVERS]: "LSP Servers",
|
|
7261
7266
|
[CHECK_IDS.MCP_BUILTIN]: "Built-in MCP Servers",
|
|
7262
7267
|
[CHECK_IDS.MCP_USER]: "User MCP Configuration",
|
|
@@ -19839,6 +19844,9 @@ var BuiltinAgentNameSchema = exports_external.enum([
|
|
|
19839
19844
|
"document-writer",
|
|
19840
19845
|
"multimodal-looker"
|
|
19841
19846
|
]);
|
|
19847
|
+
var BuiltinSkillNameSchema = exports_external.enum([
|
|
19848
|
+
"playwright"
|
|
19849
|
+
]);
|
|
19842
19850
|
var OverridableAgentNameSchema = exports_external.enum([
|
|
19843
19851
|
"build",
|
|
19844
19852
|
"plan",
|
|
@@ -19878,7 +19886,8 @@ var HookNameSchema = exports_external.enum([
|
|
|
19878
19886
|
"ralph-loop",
|
|
19879
19887
|
"preemptive-compaction",
|
|
19880
19888
|
"compaction-context-injector",
|
|
19881
|
-
"claude-code-hooks"
|
|
19889
|
+
"claude-code-hooks",
|
|
19890
|
+
"auto-slash-command"
|
|
19882
19891
|
]);
|
|
19883
19892
|
var BuiltinCommandNameSchema = exports_external.enum([
|
|
19884
19893
|
"init-deep"
|
|
@@ -20010,6 +20019,7 @@ var OhMyOpenCodeConfigSchema = exports_external.object({
|
|
|
20010
20019
|
$schema: exports_external.string().optional(),
|
|
20011
20020
|
disabled_mcps: exports_external.array(McpNameSchema).optional(),
|
|
20012
20021
|
disabled_agents: exports_external.array(BuiltinAgentNameSchema).optional(),
|
|
20022
|
+
disabled_skills: exports_external.array(BuiltinSkillNameSchema).optional(),
|
|
20013
20023
|
disabled_hooks: exports_external.array(HookNameSchema).optional(),
|
|
20014
20024
|
disabled_commands: exports_external.array(BuiltinCommandNameSchema).optional(),
|
|
20015
20025
|
agents: AgentOverridesSchema.optional(),
|
|
@@ -20363,6 +20373,139 @@ function getDependencyCheckDefinitions() {
|
|
|
20363
20373
|
];
|
|
20364
20374
|
}
|
|
20365
20375
|
|
|
20376
|
+
// src/cli/doctor/checks/gh.ts
|
|
20377
|
+
async function checkBinaryExists2(binary) {
|
|
20378
|
+
try {
|
|
20379
|
+
const proc = Bun.spawn(["which", binary], { stdout: "pipe", stderr: "pipe" });
|
|
20380
|
+
const output = await new Response(proc.stdout).text();
|
|
20381
|
+
await proc.exited;
|
|
20382
|
+
if (proc.exitCode === 0) {
|
|
20383
|
+
return { exists: true, path: output.trim() };
|
|
20384
|
+
}
|
|
20385
|
+
} catch {}
|
|
20386
|
+
return { exists: false, path: null };
|
|
20387
|
+
}
|
|
20388
|
+
async function getGhVersion() {
|
|
20389
|
+
try {
|
|
20390
|
+
const proc = Bun.spawn(["gh", "--version"], { stdout: "pipe", stderr: "pipe" });
|
|
20391
|
+
const output = await new Response(proc.stdout).text();
|
|
20392
|
+
await proc.exited;
|
|
20393
|
+
if (proc.exitCode === 0) {
|
|
20394
|
+
const match = output.match(/gh version (\S+)/);
|
|
20395
|
+
return match?.[1] ?? output.trim().split(`
|
|
20396
|
+
`)[0];
|
|
20397
|
+
}
|
|
20398
|
+
} catch {}
|
|
20399
|
+
return null;
|
|
20400
|
+
}
|
|
20401
|
+
async function getGhAuthStatus() {
|
|
20402
|
+
try {
|
|
20403
|
+
const proc = Bun.spawn(["gh", "auth", "status"], {
|
|
20404
|
+
stdout: "pipe",
|
|
20405
|
+
stderr: "pipe",
|
|
20406
|
+
env: { ...process.env, GH_NO_UPDATE_NOTIFIER: "1" }
|
|
20407
|
+
});
|
|
20408
|
+
const stdout = await new Response(proc.stdout).text();
|
|
20409
|
+
const stderr = await new Response(proc.stderr).text();
|
|
20410
|
+
await proc.exited;
|
|
20411
|
+
const output = stderr || stdout;
|
|
20412
|
+
if (proc.exitCode === 0) {
|
|
20413
|
+
const usernameMatch = output.match(/Logged in to github\.com account (\S+)/);
|
|
20414
|
+
const username = usernameMatch?.[1]?.replace(/[()]/g, "") ?? null;
|
|
20415
|
+
const scopesMatch = output.match(/Token scopes?:\s*(.+)/i);
|
|
20416
|
+
const scopes = scopesMatch?.[1] ? scopesMatch[1].split(/,\s*/).map((s) => s.replace(/['"]/g, "").trim()).filter(Boolean) : [];
|
|
20417
|
+
return { authenticated: true, username, scopes, error: null };
|
|
20418
|
+
}
|
|
20419
|
+
const errorMatch = output.match(/error[:\s]+(.+)/i);
|
|
20420
|
+
return {
|
|
20421
|
+
authenticated: false,
|
|
20422
|
+
username: null,
|
|
20423
|
+
scopes: [],
|
|
20424
|
+
error: errorMatch?.[1]?.trim() ?? "Not authenticated"
|
|
20425
|
+
};
|
|
20426
|
+
} catch (err) {
|
|
20427
|
+
return {
|
|
20428
|
+
authenticated: false,
|
|
20429
|
+
username: null,
|
|
20430
|
+
scopes: [],
|
|
20431
|
+
error: err instanceof Error ? err.message : "Failed to check auth status"
|
|
20432
|
+
};
|
|
20433
|
+
}
|
|
20434
|
+
}
|
|
20435
|
+
async function getGhCliInfo() {
|
|
20436
|
+
const binaryCheck = await checkBinaryExists2("gh");
|
|
20437
|
+
if (!binaryCheck.exists) {
|
|
20438
|
+
return {
|
|
20439
|
+
installed: false,
|
|
20440
|
+
version: null,
|
|
20441
|
+
path: null,
|
|
20442
|
+
authenticated: false,
|
|
20443
|
+
username: null,
|
|
20444
|
+
scopes: [],
|
|
20445
|
+
error: null
|
|
20446
|
+
};
|
|
20447
|
+
}
|
|
20448
|
+
const [version2, authStatus] = await Promise.all([getGhVersion(), getGhAuthStatus()]);
|
|
20449
|
+
return {
|
|
20450
|
+
installed: true,
|
|
20451
|
+
version: version2,
|
|
20452
|
+
path: binaryCheck.path,
|
|
20453
|
+
authenticated: authStatus.authenticated,
|
|
20454
|
+
username: authStatus.username,
|
|
20455
|
+
scopes: authStatus.scopes,
|
|
20456
|
+
error: authStatus.error
|
|
20457
|
+
};
|
|
20458
|
+
}
|
|
20459
|
+
async function checkGhCli() {
|
|
20460
|
+
const info = await getGhCliInfo();
|
|
20461
|
+
const name = CHECK_NAMES[CHECK_IDS.GH_CLI];
|
|
20462
|
+
if (!info.installed) {
|
|
20463
|
+
return {
|
|
20464
|
+
name,
|
|
20465
|
+
status: "warn",
|
|
20466
|
+
message: "Not installed (optional)",
|
|
20467
|
+
details: [
|
|
20468
|
+
"GitHub CLI is used by librarian agent and scripts",
|
|
20469
|
+
"Install: https://cli.github.com/"
|
|
20470
|
+
]
|
|
20471
|
+
};
|
|
20472
|
+
}
|
|
20473
|
+
if (!info.authenticated) {
|
|
20474
|
+
return {
|
|
20475
|
+
name,
|
|
20476
|
+
status: "warn",
|
|
20477
|
+
message: `${info.version ?? "installed"} - not authenticated`,
|
|
20478
|
+
details: [
|
|
20479
|
+
info.path ? `Path: ${info.path}` : null,
|
|
20480
|
+
"Authenticate: gh auth login",
|
|
20481
|
+
info.error ? `Error: ${info.error}` : null
|
|
20482
|
+
].filter((d3) => d3 !== null)
|
|
20483
|
+
};
|
|
20484
|
+
}
|
|
20485
|
+
const details = [];
|
|
20486
|
+
if (info.path)
|
|
20487
|
+
details.push(`Path: ${info.path}`);
|
|
20488
|
+
if (info.username)
|
|
20489
|
+
details.push(`Account: ${info.username}`);
|
|
20490
|
+
if (info.scopes.length > 0)
|
|
20491
|
+
details.push(`Scopes: ${info.scopes.join(", ")}`);
|
|
20492
|
+
return {
|
|
20493
|
+
name,
|
|
20494
|
+
status: "pass",
|
|
20495
|
+
message: `${info.version ?? "installed"} - authenticated as ${info.username ?? "unknown"}`,
|
|
20496
|
+
details: details.length > 0 ? details : undefined
|
|
20497
|
+
};
|
|
20498
|
+
}
|
|
20499
|
+
function getGhCliCheckDefinition() {
|
|
20500
|
+
return {
|
|
20501
|
+
id: CHECK_IDS.GH_CLI,
|
|
20502
|
+
name: CHECK_NAMES[CHECK_IDS.GH_CLI],
|
|
20503
|
+
category: "tools",
|
|
20504
|
+
check: checkGhCli,
|
|
20505
|
+
critical: false
|
|
20506
|
+
};
|
|
20507
|
+
}
|
|
20508
|
+
|
|
20366
20509
|
// src/cli/doctor/checks/lsp.ts
|
|
20367
20510
|
var DEFAULT_LSP_SERVERS = [
|
|
20368
20511
|
{ id: "typescript-language-server", binary: "typescript-language-server", extensions: [".ts", ".tsx", ".js", ".jsx"] },
|
|
@@ -20370,7 +20513,7 @@ var DEFAULT_LSP_SERVERS = [
|
|
|
20370
20513
|
{ id: "rust-analyzer", binary: "rust-analyzer", extensions: [".rs"] },
|
|
20371
20514
|
{ id: "gopls", binary: "gopls", extensions: [".go"] }
|
|
20372
20515
|
];
|
|
20373
|
-
async function
|
|
20516
|
+
async function checkBinaryExists3(binary) {
|
|
20374
20517
|
try {
|
|
20375
20518
|
const proc = Bun.spawn(["which", binary], { stdout: "pipe", stderr: "pipe" });
|
|
20376
20519
|
await proc.exited;
|
|
@@ -20382,7 +20525,7 @@ async function checkBinaryExists2(binary) {
|
|
|
20382
20525
|
async function getLspServersInfo() {
|
|
20383
20526
|
const servers = [];
|
|
20384
20527
|
for (const server2 of DEFAULT_LSP_SERVERS) {
|
|
20385
|
-
const installed = await
|
|
20528
|
+
const installed = await checkBinaryExists3(server2.binary);
|
|
20386
20529
|
servers.push({
|
|
20387
20530
|
id: server2.id,
|
|
20388
20531
|
installed,
|
|
@@ -20655,6 +20798,7 @@ function getAllCheckDefinitions() {
|
|
|
20655
20798
|
getConfigCheckDefinition(),
|
|
20656
20799
|
...getAuthCheckDefinitions(),
|
|
20657
20800
|
...getDependencyCheckDefinitions(),
|
|
20801
|
+
getGhCliCheckDefinition(),
|
|
20658
20802
|
getLspCheckDefinition(),
|
|
20659
20803
|
...getMcpCheckDefinitions(),
|
|
20660
20804
|
getVersionCheckDefinition()
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export declare const BuiltinAgentNameSchema: z.ZodEnum<{
|
|
|
8
8
|
"document-writer": "document-writer";
|
|
9
9
|
"multimodal-looker": "multimodal-looker";
|
|
10
10
|
}>;
|
|
11
|
+
export declare const BuiltinSkillNameSchema: z.ZodEnum<{
|
|
12
|
+
playwright: "playwright";
|
|
13
|
+
}>;
|
|
11
14
|
export declare const OverridableAgentNameSchema: z.ZodEnum<{
|
|
12
15
|
Sisyphus: "Sisyphus";
|
|
13
16
|
oracle: "oracle";
|
|
@@ -57,6 +60,7 @@ export declare const HookNameSchema: z.ZodEnum<{
|
|
|
57
60
|
"preemptive-compaction": "preemptive-compaction";
|
|
58
61
|
"compaction-context-injector": "compaction-context-injector";
|
|
59
62
|
"claude-code-hooks": "claude-code-hooks";
|
|
63
|
+
"auto-slash-command": "auto-slash-command";
|
|
60
64
|
}>;
|
|
61
65
|
export declare const BuiltinCommandNameSchema: z.ZodEnum<{
|
|
62
66
|
"init-deep": "init-deep";
|
|
@@ -781,6 +785,9 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
781
785
|
"document-writer": "document-writer";
|
|
782
786
|
"multimodal-looker": "multimodal-looker";
|
|
783
787
|
}>>>;
|
|
788
|
+
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
789
|
+
playwright: "playwright";
|
|
790
|
+
}>>>;
|
|
784
791
|
disabled_hooks: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
785
792
|
"anthropic-context-window-limit-recovery": "anthropic-context-window-limit-recovery";
|
|
786
793
|
"todo-continuation-enforcer": "todo-continuation-enforcer";
|
|
@@ -808,6 +815,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
808
815
|
"preemptive-compaction": "preemptive-compaction";
|
|
809
816
|
"compaction-context-injector": "compaction-context-injector";
|
|
810
817
|
"claude-code-hooks": "claude-code-hooks";
|
|
818
|
+
"auto-slash-command": "auto-slash-command";
|
|
811
819
|
}>>>;
|
|
812
820
|
disabled_commands: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
813
821
|
"init-deep": "init-deep";
|
|
@@ -1419,6 +1427,7 @@ export type AgentOverrides = z.infer<typeof AgentOverridesSchema>;
|
|
|
1419
1427
|
export type AgentName = z.infer<typeof AgentNameSchema>;
|
|
1420
1428
|
export type HookName = z.infer<typeof HookNameSchema>;
|
|
1421
1429
|
export type BuiltinCommandName = z.infer<typeof BuiltinCommandNameSchema>;
|
|
1430
|
+
export type BuiltinSkillName = z.infer<typeof BuiltinSkillNameSchema>;
|
|
1422
1431
|
export type SisyphusAgentConfig = z.infer<typeof SisyphusAgentConfigSchema>;
|
|
1423
1432
|
export type CommentCheckerConfig = z.infer<typeof CommentCheckerConfigSchema>;
|
|
1424
1433
|
export type ExperimentalConfig = z.infer<typeof ExperimentalConfigSchema>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SkillMcpConfig } from "../skill-mcp-manager/types";
|
|
1
2
|
export interface BuiltinSkill {
|
|
2
3
|
name: string;
|
|
3
4
|
description: string;
|
|
@@ -10,4 +11,5 @@ export interface BuiltinSkill {
|
|
|
10
11
|
model?: string;
|
|
11
12
|
subtask?: boolean;
|
|
12
13
|
argumentHint?: string;
|
|
14
|
+
mcpConfig?: SkillMcpConfig;
|
|
13
15
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CommandDefinition } from "../claude-code-command-loader/types";
|
|
2
|
+
import type { SkillMcpConfig } from "../skill-mcp-manager/types";
|
|
2
3
|
export type SkillScope = "builtin" | "config" | "user" | "project" | "opencode" | "opencode-project";
|
|
3
4
|
export interface SkillMetadata {
|
|
4
5
|
name?: string;
|
|
@@ -11,6 +12,7 @@ export interface SkillMetadata {
|
|
|
11
12
|
compatibility?: string;
|
|
12
13
|
metadata?: Record<string, string>;
|
|
13
14
|
"allowed-tools"?: string;
|
|
15
|
+
mcp?: SkillMcpConfig;
|
|
14
16
|
}
|
|
15
17
|
export interface LoadedSkill {
|
|
16
18
|
name: string;
|
|
@@ -22,4 +24,5 @@ export interface LoadedSkill {
|
|
|
22
24
|
compatibility?: string;
|
|
23
25
|
metadata?: Record<string, string>;
|
|
24
26
|
allowedTools?: string[];
|
|
27
|
+
mcpConfig?: SkillMcpConfig;
|
|
25
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
|
+
}
|
package/dist/google-auth.js
CHANGED
|
@@ -59,12 +59,12 @@ var GOOGLE_TOKEN_URL = "https://oauth2.googleapis.com/token";
|
|
|
59
59
|
var GOOGLE_USERINFO_URL = "https://www.googleapis.com/oauth2/v1/userinfo";
|
|
60
60
|
var ANTIGRAVITY_TOKEN_REFRESH_BUFFER_MS = 60000;
|
|
61
61
|
var SKIP_THOUGHT_SIGNATURE_VALIDATOR = "skip_thought_signature_validator";
|
|
62
|
-
// node_modules/jose/dist/browser/lib/buffer_utils.js
|
|
62
|
+
// node_modules/@openauthjs/openauth/node_modules/jose/dist/browser/lib/buffer_utils.js
|
|
63
63
|
var encoder = new TextEncoder;
|
|
64
64
|
var decoder = new TextDecoder;
|
|
65
65
|
var MAX_INT32 = 2 ** 32;
|
|
66
66
|
|
|
67
|
-
// node_modules/jose/dist/browser/runtime/base64url.js
|
|
67
|
+
// node_modules/@openauthjs/openauth/node_modules/jose/dist/browser/runtime/base64url.js
|
|
68
68
|
var encodeBase64 = (input) => {
|
|
69
69
|
let unencoded = input;
|
|
70
70
|
if (typeof unencoded === "string") {
|
|
@@ -101,7 +101,7 @@ var decode = (input) => {
|
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
-
// node_modules/jose/dist/browser/util/base64url.js
|
|
104
|
+
// node_modules/@openauthjs/openauth/node_modules/jose/dist/browser/util/base64url.js
|
|
105
105
|
var exports_base64url = {};
|
|
106
106
|
__export(exports_base64url, {
|
|
107
107
|
encode: () => encode2,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const HOOK_NAME: "auto-slash-command";
|
|
2
|
+
export declare const AUTO_SLASH_COMMAND_TAG_OPEN = "<auto-slash-command>";
|
|
3
|
+
export declare const AUTO_SLASH_COMMAND_TAG_CLOSE = "</auto-slash-command>";
|
|
4
|
+
export declare const SLASH_COMMAND_PATTERN: RegExp;
|
|
5
|
+
export declare const EXCLUDED_COMMANDS: Set<string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ParsedSlashCommand } from "./types";
|
|
2
|
+
export declare function removeCodeBlocks(text: string): string;
|
|
3
|
+
export declare function parseSlashCommand(text: string): ParsedSlashCommand | null;
|
|
4
|
+
export declare function isExcludedCommand(command: string): boolean;
|
|
5
|
+
export declare function detectSlashCommand(text: string): ParsedSlashCommand | null;
|
|
6
|
+
export declare function extractPromptText(parts: Array<{
|
|
7
|
+
type: string;
|
|
8
|
+
text?: string;
|
|
9
|
+
}>): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AutoSlashCommandHookInput, AutoSlashCommandHookOutput } from "./types";
|
|
2
|
+
export * from "./detector";
|
|
3
|
+
export * from "./executor";
|
|
4
|
+
export * from "./constants";
|
|
5
|
+
export * from "./types";
|
|
6
|
+
export declare function createAutoSlashCommandHook(): {
|
|
7
|
+
"chat.message": (input: AutoSlashCommandHookInput, output: AutoSlashCommandHookOutput) => Promise<void>;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface AutoSlashCommandHookInput {
|
|
2
|
+
sessionID: string;
|
|
3
|
+
agent?: string;
|
|
4
|
+
model?: {
|
|
5
|
+
providerID: string;
|
|
6
|
+
modelID: string;
|
|
7
|
+
};
|
|
8
|
+
messageID?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface AutoSlashCommandHookOutput {
|
|
11
|
+
message: Record<string, unknown>;
|
|
12
|
+
parts: Array<{
|
|
13
|
+
type: string;
|
|
14
|
+
text?: string;
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
export interface ParsedSlashCommand {
|
|
19
|
+
command: string;
|
|
20
|
+
args: string;
|
|
21
|
+
raw: string;
|
|
22
|
+
}
|
|
23
|
+
export interface AutoSlashCommandResult {
|
|
24
|
+
detected: boolean;
|
|
25
|
+
parsedCommand?: ParsedSlashCommand;
|
|
26
|
+
injectedMessage?: string;
|
|
27
|
+
}
|