Skip to content

Bring per-agent Skills panel onto main (steps 2/4/5) - #150

Merged
yikkuro merged 9 commits into
mainfrom
sunt-microsoft-skills-onto-main
Jul 30, 2026
Merged

Bring per-agent Skills panel onto main (steps 2/4/5)#150
yikkuro merged 9 commits into
mainfrom
sunt-microsoft-skills-onto-main

Conversation

@yikkuro

@yikkuro yikkuro commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Brings the per-agent Skills panel (steps 2/4/5) onto the latest main.

What & why

The per-agent Skills stack was merged bottom-up as stacked PRs#141/#144/#146 landed into their parent branches but were never retargeted to main, so only step 1 (#140, the data model) reached main. This PR re-lands that remaining work (SkillsDevPanel.vue, per-agent skills binding, skill-config diagnostics, skill match-name resolution) on top of current main (a9dfccc).

Coexists with the CNY usage fix (#147)

This merge preserves the CNY usage fix already on main:

  • SidePanel.vue formatCny + exchange-rate snapshot
  • SettingsView.vue 2-decimal spend values

The only conflicts were in desktop/src/agent-catalog.ts and agent-catalog.test.ts, resolved by union (skills helpers SKILL_MATCH_NAMES/resolveSkillFilterNames/matchesSkill/isKnownSkillId/sanitizeAgentSkillIds on top of the #140 data model). i18n files (en-US.ts/zh-CN.ts) auto-merged into the union of settings.currencySymbol (CNY) + all skills.* keys.

Validation

  • desktop: tsc --noEmit clean; npm test696 passed
  • renderer: vue-tsc --noEmit clean; npm run test199 passed; vite build succeeded
  • eslint on touched files: 0 errors (pre-existing main.ts ~preserve-caught-error left untouched)

Co-authored-by: Copilot App [email protected]
Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba

Tao Sun (from Dev Box) and others added 9 commits July 29, 2026 17:25
Introduce the data model for binding skills to agents. Every agent in the
catalog now carries an explicit `skills` list defaulting to the full set of
23 skill IDs (union of certified + managed skills from
deployer/skill_catalog.py). Adds ALL_SKILL_IDS, a getAgentSkills helper, and
tests. No runtime behavior changes.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
Write each agent's catalog skill allowlist into agents.list[*].skills so OpenClaw's per-agent skill filter binds skills natively. Skills are read per-agent from the catalog (never hardcoded) and enforced authoritatively for catalog-known agents during reconciliation; custom agent ids are left untouched.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
Add a DEV-ONLY "Skills" tab to ChatView that lets developers toggle each
agent's skill set at runtime and reload the gateway once, without editing
code. The tab and panel are gated on import.meta.env.DEV so they are absent
from production builds.

- ChatView: extend viewMode union with "skills"; add a v-if="isDev" toggle
  button and render SkillsDevPanel when selected.
- SkillsDevPanel: agent picker (catalog agents), 23 skill toggles reflecting
  config.agents.list[id].skills, select/clear all, Apply & reload with
  applying/applied/failed feedback.
- main.ts: new skills:set-agent-skills IPC that validates the agent id and
  skill ids, writes openclaw.json atomically, and restarts the gateway with
  rollback on failure. Exposed via preload as skills.setAgentSkills.
- agent-catalog: add pure isKnownSkillId / sanitizeAgentSkillIds helpers.
- agent-personas: change catalog-skill seeding from authoritative overwrite
  to fill-if-missing so dev-edited skills survive gateway reloads. Fresh
  installs still seed the full catalog list.
- i18n: add skills.dev.* keys in en-US and zh-CN.
- Update/extend unit tests for the seeding change and new helpers.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
Fix per-agent skill binding: OpenClaw filters agents.list[*].skills against each
skill's frontmatter name, not its slug. Add SKILL_MATCH_NAMES + resolveSkillFilterNames
and write resolved match-names to openclaw.json (seeding + set-agent-skills), while
keeping the UI/IPC input slug-based. Round-trip reads recognize both slug- and
name-form stored values via matchesSkill.

Add dev-only diagnostics: skills:get-status IPC runs the OpenClaw CLI directly
(skills list/check --json) to surface each skill's gating status and missing
requirements, rendered as badges + reasons in SkillsDevPanel with a Model-visible
summary and Refresh.

Add a per-skill global master toggle: skills:set-global-enabled IPC manages both
skills.entries[key].enabled and skills.allowBundled (bundled only), mirroring the
set-agent-skills atomic-write + single managed-gateway restart with rollback.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
Raise SKILLS_STATUS_TIMEOUT_MS to 120s so the cold OpenClaw CLI
(52-81s to emit JSON) is not killed before producing output, and drop
the redundant 'skills check' spawn since 'skills list --json' already
carries every per-skill boolean and missing-requirement the panel uses.
Add a visible 'checking status' loading line during the ~1 minute wait.

Redesign SkillsDevPanel as a single-column vertical list: skill name +
status/reason/missing on the left, per-agent 'This agent' and 'Global'
toggles right-aligned, no horizontal overflow or clipped labels.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
Show a muted 'Not installed' badge for catalog slugs (e.g. canvas) that
return no record once status has loaded successfully, instead of a bare
disabled Global switch.

Make the per-skill Global master toggle deferred like the per-agent
toggle: flipping it only stages a pending change, and a single
'Apply & reload' now persists BOTH the per-agent allowlist and every
global on/off change in ONE atomic config write + ONE gateway restart
via the new skills:apply-agent-config IPC. Factor the config mutations
into shared skill-config helpers (applyAgentSkillsToConfig /
applyGlobalSkillChange) reused by the existing set-agent-skills and
set-global-enabled handlers, and unit-test them.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
The status check cold-starts the OpenClaw CLI (~60s), so stop auto-running
it on mount and on every agent switch. Agent switches are now instant: the
fast config read still populates the per-agent checkboxes, and status badges
come from a per-agent cache (populated by Refresh status / Apply) or show a
'Status not checked' hint when this agent hasn't been checked yet. The
deferred-global baseline is recomputed from the selected agent's cached
status. Only 'Refresh status' (and Apply) spawn the ~1 minute CLI.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
Hoist the SkillsDevPanel status cache to module scope so cached badges
survive the panel unmounting/remounting and agent switches. Replace the
per-agent Refresh with a Refresh-all that fetches every catalog agent
sequentially (current agent first) with a progress indicator, caching
each result. Store both ok and error outcomes.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
Brings the per-agent Skills panel (steps 2/4/5) onto latest main, re-landing
work from #141/#144/#146 that only reached intermediate stacked branches.
Coexists with the CNY usage fix (#147).

Resolved conflicts in desktop/src/agent-catalog.ts and agent-catalog.test.ts
by taking the union (skills helpers on top of the #140 data model).

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 1fe75171-fea2-45ef-9401-bf8a4ea0f2ba
@yikkuro
yikkuro marked this pull request as ready for review July 30, 2026 08:33
@yikkuro
yikkuro merged commit 76f30c8 into main Jul 30, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants