reevesagents 1.4.0 → 1.5.0
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 +20 -0
- package/dist/{chunk-EX5LH2KW.js → chunk-6RPG22BH.js} +2 -148
- package/dist/{chunk-BELIYZTN.js → chunk-BWJKK6LM.js} +232 -2
- package/dist/{chunk-33EB4RUP.js → chunk-HL5MTR5M.js} +2 -2
- package/dist/{chunk-KL5YFLQF.js → chunk-LKJSQLX2.js} +236 -7
- package/dist/{chunk-NJWOKVBZ.js → chunk-LZMMFJYG.js} +2 -2
- package/dist/chunk-OHEIERAD.js +61 -0
- package/dist/cli.js +90 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{router-MGXDADKM.js → router-7MRY24Y5.js} +306 -205
- package/dist/{server-L5DTU6U2.js → server-BNCUJ4YU.js} +16 -13
- package/dist/{server-KHY23W6D.js → server-TUKVM6PW.js} +69 -26
- package/dist/{tui-launch-2UWK76V3.js → tui-launch-Y5YXPUHS.js} +2 -2
- package/dist/web/app.js +35 -1
- package/dist/web/index.html +18 -0
- package/package.json +1 -1
- package/dist/chunk-PEOJCUQI.js +0 -29
|
@@ -2,32 +2,32 @@
|
|
|
2
2
|
import {
|
|
3
3
|
localeCatalog,
|
|
4
4
|
translatePhrase
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BWJKK6LM.js";
|
|
6
6
|
import {
|
|
7
7
|
modelValuesForProvider
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LZMMFJYG.js";
|
|
9
9
|
import {
|
|
10
10
|
REEVESAGENTS_VERSION,
|
|
11
|
-
attach,
|
|
12
|
-
attachAll,
|
|
13
|
-
detach,
|
|
14
|
-
hostStatus,
|
|
15
11
|
listRunApprovals,
|
|
16
12
|
resolveRunApproval
|
|
17
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6RPG22BH.js";
|
|
18
14
|
import {
|
|
19
15
|
CONFIG_FIELDS,
|
|
20
16
|
LANGUAGE_OPTIONS,
|
|
21
17
|
PROVIDERS,
|
|
22
18
|
archiveAndRemoveRun,
|
|
19
|
+
attach,
|
|
20
|
+
attachAll,
|
|
23
21
|
autoCleanupRuns,
|
|
24
22
|
coerceExtraArgs,
|
|
25
23
|
computeRunStatus,
|
|
26
24
|
deleteAgent,
|
|
27
25
|
deletePreset,
|
|
28
26
|
deleteRunHistory,
|
|
27
|
+
detach,
|
|
29
28
|
detectAvailable,
|
|
30
29
|
findAgent,
|
|
30
|
+
hostStatus,
|
|
31
31
|
isLanguageCode,
|
|
32
32
|
killAgent,
|
|
33
33
|
listAgents,
|
|
@@ -48,8 +48,9 @@ import {
|
|
|
48
48
|
spawnWorker,
|
|
49
49
|
startRun,
|
|
50
50
|
startRunFromPreset,
|
|
51
|
-
stopRun
|
|
52
|
-
|
|
51
|
+
stopRun,
|
|
52
|
+
verifyServerLaunch
|
|
53
|
+
} from "./chunk-LKJSQLX2.js";
|
|
53
54
|
import "./chunk-D24DQQ6V.js";
|
|
54
55
|
|
|
55
56
|
// src/web/server.ts
|
|
@@ -658,8 +659,10 @@ function detachMcpHostAction(body) {
|
|
|
658
659
|
const result = detach(key);
|
|
659
660
|
return { result, hosts: hostStatus() };
|
|
660
661
|
}
|
|
661
|
-
function attachAllMcpHostsAction() {
|
|
662
|
-
|
|
662
|
+
async function attachAllMcpHostsAction() {
|
|
663
|
+
const results = attachAll();
|
|
664
|
+
const verify = await verifyServerLaunch();
|
|
665
|
+
return { results, hosts: hostStatus(), verify };
|
|
663
666
|
}
|
|
664
667
|
function configPayload() {
|
|
665
668
|
const config = loadConfig().global;
|
|
@@ -830,7 +833,7 @@ async function handleRequest(req, res, ctx) {
|
|
|
830
833
|
}
|
|
831
834
|
if (method === "POST" && path === "/api/mcp-hosts/attach-all") {
|
|
832
835
|
try {
|
|
833
|
-
sendJson(res, 200, attachAllMcpHostsAction());
|
|
836
|
+
sendJson(res, 200, await attachAllMcpHostsAction());
|
|
834
837
|
} catch (err) {
|
|
835
838
|
sendJson(res, 400, { error: errMessage(err) });
|
|
836
839
|
}
|
|
@@ -1017,4 +1020,4 @@ async function startWebServer(options = {}) {
|
|
|
1017
1020
|
export {
|
|
1018
1021
|
startWebServer
|
|
1019
1022
|
};
|
|
1020
|
-
//# sourceMappingURL=server-
|
|
1023
|
+
//# sourceMappingURL=server-BNCUJ4YU.js.map
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
REEVESAGENTS_VERSION,
|
|
4
|
-
attach,
|
|
5
|
-
attachAll,
|
|
6
4
|
createRunApproval,
|
|
7
|
-
detach,
|
|
8
|
-
hostStatus,
|
|
9
5
|
listRunApprovals,
|
|
10
6
|
readRunApproval,
|
|
11
7
|
resolveRunApproval
|
|
12
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6RPG22BH.js";
|
|
13
9
|
import {
|
|
14
10
|
ALLOWED_KEYS,
|
|
15
11
|
BIN,
|
|
16
12
|
CONFIG_FIELDS,
|
|
17
13
|
PROVIDER_DEFS,
|
|
18
14
|
archiveAndRemoveRun,
|
|
15
|
+
attach,
|
|
16
|
+
attachAll,
|
|
19
17
|
coerceExtraArgs,
|
|
20
18
|
deleteAgent,
|
|
21
19
|
deletePreset,
|
|
22
20
|
deleteRunHistory,
|
|
21
|
+
detach,
|
|
23
22
|
detectAvailable,
|
|
24
23
|
findAgent,
|
|
24
|
+
hostStatus,
|
|
25
25
|
interrupt,
|
|
26
26
|
isProvider,
|
|
27
27
|
killAgent,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
startRunFromPreset,
|
|
44
44
|
startRunWithHead,
|
|
45
45
|
stopRun
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-LKJSQLX2.js";
|
|
47
47
|
import "./chunk-D24DQQ6V.js";
|
|
48
48
|
|
|
49
49
|
// src/mcp/server.ts
|
|
@@ -585,43 +585,86 @@ function handleAgentMcpTool(name, a) {
|
|
|
585
585
|
return fail(e instanceof Error ? e.message : String(e));
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
+
var GUIDE_URI = "reevesagents://guide";
|
|
589
|
+
var MCP_INSTRUCTIONS = `reevesagents lets you run and steer other AI CLI agents from this session: Claude Code, Codex, Kimi, Qwen, OpenCode, Hermes, and more, each in its own tmux window. Hand slices of work to other models, then read or redirect what they do.
|
|
590
|
+
|
|
591
|
+
Drive loop:
|
|
592
|
+
1. list_providers - which CLIs are installed here and their models.
|
|
593
|
+
2. spawn { provider, task } - start an agent; returns agent_id and run_id. Omit run_id to keep adding agents to the same run.
|
|
594
|
+
3. read { agent_id } - an agent's recent output.
|
|
595
|
+
4. send_text { agent_id, text } then send_key { agent_id, key: "enter" } - type a message and submit it. send_text alone does NOT submit.
|
|
596
|
+
5. kill { agent_id } or stop { run_id } when done.
|
|
597
|
+
|
|
598
|
+
Every id comes from spawn or list. Read the reevesagents://guide resource for a worked example.`;
|
|
599
|
+
var GUIDE_TEXT = `# reevesagents: drive a team of AI CLIs
|
|
600
|
+
|
|
601
|
+
You can spawn and steer other coding CLIs from here. Each agent is a real CLI in its own tmux window on this machine. reevesagents never proxies model traffic or stores credentials; each CLI uses its own login.
|
|
602
|
+
|
|
603
|
+
## Worked example: hand a task to Codex, then steer it
|
|
604
|
+
1. list_providers confirm "codex" is available
|
|
605
|
+
2. spawn { "provider": "codex", "task": "summarize README.md" }
|
|
606
|
+
returns { "agent_id": "ab12...", "run_id": "cd34..." }
|
|
607
|
+
3. read { "agent_id": "ab12..." } see what it produced
|
|
608
|
+
4. send_text { "agent_id": "ab12...", "text": "now write tests for it" }
|
|
609
|
+
send_key { "agent_id": "ab12...", "key": "enter" }
|
|
610
|
+
5. kill { "agent_id": "ab12..." } stop it when finished
|
|
611
|
+
|
|
612
|
+
## Notes
|
|
613
|
+
- send_text types but does not submit; always follow it with send_key enter.
|
|
614
|
+
- Omit run_id on spawn to add agents to the run you started; pass run_id to target a specific run.
|
|
615
|
+
- list shows every run and agent; read shows recent output (20 lines by default).
|
|
616
|
+
- Spawned agents are plain CLIs and cannot spawn others unless you attach this MCP to them too.`;
|
|
617
|
+
function listMcpResources() {
|
|
618
|
+
return [
|
|
619
|
+
{
|
|
620
|
+
uri: PROVIDER_CATALOG_URI,
|
|
621
|
+
name: "Providers and models",
|
|
622
|
+
description: "CLI providers this machine can launch and their known models.",
|
|
623
|
+
mimeType: "application/json"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
uri: GUIDE_URI,
|
|
627
|
+
name: "Getting started",
|
|
628
|
+
description: "What reevesagents is and a worked example of driving an agent.",
|
|
629
|
+
mimeType: "text/markdown"
|
|
630
|
+
}
|
|
631
|
+
];
|
|
632
|
+
}
|
|
633
|
+
function readMcpResource(uri) {
|
|
634
|
+
if (uri === PROVIDER_CATALOG_URI) {
|
|
635
|
+
return { uri, mimeType: "application/json", text: JSON.stringify(buildProviderCatalog()) };
|
|
636
|
+
}
|
|
637
|
+
if (uri === GUIDE_URI) {
|
|
638
|
+
return { uri, mimeType: "text/markdown", text: GUIDE_TEXT };
|
|
639
|
+
}
|
|
640
|
+
throw new Error(`Unknown resource: ${uri}`);
|
|
641
|
+
}
|
|
588
642
|
async function startAgentMcpServer() {
|
|
589
643
|
const server = new Server(
|
|
590
644
|
{ name: "reevesagents", version: REEVESAGENTS_VERSION },
|
|
591
|
-
{ capabilities: { tools: {}, resources: {} } }
|
|
645
|
+
{ capabilities: { tools: {}, resources: {} }, instructions: MCP_INSTRUCTIONS }
|
|
592
646
|
);
|
|
593
647
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: MCP_TOOLS }));
|
|
594
648
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
595
649
|
const { name, arguments: args = {} } = request.params;
|
|
596
650
|
return handleAgentMcpTool(name, args);
|
|
597
651
|
});
|
|
598
|
-
server.setRequestHandler(ListResourcesRequestSchema, async () => ({
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
uri: PROVIDER_CATALOG_URI,
|
|
602
|
-
name: "Providers and models",
|
|
603
|
-
description: "CLI providers this machine can launch and their known models.",
|
|
604
|
-
mimeType: "application/json"
|
|
605
|
-
}
|
|
606
|
-
]
|
|
652
|
+
server.setRequestHandler(ListResourcesRequestSchema, async () => ({ resources: listMcpResources() }));
|
|
653
|
+
server.setRequestHandler(ReadResourceRequestSchema, async (request) => ({
|
|
654
|
+
contents: [readMcpResource(request.params.uri)]
|
|
607
655
|
}));
|
|
608
|
-
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
609
|
-
const { uri } = request.params;
|
|
610
|
-
if (uri !== PROVIDER_CATALOG_URI) throw new Error(`Unknown resource: ${uri}`);
|
|
611
|
-
return {
|
|
612
|
-
contents: [
|
|
613
|
-
{ uri, mimeType: "application/json", text: JSON.stringify(buildProviderCatalog()) }
|
|
614
|
-
]
|
|
615
|
-
};
|
|
616
|
-
});
|
|
617
656
|
const transport = new StdioServerTransport();
|
|
618
657
|
await server.connect(transport);
|
|
619
658
|
}
|
|
620
659
|
export {
|
|
660
|
+
GUIDE_TEXT,
|
|
661
|
+
MCP_INSTRUCTIONS,
|
|
621
662
|
MCP_TOOLS,
|
|
622
663
|
buildProviderCatalog,
|
|
623
664
|
handleAgentMcpTool,
|
|
665
|
+
listMcpResources,
|
|
666
|
+
readMcpResource,
|
|
624
667
|
sessionRunIsLive,
|
|
625
668
|
startAgentMcpServer
|
|
626
669
|
};
|
|
627
|
-
//# sourceMappingURL=server-
|
|
670
|
+
//# sourceMappingURL=server-TUKVM6PW.js.map
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
closeTuiWebServer,
|
|
4
4
|
startWebFromTui
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HL5MTR5M.js";
|
|
6
6
|
export {
|
|
7
7
|
closeTuiWebServer,
|
|
8
8
|
startWebFromTui
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=tui-launch-
|
|
10
|
+
//# sourceMappingURL=tui-launch-Y5YXPUHS.js.map
|
package/dist/web/app.js
CHANGED
|
@@ -105,6 +105,7 @@
|
|
|
105
105
|
'web.stopAgentError': 'Could not stop agent: {{message}}',
|
|
106
106
|
'web.stopRunConfirm': 'Stop run "{{name}}"? Every agent in it will be stopped.',
|
|
107
107
|
'web.stopRunError': 'Could not stop run: {{message}}',
|
|
108
|
+
'web.deletePresetConfirm': 'Delete preset "{{name}}"?',
|
|
108
109
|
'web.deleteRunConfirm': 'Delete stopped run "{{name}}"? A simple history record will be kept.',
|
|
109
110
|
'web.deleteRunError': 'Could not delete stopped run: {{message}}',
|
|
110
111
|
'web.deleteAgentConfirm': 'Delete stopped agent "{{name}}"? This removes the saved agent record.',
|
|
@@ -256,6 +257,14 @@
|
|
|
256
257
|
aboutDialog: document.getElementById('about-dialog'),
|
|
257
258
|
aboutList: document.getElementById('about-list'),
|
|
258
259
|
aboutClose: document.getElementById('about-close'),
|
|
260
|
+
welcomeDialog: document.getElementById('welcome-dialog'),
|
|
261
|
+
welcomeTitle: document.getElementById('welcome-title'),
|
|
262
|
+
welcomeSubtitle: document.getElementById('welcome-subtitle'),
|
|
263
|
+
welcomeIntro: document.getElementById('welcome-intro'),
|
|
264
|
+
welcomeDoorRun: document.getElementById('welcome-door-run'),
|
|
265
|
+
welcomeDoorConnect: document.getElementById('welcome-door-connect'),
|
|
266
|
+
welcomeConnect: document.getElementById('welcome-connect'),
|
|
267
|
+
welcomeClose: document.getElementById('welcome-close'),
|
|
259
268
|
configBtn: document.getElementById('config-btn'),
|
|
260
269
|
configDialog: document.getElementById('config-dialog'),
|
|
261
270
|
configList: document.getElementById('config-list'),
|
|
@@ -279,6 +288,7 @@
|
|
|
279
288
|
let language = 'en'
|
|
280
289
|
let languages = []
|
|
281
290
|
let messages = WEB_EN
|
|
291
|
+
let welcomeChecked = false
|
|
282
292
|
let selectedId = null
|
|
283
293
|
let session = null // { id, ws, term, fit, observer }
|
|
284
294
|
let createContext = { kind: 'run', runId: '' }
|
|
@@ -330,6 +340,7 @@
|
|
|
330
340
|
renderSidebar()
|
|
331
341
|
reconcileCreateDialog()
|
|
332
342
|
reconcileSelectedAgent()
|
|
343
|
+
if (!welcomeChecked) { welcomeChecked = true; maybeShowWelcome() }
|
|
333
344
|
}
|
|
334
345
|
|
|
335
346
|
function subscribe() {
|
|
@@ -403,6 +414,13 @@
|
|
|
403
414
|
el.presetsBtn.textContent = t('web.presets')
|
|
404
415
|
el.doctorBtn.textContent = t('web.doctor')
|
|
405
416
|
el.aboutBtn.textContent = t('web.about')
|
|
417
|
+
el.welcomeTitle.textContent = t('setup.title')
|
|
418
|
+
el.welcomeSubtitle.textContent = t('setup.subtitle')
|
|
419
|
+
el.welcomeIntro.textContent = t('setup.intro')
|
|
420
|
+
el.welcomeDoorRun.textContent = `${t('setup.startRun')} (${t('setup.startRunHint')})`
|
|
421
|
+
el.welcomeDoorConnect.textContent = `${t('setup.connectAll')} (${t('setup.connectAllHint')})`
|
|
422
|
+
el.welcomeConnect.textContent = t('web.agentControl')
|
|
423
|
+
el.welcomeClose.textContent = t('setup.done')
|
|
406
424
|
el.mcpDialogTitle.textContent = t('web.mcpTitle')
|
|
407
425
|
el.mcpDialogSubtitle.textContent = t('web.mcpSubtitle')
|
|
408
426
|
el.mcpEmpty.textContent = t('web.mcpEmpty')
|
|
@@ -1656,6 +1674,20 @@
|
|
|
1656
1674
|
}
|
|
1657
1675
|
}
|
|
1658
1676
|
|
|
1677
|
+
// Show a one-time getting-started popup on a browser's first visit. The flag
|
|
1678
|
+
// lives in localStorage, so it never nags after the first dismissal.
|
|
1679
|
+
function maybeShowWelcome() {
|
|
1680
|
+
let seen
|
|
1681
|
+
try {
|
|
1682
|
+
seen = window.localStorage.getItem('reeves.welcomed') === '1'
|
|
1683
|
+
} catch {
|
|
1684
|
+
return
|
|
1685
|
+
}
|
|
1686
|
+
if (seen) return
|
|
1687
|
+
try { window.localStorage.setItem('reeves.welcomed', '1') } catch { /* private mode: skip persistence */ }
|
|
1688
|
+
el.welcomeDialog.showModal()
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1659
1691
|
function openMcpDialog() {
|
|
1660
1692
|
setMcpError(null)
|
|
1661
1693
|
mcpHosts = []
|
|
@@ -1984,7 +2016,7 @@
|
|
|
1984
2016
|
}
|
|
1985
2017
|
|
|
1986
2018
|
async function deletePreset(name) {
|
|
1987
|
-
if (!confirm(
|
|
2019
|
+
if (!confirm(t('web.deletePresetConfirm', { name }))) return
|
|
1988
2020
|
el.presetsError.hidden = true
|
|
1989
2021
|
try {
|
|
1990
2022
|
await api('POST', `/api/presets/${encodeURIComponent(name)}/delete`, { confirm: true })
|
|
@@ -2026,6 +2058,8 @@
|
|
|
2026
2058
|
el.doctorClose.addEventListener('click', () => el.doctorDialog.close())
|
|
2027
2059
|
el.aboutBtn.addEventListener('click', openAboutDialog)
|
|
2028
2060
|
el.aboutClose.addEventListener('click', () => el.aboutDialog.close())
|
|
2061
|
+
el.welcomeConnect.addEventListener('click', () => { el.welcomeDialog.close(); openMcpDialog() })
|
|
2062
|
+
el.welcomeClose.addEventListener('click', () => el.welcomeDialog.close())
|
|
2029
2063
|
el.configBtn.addEventListener('click', openConfigDialog)
|
|
2030
2064
|
el.configSave.addEventListener('click', saveConfig)
|
|
2031
2065
|
el.configClose.addEventListener('click', () => el.configDialog.close())
|
package/dist/web/index.html
CHANGED
|
@@ -242,6 +242,24 @@
|
|
|
242
242
|
</div>
|
|
243
243
|
</dialog>
|
|
244
244
|
|
|
245
|
+
<dialog id="welcome-dialog" class="dialog mcp-dialog">
|
|
246
|
+
<div class="mcp-panel">
|
|
247
|
+
<div class="dialog-header">
|
|
248
|
+
<div id="welcome-title" class="dialog-title">Get started</div>
|
|
249
|
+
<div id="welcome-subtitle" class="dialog-subtitle">Set up reevesagents and connect your CLIs.</div>
|
|
250
|
+
</div>
|
|
251
|
+
<div class="about-list">
|
|
252
|
+
<div id="welcome-intro"></div>
|
|
253
|
+
<div id="welcome-door-run"></div>
|
|
254
|
+
<div id="welcome-door-connect"></div>
|
|
255
|
+
</div>
|
|
256
|
+
<div class="dialog-actions">
|
|
257
|
+
<button type="button" id="welcome-connect" class="btn btn-accent">Agent control</button>
|
|
258
|
+
<button type="button" id="welcome-close" class="btn">Continue</button>
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
</dialog>
|
|
262
|
+
|
|
245
263
|
<dialog id="config-dialog" class="dialog mcp-dialog">
|
|
246
264
|
<div class="mcp-panel">
|
|
247
265
|
<div class="dialog-header">
|
package/package.json
CHANGED
package/dist/chunk-PEOJCUQI.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
stateRoot
|
|
4
|
-
} from "./chunk-KL5YFLQF.js";
|
|
5
|
-
|
|
6
|
-
// src/core/tui-open.ts
|
|
7
|
-
import { mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
8
|
-
import { join } from "path";
|
|
9
|
-
function tokenPath() {
|
|
10
|
-
return join(stateRoot(), "tui-open-token");
|
|
11
|
-
}
|
|
12
|
-
function readTuiOpenToken() {
|
|
13
|
-
try {
|
|
14
|
-
return readFileSync(tokenPath(), "utf-8").trim();
|
|
15
|
-
} catch {
|
|
16
|
-
return "";
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
function writeTuiOpenToken() {
|
|
20
|
-
mkdirSync(stateRoot(), { recursive: true });
|
|
21
|
-
writeFileSync(tokenPath(), `${Date.now()}
|
|
22
|
-
`, "utf-8");
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
readTuiOpenToken,
|
|
27
|
-
writeTuiOpenToken
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=chunk-PEOJCUQI.js.map
|