You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit db61260
Browse filesBrowse the repository at this point in the historyBrowse files
fix(meta)!: the layered view naming no package refuses a name two packages hold with the package-less writes' own `409 RESOURCE_CONFLICT`, instead of serving one holder's stack picked silently (#28337)
8
+
9
+
Clause-②: no (narrowing) — `GET /meta/:type/:name/layers` and the deprecated `?layers=true` refuse a request with no `?package=` for a name whose active rows two or more packages hold, which they answered `200` before. Nothing is widened.
10
+
Metadata-protocol: none
11
+
12
+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped and no stored metadata changes: a read door now answers the refusal the package-less save and delete already answer for the same rows, with the same code, status and holder list. The remedy is the request's (name the package with ?package=), so there is nothing for a migration to rewrite and no tombstone. -->
13
+
14
+
**BREAKING** read narrowing at the layered view (`@objectstack/rest`'s shared layered chain, served by `RestServer` and the runtime dispatcher, both spellings).
15
+
16
+
-**Before.** A `sys_metadata` row is keyed by type, name and package, so two installed packages can each hold an item of one name. For such a name, a save or a delete naming no package was refused `409 RESOURCE_CONFLICT` ("Name the package this save is for…", naming the holders), while the layered view naming no package answered `200` with whichever holder's row a package-agnostic lookup met first. The Studio editor and an agent read one holder's layers with no sign that a second holder existed, and the save that followed was refused.
17
+
-**Now.** The layered view naming no package answers that same refusal, worded for the read: `409 RESOURCE_CONFLICT`, "Name the package this layered read is for, then send it again: on the REST door add ?package= with the package id…", naming every holder. Each transport answers it in the envelope its own save door answers the writes' refusal in.
18
+
-**Unchanged.**`?package=` with any holder's id reads that holder's stack. A name one package holds, a name only the package-unbound row holds, and a package's row with the package-unbound row beside it answer as before. Every type the writes refuse on is refused here, and no other. The plain item read, `/published` and the protocol's in-process `getMetaItemLayered` (read by the security catalog echo and the packaged-permission-set lock gate) still serve a name two packages hold as they did.
19
+
-**New export.**`ObjectStackProtocolImplementation.packagelessLayeredReadRefusal(request)` (`@objectstack/metadata-protocol`) answers the refusal or `undefined`; `RestProtocol` and `MetaItemReadGateSources` gain it as an optional member, and `MetaLayeredRequest` gains an optional `member`.
20
+
-**Who sees it.** A client that reads `/layers` with no `?package=` for a name two installed packages both hold.
21
+
22
+
**The remedy.** Send the read with `?package=` naming the package whose stack you want, as the writes already require.
feat(runtime): `GET /packages/:id/customizations` answers what this deployment changed on an installed base, in one read
10
+
11
+
Clause-②: yes (widening)
12
+
Metadata-protocol: added
13
+
14
+
ADR-0146 D8 item 4. For an installed base package (HotCRM), one read answers "what did we change on it": the items its paired `<base>.custom` package overrides, the fields, validation rules and indexes that package adds to the base's objects, and the base's items switched off in this deployment, with each list's length. Upgrade reviews, the Studio landing's "n customized, m switched off" line and Studio's "only customizations" filter read it from the server instead of piecing it together in the browser.
15
+
16
+
-**`@objectstack/spec`**: `GetPackageCustomizationsRequestSchema` and `GetPackageCustomizationsResponseSchema` (with their types) in `@objectstack/spec/api`. The response is strict at every level; its counts are non-negative integers derived from the lists in the same answer.
17
+
-**`@objectstack/runtime`**: the route. Overrides are the pair's active rows that the served-override predicate admits (the one the effective read serves by), so a declaration from any other package and an undeclared pair item are not listed. Extensions are the pair's `extend` contributions to objects the base owns, as declared. Switched-off items are the base's `active: false` activation-ledger rows. The read gate and the 404 wording are `GET /packages/:id`'s; the query set is closed; a `.custom` id is refused `400 VALIDATION_ERROR` naming its base; a base with no pair answers empty lists, and the read never creates the pair. No diff against the base and no `basedOn` verdict: `basedOn` is reported as recorded.
-**`@objectstack/metadata-protocol`**: `listServedOverrides({ packageId })` on the protocol implementation, and the `ServedOverrideEntry` type.
20
+
-**`@objectstack/core`**: `listPackageMetadataActivations(engine, packageId)` reads one package's activation-ledger rows across types through the same read and row parse the per-type store uses; `ObjectStoreMetadataActivationStore.list()` now calls that shared read and answers exactly as before.
fix(cloud-connection)!: install-local reads the manifest of a compiled artifact as `os package install <file>` sends it, so the protocol handshake and the dependency check run on it (#28535)
6
+
7
+
Clause-②: no (narrowing) — `POST /api/v1/marketplace/install-local` refuses, with the 422 `OS_PROTOCOL_INCOMPATIBLE` (or `DEPENDENCY_MISSING`) the flat manifest already got, a compiled artifact sent with `id` and `version` lifted beside its nested `manifest`, whose `engines.protocol` excludes this runtime or whose `dependencies` this runtime does not satisfy. That body installed before. Nothing is widened.
8
+
Metadata-protocol: none
9
+
10
+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export or type changes: the install door's existing ADR-0087 handshake and ADR-0141 dependency check now read the keys of a compiled artifact the CLI sends, as they already read a flat manifest and a bare compiled artifact. The refusals are the existing shared answers, so there is nothing for a migration to rewrite. -->
11
+
12
+
**BREAKING** accept-set narrowing at `POST /api/v1/marketplace/install-local` (`@objectstack/cloud-connection`), reached by `os package install ./dist/objectstack.json`.
13
+
14
+
The door flattened a compiled artifact (`{ manifest: { … }, objects, … }`) only when the body had no top-level `id` or `name`. Every published CLI lifts `id` and `version` to the top beside the nested `manifest`, so that body was never flattened and the keys the install checks read at the manifest top level stayed one level down: an artifact built for another protocol installed with a "declares no engines.protocol range" warning, and an unmet dependency was never judged. The door now detects a compiled artifact by its nested `manifest` object alone, through the one flatten it already uses for the unmanaged import, so every sender's body is judged the same way. A compatible artifact installs as before, without the false warning.
fix(runtime)!: `POST /packages/:id/publish-drafts` refuses a body that is not a JSON object (an array, a string, a number, a boolean) with `400 VALIDATION_ERROR`, instead of publishing with the default note (#28541)
6
+
7
+
Clause-②: no (narrowing) — a present body that is not a JSON object, which the door answered `200` with the default note, is refused `400 VALIDATION_ERROR` before anything is published. Nothing is widened.
8
+
Metadata-protocol: none
9
+
10
+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export or type changes: the door now enforces the object body that PublishPackageDraftsRequestSchema already declares. Nothing was stored for the refused bodies (they carry no note or backfill), so there is nothing for a migration to rewrite. -->
11
+
12
+
**BREAKING** accept-set narrowing at the publish-drafts door (`@objectstack/runtime`).
13
+
14
+
A body with no members to read used to publish every pending draft with the sentence naming the package as the note, and the caller never learnt its body was ignored. The door now refuses it with `PublishPackageDraftsRequestSchema`'s own whole-body issue (`(body): Invalid input: expected object, received array`), in the same envelope as the non-string `message` refusal: nothing is published and no history row is written.
15
+
16
+
Unchanged: no body (an absent or empty body, or JSON `null`) still publishes with the default note; an object body answers exactly as before, so a string note publishes with it, a non-string `message` keeps its refusal, unknown keys such as the SDK's deprecated `actor` are still ignored, and a malformed `backfill` is still refused once, by the protocol, with the same answer.
17
+
18
+
This narrows the sentence "no body, or no `message`, publishes with the default note" in the pending `28452-publish-drafts-message-refused` changeset: a body that is present but not an object is refused from this release.
fix(mcp)!: an `aggregate_records` aggregation entry carries its `filter` to the engine and refuses an undeclared key by name (#28550)
6
+
7
+
Clause-②: yes (narrowing) — the aggregation entry now accepts `filter` (a widening of the tool's input), and refuses any other undeclared entry key, which it stripped and ignored before (a narrowing).
8
+
Metadata-protocol: none
9
+
10
+
<!-- adr-0087: not-required (no-migration-prescription) No schema key of the metadata protocol is added, removed or re-shaped, and no export or type changes: the MCP tool's input closes an entry it already documented, and the key it now accepts is the engine's own `AggregationNodeSchema.filter`. An undeclared key used to be dropped without effect, so there is nothing for a migration to rewrite; the refusal names the key and, for `where` / `filters` / `conditions` / `as`, the spelling to send. -->
11
+
12
+
**BREAKING** accept-set narrowing at the MCP `aggregate_records` tool (`@objectstack/mcp`), on both the HTTP and the stdio transport.
13
+
14
+
-**Before.** Each aggregation entry was a non-strict `{ function, field, alias }`. A per-aggregation `filter` was stripped before the engine was asked, so `{"function":"count","alias":"n","filter":{"status":"active"}}` beside an unfiltered count answered the total twice, while the REST query door answered the filtered count for the same body. Any other unknown entry key was dropped the same way, with no error.
15
+
-**Now.** The entry is built from the engine's `AggregationNodeSchema` members (`function`, `field`, `alias`, `filter`) and is closed. The `filter` is forwarded unchanged to `engine.aggregate`, the path REST uses, so both doors give one answer, including the security middleware's 403 `PERMISSION_DENIED` for a filter on a field the caller cannot read. An undeclared entry key (the retired `distinct` included) is refused by name before anything runs, as an undeclared top-level key already was.
16
+
-**Unchanged.** Entries without a filter answer as before; the REST query door is untouched.
17
+
-**Who sees it.** An MCP client that sent an extra key inside an aggregation entry: the call was answered with that key ignored, and it is now refused naming the key.
18
+
19
+
**The remedy.** Drop the key, or for a per-aggregation condition send it as the entry's `filter`.
const result =DiscardPackageDraftsResponseSchema.parse(data);
@@ -146,6 +146,70 @@ const result = DiscardPackageDraftsResponseSchema.parse(data);
146
146
|**writable**|`boolean`| ✅ | Whether the pair is a writable package — the verdict the package read doors serve as `writable`. A created pair is writable; an existing pair delivered by code or an installed artifact is not, and its items are authored where it is built. |
147
147
148
148
149
+
---
150
+
151
+
## GetPackageCustomizationsRequest
152
+
153
+
Per-package customization read request: the base package id, no query parameters.
154
+
155
+
### Properties
156
+
157
+
| Property | Type | Required | Description |
158
+
| :--- | :--- | :--- | :--- |
159
+
|**packageId**|`string`| ✅ | The installed BASE package whose customizations are read (e.g. "com.acme.crm"). A paired `<base>.custom` id is refused `400 VALIDATION_ERROR` with a message naming its base; an id no installed package carries answers `404`. |
160
+
161
+
162
+
---
163
+
164
+
## GetPackageCustomizationsResponse
165
+
166
+
Per-package customization read: overrides, extensions and switched-off items of one installed base.
167
+
168
+
### Properties
169
+
170
+
| Property | Type | Required | Description |
171
+
| :--- | :--- | :--- | :--- |
172
+
|**packageId**|`string`| ✅ | The base package the customizations are of (the request's id). |
173
+
|**overrides**|`{ type: string; name: string; member?: string; basedOn?: string; … }[]`| ✅ | Every ACTIVE item of the base's paired `<base>.custom` package that declares `overrides.package` = the base and that the effective read serves over the base's item of the same name: the rows the served-override predicate admits (a declaration from any other package, and an undeclared pair item, are not listed), minus the stored rows every read declines (a shipped flow name). Ordered by type, name and member. |
174
+
|**extensions**|`{ object: string; kind: Enum<'field' \| 'validation' \| 'index'>; name?: string; fields?: string[] }[]`| ✅ | Every field, validation rule and index the paired `<base>.custom` package declares in an object extension (`objectExtensions`) of an object the base owns, one entry per member, as the extension declares it. Ordered by object, kind and name. |
175
+
|**switchedOff**|`{ type: string; name: string }[]`| ✅ | Every activation-ledger row (`sys_metadata_activation`) that records the base as its package and `active: false`: the base's items this deployment switched off. Ordered by type and name. |
176
+
|**counts**|`{ overrides: integer; extensions: integer; switchedOff: integer }`| ✅ | Each list's length, derived from the lists in this same answer. |
|**type**|`string`| ✅ | Metadata type of the overriding item, canonical singular (e.g. `view`). |
183
+
|**name**|`string`| ✅ | Name of the item: the base's name it is served under. |
184
+
|**member**|`string`| optional | The bundle member, for a metadata type whose identity is a pair (`email_template`, identified by `(name, locale)`): its discriminator value. Absent for a type whose identity is its name alone. |
185
+
|**basedOn**|`string`| optional | The base package version the declaration records (`overrides.basedOn`), copied as stored and never judged. Absent when the stored body records none. |
186
+
|**version**|`integer`| optional | The overriding item's stored history version, when the row carries one. |
|**object**|`string`| ✅ | The base-owned object the member is added to. |
193
+
|**kind**|`Enum<'field' \| 'validation' \| 'index'>`| ✅ | Which collection of the object the member joins. |
194
+
|**name**|`string`| optional | The member's declared name: the field name, the validation rule name, the index name. Absent only for an index declared without a name. |
195
+
|**fields**|`string[]`| optional | For an index: the fields it covers. Absent for a field or a validation. |
0 commit comments