Skip to content

Commit 951e328

Browse files
committed
Merge origin/main into claude/project-thread-sdqbrt
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5pRVPsxnFxPBAQLUMh
2 parents c3369fd + de3fafc commit 951e328

80 files changed

Lines changed: 3130 additions & 187 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
---
4+
5+
fix(service-automation): a borrowed token refused at `mcp` tool discovery marks its connection, not the client secret
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
An `mcp` instance with an `oauth2` `authorization_code` grant lists its tools with the token of its discovery organization's connection (ruled B on #26702). A discovery refusal of that connection-borrowed token is now attributed to the connection, not to the instance's client secret:
11+
12+
- that organization's connection is marked `reconnect_required`, with a platform sentence naming the refusal (served as `statusReason` by the connection door and as the held instance's reason);
13+
- the client secret its `credentialRef` names is left as it is (it was marked `rejected`, which setting it again was the only way to clear);
14+
- the instance lists as the next connected organization, or is held "reconnect required" until a reconnect, and a reconnect by that organization lists again (before, the instance stayed held until a declaration edit or a restart).
15+
16+
A reconnect that landed while the refused token was listing keeps its fresh grant: the connection is marked only while it is still the connect whose token was sent, and otherwise the instance retries on the backoff. Static credentials (`bearer`, `api-key`, `basic`) and tokens an instance mints itself (`client_credentials`, `app-credential`) keep the client secret's attribution, unchanged.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/runtime': minor
4+
'@objectstack/client': minor
5+
'@objectstack/metadata-protocol': minor
6+
'@objectstack/core': patch
7+
---
8+
9+
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.
18+
- **`@objectstack/client`**: `client.packages.customizations(id)`.
19+
- **`@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.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/cloud-connection': patch
3+
---
4+
5+
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.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
'@objectstack/platform-objects': patch
4+
---
5+
6+
fix(plugin-auth, platform-objects): resending an expired invitation replaces it, leaving one pending invitation for the person
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
- **`@objectstack/plugin-auth`**: when `POST /organization/invite-member` issues an invitation, the person's other pending invitations in that organization whose expiry has passed are now marked `expired`. A resend on an invitation that has already expired issues a new invitation, as before, and the expired one now moves to the Expired / Canceled list instead of staying in Pending beside the new one. A plain invite to an address whose earlier invitation expired does the same. A resend on an invitation that has not expired still renews that invitation (same id). A refused call changes nothing.
12+
- **`@objectstack/platform-objects`**: the Resend Invitation confirmation on `sys_invitation` now reads "Resend the invitation to {{ record.email }}? The expiry date starts over, and an invitation that has already expired is replaced by a new one.", which is true for both rows the action is offered on. The zh-CN, ja-JP and es-ES translations say the same.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/service-datasource': patch
3+
---
4+
5+
fix(service-datasource)!: `POST /api/v1/datasources` and `PATCH /api/v1/datasources/:name` refuse a top-level `password` or `connectionString` by name, with the build door's prescription, instead of dropping it and answering success
6+
7+
Clause-②: no (narrowing) — a create or edit body that carries `password` or `connectionString` at its top level, which answered 201 / 200 with the key silently dropped, is refused with `400 DATASOURCE_ADMIN_ERROR`. 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 admin write doors now refuse two top-level keys that `DatasourceSchema` already refuses at the build door, with that schema's own message. A refused body was never stored (the key was dropped), so there is nothing at rest for a migration to rewrite and no tombstone. -->
11+
12+
**BREAKING** accept-set narrowing at the datasource admin write doors (`@objectstack/service-datasource`).
13+
14+
- **Before.** The doors built the stored record from its known keys only, so a `password` or a `connectionString` written at the top level of the body vanished and the write answered success. The author got a datasource that could not connect and no explanation, while `os compile` refused the same datasource by name.
15+
- **Now.** Either key at the top level of a create or edit body is refused before anything is read or written, naming the key and never its value. The message is `DatasourceSchema`'s own refusal for that key, the one `os compile` prints: a `password` is bound through the connection form's secret field or `external.credentialsRef`; a `connectionString` belongs in `config` as `url`. An edit is refused even when it touches only `label` or `active`.
16+
- **Unchanged.** A credential sent as `secret` is still stored in the secret store and bound at `external.credentialsRef`. `config.password` keeps the driver contract's refusal. Other unknown top-level keys are still dropped as before.
17+
18+
**The remedy.** Send the credential as `secret` (the connection form's secret field), or move a connection string into `config.url` without userinfo.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/mcp': patch
3+
---
4+
5+
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`.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/plugin-grid': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
fix(plugin-grid): over the 5000-record cap, the "select all matching" bulk bar says that only the first 5000 matching records will be processed
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
A grid's "select all matching" bulk action hands the action at most 5000 records, but the bulk bar counted the whole match set. With 7200 matches it read "All 7200 matching records are selected.", and a bulk delete then processed the first 5000 and said nothing about the rest.
12+
13+
- **Over the cap, the bar names it.** When the match set is larger than 5000, the select-all button reads "Select the first 5000 of 7200 matching", the banner reads "Only the first 5000 of 7200 matching records will be processed.", and the selection count, in the bar and in the selection's context menu, reads "5000 selected (of 7200 matches)".
14+
- **At or under the cap, nothing changes.** The bar keeps today's text.
15+
- **One number.** The fan-out and every one of those strings read one constant in `@object-ui/plugin-grid`, so the screen and the action cannot disagree.
16+
- **New strings.** `@object-ui/i18n` gains `grid.bulkSelectAllMatchingCapped`, `grid.bulkAllMatchingSelectedCapped` and `grid.bulkSelectedAllMatchesCapped` in all ten built-in packs. They interpolate `cap` and `total`.

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

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ authored after that retirement per the ruling's sequencing (3A).
5050
## TypeScript Usage
5151

