Metadata-Version: 2.5
Name: harnessix
Version: 0.10.0b7
Summary: 面向生产级 Coding Agent 的本地优先运行时与安全执行基础设施
Project-URL: Homepage, https://github.com/carrie1988/Harnessix
Project-URL: Repository, https://github.com/carrie1988/Harnessix
Project-URL: Issues, https://github.com/carrie1988/Harnessix/issues
Author: Zhang Jinhui
License-Expression: AGPL-3.0-only
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: aiosqlite<1,>=0.21
Requires-Dist: anthropic<2,>=1.3
Requires-Dist: google-re2==1.1.20251105
Requires-Dist: httpx<1,>=0.28
Requires-Dist: mcp<3,>=2.2
Requires-Dist: openai<3,>=2.54
Requires-Dist: pydantic<3,>=2.11
Requires-Dist: pyyaml<7,>=6
Requires-Dist: textual<9,>=8.2
Provides-Extra: anthropic
Requires-Dist: anthropic<2,>=1.3; extra == 'anthropic'
Provides-Extra: observability
Requires-Dist: opentelemetry-api<2,>=1.30; extra == 'observability'
Requires-Dist: opentelemetry-exporter-otlp-proto-http<2,>=1.30; extra == 'observability'
Requires-Dist: opentelemetry-sdk<2,>=1.30; extra == 'observability'
Provides-Extra: openai
Requires-Dist: openai<3,>=2.54; extra == 'openai'
Provides-Extra: tui
Requires-Dist: textual<9,>=8.2; extra == 'tui'
Description-Content-Type: text/markdown

# Harnessix Code

**本地运行、模型自选、每一步都受控的 Coding Agent。**

Harnessix Code 在你的终端里读代码、改代码、跑测试。改动要你批准，命令默认进沙箱，崩溃后能恢复，全过程可审计。模型由你选择，可以是云服务，也可以是你自己部署的模型。

> **当前是预览版，不是正式商用版本，不提供任何担保。** 请在可以通过 Git 回退的仓库里使用。

## 快速开始

