Metadata-Version: 2.4
Name: prism-agent
Version: 0.2.1
Summary: 统一 AI Agent CLI：整合 Hermes/Codex/OpenClaw 能力
Author-email: PRISM Agent <prism@example.com>
License: MIT License
        
        Copyright (c) 2026 PRISM Agent
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/jz616059669/prism-agent
Project-URL: Documentation, https://github.com/jz616059669/prism-agent#readme
Project-URL: Repository, https://github.com/jz616059669/prism-agent.git
Project-URL: Issues, https://github.com/jz616059669/prism-agent/issues
Project-URL: Changelog, https://github.com/jz616059669/prism-agent/blob/master/CHANGELOG.md
Keywords: ai,agent,cli,llm,openai,playwright,mcp,gateway
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Distributed Computing
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich>=13.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: python-dotenv>=1.0
Requires-Dist: openai>=1.0
Requires-Dist: httpx>=0.27
Requires-Dist: click>=8.1
Requires-Dist: prompt-toolkit>=3.0
Provides-Extra: browser
Requires-Dist: playwright>=1.60.0; extra == "browser"
Requires-Dist: nest-asyncio>=1.6.0; extra == "browser"
Provides-Extra: desktop
Requires-Dist: flet>=0.24.0; extra == "desktop"
Provides-Extra: dev
Requires-Dist: pytest>=9.1.1; extra == "dev"
Requires-Dist: playwright>=1.60.0; extra == "dev"
Requires-Dist: nest-asyncio>=1.6.0; extra == "dev"
Provides-Extra: all
Requires-Dist: prism-agent[browser,desktop]; extra == "all"
Dynamic: license-file

# PRISM Agent

**统一 AI Agent CLI + 桌面客户端 — 整合 Hermes + Codex + OpenClaw 能力**

## 一键安装

**Windows：**
```powershell
git clone https://github.com/jz616059669/prism-agent.git
cd prism-agent
.\scripts\install.ps1
```

Windows 额外支持：
```powershell
# 打包桌面客户端
.\scripts\build-windows.ps1

# 后台运行 Gateway（NSSM）
nssm install PrismGateway "C:\path\to\prism.exe" "gateway start"
nssm start PrismGateway
```

**macOS：**
```bash
git clone https://github.com/jz616059669/prism-agent.git
cd prism-agent
bash scripts/install.sh
```

macOS 额外支持：
```bash
# 打包桌面客户端
bash scripts/build-macos.sh

# 安装 launchd 服务（后台运行 Gateway）
cp scripts/com.prism.gateway.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.prism.gateway.plist
launchctl list | grep prism
```

**Linux（Ubuntu/Debian/Fedora/Arch）：**
```bash
git clone https://github.com/jz616059669/prism-agent.git
cd prism-agent
bash scripts/install.sh
```

Linux 额外支持：
```bash
# 打包桌面客户端
bash scripts/build-linux.sh

# 安装 systemd 服务（后台运行 Gateway）
sudo cp scripts/prism-gateway.service /etc/systemd/system/
sudo systemctl enable prism-gateway
sudo systemctl start prism-gateway
```

安装完成后：
```bash
prism --help           # CLI
prism-desktop          # 桌面客户端
```

## 手动安装

见 [INSTALL.md](INSTALL.md)

## 当前能力

| 能力 | 状态 | 说明 |
|---|---|---|
| 统一模型接口 | ✅ | 一个命令切换任意模型，自动降级 |
| 多 Key 轮转 | ✅ | 凭证池自动轮转，不怕单 Key 失效 |
| 文件/终端工具 | ✅ | 读写、补丁、shell、后台任务 |
| 浏览器控制 | ✅ | Playwright 驱动，支持导航、快照、点击、输入、截图 |
| 代码执行沙箱 | ✅ | Python 代码执行，支持超时和输出捕获 |
| MCP 客户端 | ✅ | stdio / HTTP 双模式 |
| Skills 系统 | ✅ | 6 个内置 skill，支持安装/移除 |
| Gateway | ✅ | 飞书 / Telegram / Discord 适配器 |
| CLI 子命令 | ✅ | gateway / skill / browser / config / chat / ask / tools |

## 快速开始

```bash
# 查看版本
prism version

# 列出工具
prism tools

# 列出 skills
prism skill list

# 打开网页
prism browser open https://example.com

# 单次提问
prism ask "用 Python 写一个快速排序"

# 交互聊天
prism chat

# 启动桌面客户端
prism-desktop
```

## Gateway

```bash
# 查看状态
prism gateway status

# 前台运行
prism gateway start --platform telegram --token <TOKEN>
prism gateway start --platform feishu --app-id <ID> --app-secret <SECRET>

# Linux 后台运行（systemd）
sudo cp scripts/prism-gateway.service /etc/systemd/system/
sudo systemctl enable prism-gateway
sudo systemctl start prism-gateway
sudo systemctl status prism-gateway

# macOS 后台运行（launchd）
cp scripts/com.prism.gateway.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.prism.gateway.plist
launchctl list | grep prism
```

## 配置

```bash
prism config set model.default step-3.7-flash
prism config get model.default
prism config get
```

## 开发

```bash
git clone https://github.com/jz616059669/prism-agent.git
cd prism-agent
pip install -e .
pytest
```

## 路线图

- 飞书 / Telegram / Discord 真实连接验证
- MCP 服务器连接测试
- Skills 市场 / 一键安装
- 浏览器测试套件完善
- ACP 协议支持
