Skip to content
Merged
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Codex Mate is a local-first CLI + Web UI for unified management of:
- Local skills market for Codex / Claude Code (target switching, local skills management, cross-app import, ZIP distribution)
- Local Codex/Claude sessions (list/filter/export/delete) with Usage analytics overview
- Plugins (Prompt templates): reusable templates with variables and one-click copy
- Task orchestration: plan/queue/run/review local tasks, plus optional Claude chat launcher

It works on local files directly and does not require cloud hosting. The skills market is also local-first: it operates on local directories and does not depend on a remote marketplace.

Expand Down
8 changes: 5 additions & 3 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Codex Mate 提供一套本地优先的 CLI + Web UI,用于统一管理:
- Codex / Claude Code Skills 市场(安装目标切换、本地 skills 管理、跨应用导入、ZIP 分发)
- Codex / Claude 本地会话浏览、筛选、导出、删除与 Usage 统计概览
- 插件(提示词模板):模板复用、变量填写、一键复制
- 任务编排(规划中,未开放)
- 任务编排:规划 / 排队 / 执行 / 回看,并可打开 Claude Chat

项目不依赖云端托管,配置写入你的本地文件,便于审计和回滚。Skills 市场同样坚持本地优先,只操作本地目录,不依赖远程在线市场。

Expand Down Expand Up @@ -75,8 +75,10 @@ Codex Mate 提供一套本地优先的 CLI + Web UI,用于统一管理:
- 提示词模板:本地保存/编辑/复用(支持变量)
- 编写 → 填参 → 一键复制的工作流(模板数据保存在浏览器存储)

**任务编排(规划中,未开放)**
- 当前版本暂未开放
**任务编排**
- DAG 节点拆分与波次并发
- 支持计划预览、执行、队列与运行详情
- 支持打开 Claude Chat(复用 VSCode Claude Code 扩展 WebView)

**工程能力**
- MCP stdio 能力(tools/resources/prompts)
Expand Down
20 changes: 20 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const {
readExecutableBundledJavaScriptModule,
readExecutableBundledWebUiScript
} = require('./web-ui/source-bundle.cjs');
const { createClaudeChatBridge } = require('./cli/claude-chat-bridge');
const {
registerDownloadArtifact,
resolveDownloadArtifact
Expand Down Expand Up @@ -8064,6 +8065,13 @@ const PUBLIC_WEB_UI_STATIC_ASSETS = new Set([

function createWebServer({ htmlPath, assetsDir, webDir, host, port, openBrowser }) {
const connections = new Set();
const claudeChatBridge = typeof createClaudeChatBridge === 'function'
? createClaudeChatBridge({
projectRoot: __dirname,
defaultPermissionMode: 'bypassPermissions',
defaultModel: DEFAULT_CLAUDE_MODEL
})
: null;
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
const probeWebUiReadiness = (callback) => {
const payload = JSON.stringify({ action: 'health-check', params: {} });
const requestOptions = {
Expand Down Expand Up @@ -8204,6 +8212,9 @@ function createWebServer({ htmlPath, assetsDir, webDir, host, port, openBrowser

const server = http.createServer((req, res) => {
const requestPath = (req.url || '/').split('?')[0];
if (claudeChatBridge && claudeChatBridge.handleHttpRequest(req, res)) {
return;
}
if (typeof openaiBridgeHandler === 'function' && openaiBridgeHandler(req, res)) {
return;
}
Expand Down Expand Up @@ -8897,6 +8908,15 @@ function createWebServer({ htmlPath, assetsDir, webDir, host, port, openBrowser
socket.on('close', () => connections.delete(socket));
});

server.on('upgrade', (req, socket, head) => {
if (claudeChatBridge && claudeChatBridge.handleWsUpgrade(req, socket, head)) {
return;
}
try {
socket.destroy();
} catch (_) {}
});

server.once('error', (err) => {
if (err && err.code === 'EADDRINUSE') {
console.error(`! 启动失败: 端口 ${port} 已被占用,可能有残留的 codexmate run 实例。`);
Expand Down
Loading
Loading