Skip to content

Commit cf77ecb

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-36908-remove-studio-home
2 parents 5c1e4f2 + 4ed453d commit cf77ecb

73 files changed

Lines changed: 2782 additions & 169 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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
'@objectstack/objectql': patch
4+
---
5+
6+
fix(units): a `unitField` re-pointed at a new field raises its blank-unit debt; the unit-code backfill names unused mapping entries and says what a capped walk did not judge
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
- A metadata save that re-points a stored `record`-mode quantity's `unitConfig.unitField` at a field that held no stored unit before the save (new in it, or unstored before it) is now answered 409 `DESTRUCTIVE_CHANGE` with `unit_mode_to_record` on the quantity: every stored row then holds its quantity beside a blank unit, and is refused at its next quantity edit until it holds a unit code. The finding names the `""` mapping entry of `os migrate unit-codes` that writes those blanks, reads no row, and is lifted by `force: true`. A re-point onto a stored text field still raises `unit_code_field_declared` alone, and a re-point onto a field that already was a unit code field still raises nothing.
12+
- `os migrate unit-codes` and `POST /api/v1/meta/_migrate-unit-codes`: a mapping entry whose key the rows store as a unit code, which is never rewritten, and that no row used is now named, as `unusedEntry` on that value in the report and as a line of the printed report.
13+
- When the walk stops at `maxRecords`, the printed report now says that the rows past the cap were not judged, so any of them may hold a value with no mapping entry, and that an apply run wrote the rows examined only, as the record-currency backfill's report does; an unscoped run also says its organization check saw only the rows examined. An apply run over such a walk still writes the rows it examined, as before.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol)!: an unmanaged install renamed into a `targetNamespace` refuses a stray-object package and a declared namespace its object names do not carry, instead of copying them under a second prefix
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
Ruling-ref: #36166 comment 7146137652
10+
11+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export changes shape. What moves is the answer the unmanaged install gives one request: a package body renamed into a `targetNamespace` whose object names contradict its namespace, declared or derived. No stored row, registry key or authored value changes, so there is nothing for a migration to rewrite and no tombstone. -->
12+
13+
**BREAKING** for a caller of the unmanaged install (`importUnmanagedPackage`, and `POST /api/v1/marketplace/install-local` with `installMode: 'unmanaged'`) that sends a `targetNamespace`. Two more package bodies are refused before the base exists, `400 INVALID_REQUEST` with one `details.refused` entry per object, and nothing is installed:
14+
15+
- **A package that declares no `namespace`, with a stray object.** The refusal for object names sharing one first word other than the namespace derived from the id now applies to every group of two or more such names, not only when every object shares it. `demoasset_asset`, `demoasset_site` and `site` used to copy into `trialdemoasset` as `trialdemoasset_demoasset_asset`, `trialdemoasset_demoasset_site` and `trialdemoasset_site`; now `demoasset_asset` and `demoasset_site` are refused, each entry naming the derived namespace and the shared prefix. Two objects sharing a short first word are refused with a stray as without one (`purchase_order`, `purchase_item` beside `vendor`). One object carrying the derived prefix still clears it.
16+
- **A package that declares a `namespace` its object names do not carry.** Each object the package's own prefix rule refuses (the rule `defineStack` and the save door already hold every authored package to) is refused, naming the declared namespace. `namespace: 'other'` with `demoasset_asset` used to copy as `trialdemoasset_demoasset_asset`, and a package declaring `crm` with an object named `ticket` copied it as `trialdemoasset_ticket`; both are refused now. Without a `targetNamespace` the save door already refused both (`422 NAMESPACE_PREFIX`).
17+
18+
Unchanged: a single object with no namespace declared keeps the rename, foreign prefix or not (`demoasset_asset` alone copies as `trialdemoasset_demoasset_asset`), because one name cannot tell a two-word short name from a foreign prefix. So do object names that share no first word (`purchase_order` beside `asset_owner`), and a declared namespace the names carry.
19+
20+
The fix is in the package: declare `namespace` on it and name every object under that namespace, then install again.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/components': patch
3+
---
4+
5+
fix(components)!: `NavigationOverlay` drops its `comments` prop, which no caller fills
6+
7+
Clause-②: yes (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/components#NavigationOverlayProps.comments) the retired operand is a prop of the drawer component in a published ui package entry; no packages/spec schema, no registered node type, no ADR-0087 conversion surface and no stored shape names it, so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**BREAKING** for a host that passed `NavigationOverlay` its `comments` prop.
13+
14+
The record drawer took a comments switch and handed it to its top bar, ahead of the record's button group. Since the console stopped offering comments in the drawer, nothing passes it: a record's comments live on its full page, whose own bar draws the switch. The prop is removed so the drawer no longer advertises a slot no caller fills. `RecordTopBar` keeps its own `comments` slot: the record page fills it on the desktop and on a phone.
15+
16+
What leaves, and what to write instead:
17+
18+
- FROM `NavigationOverlayProps.comments` TO nothing, in the components package: the drawer's bar draws no comments switch. Fix: delete `comments` from the `NavigationOverlay` call; to show a record's comments, open its full page (the drawer's ⤢), where the bar draws the switch.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/types': patch
3+
'@object-ui/data-objectstack': patch
4+
'@object-ui/plugin-kanban': patch
5+
---
6+
7+
fix(ui): a grouped read the server cut says so, and a kanban board draws no lane figure over it
8+
9+
Clause-②: yes (widening) — `@object-ui/types` exports the new type `ListViewGroupHeaderAnswer` (the header rows array plus an optional `hasMore`), and `DataSource.queryGroupHeaders` answers it in place of `ListViewGroupHeaderRow[]`; a source that returns a plain array still satisfies the member, and a caller that reads the answer as an array reads it unchanged; nothing removed or renamed
10+
Metadata-protocol: none
11+
12+
On a deployment that sets a default page size (`OS_DATA_DEFAULT_PAGE_SIZE` or `OS_DATA_MAX_PAGE_SIZE`), `POST /data/:object/query` cuts a grouped read with no `limit` to that page size and answers `hasMore: true`. `ObjectStackAdapter.queryGroupHeaders` used to return the header rows alone, so a caller could not tell a cut answer from a whole one. It now sets `hasMore: true` on the answer it returns when the server says groups were dropped; a whole answer carries no `hasMore`.
13+
14+
The kanban lane statistic (`kanban.summary` of type `sum`, `avg`, `min` or `max`) reads that flag: over a cut answer it draws no figure for any lane. Before, the trailing "Uncategorized" lane could total only the groups the answer carried, and on a board of one query a lane whose group was dropped could draw "Sum 0". A whole answer draws every lane's figure as before.
15+
16+
The grouped grid and the currency-code read keep reading the answer as the same array.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/service-knowledge': patch
4+
'@objectstack/knowledge-memory': patch
5+
---
6+
7+
feat(service-knowledge): knowledge documents carry their organization, and a search hands the adapter the caller's organizations so it ranks only their documents
8+
9+
Clause-②: yes
10+
Metadata-protocol: added
11+
Skills-docs: none — no skill under `skills/**` teaches `KnowledgeDocument`, `AdapterSearchOptions` or the adapter contract suite; `skills/objectstack-ai/SKILL.md` teaches `KnowledgeSource` authoring only, which this change does not touch. `content/docs/protocol/knowledge.mdx` gains the members and an "Organization scope" section in this change.
12+
13+
In a deployment with more than one organization, a knowledge search now ranks only the documents of the caller's organizations, so another organization's documents no longer take the top places. Which hits the caller gets back is still decided by re-reading each record as the caller, as before.
14+
15+
New, both optional, in `@objectstack/spec`:
16+
17+
- `KnowledgeDocument.organizationId?`: the organization of the record a document was built from. The knowledge service sets it from the record's `organization_id` under the `group` and `isolated` tenancy postures. It is absent under `single`, for `file` and `http` sources, and for a record with no organization. `indexDocument` refuses a document that already carries one (it throws, naming the field).
18+
- `AdapterSearchOptions.organizationIds?`: the caller's organizations. The knowledge service computes it from the caller's execution context and the deployment's tenancy posture: under `isolated` the active organization, under `group` every organization the caller is a member of. It is absent (no filter) under `single`, for the system identity, for `file` and `http` sources, and for an object outside the tenancy wall. `[]` means the caller has no organization behind a wall and must match nothing; it never means "no filter". An adapter that reads it ranks only the documents whose `organizationId` is in the set and filters before it ranks; a document with no `organizationId` is not ranked.
19+
20+
`docHash` now covers `organizationId` when a document has one. A document without one hashes exactly as before, so nothing changes under `single`.
21+
22+
`KnowledgeService` reads the deployment's effective tenancy posture from the kernel's `tenancy` service (`KnowledgeServicePlugin` wires it; new option `resolveTenancyPosture`). If the posture cannot be read, a search does not search any `object` source for that call and logs an error, and a reindex stops before writing and returns `ok: false` with the reason. `recordToDocument` takes the posture as an optional fifth argument. The `search_knowledge` tool refuses an `organizationIds` argument: the organizations are never taken from the caller.
23+
24+
`@objectstack/knowledge-memory` stores `organizationId` and filters by `organizationIds` before ranking. `runKnowledgeAdapterContract` (from `@objectstack/service-knowledge/testing`) now requires `implements.organizationIds`. It adds organization-filter cases for the adapter alone, and cases run through a real `KnowledgeService` under `isolated`, `group` and `single`.
25+
26+
What to do: under a `group` or `isolated` posture, run a complete reindex of each `object` source (`reindexSource` with no `limit`). Documents indexed before this change carry no organization, and a filtered search does not rank them until that reindex writes them again; their hash changes, so the reindex does not skip them. An adapter package reads `organizationIds` in its search, stores `organizationId` as given, and passes `implements: { listDocuments, organizationIds }` to the contract suite.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
---
4+
5+
fix(plugin-detail): a related table in the record preview drawer draws instead of failing with "Maximum update depth exceeded"
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A record's related table drawn in the details of the record preview drawer (for example an opportunity's line items) could fail with `Component "data-table" failed to render` and React error #185, while the record's full page drew the same table. The table leaves out the columns that do not fit whole in its column, and re-reads that choice when it changes. The re-read measured the table still drawn for the previous choice, because the table adopts a new set of columns a render later. In the drawer's narrow details column that read changed its answer on every render: one column, then two, then one again. The read now skips the table while it still draws the columns it was handed before, and reads again when the table draws the new ones. A column the reader hid from the table's header menu does not stop the read, so a later narrowing still leaves columns out and shows the overflow cue. A table wide enough for every column, as on the full page, is unchanged.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/mcp': patch
3+
'@objectstack/runtime': patch
4+
'@objectstack/service-record-context': patch
5+
---
6+
7+
fix(mcp,runtime): `get_record_context` reads a package's context packs on both MCP doors
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
A deployment serving context packs (`aiContexts`) answered every `get_record_context` call with `RESOURCE_NOT_FOUND` ("No context pack named … reads object …"), on the HTTP `/mcp` route and on stdio alike. Both doors read the packs from the protocol's served `ai_context` listing, which carries the read path's `_diagnostics` on every item; the record-context executor parses each pack with the closed `AiContextSchema`, so it dropped every one as an unrecognized key.
13+
14+
Both doors now hand the executor the authored packs: the listing passes through `stripReadDecorations` (`@objectstack/spec/kernel`), which removes exactly the read decorations (`METADATA_READ_DECORATIONS`) and keeps the ADR-0010 protection envelope (`_packageId`, `_provenance`, `_lock`, …) the schema declares. The executor's parse is unchanged. Nothing to do on upgrade.
15+
16+
For anyone implementing a `RecordContextDoor`: `listContextPacks` hands over the authored packs with the read decorations removed (`stripReadDecorations`), or the executor drops them.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@object-ui/fields': patch
3+
---
4+
5+
fix(fields): the required-fields fill-in dialog hands its controls the record the change would leave
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: none
9+
10+
A change made in place (a stage move on the record page, a list cell, an inline edit, a kanban drop) can make another field required. The fill-in dialog then asks for that field. The dialog handed its controls no record, so every control that reads the record judged it on an empty one. Any option `visibleWhen` that read a record field was judged without that field. A condition guarded by `has(record.x)` was false, so the option was hidden. A condition without that guard could not be evaluated, and the option was offered whatever the condition said. A choice field whose options were all hidden showed "No options available", and the change could not be saved. Example: each loss reason is shown only while the stage is "closed lost", so moving an opportunity to "closed lost" asked for a loss reason and offered none. Every option list gated by `dependsOn`, and every dependent lookup, stayed on its "select the parent first" gate.
11+
12+
The dialog now hands every control the record as the write would leave it: the saved record, with the change and the values typed into the dialog so far applied on top. What reads that record now resolves on it:
13+
14+
- option visibility;
15+
- `dependsOn` gates on option lists and lookups;
16+
- dependent-lookup filters;
17+
- the currency of a money field that takes its currency from the record or from a parent record.
18+
19+
Each option is now shown or hidden by its condition on the record the write would leave. If the condition is true on that record, the option is shown. If it is false, the option is hidden. This includes an option the dialog used to offer only because its condition could not be evaluated on an empty record. For example, an unguarded `record.stage == "closed_lost"` used to be offered whatever the stage. It is now hidden when the stage stays "negotiation". So in an app whose option conditions do not guard with `has()`, the dialog can offer fewer options than before. A condition that still cannot be evaluated on that record is still offered, for example one that names a field the record does not carry. An option that depends on another value typed into the dialog appears once that value is typed. Which fields the dialog asks for was already decided on this record and does not change.
20+
21+
Widening: the exported `RequiredWhenPromptField` type gains one optional member, `record?: Record<string, unknown>`. That is the record the field was judged against. `collectRequiredWhenPromptFields` sets it on every field it returns, and `RequiredFieldsDialogField` inherits it. The dialog passes it, with the typed values, to every control as `dependentValues`. A row a host builds itself (a field a refusal names) carries no `record`. It reads the record of another field shown in the dialog. When no shown field carries one, it reads only the typed values.
22+
23+
No metadata key, value or default changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
feat(scenarios): a scenario card may name the roll-ups a persona is meant to read over rows it withholds
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A persona on a scenario card may now carry `allowedRollups` (`[{ "object": "invoice", "field": "amount_paid" }]`, in the card's bare names). The runner's Build charge for `security-rollup-source-unreadable` does not charge a finding the build acknowledged (`rollupSourceUnreadableReason` on the persona's set) on one of those roll-ups; an unacknowledged finding on it, and every other roll-up over withheld data, is still charged. The schema refuses an allowed roll-up the persona's own `hidden` names. The `order_to_cash` card uses it: a sales rep sees their invoices' amount paid, balance and status, never the payment rows.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/service-print': patch
4+
---
5+
6+
Clause-②: no
7+
Metadata-protocol: none
8+
9+
The print door (`POST /api/v1/print/records`) now answers its own 5xx sentences in the request's language. A print that fails on the server because the print engine is not ready (`503`), ran past its time (`504`), failed for any other reason (`500`), or could not resolve its caller (`500`) used to answer a fixed English `error.message` whatever the request's `Accept-Language`, so a Chinese console showed the toast in English. The sentences are now four keys of the platform's operation-message catalog (`print_engine_unavailable`, `print_timed_out`, `print_failed`, `print_caller_unresolved` in `BUILTIN_OPERATION_MESSAGES`, `@objectstack/spec/system`) in `en`, `zh-CN`, `ja-JP` and `es-ES`, written through `operationUserMessage` (`@objectstack/core`) in the request's top `Accept-Language` tag. A print clicked as a `type: 'api'` action answers the same way: the `/actions` door forwards the caller's `Accept-Language` and relays the door's `message` as written.
10+
11+
Code, status and the English text do not change: a request in English, with no `Accept-Language`, or in a language the catalog carries no text for, reads the same sentence as before. What the engine or the host said is still withheld from the wire and kept in the server fault log.

0 commit comments

Comments
 (0)