bluekiwi 0.2.0 → 0.2.3
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/dist/assets/index.js +10 -0
- package/dist/assets/mcp/api-client.d.ts +4 -4
- package/dist/assets/mcp/api-client.js +60 -54
- package/dist/assets/mcp/errors.d.ts +6 -6
- package/dist/assets/mcp/errors.js +18 -18
- package/dist/assets/mcp/server.js +21985 -838
- package/dist/runtimes/claude-code.js +8 -6
- package/dist/runtimes/codex.js +6 -5
- package/dist/runtimes/gemini-cli.js +6 -5
- package/dist/runtimes/openclaw.js +6 -5
- package/dist/runtimes/opencode.js +6 -5
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, writeFileSync, readFileSync, rmSync } from "fs";
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, rmSync, } from "fs";
|
|
2
2
|
import { homedir } from "os";
|
|
3
3
|
import { join } from "path";
|
|
4
4
|
const BASE = join(homedir(), ".claude");
|
|
5
5
|
const SKILLS_DIR = join(BASE, "skills");
|
|
6
|
-
|
|
6
|
+
// Claude Code reads MCP config from ~/.claude.json (top-level mcpServers key)
|
|
7
|
+
const MCP_CONFIG = join(homedir(), ".claude.json");
|
|
7
8
|
export class ClaudeCodeAdapter {
|
|
8
9
|
name = "claude-code";
|
|
9
10
|
displayName = "Claude Code";
|
|
@@ -38,10 +39,11 @@ export class ClaudeCodeAdapter {
|
|
|
38
39
|
writeFileSync(MCP_CONFIG, JSON.stringify(existing, null, 2));
|
|
39
40
|
}
|
|
40
41
|
uninstall() {
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
if (existsSync(SKILLS_DIR)) {
|
|
43
|
+
for (const entry of readdirSync(SKILLS_DIR)) {
|
|
44
|
+
if (entry.startsWith("bk-")) {
|
|
45
|
+
rmSync(join(SKILLS_DIR, entry), { recursive: true, force: true });
|
|
46
|
+
}
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
if (existsSync(MCP_CONFIG)) {
|
package/dist/runtimes/codex.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, writeFileSync, readFileSync, rmSync } from "fs";
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, rmSync, } from "fs";
|
|
2
2
|
import { homedir } from "os";
|
|
3
3
|
import { join } from "path";
|
|
4
4
|
const BASE = join(homedir(), ".codex");
|
|
@@ -44,10 +44,11 @@ export class CodexAdapter {
|
|
|
44
44
|
const existing = readFileSync(MCP_CONFIG, "utf8");
|
|
45
45
|
writeFileSync(MCP_CONFIG, existing.replace(/\n?\[mcp_servers\.bluekiwi\][\s\S]*?(?=\n\[|$)/g, ""));
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
if (existsSync(SKILLS_DIR)) {
|
|
48
|
+
for (const entry of readdirSync(SKILLS_DIR)) {
|
|
49
|
+
if (entry.startsWith("bk-")) {
|
|
50
|
+
rmSync(join(SKILLS_DIR, entry), { recursive: true, force: true });
|
|
51
|
+
}
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, writeFileSync, readFileSync, rmSync } from "fs";
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, rmSync, } from "fs";
|
|
2
2
|
import { homedir } from "os";
|
|
3
3
|
import { join } from "path";
|
|
4
4
|
const BASE = join(homedir(), ".gemini");
|
|
@@ -38,10 +38,11 @@ export class GeminiCliAdapter {
|
|
|
38
38
|
writeFileSync(MCP_CONFIG, JSON.stringify(existing, null, 2));
|
|
39
39
|
}
|
|
40
40
|
uninstall() {
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
if (existsSync(SKILLS_DIR)) {
|
|
42
|
+
for (const entry of readdirSync(SKILLS_DIR)) {
|
|
43
|
+
if (entry.startsWith("bk-")) {
|
|
44
|
+
rmSync(join(SKILLS_DIR, entry), { recursive: true, force: true });
|
|
45
|
+
}
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
if (existsSync(MCP_CONFIG)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, writeFileSync, readFileSync, rmSync } from "fs";
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, rmSync, } from "fs";
|
|
2
2
|
import { homedir } from "os";
|
|
3
3
|
import { join } from "path";
|
|
4
4
|
const BASE = join(homedir(), ".openclaw");
|
|
@@ -38,10 +38,11 @@ export class OpenClawAdapter {
|
|
|
38
38
|
writeFileSync(MCP_CONFIG, JSON.stringify(existing, null, 2));
|
|
39
39
|
}
|
|
40
40
|
uninstall() {
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
if (existsSync(SKILLS_DIR)) {
|
|
42
|
+
for (const entry of readdirSync(SKILLS_DIR)) {
|
|
43
|
+
if (entry.startsWith("bk-")) {
|
|
44
|
+
rmSync(join(SKILLS_DIR, entry), { recursive: true, force: true });
|
|
45
|
+
}
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
if (existsSync(MCP_CONFIG)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, writeFileSync, readFileSync, rmSync } from "fs";
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, rmSync, } from "fs";
|
|
2
2
|
import { homedir } from "os";
|
|
3
3
|
import { join } from "path";
|
|
4
4
|
const BASE = join(homedir(), ".opencode");
|
|
@@ -38,10 +38,11 @@ export class OpenCodeAdapter {
|
|
|
38
38
|
writeFileSync(MCP_CONFIG, JSON.stringify(existing, null, 2));
|
|
39
39
|
}
|
|
40
40
|
uninstall() {
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
if (existsSync(SKILLS_DIR)) {
|
|
42
|
+
for (const entry of readdirSync(SKILLS_DIR)) {
|
|
43
|
+
if (entry.startsWith("bk-")) {
|
|
44
|
+
rmSync(join(SKILLS_DIR, entry), { recursive: true, force: true });
|
|
45
|
+
}
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
if (existsSync(MCP_CONFIG)) {
|