wujie应用联调

This commit is contained in:
董宏凯 committed 2026-06-11 17:11:28 +08:00
1 parent 0784f30e23
commit f3ca996116
35 files changed
+1590 -334

No files matched your search

@@ -0,0 +1,70 @@
# wujie 离线依赖包(内网无网安装)
圆桌规划抽屉(`src/roundtable-embed/`)用无界(wujie)把 DeerFlow 圆桌页嵌进抽屉,需要以下
依赖。内网环境无法联网拉包,故把它们及全部传递依赖预先打成 `.tgz` 放在本目录。
## 依赖清单(共 3 个,已全部含在本目录)
| 包 | 版本 | 说明 |
|----|------|------|
| `wujie-vue3` | 2.0.2 | 无界 Vue3 封装组件(`<WujieVue>` + `bus`) |
| `wujie` | 2.0.2 | 无界内核(`wujie-vue3` 的依赖) |
| `@babel/runtime` | 7.29.7 | `wujie` 的唯一依赖(自身无下游依赖) |
> `vue@^3` 是 `wujie-vue3` 的 peer 依赖,项目本就有,无需打包。
> 经核对,上述 3 个包之外**没有任何其他传递依赖**。
## 安装(任选一种)
> 全程不联网。命令里**依赖在前、消费方在后**,让本地 tarball 互相满足 semver 范围。
### 方式 A:脚本一键装(推荐)
```powershell
# Windows PowerShell
./install-offline.ps1
```
```bash
# Linux / macOS / Git-Bash
bash ./install-offline.sh
```
脚本会自动 `cd` 到项目根、优先用 pnpm(无则 npm)离线安装。
### 方式 B:手动命令
在**项目根目录**(`parallel-agents-vue/`)执行:
```bash
# pnpm
pnpm add --offline \
./offline-deps/wujie/babel-runtime-7.29.7.tgz \
./offline-deps/wujie/wujie-2.0.2.tgz \
./offline-deps/wujie/wujie-vue3-2.0.2.tgz
# 或 npm
npm install --offline \
./offline-deps/wujie/babel-runtime-7.29.7.tgz \
./offline-deps/wujie/wujie-2.0.2.tgz \
./offline-deps/wujie/wujie-vue3-2.0.2.tgz
```
### 方式 C:纯解压兜底(连包管理器都不想用时)
npm pack 的 tarball 内层是 `package/` 目录,直接解压改名进 `node_modules`:
```bash
cd parallel-agents-vue
mkdir -p node_modules/@babel
tar -xzf offline-deps/wujie/wujie-2.0.2.tgz && rm -rf node_modules/wujie && mv package node_modules/wujie
tar -xzf offline-deps/wujie/wujie-vue3-2.0.2.tgz && rm -rf node_modules/wujie-vue3 && mv package node_modules/wujie-vue3
tar -xzf offline-deps/wujie/babel-runtime-7.29.7.tgz && rm -rf node_modules/@babel/runtime && mv package node_modules/@babel/runtime
```
(Win10+/Linux/macOS 均自带 `tar`。这三个包是纯 JS、无原生编译,复制即可用。)
## 验证
```bash
node -e "console.log(require('wujie-vue3/package.json').version, require('wujie/package.json').version, require('@babel/runtime/package.json').version)"
# 期望输出: 2.0.2 2.0.2 7.29.7
```
之后 `pnpm dev` / `npm run dev` 打开「圆桌规划抽屉(wujie)」页签即可。
## 重新生成这些 tarball(有网机器上)
```bash
cd offline-deps/wujie
npm pack wujie@2.0.2 wujie-vue3@2.0.2 @babel/runtime@7.29.7
```
@@ -0,0 +1,30 @@
# 离线安装 wujie 相关依赖(内网无网环境)。
# 用法:在本文件所在目录右键「使用 PowerShell 运行」,或:
# pwsh ./install-offline.ps1
#
# 依赖集(已全部打进同目录 .tgz,无其他传递依赖;vue 为已存在的 peer):
# wujie-vue3@2.0.2 -> wujie@2.0.2 -> @babel/runtime@7.29.7
$ErrorActionPreference = "Stop"
$dir = $PSScriptRoot
$proj = (Resolve-Path (Join-Path $dir "..\..")).Path
# 依赖在前、消费方在后,便于本地 tarball 互相满足 semver 范围(不触网)。
$tgz = @(
(Join-Path $dir "babel-runtime-7.29.7.tgz"),
(Join-Path $dir "wujie-2.0.2.tgz"),
(Join-Path $dir "wujie-vue3-2.0.2.tgz")
)
Push-Location $proj
try {
$hasPnpm = $null -ne (Get-Command pnpm -ErrorAction SilentlyContinue)
if ($hasPnpm) {
Write-Host "[offline] 使用 pnpm 离线安装 wujie 依赖 ..." -ForegroundColor Cyan
& pnpm add --offline @tgz
} else {
Write-Host "[offline] 未找到 pnpm,改用 npm 离线安装 ..." -ForegroundColor Cyan
& npm install --offline @tgz
}
Write-Host "[offline] 完成。可运行 'pnpm dev' / 'npm run dev' 验证。" -ForegroundColor Green
}
finally { Pop-Location }
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# 离线安装 wujie 相关依赖(内网无网环境)。
# bash ./install-offline.sh
#
# 依赖集(已全部打进同目录 .tgz,无其他传递依赖;vue 为已存在的 peer):
# wujie-vue3@2.0.2 -> wujie@2.0.2 -> @babel/runtime@7.29.7
set -euo pipefail
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJ="$(cd "$DIR/../.." && pwd)"
# 依赖在前、消费方在后,便于本地 tarball 互相满足 semver 范围(不触网)。
TGZ=(
"$DIR/babel-runtime-7.29.7.tgz"
"$DIR/wujie-2.0.2.tgz"
"$DIR/wujie-vue3-2.0.2.tgz"
)
cd "$PROJ"
if command -v pnpm >/dev/null 2>&1; then
echo "[offline] 使用 pnpm 离线安装 wujie 依赖 ..."
pnpm add --offline "${TGZ[@]}"
else
echo "[offline] 未找到 pnpm,改用 npm 离线安装 ..."
npm install --offline "${TGZ[@]}"
fi
echo "[offline] 完成。可运行 'pnpm dev' / 'npm run dev' 验证。"