officecli 迁入技能层:skills/office 封装 + executor 预览托管,双盘同步整条退役

- skills/office:SKILL.md + scripts/office 封装层(命令闸门/help 对齐/get-pos 语义糖/create、open 出 ui_card
  marker);install.sh 按技能双跑约定把二进制拉到技能卷 bin/(不进 git/不进镜像,GitHub→gh-proxy 备源)
- executor/preview.js:预览槽位+网关(原 mcp 侧 watch/gateway 移植),工作区=tasks 卷真实文件,
  /__session-kill 供 core 清槽;Dockerfile 零 officecli 痕迹,入口符号链接进 /usr/local/bin/office
- core:preview-proxy 默认上游改 agent-executor:3100;tools/executor.js 通用 drainUiCards(terminal 输出
  ::ui_card 标记行 → 剥离 + ctx.onCard,任意命令可产卡);engine 删会话改走 rexec.killPreviewSession
- compose:agent-executor expose 3100(只走内网);.gitignore 排除技能二进制
This commit is contained in:
2026-10-19 11:30:12 +08:00
parent 6c1aebd01f
commit 5f4b3ec28b
13 changed files with 624 additions and 54 deletions
+7 -10
View File
@@ -13,19 +13,16 @@ const { Router } = require('express');
const log = require('../log');
let services;
const PREVIEW_DEFAULT = [{
name: 'office', prefix: '/preview',
host: process.env.EXECUTOR_PREVIEW_HOST || 'agent-executor',
port: Number(process.env.EXECUTOR_PREVIEW_PORT || 3100),
}];
try {
services = process.env.PREVIEW_PROXIES ? JSON.parse(process.env.PREVIEW_PROXIES) : [{
name: 'officecli', prefix: '/preview',
host: process.env.OFFICE_MCP_HOST || 'mcp_officecli',
port: Number(process.env.OFFICE_PREVIEW_PORT || 3100),
}];
services = process.env.PREVIEW_PROXIES ? JSON.parse(process.env.PREVIEW_PROXIES) : PREVIEW_DEFAULT;
} catch (e) {
log.error('preview', 'PREVIEW_PROXIES \u89e3\u6790\u5931\u8d25\uff0c\u56de\u9000\u9ed8\u8ba4\u6ce8\u518c\u8868: ' + (e && e.message));
services = [{
name: 'officecli', prefix: '/preview',
host: process.env.OFFICE_MCP_HOST || 'mcp_officecli',
port: Number(process.env.OFFICE_PREVIEW_PORT || 3100),
}];
services = PREVIEW_DEFAULT;
}
// \u5934\u767d\u540d\u5355\uff1a\u51ed\u636e\u4e0e\u516c\u7f51\u8eab\u4efd\uff08cookie/authorization/sec-fetch-*/connection\uff09\u4e00\u5f8b\u4e0d\u51fa\u5bb9\u5668\uff1b