Skip to content

Commit b992507

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-wk8dv2
# Conflicts: # packages/lint/src/i18n-walk.test.ts # packages/lint/src/validate-translation-references.test.ts # packages/spec/src/system/translation.zod.ts
2 parents b7d720d + c81f498 commit b992507

196 files changed

Lines changed: 8563 additions & 1010 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: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/objectql': minor
4+
'@objectstack/metadata-protocol': minor
5+
'@objectstack/rest': minor
6+
---
7+
8+
feat(i18n): a dependent package's `fieldPatches` text is translated from that package's own translations
9+
10+
Clause-②: yes (widening) — `TranslateDocumentOptions` gains an exported member, `patchBundles`; nothing accepted before is refused
11+
Metadata-protocol: semantic — a dependent package's translations of its own `fieldPatches` text now take effect on `/meta` and on the public form; on a patched slot the pair `.custom` translation is laid over the package's locale by locale, so a pair that translates the slot only in a fallback locale (`en`) no longer wins over the package's translation in the requested one (`zh-CN`)
12+
Skills-docs: follow-up #34785
13+
14+
A code package that relabels a vendor's field with `fieldPatches` (ADR-0146 D10) can now translate the text it writes. Before this change, a patched label, help text, description or option label was served exactly as the patch wrote it in every locale: a patched slot read only the pair `.custom` package's catalog, and the deployment catalog merges every package's translations with the package ids dropped, so the patching package's own `zh-CN` rows for the slot never applied.
15+
16+
A patched slot now reads, in order:
17+
18+
1. the pair `.custom` package's translation of that key, as before, laid over the package's translations locale by locale along the fallback chain;
19+
2. the translations of the code package whose patch wrote the served value: its shipped `translations` and its own active translation rows;
20+
3. the served text.
21+
22+
The slots read this way are the field `label`, the help text (`inlineHelpText`, or `description` when the field has none), an option `label` on a field not bound to a shared picklist, and, through the same rule, `inlineTitle` and `relatedListTitle`. The owner's translation of the text the patch replaced never applies to a patched slot, as before. A slot the patch did not write (a tenant's rename on top of it) keeps its own text. When two packages patch the same slot, the slot reads the package whose text it serves. Nothing is stamped on the served document: which package wrote a slot is found by comparing the served value with the packaged base plus that one package's patches (ADR-0029 D9.2a).
23+
24+
New reads beside the option: `SchemaRegistry.getPackagedFieldPatchBases(name)` and `ObjectStackProtocolImplementation.getPackagedFieldPatchBases(name)` (one entry per patching code package, highest precedence first) and `ObjectStackProtocolImplementation.getPackageTranslationBundle(packageId)` (one package's own translations, locale-keyed). The `/meta` object item and list reads and `GET /forms/:slug` pass `patchBundles` to the translator. The public form reads no pair translation, before this change as after it, so there a patched slot reads the package's translation, then the text.
25+
26+
The save door's inverse of the read (the translated-echo restore that keeps a Studio save in another locale from storing the read's translation) translates with the same patch translations. A zh-CN read of a patched label, saved back whole, stores the patch text and not the patching package's translation, both over a stored row that carries the patch text and with no stored row; an `en` read after it serves the patch text.

‎.changeset/34272-accept-invitation-verified-email.md‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,17 @@
44
'@objectstack/runtime': patch
55
---
66

7-
fix(plugin-auth,app-shell)!: while mail is live, accepting an invitation needs a verified address
7+
fix(plugin-auth,app-shell): an accept refused for an unverified address answers the vendor's own code, and the Console's accept page takes the person to verify
88

9-
Clause-②: no (narrowing)
9+
Clause-②: no
1010
Metadata-protocol: none
11-
Skills-docs: none — `git grep` of `skills/` finds no page that teaches accepting an invitation or `/organization/accept-invitation`; the rule is stated here and in the self-hosting docs.
11+
Skills-docs: none — `git grep` of `skills/` finds no page that teaches accepting an invitation or `/organization/accept-invitation`; the rule is stated in the self-hosting docs.
1212

