reevesagents 1.7.1 → 1.7.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.7.2](https://github.com/mertkayacs/reevesagents/compare/v1.7.1...v1.7.2) (2026-07-27)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **mcp:** recognize Kimi Code as a host instead of reporting it detached ([#20](https://github.com/mertkayacs/reevesagents/issues/20)) ([d932fcb](https://github.com/mertkayacs/reevesagents/commit/d932fcbd8f1c6fab44b8e870f9f874a21721d192)), closes [#19](https://github.com/mertkayacs/reevesagents/issues/19)
9
+
3
10
  ## [1.7.1](https://github.com/mertkayacs/reevesagents/compare/v1.7.0...v1.7.1) (2026-07-26)
4
11
 
5
12
 
package/README.md CHANGED
@@ -327,7 +327,9 @@ remove. ReevesAgents only calls each CLI's own command and never edits provider
327
327
  config files by hand. OpenCode is the exception: it has no scriptable `mcp add`
328
328
  for a local server, so ReevesAgents attaches it by writing the `reevesagents`
329
329
  entry into its `~/.config/opencode/opencode.json` directly (and removes just that
330
- entry on detach).
330
+ entry on detach). Kimi Code is handled the same way: when the `kimi` on PATH is
331
+ Kimi Code rather than the legacy Kimi CLI, ReevesAgents reads its plugin and
332
+ `~/.kimi-code/mcp.json` for status and attaches through that config file.
331
333
 
332
334
  Codex sandboxes MCP tool calls by default, which blocks reevesagents from
333
335
  launching agents in tmux. Run Codex with full access when driving agents, for
