feat(skills): list skills through the omp binary (skills --json) - #110
Draft
andrebrait wants to merge 1 commit into
Draft
andrebrait wants to merge 1 commit into
andrebrait wants to merge 1 commit into
Conversation
The skills page must list skills with no running session, so a session-keyed RPC source could not be relied on and the pure-Node replica had to stay correct by hand. Ask the omp binary instead: 'omp skills --json' runs the same discovery sessions use, is fresh from disk on every load, and needs no session. The pure-Node scan stays only as a fallback for installs whose binary predates the command.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The skills page now asks the omp binary for its listing:
omp skills --jsonruns the same discovery sessions use and is parsed into the app's SkillInfo shape. The pure-Node scan stays only as a fallback for installs whose binary predates the command.Why
The page is a pre-session surface: it must list skills with no running session, so a session-keyed source could not be relied on, and the replicated scan rules drift from omp's actual discovery (name-collision namespaces being the concrete case: skills that omp resolves as
namespace/nameare invisible to the replica). Keying the listing on binary capability instead of session liveness keeps the source stable per install, and every exec re-reads disk, so installs, uninstalls and toggles show immediately.Depends on the
skillsCLI in oh-my-pi: can1357/oh-my-pi#12273.Testing
npx tsc --noEmitcleannode --experimental-strip-types --test lib/skills-service.test.mjs: 15 pass, including newskillsFromCliPayloadmapping tests (valid payload, malformed payload, provider-label mapping)npx tsc --noEmitpassesnpm run lintpasses (release build gate)npm testpasses