Skip to content

feat: skillset "always keep skills up to date" toggle (#1191)#1192

Open
chronoai-shining wants to merge 3 commits into
developfrom
feature/1191-skillset-auto-update
Open

feat: skillset "always keep skills up to date" toggle (#1191)#1192
chronoai-shining wants to merge 3 commits into
developfrom
feature/1191-skillset-auto-update

Conversation

@chronoai-shining

Copy link
Copy Markdown
Collaborator

Summary

Adds a per-skillset owner toggle "Always keep skills in this skillset up to date" (autoUpdateMembers, default OFF). When ON, every member — pinned or not — resolves to its skill's latest version everywhere the set is delivered, so a member's new version automatically flows into the skillset and its exported Claude Code plugin, with no per-member ref edits.

Closes #1191.

What it does

  • Resolution-time override, non-destructive. The whole behavior is one flag on the shared version loader (createVersionLoader(actor, forceLatest)versionOrTag = "latest"), threaded from each skillset's flag through every resolution seam: the resolved-member snapshot (revision bump), derived visibility, the read gate, the public-member count, closure delivery, and the mirror plugin export. The authored members refs are never rewritten, so turning it off restores the pinned behavior.
  • Immediate catch-up. Toggling either way re-cuts the revision when the public snapshot moved and refreshes derived visibility; the route then fires the mirror reconcile so the exported plugin re-publishes at the freshly-bumped revision.
  • API-first. New PUT /api/v1/skillsets/:id/auto-update (mirrors the plugin-export toggle) + autoUpdateMembers on the skillset resource. The ornn-web toggle card on the detail page is the secondary surface.

Per the product decision on #1191, the toggle overrides all pins (a pin is inert while it's on) — the simplest "always keep ALL up to date" model.

Testing

  • API: 2146 pass. New unit + route tests cover the toggle (enable → force-latest + revision bump + closure delivers latest; disable → restores pins + bumps again; idempotent when already-latest; auth + 404), plus forceLatest resolver threading. The service tests exercise the real SkillService loader end-to-end, not mocks.
  • Web: 611 pass. New SkillsetAutoUpdateCard tests (owner gating, on/off state, toggle payload).
  • tsc (api + web + sdk) clean; eslint 0 errors; changeset included (minor/minor).

Not included (follow-ups)

  • The agent manual (skills/ornn-agent-manual-cli/references/api-reference.md) doesn't yet document the new endpoint — that skill is mirror-published and versioned separately.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HQhPzeZKKfFrw6Zc44RGaB

Add a per-skillset opt-in (autoUpdateMembers, default OFF) that, when on,
resolves EVERY member to its skill's latest version wherever the set is
delivered: the resolved-member snapshot (revision bump), derived visibility,
the read gate, the public-member count, closure delivery, and the mirror
plugin export.

The mechanism is a single forceLatest flag on SkillService.createVersionLoader
(versionOrTag becomes "latest"), threaded from each skillset's flag through
the resolution seams. The override is resolution-time only — authored member
refs are never rewritten, so disabling restores the pinned behavior.

Exposed API-first as PUT /skillsets/:id/auto-update and autoUpdateMembers on
the skillset resource. Toggling either way immediately re-cuts the revision
when the public snapshot moved and refreshes derived visibility; the route
then fires the mirror reconcile to re-export the plugin at the new revision.

Backend changes land together because the schema field, loader flag, and
endpoint are intra-file coupled in service.ts.

Part of #1191
Owner-only "Keep skills up to date" card on the skillset detail page: shows
the current state and flips autoUpdateMembers via PUT /skillsets/:id/auto-update
(new updateAutoUpdate service fn + useUpdateAutoUpdate mutation). The flip is
reversible and low-risk, so it toggles directly with no confirm dialog and
primes the detail cache with the returned (possibly revision-bumped) payload.

Part of #1191
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.

[Feature] Skillset toggle: "Always keep skills in this skillset up to date" (auto-track latest member versions)

1 participant