13-
<!-- adr-0087: not-required (no-migration-prescription) No schema key, accepted value, metadata type or stored row is added, removed, renamed or rewritten: the moved answer is whether one auth route accepts a request from a session whose address is unverified, while the deployment's mail transport is live. Nothing exists for a migration to rewrite; the one-line fix for a refused person is in the body: verify the address, then accept. -->
14-
15-
**BREAKING** for a person who accepts an invitation from an account whose address was never verified, on a deployment whose mail transport is live. The rule: while mail is live, accepting an invitation needs a verified address, because an unverified address is not proof of the invited mailbox.
13+
The rule that refuses the accept is stated, with its BREAKING notice and its migration, in this release's entry "accepting, declining and listing an organization invitation need a verified email address on every deployment, and an invitation sign-up joins by accepting once verified". This entry carries only the parts of that change that ship beside it.
1614

1715
**What changes.**
1816

19-
- `POST /api/v1/auth/organization/accept-invitation` (`@objectstack/plugin-auth`), from a session whose address is unverified, while the email service answers `isConfigured() === true`, now answers `403 EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION` (better-auth's own code and sentence, the ones its accept route answers when its option is on) and writes nothing; the invitation stays pending. It used to answer `200` and write the membership. The vendor's not-found, expiry and recipient refusals still come first, so a session that is not the invitee learns nothing new. The check runs on the vendor's `beforeAcceptInvitation` hook, on the session user the vendor itself resolved (cookie or bearer token alike), and asks whether mail is live on every request.
17+
- `POST /api/v1/auth/organization/accept-invitation` (`@objectstack/plugin-auth`) answers a session whose address is unverified with better-auth's own `403 EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION` and its sentence, the answer its accept route gives when its option is on, and writes nothing. The vendor's not-found, expiry and recipient refusals still come first, so a session that is not the invitee learns nothing new. The check runs on the vendor's `beforeAcceptInvitation` hook, on the session user the vendor itself resolved (cookie or bearer token alike).
2018
- The Console's accept page (`@object-ui/app-shell`) answers that refusal with the verification-mail screen (`/verify-email-prompt`) for the account's address, whose link returns to the accept page, instead of a toast.
2119

22-
**Who moves.** A person in that state verifies their address (the Console's accept page takes them to the screen that sends the mail), then accepts; an API client that accepts for its user does the same, through `POST /api/v1/auth/send-verification-email`. A visitor who is not signed in and opens the invitation mail's own link is not affected: the accept page offers the one-step form, which verifies the address as it accepts. A visitor already signed in to an account whose address is unverified who opens the same link accepts through `/organization/accept-invitation`, so is refused as above and sent to verify.
23-
24-
**Unchanged.** Every deployment without a live mail transport (no email service, or the log transport), where nothing could verify an address, so acceptance stays open to an unverified address; `get-invitation`, `list-user-invitations` and `reject-invitation`, which write no membership; the one-step door `POST /api/v1/auth/organization/accept-invitation-one-step`; and a verified session everywhere. better-auth's `requireEmailVerificationOnInvitation` stays declared `false`: it governs reading and declining too, and is read once at boot.
25-
2620
`@objectstack/runtime` carries only the dispatcher error-vocabulary row that classifies the vendor code above as foreign vocabulary; nothing it runs changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/lint': patch
4+
'@objectstack/platform-objects': patch
5+
'@object-ui/i18n': patch
6+
---
7+
8+
feat(spec, lint, i18n): an action answer table's column headers have a translation bundle key
9+
10+
Clause-②: yes (widening) — `ActionResultDialogTranslationSchema` and the action `preflight` translation node accept a new optional `columns` map, `columns.<field path>.<column path>` (both keys literal, dots included), beside `fields`; every bundle that parsed before parses unchanged and reads the same.
11+
Metadata-protocol: added
12+
Skills-docs: follow-up owed — skills/objectstack-i18n/SKILL.md
13+
14+
A `format: 'table'` field in an action's `resultDialog.fields` or `preflight.fields` declares `columns: [{ path, label }]`, and each column's `label` is translatable, but no bundle key carried it, so a table's headers stayed in the authored language in every locale. The key is `objects.<object>._actions.<action>.resultDialog.columns.<field path>.<column path>` (and `….preflight.columns.…`; `globalActions.<action>.…` for an object-less action):
15+
16+
```ts
17+
resultDialog: {
18+
fields: { rows: '逐行结果' },
19+
columns: { rows: { email: '邮箱', 'error.message': '未添加的原因' } },
20+
}
21+
```
22+
23+
- `os i18n extract` lists one key per labelled column, `os validate` refuses a column key that names no declared table field or column (`translation-target-unknown`), and `resolveActionResultDialog` / `resolveActionPreflight` (so `translateAction` and the served metadata) and the console's `useObjectLabel` overlay the translated header; a column with no key keeps its authored label.
24+
- The platform bundles carry the nine column headers of `sys_user.import_sso_users`'s result table in every shipped locale.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/mcp': patch
3+
---
4+
5+
fix(mcp): the data loop on `GET /mcp/skill` is the published `objectstack-ask` skill's text
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The page an open server serves at `GET /mcp/skill` taught the governed-metric procedure in its own hand-written words, and those words had drifted from the published `objectstack-ask` skill. The page now carries the skill's own steps, generated from `skills/objectstack-ask/SKILL.md` into the package, under a new section **Answering a business question**. A test fails when the two differ.
11+
12+
What a connected client now reads on that page, where it reads differently from before:
13+
14+
- Each word for a thing measured is decided on its own: two words with one measure each are two metrics, computed both, not a question for the user. One word that matches several measures is still a question.
15+
- A word with no match that is a loose form of several listed measures (a bare "revenue" beside Won Revenue, Annual Revenue and Planned Revenue) is a question too, with nothing computed yet. One near form selects nothing.
16+
- `membersWithheld: true` is reported as members (measures or groupings) the user may not read, and the metric asked for may be among them.
17+
- The fallback to object queries reads the object's fields first, uses `aggregate_records` rather than adding pages up, opens with a line saying the answer is not from a governed metric, and names a listed dataset on that object when there is one.
18+
- The answer is written in the user's language, with labels rather than machine names, and states its filter and time window.
19+
20+
The two dataset tool entries in the page's tool list now give only each tool's signature and what its answer carries. The section renders where it did before and nowhere else: only when the host carries the dataset tools and the grant has `data:read` (or names no scopes). Pages for other hosts and grants are byte-identical to before.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
fix(scenarios): ask mode installs a build the unmanaged door refuses `UNMANAGED_INSTALL_UNCOPYABLE` managed instead, and records the install mode
6+
7+
Clause-②: yes (widening) — reachable from `./runner` (`src/runner/index.ts` re-exports `app.ts` and `orchestrate.ts`): the new optional method `AppHarness.installManaged` and `HttpApp.installManaged`; the new optional parameter `mode` of `installableManifest`; the new exports `fallsBackToManaged`, `InstalledBuild` and `InstallAnswer`; `ModeRun.template` typed `InstalledBuild`, which adds the optional fields `installMode` and `unmanagedRefusal`
8+
Metadata-protocol: none
9+
10+
Ask mode installed a verified build only unmanaged. The platform refuses an unmanaged copy of a build that carries an item no environment row can hold — a `capability`, which the metadata-type registry declares runtime-uncreatable — with `422 UNMANAGED_INSTALL_UNCOPYABLE`, and names the managed install. Builds of cards that gate actions on capabilities therefore installed nothing, and the ask round ran zero question turns.
11+
12+
Ask mode edits nothing, so on that refusal it now installs the same build, unchanged, through the same door with `installMode: 'managed'` (no `installModes` added: the door reads the build's own), and every fresh copy the Run half boots is installed the same way. The mode record's `template` names the install the mode ran on: `installMode` (`unmanaged` or `managed`), and, after a fallback, `unmanagedRefusal` with the refusal's status, code and message; the fallback is also listed as an ask finding. An unmanaged install that succeeds now records `installMode: 'unmanaged'`. No other refusal falls back, a managed install refused too is a finding naming both answers, and template mode never falls back: its agent edits the installed copy, which only an unmanaged install makes the environment's own.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/platform-objects': patch
3+
'@object-ui/app-shell': patch
4+
'@object-ui/console': patch
5+
'@object-ui/i18n': patch
6+
---
7+
8+
fix(app-shell,console): the invitation inbox's accept routes an unverified address to verification, and the verify screen no longer says a link was sent before it was
9+
10+
Clause-②: no
11+
Metadata-protocol: none
12+
13+
Follow-ups to the rule that, while a deployment delivers mail, accepting an invitation needs a verified address (`403 EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION`).
14+
15+
- **The invitation inbox's Accept** (`@object-ui/app-shell`). When the `sys_invitation` `accept_invitation` action is refused with that code, the console's `type: 'api'` action handlers (`useConsoleActionRuntime` and `RecordDetailView`, through the action door or the direct call alike) now open the verification-mail screen, `/verify-email-prompt`, for the account's address, with the mail's link returning to that invitation's accept page, instead of showing the vendor's sentence in a toast. Every other refusal still reads as before. The rule is keyed on the code alone; no action metadata key, spec field or server route changes.
16+
- **The action's AI description** (`@objectstack/platform-objects`). `sys_invitation.accept_invitation`'s `ai.description` now states the condition: while the deployment delivers email, the caller's address must be verified, and an unverified caller is refused with that code and nothing is written. The text is the agent-facing description only; no translated bundle carries it.
17+
- **The verify screen's copy** (`@object-ui/console`, `@object-ui/i18n`). `/verify-email-prompt` said "We sent a verification link" on every arrival, but only the sign-up sends a mail before arriving there. The sign-in arrival (refused `EMAIL_NOT_VERIFIED`, which sends nothing unless the deployment sets `emailVerification.sendOnSignIn`) and both accept-invitation arrivals send nothing. The sign-up arrival now marks itself with `?sent=1` and keeps its copy; every other arrival reads "Your email address has not been verified yet. Send a verification link to ADDRESS…", offers "Send verification email", and shows "Sent to:" and the spam hint only once the button has sent the mail. Two keys are added to the `auth.verifyEmail` namespace in every built-in locale: `sendDescription` and `sendButton`.
18+
19+
**A host that embeds the accept page or the console action runtime declares `/verify-email-prompt`.** `DefaultAcceptInvitationPage` and the action handlers above navigate there with `email` and `redirect` query keys; `apps/console` mounts its own `VerifyEmailPromptPage` at that route, and a host without it sends the person to a route that does not exist. The `@object-ui/app-shell` README states the route and its query keys ("Hosting the invitation pages").
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/lint': patch
3+
'@objectstack/cli': patch
4+
'@objectstack/skills': patch
5+
---
6+
7+
feat(lint): a dataset measure or dimension that declares neither `synonyms` nor a `description` is advised
8+
9+
Clause-②: yes (widening) — @objectstack/lint gains three exports on its "." entry: validateDatasetMemberVocabulary, DATASET_MEMBER_NO_VOCABULARY and the DatasetMemberVocabularyFinding type; nothing accepted before is refused
10+
Metadata-protocol: none
11+
12+
A dataset member answers a business question through its vocabulary (ADR-0149 D1): `synonyms`, the words a person types for it, and `description`, a short business definition. Both keys are optional, so a dataset that declares neither on a member passes every check, and that member then answers only to its own name and label. A person who asks in other words, or in another language, matches nothing and gets a number from a plain object query instead of the governed metric.
13+
14+
`@objectstack/lint` adds one advisory rule, `dataset-member-no-vocabulary` (`warning`). It reports once per measure or dimension that has no non-blank `synonyms` entry and no non-blank `description`, names the dataset and the member, and says what is lost. One of the two keys is enough to silence it. It runs at `os validate`, `os build` and `os lint`, and at the metadata publish door for a `dataset` write, where it is an advisory on the save response. Nothing is refused: a dataset that only feeds charts loses nothing by leaving both keys out. `os explain dataset-member-no-vocabulary` prints the full reasoning.
15+
16+
The author-time rule count the CLI prints (`Running author-time rules (N)`) rises by one, to 70 for `os validate` and `os build`.
17+
18+
`@objectstack/lint` exports `validateDatasetMemberVocabulary`, `DATASET_MEMBER_NO_VOCABULARY` and the `DatasetMemberVocabularyFinding` type.
19+
20+
`@objectstack/cli`: `os generate dataset` now writes one `synonyms` entry on each member it scaffolds, seeded from a label the stack already declares (the title field's label on the dimension, the object's plural label on the record count), in whatever language that label is written in, under a comment that says to replace the seed with the words your users type and to add a `description`. A fresh scaffold therefore draws no finding. When a seed would answer to two members (a title field labelled like the object), the scaffold picks the next candidate, so the dataset it writes always parses.
21+
22+
`@objectstack/skills`: the `objectstack-ui` dashboards rule now says, for every dataset member, to write `synonyms` as the words a person types, in the language of the brief, and a one-sentence business `description`; that one word names one member; and that a member with neither draws the new warning. Its dataset example gives the dimension a synonym too, and the skill's evals gain a case for a dataset authored from a Chinese brief.
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): the Installed Apps module toggle names the module lines it shows
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
In Setup › Installed Apps, the button that shows and hides an app's modules carried `aria-controls` with an id that no element had, so a screen reader was pointed at nothing. Each module line now has its own id. While the modules are shown, the button's `aria-controls` lists those ids. While they are hidden, the lines are not drawn and the button has no `aria-controls`. `aria-expanded` is unchanged.

0 commit comments

Comments
 (0)