gitnexushub 0.2.3 → 0.2.4
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OpenCode Editor Setup
|
|
3
3
|
*
|
|
4
|
-
* Writes MCP config to ~/.config/opencode/
|
|
4
|
+
* Writes MCP config to ~/.config/opencode/opencode.json (under `mcp` key)
|
|
5
5
|
* Installs skills to ~/.config/opencode/skill/
|
|
6
6
|
*/
|
|
7
7
|
import type { EditorConfig } from './types.js';
|
package/dist/editors/opencode.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OpenCode Editor Setup
|
|
3
3
|
*
|
|
4
|
-
* Writes MCP config to ~/.config/opencode/
|
|
4
|
+
* Writes MCP config to ~/.config/opencode/opencode.json (under `mcp` key)
|
|
5
5
|
* Installs skills to ~/.config/opencode/skill/
|
|
6
6
|
*/
|
|
7
7
|
import os from 'os';
|
|
@@ -11,13 +11,13 @@ import { readJsonFile, writeJsonFile } from '../utils.js';
|
|
|
11
11
|
import { HUB_SKILLS } from '../content.js';
|
|
12
12
|
function getMcpConfig(hubUrl, token) {
|
|
13
13
|
return {
|
|
14
|
-
type: '
|
|
14
|
+
type: 'remote',
|
|
15
15
|
url: `${hubUrl}/mcp`,
|
|
16
16
|
headers: { Authorization: `Bearer ${token}` },
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
async function configure(hubUrl, token) {
|
|
20
|
-
const configPath = path.join(os.homedir(), '.config', 'opencode', '
|
|
20
|
+
const configPath = path.join(os.homedir(), '.config', 'opencode', 'opencode.json');
|
|
21
21
|
try {
|
|
22
22
|
const existing = (await readJsonFile(configPath)) || {};
|
|
23
23
|
if (!existing.mcp || typeof existing.mcp !== 'object') {
|
|
@@ -25,7 +25,7 @@ async function configure(hubUrl, token) {
|
|
|
25
25
|
}
|
|
26
26
|
existing.mcp.gitnexus = getMcpConfig(hubUrl, token);
|
|
27
27
|
await writeJsonFile(configPath, existing);
|
|
28
|
-
return { success: true, message: 'MCP configured in ~/.config/opencode/
|
|
28
|
+
return { success: true, message: 'MCP configured in ~/.config/opencode/opencode.json' };
|
|
29
29
|
}
|
|
30
30
|
catch (err) {
|
|
31
31
|
return { success: false, message: `Failed: ${err.message}` };
|
|
@@ -48,14 +48,14 @@ async function installSkills(skills) {
|
|
|
48
48
|
return installed;
|
|
49
49
|
}
|
|
50
50
|
async function unconfigure() {
|
|
51
|
-
const configPath = path.join(os.homedir(), '.config', 'opencode', '
|
|
51
|
+
const configPath = path.join(os.homedir(), '.config', 'opencode', 'opencode.json');
|
|
52
52
|
try {
|
|
53
53
|
const existing = await readJsonFile(configPath);
|
|
54
54
|
if (existing?.mcp?.gitnexus) {
|
|
55
55
|
delete existing.mcp.gitnexus;
|
|
56
56
|
await writeJsonFile(configPath, existing);
|
|
57
57
|
}
|
|
58
|
-
return { success: true, message: 'MCP removed from ~/.config/opencode/
|
|
58
|
+
return { success: true, message: 'MCP removed from ~/.config/opencode/opencode.json' };
|
|
59
59
|
}
|
|
60
60
|
catch (err) {
|
|
61
61
|
return { success: false, message: `Failed: ${err.message}` };
|
package/dist/editors/windsurf.js
CHANGED
|
@@ -11,8 +11,7 @@ import { readJsonFile, writeJsonFile } from '../utils.js';
|
|
|
11
11
|
import { HUB_SKILLS } from '../content.js';
|
|
12
12
|
function getMcpConfig(hubUrl, token) {
|
|
13
13
|
return {
|
|
14
|
-
|
|
15
|
-
url: `${hubUrl}/mcp`,
|
|
14
|
+
serverUrl: `${hubUrl}/mcp`,
|
|
16
15
|
headers: { Authorization: `Bearer ${token}` },
|
|
17
16
|
};
|
|
18
17
|
}
|
package/package.json
CHANGED