fix(cli): pass remote eligibility to skills CLI commands#94987
fix(cli): pass remote eligibility to skills CLI commands#94987itxaiohanglover wants to merge 1 commit into
Conversation
The `openclaw skills list/info/check` commands called
`buildWorkspaceSkillStatus` without passing remote eligibility context,
causing macOS-only skills like `apple-notes` to always show as
ineligible when a remote macOS node is connected.
The Gateway's `skills.status` RPC handler already passes
`eligibility: { remote: getRemoteSkillEligibility() }`, but the CLI
did not. This fix aligns the CLI with the Gateway by passing the same
remote eligibility context in all four `buildWorkspaceSkillStatus`
call sites.
Fixes openclaw#94956
|
Thanks for the contribution. I reviewed the branch, and this PR is not a good landing base for OpenClaw. Close: the diagnosis is useful, but this branch is based on an obsolete skills CLI shape, is dirty/conflicting against current main, and would need to be replaced rather than merged; the underlying bug remains tracked by the canonical issue. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. So I’m closing this PR rather than keeping an unmergeable branch open. A new narrow PR that carries only the useful part is welcome. Review detailsBest possible solution: Keep the canonical issue open and replace this old-tree branch with a fresh PR against current Do we have a high-confidence way to reproduce the issue? Yes, source inspection is enough to reproduce the mismatch: current main's CLI status loader still omits remote eligibility/Gateway status while the related issue provides released CLI output for the same symptom. I did not run a live Linux Gateway plus macOS node setup in this read-only review. Is this the best way to solve the issue? No. This branch patches obsolete call sites and a removed import path; the maintainable solution is a fresh current-main fix that uses the Gateway-owned remote-aware status source when available and keeps local/offline fallback behavior. Security review: Security review cleared: Cleared: the diff only changes CLI skills-status imports and call arguments, with no dependency, workflow, secret, install-script, or supply-chain surface changes. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 51ebe87a09bb. |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
The
openclaw skills list/info/checkCLI commands calledbuildWorkspaceSkillStatuswithout passing remote eligibility context, causing macOS-only skills likeapple-notesto always show as ineligible when a remote macOS node is connected and has the required binary (memo) installed.Root Cause
The CLI in
src/cli/skills-cli.tscallsbuildWorkspaceSkillStatus(workspaceDir, { config })— without theeligibilityoption. The Gateway'sskills.statusRPC handler insrc/gateway/server-methods/skills.tsalready passeseligibility: { remote: getRemoteSkillEligibility() }, but the CLI did not.Fix
Pass
eligibility: { remote: getRemoteSkillEligibility() }to all fourbuildWorkspaceSkillStatuscall sites insrc/cli/skills-cli.ts, matching the pattern already used by the Gateway handler.Real behavior proof
Behavior or issue addressed:
openclaw skills check --jsonreportsapple-notesundermissingRequirementswithbins: ["memo"]andos: ["darwin"]even when a connected remote macOS node hasmemoat/opt/homebrew/bin/memo. The CLI does not consult remote node capabilities.Real environment tested: Local checkout of
openclawmain branch with the diff applied. Verified the function call signature against the Gateway handler atsrc/gateway/server-methods/skills.ts:98-101.Exact steps or command run after this patch:
git diff src/cli/skills-cli.ts— confirmed all 4buildWorkspaceSkillStatuscalls now includeeligibility: { remote: getRemoteSkillEligibility() }Evidence after fix:
Gateway handler already uses this exact pattern:
With
eligibility.remoteprovided,buildSkillStatusresolves missing bins and OS via remote nodes:Observed result after fix: All four CLI call sites (
skills list,skills info,skills check, default action) now passeligibility: { remote: getRemoteSkillEligibility() }, matching the Gateway handler. When a remote macOS node is connected withmemoinstalled,apple-noteswill be marked eligible.What was not tested: No real OpenClaw gateway with a connected macOS node was available. Runtime behavior with an actual remote node connection was not verified.
Fixes #94956