From 8bfdf6ee10eb5843bf92881944fc05aef8fc19ab Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 21:27:39 +0000 Subject: [PATCH] docs(adr, design, ui): ADR-0130 D2 and ADR-0141 point at the 2026-11-12 ADR-0019 D3 amendment; the marketplace design doc and the audience page drop the suite fold ADR-0130 D2 (with its Non-goals line and alternative 5) and ADR-0141's Unchanged line gain dated pointer lines naming the amendment and 958734cbac; no ruled sentence is deleted. The marketplace-publishing design doc and content/docs/ui/audience-based-interfaces.mdx rewrite their fold sentences to the amended rule: a suite may surface more than one app, each defined by a different package, and an app package defines at most one app. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01FEkQ5omJjY7zqYeR48ExxC --- content/docs/ui/audience-based-interfaces.mdx | 2 +- ...lease-artifact-as-co-ownership-boundary.md | 26 +++++++ ...endency-declared-checked-before-install.md | 8 +++ docs/design/marketplace-publishing.md | 72 ++++++++++++++----- 4 files changed, 88 insertions(+), 20 deletions(-) diff --git a/content/docs/ui/audience-based-interfaces.mdx b/content/docs/ui/audience-based-interfaces.mdx index 8391a46788b..dfd58dc648b 100644 --- a/content/docs/ui/audience-based-interfaces.mdx +++ b/content/docs/ui/audience-based-interfaces.mdx @@ -19,7 +19,7 @@ description: "Serve one dataset to different audiences: give end users a curated The built-in permission sets already encode this split: `member_default` and `viewer_readonly` do **not** carry `studio.access` / `manage_metadata`, so Studio and schema-design surfaces are invisible to them; `admin_full_access` carries both, while `organization_admin` gets `setup.access` only — the Setup shell is reachable but Studio and schema design stay hidden from org-scoped admins (see [`default-permission-sets.ts`](https://github.com/objectstack-ai/objectstack/blob/main/packages/plugins/plugin-security/src/objects/default-permission-sets.ts)). -**One package, one app.** A package of `type: 'app'` exposes **exactly one** App — `defineStack` refuses a second at load, per ADR-0019 (app-as-consumer-unit) D3. More audiences therefore never mean more apps: they are navigation groups **inside** that one app, gated by `requiredPermissions` exactly as below. +**One package, one app.** A package of `type: 'app'` exposes **exactly one** App — `defineStack` refuses a second at load, per ADR-0019 (app-as-consumer-unit) D3; a `type: 'module'` package is held to at most one app the same way. More audiences in one package therefore never mean more apps: they are navigation groups **inside** that one app, gated by `requiredPermissions` exactly as below. More apps come only from more packages: a suite (one install: an app package plus the module packages it composes) may surface more than one app, each defined by a different package of the suite (ADR-0019 D3, amended 2026-11-12). ### 1. Gate the app and its navigation diff --git a/docs/adr/0130-release-artifact-as-co-ownership-boundary.md b/docs/adr/0130-release-artifact-as-co-ownership-boundary.md index 15b1908241c..a9bf36565e6 100644 --- a/docs/adr/0130-release-artifact-as-co-ownership-boundary.md +++ b/docs/adr/0130-release-artifact-as-co-ownership-boundary.md @@ -208,6 +208,16 @@ already filters them out of the consumer marketplace and `MarketplaceListingSchema.packageType` already cannot represent a non-App listing — neither changes. +> ⚠️ **Pointer (2026-11-14): ADR-0019 D3 was amended on 2026-11-12** +> ([#32585](https://github.com/objectstack-ai/objectstack/issues/32585), merged as `958734cbac`). +> "D1–D3 stand verbatim and unamended" above is the reading of 2026-09-01 and is kept as written. +> The amended rule: "A suite (one install: an app package plus the module packages it composes) MAY +> surface more than one app, provided each app is defined by a different package of the suite, and +> an app package defines at most one app." D1 and D2 are not amended, so the consumer still +> installs and uninstalls one thing, the single `type: app` package. Of the three verbs only +> "opens" reads differently: a user opens an app, and a suite may offer more than one (ADR-0019's +> note under D1). + D4 of ADR-0019 accommodates this case in its own words, unchanged: *"An App declares and owns **a set of namespaces**; uninstall is atomic over that set"* (`docs/adr/0019-app-as-consumer-unit.md`, `docs/adr/0019-app-as-consumer-unit.md`) — a **set**, and its parenthetical already cites the very `Map>` @@ -222,6 +232,14 @@ a consumer can partially uninstall. It has exactly one consumer-visible conseque you installed brought its modules — and that is the same consequence a plugin inside a package has today. +> ⚠️ **Pointer (2026-11-14), the same amendment** (`958734cbac`). ADR-0019's amendment note, +> under "Records that restate D3", reads this paragraph: the line "stands as drawn", and "What +> ADR-0130 calls a suite is a container a consumer browses or installs, and that stays removed." +> From the amendment ADR-0019 uses "suite" for one install of an app package with its modules, "a +> descriptive word, not a package type"; that is not the container this line excludes. "Exactly +> one consumer-visible consequence" above is the reading of 2026-09-01 and is kept as written; it +> "gains a second: a module the app package brought may surface an app of its own." + **Recording convention.** ADR-0019's text is **not rewritten**. This record cross-references it and is listed in its own `Builds on` line; per this repository's convention a governed record is amended by an additive addendum or by a successor that cites it (the shape ADR-0048's 2026-08-08 @@ -430,6 +448,10 @@ It is listed again under Non-goals. become the wedge that reintroduces one. - **The artifact as a consumer-visible unit.** D2's ⛔ line. Not a suite, not a browse target, not an install target, not partially uninstallable. + ⚠️ *Pointer (2026-11-14):* "suite" here is the container a consumer browses or installs, which + stays removed after ADR-0019 D3's 2026-11-12 amendment (`958734cbac`); the amended D3 uses the + word for one install of an app package with its modules, which may surface several apps, each + defined by a different package (see the pointers under D2). - **Implementing segmented artifact loading.** D4 reserves the key position only. The segmented form itself needs its own decision. - **A second ordering mechanism.** D5. `resolvePluginOrder` or nothing. @@ -515,6 +537,10 @@ turn into a mechanism, and it does not become one until the cards above ship. 5. **Let the artifact be a consumer-visible container ("a suite, but a good one").** Rejected outright: it is ADR-0019 D3 by another name, and that record's argument does not weaken because the container is better built. + ⚠️ *Pointer (2026-11-14):* ADR-0019 D3 was amended on 2026-11-12 (`958734cbac`): its fold is + reversed, and a suite may surface several apps, each defined by a different package. The + rejection stands on what the amendment keeps: D1 and D2 are unchanged, and a suite "is no + second consumer unit. It has no listing and no package type of its own." --- diff --git a/docs/adr/0141-inter-app-dependency-declared-checked-before-install.md b/docs/adr/0141-inter-app-dependency-declared-checked-before-install.md index 10f1d678333..ecbc5f22b8d 100644 --- a/docs/adr/0141-inter-app-dependency-declared-checked-before-install.md +++ b/docs/adr/0141-inter-app-dependency-declared-checked-before-install.md @@ -611,6 +611,14 @@ an App), the artifact as a control-plane noun that installs whole (ADR-0130 D2), version per artifact (ADR-0130 D6), permission sets (ADR-0086 D4), the save door's closure rules, the snapshot shape (D8, until its own card), and the compile-time boundary (`os validate` refuses a lookup into another artifact, D1). +> ⚠️ **Pointer (2026-11-14): ADR-0019 D3 was amended on 2026-11-12** +> ([#32585](https://github.com/objectstack-ai/objectstack/issues/32585), merged as `958734cbac`). The consumer-model +> item of the **Unchanged** line above is the reading of 2026-10-25 and is kept as written. The amended rule: "A suite +> (one install: an app package plus the module packages it composes) MAY surface more than one app, provided each app is +> defined by a different package of the suite, and an app package defines at most one app." D1, D2 and D4 are not +> amended, so one app package still installs and uninstalls as one; of the three verbs only "opens" reads differently: a +> user opens an app, and a suite may offer more than one (ADR-0019's note under D1). + --- ## Alternatives considered diff --git a/docs/design/marketplace-publishing.md b/docs/design/marketplace-publishing.md index d7ce88b44d1..c198e2ad02a 100644 --- a/docs/design/marketplace-publishing.md +++ b/docs/design/marketplace-publishing.md @@ -5,6 +5,11 @@ > **Updated:** 2026-05-31 — §1–2 and §6 aligned to ADR-0019 (App as the > consumer-facing unit; no "suite contains apps"; consumer Marketplace lists > only `type: app`). +> **Updated:** 2026-11-14 — §1, §2.1, §6 and the Summary follow ADR-0019 D3 as +> amended on 2026-11-12 (`958734cbac`): a suite (one install: an app package +> plus the module packages it composes) may surface more than one app, each +> defined by a different package, and an app package defines at most one app. +> The 2026-05-31 line above is kept as written. > **Status:** Design Specification > **Target Version:** v3.2 – v4.0 @@ -49,14 +54,19 @@ The marketplace protocol consists of three primary schema files: ### Reference Implementation -**HotCRM** (`objectstack-ai/hotcrm`) demonstrates a real-world application. Per -ADR-0019, it is being refolded into a **single consumer App** (download = open = -uninstall) whose internal plugins are invisible "frameworks inside the bundle": -- Root `objectstack.config.ts` with `type: 'app'` — one consumer-facing App -- The former sub-plugins (crm, finance, marketing, …) are internal - contributions bundled inside the App, not separately listed or installed -- The App owns the set of namespaces those contributions use; uninstall is - atomic over that set +**HotCRM** (`objectstack-ai/hotcrm`) demonstrates a real-world application. It +ships as a **suite** under ADR-0019 D3 as amended on 2026-11-12: one release +artifact whose consumer unit is its `type: 'app'` package, plus the module +packages it composes (ADR-0130): +- The `type: 'app'` package is the one thing listed, installed and uninstalled + (ADR-0019 D1, D2); its modules are not separately listed or installed +- The suite surfaces several apps, each defined by a different package: sales + in the app package, service and marketing in their module packages (hotcrm + `main` at `ac4dd3d`: `src/sales/apps/crm.app.ts`, + `src/service/apps/service.app.ts`, `src/marketing/apps/marketing.app.ts`); + no package defines more than one app +- The app package owns the set of namespaces its modules use; uninstall is + atomic over that set (ADR-0019 D4) --- @@ -70,7 +80,7 @@ The ObjectStack ecosystem exposes **one consumer-facing noun: the App.** App ← the only consumer unit (download = open = uninstall) ├── Type: app (the only consumer-installable type; see isConsumerInstallable) ├── Namespace(s): the App owns a set; uninstall is atomic over the set -├── Apps: at most one app surface per package (one app, many tabs — no suite) +├── Apps: at most one app surface per package (a suite surfaces one per package) └── Internal contributions (invisible): plugin | driver | server | ui | theme | agent | module — "frameworks inside the .app bundle": bundled or operator-provisioned, never independently listed or installed by a consumer @@ -380,12 +390,16 @@ Steps: ## 6. Composing a Multi-Plugin Application (ADR-0019) -The consumer model has **one user-visible noun — the App — and no "suite -contains apps" aggregator**. A solution built from many internal plugins has -exactly two valid shapes; both ship as *one App* (or several independent Apps) -to the consumer, never as a wrapper that surfaces N apps. +The consumer model has **one listed, installed and uninstalled noun — the App, +that is the `type: app` package — and no package that surfaces N apps**. Under +ADR-0019 D3 as amended on 2026-11-12 (`958734cbac`), a suite (one install: an +app package plus the module packages it composes) may surface more than one +app, provided each app is defined by a different package of the suite; an app +package, and a module package, defines at most one app. A solution built from +many internal plugins has three valid shapes, and each ships to the consumer as +*one App* per listing. -### 6.1 Shape A — One App, internal plugins bundled (recommended for HotCRM) +### 6.1 Shape A — One App, internal plugins bundled Compose all internal plugins into a single `type: 'app'` package. The plugins are "frameworks inside the .app bundle" — invisible to the consumer. The App @@ -425,10 +439,30 @@ os publish # com.hotcrm.finance (type: app) **Cons:** verticals do not share one install; cross-app data sharing is a separate concern (see ADR-0019 §Out of scope). -> **Not allowed:** a "meta-package" / suite whose only job is to surface N apps -> to the consumer — the Office "suite contains applications" model ADR-0019 -> removes. `defineStack` enforces *at most one app* per `type: app` package, and -> the consumer Marketplace lists only `type: app`. +### 6.3 Shape C — A suite: one app package, modules that each surface an app (HotCRM) + +Ship one release artifact (ADR-0130) holding the `type: 'app'` package and the +`type: 'module'` packages it composes. The consumer lists, installs and +uninstalls the app package; the modules come with it. Each package may define +one app, so the suite offers several apps, switched from the app launcher. + +```typescript +// objectstack.config.ts +export default composeStacks( + [serviceStack, marketingStack, salesStack], // each a defineStack() with at most one app + { manifest: 'preserve' }, // one artifact, one package per stack +); +``` + +**Pros:** one listing and one install, with an app per business area. +**Cons:** the modules version with the app package (ADR-0130 D6). + +> **Not allowed:** one package that surfaces N apps, and a suite as a second +> consumer unit: a suite "is no second consumer unit. It has no listing and no +> package type of its own" (ADR-0019 D3 amendment note). `defineStack` refuses +> a `type: app` or `type: module` package that defines more than one app +> (`STACK_SINGLE_APP_VIOLATION`), and the consumer Marketplace lists only +> `type: app`. --- @@ -617,7 +651,7 @@ This comprehensive design document establishes the **Marketplace Protocol** for 2. **Publishing**: 6-step flow (develop → validate → build → submit → review → publish) 3. **Installation**: 4 channels (CLI, SDK, API, UI) with 30+ metadata type registration 4. **Lifecycle**: State machine for install/enable/disable/upgrade/uninstall -5. **Composition** (ADR-0019): one App (internal plugins bundled) or several independent Apps — never a suite +5. **Composition** (ADR-0019, D3 as amended 2026-11-12): one App (internal plugins bundled), several independent Apps, or a suite whose app package and modules each surface at most one app — never one package that surfaces N apps 6. **Security**: 5-level verification, signing, automated scanning, permission review 7. **Pricing**: 6 models (free to enterprise) with license validation 8. **Roadmap**: 5 phases across 4 quarters