omp-worker-mcp 0.1.0 → 0.1.1

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.
Files changed (4) hide show
  1. package/README.md +174 -263
  2. package/README.zh-CN.md +174 -260
  3. package/package.json +4 -1
  4. package/server.json +43 -0
package/README.md CHANGED
@@ -1,263 +1,174 @@
1
- <div align="center">
2
-
3
- # omp-worker-mcp
4
-
5
- **Durable Model Context Protocol (MCP) server for delegating asynchronous coding tasks and DAG workflows to local Oh My Pi (OMP) CLI sub-agents.**
6
-
7
- <p align="center">
8
- <a href="README.md">English</a>
9
- <a href="README.zh-CN.md">简体中文</a>
10
- </p>
11
-
12
- [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
13
- [![Node.js](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen.svg)](package.json)
14
- [![CI](https://github.com/divenire990/omp-worker-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/divenire990/omp-worker-mcp/actions/workflows/ci.yml)
15
- [![MCP Protocol](https://img.shields.io/badge/MCP-1.30.0-orange.svg)](https://modelcontextprotocol.io/)
16
- [![M8ven Score](https://m8ven.ai/badge/mcp/divenire990-omp-worker-mcp-4fc9xm?v=4dd1b4cec6489cf043b8630c80138c73)](https://m8ven.ai/mcp/divenire990-omp-worker-mcp-4fc9xm)
17
-
18
- <br />
19
-
20
- <img src="assets/orchestration.gif" alt="Async DAG Orchestration Flow" width="800" />
21
-
22
- <p align="center">
23
- <em>Asynchronous task execution, DAG dependency resolution, path ownership isolation, and structured result verification.</em>
24
- </p>
25
-
26
- [Quick Start](#installation-quick-start) • [Author Experience](#author-workflow-experience) • [MCP Configuration](#mcp-client-configuration) • [Configuration](#configuration-environment-variables) • [State Lifecycle](#state-lifecycle-retention-restart-recovery) • [Available Tools](#available-mcp-tools) • [Safety Contract](#task-safety-ownership-contract) • [Compatibility](#compatibility-changelog) • [Upstream Attribution](#upstream-attribution-support-boundaries)
27
-
28
- </div>
29
-
30
- ---
31
-
32
- ## Key Highlights
33
-
34
- - **Asynchronous Delegated Execution**: Offload heavy coding, refactoring, and exploration tasks to background OMP worker instances without blocking your main conversation session.
35
- - 🔀 **Topological DAG Orchestration**: Execute interdependent batch tasks with automatic topological sorting, concurrency control, and dependency propagation.
36
- - 🛡️ **Workspace Path Isolation**: Enforce explicit write-path boundaries and prevent overlapping file modifications between concurrent tasks.
37
- - 🔍 **Supervised Resumption & Envelopes**: Inspect interim logs in real time, extract structured JSON outcome envelopes (`OMP_WORKER_RESULT`), and supply supervisory guidance to retry or adjust tasks.
38
- - 💾 **Persistent State & Configurable Retention**: File-backed state persistence for job metadata and logs with configurable time-to-live (TTL) and disk capacity bounds.
39
-
40
- ---
41
-
42
- ## Author Workflow Experience
43
-
44
- In the author's daily local workflow, `omp-worker-mcp` is configured with **Gemini 3.7 Flash** as the underlying model for background OMP workers. Within the author's personal Antigravity account and quota environment, where model quotas are relatively generous, this setup has provided a very fast and dependable subjective experience across multi-step coding, research, and batch orchestration workflows.
45
-
46
- > **Disclaimer & Boundary Notice**:
47
- > This note reflects the author's personal setup and qualitative workflow experience only. It is **not** an independent benchmark, performance guarantee, or formal service commitment. Model availability, generation speed, quota allocations, and task execution quality vary significantly across different accounts, regions, model versions, task scopes, and local runtime environments. Neither Google Gemini nor Antigravity endorses or sponsors this project.
48
-
49
- ---
50
-
51
- ## Upstream Attribution & Support Boundaries
52
-
53
- - **External Upstream CLI**: This project interfaces with [Oh My Pi (OMP)](https://github.com/can1357/oh-my-pi), an open-source tool released under the [MIT License](https://github.com/can1357/oh-my-pi/blob/main/LICENSE).
54
- - **Package Scope**: The upstream OMP CLI binary is **not bundled** in this package. Users must install and configure their own local instance of the OMP CLI.
55
- - **Runtime Requirements**:
56
- - Node.js **>= 22.0.0** (relies on native ECMAScript Modules and standard library capabilities).
57
- - Users are responsible for complying with the OMP CLI license and terms applicable to their environment.
58
- - **Platform Support**:
59
- - **Windows** (win32) and **macOS** (Darwin / Apple Silicon, verified with real Node 22+ and OMP CLI E2E testing) are fully verified and supported.
60
- - **Linux** (x86_64, aarch64) is an architectural design target and remains to be verified in production environments.
61
- ---
62
-
63
- ## Features
64
-
65
- - **Asynchronous Task Delegation**: Launch background coding workers for long-running workflows while keeping the primary conversational agent responsive.
66
- - **DAG & Batch Orchestration**: Run interdependent batch tasks with automatic dependency resolution, concurrency limiting, and failure containment.
67
- - **Strict Task Safety & Ownership**: Built-in validation checks prevent parallel tasks from declaring overlapping write paths within the same workspace.
68
- - **Continuous Supervision & Feedback**: Stream logs, inspect structured verification details, and inject guidance into failed or blocked jobs.
69
- - **Conservative State Storage**: Safely persists job metadata, prompts, and output logs to disk with optional configurable cleanup policies.
70
-
71
- ---
72
-
73
- ## Installation & Quick Start
74
-
75
- ### Current Installation: Building from Source
76
-
77
- Before the package is published to the npm registry, building and running from source is the currently available path:
78
-
79
- ```bash
80
- # 1. Clone the repository
81
- git clone https://github.com/divenire990/omp-worker-mcp.git
82
- cd omp-worker-mcp
83
-
84
- # 2. Install dependencies
85
- npm ci
86
-
87
- # 3. Build TypeScript to dist/
88
- npm run build
89
-
90
- # 4. Run test suite
91
- npm test
92
- ```
93
-
94
- ### Post-Publish Quick Start: Running via npx or global npm install
95
-
96
- Once published to the npm registry, you can run `omp-worker-mcp` directly without cloning the repository:
97
-
98
- ```bash
99
- # Run directly via npx (post-publish)
100
- npx omp-worker-mcp
101
-
102
- # Or install globally (post-publish)
103
- npm install -g omp-worker-mcp
104
- omp-worker-mcp --help
105
- ```
106
-
107
- ## MCP Client Configuration
108
-
109
- `omp-worker-mcp` communicates over standard I/O (stdio). Below are configuration examples for various MCP clients.
110
-
111
- ### Codex Configuration (`config.toml`)
112
-
113
- #### Using Local Source Build (Currently Available)
114
- ```toml
115
- [mcp_servers.omp-worker]
116
- command = "node"
117
- args = ["/path/to/omp-worker-mcp/dist/index.js"]
118
-
119
- [mcp_servers.omp-worker.env]
120
- OMP_WORKER_OMP_COMMAND = "omp"
121
- ```
122
-
123
- #### Using npx (Available Once Published to npm)
124
- ```toml
125
- [mcp_servers.omp-worker]
126
- command = "npx"
127
- args = ["-y", "omp-worker-mcp"]
128
-
129
- [mcp_servers.omp-worker.env]
130
- OMP_WORKER_OMP_COMMAND = "omp"
131
- ```
132
-
133
- ### Claude Desktop Configuration (`claude_desktop_config.json`)
134
-
135
- #### Using Local Source Build (Currently Available)
136
- ```json
137
- {
138
- "mcpServers": {
139
- "omp-worker": {
140
- "command": "node",
141
- "args": ["/path/to/omp-worker-mcp/dist/index.js"],
142
- "env": {
143
- "OMP_WORKER_OMP_COMMAND": "omp"
144
- }
145
- }
146
- }
147
- }
148
- ```
149
-
150
- #### Using npx (Available Once Published to npm)
151
- ```json
152
- {
153
- "mcpServers": {
154
- "omp-worker": {
155
- "command": "npx",
156
- "args": ["-y", "omp-worker-mcp"],
157
- "env": {
158
- "OMP_WORKER_OMP_COMMAND": "omp"
159
- }
160
- }
161
- }
162
- }
163
- ```
164
-
165
- ---
166
-
167
- ## Configuration & Environment Variables
168
-
169
- All settings can be configured via environment variables in your system or within the MCP client configuration.
170
-
171
- | Variable | Description | Default |
172
- | :--- | :--- | :--- |
173
- | `OMP_WORKER_OMP_COMMAND` | Path or executable name for the OMP CLI binary. | `omp` |
174
- | `OMP_WORKER_OMP_PREFIX_ARGS` | JSON array string of arguments prepended to OMP CLI invocations (e.g. `["--profile", "default"]`). | `[]` |
175
- | `OMP_WORKER_STATE_DIR` | Base directory for storing job states, prompt files, and execution logs. | `~/.codex/state/omp-worker` |
176
- | `OMP_WORKER_BROWSER_RULES` | Optional custom browser automation instructions injected into worker prompts. | *(none)* |
177
- | `OMP_WORKER_RETENTION_TTL_SECONDS` | Optional retention TTL in seconds for terminal job/group records. Unset disables TTL cleanup. | *(none)* |
178
- | `OMP_WORKER_RETENTION_MAX_BYTES` | Optional maximum disk storage in bytes for terminal records. Unset disables size cleanup. | *(none)* |
179
- | `OMP_WORKER_AUTO_CLEANUP_ON_START` | Optional boolean (`"true"` / `"1"`) to trigger a cleanup sweep once when MCP server starts. | `false` |
180
-
181
- ---
182
-
183
- ## State Lifecycle, Retention & Restart Recovery
184
-
185
- ### On-Disk Directory Layout
186
-
187
- All state records are stored under `OMP_WORKER_STATE_DIR` (defaults to `~/.codex/state/omp-worker`):
188
- ```text
189
- ~/.codex/state/omp-worker/
190
- ├── jobs/
191
- │ └── job-<timestamp>-<hash>/
192
- │ ├── job.json # Job metadata, parameters, and status
193
- │ ├── cancel.request.json # Cancellation signal (if requested)
194
- │ ├── attempt-01.prompt.md # Generated prompt for attempt 1
195
- │ ├── stdout.log # Execution standard output
196
- │ └── stderr.log # Execution standard error
197
- └── groups/
198
- └── group-<timestamp>-<hash>/
199
- ├── group.json # Batch DAG metadata, tasks, and status
200
- └── cancel.request.json # Group cancellation signal (if requested)
201
- ```
202
-
203
- ### Retention and Cleanup Policies
204
-
205
- - **Conservative by Default**: By default, `omp-worker-mcp` **never automatically deletes completed or historical records**, preventing unexpected data loss.
206
- - **Explicit Cleanup Rules**: Users can opt in to automatic retention by setting `OMP_WORKER_RETENTION_TTL_SECONDS` (pruning terminal records older than N seconds) or `OMP_WORKER_RETENTION_MAX_BYTES` (pruning oldest terminal records when total disk usage exceeds threshold).
207
- - **Protection for Active Jobs**: Non-terminal records (`dispatched`, `running`, `pending`, `validating`, `cancelling`) are **strictly protected and never pruned**.
208
- - **Corrupted Record Protection**: Any record that cannot be verified as terminal is preserved to prevent accidental deletion. Symbolic links within state directories are rejected and never traversed.
209
- - **Transparent Diagnostics**: Cleanup failures or permission issues are surfaced in structured error logs rather than silently ignored.
210
-
211
- ### Server Restart & Crash Recovery
212
-
213
- - **Metadata Persistence**: Job and DAG group metadata are written atomically to disk. Dispatched and completed task records remain fully accessible across server restarts via `omp_result` and `omp_wait`.
214
- - **Process Decoupling**: If the MCP server restarts while an external worker process is executing, the server does not attempt unmanaged re-attachment to orphaned processes; the persisted state and captured logs accurately reflect the recorded state.
215
-
216
- ---
217
-
218
- ## Available MCP Tools
219
-
220
- ### Single Task Delegation Tools
221
-
222
- | Tool | Purpose |
223
- | :--- | :--- |
224
- | `omp_run_compact` | **Recommended for single tasks**: Delegates a coding task and waits up to `wait_seconds` for completion in one turn, returning a compact summary. |
225
- | `omp_delegate` | Low-level dispatch: Spawns an asynchronous background worker and immediately returns a `job_id`. |
226
- | `omp_wait` | Waits for a running background job to finish or poll until a timeout is reached. |
227
- | `omp_result` | Inspects full attempt history, execution logs, generated artifacts, and parsed structured outcome envelopes. |
228
- | `omp_continue` | Injects supervisory guidance/correction into a failed or blocked task to trigger a new attempt within the same session. |
229
- | `omp_cancel` | Gracefully terminates a running task and its spawned child process tree. |
230
-
231
- ### Batch & DAG Orchestration Tools
232
-
233
- | Tool | Purpose |
234
- | :--- | :--- |
235
- | `omp_run_batch_compact` | **Recommended for multi-task workflows**: Spawns an interdependent batch task graph (DAG) with concurrency limits and waits for aggregated completion. |
236
- | `omp_wait_group` | Waits for an asynchronous batch task group to make progress or complete. |
237
- | `omp_cancel_group` | Cancels all active and queued tasks within a batch task group. |
238
-
239
- ---
240
-
241
- ## Task Safety & Ownership Contract
242
-
243
- 1. **Write vs. Read-Only Boundaries**:
244
- - `write` tasks must explicitly declare the file paths they own via `ownership_paths`.
245
- - `read_only` tasks are prohibited from performing workspace modifications.
246
- 2. **DAG Overlap Verification**:
247
- - Parallel tasks within the same batch cannot declare overlapping write boundaries.
248
- - Tasks operating on shared paths must declare explicit linear dependencies (`depends_on`).
249
- 3. **Structured Verification Contract**:
250
- - Subagents deliver final results using the structured `OMP_WORKER_RESULT` format, returning status, summary, modified artifacts, verification checks, and remaining items.
251
-
252
- ---
253
-
254
- ## Compatibility & Changelog
255
-
256
- - **Upgrade & Versioning Policies**: Review [COMPATIBILITY.md](./COMPATIBILITY.md) for public contract definitions, deprecation policies, and upgrade guarantees.
257
- - **Release History**: Review [CHANGELOG.md](./CHANGELOG.md) for notable changes across releases.
258
-
259
- ---
260
-
261
- ## License
262
-
263
- This project is licensed under the [MIT License](LICENSE).
1
+ <div align="center">
2
+
3
+ # omp-worker-mcp
4
+
5
+ **Durable Model Context Protocol (MCP) server for delegating asynchronous coding tasks and DAG workflows to local Oh My Pi (OMP) CLI sub-agents.**
6
+
7
+ <p align="center">
8
+ English •
9
+ <a href="README.zh-CN.md">简体中文</a>
10
+ <a href="docs/README.md">Documentation Hub</a>
11
+ </p>
12
+
13
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
14
+ [![npm version](https://img.shields.io/npm/v/omp-worker-mcp.svg)](https://www.npmjs.com/package/omp-worker-mcp)
15
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen.svg)](package.json)
16
+ [![CI](https://github.com/divenire990/omp-worker-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/divenire990/omp-worker-mcp/actions/workflows/ci.yml)
17
+ [![MCP Protocol](https://img.shields.io/badge/MCP-1.30.0-orange.svg)](https://modelcontextprotocol.io/)
18
+ [![M8ven Score](https://m8ven.ai/badge/mcp/divenire990-omp-worker-mcp-4fc9xm?v=4dd1b4cec6489cf043b8630c80138c73)](https://m8ven.ai/mcp/divenire990-omp-worker-mcp-4fc9xm)
19
+
20
+ <br />
21
+
22
+ <img src="assets/orchestration.gif" alt="Async DAG Orchestration Flow" width="800" />
23
+
24
+ <p align="center">
25
+ <em>Asynchronous task execution, DAG dependency resolution, path ownership isolation, and structured result verification.</em>
26
+ </p>
27
+
28
+ [Quick Start](#installation--quick-start) • [Minimal Config](#minimal-mcp-configuration) • [Tool Overview](#available-mcp-tools) • [Safety Contract](#task-safety--ownership) • [Benchmark Protocol](benchmarks/README.md) • [Platform Support](#platform-support--boundaries) • [Docs Hub](docs/README.md)
29
+
30
+ </div>
31
+
32
+ ---
33
+
34
+ ## Key Highlights
35
+
36
+ - **Asynchronous Task Delegation**: Offload long-running coding, refactoring, and exploration tasks to background OMP workers without blocking conversational turns.
37
+ - 🔀 **Topological DAG Orchestration**: Execute interdependent batch tasks with automatic dependency validation, concurrency pool limiting, and failure containment.
38
+ - 🛡️ **Workspace Path Isolation**: Enforce explicit write-path boundaries to prevent overlapping modifications between parallel tasks.
39
+ - 🔍 **Supervised Resumption & Envelopes**: Inspect interim execution logs in real time, extract structured result envelopes (`OMP_WORKER_RESULT`), and inject supervisory feedback via `omp_continue`.
40
+ - 💾 **Persistent State & Configurable Retention**: File-backed state persistence for job metadata and logs with optional TTL and storage capacity bounds.
41
+
42
+
43
+ ---
44
+
45
+ ## Why This Architecture?
46
+
47
+ `omp-worker-mcp` adopts a supervisor-worker delegation model: a premium host LLM (such as Codex or Claude Code) focuses on architecture, task decomposition, and acceptance review, while autonomous `omp-worker-mcp` background workers handle concrete execution.
48
+
49
+ > **Empirical Hypothesis**: Delegating execution-heavy coding tasks to background workers frees the primary host harness to focus on high-level design and verification, reducing conversational context fatigue while enabling multi-task parallelism. Evaluate this hypothesis empirically using our reproducible [Benchmark Protocol](benchmarks/README.md).
50
+ ---
51
+
52
+ ## Platform Support & Boundaries
53
+
54
+ - **Upstream Engine**: Interfaces with the [Oh My Pi (OMP)](https://github.com/can1357/oh-my-pi) CLI (MIT License). The upstream binary is **not bundled** and must be installed in your local runtime `PATH`.
55
+ - **Runtime Requirement**: Node.js **>= 22.0.0** (native ESM and standard library capabilities).
56
+ - **Operating Systems**:
57
+ - **Windows** (`win32`) & **macOS** (`darwin` / Apple Silicon): Fully verified with Node 22+ and real OMP CLI E2E testing.
58
+ - **Linux** (`x86_64`, `aarch64`): Architectural design target; awaiting broader production verification.
59
+ - **Support Tiers**:
60
+ - **Author-Verified**: Codex (author's daily local workflow; not a cross-platform CI guarantee).
61
+ - **Documented / Reproducible**: Claude Code, WorkBuddy, Claude Desktop, Cursor, Cline, VS Code, Copilot CLI (*not CI integration-tested*).
62
+ - **Cloud / Remote Hosts**: Conditional (*requires complete runtime, OMP CLI in PATH, writable workspace, and process spawning permissions*).
63
+
64
+ ---
65
+
66
+ ## Installation & Quick Start
67
+
68
+ `omp-worker-mcp` is an MCP server launched by stdio MCP hosts (such as Codex, Claude Code, etc.) using `npx` or a global install, rather than a standalone interactive CLI.
69
+
70
+ ### Host Stdio Command (Recommended)
71
+
72
+ ```bash
73
+ # Executed by your stdio MCP host configuration (e.g., mcpServers)
74
+ npx -y omp-worker-mcp
75
+ ```
76
+ ### Global Installation
77
+
78
+ ```bash
79
+ # Install globally via npm
80
+ npm install -g omp-worker-mcp
81
+ ```
82
+
83
+ ### Building from Source
84
+
85
+ ```bash
86
+ git clone https://github.com/divenire990/omp-worker-mcp.git
87
+ cd omp-worker-mcp
88
+ npm ci
89
+ npm run build
90
+ npm test
91
+ ```
92
+
93
+ ---
94
+
95
+ ## Minimal MCP Configuration
96
+
97
+ Add `omp-worker-mcp` to your host harness's `mcpServers` configuration using standard stdio transport:
98
+
99
+ ```json
100
+ {
101
+ "mcpServers": {
102
+ "omp-worker": {
103
+ "command": "npx",
104
+ "args": ["-y", "omp-worker-mcp"],
105
+ "env": {
106
+ "OMP_WORKER_OMP_COMMAND": "omp"
107
+ }
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ *For detailed configs covering Codex (`config.toml`), Claude Code CLI, WorkBuddy, and other clients, see [Client Configurations](docs/client-configurations.md).*
114
+
115
+ ---
116
+
117
+ ## Available MCP Tools
118
+
119
+ ### Single Task Delegation Tools
120
+
121
+ | Tool | Purpose |
122
+ | :--- | :--- |
123
+ | `omp_run_compact` | **Recommended for single tasks**: Delegates a coding task and waits up to `wait_seconds` for a compact summary. |
124
+ | `omp_delegate` | Low-level dispatch: Spawns an asynchronous background worker and returns a `job_id`. |
125
+ | `omp_wait` | Polls or waits for an asynchronous job to reach a terminal status or timeout. |
126
+ | `omp_result` | Inspects attempt history, stdout/stderr logs, modified artifacts, and structured result envelopes. |
127
+ | `omp_continue` | Injects supervisory guidance into a failed or blocked task to retry within the same session. |
128
+ | `omp_cancel` | Sends a cancellation signal to terminate a running job and its child process tree. |
129
+
130
+ ### Batch & DAG Orchestration Tools
131
+
132
+ | Tool | Purpose |
133
+ | :--- | :--- |
134
+ | `omp_run_batch_compact` | **Recommended for multi-task workflows**: Runs an interdependent task DAG with concurrency control and waits for completion. |
135
+ | `omp_wait_group` | Waits for progress or completion of an asynchronous batch task group. |
136
+ | `omp_cancel_group` | Cancels all active and queued tasks within a batch group. |
137
+
138
+ *For complete tool schemas and parameter references, consult the [Tool Reference](docs/tool-reference.md).*
139
+
140
+ ---
141
+
142
+ ## Task Safety & Ownership
143
+
144
+ 1. **Write vs. Read-Only Boundaries**: `write` tasks must explicitly declare the workspace paths they own via `ownership`; `read_only` tasks are strictly prohibited from modifying files.
145
+ 2. **DAG Overlap Verification**: Parallel tasks within the same batch cannot declare overlapping write boundaries; tasks sharing paths must declare sequential `depends_on` dependencies.
146
+ 3. **Structured Verification Contract**: Subagents deliver deliverables using the structured `OMP_WORKER_RESULT` envelope (status, summary, artifacts, verification checks, remaining items).
147
+
148
+ *High-impact operations (e.g., `npm publish`, `git push`, production deployments, secret modification) must always remain under direct host harness and human supervision.*
149
+
150
+ ---
151
+
152
+ ## Documentation Hub
153
+
154
+ Detailed documentation is organized in the [`docs/`](docs/README.md) directory:
155
+
156
+ - [**Documentation Index**](docs/README.md): Overview of documentation layout and responsibilities.
157
+ - [**Author Workflow & Architecture**](docs/author-workflow.md): Host-Worker supervision loop, execution strategies, and authoring guidelines.
158
+ - [**Client Configurations**](docs/client-configurations.md): Documented and reproducible configuration guidance for Codex, Claude Code, WorkBuddy, Cursor, VS Code, and more.
159
+ - [**Operations & State Lifecycle**](docs/operations.md): Environment variables, state directory layout, retention policies, and recovery.
160
+ - [**Tool Reference & Safety Contract**](docs/tool-reference.md): Full MCP tool specifications and safety boundaries.
161
+ - [**Benchmark Protocol**](benchmarks/README.md): Reproducible evaluation protocol comparing direct host execution against supervisor-worker delegation.
162
+
163
+ ---
164
+
165
+ ## Compatibility & Changelog
166
+
167
+ - **Public Contract & Deprecation**: Review [COMPATIBILITY.md](COMPATIBILITY.md) for versioning guarantees.
168
+ - **Release History**: Review [CHANGELOG.md](CHANGELOG.md) for notable updates.
169
+
170
+ ---
171
+
172
+ ## License
173
+
174
+ This project is licensed under the [MIT License](LICENSE).
package/README.zh-CN.md CHANGED
@@ -1,260 +1,174 @@
1
- <div align="center">
2
-
3
- # omp-worker-mcp
4
-
5
- **用于将异步编码任务和 DAG 工作流委托给本地 Oh My Pi (OMP) CLI 子 Agent 执行的持久化模型上下文协议(MCP)服务器。**
6
-
7
- <p align="center">
8
- <a href="README.md">English</a> •
9
- <a href="README.zh-CN.md">简体中文</a>
10
- </p>
11
-
12
- [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
13
- [![Node.js](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen.svg)](package.json)
14
- [![CI](https://github.com/divenire990/omp-worker-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/divenire990/omp-worker-mcp/actions/workflows/ci.yml)
15
- [![MCP Protocol](https://img.shields.io/badge/MCP-1.30.0-orange.svg)](https://modelcontextprotocol.io/)
16
-
17
- <br />
18
-
19
- <img src="assets/orchestration.gif" alt="异步 DAG 编排流程" width="800" />
20
-
21
- <p align="center">
22
- <em>异步任务执行、DAG 依赖解析、路径所有权隔离与结构化结果校验。</em>
23
- </p>
24
-
25
- [快速开始](#安装与快速开始) • [作者实测体验](#作者实测体验) • [MCP 客户端配置](#mcp-客户端配置) • [配置说明](#配置说明与环境变量) • [状态生命周期](#状态生命周期保留策略与重启恢复) • [可用工具](#可用-mcp-工具) • [安全与所有权约束](#任务安全与所有权约束) • [兼容性政策](#兼容性政策与变更记录) • [上游归属与支持边界](#上游归属与支持边界)
26
-
27
- </div>
28
-
29
- ---
30
-
31
- ## 核心亮点
32
-
33
- - ⚡ **异步委托执行**:将繁重的编码、重构与调研任务下发给后台 OMP Worker 实例,主对话会话无需等待或被阻塞。
34
- - 🔀 **拓扑 DAG 编排**:执行相互依赖的批量任务,支持自动拓扑排序、并发控制与依赖上下文传递。
35
- - 🛡️ **工作区路径隔离**:强制执行严格的写路径边界约束,防止并发任务之间发生文件写入冲突。
36
- - 🔍 **持续监督与结构化信封**:支持实时查看运行日志、提取结构化 JSON 结果信封(`OMP_WORKER_RESULT`),并向任务注入监督指导以进行重试或纠错。
37
- - 💾 **持久化状态与可配置生命周期**:基于磁盘文件的任务元数据与日志持久化,支持可配置的保留时间(TTL)与磁盘容量上限。
38
-
39
- ---
40
-
41
- ## 作者实测体验
42
-
43
- 在作者个人的日常本地工作流中,`omp-worker-mcp` 配置了 **Gemini 3.7 Flash** 作为后台 OMP Worker 的底层运行模型。在作者个人的 Antigravity 账户与配额环境中(配额相对充裕),该配置在多步骤编码、技术调研以及批量任务编排等场景下,主观体验上响应迅速且执行稳定可靠。
44
-
45
- > **免责声明与使用边界**:
46
- > 本节仅代表作者个人的实际工作流配置与主观使用体验,**不构成**任何独立的性能基准测试、质量保证或服务承诺。模型的可用性、响应速度、可用配额以及实际任务生成效果会因账户类型、所在地区、模型版本迭代、任务规模及本地运行环境的不同而存在差异。本项目未获得 Google Gemini 或 Antigravity 的任何官方背书或赞助。
47
-
48
- ---
49
-
50
- ## 上游归属与支持边界
51
-
52
- - **外部上游 CLI**:本项目调用 [Oh My Pi (OMP)](https://github.com/can1357/oh-my-pi),该上游开源工具基于 [MIT 许可证](https://github.com/can1357/oh-my-pi/blob/main/LICENSE) 发布。
53
- - **分发边界**:上游 OMP CLI 二进制文件**不随本 npm 包打包分发**。用户需在本地自行安装并配置好 OMP CLI 运行环境。
54
- - **运行环境要求**:
55
- - Node.js **>= 22.0.0**(依赖原生 ECMAScript Modules 与标准库能力)。
56
- - 用户有责任遵守适用于其自身环境的 OMP CLI 许可证及使用条款。
57
- - **平台支持**:
58
- - **Windows** (win32) 与 **macOS** (Darwin / Apple Silicon,经由真实 Node 22+ 与 OMP CLI E2E 完整验证) 均已验证支持。
59
- - **Linux** (x86_64, aarch64) 目前为架构设计目标,待在生产环境中进一步验证。
60
- ---
61
-
62
- ## 功能特性
63
-
64
- - **异步委托执行**:随时发起独立的后台子 Agent 编码任务,主会话保持流畅交互。
65
- - **DAG 与批处理编排**:支持运行具有拓扑依赖关系的批量任务组,提供并发度限制、自动依赖传递与故障隔离。
66
- - **严格的任务安全与所有权**:内置校验机制,防止多个并发任务在同一工作区写入重叠路径。
67
- - **持续监督与反馈机制**:实时流式读取日志、解析结构化 JSON 结果信封,并在失败或阻塞时注入指导继续执行。
68
- - **保守的状态持久化**:安全保存任务状态、提示词与日志,并支持可选的用户显式清理策略。
69
-
70
- ---
71
-
72
- ## 安装与快速开始
73
-
74
- ### 当前安装方式:源码编译与本地开发
75
-
76
- npm 官方包正式发布上线之前,通过源码构建与运行是当前可用的使用路径:
77
-
78
- ```bash
79
- # 1. 克隆代码仓库
80
- git clone https://github.com/divenire990/omp-worker-mcp.git
81
- cd omp-worker-mcp
82
-
83
- # 2. 安装依赖
84
- npm ci
85
-
86
- # 3. 编译 TypeScript 到 dist/
87
- npm run build
88
-
89
- # 4. 运行测试套件
90
- npm test
91
- ```
92
-
93
- ### 发布后快速启动:通过 npx 或全局 npm 安装运行
94
-
95
- 一旦包正式发布至 npm 注册表,您即可无需克隆仓库直接运行 `omp-worker-mcp`:
96
-
97
- ```bash
98
- # 直接通过 npx 启动(发布后可用)
99
- npx omp-worker-mcp
100
-
101
- # 或全局安装后运行(发布后可用)
102
- npm install -g omp-worker-mcp
103
- omp-worker-mcp --help
104
- ```
105
-
106
- ## MCP 客户端配置
107
-
108
- `omp-worker-mcp` 通过标准输入输出(stdio)进行通信。以下是常用 MCP 客户端的配置示例。
109
-
110
- ### Codex 配置示例 (`config.toml`)
111
-
112
- #### 使用本地源码构建运行(当前可用)
113
- ```toml
114
- [mcp_servers.omp-worker]
115
- command = "node"
116
- args = ["/path/to/omp-worker-mcp/dist/index.js"]
117
-
118
- [mcp_servers.omp-worker.env]
119
- OMP_WORKER_OMP_COMMAND = "omp"
120
- ```
121
-
122
- #### 使用 npx 运行(待发布至 npm 后可用)
123
- ```toml
124
- [mcp_servers.omp-worker]
125
- command = "npx"
126
- args = ["-y", "omp-worker-mcp"]
127
-
128
- [mcp_servers.omp-worker.env]
129
- OMP_WORKER_OMP_COMMAND = "omp"
130
- ```
131
-
132
- ### Claude Desktop 配置示例 (`claude_desktop_config.json`)
133
-
134
- #### 使用本地源码构建运行(当前可用)
135
- ```json
136
- {
137
- "mcpServers": {
138
- "omp-worker": {
139
- "command": "node",
140
- "args": ["/path/to/omp-worker-mcp/dist/index.js"],
141
- "env": {
142
- "OMP_WORKER_OMP_COMMAND": "omp"
143
- }
144
- }
145
- }
146
- }
147
- ```
148
-
149
- #### 使用 npx 运行(待发布至 npm 后可用)
150
- ```json
151
- {
152
- "mcpServers": {
153
- "omp-worker": {
154
- "command": "npx",
155
- "args": ["-y", "omp-worker-mcp"],
156
- "env": {
157
- "OMP_WORKER_OMP_COMMAND": "omp"
158
- }
159
- }
160
- }
161
- }
162
- ```
163
-
164
- ## 配置说明与环境变量
165
-
166
- 支持通过环境变量(或在 MCP 客户端配置中)进行灵活配置。
167
-
168
- | 环境变量 | 说明 | 默认值 |
169
- | :--- | :--- | :--- |
170
- | `OMP_WORKER_OMP_COMMAND` | OMP CLI 二进制文件的路径或可执行文件名。 | `omp` |
171
- | `OMP_WORKER_OMP_PREFIX_ARGS` | 每次调用 OMP CLI 时前置添加的参数(JSON 数组字符串,例如 `["--profile", "default"]`)。 | `[]` |
172
- | `OMP_WORKER_STATE_DIR` | 用于保存任务状态、尝试记录、日志与产物的根目录路径。 | `~/.codex/state/omp-worker` |
173
- | `OMP_WORKER_BROWSER_RULES` | 可选:注入到任务提示词中的自定义浏览器自动化指令。 | *(无)* |
174
- | `OMP_WORKER_RETENTION_TTL_SECONDS` | 可选:终态任务/任务组的保留时间(秒)。未设置时不基于时间自动清理。 | *()* |
175
- | `OMP_WORKER_RETENTION_MAX_BYTES` | 可选:状态目录允许占用的最大磁盘字节数。未设置时不基于容量上限自动清理。 | *(无)* |
176
- | `OMP_WORKER_AUTO_CLEANUP_ON_START` | 可选:布尔值(`"true"` 或 `"1"`),在 MCP 服务器启动时自动执行一次清理。 | `false` |
177
-
178
- ---
179
-
180
- ## 状态生命周期、保留策略与重启恢复
181
-
182
- ### 磁盘目录结构
183
-
184
- 所有状态记录均存储在 `OMP_WORKER_STATE_DIR` 目录下(默认为 `~/.codex/state/omp-worker`):
185
- ```text
186
- ~/.codex/state/omp-worker/
187
- ├── jobs/
188
- │ └── job-<时间戳>-<哈希>/
189
- │ ├── job.json # 任务元数据、参数与当前状态
190
- │ ├── cancel.request.json # 取消信号文件(若已发起取消)
191
- │ ├── attempt-01.prompt.md # 第 1 次尝试生成的提示词
192
- │ ├── stdout.log # 任务执行标准输出
193
- │ └── stderr.log # 任务执行标准错误
194
- └── groups/
195
- └── group-<时间戳>-<哈希>/
196
- ├── group.json # 批量 DAG 任务组元数据、任务列表与状态
197
- └── cancel.request.json # 任务组取消信号文件(若已发起取消)
198
- ```
199
-
200
- ### 保留与清理策略
201
-
202
- - **默认保守保留**:默认情况下,`omp-worker-mcp` **绝不自动删除任何已完成或历史记录**,防止用户数据或日志意外丢失。
203
- - **显式清理规则**:用户可通过配置 `OMP_WORKER_RETENTION_TTL_SECONDS`(清理超过指定秒数的终态记录)或 `OMP_WORKER_RETENTION_MAX_BYTES`(按时间由旧到新清理终态记录直至满足字节上限)启用自动清理。
204
- - **运行中任务保护**:处于非终态(`dispatched`、`running`、`pending`、`validating`、`cancelling` 等)的任务与任务组**受到严格保护,绝不被清理**。
205
- - **损坏记录安全保护**:无法确认其是否为终态的损坏文件不会被误删;状态目录中的符号链接将被拒绝且不会被递归跟随。
206
- - **透明的故障可见性**:清理过程中的权限异常或读写错误会完整记录在错误输出中,不会被静默吞掉。
207
-
208
- ### 服务器重启与恢复机制
209
-
210
- - **元数据持久化**:任务与批处理组的元数据均原子写入磁盘。在 MCP 服务器重启后,所有已分发与已完成的任务依然可以通过 `omp_result` 与 `omp_wait` 完整读取。
211
- - **进程解耦**:若 MCP 服务器在外部任务运行期间意外退出,服务器不会在重启后对失控的孤儿进程进行静默接管,持久化的元数据与日志将忠实反映记录的状态。
212
-
213
- ---
214
-
215
- ## 可用 MCP 工具
216
-
217
- ### 单任务委托工具
218
-
219
- | 工具名称 | 用途 |
220
- | :--- | :--- |
221
- | `omp_run_compact` | **单任务推荐**:便捷工具,委托单个任务并在单轮对话中等待最多 `wait_seconds` 秒以获取压缩结果。 |
222
- | `omp_delegate` | 基础委托:异步创建后台 Worker 执行编码任务,并立即返回 `job_id`。 |
223
- | `omp_wait` | 等待正在运行的后台任务执行完成,或轮询直至超时。 |
224
- | `omp_result` | 获取任务的完整尝试历史、执行日志、产物输出及解析后的结构化结果信封。 |
225
- | `omp_continue` | 向失败或阻塞的任务注入监督指导,在同一会话中发起新的执行尝试。 |
226
- | `omp_cancel` | 优雅终止正在运行的任务及其子进程树。 |
227
-
228
- ### 批量任务与 DAG 编排工具
229
-
230
- | 工具名称 | 用途 |
231
- | :--- | :--- |
232
- | `omp_run_batch_compact` | **多任务推荐**:创建具有依赖关系图(DAG)的并行/串行批量任务组,控制并发度并等待全部完成返回汇总结果。 |
233
- | `omp_wait_group` | 等待异步批量任务组的执行推进或全部完成。 |
234
- | `omp_cancel_group` | 取消批量任务组中所有正在运行及处于等待队列中的任务。 |
235
-
236
- ---
237
-
238
- ## 任务安全与所有权约束
239
-
240
- 1. **写入与只读隔离**:
241
- - `write` 任务必须通过 `ownership_paths` 明确声明其拥有所有权的文件写入路径。
242
- - `read_only` 任务被严格限制,禁止对工作区进行任何文件修改。
243
- 2. **DAG 冲突与重叠校验**:
244
- - 同一组内并行运行的任务之间不得声明相互重叠的写入路径边界。
245
- - 需要修改相同路径的任务必须显式声明线性的 DAG 依赖关系(`depends_on`)。
246
- 3. **结构化校验信封约定**:
247
- - 每个执行完成的子任务均需遵循 `OMP_WORKER_RESULT` 格式返回结构化结果(包含 `status`, `summary`, `artifacts`, `verification`, `remaining`)。
248
-
249
- ---
250
-
251
- ## 兼容性政策与变更记录
252
-
253
- - **升级与版本政策**:请参阅 [COMPATIBILITY.md](./COMPATIBILITY.md) 了解公共契约定义、废弃过渡流程与版本兼容性保证。
254
- - **变更日志**:请参阅 [CHANGELOG.md](./CHANGELOG.md) 了解各版本的详细更新与修复记录。
255
-
256
- ---
257
-
258
- ## 许可证
259
-
260
- 本项目基于 [MIT 许可证](LICENSE) 开源。
1
+ <div align="center">
2
+
3
+ # omp-worker-mcp
4
+
5
+ **用于将异步编码任务和 DAG 工作流委托给本地 Oh My Pi (OMP) CLI 子 Agent 执行的持久化模型上下文协议(MCP)服务器。**
6
+
7
+ <p align="center">
8
+ <a href="README.md">English</a> •
9
+ 简体中文
10
+ <a href="docs/README.zh-CN.md">文档中心</a>
11
+ </p>
12
+
13
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
14
+ [![npm version](https://img.shields.io/npm/v/omp-worker-mcp.svg)](https://www.npmjs.com/package/omp-worker-mcp)
15
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen.svg)](package.json)
16
+ [![CI](https://github.com/divenire990/omp-worker-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/divenire990/omp-worker-mcp/actions/workflows/ci.yml)
17
+ [![MCP Protocol](https://img.shields.io/badge/MCP-1.30.0-orange.svg)](https://modelcontextprotocol.io/)
18
+ [![M8ven Score](https://m8ven.ai/badge/mcp/divenire990-omp-worker-mcp-4fc9xm?v=4dd1b4cec6489cf043b8630c80138c73)](https://m8ven.ai/mcp/divenire990-omp-worker-mcp-4fc9xm)
19
+
20
+ <br />
21
+
22
+ <img src="assets/orchestration.gif" alt="异步 DAG 编排流程" width="800" />
23
+
24
+ <p align="center">
25
+ <em>异步任务执行、DAG 依赖解析、路径所有权隔离与结构化结果校验。</em>
26
+ </p>
27
+
28
+ [快速开始](#安装与快速开始) • [最小配置](#最小-mcp-配置) • [工具概览](#可用-mcp-工具) • [安全约束](#任务安全与所有权约束) • [基准测试规范](benchmarks/README.zh-CN.md) • [平台支持](#平台支持与支持边界) • [文档中心](docs/README.zh-CN.md)
29
+
30
+ </div>
31
+
32
+ ---
33
+
34
+ ## 核心亮点
35
+
36
+ - **异步委托执行**:将耗时的编码、重构与调研任务下发给后台 OMP Worker 实例,主对话会话无需等待阻塞。
37
+ - 🔀 **拓扑 DAG 编排**:执行相互依赖的批量任务,支持自动依赖解析、并发池调度与故障隔离。
38
+ - 🛡️ **工作区路径隔离**:强制执行严格的写路径边界约束,防止并发任务之间发生文件写入冲突。
39
+ - 🔍 **持续监督与结构化信封**:支持实时查看运行日志、提取结构化 JSON 结果信封(`OMP_WORKER_RESULT`),并通过 `omp_continue` 注入纠错指导。
40
+ - 💾 **持久化状态与生命周期管理**:基于磁盘文件的任务元数据与日志持久化,支持可配置的保留时间(TTL)与磁盘容量上限。
41
+
42
+
43
+ ---
44
+
45
+ ## 为什么采用此架构?
46
+
47
+ `omp-worker-mcp` 采用“主控监督与自治委派”模型:高级主控模型(如 Codex、Claude Code 等)专注于高层架构设计、任务拆解与质量把关,后台 `omp-worker-mcp` 实例则负责具体编码、重构与调研任务的自治执行。
48
+
49
+ > **待测经验假设**:将高耗时的具体执行任务委派给后台 Worker,使高级主控模型能够专注于架构设计与质量验收,有助于降低主会话上下文压力与交互疲劳,并在支持并发的批处理任务中提升吞吐效率。欢迎通过我们的公开 [基准测试评估规范](benchmarks/README.zh-CN.md) 开展实测检验。
50
+ ---
51
+
52
+ ## 平台支持与支持边界
53
+
54
+ - **外部上游引擎**:调用 [Oh My Pi (OMP)](https://github.com/can1357/oh-my-pi) CLI(基于 MIT 许可证)。上游二进制文件**不随本包分发**,需自行安装并置于 `PATH` 中。
55
+ - **运行环境要求**:Node.js **>= 22.0.0**(依赖原生 ECMAScript Modules 与标准库能力)。
56
+ - **操作系统支持**:
57
+ - **Windows** (`win32`) 与 **macOS** (`darwin` / Apple Silicon):经由真实 Node 22+ 与 OMP CLI E2E 完整验证支持。
58
+ - **Linux** (`x86_64`, `aarch64`):目前为架构设计目标,待在生产环境中进一步验证。
59
+ - **支持等级**:
60
+ - **作者实测**:Codex(作者个人主力本机工作流实测;不构成跨平台 CI 集成保证)。
61
+ - **官方文档或可复制配置**:Claude Code、WorkBuddy、Claude Desktop、Cursor、Cline、VS Code、GitHub Copilot CLI(*未在 CI 做集成测试*)。
62
+ - **云端 / 远程宿主**:有条件支持(*需远程容器完整提供 Node.js >= 22、处于 PATH 的 OMP CLI、可写工作区及进程启动权限*)。
63
+
64
+ ---
65
+
66
+ ## 安装与快速开始
67
+
68
+ `omp-worker-mcp` 作为 MCP 服务器运行,由 stdio MCP 宿主(如 Codex、Claude Code 等)通过 `npx` 或全局安装命令调起,并非独立的交互式命令行工具。
69
+
70
+ ### 宿主 Stdio 启动命令(推荐)
71
+
72
+ ```bash
73
+ # 由 MCP 宿主配置(如 mcpServers)自动调起的启动命令
74
+ npx -y omp-worker-mcp
75
+ ```
76
+ ### 全局安装
77
+
78
+ ```bash
79
+ # 通过 npm 全局安装
80
+ npm install -g omp-worker-mcp
81
+ ```
82
+
83
+ ### 从源码编译
84
+
85
+ ```bash
86
+ git clone https://github.com/divenire990/omp-worker-mcp.git
87
+ cd omp-worker-mcp
88
+ npm ci
89
+ npm run build
90
+ npm test
91
+ ```
92
+
93
+ ---
94
+
95
+ ## 最小 MCP 配置
96
+
97
+ 在您的主控 Harness 的 `mcpServers` 配置中添加标准 stdio 服务定义:
98
+
99
+ ```json
100
+ {
101
+ "mcpServers": {
102
+ "omp-worker": {
103
+ "command": "npx",
104
+ "args": ["-y", "omp-worker-mcp"],
105
+ "env": {
106
+ "OMP_WORKER_OMP_COMMAND": "omp"
107
+ }
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ *关于 Codex (`config.toml`)、Claude Code CLI、WorkBuddy 及其他客户端的完整配置,请参阅 [客户端接入与配置指南](docs/client-configurations.zh-CN.md)。*
114
+
115
+ ---
116
+
117
+ ## 可用 MCP 工具
118
+
119
+ ### 单任务委托工具
120
+
121
+ | 工具名称 | 用途 |
122
+ | :--- | :--- |
123
+ | `omp_run_compact` | **单任务推荐**:便捷工具,委托单个任务并在 `wait_seconds` 内等待结果,返回压缩摘要。 |
124
+ | `omp_delegate` | 底层分发:异步创建后台 Worker 执行编码任务,立即返回 `job_id`。 |
125
+ | `omp_wait` | 轮询或等待正在运行的后台任务直至终态或超时。 |
126
+ | `omp_result` | 获取任务的尝试历史、标准输出/错误日志、修改产物及结构化结果信封。 |
127
+ | `omp_continue` | 向失败或阻塞的任务注入监督指导,在同一会话中发起新一轮尝试。 |
128
+ | `omp_cancel` | 发送取消信号,优雅终止正在运行的任务及其子进程树。 |
129
+
130
+ ### 批量任务与 DAG 编排工具
131
+
132
+ | 工具名称 | 用途 |
133
+ | :--- | :--- |
134
+ | `omp_run_batch_compact` | **多任务推荐**:创建具有依赖图(DAG)的批量任务组,控制并发度并等待全部完成返回汇总结果。 |
135
+ | `omp_wait_group` | 等待异步批量任务组的执行推进或全部完成。 |
136
+ | `omp_cancel_group` | 取消批量任务组中所有正在运行及等待队列中的任务。 |
137
+
138
+ *有关完整工具 Schema 与参数定义,请查阅 [工具参考与安全约束](docs/tool-reference.zh-CN.md)。*
139
+
140
+ ---
141
+
142
+ ## 任务安全与所有权约束
143
+
144
+ 1. **写入与只读隔离**:`write` 任务必须通过 `ownership` 明确声明拥有所有权的文件路径;`read_only` 任务被严格禁止修改任何工作区文件。
145
+ 2. **DAG 冲突与重叠校验**:同一组内并行运行的任务之间不得声明重叠的写入路径;操作相同路径的任务必须通过 `depends_on` 声明串行先后关系。
146
+ 3. **结构化校验信封约定**:所有子任务均需在最终输出中遵循 `OMP_WORKER_RESULT` 格式返回结构化结果(状态、总结、产物列表、测试验证、遗留项)。
147
+
148
+ *高影响操作(如 `npm publish`、`git push`、生产部署、修改生产机密)必须始终保留在主控 Harness 与人类用户的直接交互中由人类确认。*
149
+
150
+ ---
151
+
152
+ ## 文档中心导航
153
+
154
+ 更深入的技术指南与运维参考已系统整理至 [`docs/`](docs/README.zh-CN.md) 目录:
155
+
156
+ - [**文档中心首页**](docs/README.zh-CN.md):文档结构布局与职责划分说明。
157
+ - [**作者工作流与架构设计**](docs/author-workflow.zh-CN.md):主控与 Worker 监督闭环、执行策略矩阵与工作流撰写准则。
158
+ - [**客户端接入与配置指南**](docs/client-configurations.zh-CN.md):涵盖 Codex(作者实测)及 Claude Code、WorkBuddy、Cursor、VS Code 等客户端的配置指南与可复现示例。
159
+ - [**运维配置与状态生命周期**](docs/operations.zh-CN.md):环境变量完整表、磁盘状态布局、保留清理策略与重启恢复。
160
+ - [**工具参考与安全约束**](docs/tool-reference.zh-CN.md):全部 MCP 工具定义、参数规范与安全边界。
161
+ - [**基准测试评估规范**](benchmarks/README.zh-CN.md):对比主控直接执行与主控-Worker 委派编排的可复现评测协议。
162
+
163
+ ---
164
+
165
+ ## 兼容性政策与变更记录
166
+
167
+ - **公共契约与升级保证**:请参阅 [COMPATIBILITY.md](COMPATIBILITY.md) 了解版本策略与契约定义。
168
+ - **发布记录**:请参阅 [CHANGELOG.md](CHANGELOG.md) 了解详细版本更新历史。
169
+
170
+ ---
171
+
172
+ ## 许可证
173
+
174
+ 本项目基于 [MIT 许可证](LICENSE) 开源。
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "omp-worker-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
+ "mcpName": "io.github.divenire990/omp-worker-mcp",
4
5
  "type": "module",
5
6
  "description": "Delegate complete coding tasks to the local OMP default model and inspect the result.",
6
7
  "license": "MIT",
@@ -34,6 +35,7 @@
34
35
  "files": [
35
36
  "dist",
36
37
  "bin",
38
+ "server.json",
37
39
  "README.md",
38
40
  "LICENSE"
39
41
  ],
@@ -41,6 +43,7 @@
41
43
  "build": "tsc -p tsconfig.json",
42
44
  "prepack": "npm run build",
43
45
  "test": "npm run build && node --test tests/*.test.mjs",
46
+ "benchmark:extract-telemetry": "node benchmarks/tools/extract-codex-telemetry.mjs",
44
47
  "start": "node dist/index.js"
45
48
  },
46
49
  "dependencies": {
package/server.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.divenire990/omp-worker-mcp",
4
+ "title": "omp-worker-mcp",
5
+ "description": "Delegate complete coding tasks to the local OMP default model and inspect the result.",
6
+ "version": "0.1.1",
7
+ "websiteUrl": "https://github.com/divenire990/omp-worker-mcp#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/divenire990/omp-worker-mcp",
11
+ "source": "github"
12
+ },
13
+ "packages": [
14
+ {
15
+ "registryType": "npm",
16
+ "identifier": "omp-worker-mcp",
17
+ "version": "0.1.1",
18
+ "transport": {
19
+ "type": "stdio"
20
+ },
21
+ "runtimeHint": "npx",
22
+ "runtimeArguments": [
23
+ {
24
+ "type": "positional",
25
+ "value": "-y"
26
+ },
27
+ {
28
+ "type": "positional",
29
+ "value": "omp-worker-mcp"
30
+ }
31
+ ],
32
+ "environmentVariables": [
33
+ {
34
+ "name": "OMP_WORKER_OMP_COMMAND",
35
+ "description": "Path or executable name for the local OMP CLI binary.",
36
+ "isRequired": true,
37
+ "format": "string",
38
+ "isSecret": false
39
+ }
40
+ ]
41
+ }
42
+ ]
43
+ }