@@ -1061,6 +1061,67 @@ function opencodeDetach() {
1061
1061
  `, "utf-8");
1062
1062
  }
1063
1063
  }
1064
+ function kimiCodeHome() {
1065
+ if (process.env.REEVES_HOME) return join2(process.env.REEVES_HOME, ".kimi-code");
1066
+ return process.env.KIMI_CODE_HOME || join2(homedir2(), ".kimi-code");
1067
+ }
1068
+ function isKimiCode(bin) {
1069
+ try {
1070
+ const out = execFileSync2(bin, ["--version"], {
1071
+ encoding: "utf8",
1072
+ timeout: STATUS_TIMEOUT_MS,
1073
+ stdio: ["ignore", "pipe", "pipe"]
1074
+ }).trim();
1075
+ return out !== "" && !/^kimi,/i.test(out);
1076
+ } catch {
1077
+ return false;
1078
+ }
1079
+ }
1080
+ function kimiCodePluginAttached() {
1081
+ try {
1082
+ const installed = JSON.parse(readFileSync2(join2(kimiCodeHome(), "plugins", "installed.json"), "utf-8"));
1083
+ return Array.isArray(installed.plugins) && installed.plugins.some((p) => p.id === SERVER_NAME && p.enabled !== false);
1084
+ } catch {
1085
+ return false;
1086
+ }
1087
+ }
1088
+ function kimiCodeMcpConfig() {
1089
+ try {
1090
+ const raw = readFileSync2(join2(kimiCodeHome(), "mcp.json"), "utf-8").trim();
1091
+ return raw ? JSON.parse(raw) : {};
1092
+ } catch {
1093
+ return {};
1094
+ }
1095
+ }
1096
+ function kimiCodeMcpAttached() {
1097
+ const servers = kimiCodeMcpConfig().mcpServers;
1098
+ return !!servers && typeof servers === "object" && SERVER_NAME in servers;
1099
+ }
1100
+ var KIMI_CODE_FILE_OPS = {
1101
+ attached: () => kimiCodePluginAttached() || kimiCodeMcpAttached(),
1102
+ attach: (cmd) => {
1103
+ if (kimiCodePluginAttached()) return;
1104
+ const path = join2(kimiCodeHome(), "mcp.json");
1105
+ const cfg = kimiCodeMcpConfig();
1106
+ const servers = typeof cfg.mcpServers === "object" && cfg.mcpServers !== null ? cfg.mcpServers : {};
1107
+ servers[SERVER_NAME] = { command: cmd.command, args: cmd.args };
1108
+ cfg.mcpServers = servers;
1109
+ mkdirSync2(dirname2(path), { recursive: true });
1110
+ writeFileSync2(path, `${JSON.stringify(cfg, null, 2)}
1111
+ `, "utf-8");
1112
+ },
1113
+ detach: () => {
1114
+ const path = join2(kimiCodeHome(), "mcp.json");
1115
+ if (!existsSync2(path)) return;
1116
+ const cfg = kimiCodeMcpConfig();
1117
+ const servers = cfg.mcpServers;
1118
+ if (servers && SERVER_NAME in servers) {
1119
+ delete servers[SERVER_NAME];
1120
+ writeFileSync2(path, `${JSON.stringify(cfg, null, 2)}
1121
+ `, "utf-8");
1122
+ }
1123
+ }
1124
+ };
1064
1125
  function resolveLaunchCmd(entry = process.argv[1]) {
1065
1126
  if (entry) {
1066
1127
  try {
@@ -1127,6 +1188,11 @@ function hostBin(host) {
1127
1188
  function hostLabel(host) {
1128
1189
  return PROVIDER_REGISTRY[host.provider].displayName;
1129
1190
  }
1191
+ function hostFileOps(host) {
1192
+ if (host.file) return host.file;
1193
+ if (host.provider === "kimi" && isKimiCode(hostBin(host))) return KIMI_CODE_FILE_OPS;
1194
+ return void 0;
1195
+ }
1130
1196
  function isInstalled(bin) {
1131
1197
  try {
1132
1198
  execFileSync2("which", [bin], { stdio: "pipe" });
@@ -1167,12 +1233,13 @@ function findHost(key) {
1167
1233
  function hostStatus() {
1168
1234
  return HOSTS.map((host) => {
1169
1235
  const installed = isInstalled(hostBin(host));
1236
+ const file = installed ? hostFileOps(host) : void 0;
1170
1237
  return {
1171
1238
  key: host.provider,
1172
1239
  bin: hostBin(host),
1173
1240
  label: hostLabel(host),
1174
1241
  installed,
1175
- attached: installed && (host.file ? host.file.attached() : isAttached(host)),
1242
+ attached: installed && (file ? file.attached() : isAttached(host)),
1176
1243
  manual: host.add === void 0 && host.file === void 0
1177
1244
  };
1178
1245
  });
@@ -1191,9 +1258,10 @@ function attach(key, force = false) {
1191
1258
  if (!isInstalled(hostBin(host))) {
1192
1259
  return { key, label, ok: false, message: `${hostBin(host)} is not installed` };
1193
1260
  }
1194
- if (host.file) {
1261
+ const file = hostFileOps(host);
1262
+ if (file) {
1195
1263
  try {
1196
- host.file.attach(resolveLaunchCmd());
1264
+ file.attach(resolveLaunchCmd());
1197
1265
  return { key, label, ok: true, message: force ? "reattached" : "attached" };
1198
1266
  } catch (err) {
1199
1267
  return { key, label, ok: false, message: `could not edit config (add it manually): ${cliError(err)}` };
@@ -1221,9 +1289,10 @@ function detach(key) {
1221
1289
  if (!isInstalled(hostBin(host))) {
1222
1290
  return { key, label, ok: false, message: `${hostBin(host)} is not installed` };
1223
1291
  }
1224
- if (host.file) {
1292
+ const file = hostFileOps(host);
1293
+ if (file) {
1225
1294
  try {
1226
- host.file.detach();
1295
+ file.detach();
1227
1296
  return { key, label, ok: true, message: "detached" };
1228
1297
  } catch (err) {
1229
1298
  return { key, label, ok: false, message: cliError(err) };
@@ -1238,7 +1307,8 @@ function detach(key) {
1238
1307
  }
1239
1308
  function attachAll(force = false) {
1240
1309
  return HOSTS.filter((host) => (host.add || host.file) && isInstalled(hostBin(host))).map((host) => {
1241
- const attached = host.file ? host.file.attached() : isAttached(host);
1310
+ const file = hostFileOps(host);
1311
+ const attached = file ? file.attached() : isAttached(host);
1242
1312
  if (!force && attached) {
1243
1313
  return { key: host.provider, label: hostLabel(host), ok: true, message: "already attached" };
1244
1314
  }
@@ -2408,4 +2478,4 @@ export {
2408
2478
  stopRun,
2409
2479
  openTmuxTarget
2410
2480
  };
2411
- //# sourceMappingURL=chunk-LHUVET65.js.map
2481
+ //# sourceMappingURL=chunk-CE6YASBF.js.map
@@ -28,7 +28,7 @@ async function startTuiWebServer() {
28
28
  const { checkWebExtras, webExtrasMessage } = await import("./extras-25AF6TAR.js");
29
29
  const extras = await checkWebExtras();
30
30
  if (!extras.ok) throw new Error(webExtrasMessage(extras.missing));
31
- const { startWebServer } = await import("./server-AZAISL3I.js");
31
+ const { startWebServer } = await import("./server-VR6AHRBE.js");
32
32
  return startWebServer({ open: true });
33
33
  }
34
34
  async function closeTuiWebServer() {
@@ -48,4 +48,4 @@ export {
48
48
  startWebFromTui,
49
49
  closeTuiWebServer
50
50
  };
51
- //# sourceMappingURL=chunk-64F5HXFT.js.map
51
+ //# sourceMappingURL=chunk-EA6OGFOE.js.map
@@ -6,7 +6,7 @@ import {
6
6
  listAgents,
7
7
  loadConfig,
8
8
  nowMs
9
- } from "./chunk-LHUVET65.js";
9
+ } from "./chunk-CE6YASBF.js";
10
10
 
11
11
  // src/core/reaper.ts
12
12
  function sweepAgents(options = {}) {
@@ -183,4 +183,4 @@ export {
183
183
  skillsStatus,
184
184
  removeSkills
185
185
  };
186
- //# sourceMappingURL=chunk-5XIBZCJJ.js.map
186
+ //# sourceMappingURL=chunk-FL3LI2MU.js.map
@@ -6,7 +6,7 @@ import {
6
6
  redactSecrets,
7
7
  runDir,
8
8
  withRunsLock
9
- } from "./chunk-LHUVET65.js";
9
+ } from "./chunk-CE6YASBF.js";
10
10
 
11
11
  // src/core/approvals.ts
12
12
  import {
@@ -168,4 +168,4 @@ export {
168
168
  resolveRunApproval,
169
169
  REEVESAGENTS_VERSION
170
170
  };
171
- //# sourceMappingURL=chunk-ZK24DAS5.js.map
171
+ //# sourceMappingURL=chunk-NKT6GFCD.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  PROVIDER_DEFS
4
- } from "./chunk-LHUVET65.js";
4
+ } from "./chunk-CE6YASBF.js";
5
5
 
6
6
  // src/core/model-catalog.ts
7
7
  var PROVIDER_DEFAULT_MODEL = "";
@@ -27,4 +27,4 @@ export {
27
27
  modelDisplayName,
28
28
  modelSourceForProvider
29
29
  };
30
- //# sourceMappingURL=chunk-6YE7JRID.js.map
30
+ //# sourceMappingURL=chunk-QMRLJAEV.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  DEFAULT_LANGUAGE
4
- } from "./chunk-LHUVET65.js";
4
+ } from "./chunk-CE6YASBF.js";
5
5
 
6
6
  // src/i18n/locales/en.ts
7
7
  var en = {
@@ -5712,4 +5712,4 @@ export {
5712
5712
  localeCatalog,
5713
5713
  translatePhrase
5714
5714
  };
5715
- //# sourceMappingURL=chunk-4CVXS5HU.js.map
5715
+ //# sourceMappingURL=chunk-SFF7SYI6.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  installSkills
4
- } from "./chunk-5XIBZCJJ.js";
4
+ } from "./chunk-FL3LI2MU.js";
5
5
  import {
6
6
  attachAll,
7
7
  checkTmux,
@@ -11,7 +11,7 @@ import {
11
11
  resolveLaunchCmd,
12
12
  stateRoot,
13
13
  verifyServerLaunch
14
- } from "./chunk-LHUVET65.js";
14
+ } from "./chunk-CE6YASBF.js";
15
15
 
16
16
  // src/core/onboard.ts
17
17
  function buildOnboardingState() {
@@ -67,4 +67,4 @@ export {
67
67
  readTuiOpenToken,
68
68
  writeTuiOpenToken
69
69
  };
70
- //# sourceMappingURL=chunk-X3C4CRMT.js.map
70
+ //# sourceMappingURL=chunk-TUYP7APK.js.map
package/dist/cli.js CHANGED
@@ -4,21 +4,21 @@ import {
4
4
  runOnboarding,
5
5
  suggestedAgentPrompt,
6
6
  writeTuiOpenToken
7
- } from "./chunk-X3C4CRMT.js";
7
+ } from "./chunk-TUYP7APK.js";
8
8
  import {
9
9
  installSkills,
10
10
  removeSkills,
11
11
  skillsStatus,
12
12
  sweepAgents
13
- } from "./chunk-5XIBZCJJ.js";
13
+ } from "./chunk-FL3LI2MU.js";
14
14
  import {
15
15
  MODEL_CATALOG
16
- } from "./chunk-6YE7JRID.js";
16
+ } from "./chunk-QMRLJAEV.js";
17
17
  import {
18
18
  REEVESAGENTS_VERSION,
19
19
  listRunApprovals,
20
20
  resolveRunApproval
21
- } from "./chunk-ZK24DAS5.js";
21
+ } from "./chunk-NKT6GFCD.js";
22
22
  import {
23
23
  ALLOWED_KEYS,
24
24
  CONFIG_FIELDS,
@@ -60,7 +60,7 @@ import {
60
60
  startRunFromPreset,
61
61
  stopRun,
62
62
  verifyServerLaunch
63
- } from "./chunk-LHUVET65.js";
63
+ } from "./chunk-CE6YASBF.js";
64
64
  import "./chunk-D24DQQ6V.js";
65
65
 
66
66
  // src/cli.ts
@@ -847,7 +847,7 @@ program.command("web").description("start the on-demand loopback web UI for agen
847
847
  });
848
848
  program.command("mcp").description("start the agent control MCP server over stdio (for CLIs that have it attached)").action(async () => {
849
849
  try {
850
- const { startAgentMcpServer } = await import("./server-77NGKAHW.js");
850
+ const { startAgentMcpServer } = await import("./server-KTPEQQRJ.js");
851
851
  await startAgentMcpServer();
852
852
  } catch (err) {
853
853
  console.error(err instanceof Error ? err.message : String(err));
@@ -861,7 +861,7 @@ async function runWeb(opts) {
861
861
  console.error(webExtrasMessage(extras.missing));
862
862
  process.exit(1);
863
863
  }
864
- const { startWebServer } = await import("./server-AZAISL3I.js");
864
+ const { startWebServer } = await import("./server-VR6AHRBE.js");
865
865
  const parsed = opts.port ? Number.parseInt(opts.port, 10) : void 0;
866
866
  const handle = await startWebServer({
867
867
  port: parsed !== void 0 && Number.isFinite(parsed) ? parsed : void 0,
@@ -880,12 +880,12 @@ async function renderTui() {
880
880
  const [{ default: React }, { render }, { Router }] = await Promise.all([
881
881
  import("react"),
882
882
  import("ink"),
883
- import("./router-7PMCRHOB.js")
883
+ import("./router-Q2JZ7NEX.js")
884
884
  ]);
885
885
  try {
886
886
  await render(React.createElement(Router), { alternateScreen: false }).waitUntilExit();
887
887
  } finally {
888
- const { closeTuiWebServer } = await import("./tui-launch-V3ZEPE65.js");
888
+ const { closeTuiWebServer } = await import("./tui-launch-JTZU3RFS.js");
889
889
  await closeTuiWebServer();
890
890
  }
891
891
  process.exit(0);
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  modelDisplayName,
7
7
  modelSourceForProvider,
8
8
  modelValuesForProvider
9
- } from "./chunk-6YE7JRID.js";
9
+ } from "./chunk-QMRLJAEV.js";
10
10
  import {
11
11
  BIN,
12
12
  PROVIDERS,
@@ -39,7 +39,7 @@ import {
39
39
  startRun,
40
40
  stateRoot,
41
41
  stopRun
42
- } from "./chunk-LHUVET65.js";
42
+ } from "./chunk-CE6YASBF.js";
43
43
  import "./chunk-D24DQQ6V.js";
44
44
  export {
45
45
  BIN,
@@ -2,23 +2,23 @@
2
2
  import {
3
3
  buildOnboardingState,
4
4
  readTuiOpenToken
5
- } from "./chunk-X3C4CRMT.js";
5
+ } from "./chunk-TUYP7APK.js";
6
6
  import {
7
7
  sweepAgentsThrottled
8
- } from "./chunk-5XIBZCJJ.js";
8
+ } from "./chunk-FL3LI2MU.js";
9
9
  import {
10
10
  translate,
11
11
  translatePhrase
12
- } from "./chunk-4CVXS5HU.js";
12
+ } from "./chunk-SFF7SYI6.js";
13
13
  import {
14
14
  modelDisplayName,
15
15
  modelValuesForProvider
16
- } from "./chunk-6YE7JRID.js";
16
+ } from "./chunk-QMRLJAEV.js";
17
17
  import {
18
18
  REEVESAGENTS_VERSION,
19
19
  listRunApprovals,
20
20
  resolveRunApproval
21
- } from "./chunk-ZK24DAS5.js";
21
+ } from "./chunk-NKT6GFCD.js";
22
22
  import {
23
23
  CONFIG_FIELDS,
24
24
  DEFAULT_LANGUAGE,
@@ -73,11 +73,11 @@ import {
73
73
  startRunFromPreset,
74
74
  stateRoot,
75
75
  stopRun
76
- } from "./chunk-LHUVET65.js";
76
+ } from "./chunk-CE6YASBF.js";
77
77
  import "./chunk-D24DQQ6V.js";
78
78
  import {
79
79
  startWebFromTui
80
- } from "./chunk-64F5HXFT.js";
80
+ } from "./chunk-EA6OGFOE.js";
81
81
 
82
82
  // src/tui/router.tsx
83
83
  import { createContext as createContext6, useContext as useContext6, useState as useState37, useCallback as useCallback5, useEffect as useEffect17, useRef as useRef4 } from "react";
@@ -6572,4 +6572,4 @@ export {
6572
6572
  nextHistoryOnReset,
6573
6573
  useRouter
6574
6574
  };
6575
- //# sourceMappingURL=router-7PMCRHOB.js.map
6575
+ //# sourceMappingURL=router-Q2JZ7NEX.js.map
@@ -4,14 +4,14 @@ import {
4
4
  skillsStatus,
5
5
  sweepAgents,
6
6
  sweepAgentsThrottled
7
- } from "./chunk-5XIBZCJJ.js";
7
+ } from "./chunk-FL3LI2MU.js";
8
8
  import {
9
9
  REEVESAGENTS_VERSION,
10
10
  createRunApproval,
11
11
  listRunApprovals,
12
12
  readRunApproval,
13
13
  resolveRunApproval
14
- } from "./chunk-ZK24DAS5.js";
14
+ } from "./chunk-NKT6GFCD.js";
15
15
  import {
16
16
  ALLOWED_KEYS,
17
17
  BIN,
@@ -49,7 +49,7 @@ import {
49
49
  startRunFromPreset,
50
50
  startRunWithHead,
51
51
  stopRun
52
- } from "./chunk-LHUVET65.js";
52
+ } from "./chunk-CE6YASBF.js";
53
53
  import "./chunk-D24DQQ6V.js";
54
54
 
55
55
  // src/mcp/server.ts
@@ -711,4 +711,4 @@ export {
711
711
  sessionRunIsLive,
712
712
  startAgentMcpServer
713
713
  };
714
- //# sourceMappingURL=server-77NGKAHW.js.map
714
+ //# sourceMappingURL=server-KTPEQQRJ.js.map
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  localeCatalog,
4
4
  translatePhrase
5
- } from "./chunk-4CVXS5HU.js";
5
+ } from "./chunk-SFF7SYI6.js";
6
6
  import {
7
7
  modelValuesForProvider
8
- } from "./chunk-6YE7JRID.js";
8
+ } from "./chunk-QMRLJAEV.js";
9
9
  import {
10
10
  REEVESAGENTS_VERSION,
11
11
  listRunApprovals,
12
12
  resolveRunApproval
13
- } from "./chunk-ZK24DAS5.js";
13
+ } from "./chunk-NKT6GFCD.js";
14
14
  import {
15
15
  CONFIG_FIELDS,
16
16
  LANGUAGE_OPTIONS,
@@ -51,7 +51,7 @@ import {
51
51
  startRunFromPreset,
52
52
  stopRun,
53
53
  verifyServerLaunch
54
- } from "./chunk-LHUVET65.js";
54
+ } from "./chunk-CE6YASBF.js";
55
55
  import "./chunk-D24DQQ6V.js";
56
56
 
57
57
  // src/web/server.ts
@@ -1022,4 +1022,4 @@ async function startWebServer(options = {}) {
1022
1022
  export {
1023
1023
  startWebServer
1024
1024
  };
1025
- //# sourceMappingURL=server-AZAISL3I.js.map
1025
+ //# sourceMappingURL=server-VR6AHRBE.js.map
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  closeTuiWebServer,
4
4
  startWebFromTui
5
- } from "./chunk-64F5HXFT.js";
5
+ } from "./chunk-EA6OGFOE.js";
6
6
  export {
7
7
  closeTuiWebServer,
8
8
  startWebFromTui
9
9
  };
10
- //# sourceMappingURL=tui-launch-V3ZEPE65.js.map
10
+ //# sourceMappingURL=tui-launch-JTZU3RFS.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reevesagents",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "Local tmux-first workspace manager for AI CLI agents",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.34.1",