上一版把安装说明写成 INSTALL.md 并在 SKILL.md 里加段落,两处都不对:SKILL.md 是用法说明, 不该塞安装内容;启动器为 office 单独注入 PATH 也不成立,再加技能就得逐条改 start.sh。 - 删除 4 个 INSTALL.md,改为各技能目录下的 AGENTS.md(只写命令:下载/安装/验证、 平台资产名、字体路径),SKILL.md 恢复原样 - start.sh 去掉 office 的 PATH 注入;技能要命令入口时由 AGENTS.md 指导按次前缀 (PATH="$SK/scripts:$PATH" office ...)。启动器只保留 AGENT_SKILLS_DEPS 这个路径变量 - 找不到依赖时的指路不放在 core 里做特征匹配,而是各自报错带自己 AGENTS.md 的绝对路径 (office 封装层 ENOENT / x2pdf 缺包或无后端 / image-process 缺字体) - env-local 提示词加一句:技能失败就读其目录下的 AGENTS.md 实测:无 PATH 时 office 报 command not found,按 AGENTS.md 加前缀后 --version 正常; 三条缺依赖报错均给出 AGENTS.md 绝对路径。
28 lines
883 B
Markdown
28 lines
883 B
Markdown
# office:本机环境
|
||
|
||
服务器由镜像与 `agent-executor-init` 准备(跑同目录 `install.sh`)。本机不要跑它,按下面装,装完不需要重启。
|
||
|
||
```sh
|
||
SK="$(dirname "$AGENT_SKILLS_DEPS")/office"
|
||
```
|
||
|
||
## 缺二进制(报 `office.core binary missing`)
|
||
|
||
```sh
|
||
mkdir -p "$SK/bin"
|
||
curl -fL --progress-bar -o "$SK/bin/officecli" \
|
||
https://github.com/iOfficeAI/OfficeCLI/releases/latest/download/officecli-mac-x64
|
||
chmod +x "$SK/bin/officecli" && "$SK/bin/officecli" --version
|
||
```
|
||
|
||
资产名:mac Intel `officecli-mac-x64`、Apple Silicon `officecli-mac-arm64`、Linux `officecli-linux-x64` / `officecli-linux-arm64`。
|
||
GitHub 慢时加 `https://gh-proxy.com/` 前缀。用 `latest` 即可,不必对齐服务器的 pin。
|
||
|
||
## `office` 命令不在 PATH
|
||
|
||
本机启动器不注入 PATH。按次指定目录:
|
||
|
||
```sh
|
||
PATH="$SK/scripts:$PATH" office help
|
||
```
|