Linux to Mac Bridge
This is now the legacy combined skill.
Prefer:
- -
macos-bridge for imsg, remindctl, memo, things, INLINECODE5 - INLINECODE6 for
brew, gh, and other /opt/homebrew/bin tools
Use this skill when a Linux gateway should expose Mac-backed tools as stable Linux-side commands.
This is the publishable answer to the “gray macOS skill on Linux gateway” problem:
- - do not patch bundled skills
- do not pretend Linux can run macOS binaries
- install explicit wrappers on the Linux gateway
- make public skills depend on those wrapper paths instead
- assume the Linux gateway and Mac nodes are on the same trusted local network
Use This Skill For
- -
imsg, remindctl, memo, things, INLINECODE14 - Homebrew business tools that live on a connected Mac node
- wrapper-backed skills that should show as ready on a Linux gateway
- capability reports and stable tool ownership mapping
- same-LAN Linux gateway to Mac node setups
- Mac nodes that are kept awake or have Wake-on-LAN enabled
Do Not Use This Skill For
- - Linux-native tools that should just be installed locally
- random internet-routed Mac hosts or untrusted WAN hops
- arbitrary remote shell access
- patching OpenClaw internals so bundled macOS skills lie about support
Requirements
- - Linux gateway and Mac nodes share the same trusted local network or VLAN
- Linux gateway can SSH to the owning Mac nodes
- remote binaries exist and have the needed macOS permissions
- you know which Mac owns each tool
- Mac nodes should stay awake for agent work, or at minimum have Wake-on-LAN enabled if you expect them to be resumed remotely
Local Network Contract
This skill is designed for a homelab or office-local topology:
- - Linux gateway on the same LAN as the Macs
- stable RFC1918 or otherwise local addresses for the Mac nodes
- low-latency SSH between gateway and nodes
- no requirement for public internet routing to the Macs
Default assumption:
- - if the gateway cannot reach the Mac over the local network, the wrapper-backed workflow is not healthy
Wake-on-LAN note:
- - the wrapper install scripts can embed Wake-on-LAN metadata and retry logic
- if a Mac may sleep, configure a wake map so the Linux-side wrapper can send a magic packet and retry SSH automatically
Design Contract
- - Linux gateway holds the wrappers
- Mac nodes hold the real binaries and OS-level permissions
- public skills depend on the wrapper path, not the remote path
- tool ownership stays explicit and auditable
- the bridge is optimized for same-LAN node reachability, not public-host reachability
Workflow
1. Render A Tool Ownership Map
Run:
CODEBLOCK0
If ~/.openclaw/openclaw.json already contains Mac-backed remoteHost entries, this will auto-render a gateway-local ownership map from that config first. In that case, do not ask again for IP address or SSH username unless the discovered mapping is missing or clearly wrong.
Otherwise it gives you a repeatable starter map such as:
- - INLINECODE17
- INLINECODE18
- INLINECODE19
2. Install The macOS Pack
Example:
CODEBLOCK1
The installer will now:
- - use explicit
--map tool=user@host entries when you provide them - otherwise try to infer the tool host from
remoteHost values in the OpenClaw config - fall back to a single discovered Mac host for unmapped tools when only one unique
remoteHost is known - let you force a shared owner with INLINECODE23
- avoid manual host questions when it can already resolve the owner from the OpenClaw config
This creates wrapper paths on Linux such as:
- - INLINECODE24
- INLINECODE25
- INLINECODE26
- INLINECODE27
When a wake map is configured, the generated wrapper will:
- - attempt SSH normally first
- send a Wake-on-LAN magic packet if the first attempt fails
- wait the configured number of seconds
- retry the remote command
3. Verify The Pack
Run:
CODEBLOCK2
This verifies the wrapper executables exist and can be resolved from the gateway side.
It also shows whether Wake-on-LAN is embedded in each installed wrapper.
4. Build Public Skills On Top
When publishing a community skill:
- - require the Linux wrapper path, not the macOS binary path
- document which Mac is expected to own the tool
- treat the wrapper as the stable API surface
Read references/skill-readiness.md.
Security Rules
- - one wrapper per tool
- one explicit owning Mac per tool
- no generic remote shell bridge
- no secrets stored in the skill folder
- no core patching to force a green badge
Files
- -
scripts/install-wrapper.sh: create one SSH wrapper for a remote binary - INLINECODE29 : install a batch of common Mac-backed tool wrappers with optional auto-discovery from OpenClaw config and Wake-on-LAN maps
- INLINECODE30 : verify the wrapper pack on the Linux gateway and show Wake-on-LAN status
- INLINECODE31 : print the auto-discovered or recommended tool ownership map plus Wake-on-LAN map examples
- INLINECODE32 : how to make public skills stay ready on Linux without patching core
Linux 到 Mac 桥接
这是一个现已合并的旧版技能。
优先使用:
- - macos-bridge 用于 imsg、remindctl、memo、things、peekaboo
- homebrew-bridge 用于 brew、gh 以及其他 /opt/homebrew/bin 工具
当 Linux 网关需要将 Mac 后端工具以稳定的 Linux 端命令形式暴露时,使用此技能。
这是针对Linux 网关上的灰色 macOS 技能问题的可发布解决方案:
- - 不要修补捆绑技能
- 不要假装 Linux 可以运行 macOS 二进制文件
- 在 Linux 网关上安装显式包装器
- 让公共技能依赖这些包装器路径
- 假设 Linux 网关和 Mac 节点位于同一可信本地网络中
使用此技能的场景
- - imsg、remindctl、memo、things、peekaboo
- 运行在已连接 Mac 节点上的 Homebrew 业务工具
- 基于包装器的技能,应在 Linux 网关上显示为就绪状态
- 能力报告和稳定的工具所有权映射
- 同一局域网内 Linux 网关到 Mac 节点的配置
- 保持唤醒或启用了局域网唤醒的 Mac 节点
不要使用此技能的场景
- - 应直接在本地安装的 Linux 原生工具
- 随机通过互联网路由的 Mac 主机或不可信的广域网跳点
- 任意远程 shell 访问
- 修补 OpenClaw 内部逻辑,使捆绑的 macOS 技能虚假报告支持状态
要求
- - Linux 网关和 Mac 节点共享同一可信本地网络或 VLAN
- Linux 网关可通过 SSH 连接到所属 Mac 节点
- 远程二进制文件存在并具有所需的 macOS 权限
- 你知道每个工具所属的 Mac 节点
- Mac 节点应保持唤醒状态以执行代理工作,或者至少启用局域网唤醒功能以便远程唤醒
本地网络约定
此技能专为家庭实验室或办公室本地拓扑设计:
- - Linux 网关与 Mac 位于同一局域网
- Mac 节点使用稳定的 RFC1918 或其他本地地址
- 网关与节点之间低延迟 SSH 连接
- 不需要通过公共互联网路由到 Mac
默认假设:
- - 如果网关无法通过本地网络访问 Mac,则基于包装器的工作流不正常
局域网唤醒说明:
- - 包装器安装脚本可以嵌入局域网唤醒元数据和重试逻辑
- 如果 Mac 可能休眠,请配置唤醒映射,使 Linux 端包装器能够发送魔术包并自动重试 SSH
设计约定
- - Linux 网关持有包装器
- Mac 节点持有实际二进制文件和操作系统级权限
- 公共技能依赖包装器路径,而非远程路径
- 工具所有权保持明确且可审计
- 桥接针对同一局域网节点可达性优化,而非公共主机可达性
工作流程
1. 生成工具所有权映射
运行:
bash
scripts/render-tool-map.sh
如果 ~/.openclaw/openclaw.json 已包含 Mac 后端的 remoteHost 条目,将首先根据该配置自动生成网关本地的所有权映射。在这种情况下,除非发现的映射缺失或明显错误,否则不要再次询问 IP 地址或 SSH 用户名。
否则,它将提供一个可重复使用的初始映射,例如:
- - imsg -> mac-ops@mac-messages.local
- remindctl -> mac-ops@mac-messages.local
- gh -> mac-ops@mac-tools.local
2. 安装 macOS 包
示例:
bash
scripts/install-macos-pack.sh \
--target-dir /home/node/.openclaw/bin \
--tool imsg \
--tool remindctl \
--tool memo \
--tool gh \
--openclaw-config /home/node/.openclaw/openclaw.json \
--wake-map mac-messages.local=AA:BB:CC:DD:EE:FF \
--wake-map mac-tools.local=11:22:33:44:55:66 \
--wake-wait 20 \
--wake-retries 2
安装程序现在将:
- - 在提供显式 --map tool=user@host 条目时使用它们
- 否则尝试从 OpenClaw 配置中的 remoteHost 值推断工具主机
- 当仅知道一个唯一的 remoteHost 时,回退到该发现的 Mac 主机处理未映射的工具
- 允许使用 --default-host user@host 强制指定共享所有者
- 当已能从 OpenClaw 配置解析所有者时,避免手动询问主机信息
这将在 Linux 上创建包装器路径,例如:
- - /home/node/.openclaw/bin/imsg
- /home/node/.openclaw/bin/remindctl
- /home/node/.openclaw/bin/memo
- /home/node/.openclaw/bin/gh
当配置了唤醒映射时,生成的包装器将:
- - 首先正常尝试 SSH
- 如果首次尝试失败,发送局域网唤醒魔术包
- 等待配置的秒数
- 重试远程命令
3. 验证包
运行:
bash
scripts/verify-macos-pack.sh --target-dir /home/node/.openclaw/bin
这将验证包装器可执行文件是否存在,并能从网关端解析。
同时显示每个已安装包装器中是否嵌入了局域网唤醒功能。
4. 在此基础上构建公共技能
发布社区技能时:
- - 要求使用 Linux 包装器路径,而非 macOS 二进制文件路径
- 记录预期拥有该工具的 Mac 节点
- 将包装器视为稳定的 API 接口
阅读 references/skill-readiness.md。
安全规则
- - 每个工具一个包装器
- 每个工具一个明确的所属 Mac 节点
- 无通用远程 shell 桥接
- 技能文件夹中不存储密钥
- 不修补核心以强制显示绿色徽章
文件
- - scripts/install-wrapper.sh:为远程二进制文件创建一个 SSH 包装器
- scripts/install-macos-pack.sh:批量安装常见的 Mac 后端工具包装器,支持从 OpenClaw 配置自动发现和局域网唤醒映射
- scripts/verify-macos-pack.sh:在 Linux 网关上验证包装器包并显示局域网唤醒状态
- scripts/render-tool-map.sh:打印自动发现或推荐的工具所有权映射及局域网唤醒映射示例
- references/skill-readiness.md:如何在不修补核心的情况下使公共技能在 Linux 上保持就绪状态