Skip to content

Commit d84a846

Browse files
committed
spec(packages): regenerate reference pages and add the changeset
Claude-Session: https://claude.ai/code/session_01AmH9bKvGoLjiY86Q4Z3og2 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5f922ea commit d84a846

5 files changed

Lines changed: 32 additions & 5 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
"@objectstack/spec": minor
3+
---
4+
5+
`enableOnInstall` is declared in three published schemas; each one now says which of the three governs it, and the two that are not the authority say what they are (#18605).
6+
7+
The install door already honours the key — `POST /api/v1/packages` writes the registry row's `enabled` from `enableOnInstall ?? true` (#18058). What was left was three declarations that looked identical (`z.boolean().default(true)`, same description) with nothing saying which one an author should read.
8+
9+
Clause-②: yes
10+
11+
**The authority**
12+
13+
`PackageInstallRequestSchema` (`api/package-api.zod.ts`) is the one authority, because it is the request contract of the door that honours the key. Its published description now says so: "honoured at POST /api/v1/packages: the installed row's `enabled` is written from this key". Its doc block carries the map to the other two, so a reader never has to guess which of three identical-looking declarations governs.
14+
15+
**`kernel/InstallPackageRequest.enableOnInstall` — a COPY of the request key**
16+
17+
Same type, same default, same meaning, restated on the in-process protocol primitive `ObjectStackProtocol.installPackage`. Its published description now records that this layer does not read it: the implementation reads `manifest` and `settings` only, and the HTTP door does not forward the key down that seam — it calls `installPackage({ manifest, settings })` and performs the enable/disable flip itself, because the durable half must follow the row that door returned rather than the request's intent.
18+
19+
The copy is held to the authority by a **parity pin** rather than by a structural reference. The structural spelling is not available in this direction: the authority is built from `ManifestSchema` and `InstalledPackageSchema`, both declared in `kernel/package-registry.zod.ts`, so `PackageInstallRequestSchema.shape.enableOnInstall` spelled there is an import cycle, and under `OS_EAGER_SCHEMAS=1` — the mode `gen:schema` and `check:authorable-surface` run in — it dies with `ReferenceError: Cannot access 'InstalledPackageSchema' before initialization`. `api/package-install-one-authority.test.ts` parses both declarations over one matrix (absent, `false`, `true`, a string, `null`) and reds on any cell where they disagree.
20+
21+
**`marketplace/MarketplaceInstallRequest.enableOnInstall` — not this key at all**
22+
23+
It stays, and its published description says what it is: the marketplace channel's own install option. That request's subject is a listing (`listingId`, `version`, `licenseKey`, `tenantId`), not a manifest; its door is the control plane's `POST /api/v1/marketplace/install`, of which a runtime mounts only a read-only proxy; and the channel resolves the artefact and validates the licence before mapping what it holds into a platform install. It is one translation upstream of the door key, owned by a different party on a different release cadence, so folding it would let a narrowing at the platform door silently narrow a control-plane contract.
24+
25+
**What does not move**
26+
27+
No key is added, removed, renamed or retyped, and no default changes: the accept set of all three schemas is byte-for-byte what it was, and `api-surface`, `api-surface-declarations`, `authorable-surface` and `authorable-defaults` are all unchanged. What moves is the published description text of three keys and the reference pages generated from it. The `Clause-②` declaration is `yes` as the conservative arm, because three published declarations' stated meaning moves.

‎content/docs/references/api/package-api.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ Install package request
491491
| :--- | :--- | :--- | :--- |
492492
| **manifest** | `{ id: string; namespace?: string; defaultDatasource?: string; version: string; … }` | ✅ | Package manifest to install (AUTHORING stage: `objects` are glob patterns) |
493493
| **settings** | `Record<string, any>` | optional | User-provided settings at install time |
494-
| **enableOnInstall** | `boolean` | optional (default: `true`) | Whether to enable immediately after install |
494+
| **enableOnInstall** | `boolean` | optional (default: `true`) | Whether to enable immediately after install — honoured at POST /api/v1/packages: the installed row's `enabled` is written from this key |
495495
| **overwrite** | `boolean` | optional | Overwrite an already-installed package id instead of answering 409 Conflict |
496496
| **platformVersion** | `string` | optional | Current platform version for compatibility verification |
497497
| **artifactRef** | `{ url: string; sha256: string; size: integer; format?: Enum<'tgz' \| 'zip'>; … }` | optional | Artifact reference for marketplace installation |
@@ -654,7 +654,7 @@ Install package request
654654
| :--- | :--- | :--- | :--- |
655655
| **manifest** | `{ id: string; namespace?: string; defaultDatasource?: string; version: string; … }` | ✅ | Package manifest to install (AUTHORING stage: `objects` are glob patterns) |
656656
| **settings** | `Record<string, any>` | optional | User-provided settings at install time |
657-
| **enableOnInstall** | `boolean` | optional (default: `true`) | Whether to enable immediately after install |
657+
| **enableOnInstall** | `boolean` | optional (default: `true`) | Whether to enable immediately after install — honoured at POST /api/v1/packages: the installed row's `enabled` is written from this key |
658658
| **overwrite** | `boolean` | optional | Overwrite an already-installed package id instead of answering 409 Conflict |
659659
| **platformVersion** | `string` | optional | Current platform version for compatibility verification |
660660
| **artifactRef** | `{ url: string; sha256: string; size: integer; format?: Enum<'tgz' \| 'zip'>; … }` | optional | Artifact reference for marketplace installation |

‎content/docs/references/api/protocol.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1910,7 +1910,7 @@ Install package request
19101910
| :--- | :--- | :--- | :--- |
19111911
| **manifest** | `{ id: string; namespace?: string; defaultDatasource?: string; version: string; … }` | ✅ | Package manifest to install |
19121912
| **settings** | `Record<string, any>` | optional | User-provided settings at install time |
1913-
| **enableOnInstall** | `boolean` | optional (default: `true`) | Whether to enable immediately after install |
1913+
| **enableOnInstall** | `boolean` | optional (default: `true`) | Whether to enable immediately after install — restates the install-door request key, whose one authority is api/PackageInstallRequest; this protocol primitive does not read it |
19141914
| **platformVersion** | `string` | optional | Current platform version for compatibility verification |
19151915

19161916
### Nested Shape: `InstallPackageRequest.manifest`

‎content/docs/references/kernel/package-registry.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Install package request
184184
| :--- | :--- | :--- | :--- |
185185
| **manifest** | `{ id: string; namespace?: string; defaultDatasource?: string; version: string; … }` | ✅ | Package manifest to install |
186186
| **settings** | `Record<string, any>` | optional | User-provided settings at install time |
187-
| **enableOnInstall** | `boolean` | optional (default: `true`) | Whether to enable immediately after install |
187+
| **enableOnInstall** | `boolean` | optional (default: `true`) | Whether to enable immediately after install — restates the install-door request key, whose one authority is api/PackageInstallRequest; this protocol primitive does not read it |
188188
| **platformVersion** | `string` | optional | Current platform version for compatibility verification |
189189

190190
### Nested Shape: `InstallPackageRequest.manifest`

‎content/docs/references/marketplace/marketplace.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Install from marketplace request
145145
| **version** | `string` | optional | Version to install |
146146
| **licenseKey** | `string` | optional | License key for paid packages |
147147
| **settings** | `Record<string, any>` | optional | User-provided settings at install time |
148-
| **enableOnInstall** | `boolean` | optional (default: `true`) | Whether to enable immediately after install |
148+
| **enableOnInstall** | `boolean` | optional (default: `true`) | Whether to enable immediately after install — the marketplace channel's own install option, not the platform install-door key (api/PackageInstallRequest) |
149149
| **artifactRef** | `{ url: string; sha256: string; size: integer; format: Enum<'tgz' \| 'zip'>; … }` | optional | Artifact reference for direct installation |
150150
| **tenantId** | `string` | optional | Tenant identifier |
151151

0 commit comments

Comments
 (0)