CMO Bridge 是一个面向 Command: Modern Operations (CMO) 的独立开源项目工程。项目全部内容由维护者独立整理、设计和实现,用于在 CMO 进程内提供稳定的本地 Bridge API,并为 Python 自动化、AI 实验和强化学习环境提供结构化接口。
当前项目仍处于早期 MVP / 骨架阶段。C# Bridge 代码保存在隔离目录中,默认不会修改或自动接入现有 CMO 主工程。
本仓库中的代码、文档、示例和工程结构均作为独立开源项目发布。项目不包含第三方项目的复制代码、派生代码或迁移内容。
- 在本地通过 HTTP 调用 CMO Bridge。
- 执行 Lua 脚本,并返回结构化结果。
- 读取想定、阵营、单位、目标和仿真状态。
- 使用类型化动作控制单位,而不是只拼接原始 Lua 字符串。
- 提供 Python SDK 和可选的 Gymnasium 强化学习环境骨架。
- 尽量避免依赖窗口自动化、文件轮询或专属 XML 导出流程。
CMOBridge/
csharp/CommandBridge/ C# Bridge server and CMO adapter skeleton
python/cmo_bridge/ Python SDK and RL-facing client package
docs/ API draft, product plan, and integration notes
examples/ Minimal client examples
tests/ Test strategy notes
已完成的骨架能力:
- C# 本地 HTTP Server、路由、健康检查和统一响应模型。
- Lua 执行入口、想定 / 单位 / 目标观察入口。
- 动作服务、仿真控制服务、命令队列和命令历史。
- 事件模型、最近事件查询和观察增量 diff 骨架。
- Python SDK、动作辅助方法、事件解析、Gymnasium 可选环境骨架。
MVP 闭环目标:
health -> lua -> scenario -> units -> set_course -> run_for_time
安装 Python SDK 开发版本:
cd CMOBridge\python
python -m pip install -e .最小客户端示例:
from cmo_bridge import CMOBridge
cmo = CMOBridge("http://127.0.0.1:7777")
print(cmo.health())
print(cmo.scenario())
print(cmo.units(side="Blue"))C# Bridge 的主工程接入点仍需在确认后手动放入 CMO 主工程。当前推荐把 CMOBridge/csharp/CommandBridge 视为可独立阅读和演进的桥接层原型。
维护者邮箱:lbh2314385552@gmail.com
本项目使用 MIT License。详见 LICENSE。
CMO Bridge is an independent open-source project for Command: Modern Operations (CMO). All code, documentation, examples, and project structure in this repository are independently organized, designed, and implemented by the maintainer. The project provides a local in-process Bridge API for Python automation, AI experiments, and reinforcement-learning workflows.
The project is currently an early MVP / skeleton. The C# Bridge code lives in an isolated directory and is not wired into the existing CMO main project by default.
This repository is published as an independent open-source project. It does not include copied, derived, or migrated code from third-party projects.
- Call CMO Bridge locally through HTTP.
- Execute Lua scripts and return structured results.
- Read scenario, side, unit, contact, and simulation state.
- Control units through typed actions instead of raw Lua string concatenation only.
- Provide a Python SDK and an optional Gymnasium-compatible environment skeleton.
- Avoid fragile window automation, file polling, and proprietary XML export flows where possible.
CMOBridge/
csharp/CommandBridge/ C# Bridge server and CMO adapter skeleton
python/cmo_bridge/ Python SDK and RL-facing client package
docs/ API draft, product plan, and integration notes
examples/ Minimal client examples
tests/ Test strategy notes
Implemented skeleton pieces:
- C# local HTTP server, routing, health check, and unified response model.
- Lua execution endpoint and scenario / unit / contact observation entry points.
- Action service, simulation service, command queue, and command history.
- Event model, recent-event query, and observation delta skeleton.
- Python SDK, action helpers, event parsing, and optional Gymnasium environment skeleton.
MVP loop target:
health -> lua -> scenario -> units -> set_course -> run_for_time
Install the Python SDK in editable mode:
cd CMOBridge\python
python -m pip install -e .Minimal client:
from cmo_bridge import CMOBridge
cmo = CMOBridge("http://127.0.0.1:7777")
print(cmo.health())
print(cmo.scenario())
print(cmo.units(side="Blue"))The C# Bridge still needs an explicit integration point before it can start inside the CMO main project. For now, treat CMOBridge/csharp/CommandBridge as an isolated bridge prototype.
Maintainer email: lbh2314385552@gmail.com
This project is released under the MIT License. See LICENSE.