@minasoft/mina-ai-router 0.1.4 → 0.2.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/README.md +67 -16
- package/dist/apps/cli/src/index.js +1247 -43
- package/dist/apps/http-server/src/index.js +598 -46
- package/dist/apps/http-server/src/public/assets/index-Bl059Jd0.js +9 -0
- package/dist/apps/http-server/src/public/assets/index-CaPxN_Ez.css +1 -0
- package/dist/apps/http-server/src/public/index.html +16 -0
- package/dist/apps/mcp-server/src/index.js +54 -7
- package/dist/packages/core/src/capability-profile.js +145 -0
- package/dist/packages/core/src/index.js +3 -0
- package/dist/packages/core/src/mcp-preflight.js +80 -0
- package/dist/packages/core/src/registry.js +128 -3
- package/dist/packages/core/src/request-store.js +158 -0
- package/dist/packages/core/src/response-parser.js +76 -8
- package/dist/packages/core/src/router.js +408 -13
- package/dist/packages/core/src/version.js +57 -0
- package/dist/packages/mcp/src/provider.js +57 -6
- package/dist/packages/transports/src/headless/headless-transport.js +13 -8
- package/dist/packages/transports/src/tmux/tmux-client.js +334 -0
- package/dist/packages/transports/src/tmux/tmux-transport.js +10 -0
- package/docs/DEVELOPER-START-GUIDE.md +9 -1
- package/docs/GETTING-STARTED.md +10 -5
- package/docs/HTTP-UI-MCP.md +39 -13
- package/docs/MCP-CLIENT-SETUP.md +56 -3
- package/docs/SKILL-INSTALL-GUIDE.md +21 -3
- package/docs/TROUBLESHOOTING.md +47 -0
- package/docs/USER-START-GUIDE.md +155 -26
- package/docs/assets/mina-ai-router-overview.svg +109 -0
- package/package.json +19 -5
package/README.md
CHANGED
|
@@ -1,15 +1,31 @@
|
|
|
1
1
|
# Mina AI Router
|
|
2
2
|
|
|
3
|
-
Mina AI Router
|
|
3
|
+
Mina AI Router turns multiple local Codex and Claude CLI sessions into a visible collaboration mesh.
|
|
4
4
|
|
|
5
|
-
It runs
|
|
5
|
+
It runs each AI agent in a `tmux` session on your computer, registers the session with a local MCP router, and gives you a browser console to route work, inspect status, open terminal previews, and watch request activity.
|
|
6
|
+
|
|
7
|
+

