patchcord 0.3.75 → 0.3.77
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 +9 -9
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -549,7 +549,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
|
|
|
549
549
|
const cursorConfig = {
|
|
550
550
|
mcpServers: {
|
|
551
551
|
patchcord: {
|
|
552
|
-
url: `${serverUrl}/mcp
|
|
552
|
+
url: `${serverUrl}/mcp`,
|
|
553
553
|
headers: {
|
|
554
554
|
Authorization: `Bearer ${token}`,
|
|
555
555
|
"X-Patchcord-Machine": hostname,
|
|
@@ -578,7 +578,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
|
|
|
578
578
|
const wsConfig = {
|
|
579
579
|
mcpServers: {
|
|
580
580
|
patchcord: {
|
|
581
|
-
url: `${serverUrl}/mcp
|
|
581
|
+
url: `${serverUrl}/mcp`,
|
|
582
582
|
headers: {
|
|
583
583
|
Authorization: `Bearer ${token}`,
|
|
584
584
|
"X-Patchcord-Machine": hostname,
|
|
@@ -609,7 +609,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
|
|
|
609
609
|
let geminiSettings = (existsSync(geminiPath) && safeReadJson(geminiPath)) || {};
|
|
610
610
|
if (!geminiSettings.mcpServers) geminiSettings.mcpServers = {};
|
|
611
611
|
geminiSettings.mcpServers.patchcord = {
|
|
612
|
-
httpUrl: `${serverUrl}/mcp
|
|
612
|
+
httpUrl: `${serverUrl}/mcp`,
|
|
613
613
|
headers: {
|
|
614
614
|
Authorization: `Bearer ${token}`,
|
|
615
615
|
"X-Patchcord-Machine": hostname,
|
|
@@ -632,7 +632,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
|
|
|
632
632
|
let zedSettings = (existsSync(zedPath) && safeReadJson(zedPath)) || {};
|
|
633
633
|
if (!zedSettings.context_servers) zedSettings.context_servers = {};
|
|
634
634
|
zedSettings.context_servers.patchcord = {
|
|
635
|
-
url: `${serverUrl}/mcp
|
|
635
|
+
url: `${serverUrl}/mcp`,
|
|
636
636
|
headers: {
|
|
637
637
|
Authorization: `Bearer ${token}`,
|
|
638
638
|
"X-Patchcord-Machine": hostname,
|
|
@@ -657,7 +657,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
|
|
|
657
657
|
if (!ocConfig.mcp) ocConfig.mcp = {};
|
|
658
658
|
ocConfig.mcp.patchcord = {
|
|
659
659
|
type: "remote",
|
|
660
|
-
url: `${serverUrl}/mcp
|
|
660
|
+
url: `${serverUrl}/mcp`,
|
|
661
661
|
headers: {
|
|
662
662
|
Authorization: `Bearer ${token}`,
|
|
663
663
|
"X-Patchcord-Machine": hostname,
|
|
@@ -674,7 +674,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
|
|
|
674
674
|
servers: {
|
|
675
675
|
patchcord: {
|
|
676
676
|
type: "http",
|
|
677
|
-
url: `${serverUrl}/mcp
|
|
677
|
+
url: `${serverUrl}/mcp`,
|
|
678
678
|
headers: {
|
|
679
679
|
Authorization: `Bearer ${token}`,
|
|
680
680
|
"X-Patchcord-Machine": hostname,
|
|
@@ -715,7 +715,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
|
|
|
715
715
|
let existing = existsSync(configPath) ? readFileSync(configPath, "utf-8") : "";
|
|
716
716
|
// Remove old patchcord config block if present
|
|
717
717
|
existing = existing.replace(/\[mcp_servers\.patchcord[-\w]*\]\n(?:(?!\[)[^\n]*\n?)*/g, "").replace(/\n{3,}/g, "\n\n").trim();
|
|
718
|
-
existing = existing.trimEnd() + `\n\n[mcp_servers.patchcord-codex]\nurl = "${serverUrl}/mcp
|
|
718
|
+
existing = existing.trimEnd() + `\n\n[mcp_servers.patchcord-codex]\nurl = "${serverUrl}/mcp"\nhttp_headers = { "Authorization" = "Bearer ${token}", "X-Patchcord-Machine" = "${hostname}" }\ntool_timeout_sec = 300\n`;
|
|
719
719
|
writeFileSync(configPath, existing);
|
|
720
720
|
// Clean up any PATCHCORD_TOKEN we previously wrote to .env
|
|
721
721
|
const envPath = join(cwd, ".env");
|
|
@@ -800,13 +800,13 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
|
|
|
800
800
|
console.log(`\n ${green}✓${r} Codex configured: ${dim}${configPath}${r}`);
|
|
801
801
|
console.log(` ${green}✓${r} Plugin installed: ${dim}@patchcord${r}, ${dim}@patchcord-wait${r}`);
|
|
802
802
|
} else {
|
|
803
|
-
// Claude Code: write .mcp.json
|
|
803
|
+
// Claude Code: write .mcp.json
|
|
804
804
|
const mcpPath = join(cwd, ".mcp.json");
|
|
805
805
|
const mcpConfig = {
|
|
806
806
|
mcpServers: {
|
|
807
807
|
patchcord: {
|
|
808
808
|
type: "http",
|
|
809
|
-
url: `${serverUrl}/mcp
|
|
809
|
+
url: `${serverUrl}/mcp`,
|
|
810
810
|
headers: {
|
|
811
811
|
Authorization: `Bearer ${token}`,
|
|
812
812
|
"X-Patchcord-Machine": hostname,
|