docdex 0.2.41 → 0.2.43
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/CHANGELOG.md +7 -0
- package/README.md +14 -0
- package/assets/agents.md +1 -1
- package/lib/postinstall_setup.js +28 -8
- package/lib/uninstall.js +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.43
|
|
4
|
+
- Fix MCP tool schema compatibility with Claude Code by removing top-level anyOf from `docdex_dag_export`.
|
|
5
|
+
- Bump release metadata to 0.2.43.
|
|
6
|
+
|
|
7
|
+
## 0.2.42
|
|
8
|
+
- Bump release metadata to 0.2.42.
|
|
9
|
+
|
|
3
10
|
## 0.2.41
|
|
4
11
|
- Improve Windows npm postinstall UX with a plain setup hint, npm lifecycle non-interactive detection, and no empty cmd window from immediate daemon start.
|
|
5
12
|
- Fix setup TUI menu selection highlighting on Windows terminals.
|
package/README.md
CHANGED
|
@@ -148,6 +148,20 @@ If you need to configure your client manually:
|
|
|
148
148
|
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
+
**Claude Code (CLI) JSON (`~/.claude.json` or project `.mcp.json`):**
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"mcpServers": {
|
|
156
|
+
"docdex": {
|
|
157
|
+
"type": "http",
|
|
158
|
+
"url": "http://localhost:28491/v1/mcp"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
|
|
151
165
|
**TOML (Codex):**
|
|
152
166
|
|
|
153
167
|
```toml
|
package/assets/agents.md
CHANGED
package/lib/postinstall_setup.js
CHANGED
|
@@ -1068,10 +1068,21 @@ function upsertVsCodeInstructions(pathname, instructions, legacyPath) {
|
|
|
1068
1068
|
return true;
|
|
1069
1069
|
}
|
|
1070
1070
|
|
|
1071
|
-
function upsertMcpServerJson(pathname, url) {
|
|
1071
|
+
function upsertMcpServerJson(pathname, url, options = {}) {
|
|
1072
1072
|
const { value } = readJson(pathname);
|
|
1073
1073
|
if (typeof value !== "object" || value == null || Array.isArray(value)) return false;
|
|
1074
1074
|
const root = value;
|
|
1075
|
+
const extra =
|
|
1076
|
+
options &&
|
|
1077
|
+
typeof options === "object" &&
|
|
1078
|
+
options.extra &&
|
|
1079
|
+
typeof options.extra === "object" &&
|
|
1080
|
+
!Array.isArray(options.extra)
|
|
1081
|
+
? options.extra
|
|
1082
|
+
: {};
|
|
1083
|
+
const extraEntries = Object.entries(extra);
|
|
1084
|
+
const matchesExtras = (entry) =>
|
|
1085
|
+
extraEntries.every(([key, value]) => entry && entry[key] === value);
|
|
1075
1086
|
const pickSection = () => {
|
|
1076
1087
|
if (root.mcpServers && typeof root.mcpServers === "object" && !Array.isArray(root.mcpServers)) {
|
|
1077
1088
|
return { key: "mcpServers", section: root.mcpServers };
|
|
@@ -1084,12 +1095,13 @@ function upsertMcpServerJson(pathname, url) {
|
|
|
1084
1095
|
if (Array.isArray(root.mcpServers)) {
|
|
1085
1096
|
const idx = root.mcpServers.findIndex((entry) => entry && entry.name === "docdex");
|
|
1086
1097
|
if (idx >= 0) {
|
|
1087
|
-
|
|
1088
|
-
|
|
1098
|
+
const current = root.mcpServers[idx] || {};
|
|
1099
|
+
if (current.url === url && matchesExtras(current)) return false;
|
|
1100
|
+
root.mcpServers[idx] = { ...current, ...extra, url, name: "docdex" };
|
|
1089
1101
|
writeJson(pathname, root);
|
|
1090
1102
|
return true;
|
|
1091
1103
|
}
|
|
1092
|
-
root.mcpServers.push({ name: "docdex"
|
|
1104
|
+
root.mcpServers.push({ ...extra, url, name: "docdex" });
|
|
1093
1105
|
writeJson(pathname, root);
|
|
1094
1106
|
return true;
|
|
1095
1107
|
}
|
|
@@ -1100,8 +1112,10 @@ function upsertMcpServerJson(pathname, url) {
|
|
|
1100
1112
|
}
|
|
1101
1113
|
const section = picked ? picked.section : root.mcpServers;
|
|
1102
1114
|
const current = section.docdex;
|
|
1103
|
-
if (current && current.url === url) return false;
|
|
1104
|
-
|
|
1115
|
+
if (current && current.url === url && matchesExtras(current)) return false;
|
|
1116
|
+
const base =
|
|
1117
|
+
current && typeof current === "object" && !Array.isArray(current) ? current : {};
|
|
1118
|
+
section.docdex = { ...base, ...extra, url };
|
|
1105
1119
|
writeJson(pathname, root);
|
|
1106
1120
|
return true;
|
|
1107
1121
|
}
|
|
@@ -1343,6 +1357,7 @@ function clientConfigPaths() {
|
|
|
1343
1357
|
case "win32":
|
|
1344
1358
|
return {
|
|
1345
1359
|
claude: path.join(appData, "Claude", "claude_desktop_config.json"),
|
|
1360
|
+
claude_code: path.join(home, ".claude.json"),
|
|
1346
1361
|
cursor: path.join(userProfile, ".cursor", "mcp.json"),
|
|
1347
1362
|
windsurf: path.join(userProfile, ".codeium", "windsurf", "mcp_config.json"),
|
|
1348
1363
|
cline: path.join(appData, "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"),
|
|
@@ -1358,6 +1373,7 @@ function clientConfigPaths() {
|
|
|
1358
1373
|
case "darwin":
|
|
1359
1374
|
return {
|
|
1360
1375
|
claude: path.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json"),
|
|
1376
|
+
claude_code: path.join(home, ".claude.json"),
|
|
1361
1377
|
cursor: path.join(home, ".cursor", "mcp.json"),
|
|
1362
1378
|
windsurf: path.join(home, ".codeium", "windsurf", "mcp_config.json"),
|
|
1363
1379
|
cline: path.join(home, "Library", "Application Support", "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"),
|
|
@@ -1373,6 +1389,7 @@ function clientConfigPaths() {
|
|
|
1373
1389
|
default:
|
|
1374
1390
|
return {
|
|
1375
1391
|
claude: path.join(home, ".config", "Claude", "claude_desktop_config.json"),
|
|
1392
|
+
claude_code: path.join(home, ".claude.json"),
|
|
1376
1393
|
cursor: path.join(home, ".cursor", "mcp.json"),
|
|
1377
1394
|
windsurf: path.join(home, ".codeium", "windsurf", "mcp_config.json"),
|
|
1378
1395
|
cline: path.join(home, ".config", "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"),
|
|
@@ -2733,7 +2750,7 @@ async function runPostInstallSetup({ binaryPath, logger, env, skipDaemon, distBa
|
|
|
2733
2750
|
}
|
|
2734
2751
|
|
|
2735
2752
|
const url = configUrlForPort(port);
|
|
2736
|
-
const
|
|
2753
|
+
const httpUrl = configStreamableUrlForPort(port);
|
|
2737
2754
|
const paths = clientConfigPaths();
|
|
2738
2755
|
const jsonPaths = [
|
|
2739
2756
|
paths.claude,
|
|
@@ -2750,10 +2767,13 @@ async function runPostInstallSetup({ binaryPath, logger, env, skipDaemon, distBa
|
|
|
2750
2767
|
for (const jsonPath of jsonPaths) {
|
|
2751
2768
|
upsertMcpServerJson(jsonPath, url);
|
|
2752
2769
|
}
|
|
2770
|
+
if (paths.claude_code) {
|
|
2771
|
+
upsertMcpServerJson(paths.claude_code, httpUrl, { extra: { type: "http" } });
|
|
2772
|
+
}
|
|
2753
2773
|
if (paths.zed) {
|
|
2754
2774
|
upsertZedConfig(paths.zed, url);
|
|
2755
2775
|
}
|
|
2756
|
-
upsertCodexConfig(paths.codex,
|
|
2776
|
+
upsertCodexConfig(paths.codex, httpUrl);
|
|
2757
2777
|
applyAgentInstructions({ logger: log });
|
|
2758
2778
|
if (startupOk) {
|
|
2759
2779
|
clearStartupFailure();
|
package/lib/uninstall.js
CHANGED
|
@@ -153,6 +153,7 @@ function clientConfigPaths() {
|
|
|
153
153
|
return {
|
|
154
154
|
json: [
|
|
155
155
|
path.join(appData, "Claude", "claude_desktop_config.json"),
|
|
156
|
+
path.join(home, ".claude.json"),
|
|
156
157
|
path.join(userProfile, ".cursor", "mcp.json"),
|
|
157
158
|
path.join(userProfile, ".codeium", "windsurf", "mcp_config.json"),
|
|
158
159
|
path.join(appData, "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"),
|
|
@@ -171,6 +172,7 @@ function clientConfigPaths() {
|
|
|
171
172
|
return {
|
|
172
173
|
json: [
|
|
173
174
|
path.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json"),
|
|
175
|
+
path.join(home, ".claude.json"),
|
|
174
176
|
path.join(home, ".cursor", "mcp.json"),
|
|
175
177
|
path.join(home, ".codeium", "windsurf", "mcp_config.json"),
|
|
176
178
|
path.join(home, "Library", "Application Support", "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"),
|
|
@@ -189,6 +191,7 @@ function clientConfigPaths() {
|
|
|
189
191
|
return {
|
|
190
192
|
json: [
|
|
191
193
|
path.join(home, ".config", "Claude", "claude_desktop_config.json"),
|
|
194
|
+
path.join(home, ".claude.json"),
|
|
192
195
|
path.join(home, ".cursor", "mcp.json"),
|
|
193
196
|
path.join(home, ".codeium", "windsurf", "mcp_config.json"),
|
|
194
197
|
path.join(home, ".config", "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"),
|