Skip to content

feat(runtime): extraPlugins host seam on createObjectOSStack (ADR §5.2)#1566

Merged
xuyushun441-sys merged 1 commit into
mainfrom
feat/objectos-stack-seams
Jun 3, 2026
Merged

feat(runtime): extraPlugins host seam on createObjectOSStack (ADR §5.2)#1566
xuyushun441-sys merged 1 commit into
mainfrom
feat/objectos-stack-seams

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

What

Opens the official extraPlugins seam on createObjectOSStack so 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 returned plugins array by hand.

const config = await createObjectOSStack({
  controlPlaneUrl,
  extraPlugins: [createCloudConnectionPlugin(), createMarketplaceInstallPlugin()],
});

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 — the ADR §5.2 move ("framework exposes seams; cloud supplies metadata + policy").

Purely additive: omitting extraPlugins leaves 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/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). Added the subpath alias; the new objectos-stack.test.ts now runs.

Scope / sequencing

This is the "open the seam" half of ADR §5.2. Removing framework's hardcoded marketplace/auth policy (the MarketplaceProxyPlugin 405 "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

pnpm --filter @objectstack/runtime exec vitest run src/cloud/objectos-stack.test.ts
# 2 passed — extraPlugins appended in order after defaults; no-op when omitted

🤖 Generated with Claude Code

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>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 3, 2026 9:47am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants