patchcord 0.2.2 → 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.
- package/.claude-plugin/plugin.json +1 -1
- package/bin/patchcord.mjs +51 -9
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "patchcord",
|
|
3
3
|
"description": "Cross-machine agent messaging with auto-inbox checking. Agents automatically respond to messages from other agents without human intervention.",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.4",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "ppravdin"
|
|
7
7
|
},
|
package/bin/patchcord.mjs
CHANGED
|
@@ -21,9 +21,10 @@ if (!cmd || cmd === "help" || cmd === "--help" || cmd === "-h") {
|
|
|
21
21
|
console.log(`patchcord — agent messaging for Claude Code & Codex
|
|
22
22
|
|
|
23
23
|
Commands:
|
|
24
|
-
patchcord install
|
|
25
|
-
patchcord
|
|
26
|
-
patchcord agent
|
|
24
|
+
patchcord install Install/update plugin globally (Claude Code)
|
|
25
|
+
patchcord install --full Install + enable full statusline (model, context%, git)
|
|
26
|
+
patchcord agent Set up MCP config for an agent in this project
|
|
27
|
+
patchcord agent --codex Set up Codex skill + MCP config in this project
|
|
27
28
|
|
|
28
29
|
Run "patchcord install" once. Run "patchcord agent" in each project.`);
|
|
29
30
|
process.exit(0);
|
|
@@ -45,17 +46,58 @@ Then run: patchcord install`);
|
|
|
45
46
|
process.exit(1);
|
|
46
47
|
}
|
|
47
48
|
|
|
49
|
+
const flags = process.argv.slice(3);
|
|
50
|
+
const fullStatusline = flags.includes("--full");
|
|
51
|
+
|
|
48
52
|
console.log("Installing patchcord plugin into Claude Code...");
|
|
49
|
-
const result = run(`claude plugin install --path "${pluginRoot}"`);
|
|
50
|
-
if (result !== null) {
|
|
51
|
-
console.log(`✓ Plugin installed. Skills, hooks, and statusline are active.
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
// Register npm package as a local marketplace (idempotent)
|
|
55
|
+
const marketplaceExists = run(`claude plugin marketplace list`)?.includes("patchcord");
|
|
56
|
+
if (!marketplaceExists) {
|
|
57
|
+
const addResult = run(`claude plugin marketplace add "${pluginRoot}"`);
|
|
58
|
+
if (addResult === null) {
|
|
59
|
+
console.log(`✗ Could not add marketplace. Try manually:
|
|
60
|
+
claude plugin marketplace add "${pluginRoot}"
|
|
61
|
+
claude plugin install patchcord`);
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Install or update the plugin from the marketplace
|
|
67
|
+
const installed = run(`claude plugin list`)?.includes("patchcord");
|
|
68
|
+
const result = installed
|
|
69
|
+
? run(`claude plugin update patchcord`)
|
|
70
|
+
: run(`claude plugin install patchcord`);
|
|
71
|
+
if (result === null && !installed) {
|
|
55
72
|
console.log(`✗ Plugin install failed. Try manually:
|
|
56
|
-
claude plugin
|
|
73
|
+
claude plugin marketplace add "${pluginRoot}"
|
|
74
|
+
claude plugin install patchcord`);
|
|
57
75
|
process.exit(1);
|
|
58
76
|
}
|
|
77
|
+
|
|
78
|
+
// Enable statusline
|
|
79
|
+
const enableScript = join(pluginRoot, "scripts", "enable-statusline.sh");
|
|
80
|
+
if (existsSync(enableScript)) {
|
|
81
|
+
const slArg = fullStatusline ? " --full" : "";
|
|
82
|
+
const slResult = run(`bash "${enableScript}"${slArg}`);
|
|
83
|
+
if (slResult !== null) {
|
|
84
|
+
console.log(`✓ Plugin installed. Statusline${fullStatusline ? " (full)" : ""} enabled.
|
|
85
|
+
|
|
86
|
+
${fullStatusline
|
|
87
|
+
? "Statusline shows: model │ context% │ repo (branch) │ agent@namespace │ inbox"
|
|
88
|
+
: "Statusline shows: agent@namespace │ inbox\n Tip: run \"patchcord install --full\" for model, context%, git info too."}
|
|
89
|
+
|
|
90
|
+
Run "patchcord agent" in each project to set up MCP.`);
|
|
91
|
+
} else {
|
|
92
|
+
console.log(`✓ Plugin installed. Statusline setup skipped (non-fatal).
|
|
93
|
+
|
|
94
|
+
Run "patchcord agent" in each project to set up MCP.`);
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
console.log(`✓ Plugin installed.
|
|
98
|
+
|
|
99
|
+
Run "patchcord agent" in each project to set up MCP.`);
|
|
100
|
+
}
|
|
59
101
|
process.exit(0);
|
|
60
102
|
}
|
|
61
103
|
|