5252
```typescript
53-
import { DiscardPackageDraftsResponseSchema, DuplicatePackageResponseSchema, EnsureCustomizationPackageRequestSchema, EnsureCustomizationPackageResponseSchema, ImportUnmanagedPackageRequestSchema, ImportUnmanagedPackageResponseSchema, ListPackageCommitsResponseSchema, PackageExportManifestSchema, PackagePublishResultSchema, ReassignOrphanedMetadataResponseSchema, RevertPackageCommitResponseSchema, RollbackToPackageCommitResponseSchema } from '@objectstack/spec/api';
54-
import type { DiscardPackageDraftsResponse, DuplicatePackageResponse, EnsureCustomizationPackageRequest, EnsureCustomizationPackageResponse, ImportUnmanagedPackageRequest, ImportUnmanagedPackageResponse, ListPackageCommitsResponse, PackageExportManifest, PackagePublishResult, ReassignOrphanedMetadataResponse, RevertPackageCommitResponse, RollbackToPackageCommitResponse } from '@objectstack/spec/api';
53+
import { DiscardPackageDraftsResponseSchema, DuplicatePackageResponseSchema, EnsureCustomizationPackageRequestSchema, EnsureCustomizationPackageResponseSchema, GetPackageCustomizationsRequestSchema, GetPackageCustomizationsResponseSchema, ImportUnmanagedPackageRequestSchema, ImportUnmanagedPackageResponseSchema, ListPackageCommitsResponseSchema, PackageExportManifestSchema, PackagePublishResultSchema, ReassignOrphanedMetadataResponseSchema, RevertPackageCommitResponseSchema, RollbackToPackageCommitResponseSchema } from '@objectstack/spec/api';
54+
import type { DiscardPackageDraftsResponse, DuplicatePackageResponse, EnsureCustomizationPackageRequest, EnsureCustomizationPackageResponse, GetPackageCustomizationsRequest, GetPackageCustomizationsResponse, ImportUnmanagedPackageRequest, ImportUnmanagedPackageResponse, ListPackageCommitsResponse, PackageExportManifest, PackagePublishResult, ReassignOrphanedMetadataResponse, RevertPackageCommitResponse, RollbackToPackageCommitResponse } from '@objectstack/spec/api';
5555

5656
// Validate data
5757
const result = DiscardPackageDraftsResponseSchema.parse(data);
@@ -146,6 +146,70 @@ const result = DiscardPackageDraftsResponseSchema.parse(data);
146146
| **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. |
147147

148148

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. |
177+
178+
### Nested Shape: `GetPackageCustomizationsResponse.overrides[number]`
179+
180+
| Property | Type | Required | Description |
181+
| :--- | :--- | :--- | :--- |
182+
| **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. |
187+
188+
### Nested Shape: `GetPackageCustomizationsResponse.extensions[number]`
189+
190+
| Property | Type | Required | Description |
191+
| :--- | :--- | :--- | :--- |
192+
| **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. |
196+
197+
### Nested Shape: `GetPackageCustomizationsResponse.switchedOff[number]`
198+
199+
| Property | Type | Required | Description |
200+
| :--- | :--- | :--- | :--- |
201+
| **type** | `string` | ✅ | The ledger row's metadata type (`flow`, `action`, `position`, …). |
202+
| **name** | `string` | ✅ | The switched-off item's name. |
203+
204+
### Nested Shape: `GetPackageCustomizationsResponse.counts`
205+
206+
| Property | Type | Required | Description |
207+
| :--- | :--- | :--- | :--- |
208+
| **overrides** | `integer` | ✅ | `overrides.length`. |
209+
| **extensions** | `integer` | ✅ | `extensions.length`: members, not objects. |
210+
| **switchedOff** | `integer` | ✅ | `switchedOff.length`. |
211+
212+
149213
---
150214

151215
## ImportUnmanagedPackageRequest

0 commit comments

Comments
 (0)