feat: OpenMesh 基础平台与 MD/PDF 转换技能
Some checks failed
CI / pytest (push) Has been cancelled
CI / gui-unit (push) Has been cancelled
CI / gui-e2e (push) Has been cancelled

- 后端: coworker 智能体框架, WS API, 文件上传, 附件处理
- 前端: Open WebUI, 文件全量走 upload API (含 MD/TXT/JSON 等文本类)
- 技能: md-to-office (pandoc + wkhtmltopdf)
- 修复: 上传文件路径丢失, Agent 搜索浪费, 输出文件跑到 uploads/
- 打包: PyInstaller one-dir, 预打包 pandoc/wkhtmltopdf/chromium
This commit is contained in:
2026-09-13 23:41:04 +08:00
commit 6f402ffcee
638 changed files with 154534 additions and 0 deletions

View File

@@ -0,0 +1,84 @@
# -*- mode: python ; coding: utf-8 -*-
"""PyInstaller spec for openmesh-server (one-dir bundle)."""
import os
import sys
from PyInstaller.utils.hooks import collect_all, collect_data_files, collect_submodules
ROOT = SPECPATH # spec 文件所在目录就是 packaging
PROJECT_ROOT = os.path.dirname(ROOT) # 项目根目录coworker 包所在处)
# 确保 collect_submodules 能找到 coworker 包
sys.path.insert(0, PROJECT_ROOT)
IS_WINDOWS = sys.platform == "win32"
hiddenimports = [
"coworker.file_upload",
"coworker.providers.capabilities",
]
datas = []
binaries = []
for pkg in ("coworker", "aisuite", "mcp", "ddgs", "croniter", "docstring_parser"):
try:
hiddenimports += collect_submodules(pkg)
except Exception:
pass
datas += collect_data_files("coworker")
for pkg in ("uvicorn", "certifi", "anyio", "websockets", "pypdf", "pypdfium2",
"pdfplumber", "reportlab", "openpyxl", "pandas", "numpy",
"playwright", "pytesseract", "markdownify", "beautifulsoup4",
"lxml", "defusedxml", "Pillow", "pptx", "docx"):
try:
d, b, h = collect_all(pkg)
datas += d
binaries += b
hiddenimports += h
except Exception:
pass
if IS_WINDOWS:
try:
d, b, h = collect_all("tzdata")
datas += d
binaries += b
hiddenimports += h
except Exception:
pass
a = Analysis(
[os.path.join(ROOT, "server_entry.py")],
pathex=[ROOT, PROJECT_ROOT],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
runtime_hooks=[],
excludes=["tkinter", "matplotlib", "PyQt5", "PySide6"],
noarchive=False,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name="openmesh-server",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=True,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=False,
name="openmesh-server",
)