-
Notifications
You must be signed in to change notification settings - Fork 1
v0.2.0 feat: internalize native agent tool platform capabilities #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
83c7ce2
b42bb17
2f76080
9eb70de
9da1a12
5fe436d
2bd3adb
9e317c8
80809b0
7bb58e4
81f3239
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,6 +40,7 @@ tmp/ | |
| .claude/statusline.* | ||
| .claude-flow/ | ||
| .omc/ | ||
| .omx/ | ||
| .swarm/ | ||
| .gitnexus | ||
| ruvector.db | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,37 @@ All notable changes to this project will be documented in this file. | |
| The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [Unreleased] | ||
|
|
||
| - Added an MCP-owned, bounded project-level rust-analyzer pool with observable | ||
| reuse/PID evidence while preserving the one-shot CLI fallback. | ||
|
Comment on lines
+12
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '== candidate files =='
git ls-files | rg '(^|/)(CHANGELOG\.md|omc-platform-internalization\.md|upstream-capability-matrix\.md|agent-tool-contract\.md)$|rust.?analyzer|lsp|mcp' | head -200
printf '%s\n' '== relevant references =='
rg -n -i -C 4 'rust-analyzer|rust_analyzer|lsp-document-symbols|lsp_document_symbols|pool|one-shot|one shot|fallback|document symbols' \
CHANGELOG.md docs src crates .github 2>/dev/null | head -500Repository: 2233admin/oh-my-claudecode-RS Length of output: 38764 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '== LSP adapter outline =='
ast-grep outline crates/omc-shared/src/lsp_adapter.rs
ast-grep outline crates/omc-shared/src/lsp_adapter/session.rs
ast-grep outline crates/omc-shared/src/tools/lsp_tools.rs
ast-grep outline crates/omc-mcp/src/agent_tools/adapter_tools.rs
printf '%s\n' '== adapter and pool implementation =='
cat -n crates/omc-shared/src/lsp_adapter.rs | sed -n '1,280p'
cat -n crates/omc-shared/src/lsp_adapter/session.rs | sed -n '1,360p'
printf '%s\n' '== CLI and MCP call sites =='
cat -n crates/omc-shared/src/tools/lsp_tools.rs | sed -n '1,260p'
cat -n crates/omc-mcp/src/agent_tools/adapter_tools.rs | sed -n '70,165p'
rg -n -C 5 'query_document_symbols|LspProjectPool|lsp_document_symbols' crates --glob '*.rs'Repository: 2233admin/oh-my-claudecode-RS Length of output: 50385 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '== MCP tool construction and lifetime =='
rg -n -C 8 'LspDocumentSymbolsTool|Box<dyn McpTool>|register.*tool|tools.*HashMap|tool_registry' \
crates/omc-mcp/src crates/omc-host/src crates/omc-interop/src --glob '*.rs' | head -300
printf '%s\n' '== pool implementation and reaping =='
cat -n crates/omc-shared/src/session_pool.rs | sed -n '1,280p'
cat -n crates/omc-shared/tests/session_pool_contract.rs | sed -n '1,180p'
printf '%s\n' '== direct CLI dispatch =='
cat -n crates/omc-cli/src/dispatch/tool.rs | sed -n '1,80p'
cat -n crates/omc-mcp/src/agent_tools.rs | sed -n '1,180p'
printf '%s\n' '== exact documentation passages =='
cat -n CHANGELOG.md | sed -n '8,16p'
cat -n docs/roadmap/omc-platform-internalization.md | sed -n '168,180p'
cat -n docs/upstream-capability-matrix.md | sed -n '57,65p'
cat -n docs/agent-tool-contract.md | sed -n '312,340p'Repository: 2233admin/oh-my-claudecode-RS Length of output: 38050 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
def text(path):
return Path(path).read_text(encoding="utf-8")
adapter = text("crates/omc-shared/src/lsp_adapter.rs")
session = text("crates/omc-shared/src/lsp_adapter/session.rs")
cli = text("crates/omc-cli/src/dispatch/tool.rs")
agent = text("crates/omc-mcp/src/agent_tools.rs")
server = text("crates/omc-mcp/src/server.rs")
pool = text("crates/omc-shared/src/session_pool.rs")
contract = text("docs/agent-tool-contract.md")
roadmap = text("docs/roadmap/omc-platform-internalization.md")
matrix = text("docs/upstream-capability-matrix.md")
checks = {
"direct adapter starts and terminates one process": (
'let mut child = Command::new(RUST_ANALYZER_COMMAND)' in adapter
and 'let _ = child.kill();' in adapter
and 'session_reused: false' in adapter
),
"MCP tool owns and uses a project pool": (
'pool: LspProjectPool' in text("crates/omc-mcp/src/agent_tools/adapter_tools.rs")
and 'self.pool.query_document_symbols(&request)' in text("crates/omc-mcp/src/agent_tools/adapter_tools.rs")
and 'Box::new(LspDocumentSymbolsTool::default())' in agent
),
"MCP server retains tools for its process lifetime": (
'tools: Vec<Box<dyn McpTool>>' in server
and 'tools: McpToolRegistry::all_enabled().into_tools()' in server
),
"CLI uses direct fallback": (
'match query_document_symbols(&LspDocumentSymbolsRequest' in cli
),
"pool is bounded and idle-reclaimed": (
'MAX_PROJECT_SESSIONS: usize = 4' in adapter
and 'PROJECT_SESSION_TTL: Duration = Duration::from_secs(10 * 60)' in adapter
and 'self.reap_idle();' in pool
and 'entry.last_used.elapsed() < self.idle_ttl' in pool
),
"contract still declares one-shot and excludes pooling": (
'through a one-shot `rust-analyzer` process.' in contract
and 'long-lived\nserver pooling' in contract
),
"roadmap and matrix still declare one-shot": (
'`lsp_document_symbols` 接入 one-shot `rust-analyzer`' in roadmap
and '`lsp_document_symbols` one-shot rust-analyzer adapter' in matrix
),
}
for name, result in checks.items():
print(f"{'PASS' if result else 'FAIL'}: {name}")
if not all(checks.values()):
raise SystemExit(1)
PYRepository: 2233admin/oh-my-claudecode-RS Length of output: 502 Align LSP lifecycle documentation with the implementation. MCP uses a project-scoped pool capped at four sessions with a 10-minute idle TTL. CLI uses the one-shot fallback. Update the roadmap, capability matrix, and public contract to distinguish these lifecycles and define pool scope, reuse, reclamation, and cleanup. 📍 Affects 4 files
🤖 Prompt for AI Agents |
||
| - Added versioned MCP v1 schema compatibility checks that reject removed tools/fields, new required inputs, type changes, narrowed enums, and tightened bounds. | ||
| - Added unified `omc status [--json]` platform, host, goal, team, and interop diagnostics. | ||
| - Added Python MCP session discovery, explicit close, and idle-session reclamation. | ||
| - Centralized the 16 released capabilities and their 32 MCP tool mappings in a | ||
| single catalog, with dependency availability diagnostics and a registry | ||
| consistency gate. | ||
| - Added repeatable cold-CLI and warm-MCP discovery latency budgets for release | ||
| bundles. | ||
|
|
||
| ### Added | ||
|
|
||
| - Added fail-closed `--force` replacement for Claude, Codex, and Hermes MCP | ||
| registrations with atomic writes and adjacent configuration backups. | ||
| - Added byte-accurate UTF-8 Python output limits with explicit truncation | ||
| markers and deterministic UTF-8 subprocess I/O on Windows. | ||
| - Split CLI dispatch, MCP agent tools, and DAP/LSP transports into focused | ||
| modules so new host-neutral adapters do not accumulate in monolithic files. | ||
|
|
||
| - Added the bounded `omc.debug.v1` / `debug_inspect` adapter for explicit | ||
| launch/attach sessions through externally supplied stdio DAP adapters. | ||
|
|
||
| - Unified `omc mcp` stdio entry that reuses the `omc-mcp` server library. | ||
| - `omc setup --host codex|claude` registration of the `omc-rs -> omc mcp` | ||
| host server, with idempotent writes and fail-closed conflict handling. | ||
| - Versioned host-neutral agent-tool contracts for capabilities, routing, | ||
| workflow evidence, typed results, hash edits, artifacts, LSP, and Python. | ||
|
|
||
| ## [0.1.0] — 2026-05-05 | ||
|
|
||
| First usable release. 13/13 HUD elements implemented; cold-start under 5ms target (median 3.81ms on Windows 11 / Ryzen 9800X3D, 10-run sample). | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # OMP Vibe / Director 研究记录 | ||
|
|
||
| 日期:2026-08-13 | ||
|
|
||
| ## 来源 | ||
|
|
||
| - [OMP Vibe mode 官方文档](https://github.com/can1357/oh-my-pi/blob/main/docs/vibe-mode.md) | ||
| - [OMP task 官方文档](https://github.com/can1357/oh-my-pi/blob/main/docs/tools/task.md) | ||
| - [OMP session 官方文档](https://github.com/can1357/oh-my-pi/blob/main/docs/session.md) | ||
| - [OMP magic keywords 官方文档](https://github.com/can1357/oh-my-pi/blob/main/docs/magic-keywords.md) | ||
| - [OMP 官方 releases](https://github.com/can1357/oh-my-pi/releases) | ||
| - [OMP LICENSE](https://raw.githubusercontent.com/can1357/oh-my-pi/main/LICENSE) | ||
|
|
||
| ## 结论 | ||
|
|
||
| `/vibe` 不是一个简单的路由标签,也不是新的 agent 核心。它把顶层交互会话变成 director,把工作交给可持久化的后台 worker;director 的工具集收窄为读操作、可选的 todo 和 worker 控制,worker 继续使用搜索、编辑、执行、构建能力。模式与 worker 状态写入 session,恢复时重新载入。 | ||
|
|
||
| 因此 OMC-RS 不应直接复制 `vibe_spawn` 等工具或再造一套执行循环。当前最小映射是: | ||
|
|
||
| 1. 继续复用 `omc-team` 的生命周期、任务图、worker health、通信和 runtime 启动能力。 | ||
| 2. 通过统一 `omc` CLI 暴露 `team` 入口,入口只做进程桥接,不新增调度器。 | ||
| 3. 等 Hermes/Sentinel 的真实消费契约明确后,再决定是否需要持久化 director/session mode;在此之前只保留 `tool route` 的渐进式路由。 | ||
|
|
||
| ## 当前来源状态 | ||
|
|
||
| 截至本记录日期,官方 release 页面显示最新版本为 `v17.2.15`,提交为 `06aecdd`;项目许可证为 MIT。release notes 仍在修复 `/vibe` 的工具集与 session mode 行为,说明该能力的生命周期细节仍应以版本锁定后的官方契约为准,不宜只抄名称。 | ||
|
|
||
| ## 对 OMC-RS 的边界 | ||
|
|
||
| - 纳入:director/worker 的职责分离、后台任务可恢复、worker 状态可观测、单一入口消费已有 `omc-team`。 | ||
| - 暂不纳入:OMP 的 provider/model 体系、`workflowz` eval kernel、`vibe_*` 独立工具集、`omp compress` 等与当前 OMC-RS 契约重复或缺少真实宿主消费者的能力。 | ||
| - 验收:统一 `omc team ...` 能调用当前真实 `omc-team` runtime;release binary 在干净临时目录完成 init/session smoke;不能只靠模板输出或静态 help 证明完成。 | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,14 +11,24 @@ repository.workspace = true | |
| clap = { version = "4", features = ["derive"] } | ||
| serde = { workspace = true, features = ["derive"] } | ||
| serde_yaml = "0.9" | ||
| serde_json = { workspace = true } | ||
| chrono = { workspace = true } | ||
| dirs = { workspace = true } | ||
| thiserror = { workspace = true } | ||
| walkdir = "2.4" | ||
| regex = "1" | ||
|
Comment on lines
18
to
19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win Move Every other dependency in this manifest uses ♻️ Proposed manifest change-walkdir = "2.4"
-regex = "1"
+walkdir = { workspace = true }
+regex = { workspace = true }Add the matching entries to the root 🤖 Prompt for AI Agents |
||
| omc-host = { path = "../omc-host" } | ||
| omc-interop = { path = "../omc-interop" } | ||
| omc-mcp = { path = "../omc-mcp" } | ||
| omc-python = { path = "../omc-python" } | ||
| omc-skills = { path = "../omc-skills" } | ||
| omc-shared = { path = "../omc-shared" } | ||
| omc-team = { path = "../omc-team" } | ||
| tracing = { workspace = true } | ||
|
|
||
| [dev-dependencies] | ||
| tempfile = { workspace = true } | ||
|
|
||
| [[bin]] | ||
| name = "omc" | ||
| path = "src/main.rs" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: 2233admin/oh-my-claudecode-RS
Length of output: 11794
🏁 Script executed:
Repository: 2233admin/oh-my-claudecode-RS
Length of output: 50387
🏁 Script executed:
Repository: 2233admin/oh-my-claudecode-RS
Length of output: 50387
🏁 Script executed:
Repository: 2233admin/oh-my-claudecode-RS
Length of output: 287
🏁 Script executed:
Repository: 2233admin/oh-my-claudecode-RS
Length of output: 8180
🏁 Script executed:
Repository: 2233admin/oh-my-claudecode-RS
Length of output: 28692
Make the workspace metrics authoritative.
Cargo.tomldefines 19 workspace members: 18 production crates andtests/macro-tests. The crate table lists 18. The table reports 825 tests, while the checked-in test functions total 1,189. The63,000+line count also has no defined scope; workspace Rust sources contain 65,493 lines under a simple count. Define the metric scope and generate all repeated values from one source. UpdateARCHITECTURE.md:47,README.md:12,23-25,173,256-258, andCLAUDE.md:3,9,95.📍 Affects 3 files
ARCHITECTURE.md#L47-L47(this comment)README.md#L12-L12README.md#L23-L25README.md#L173-L173README.md#L256-L258CLAUDE.md#L3-L3CLAUDE.md#L95-L95🤖 Prompt for AI Agents