需要 macOS 或 Linux、Python 3.12 以上，以及 [uv](https://docs.astral.sh/uv/)。

```bash
# 1. 安装（国内可加 --index-url https://mirrors.huaweicloud.com/repository/pypi/simple）
uv tool install harnessix

# 2. 配置模型
export MODEL_API_KEY=你的Key
harnessix code configure --provider-kind openai_chat \
  --base-url https://api.deepseek.com/v1 --model deepseek-v4-pro --non-interactive

# 3. 检查并启动
harnessix code doctor /path/to/repo --probe-model
harnessix code /path/to/repo
```

- 安装、配置、使用和全部功能的完整说明，见[用户手册](https://github.com/carrie1988/Harnessix/blob/main/docs/operations/user-manual.md)。
- 使用百炼等其他服务，或简要的上手说明，见 [Beta 快速上手](https://github.com/carrie1988/Harnessix/blob/main/docs/operations/beta-quickstart.md)。
- 使用自己部署的模型（vLLM、Ollama，同机或局域网），见[接入自托管模型](https://github.com/carrie1988/Harnessix/blob/main/docs/operations/self-hosted-models.md)。
- 无人值守运行：`harnessix exec --trust-workspace --prompt "..." --approval-mode auto-edit`。

## 它能做什么

| 能力 | 说明 |
|---|---|
| 代码读写 | 读取、搜索、多文件事务修改，修改前显示完整差异 |
| 运行命令 | 默认在 macOS Seatbelt 或 Linux bubblewrap 沙箱内自动执行，需要联网时逐条请你批准 |
| 审批 | 逐次批准；也可以在本会话自动接受修改，或允许完全相同的操作 |
| 恢复 | 进程崩溃或断线后可继续，同一副作用不会被盲目重放 |
| 上下文 | 按模型窗口自动压缩，读取仓库中的 `AGENTS.md` |
| Git | 查看状态和差异；你要求时，经批准后提交 |
| Skills | 按需加载个人或仓库里的任务说明，见[使用 Skills](https://github.com/carrie1988/Harnessix/blob/main/docs/operations/skills.md) |
| MCP | 在本机启动你逐个信任的 MCP Server，每次工具调用都需批准，见[使用 MCP](https://github.com/carrie1988/Harnessix/blob/main/docs/operations/mcp.md) |
| 模型 | OpenAI 兼容接口与 Anthropic 接口；已预设 DeepSeek 和百炼，支持自托管模型 |
| 集成 | 终端界面、无头模式（JSON 输出）、stdio App Server、Python SDK |

**还没有：** Hooks，IDE 插件，Web 搜索，子代理，图片输入，自动更新。

## 安全边界

- 沙箱内的命令不能联网，不能写 `.git` 和工作区以外的位置，也读不到 `~/.ssh` 等凭据目录。
- 沙箱外的命令每条都需要你批准。
- 首次打开目录时需要确认信任。
- API Key 只从环境变量读取，并在输出和记录中按机密保护。

沙箱内命令能读取拒读清单以外的文件，这些内容可能发送给模型服务商。完整说明和已知限制见 [SECURITY.md](https://github.com/carrie1988/Harnessix/blob/main/SECURITY.md)。

**数据去向：** 代码和对话只发送给你配置的模型服务商。Harnessix 没有遥测，不向项目方发送任何数据。详见[隐私说明](https://github.com/carrie1988/Harnessix/blob/main/PRIVACY.md)。

## 评测结果

使用同一个本地模型（Qwen3.8-Flash-Next），在 SWE-bench Verified 的 49 题留出集上单次运行，官方判分：

| 系统 | 解决题数 |
|---|---|
| Harnessix（当前） | 27 |
| mini-swe-agent | 29（运行时能访问公网，其中至少 4 题直接抄了上游修复，扣除后约 25） |

这个结果目前只能说明两者接近，mini-swe-agent 还需要在断网条件下重跑。此外，这 49 题在调优过程中都被用于诊断，结果偏乐观；评测配置使用了 SWE-bench 任务模板；单次运行的波动也不小。SWE-bench 也不代表你的真实项目。

## 文档

- [用户手册](https://github.com/carrie1988/Harnessix/blob/main/docs/operations/user-manual.md)：安装、配置、使用步骤和全部功能
- [Beta 快速上手](https://github.com/carrie1988/Harnessix/blob/main/docs/operations/beta-quickstart.md)：安装、配置、反馈
- [配置参考](https://github.com/carrie1988/Harnessix/blob/main/docs/operations/configuration.md)、[诊断](https://github.com/carrie1988/Harnessix/blob/main/docs/operations/diagnostics.md)、[状态备份与恢复](https://github.com/carrie1988/Harnessix/blob/main/docs/operations/recovery.md)
- [架构](https://github.com/carrie1988/Harnessix/blob/main/docs/architecture.md)、[设计文档索引](https://github.com/carrie1988/Harnessix/blob/main/docs/README.md)、[路线图](https://github.com/carrie1988/Harnessix/blob/main/docs/roadmap.md)
- [威胁模型](https://github.com/carrie1988/Harnessix/blob/main/docs/threat-model.md)
- [更新记录](https://github.com/carrie1988/Harnessix/blob/main/CHANGELOG.md)
- [项目早期的里程碑记录](https://github.com/carrie1988/Harnessix/blob/main/docs/readme-milestone-history.md)

## 参与和许可

社区版按照 [AGPL-3.0-only](https://github.com/carrie1988/Harnessix/blob/main/LICENSE) 发布。闭源使用见[商业许可说明](https://github.com/carrie1988/Harnessix/blob/main/COMMERCIAL_LICENSE.md)，品牌规则见 [TRADEMARKS.md](https://github.com/carrie1988/Harnessix/blob/main/TRADEMARKS.md)，第三方依赖见 [THIRD_PARTY_NOTICES.md](https://github.com/carrie1988/Harnessix/blob/main/THIRD_PARTY_NOTICES.md)。

贡献代码前请阅读[贡献指南](https://github.com/carrie1988/Harnessix/blob/main/CONTRIBUTING.md)。发现安全问题请按 [SECURITY.md](https://github.com/carrie1988/Harnessix/blob/main/SECURITY.md) 私下报告，不要公开提 Issue。