|
|
6
8
|
|
|
7
9
|
GitHub: [stevennana/mina-ai-router](https://github.com/stevennana/mina-ai-router)
|
|
8
10
|
|
|
9
|
-
##
|
|
11
|
+
## Why Use It
|
|
12
|
+
|
|
13
|
+
Use Mina AI Router when you want several CLI agents to work together across local projects:
|
|
14
|
+
|
|
15
|
+
- ask one Codex or Claude session to delegate work to another
|
|
16
|
+
- keep every agent visible in `tmux`
|
|
17
|
+
- route tasks through local MCP tools instead of copy-pasting between terminals
|
|
18
|
+
- see live agent status, capabilities, terminal previews, and request history in one browser console
|
|
19
|
+
- keep orchestration local-first on your machine
|
|
20
|
+
|
|
21
|
+
## Install From GitHub
|
|
10
22
|
|
|
11
23
|
```sh
|
|
12
|
-
|
|
24
|
+
git clone https://github.com/stevennana/mina-ai-router.git
|
|
25
|
+
cd mina-ai-router
|
|
26
|
+
npm install
|
|
27
|
+
npm run build
|
|
28
|
+
npm link
|
|
13
29
|
mair version
|
|
14
30
|
```
|
|
15
31
|
|
|
@@ -26,23 +42,27 @@ Open the Web UI:
|
|
|
26
42
|
http://127.0.0.1:3333/
|
|
27
43
|
```
|
|
28
44
|
|
|
45
|
+
While this server is running, it owns the live router state for that state file. Compatible `mair` CLI reads and writes route through the running server, so `mair health`, `mair agents`, the Web UI, and the MCP endpoint agree on busy/available status without a restart.
|
|
46
|
+
|
|
47
|
+
`mair server start` reports success only after the local Mina health endpoint is ready. If startup fails because the port is occupied, or a stale pid file points at a non-Mina process, Mina reports an actionable diagnostic instead of a healthy-looking server.
|
|
48
|
+
|
|
29
49
|
## Connect Codex or Claude
|
|
30
50
|
|
|
31
|
-
|
|
51
|
+
Run setup from the project you want an agent to work in. It discovers the matching running router URL, configures MCP, installs the registration skill, and verifies the client profile.
|
|
32
52
|
|
|
33
53
|
```sh
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
codex
|
|
54
|
+
# Codex users
|
|
55
|
+
mair setup codex --project /path/to/project
|
|
56
|
+
mair doctor --client codex --project /path/to/project
|
|
57
|
+
|
|
58
|
+
# Claude users
|
|
59
|
+
mair setup claude --project /path/to/project
|
|
60
|
+
mair doctor --client claude --project /path/to/project
|
|
37
61
|
```
|
|
38
62
|
|
|
39
|
-
|
|
63
|
+
If you use both clients, run both setup commands and then `mair doctor --client all --project /path/to/project`.
|
|
40
64
|
|
|
41
|
-
|
|
42
|
-
claude mcp remove mina-ai-router
|
|
43
|
-
claude mcp add --transport http mina-ai-router http://127.0.0.1:3333/mcp
|
|
44
|
-
claude mcp get mina-ai-router
|
|
45
|
-
```
|
|
65
|
+
Manual MCP repair commands are still documented in the MCP Client Setup guide for unusual client profiles.
|
|
46
66
|
|
|
47
67
|
## Create an Agent
|
|
48
68
|
|
|
@@ -60,18 +80,49 @@ mair claude
|
|
|
60
80
|
|
|
61
81
|
You can also create agents from the Web UI by right-clicking the `Live Agent Flow` area and choosing `Create tmux Agent`.
|
|
62
82
|
|
|
83
|
+
Newly created agents move through explicit readiness states instead of silently appearing ready. The UI and CLI can show `created`, `permission-required`, `mcp-configuring`, `registration-pending`, `ready`, or `failed`. If a Codex or Claude session is waiting for trust approval or MCP setup, the agent is not treated as ready for collaboration until that blocker is visible and resolved.
|
|
84
|
+
|
|
85
|
+
## Collaborate Between Agents
|
|
86
|
+
|
|
87
|
+
From a registered Codex or Claude session, ask it to use Mina AI Router:
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
Use Mina AI Router to ask api_server:
|
|
91
|
+
Which REST endpoint should this frontend call for user lookup?
|
|
92
|
+
Summarize the method, endpoint, parameters, and source files.
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The source agent calls MCP `list_agents`, selects a target, sends the task with `call_agent`, and waits for the routed answer.
|
|
96
|
+
|
|
97
|
+
Mina passes caller identity into MCP results so an agent can recognize itself. `list_agents` marks the caller with `isSelf`, and `call_agent` rejects accidental self-calls unless `allowSelfCall: true` is provided for diagnostics.
|
|
98
|
+
|
|
99
|
+
## Inspect Reliability
|
|
100
|
+
|
|
101
|
+
The browser console is built for local live operations, not hidden background orchestration. During a two-agent collaboration you can:
|
|
102
|
+
|
|
103
|
+
- open the routed request detail to inspect lifecycle, parsed answer, raw terminal evidence, and parser diagnostics
|
|
104
|
+
- retry, cancel, archive, unarchive, interrupt, or mark recovered requests from the activity panel
|
|
105
|
+
- distinguish fresh, stale, missing, generated, manually edited, strong, thin, and missing capability profiles
|
|
106
|
+
- inspect MCP preflight state and permission/trust blockers before a new CLI session is routed work
|
|
107
|
+
- recover long transactions where the router timed out but the target terminal may still be running
|
|
108
|
+
- see health states shared by the CLI and UI: `available`, `busy`, `stale`, `missing`, `needs-attention`, and `unknown`
|
|
109
|
+
- use `mair health`, `mair agents`, and `mair agent <id>` to confirm the same status model from a terminal
|
|
110
|
+
- trust `mair health` to report the MCP URL for the matching running server, including non-default ports
|
|
111
|
+
- see active server-routed requests as `busy` from both the browser and CLI read commands
|
|
112
|
+
|
|
63
113
|
## What You Get
|
|
64
114
|
|
|
65
115
|
- Local HTTP UI at `http://127.0.0.1:3333/`
|
|
66
116
|
- Local MCP endpoint at `http://127.0.0.1:3333/mcp`
|
|
67
117
|
- `mair` CLI for server and agent controls
|
|
68
|
-
- Browser terminal preview
|
|
69
|
-
- Agent capability summaries and editable metadata
|
|
118
|
+
- Browser operations console with live flow, inspector, terminal preview, and activity log
|
|
119
|
+
- Agent capability summaries, structured capability profiles, readiness state, and editable metadata
|
|
70
120
|
- MCP tools: `list_agents`, `register_agent`, `call_agent`, `get_request_status`
|
|
71
121
|
- Repo-local skill for agent self-registration
|
|
72
122
|
|
|
73
123
|
## Guides
|
|
74
124
|
|
|
125
|
+
- [Roadmap](https://github.com/stevennana/mina-ai-router/blob/main/ROADMAP.md)
|
|
75
126
|
- [Getting Started](https://github.com/stevennana/mina-ai-router/blob/main/docs/GETTING-STARTED.md)
|
|
76
127
|
- [User Start Guide](https://github.com/stevennana/mina-ai-router/blob/main/docs/USER-START-GUIDE.md)
|
|
77
128
|
- [MCP Client Setup](https://github.com/stevennana/mina-ai-router/blob/main/docs/MCP-CLIENT-SETUP.md)
|