patchcord 0.5.125 → 0.5.126

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "patchcord",
3
3
  "description": "Cross-machine agent messaging. Messages from other agents land in the inbox and wake the agent to reply.",
4
- "version": "0.5.125",
4
+ "version": "0.5.126",
5
5
  "author": {
6
6
  "name": "ppravdin"
7
7
  },
package/bin/patchcord.mjs CHANGED
@@ -1854,6 +1854,22 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
1854
1854
  // legacy prompt) in one pass, preserving all other tables.
1855
1855
  kimiConfig = removeHookBlocks(kimiConfig, isPatchcordHook).replace(/\n{3,}/g, "\n\n").trim();
1856
1856
 
1857
+ // Self-heal config a PRIOR patchcord version corrupted. The old
1858
+ // split("[[hooks]]")+filter deleted every table that trailed a patchcord
1859
+ // hook block — including kimi's own [providers."managed:kimi-code"] and
1860
+ // [models."kimi-code/kimi-for-coding"] — leaving `default_model` dangling
1861
+ // and the CLI dead with "Model ... is not configured". Restore the
1862
+ // canonical managed block. Guarded three ways: only when default_model
1863
+ // names exactly that managed model AND neither the model nor the provider
1864
+ // section is present — so a user's own provider/model config is never
1865
+ // touched, and this is a no-op on healthy hosts.
1866
+ if (/^\s*default_model\s*=\s*"kimi-code\/kimi-for-coding"/m.test(kimiConfig)
1867
+ && !/^\s*\[models\."kimi-code\/kimi-for-coding"\]/m.test(kimiConfig)
1868
+ && !/^\s*\[providers\."managed:kimi-code"\]/m.test(kimiConfig)) {
1869
+ kimiConfig = kimiConfig.trimEnd() + `\n\n[providers."managed:kimi-code"]\ntype = "kimi"\napi_key = ""\nbase_url = "https://api.kimi.com/coding/v1"\n\n[providers."managed:kimi-code".oauth]\nstorage = "file"\nkey = "oauth/kimi-code"\n\n[models."kimi-code/kimi-for-coding"]\nprovider = "managed:kimi-code"\nmodel = "kimi-for-coding"\nmax_context_size = 262144\ncapabilities = [ "thinking", "always_thinking", "image_in", "video_in", "tool_use" ]\ndisplay_name = "K2.7 Code"\n`;
1870
+ globalChanges.push("Repaired kimi-code model/provider block deleted by an earlier patchcord version");
1871
+ }
1872
+
1857
1873
  // Append new hooks
1858
1874
  kimiConfig = kimiConfig.trimEnd() + `\n\n[[hooks]]\nevent = "SessionStart"\ncommand = "${kimiSessionDest}"\ntimeout = 10\n\n[[hooks]]\nevent = "Stop"\ncommand = "${kimiHookDest}"\ntimeout = 10\n`;
1859
1875
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.5.125",
3
+ "version": "0.5.126",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "scripts": {
6
6
  "version": "node scripts/sync-plugin-version.mjs && git add .claude-plugin/plugin.json"