Skip to content

Commit 8c1ef9f

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-h1rua8
# Conflicts: # packages/plugins/plugin-security/src/delegated-admin-own-name-set.posture.test.ts
2 parents c2516ef + b126c13 commit 8c1ef9f

159 files changed

Lines changed: 15155 additions & 568 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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/platform-objects': patch
3+
---
4+
5+
i18n(platform-objects): the platform objects, Setup, Studio and Account ship in Korean
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`@objectstack/platform-objects` now carries `ko` beside `en`, `zh-CN`, `ja-JP`, `es-ES`, `zh-Hant`, `ar`, `fr`, `pt-BR`, `ru` and `de`: every `sys_*` object (labels, fields, help, options, views, actions and their dialogs), the metadata-type configuration forms Studio opens, the Setup, Studio and Account navigation, the System Overview dashboard and its datasets, the platform pages' titles, and the inline copy on the user and organization record pages. A user whose locale is `ko` no longer reads English `sys_*` labels in the console. The new bundles pass through the same source-hash fallback as the existing ones, and every hand-authored leaf records the digest of the source it was translated from. The extract config documents `ko` in its `--locales`, so `check:i18n` now gates the new bundles. Package 11 of #30512, the last of its seven locales.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): more of objectstack-data's self-contained examples are type-checked by `check:skill-examples`, and the `Field.*` factory example imports from the subpath that exports it
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Fourteen more fenced TypeScript blocks in `skills/objectstack-data` carry the opt-in check marker, so 25 of its 95 are now compiled against the spec: 8 of 10 in `rules/indexing.md` (index lists typed as `ObjectIndex[]` from `@objectstack/spec/data`), 4 more in `references/data-hooks.md` (the full `defineHook` definition and three pattern hooks, which gain their `defineHook` import), and one each in `rules/lifecycle.md` and `rules/field-types.md`. One example was wrong: `rules/field-types.md` imported `Field` from `@objectstack/spec`, which does not export it (the spec root has no namespace exports); it now imports from `@objectstack/spec/data`, and the prose no longer names the root. The ✅ script example in `rules/validation.md` gains the `name` every validation rule requires. The rest stay unmarked: fragments, shapes, ❌ examples, and the blocks whose file had no token headroom left to pay for a wrapper. No rule's teaching changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/driver-sql': patch
3+
---
4+
5+
fix(driver-sql): an Oracle `RAW(16)` uuid column (a `SYS_GUID()` key, or a lookup over one) is now filtered and written by the uuid text it reads back as
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: none
9+
10+
The driver already read a `RAW(16)` column as a lowercase hyphenated uuid, but it bound that same text back as a string, which Oracle refuses against `RAW`. So a lookup keyed by a `SYS_GUID()` column displayed correctly and could not be filtered, written, updated or deleted by its value.
11+
12+
The driver now reads, once per federated object, which of its remote columns are `RAW(16)` (`ALL_TAB_COLUMNS`), and binds a comparand, a written value or a by-id key for those columns as `HEXTORAW(?)` over the uuid's 32 hex digits. The column type decides, never the value: a `VARCHAR2` column holding uuids is bound as text, as before. Uuid text is accepted dashed (the read form) or as the 32 digits undashed, in either case. Anything else is refused before the statement is sent: a filter comparand with `INVALID_FILTER` / 400, a written value with `VALIDATION_ERROR` / 400. A failed catalog read changes nothing: values are bound as before and the next read asks again. Other dialects are unchanged.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the objectstack-ui actions rule teaches that a param's `helpText`, like `description`, takes a sentence or an inline locale map, and that the map is how a page button's inline `action` writes its hint per locale
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The skill taught a param's `helpText` as a sentence only, so an agent writing a page button's inline `action`, which no translation bundle reaches, left its hint in one language. `{{ record.* }}` holes work in either form, as `content/docs/protocol/objectui/actions.mdx` and the action param schema say.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/objectql': patch
3+
'@objectstack/metadata-protocol': patch
4+
---
5+
6+
feat(objectql, metadata-protocol): one package-scoped resolver for behavioural metadata, and one declared dependency closure for it and the save door (ADR-0150 D3/D4)
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
- **`@objectstack/objectql`** exports `resolvePackageScopedName`, the resolution rule of ADR-0150 D3 for the metadata types addressed by `(package, name)` (`PACKAGE_SCOPED_TYPES`). A caller of package P is answered P's own item, else the unique holder in P's declared dependency closure plus the `sys` packages, else a refusal that names every candidate; a caller with no package is answered the environment's own item, else the unique package holder, else the refusal. Zero holders is `not-found`. The platform-requested name `guest_portal` resolves environment-wide whatever the caller. `SchemaRegistry` gains three read-only methods the resolver reads, `packageScopedHoldersOf`, `getPackageScopedItem` and `getEnvironmentScopedItem`, which apply the per-package overlay slot (ADR-0150 D4): a stored overlay binds to the package whose item it customizes, so it never shadows another package's same-named item there.
12+
- **`@objectstack/metadata-protocol`** exports `packageDependencyClosure`, a package's declared dependency closure (its manifest's `dependencies`, transitively, with an App's customization pair widened by the App's members). The save door's write scope now calls it, so the closure a write is judged against and the closure a name resolves in are one implementation.
13+
14+
Nothing changes for a running deployment: no reader calls the resolver yet, `getItem` keeps serving the bare slot first to every caller, the one-holder refusal of ADR-0048 §3.4 stays in force, and the save door admits and refuses exactly what it did.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/lint': minor
4+
---
5+
6+
feat(spec): a dataset dimension and measure carry business vocabulary (`synonyms`, `description`), and the `list_datasets` / `query_dataset` tool inputs and outputs are declared in spec (ADR-0149 D1, D2)
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: added
10+
Skills-docs: follow-up owed — skills dataset authoring page
11+
12+
- **`@objectstack/spec`: member vocabulary (ADR-0149 D1).** `DatasetDimensionSchema` and `DatasetMeasureSchema` accept two optional keys. `synonyms` is a list of the words a person uses for the member in a question (`['收入', '销售额', 'revenue']`): each trimmed and non-empty, at most 60 characters, at most 20 per member. It is matched, never rendered, so it is not translated. `description` is the member's business definition in plain language, a string or an inline locale map of at most 500 characters per locale; it is never a prompt to an AI (M1, ruled A). Authors who write `synonym`, `aliases`, `keywords`, `terms`, `alternateNames` or `alias` are pointed at `synonyms`, and `aiDescription`, `aiContext`, `hint`, `help` or `tooltip` at `description`.
13+
- **Within one dataset a word answers to one member.** `DatasetSchema` refuses a synonym that equals another member's name, another member's label (any locale of an inline map) or another member's synonym, and a synonym listed twice on one member. Words are compared after `normalizeDatasetTerm` (NFKC, lower case, `_` and `-` read as a space, whitespace collapsed), which is exported so the dataset tools' term matcher uses the same rule. A synonym equal to its own member's name or label is accepted as written. The same word may answer to different members in different datasets. The refusal names both members and the word.
14+
- **Translations.** The `datasets` translation group accepts `datasets.<name>.{dimensions,measures}.<member>.description`, and `translateDataset` overlays it the way it overlays `label`. A member `description` in a bundle used to be refused with a pointer to the dataset's own description; that guidance and its message are retired. `synonyms` in a bundle is refused with the reason: one authored list holds the words of every language.
15+
- **Dataset AI tool schemas (ADR-0149 D2).** A new `ai/dataset-tools.zod.ts`, exported from `@objectstack/spec/ai`, declares the inputs and outputs of `list_datasets` and `query_dataset`: the catalogue entry with its dimensions, measures, vocabulary, `membersWithheld` and term `matches`; the `partial` / `warning` shape of a degraded catalogue; `query_dataset`'s input, whose `selection` is `DatasetSelectionSchema` itself; and its output, the dataset answer's members taken by reference without `sql`, plus `provenance` (the dataset and the measures and dimensions used, and the caller's `runtimeFilter` echoed as sent, never the dataset's own `filter`), `rowCount`, `truncated` and the delegation narrowing. `getDatasetToolJsonSchemas()` projects them to the JSON Schema an `AIToolDefinition` carries. No executor ships here: the catalogue, the term matcher, the compiler write and the tool registration are cards #31589 and #31590. The four new member keys are recorded `planned` in the liveness ledger with #31589 as their reader.
16+
- **`@objectstack/lint`:** the i18n walk emits `datasets.<name>.{dimensions,measures}.<member>.description`, so `os i18n extract` scaffolds a member's description and `check:i18n-coverage` measures it. It emits nothing for `synonyms`.
17+
18+
Every dataset and translation bundle that parsed before parses to the same value.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/formula': patch
3+
'@objectstack/objectql': patch
4+
---
5+
6+
feat(formula): `@objectstack/formula` publishes the home-amount conversion arithmetic, `toScaledDecimal`, `divideToPlaces`, `formatScaledDecimal`, `documentDateOf` and the `ScaledDecimal` type
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
The four functions the write-time home projection (ADR-0144 D5) converts a record amount with: exact decimal reading, the one division by the rate rounded half away from zero to the decimals you pass (the home currency's `CURRENCY_FRACTION_DIGITS`, still in `@objectstack/spec`), the canonical decimal spelling, and the calendar day a document date names in the organization's timezone (UTC when unset). They move unchanged out of `@objectstack/objectql`, which now imports them back and still re-exports them from its projection module, so a form can preview "≈ home amount" with the engine's own arithmetic instead of a second copy. Stored home amounts, rates and refusals do not change.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
fix(app-shell): Installed Apps shows the engine's reason for an app whose register it refused at boot
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Since `@objectstack/cloud-connection` lists a ledgered install whose register the engine refuses at boot as `notLoaded: { code, message }`, the install-local marker is a closed union of two arms: the protocol arm `{ code: 'OS_PROTOCOL_INCOMPATIBLE', requiredRange }` and the register-refusal arm `{ code, message }`, where `message` is the engine's own sentence. The console typed the marker as the protocol arm only and never read `message`, so a register-refused app read "Not loaded" with its code and no reason. `LocalInstallNotLoaded` now mirrors the two arms, and one reader, `MarketplaceNotLoadedReason`, draws the reason on both the Setup → Packages row and the package page header. The protocol arm reads exactly as before. The register-refusal arm reads the existing "did not load this package (CODE)" sentence followed by the engine's sentence, so the operator can tell whether to uninstall the app or fix the package. The engine's sentence is drawn as text, never as markup. A marker with no sentence, or an empty one, reads with the code alone, as before. No language pack changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol): the customizations read lists a moved edit under the package that serves it
6+
7+
Clause-②: no — what the customizations list holds for a moved edit; no accept set changes
8+
Metadata-protocol: none
9+
10+
When a later version of an App moves an item from one of its packages to another (an ADR-0130 D4 suite split, or its rollback), the tenant's edit of the item is served at the package that ships it now. `GET /packages/:id/customizations` (`listServedOverrides`) now lists that edit there too, and only there.
11+
12+
- **Before.** The list took a pair override's package from its declaration, the owner at the time of the edit. After a flat → composed split the edit was listed under the App, which no longer ships the item, and not under the module that serves it; after a rollback it was listed under neither.
13+
- **Now.** The list picks each item's row through the served reads' own candidates and predicates (`servedOverlayRowCandidates`, `holdsServedOverlayCandidate`, `isMovedOverrideRowOf`), so a package lists exactly the pair override its address serves. Same App is read only from the install record (`appOf` over the installed manifests), never from an id prefix; a row of another App's pair, or a declaration naming another App, is never listed.
14+
- **Unchanged.** An edit whose owner still ships the item is listed as before. The list stays the pair's rows: a row bound to a package of the App itself (saved before ADR-0146 D11) is listed under no package, before or after a move. The upgrade plan's override advice reads this list, so it follows the same rule. The item lock already reads every stored row of the item whichever package it is bound to, so it answers for a moved edit what it answers for an edit saved at the new owner; that is pinned, not changed.
15+
- **Nothing is written.** The read moves and rewrites no row.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/plugin-security': patch
3+
---
4+
5+
fix(plugin-security)!: a delegate can neither capture nor evict a direct grant beyond its scope
6+
7+
Clause-②: no (narrowing) — an edit that points a direct permission-set grant at another user is judged on both holders it touches, the user it takes the grant from and the user it gives the grant to, and an edit that re-names a stored grant's set is judged on the set it takes away as well as the set it grants, so a delegated administrator no longer moves a grant away from a holder outside its subtree or from a holder it cannot read, nor re-names a stored grant of a set outside its allowlist. Nothing is widened: no export, error code or status is added.
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 of the package entry changes: a direct grant keeps its shape and meaning, each holder an edit touches is judged as a target user already is, and the set an edit takes away is judged as the removal of that grant already judges it. There is nothing for a migration to rewrite and no tombstone. -->
11+
12+
**BREAKING** accept-set narrowing in the delegated-administration gate (`@objectstack/plugin-security`), only for a delegated administrator editing a stored direct grant's holder or set.
13+
14+
- **Rule.** A delegate can neither capture nor evict a direct grant beyond its scope (ADR-0090 D12). A delegated write on a direct permission-set grant is judged on every holder and every set it touches. An edit that points a stored grant at another user is judged on the holder it takes the grant from and on the holder it gives the grant to, each exactly as the gate judges a target user — through the caller's own read, and inside the subtree only through one of the subtree's business units. An edit that re-names a stored grant's permission set is judged on the set it takes away exactly as the removal of that grant judges it — the allowlist, the security catalog and strict containment — beside the set it re-names the grant to, judged as before.
15+
- **What a caller sees.** An edit with either holder outside the subtree, or a holder the caller cannot read, answers `403 DELEGATION_SCOPE_VIOLATION`, with the sentence and details of every target outside the subtree, whichever end it is. A re-name away from a set outside the allowlist answers the refusal the removal of that grant answers — `403 DELEGATION_SCOPE_VIOLATION`, "permission set '…' is not in the scope's allowlist", with that set in its details — and a re-name away from a set whose removal is refused on any other ground gets that refusal. The stored holder and the stored set are named only when the caller reads them. A stored grant that names no holder is moved only by a tenant-level administrator (`403 PERMISSION_DENIED`).
16+
- **Unchanged.** The judgment of the set an edit points a grant at; an edit that keeps both the holder and the set, an insert and a removal; a tenant-level administrator's writes; an organization administrator's writes, whose right creates and removes a grant and never edits one in place.
17+
- **Who moves.** A delegate can no longer move a direct grant away from a holder outside its subtree, nor re-name a stored grant of a set outside its allowlist. A holder it cannot read counts as outside its subtree, and a grant it could not remove it cannot re-name. Such a grant is moved or re-named by a tenant-level administrator, or removed and granted anew by an administrator whose boundary covers it.

0 commit comments

Comments
 (0)