patchcord 0.5.67 → 0.5.69
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 +29 -32
- package/package.json +1 -1
- package/per-project-skills/kimi/SKILL.md +4 -2
package/bin/patchcord.mjs
CHANGED
|
@@ -1358,7 +1358,8 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
1358
1358
|
// page skips its type picker (the user already chose on the
|
|
1359
1359
|
// dashboard tile).
|
|
1360
1360
|
const toolParam = toolSlug ? `&tool=${encodeURIComponent(toolSlug)}` : "";
|
|
1361
|
-
const
|
|
1361
|
+
const cwdParam = `&cwd=${encodeURIComponent(process.cwd())}`;
|
|
1362
|
+
const connectUrl = `https://patchcord.dev/connect?session=${sessionId}${toolParam}${cwdParam}`;
|
|
1362
1363
|
|
|
1363
1364
|
if (canOpenBrowser()) {
|
|
1364
1365
|
const opened = openBrowser(connectUrl);
|
|
@@ -1743,37 +1744,33 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
1743
1744
|
cpSync(join(pluginRoot, "per-project-skills", "kimi", "wait", "SKILL.md"), join(kimiWaitDir, "SKILL.md"));
|
|
1744
1745
|
console.log(` ${green}✓${r} Skills installed: ${dim}patchcord${r}, ${dim}patchcord-wait${r}`);
|
|
1745
1746
|
|
|
1746
|
-
// Install
|
|
1747
|
-
const
|
|
1748
|
-
const
|
|
1749
|
-
const
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
console.log(`\n ${green}✓${r} Shell wrapper installed: ${dim}${wrapperPath}${r}`);
|
|
1774
|
-
console.log(` ${dim}Add this to your ~/.bashrc or ~/.zshrc:${r}`);
|
|
1775
|
-
console.log(` ${cyan}source "${wrapperPath}"${r}`);
|
|
1776
|
-
console.log(` ${dim}Then run ${bold}kimi-pc${r}${dim} instead of ${bold}kimi${r}${dim} in project directories.${r}`);
|
|
1747
|
+
// Install alias for per-project --mcp-config-file
|
|
1748
|
+
const aliasLine = `alias kimi-pc='kimi --mcp-config-file .kimi/mcp.json'`;
|
|
1749
|
+
const aliasComment = "# Patchcord Kimi alias — loads per-project .kimi/mcp.json";
|
|
1750
|
+
const shellRcFiles = [
|
|
1751
|
+
join(HOME, ".bashrc"),
|
|
1752
|
+
join(HOME, ".zshrc"),
|
|
1753
|
+
];
|
|
1754
|
+
let aliasInstalled = false;
|
|
1755
|
+
for (const rcFile of shellRcFiles) {
|
|
1756
|
+
if (!existsSync(rcFile)) continue;
|
|
1757
|
+
const rcContent = readFileSync(rcFile, "utf-8");
|
|
1758
|
+
if (rcContent.includes("alias kimi-pc=")) continue; // already present
|
|
1759
|
+
writeFileSync(
|
|
1760
|
+
rcFile,
|
|
1761
|
+
rcContent.trimEnd() + `\n\n${aliasComment}\n${aliasLine}\n`
|
|
1762
|
+
);
|
|
1763
|
+
aliasInstalled = true;
|
|
1764
|
+
}
|
|
1765
|
+
if (aliasInstalled) {
|
|
1766
|
+
console.log(`\n ${green}✓${r} Alias installed in shell config`);
|
|
1767
|
+
console.log(` ${dim}Run ${bold}kimi-pc${r}${dim} instead of ${bold}kimi${r}${dim} in project directories.${r}`);
|
|
1768
|
+
console.log(` ${dim}Reload your shell or run ${cyan}source ~/.bashrc${r}${dim} (or ~/.zshrc) to use it now.${r}`);
|
|
1769
|
+
} else {
|
|
1770
|
+
console.log(`\n ${yellow}⚠${r} Could not auto-install alias.`);
|
|
1771
|
+
console.log(` ${dim}Add this to your ~/.bashrc or ~/.zshrc manually:${r}`);
|
|
1772
|
+
console.log(` ${cyan}${aliasLine}${r}`);
|
|
1773
|
+
}
|
|
1777
1774
|
} else if (isVSCode) {
|
|
1778
1775
|
// VS Code: write .vscode/mcp.json (per-project)
|
|
1779
1776
|
const vscodeDir = join(cwd, ".vscode");
|
package/package.json
CHANGED
|
@@ -23,11 +23,13 @@ kimi-pc
|
|
|
23
23
|
# Falls back to global ~/.kimi/mcp.json if no project config found.
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
The installer automatically adds an alias to your `~/.bashrc` and `~/.zshrc`:
|
|
27
27
|
```bash
|
|
28
|
-
|
|
28
|
+
alias kimi-pc='kimi --mcp-config-file .kimi/mcp.json'
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
Reload your shell or run `source ~/.bashrc` (or `~/.zshrc`) to use it.
|
|
32
|
+
|
|
31
33
|
## Tools available
|
|
32
34
|
|
|
33
35
|
- `inbox(all_agents?)` - read pending messages, current identity, and recently active agents. `all_agents=true` includes inactive agents. Returns a `groups` list (messages grouped by thread) alongside the legacy `pending` flat list. Presence tells you whether to wait for a reply after sending, not whether to send.
|