Files
MindOS_CLI/mindcli/__init__.py
T
lidf d760aa70b5 refactor(cli): v0.3.0 瘦身 — 内容枢纽时代仅保留拾音采集端
决策依据:SPEC_mindos_content_hub(2026-08 战略逆转)——MindOS 不再自建
本地执行体,宿主层由 WorkBuddy 等 MCP 消费端承接。

砍掉(-1500 行):
- cli.py chat/ask/health/start/install-service/uninstall-service/capabilities/
  tunnel/update 命令集(492→175 行)
- service.py(launchd 自启)、capability.py(能力上报)、health.py(8660 守护进程)
- pipelines/tool_proxy.py(工具白名单)、pipelines/tunnel_session.py(WS 隧道)
- pyproject 依赖精简:litellm/openai/rich/mcp 等移除,仅剩 websockets+click

保留/重构:
- pipelines/audio_capture.py(实时流式,不落盘)原样保留
- record 命令族重构为直接驱动 audio_capture(不再经 8660),跨进程
  stop/status 用 ~/.mindcli/record.json 状态文件(pid 识别)
- _vendor/ 快照 + scripts/vendor_hermes.sh 保留
- README.md 新增(含瘦身记录)

验证:py_compile 全绿;mind record status/start 错误路径冒烟通过;
假 token 实测 WS 401(云端端点在校验)+ 状态文件清理 ✓
2026-08-09 16:47:38 +08:00

20 lines
775 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
MindOS CLI — 拾音采集端(内容枢纽时代 v0.3.0 瘦身版)。
包初始化:将 _vendor/ 目录加入 sys.path
使 Hermes 模块的内部 import 路径保持原样工作(快照机制保留)。
"""
import os
import sys
__version__ = "0.3.0"
# ── Vendor 路径注入 ──────────────────────────────────────────
# 将 _vendor/ 目录加入 sys.path 头部,
# 使 Hermes 的 `from hermes_state import ...` 等裸 import 直接工作。
# 类似 pip._vendor 的 sys.path 策略。
_VENDOR_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "_vendor")
if os.path.isdir(_VENDOR_DIR) and _VENDOR_DIR not in sys.path:
sys.path.insert(0, _VENDOR_DIR)