内容
<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./assets/brand/codinfy-logo-light.svg">
<source media="(prefers-color-scheme: light)" srcset="./assets/brand/codinfy-logo-dark.svg">
<img src="./assets/brand/codinfy-logo-dark.svg" width="410" alt="Codinfy">
</picture>
<br><br>
# Codinfy 代理监视器
**适用于 AI 工程团队的实时任务控制中心**
在一个本地优先的指挥中心观察代理、上下文、限制、工作流程、Git、安全性和模型经济。
<br>
[](https://github.com/bakalagoin/codinfy-agent-monitor/actions/workflows/ci.yml)
[](./CHANGELOG.md)
[](#-mcp-tool-api)
[](#-requirements)
[](./LICENSE)
[](https://github.com/bakalagoin/codinfy-agent-monitor/stargazers)
[](https://github.com/bakalagoin/codinfy-agent-monitor/forks)
[](https://github.com/bakalagoin/codinfy-agent-monitor/commits/main)
[](./packages)
<br>
[**概述**](#-the-mission) · [**快速开始**](#-launch-in-60-seconds) · [**指挥中心**](#-command-center) · [**MCP API**](#-mcp-tool-api) · [**架构**](#-architecture) · [**安全**](./SECURITY.md) · [**贡献**](./CONTRIBUTING.md) · [**许可证**](./LICENSE)
</div>
<br>
<p align="center">
<img src="./assets/readme/hero-glass.svg" width="100%" alt="Codinfy 代理监视器玻璃任务控制仪表盘">
</p>
---
## ✦ 使命
AI 代理行动迅速。它们的上下文、工具调用、文件更改、限制和故障通常分散在终端和提供商接口上。**Codinfy 代理监视器** 将这种不可见的活动转化为单一的操作画面。
| | 任务系统 | 它揭示了什么 |
| :-: | -------------------- | -------------------------------------------------------------------------------- |
| 🛰️ | **代理雷达** | 活动、空闲、思考、运行、阻塞、失败和已完成的代理 |
| ◫ | **上下文和限制** | 上下文、当前速率、每日和每周使用情况,带有官方/估计的出处 |
| ⟁ | **工作流程脉搏** | 任务、所有者、进度、阻塞器、文件和实时事件时间线 |
| ◈ | **AI 信用节省器** | 模型需求评分、更安全的模型类别和估计的代币/成本节省 |
| ⛨ | **安全卫士** | 机密扫描、敏感文件检测和提交前审查 |
| ⎇ | **开发运维** | Git 状态、测试、构建、环境和公开就绪检查 |
| ◉ | **Codix 观察器** | 风险、经济和后续行动的上下文感知建议 |
| ⇄ | **通用 MCP** | Claude Code、Codex、Cursor、Windsurf 和其他 MCP 兼容主机 |
> [!IMPORTANT]
> 精确的提供商限制仅在主机或适配器直接提供时显示为 `official`。否则,接口会明确启用 **估计模式**。Codinfy 代理监视器永远不会将本地估计呈现为提供商真相。
## ⚡ 60 秒启动
<details open>
<summary><strong>01 — 从源代码安装</strong></summary>
```bash
git clone https://github.com/bakalagoin/codinfy-agent-monitor.git
cd codinfy-agent-monitor
corepack enable
pnpm install
pnpm build
pnpm --filter codinfy-agent-monitor link --global
```
</details>
<details open>
<summary><strong>02 — 初始化本地指挥中心</strong></summary>
```bash
codinfy-agent-monitor init
codinfy-agent-monitor status
```
您的私有操作数据存储在 `.codinfy-agent-monitor/` 中,并被排除在 Git 之外。
</details>
<details>
<summary><strong>03 — 打开动画 TUI 或本地玻璃仪表盘</strong></summary>
```bash
# 动画终端任务控制
codinfy-agent-monitor watch
# 本地 Fastify + WebSocket 仪表盘
codinfy-agent-monitor web
```
打开 [`http://localhost:3579/dashboard`](http://localhost:3579/dashboard)。服务器默认绑定到 `127.0.0.1`。
</details>
无需全局链接:
```bash
pnpm codinfy status
pnpm codinfy watch
pnpm mcp
```
## ◫ 指挥中心
```text
╭────────────────── Codinfy 代理监视器 ──────────────────╮
│ 项目:codinfy-agent-monitor │
│ 活动 AI:Codex · 命令:/codinfy │
│ MCP:codinfy-agent-monitor │
├────────────────────────────────────────────────────────────┤
│ 上下文使用 ██████████████░░░░░░ 68% 官方 │
│ 当前速率 ████████░░░░░░░░░░░░ 42% 估计 │
│ 每日限制 ████████████████░░░░ 81% 估计 │
│ 每周限制 ████████░░░░░░░░░░░░ 42% 估计 │
├────────────── AI 信用节省器和智能路由器 ──────────────┤
│ 当前模型:高级推理 │
│ 推荐:标准代码 · 估计节省:45% │
│ 模型切换:需要确认 │
├────────────────────────────────────────────────────────────┤
│ 代理:5 个活动 · 3 个空闲 · 工作流程:7 个任务 │
│ ✓ secrets.clean ✓ tests.passed ✓ build.passed │
╰────────────────────────────────────────────────────────────╯
© CODINFY PLATFORMS SASU · codinfy.com
```
<div align="center">
| 接口 | 命令 | 体验 |
| ----------------- | ------------------------------ | --------------------------------------- |
| **快照** | `codinfy-agent-monitor status` | 快速操作概览 |
| **动画 TUI** | `codinfy-agent-monitor watch` | 实时终端条和代理活动 |
| **Web 玻璃 UI** | `codinfy-agent-monitor web` | 响应式本地仪表盘 + WebSocket |
| **MCP 服务器** | `codinfy-agent-monitor mcp` | 兼容 AI 环境的工具 API |
| **斜杠命令** | `/codinfy` | 原生主机导向监控流程 |
</div>
## ⌘ 操作命令
<details open>
<summary><strong>监控和工作流程</strong></summary>
```bash
codinfy-agent-monitor status
codinfy-agent-monitor agents
codinfy-agent-monitor context
codinfy-agent-monitor limits
codinfy-agent-monitor workflow
codinfy-agent-monitor tasks
codinfy-agent-monitor timeline
codinfy-agent-monitor files
codinfy-agent-monitor health
```
</details>
<details>
<summary><strong>工程、Git 和发布安全</strong></summary>
```bash
codinfy-agent-monitor git
codinfy-agent-monitor tests --run
codinfy-agent-monitor build --run
codinfy-agent-monitor secrets
codinfy-agent-monitor attribution-check
codinfy-agent-monitor review
codinfy-agent-monitor public-ready
```
</details>
<details>
<summary><strong>AI 信用节省器和智能模型路由器</strong></summary>
```bash
codinfy-agent-monitor saver
codinfy-agent-monitor budget
codinfy-agent-monitor cost
codinfy-agent-monitor model-score "audit the authentication architecture"
codinfy-agent-monitor model-advice "update the README"
codinfy-agent-monitor economy-plan
```
路由器建议可配置的类别 — `fast_cheap`、`standard_code`、`advanced_code` 或 `premium_reasoning` — 而不是硬编码提供商模型名称。**它在未经确认的情况下永远不会更改活动模型。**
</details>
<details>
<summary><strong>语言、用户级别和环境</strong></summary>
```bash
codinfy-agent-monitor language auto
codinfy-agent-monitor language fr
codinfy-agent-monitor level beginner
codinfy-agent-monitor level expert
codinfy-agent-monitor safe on
codinfy-agent-monitor environment
codinfy-agent-monitor doctor
```
</details>
## ⬡ MCP 工具 API
启动本地 stdio 服务器:
```bash
codinfy-agent-monitor mcp
```
```json
{
"mcpServers": {
"codinfy-agent-monitor": {
"command": "codinfy-agent-monitor",
"args": ["mcp"]
}
}
}
```
| 工具域 | MCP 工具 |
| ----------------- | ------------------------------------------------------------------------------------------------------------------- |
| **状态** | `monitor.status`、`monitor.open_dashboard`、`monitor.get_attribution` |
| **代理** | `monitor.list_agents`、`monitor.register_agent`、`monitor.update_agent_state` |
| **用法** | `monitor.get_context_usage`、`monitor.get_rate_limit_status`、`monitor.get_daily_usage`、`monitor.get_weekly_usage` |
| **模型经济** | `monitor.get_model_advice`、`monitor.get_model_score`、`monitor.get_budget_status`、`monitor.get_economy_plan` |
| **工作流程** | `monitor.create_task`、`monitor.update_task`、`monitor.list_tasks`、`monitor.get_workflow`、`monitor.timeline` |
| **工程** | `monitor.git_status`、`monitor.test_status`、`monitor.build_status`、`monitor.environment_status` |
| **信任** | `monitor.scan_secrets`、`monitor.review_before_commit`、`monitor.alerts`、`monitor.recommendations` |
| **报告** | `monitor.export_report`、`monitor.get_cost_estimate` |
集成测试启动内置的 stdio 服务器,连接 MCP 客户端,列出工具并调用 `monitor.get_attribution`。
## ⇄ AI 环境适配器
<table>
<tr>
<td align="center"><strong>Claude Code</strong><br><sub>斜杠命令 + 安全钩子 + MCP</sub></td>
<td align="center"><strong>Codex</strong><br><sub>config.toml + AGENTS.md + MCP</sub></td>
<td align="center"><strong>Cursor</strong><br><sub>mcp.json + 规则 + 技能</sub></td>
<td align="center"><strong>Windsurf</strong><br><sub>MCP 配置 + /codinfy 规则</sub></td>
</tr>
</table>
可复制的模板位于 [`templates/`](./templates)。如果主机不暴露自定义斜杠命令,CLI、TUI 和本地 Web 仪表盘仍然是通用备用方案。
## ⎔ 架构
```mermaid
flowchart LR
subgraph 主机[AI 环境]
Claude[Claude Code]
Codex[Codex]
Cursor[Cursor]
Windsurf[Windsurf]
end
subgraph 接口[Codinfy 接口]
MCP[MCP stdio · 30 工具]
CLI[CLI · /codinfy]
TUI[动画 Ink TUI]
WEB[Fastify + WebSocket]
end
CORE[核心监控引擎]
DB[(本地 SQLite · WAL)]
OPS[Git · 测试 · 构建 · 环境]
TRUST[机密扫描器 · 安全卫士 · 审查]
ROUTER[AI 信用节省器 · 模型路由器]
Claude & Codex & Cursor & Windsurf --> MCP
MCP & CLI & TUI & WEB --> CORE
CORE --> DB
CORE --> OPS
CORE --> TRUST
CORE --> ROUTER
```
```text
packages/core 领域、SQLite、Git、安全、模型路由器、报告
packages/cli codinfy-agent-monitor + codinfy-monitor 二进制文件
packages/tui 动画 Ink 终端任务控制
packages/server 本地 Fastify + WebSocket 玻璃仪表盘
packages/mcp-server stdio MCP 服务器 codinfy-agent-monitor
packages/adapter-* Claude Code、Codex、Cursor 和 Windsurf 元数据
templates/ 可复制的 /codinfy 和 MCP 集成
```
参见完整的 [架构指南](./docs/architecture.md)。
## ⛨ 信任中心
| 控制 | 默认 |
| ---------------------- | ------------------------------------------------------- |
| **数据位置** | 本地 `.codinfy-agent-monitor/` 目录 |
| **仪表盘暴露** | 仅限回环 — `127.0.0.1` |
| **机密输出** | 在 CLI、MCP 和报告输出前进行掩码 |
| **项目命令** | 仅在显式 `--run` 时运行测试/构建 |
| **模型切换** | 从不自动;需要确认 |
| **Git 行为** | 只读监控;无隐含提交或推送 |
| **公开就绪门控** | 机密 + 属性 + 测试 + 构建 + 敏感文件 |
> [!CAUTION]
> 永远不要在公共问题中粘贴 API 密钥、令牌、密码、`.env` 内容、私人日志或生产凭证。使用 [私人漏洞报告](https://github.com/bakalagoin/codinfy-agent-monitor/security/advisories/new)。
[阅读安全策略](./SECURITY.md) · [阅读威胁模型](./docs/security.md)
## ▣ 要求
| 运行时 | 要求 |
| --------- | ------------------------------------------------------- |
| Node.js | `>= 22.13.0` 用于内置的 `node:sqlite` 本地存储 |
| pnpm | `>= 10` |
| Git | 建议用于文件和存储库监控 |
| 平台 | 设计用于 Windows、macOS 和 Linux |
## ◇ 与我们一起构建
```bash
corepack pnpm install
pnpm check
```
`pnpm check` 运行 lint、15 个测试 — 包括一个实时 MCP stdio 客户端/服务器测试 — TypeScript 构建和格式化验证。
| 指南 | 目的 |
| ------------------------------------ | ----------------------------------------- |
| [CONTRIBUTING.md](./CONTRIBUTING.md) | 本地设置、分支流程和 PR 检查清单 |
| [SECURITY.md](./SECURITY.md) | 私人披露和支持政策 |
| [LICENSE](./LICENSE) | Codinfy 属性许可证 1.0 |
| [CHANGELOG.md](./CHANGELOG.md) | 发布历史 |
| [文档](./docs) | 安装、使用、MCP 和安全 |
## ◉ 本地存储
<details>
<summary><strong>打开私人数据布局</strong></summary>
```text
.codinfy-agent-monitor/
├── config.json
├── metrics.sqlite
├── sessions/
├── agents/
├── workflows/
├── logs/
├── reports/
└── cache/
```
整个目录被 Git 忽略。`.env*`、凭证、日志、构建输出和本地报告永远不打算公开。
</details>
## ⚖ 许可证和属性
此公共仓库在自定义 [Codinfy 代理监视器属性许可证 1.0](./LICENSE) 下分发。因为它保护产品身份并带有增强的属性条件,所以它可能被归类为 **源代码可用而非 OSI 开源**。建议在高风险依赖之前进行合格的法律审查。
以下身份必须在副本、复刻、分发、接口、报告、导出和修改版本中保持可见:
```text
Codinfy 代理监视器
/codinfy
codinfy-agent-monitor
© CODINFY PLATFORMS SASU
codinfy.com
由 CODINFY PLATFORMS SASU 创建
Bakala Goin — 创始人兼 CEO
```
---
<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./assets/brand/codinfy-logo-light.svg">
<source media="(prefers-color-scheme: light)" srcset="./assets/brand/codinfy-logo-dark.svg">
<img src="./assets/brand/codinfy-logo-dark.svg" width="250" alt="Codinfy">
</picture>
### 与 Codinfy 联系
[](https://codinfy.com)
[](https://facebook.com/codinfyci)
[](https://instagram.com/codinfyci)
[](https://linkedin.com/company/codinfyen)
### Bakala Goin — 创始人兼 CEO
[](https://facebook.com/bakalagoin)
[](https://instagram.com/bakalagoin)
[](https://linkedin.com/in/bakala-goin)
[](https://tiktok.com/@bakalagoin)
[](https://x.com/bakalagoin)
<br><br>
**由 CODINFY PLATFORMS SASU 创建**<br>
**Bakala Goin — 创始人兼 CEO**<br>
[codinfy.com](https://codinfy.com)
<br>
**© CODINFY PLATFORMS SASU · codinfy.com**
</div>
MCP 配置
以下是此 MCP Server 的配置信息,可直接复制到 Cursor 或其他 MCP 客户端中使用。
mcp.json
连接信息
猜你喜欢
暂无推荐服务器