feat(runtime): extraPlugins host seam on createObjectOSStack (ADR §5.2)#1566
Merged
Conversation
Opens the official seam for a host stack (e.g. ObjectStack Cloud) to add
product/policy plugins — marketplace install, cloud-account binding,
set-initial-password — to the otherwise-neutral framework runtime WITHOUT a
framework release and without mutating the returned plugins array by hand.
createObjectOSStack({ controlPlaneUrl, extraPlugins: [createCloudConnectionPlugin(), ...] })
extraPlugins are appended last, after the framework defaults, so host policy
mounts its routes after (and can augment) the browse-only MarketplaceProxyPlugin.
This converts the cloud repo's pragmatic `config.plugins.push(...)` reverse-
dependency into a clean, intentional seam (ADR §5.2 — "framework exposes seams;
cloud supplies metadata + policy"). Purely additive: omitting extraPlugins
leaves the default stack byte-for-byte unchanged.
Also fixes a latent test-config gap: the runtime vitest alias map was missing
`@objectstack/spec/ui`, so it fell through to the `@objectstack/spec` catch-all
and resolved to `spec/src/index.ts/ui` (ENOTDIR) — which broke ANY runtime test
that transitively imports spec/ui (e.g. anything constructing createObjectOSStack).
Adding the subpath alias unblocks the new objectos-stack.test.ts.
Note: removing framework's hardcoded marketplace/auth policy (the MarketplaceProxy
405 dead-end, etc.) is the *next* step and intentionally deferred until the cloud
side lands + deploys (ADR §5.2 "after cloud lands") to avoid breaking the
framework→cloud contract.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Opens the official
extraPluginsseam oncreateObjectOSStackso a host stack (e.g. the ObjectStack Cloud repo) can add product/policy plugins — marketplace install, cloud-account binding, set-initial-password — to the otherwise-neutral framework runtime without a framework release and without mutating the returnedpluginsarray by hand.extraPluginsare appended last, after the framework defaults, so host policy mounts its routes after (and can augment) the browse-onlyMarketplaceProxyPlugin. This converts the cloud repo's pragmaticconfig.plugins.push(...)reverse-dependency into a clean, intentional seam — the ADR §5.2 move ("framework exposes seams; cloud supplies metadata + policy").Purely additive: omitting
extraPluginsleaves the default stack byte-for-byte unchanged (covered by a test).Also: latent test-config fix
The runtime vitest alias map was missing
@objectstack/spec/ui, so it fell through to the@objectstack/speccatch-all and resolved tospec/src/index.ts/ui(ENOTDIR) — which broke any runtime test that transitively importsspec/ui(e.g. anything constructingcreateObjectOSStack). Added the subpath alias; the newobjectos-stack.test.tsnow runs.Scope / sequencing
This is the "open the seam" half of ADR §5.2. Removing framework's hardcoded marketplace/auth policy (the
MarketplaceProxyPlugin405 "install via cloud"dead-end, etc.) is intentionally deferred until the cloud side lands + deploys (ADR: "after cloud lands") to avoid breaking the framework→cloud contract. Tracked as the cloud-D follow-up.Relates to cloud-side ADR Phase 1 (cloud PR #53:
sys_cloud_connection+ device-code binding + tiered install gate).Test
🤖 Generated with Claude Code