Metadata-Version: 2.4
Name: wb-voice-intent-mcp
Version: 1.0.0
Summary: 语音消息智能处理助手 MCP 连接器（13 个语音处理工具）
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: PyYAML
Requires-Dist: python-docx
Requires-Dist: rich

# 语音消息智能处理助手 (voice-intent-agent)

**开发者：牛魔科技工作室**

把「语音消息 Agent」的本地智能能力封装为 MCP stdio 连接器，暴露 **13 个工具**。

- **形态**：local stdio MCP 连接器
- **source**：`voice-intent-agent`
- **依赖**：**零第三方依赖**，仅 Python 3.8+ 标准库
- **密钥**：**不需要任何 API Key**（语音转写由企业微信官方完成，本连接器只处理转写后的文本）

## 工具清单（13 个）

| 工具 | 说明 |
|---|---|
| `detect_hardware` | 检测 CPU/内存，输出硬件等级与推荐并发数 |
| `recognize_intent` | 意图识别（20+ 声明式意图 + 置信度分级 + 实体） |
| `list_intents` | 列出所有已注册意图 |
| `extract_entities` | 实体抽取（时间/日期/人物/地点/订单号/金额/手机号/邮箱）+ 复述确认 |
| `analyze_emotion` | 情感分析（愤怒/焦虑/满意/困惑/中性）+ 置信度 |
| `detect_dialect` | 方言检测（粤语/四川话/上海话/东北话/闽南话） |
| `create_ticket` | 自动建单（自动分类 + 定优先级，写入本地 SQLite） |
| `session_create` | 创建语音会话 |
| `session_add_message` | 向会话追加消息（含意图/情感标签） |
| `session_get` | 读取会话完整上下文 |
| `session_cleanup` | 清理过期会话 |
| `summarize_voicemail` | 语音留言 → 结构化摘要（意图/紧急度/建议动作） |
| `simulate_voice` | 模拟语音消息回调（本地调试） |

## 典型调用链

```
语音转写文本
  → recognize_intent    # 识别意图与置信度
  → extract_entities    # 抽取时间/人物等实体
  → analyze_emotion     # 判断情感，强负面则升级
  → create_ticket       # 必要时自动建单
  → session_add_message # 记录到会话上下文
```

## 目录结构

```
voice-intent-agent-connector/
├── mcp_server.py          # MCP stdio 入口（13 工具）
├── mcp.json / connector-meta.json / icon.svg / README.md
└── src/                   # 源包
    ├── scripts/           # intent_registry / entity_extractor / emotion_analyzer ...
    ├── config/            # intents.yaml / menu.yaml / custom_intents.yaml
    ├── templates/         # emotion_strategies.json / dialect_strategies.json
    └── references/
```

## 安全与隐私

- 全部为**本地纯逻辑**，不发起任何外部网络请求
- 语音转写由企业微信官方完成，本连接器仅接收转写后的文本
- 会话数据写入用户目录 `~/.workbuddy/output/voice_sessions/`
- 工单数据写入本地 SQLite `~/.workbuddy/output/tickets.db`
- 不采集、不上传任何个人隐私数据

## 重新打包

```bash
python sync_voice-intent-agent.py --bump patch
python sync_voice-intent-agent.py --bump none
```
