telique-mcp 1.0.28 → 1.0.29
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/index.js +0 -0
- package/dist/setup.js +28 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/setup.js
CHANGED
|
@@ -128,11 +128,13 @@ function detectMcpClients() {
|
|
|
128
128
|
register: (token) => registerJsonConfig(cursorConfig, token),
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
// Codex CLI
|
|
132
|
-
|
|
131
|
+
// Codex (CLI and/or Desktop — both share ~/.codex/config.toml,
|
|
132
|
+
// so one `codex mcp add` configures whichever surfaces are installed)
|
|
133
|
+
const codex = findCodexBinary();
|
|
134
|
+
if (codex) {
|
|
133
135
|
clients.push({
|
|
134
|
-
name:
|
|
135
|
-
register: (token) => registerCodex(token),
|
|
136
|
+
name: codex.label,
|
|
137
|
+
register: (token) => registerCodex(token, codex.bin),
|
|
136
138
|
});
|
|
137
139
|
}
|
|
138
140
|
// GitHub Copilot (VS Code)
|
|
@@ -185,11 +187,11 @@ function registerClaudeCode(token) {
|
|
|
185
187
|
return false;
|
|
186
188
|
}
|
|
187
189
|
}
|
|
188
|
-
function registerCodex(token) {
|
|
190
|
+
function registerCodex(token, bin = "codex") {
|
|
189
191
|
try {
|
|
190
192
|
// Remove existing entry first
|
|
191
193
|
try {
|
|
192
|
-
execFileSync(
|
|
194
|
+
execFileSync(bin, ["mcp", "remove", "telique"], { stdio: "ignore" });
|
|
193
195
|
}
|
|
194
196
|
catch {
|
|
195
197
|
// ignore
|
|
@@ -199,7 +201,7 @@ function registerCodex(token) {
|
|
|
199
201
|
args.push("--env", `TELIQUE_API_TOKEN=${token}`);
|
|
200
202
|
}
|
|
201
203
|
args.push("--", "npx", "-y", "telique-mcp");
|
|
202
|
-
execFileSync(
|
|
204
|
+
execFileSync(bin, args, { stdio: "ignore" });
|
|
203
205
|
return true;
|
|
204
206
|
}
|
|
205
207
|
catch {
|
|
@@ -316,6 +318,25 @@ function commandExists(cmd) {
|
|
|
316
318
|
return false;
|
|
317
319
|
}
|
|
318
320
|
}
|
|
321
|
+
function findCodexBinary() {
|
|
322
|
+
// Codex Desktop ships its own codex binary inside the .app bundle, and both
|
|
323
|
+
// it and the standalone CLI read/write the same ~/.codex/config.toml — so
|
|
324
|
+
// either binary is sufficient to register an MCP server for both surfaces.
|
|
325
|
+
const desktopBin = process.platform === "darwin"
|
|
326
|
+
? "/Applications/Codex.app/Contents/Resources/codex"
|
|
327
|
+
: null;
|
|
328
|
+
const desktopAvailable = desktopBin !== null && existsSync(desktopBin);
|
|
329
|
+
if (commandExists("codex")) {
|
|
330
|
+
return {
|
|
331
|
+
bin: "codex",
|
|
332
|
+
label: desktopAvailable ? "Codex (CLI + Desktop)" : "Codex CLI",
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
if (desktopAvailable && desktopBin) {
|
|
336
|
+
return { bin: desktopBin, label: "Codex Desktop" };
|
|
337
|
+
}
|
|
338
|
+
return null;
|
|
339
|
+
}
|
|
319
340
|
function loadExistingToken() {
|
|
320
341
|
try {
|
|
321
342
|
const raw = readFileSync(CONFIG_FILE, "utf-8");
|