patchcord 0.3.51 → 0.3.52
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/bin/patchcord.mjs +3 -3
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -449,7 +449,7 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
449
449
|
const globalCodexConfig = join(HOME, ".codex", "config.toml");
|
|
450
450
|
if (existsSync(globalCodexConfig)) {
|
|
451
451
|
const globalContent = readFileSync(globalCodexConfig, "utf-8");
|
|
452
|
-
if (globalContent.includes("[mcp_servers.patchcord]")) {
|
|
452
|
+
if (globalContent.includes("[mcp_servers.patchcord-codex]")) {
|
|
453
453
|
console.log(`\n ${red}⚠ Patchcord is in your GLOBAL Codex config!${r}`);
|
|
454
454
|
console.log(` ${dim}${globalCodexConfig}${r}`);
|
|
455
455
|
console.log(` ${yellow}This overrides per-project config and causes conflicts.${r}`);
|
|
@@ -464,7 +464,7 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
464
464
|
const configPath = join(cwd, ".codex", "config.toml");
|
|
465
465
|
if (existsSync(configPath)) {
|
|
466
466
|
const content = readFileSync(configPath, "utf-8");
|
|
467
|
-
if (content.includes("[mcp_servers.patchcord]")) {
|
|
467
|
+
if (content.includes("[mcp_servers.patchcord-codex]")) {
|
|
468
468
|
console.log(`\n ${yellow}⚠ Codex CLI already configured in this project${r}`);
|
|
469
469
|
console.log(` ${dim}${configPath}${r}`);
|
|
470
470
|
const replace = (await ask(` ${dim}Replace? (y/N):${r} `)).trim().toLowerCase();
|
|
@@ -703,7 +703,7 @@ if (!cmd || cmd === "install" || cmd === "agent") {
|
|
|
703
703
|
let existing = existsSync(configPath) ? readFileSync(configPath, "utf-8") : "";
|
|
704
704
|
// Remove old patchcord config block if present
|
|
705
705
|
existing = existing.replace(/\[mcp_servers\.patchcord\]\n(?:(?!\[)[^\n]*\n?)*/g, "").replace(/\n{3,}/g, "\n\n").trim();
|
|
706
|
-
existing = existing.trimEnd() + `\n\n[mcp_servers.patchcord]\nurl = "${serverUrl}/mcp/bearer"\nhttp_headers = { "Authorization" = "Bearer ${token}", "X-Patchcord-Machine" = "${hostname}" }\n`;
|
|
706
|
+
existing = existing.trimEnd() + `\n\n[mcp_servers.patchcord-codex]\nurl = "${serverUrl}/mcp/bearer"\nhttp_headers = { "Authorization" = "Bearer ${token}", "X-Patchcord-Machine" = "${hostname}" }\n`;
|
|
707
707
|
writeFileSync(configPath, existing);
|
|
708
708
|
// Clean up any PATCHCORD_TOKEN we previously wrote to .env
|
|
709
709
|
const envPath = join(cwd, ".env");
|