feat: add a development install that leaves nothing half-done - #6
Merged
Conversation
`omp plugin link .` is one of four things a complete install is, and doing only that is what leaves a checkout half-installed: the bundles may be stale against `src/`, this repository's own catalog is not registered so `omp plugin discover` and `omp plugin upgrade` have nothing to read, and the owned MCP entry waits for whichever session happens to start next. Each was a separate command to remember, so `bun run dev:install` is the list. It reimplements none of them. The plugin registry and the catalog are touched only through OMP's own CLI, and the MCP entry only through this package's own `syncEntry` -- the same call the extension makes at session start, against the same single owned key. Every path comes from `src/paths.ts`, so the script cannot disagree with the extension about where anything lives. It refuses rather than guessing: a registration from somewhere other than this checkout is reported and left alone unless `--force` says otherwise, so a git-spec install is never silently swapped for a link. It never acquires a CBM executable, because `/cbm install` asks for confirmation when a system copy already resolves and answering that for you would decide which executable an account's index belongs to. It never installs from the catalog it registers, because that resolves the catalog's ref and needs a published release. One trap found while writing it, and the reason the script does not quote `omp plugin features`: that renderer builds its enabled set from `getEnabledFeatures`, so the `enabledFeatures: null` case -- no explicit selection, which is what a plain install leaves -- yields an empty set and prints the disabled glyph beside a feature whose manifest default is true and which `resolvePluginManifestEntries` does load. Pasting it would report `graph-augmentation` as off while it is demonstrably appending to tool results. The script reproduces the loader's rule instead and says which state applies and why. Verified on four paths: an already-linked checkout (idempotent), a foreign registration (refused), a clean scratch `HOME` (links, registers, and reports the unresolved executable without acquiring it), and an unknown flag (rejected). `omp plugin discover` and `omp plugin upgrade` both answer after the catalog is registered.
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.
Summary
Adds
bun run dev:install, a script that brings a development checkout to the state a finished install actually has, and documents it in the README's Development section.omp plugin link .is one of four things a complete install is, and doing only that is what leaves a checkout half-installed:src/, andomp plugin linkregisters a checkout without building it.omp plugin discoverandomp plugin upgradehave nothing to read.Each was a separate command a contributor had to remember. The script is that list, run in order, with a report at the end.
It reimplements nothing
The point of the script is sequencing, not new behaviour, and it is deliberately incapable of disagreeing with the extension:
syncEntry— the same call the extension makes at session start, against the same single owned key.src/paths.ts. The script derives none of its own, so it cannot drift from where the extension looks.src/exec.ts'srun, so the timeout, output cap, and missing-executable answer are the ones already decided there.What it refuses to do
--forceis required to relink over it. A git-spec install is therefore never silently swapped for a link./cbm installasks for confirmation when a system copy already resolves, and answering that question in a script would decide which executable an account's index belongs to. When nothing resolves, the script reports it and names the command.source.ref, so it needs a published release. The script says so rather than failing at it.One trap found while writing it
The script does not quote
omp plugin features, and the reason is a real defect rather than a formatting preference. That renderer builds its enabled set fromgetEnabledFeatures, so theenabledFeatures: nullcase — no explicit selection recorded, which is exactly what a plain install leaves — yields an empty set and prints the disabled glyph beside every feature. Against this manifest that means it printsgraph-augmentationas disabled whileresolvePluginManifestEntriesdoes load it (loader.ts:432-441:nullselects every feature whosedefaultis true), and while it is demonstrably appending to tool results.A development install that pasted that output would report the augmentation as off in the one situation it is on. The script reproduces the loader's rule instead and prints which state applies and why:
Key files changed
scripts/dev-install.tspackage.jsondev:installscript entryREADME.mdTest plan
bun run typecheck— cleanbun run test:unit— 409 pass, 0 failbun run test:packaging— 10 pass, 0 failomp plugin install github:…into a scratchHOME, thendev:install— refused, naming the path and the uninstall commandHOME: links, registers the catalog, and reports the unresolved executable with the remedy instead of acquiring one--nope): rejected rather than ignoredomp plugin discoverandomp plugin upgradeboth answer after the catalog is registereddist/unchanged, so the committed bundles match sourcecigate green on this pull request🤖 Generated with omp