moonbridge 0.5.1__tar.gz → 0.6.0__tar.gz
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.
- moonbridge-0.6.0/.release-please-manifest.json +3 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/CHANGELOG.md +14 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/CLAUDE.md +6 -2
- {moonbridge-0.5.1 → moonbridge-0.6.0}/PKG-INFO +51 -19
- {moonbridge-0.5.1 → moonbridge-0.6.0}/README.md +48 -16
- {moonbridge-0.5.1 → moonbridge-0.6.0}/pyproject.toml +2 -2
- {moonbridge-0.5.1 → moonbridge-0.6.0}/src/moonbridge/__init__.py +2 -2
- {moonbridge-0.5.1 → moonbridge-0.6.0}/src/moonbridge/adapters/base.py +30 -1
- {moonbridge-0.5.1 → moonbridge-0.6.0}/src/moonbridge/adapters/codex.py +1 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/src/moonbridge/adapters/kimi.py +1 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/src/moonbridge/server.py +53 -153
- moonbridge-0.6.0/src/moonbridge/tools.py +334 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/tests/test_adapters.py +97 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/tests/test_server.py +126 -63
- moonbridge-0.6.0/tests/test_tools.py +274 -0
- moonbridge-0.5.1/.release-please-manifest.json +0 -3
- {moonbridge-0.5.1 → moonbridge-0.6.0}/.env.example +0 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/.github/workflows/publish.yml +0 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/.github/workflows/release-please.yml +0 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/.github/workflows/test.yml +0 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/.gitignore +0 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/LICENSE +0 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/VISION.md +0 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/release-please-config.json +0 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/src/moonbridge/adapters/__init__.py +0 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/src/moonbridge/py.typed +0 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/src/moonbridge/version_check.py +0 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/tests/__init__.py +0 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/tests/conftest.py +0 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/tests/test_version_check.py +0 -0
- {moonbridge-0.5.1 → moonbridge-0.6.0}/uv.lock +0 -0
|
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.6.0](https://github.com/misty-step/moonbridge/compare/moonbridge-v0.5.2...moonbridge-v0.6.0) (2026-02-03)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add AgentResult dataclass for typed result handling ([#63](https://github.com/misty-step/moonbridge/issues/63)) ([75e369f](https://github.com/misty-step/moonbridge/commit/75e369f5c00dece7d770c2a4a0b0cb804c422f81))
|
|
14
|
+
|
|
15
|
+
## [0.5.2](https://github.com/misty-step/moonbridge/compare/moonbridge-v0.5.1...moonbridge-v0.5.2) (2026-02-01)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* handle ProcessLookupError on SIGKILL path in _terminate_process ([#58](https://github.com/misty-step/moonbridge/issues/58)) ([b52d745](https://github.com/misty-step/moonbridge/commit/b52d7452bdc1777d63c42a2ce70d6e290f9b0c54))
|
|
21
|
+
|
|
8
22
|
## [0.5.1](https://github.com/misty-step/moonbridge/compare/moonbridge-v0.5.0...moonbridge-v0.5.1) (2026-02-01)
|
|
9
23
|
|
|
10
24
|
|
|
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|
|
4
4
|
|
|
5
5
|
## What is Moonbridge
|
|
6
6
|
|
|
7
|
-
An MCP server that spawns
|
|
7
|
+
An MCP server that spawns AI coding agents from any MCP client. Supports multiple backends (Kimi, Codex) with parallel execution—run 10 approaches simultaneously for a fraction of the cost.
|
|
8
8
|
|
|
9
9
|
## Commands
|
|
10
10
|
|
|
@@ -79,7 +79,9 @@ The MCP library is also stubbed in conftest when not installed, enabling tests t
|
|
|
79
79
|
| Variable | Default | Purpose |
|
|
80
80
|
|----------|---------|---------|
|
|
81
81
|
| `MOONBRIDGE_ADAPTER` | `kimi` | CLI backend to use (`kimi`, `codex`) |
|
|
82
|
-
| `MOONBRIDGE_TIMEOUT` | `600` |
|
|
82
|
+
| `MOONBRIDGE_TIMEOUT` | `600` | Global timeout fallback (30-3600s) |
|
|
83
|
+
| `MOONBRIDGE_CODEX_TIMEOUT` | `1800` | Codex-specific timeout (30min default) |
|
|
84
|
+
| `MOONBRIDGE_KIMI_TIMEOUT` | `600` | Kimi-specific timeout (10min default) |
|
|
83
85
|
| `MOONBRIDGE_MAX_AGENTS` | `10` | Max parallel agents |
|
|
84
86
|
| `MOONBRIDGE_ALLOWED_DIRS` | (none) | Colon-separated directory allowlist |
|
|
85
87
|
| `MOONBRIDGE_STRICT` | `false` | Exit if ALLOWED_DIRS unset |
|
|
@@ -88,6 +90,8 @@ The MCP library is also stubbed in conftest when not installed, enabling tests t
|
|
|
88
90
|
| `MOONBRIDGE_KIMI_MODEL` | (none) | Kimi-specific model override |
|
|
89
91
|
| `MOONBRIDGE_CODEX_MODEL` | (none) | Codex-specific model override |
|
|
90
92
|
|
|
93
|
+
Timeout resolution order: tool param > adapter env var > adapter default > global env var > 600s.
|
|
94
|
+
|
|
91
95
|
Model resolution order: tool param > adapter env var > global env var > CLI default.
|
|
92
96
|
|
|
93
97
|
All model values are validated: whitespace is stripped, empty strings become None, and models starting with `-` are rejected (flag injection prevention).
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: moonbridge
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: MCP server for spawning Kimi
|
|
3
|
+
Version: 0.6.0
|
|
4
|
+
Summary: MCP server for spawning AI coding agents (Kimi, Codex, and more)
|
|
5
5
|
Project-URL: Homepage, https://github.com/misty-step/moonbridge
|
|
6
6
|
Project-URL: Repository, https://github.com/misty-step/moonbridge
|
|
7
7
|
Project-URL: Issues, https://github.com/misty-step/moonbridge/issues
|
|
8
8
|
Author-email: Phaedrus <hello@mistystep.io>
|
|
9
9
|
License-Expression: MIT
|
|
10
10
|
License-File: LICENSE
|
|
11
|
-
Keywords: agent,ai,claude,kimi,mcp
|
|
11
|
+
Keywords: agent,ai,claude,codex,kimi,mcp
|
|
12
12
|
Classifier: Development Status :: 4 - Beta
|
|
13
13
|
Classifier: Environment :: Console
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
@@ -31,7 +31,7 @@ Description-Content-Type: text/markdown
|
|
|
31
31
|
|
|
32
32
|
**Your MCP client just got a team.**
|
|
33
33
|
|
|
34
|
-
Spawn
|
|
34
|
+
Spawn AI coding agents from Claude Code, Cursor, or any MCP client. Run 10 approaches in parallel for a fraction of the cost.
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
37
|
uvx moonbridge
|
|
@@ -39,10 +39,12 @@ uvx moonbridge
|
|
|
39
39
|
|
|
40
40
|
## Quick Start
|
|
41
41
|
|
|
42
|
-
1. **Install
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
1. **Install at least one supported CLI:**
|
|
43
|
+
|
|
44
|
+
| Adapter | Install | Authenticate |
|
|
45
|
+
|---------|---------|--------------|
|
|
46
|
+
| Kimi (default) | `uv tool install --python 3.13 kimi-cli` | `kimi login` |
|
|
47
|
+
| Codex | `npm install -g @openai/codex` | Set `OPENAI_API_KEY` |
|
|
46
48
|
|
|
47
49
|
2. **Add to MCP config** (`~/.mcp.json`):
|
|
48
50
|
```json
|
|
@@ -94,7 +96,8 @@ export MOONBRIDGE_SKIP_UPDATE_CHECK=1
|
|
|
94
96
|
|------|----------|
|
|
95
97
|
| `spawn_agent` | Single task: "Write tests for auth.ts" |
|
|
96
98
|
| `spawn_agents_parallel` | Go wide: 10 agents, 10 approaches, pick the best |
|
|
97
|
-
| `check_status` | Verify
|
|
99
|
+
| `check_status` | Verify the configured CLI is installed and authenticated |
|
|
100
|
+
| `list_adapters` | Show available adapters and their status |
|
|
98
101
|
|
|
99
102
|
### Example: Parallel Exploration
|
|
100
103
|
|
|
@@ -117,7 +120,10 @@ Three approaches. One request. You choose the winner.
|
|
|
117
120
|
| Parameter | Type | Required | Description |
|
|
118
121
|
|-----------|------|----------|-------------|
|
|
119
122
|
| `prompt` | string | Yes | Task description for the agent |
|
|
120
|
-
| `
|
|
123
|
+
| `adapter` | string | No | Backend to use: `kimi`, `codex` (default: `kimi`) |
|
|
124
|
+
| `model` | string | No | Model override (e.g., `gpt-5.2-codex`) |
|
|
125
|
+
| `thinking` | boolean | No | Enable reasoning mode (Kimi only) |
|
|
126
|
+
| `reasoning_effort` | string | No | Reasoning budget: `low`, `medium`, `high`, `xhigh` (Codex only) |
|
|
121
127
|
| `timeout_seconds` | integer | No | Override default timeout (30-3600) |
|
|
122
128
|
|
|
123
129
|
**`spawn_agents_parallel`**
|
|
@@ -126,7 +132,10 @@ Three approaches. One request. You choose the winner.
|
|
|
126
132
|
|-----------|------|----------|-------------|
|
|
127
133
|
| `agents` | array | Yes | List of agent configs (max 10) |
|
|
128
134
|
| `agents[].prompt` | string | Yes | Task for this agent |
|
|
129
|
-
| `agents[].
|
|
135
|
+
| `agents[].adapter` | string | No | Backend for this agent |
|
|
136
|
+
| `agents[].model` | string | No | Model override for this agent |
|
|
137
|
+
| `agents[].thinking` | boolean | No | Enable reasoning (Kimi only) |
|
|
138
|
+
| `agents[].reasoning_effort` | string | No | Reasoning budget (Codex only) |
|
|
130
139
|
| `agents[].timeout_seconds` | integer | No | Timeout for this agent |
|
|
131
140
|
|
|
132
141
|
## Response Format
|
|
@@ -136,7 +145,7 @@ All tools return JSON with these fields:
|
|
|
136
145
|
| Field | Type | Description |
|
|
137
146
|
|-------|------|-------------|
|
|
138
147
|
| `status` | string | `success`, `error`, `timeout`, `auth_error`, or `cancelled` |
|
|
139
|
-
| `output` | string | stdout from
|
|
148
|
+
| `output` | string | stdout from the agent |
|
|
140
149
|
| `stderr` | string\|null | stderr if any |
|
|
141
150
|
| `returncode` | int | Process exit code (-1 for timeout/error) |
|
|
142
151
|
| `duration_ms` | int | Execution time in milliseconds |
|
|
@@ -158,37 +167,60 @@ All tools return JSON with these fields:
|
|
|
158
167
|
|
|
159
168
|
## Troubleshooting
|
|
160
169
|
|
|
161
|
-
### "
|
|
170
|
+
### "CLI not found"
|
|
162
171
|
|
|
163
|
-
Install the
|
|
172
|
+
Install the CLI for your chosen adapter:
|
|
164
173
|
|
|
165
174
|
```bash
|
|
175
|
+
# Kimi
|
|
166
176
|
uv tool install --python 3.13 kimi-cli
|
|
167
177
|
which kimi
|
|
178
|
+
|
|
179
|
+
# Codex
|
|
180
|
+
npm install -g @openai/codex
|
|
181
|
+
which codex
|
|
168
182
|
```
|
|
169
183
|
|
|
170
184
|
### "auth_error" responses
|
|
171
185
|
|
|
172
|
-
Authenticate with
|
|
186
|
+
Authenticate with your chosen CLI:
|
|
173
187
|
|
|
174
188
|
```bash
|
|
189
|
+
# Kimi
|
|
175
190
|
kimi login
|
|
191
|
+
|
|
192
|
+
# Codex
|
|
193
|
+
export OPENAI_API_KEY=sk-...
|
|
176
194
|
```
|
|
177
195
|
|
|
178
196
|
### Timeout errors
|
|
179
197
|
|
|
180
|
-
|
|
198
|
+
Adapters have sensible defaults: Codex=1800s (30min), Kimi=600s (10min).
|
|
199
|
+
|
|
200
|
+
For exceptionally long tasks, override explicitly:
|
|
181
201
|
|
|
182
202
|
```json
|
|
183
|
-
{"prompt": "...", "timeout_seconds":
|
|
203
|
+
{"prompt": "...", "timeout_seconds": 3600}
|
|
184
204
|
```
|
|
185
205
|
|
|
186
|
-
Or set
|
|
206
|
+
Or set per-adapter defaults via environment:
|
|
187
207
|
|
|
188
208
|
```bash
|
|
189
|
-
export
|
|
209
|
+
export MOONBRIDGE_CODEX_TIMEOUT=2400 # 40 minutes
|
|
210
|
+
export MOONBRIDGE_KIMI_TIMEOUT=900 # 15 minutes
|
|
190
211
|
```
|
|
191
212
|
|
|
213
|
+
## Timeout Best Practices
|
|
214
|
+
|
|
215
|
+
| Task Type | Recommended |
|
|
216
|
+
|-----------|-------------|
|
|
217
|
+
| Quick query, status | 60-180s |
|
|
218
|
+
| Simple edits | 300-600s |
|
|
219
|
+
| Feature implementation | 1200-1800s |
|
|
220
|
+
| Large refactor | 1800-3600s |
|
|
221
|
+
|
|
222
|
+
Priority resolution: explicit param > adapter env > adapter default > global env > 600s fallback
|
|
223
|
+
|
|
192
224
|
### "MOONBRIDGE_ALLOWED_DIRS is not set" warning
|
|
193
225
|
|
|
194
226
|
By default, Moonbridge warns at startup if no directory restrictions are configured. This is expected for local development. For shared/production environments, set allowed directories:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Your MCP client just got a team.**
|
|
4
4
|
|
|
5
|
-
Spawn
|
|
5
|
+
Spawn AI coding agents from Claude Code, Cursor, or any MCP client. Run 10 approaches in parallel for a fraction of the cost.
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
uvx moonbridge
|
|
@@ -10,10 +10,12 @@ uvx moonbridge
|
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
13
|
-
1. **Install
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
1. **Install at least one supported CLI:**
|
|
14
|
+
|
|
15
|
+
| Adapter | Install | Authenticate |
|
|
16
|
+
|---------|---------|--------------|
|
|
17
|
+
| Kimi (default) | `uv tool install --python 3.13 kimi-cli` | `kimi login` |
|
|
18
|
+
| Codex | `npm install -g @openai/codex` | Set `OPENAI_API_KEY` |
|
|
17
19
|
|
|
18
20
|
2. **Add to MCP config** (`~/.mcp.json`):
|
|
19
21
|
```json
|
|
@@ -65,7 +67,8 @@ export MOONBRIDGE_SKIP_UPDATE_CHECK=1
|
|
|
65
67
|
|------|----------|
|
|
66
68
|
| `spawn_agent` | Single task: "Write tests for auth.ts" |
|
|
67
69
|
| `spawn_agents_parallel` | Go wide: 10 agents, 10 approaches, pick the best |
|
|
68
|
-
| `check_status` | Verify
|
|
70
|
+
| `check_status` | Verify the configured CLI is installed and authenticated |
|
|
71
|
+
| `list_adapters` | Show available adapters and their status |
|
|
69
72
|
|
|
70
73
|
### Example: Parallel Exploration
|
|
71
74
|
|
|
@@ -88,7 +91,10 @@ Three approaches. One request. You choose the winner.
|
|
|
88
91
|
| Parameter | Type | Required | Description |
|
|
89
92
|
|-----------|------|----------|-------------|
|
|
90
93
|
| `prompt` | string | Yes | Task description for the agent |
|
|
91
|
-
| `
|
|
94
|
+
| `adapter` | string | No | Backend to use: `kimi`, `codex` (default: `kimi`) |
|
|
95
|
+
| `model` | string | No | Model override (e.g., `gpt-5.2-codex`) |
|
|
96
|
+
| `thinking` | boolean | No | Enable reasoning mode (Kimi only) |
|
|
97
|
+
| `reasoning_effort` | string | No | Reasoning budget: `low`, `medium`, `high`, `xhigh` (Codex only) |
|
|
92
98
|
| `timeout_seconds` | integer | No | Override default timeout (30-3600) |
|
|
93
99
|
|
|
94
100
|
**`spawn_agents_parallel`**
|
|
@@ -97,7 +103,10 @@ Three approaches. One request. You choose the winner.
|
|
|
97
103
|
|-----------|------|----------|-------------|
|
|
98
104
|
| `agents` | array | Yes | List of agent configs (max 10) |
|
|
99
105
|
| `agents[].prompt` | string | Yes | Task for this agent |
|
|
100
|
-
| `agents[].
|
|
106
|
+
| `agents[].adapter` | string | No | Backend for this agent |
|
|
107
|
+
| `agents[].model` | string | No | Model override for this agent |
|
|
108
|
+
| `agents[].thinking` | boolean | No | Enable reasoning (Kimi only) |
|
|
109
|
+
| `agents[].reasoning_effort` | string | No | Reasoning budget (Codex only) |
|
|
101
110
|
| `agents[].timeout_seconds` | integer | No | Timeout for this agent |
|
|
102
111
|
|
|
103
112
|
## Response Format
|
|
@@ -107,7 +116,7 @@ All tools return JSON with these fields:
|
|
|
107
116
|
| Field | Type | Description |
|
|
108
117
|
|-------|------|-------------|
|
|
109
118
|
| `status` | string | `success`, `error`, `timeout`, `auth_error`, or `cancelled` |
|
|
110
|
-
| `output` | string | stdout from
|
|
119
|
+
| `output` | string | stdout from the agent |
|
|
111
120
|
| `stderr` | string\|null | stderr if any |
|
|
112
121
|
| `returncode` | int | Process exit code (-1 for timeout/error) |
|
|
113
122
|
| `duration_ms` | int | Execution time in milliseconds |
|
|
@@ -129,37 +138,60 @@ All tools return JSON with these fields:
|
|
|
129
138
|
|
|
130
139
|
## Troubleshooting
|
|
131
140
|
|
|
132
|
-
### "
|
|
141
|
+
### "CLI not found"
|
|
133
142
|
|
|
134
|
-
Install the
|
|
143
|
+
Install the CLI for your chosen adapter:
|
|
135
144
|
|
|
136
145
|
```bash
|
|
146
|
+
# Kimi
|
|
137
147
|
uv tool install --python 3.13 kimi-cli
|
|
138
148
|
which kimi
|
|
149
|
+
|
|
150
|
+
# Codex
|
|
151
|
+
npm install -g @openai/codex
|
|
152
|
+
which codex
|
|
139
153
|
```
|
|
140
154
|
|
|
141
155
|
### "auth_error" responses
|
|
142
156
|
|
|
143
|
-
Authenticate with
|
|
157
|
+
Authenticate with your chosen CLI:
|
|
144
158
|
|
|
145
159
|
```bash
|
|
160
|
+
# Kimi
|
|
146
161
|
kimi login
|
|
162
|
+
|
|
163
|
+
# Codex
|
|
164
|
+
export OPENAI_API_KEY=sk-...
|
|
147
165
|
```
|
|
148
166
|
|
|
149
167
|
### Timeout errors
|
|
150
168
|
|
|
151
|
-
|
|
169
|
+
Adapters have sensible defaults: Codex=1800s (30min), Kimi=600s (10min).
|
|
170
|
+
|
|
171
|
+
For exceptionally long tasks, override explicitly:
|
|
152
172
|
|
|
153
173
|
```json
|
|
154
|
-
{"prompt": "...", "timeout_seconds":
|
|
174
|
+
{"prompt": "...", "timeout_seconds": 3600}
|
|
155
175
|
```
|
|
156
176
|
|
|
157
|
-
Or set
|
|
177
|
+
Or set per-adapter defaults via environment:
|
|
158
178
|
|
|
159
179
|
```bash
|
|
160
|
-
export
|
|
180
|
+
export MOONBRIDGE_CODEX_TIMEOUT=2400 # 40 minutes
|
|
181
|
+
export MOONBRIDGE_KIMI_TIMEOUT=900 # 15 minutes
|
|
161
182
|
```
|
|
162
183
|
|
|
184
|
+
## Timeout Best Practices
|
|
185
|
+
|
|
186
|
+
| Task Type | Recommended |
|
|
187
|
+
|-----------|-------------|
|
|
188
|
+
| Quick query, status | 60-180s |
|
|
189
|
+
| Simple edits | 300-600s |
|
|
190
|
+
| Feature implementation | 1200-1800s |
|
|
191
|
+
| Large refactor | 1800-3600s |
|
|
192
|
+
|
|
193
|
+
Priority resolution: explicit param > adapter env > adapter default > global env > 600s fallback
|
|
194
|
+
|
|
163
195
|
### "MOONBRIDGE_ALLOWED_DIRS is not set" warning
|
|
164
196
|
|
|
165
197
|
By default, Moonbridge warns at startup if no directory restrictions are configured. This is expected for local development. For shared/production environments, set allowed directories:
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "moonbridge"
|
|
3
3
|
dynamic = ["version"]
|
|
4
|
-
description = "MCP server for spawning Kimi
|
|
4
|
+
description = "MCP server for spawning AI coding agents (Kimi, Codex, and more)"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
7
7
|
license = "MIT"
|
|
8
8
|
authors = [
|
|
9
9
|
{name = "Phaedrus", email = "hello@mistystep.io"}
|
|
10
10
|
]
|
|
11
|
-
keywords = ["mcp", "kimi", "claude", "agent", "ai"]
|
|
11
|
+
keywords = ["mcp", "kimi", "codex", "claude", "agent", "ai"]
|
|
12
12
|
classifiers = [
|
|
13
13
|
"Development Status :: 4 - Beta",
|
|
14
14
|
"Environment :: Console",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
|
-
from typing import Protocol
|
|
2
|
+
from typing import Any, Protocol
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
@dataclass(frozen=True)
|
|
@@ -18,6 +18,35 @@ class AdapterConfig:
|
|
|
18
18
|
default_timeout: int = 600
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
@dataclass(frozen=True)
|
|
22
|
+
class AgentResult:
|
|
23
|
+
"""Agent execution result."""
|
|
24
|
+
|
|
25
|
+
status: str
|
|
26
|
+
output: str
|
|
27
|
+
stderr: str | None
|
|
28
|
+
returncode: int
|
|
29
|
+
duration_ms: int
|
|
30
|
+
agent_index: int
|
|
31
|
+
message: str | None = None
|
|
32
|
+
raw: dict[str, Any] | None = None
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
payload: dict[str, Any] = {
|
|
36
|
+
"status": self.status,
|
|
37
|
+
"output": self.output,
|
|
38
|
+
"stderr": self.stderr,
|
|
39
|
+
"returncode": self.returncode,
|
|
40
|
+
"duration_ms": self.duration_ms,
|
|
41
|
+
"agent_index": self.agent_index,
|
|
42
|
+
}
|
|
43
|
+
if self.message is not None:
|
|
44
|
+
payload["message"] = self.message
|
|
45
|
+
if self.raw is not None:
|
|
46
|
+
payload["raw"] = self.raw
|
|
47
|
+
return payload
|
|
48
|
+
|
|
49
|
+
|
|
21
50
|
class CLIAdapter(Protocol):
|
|
22
51
|
"""Protocol for CLI backend adapters."""
|
|
23
52
|
|