Skip to content

feat(all): install-everything aggregator workspace#9

Merged
xuyushun441-sys merged 1 commit into
mainfrom
feat/all-aggregator
Jun 1, 2026
Merged

feat(all): install-everything aggregator workspace#9
xuyushun441-sys merged 1 commit into
mainfrom
feat/all-aggregator

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

What

Adds packages/all — a throwaway workspace that runs every template in one runtime, behind one app launcher, as if you installed them all together from the marketplace.

pnpm dev:all   # build all templates → compose → boot on :4000

How

Piggy-backs on the runtime's real local-install mechanism:

  1. install — populate .objectstack/installed-packages/<manifestId>.json from the workspace templates, in the exact wrapper format MarketplaceInstallLocalPlugin writes (and rehydrates at boot). Real marketplace installs in that folder are picked up untouched.
  2. compile — unwrap each installed App's artifact and compose them into one environment artifact (dist/objectstack.json, apps[N]).
  3. serveobjectstack dev all --artifact … (a built-in CLI mode) boots a single runtime hosting every app.

Why it's protocol-correct (ADR-0019)

The one-app-per-package rule is enforced by defineStack's validateSingleApp and governs authoring a package. Composition here happens at the environment layer — the CLI serve/compile path validates with ObjectStackDefinitionSchema (schema only), not the defineStack wrapper — so the single-app / namespace-prefix gates correctly do not apply. Same layer as the runtime rehydrating multiple installed packages into one environment.

Verified

  • Compile: 9 apps · 41 objects · 30 flows; installed-packages entries byte-match the runtime wrapper format.
  • Boot: single process on :4000, registers app.objectstack.environment.all with flows=30.
  • Cross-namespace data queries (todo_task, helpdesk_ticket, content_channel, pm_project) all return seeded records 200.

Notes

  • Only collision across templates: todo & content both ship a generic lead/contributor role+permission → de-duped keep-first (logged). No object/app name collisions.
  • dist/ and .objectstack/ are gitignored (build outputs).

🤖 Generated with Claude Code

`packages/all` composes every template into one runtime, as if installed
together from the marketplace. It reads the runtime's real local-install
folder (`.objectstack/installed-packages/`, the same format
MarketplaceInstallLocalPlugin writes + rehydrates) and compiles all installed
Apps into a single environment artifact served by `objectstack dev all`.

Composition happens at the environment layer — not via defineStack — so the
one-app-per-package rule (ADR-0019 / validateSingleApp) correctly does not
apply. Object/app names don't collide (distinct namespace prefixes); only the
generic lead/contributor role+permission shared by todo & content are
de-duped, and `requires` is unioned.

- scripts/compile-marketplace.mjs: install (workspace→installed-packages) + compile
- root `pnpm dev:all`: build all templates, compose, boot on :4000
- README entries (root + packages/all) explaining the environment-layer model

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@xuyushun441-sys xuyushun441-sys merged commit b22a35f into main Jun 1, 2026
@xuyushun441-sys xuyushun441-sys deleted the feat/all-aggregator branch June 1, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants