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 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 connectUrl = `https://patchcord.dev/connect?session=${sessionId}${toolParam}`;
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 shell wrapper for per-project --mcp-config-file
1747
- const wrapperPath = join(HOME, ".kimi", "patchcord-kimi-wrapper.sh");
1748
- const wrapperAlreadyExisted = existsSync(wrapperPath);
1749
- const wrapperContent = `#!/bin/bash
1750
- # Patchcord Kimi wrapper — auto-detects per-project .kimi/mcp.json
1751
- # Source this in your ~/.bashrc or ~/.zshrc:
1752
- # source "${HOME}/.kimi/patchcord-kimi-wrapper.sh"
1753
- #
1754
- # Then launch Kimi in any project with:
1755
- # kimi-pc
1756
- #
1757
- # Plain \`kimi\` still uses the global ~/.kimi/mcp.json.
1758
-
1759
- kimi-pc() {
1760
- local dir="$PWD"
1761
- while [ "$dir" != "/" ]; do
1762
- if [ -f "$dir/.kimi/mcp.json" ]; then
1763
- kimi --mcp-config-file "$dir/.kimi/mcp.json" "$@"
1764
- return
1765
- fi
1766
- dir="$(dirname "$dir")"
1767
- done
1768
- echo "No .kimi/mcp.json found in $PWD or any parent — falling back to global config" >&2
1769
- kimi "$@"
1770
- }
1771
- `;
1772
- writeFileSync(wrapperPath, wrapperContent);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.5.67",
3
+ "version": "0.5.69",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",
@@ -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
- Add this to your `~/.bashrc` or `~/.zshrc` (done once by the installer):
26
+ The installer automatically adds an alias to your `~/.bashrc` and `~/.zshrc`:
27
27
  ```bash
28
- source "$HOME/.kimi/patchcord-kimi-wrapper.sh"
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.