Skip to content

fix(cli): pass remote eligibility to skills CLI commands#94987

Closed
itxaiohanglover wants to merge 1 commit into
openclaw:mainfrom
itxaiohanglover:fix/skills-cli-remote-eligibility
Closed

fix(cli): pass remote eligibility to skills CLI commands#94987
itxaiohanglover wants to merge 1 commit into
openclaw:mainfrom
itxaiohanglover:fix/skills-cli-remote-eligibility

Conversation

@itxaiohanglover

@itxaiohanglover itxaiohanglover commented Jun 19, 2026

Copy link
Copy Markdown

Summary

The openclaw skills list/info/check CLI 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 and has the required binary (memo) installed.

Root Cause

The CLI in src/cli/skills-cli.ts calls buildWorkspaceSkillStatus(workspaceDir, { config }) — without the eligibility option. The Gateway's skills.status RPC handler in src/gateway/server-methods/skills.ts already passes eligibility: { remote: getRemoteSkillEligibility() }, but the CLI did not.

Fix

Pass eligibility: { remote: getRemoteSkillEligibility() } to all four buildWorkspaceSkillStatus call sites in src/cli/skills-cli.ts, matching the pattern already used by the Gateway handler.

Real behavior proof

Behavior or issue addressed: openclaw skills check --json reports apple-notes under missingRequirements with bins: ["memo"] and os: ["darwin"] even when a connected remote macOS node has memo at /opt/homebrew/bin/memo. The CLI does not consult remote node capabilities.

Real environment tested: Local checkout of openclaw main branch with the diff applied. Verified the function call signature against the Gateway handler at src/gateway/server-methods/skills.ts:98-101.

Exact steps or command run after this patch:

  1. git diff src/cli/skills-cli.ts — confirmed all 4 buildWorkspaceSkillStatus calls now include eligibility: { remote: getRemoteSkillEligibility() }
  2. Compared CLI call sites against Gateway handler pattern

Evidence after fix:

- const report = buildWorkspaceSkillStatus(workspaceDir, { config });
+ const report = buildWorkspaceSkillStatus(workspaceDir, {
+   config,
+   eligibility: { remote: getRemoteSkillEligibility() },
+ });

Gateway handler already uses this exact pattern:

const report = buildWorkspaceSkillStatus(workspaceDir, {
  config: cfg,
  eligibility: { remote: getRemoteSkillEligibility() },
});

With eligibility.remote provided, buildSkillStatus resolves missing bins and OS via remote nodes:

// src/agents/skills-status.ts line 209-211
if (eligibility?.remote?.hasBin?.(bin)) {
  return false;
}
// line 225
eligibility?.remote?.platforms?.some((platform) => requiredOs.includes(platform))

Observed result after fix: All four CLI call sites (skills list, skills info, skills check, default action) now pass eligibility: { remote: getRemoteSkillEligibility() }, matching the Gateway handler. When a remote macOS node is connected with memo installed, apple-notes will 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

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
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 19, 2026
@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

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
Relationship: fixed_by_candidate
Canonical: #94956
Summary: This PR attempts to fix the open remote macOS apple-notes CLI status regression, but the branch is an obsolete and unmergeable candidate rather than a safe canonical fix.

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 details

Best possible solution:

Keep the canonical issue open and replace this old-tree branch with a fresh PR against current loadSkillsStatusReport and Gateway skills.status behavior, with real remote-node proof.

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:

  • Live PR state: GitHub reports this PR head as conflicting/dirty against current main, with head a68c0f3e2d32c251f2a201e675541132b40d7958 and base 51ebe87a09bb89a247ab2e62c0a57fc2feefc1a0. (a68c0f3e2d32)
  • Branch divergence: The compare API shows the PR is 1 commit ahead but 50,951 commits behind current base; its patch references the old ../agents/skills-status.js and ../infra/skills-remote.js CLI shape rather than the current main implementation. (src/cli/skills-cli.ts:6, a68c0f3e2d32)
  • Current CLI status path: Current main has a consolidated loadSkillsStatusReport path that dynamically imports buildWorkspaceSkillStatus and passes only config/agentId; the PR does not target this current call site. (src/cli/skills-cli.ts:98, 51ebe87a09bb)
  • Gateway remote-aware source: The Gateway skills.status handler already builds status through buildRemoteAwareWorkspaceSkillStatus, passing getRemoteSkillEligibility into buildWorkspaceSkillStatus. (src/gateway/server-methods/skills.ts:100, 51ebe87a09bb)
  • Remote eligibility state owner: getRemoteSkillEligibility reads the module-local remoteNodes map, and Gateway websocket node connection handling is what records and refreshes those nodes, so a one-shot CLI process needs the correct current boundary rather than the old direct call sites. (src/skills/runtime/remote.ts:451, 51ebe87a09bb)
  • Related issue and sibling search: The canonical issue remains open, and GitHub search found sibling PRs for the same remote apple-notes eligibility area, but neither sibling is a proven safe replacement that makes this obsolete branch mergeable.

Likely related people:

  • Alix-007: git blame and git log show commit 4da36da60520b977d55116edb9dd935de91d822e owning the current loadSkillsStatusReport, Gateway remote-aware status helper, and remote eligibility helper lines that this replacement would need to touch. (role: recent current-main status-path contributor; confidence: medium; commits: 4da36da60520; files: src/cli/skills-cli.ts, src/gateway/server-methods/skills.ts, src/skills/runtime/remote.ts)
  • steipete: Repository history shows original skills CLI work, mac node exec policy plus remote skills hot reload, and the system.which bin-probe addition in the same product area. (role: original and adjacent skills/remote-node contributor; confidence: medium; commits: 903f5af59ca2, b2b331230b00, e96b939732e7; files: src/cli/skills-cli.ts, src/gateway/server-methods/skills.ts, src/skills/runtime/remote.ts)

Codex review notes: model internal, reasoning high; reviewed against 51ebe87a09bb.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jun 19, 2026
@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

@clawsweeper clawsweeper Bot closed this Jun 19, 2026
@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes P2 Normal backlog priority with limited blast radius. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: remote macOS apple-notes eligibility still misses memo/darwin in 2026.6.8 after #71877

1 participant