oclif runner and core-plugin host (FR-025) - #5
Merged
Conversation
Export run()/execute()/loadConfig()/listCorePlugins() so a consuming CLI runs BaseCommand subclasses and discovers commands contributed by packages declared as oclif core plugins (package.json oclif.plugins intersected with dependencies). Wire BaseCommand.prerun into the oclif init lifecycle so capability enforcement actually runs. Move @oclif/core to runtime dependencies. (FR-015) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Review of the runner branch found the new API had no owning requirement: runner.ts, index.ts and base-command.ts each cited FR-015, which in this repo is "Service Discovery Client". (The pre-existing FR-015..FR-018 citation on the auth engine is correct and untouched.) Adds FR-025 "oclif Runner and Core-Plugin Host", following how this repo specs its API surfaces (FR-001 ConfigService, FR-005 SecretsService), tracing to StR-003 and naming FR-010 downstream as the composition it enables. Corrects the three citations to FR-025. FR-025 was already spoken for, informally and wrongly: index.ts and plugins/schema.ts pointed the ixSchema convention at FR-025, and a plugin-schema test was named for it, though that convention is FR-014. Repointed all three so one ID does not mean two things. Two ACs had no test: - listCorePlugins excluding the root host plugin -- the host is itself a plugin in oclif's graph, so including it would misreport the host as its own dependency. - run() rejecting rather than calling process.exit, which is what makes it safe to drive from a test. Adds spec/tests.md rows for all eight ACs (six quoted test names verified to resolve; AC-8 is a static check, confirmed: no @oclif/plugin-plugins dependency), the runner.test.ts entry in the test-file map, and FR-025 to the StR-003 rollup. Indexes FR-024, which was missing. 245 passed, tsc/lint clean, quire validate exit 0.
kreneskyp
force-pushed
the
feat/oclif-runner-host
branch
from
July 30, 2026 20:53
8684f05 to
b46f079
Compare
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.
Adds the oclif entry points a consuming CLI needs to run —
run,execute,loadConfig,listCorePlugins— so a binary composed per FR-010 ships a thinbinscript instead of re-deriving oclif wiring. The runner is a wrapper over@oclif/core: command and core-plugin discovery are oclif's ownConfigloader, with no registry or manifest loader of our own, and no@oclif/plugin-plugins(runtime user-installed plugins stay out of scope).This unblocks
@agent-ix/quoin, whose oclif migration importsrunandloadConfigand cannot resolve them from any published version — 0.11.0 is the newest on npm and has neither. quoin's branch is otherwise green against a local build of this one (116 passed, 100% coverage), so this needs to land and publish before that can proceed.Review findings, fixed here
The new API had no owning requirement.
runner.ts,index.ts, andbase-command.tseach cited FR-015, which in this repo is "Service Discovery Client". (The pre-existing FR-015..FR-018 citation on the auth engine is correct and untouched.) Adds FR-025 "oclif Runner and Core-Plugin Host", following how this repo specs API surfaces — FR-001 ConfigService, FR-005 SecretsService — tracing to StR-003 with FR-010 downstream.FR-025 was already spoken for, wrongly.
index.tsandplugins/schema.tspointed the ixSchema convention at FR-025, and aplugin-schematest was named for it, though that convention is FR-014. Repointed all three, so one ID no longer means two things.Two ACs had no test:
listCorePluginsexcluding the root host plugin — the host is itself a plugin in oclif's graph, so including it would misreport the host as its own dependency.run()rejecting rather than callingprocess.exit, which is exactly what makes it safe to drive from a test.Traceability
spec/tests.mdgains rows for all eight ACs. Six quoted test names verified to resolve to real tests; AC-8 is a static check, confirmed (no@oclif/plugin-pluginsdependency). Also addsrunner.test.tsto the test-file map, FR-025 to the StR-003 rollup, and indexes FR-024, which was missing.Note for reviewers
@oclif/coremoves frompeerDependenciestodependencies. That's deliberate but worth a look: a consumer that also depends on@oclif/core(quoin does) could end up with two copies and twoConfigclasses. Today both resolve the same 4.11.4 in quoin's store because the ranges overlap, so there's no live problem — just keep the ranges compatible.Verification
245 passed / 1 skipped,
tsc --noEmitclean, lint clean,quire validateexit 0 overspec/.🤖 Generated with Claude Code