Skip to content

Commit 281d91a

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-dv67oe
2 parents 13f35e0 + 692a4e4 commit 281d91a

37 files changed

Lines changed: 2734 additions & 484 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
docs(spec): the email template locale docs describe the ladder #28880 landed (#28896)
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The `SendTemplateInput.template` / `.locale` docs, the `EMAIL_TEMPLATE_FLOOR_LOCALE` docblock, the `EmailTemplateDefinitionSchema.locale` docblock and its served `describe`, and the `defineStack` warning for a bundle with no `en-US` row said the resolver matches the named locale exactly and retries only `en-US`, with no language-subtag folding. Since #28880, over the built-in template loader, a call that names a locale folds it against the template's own locales (exact, case-insensitive, base language, variant expansion), then tries the stack's declared fallback locale (`i18n.fallbackLocale`, else `defaultLocale`) folded the same way, then `en-US`, then fails with `TEMPLATE_NOT_FOUND`. The texts now say so, and say that a replacement `TemplateLoader` keeps the exact ladder and that a call naming no locale keeps its own ladder (`en-US`, then the bundle's lowest tag).
11+
12+
Text only: no schema shape, accept set or warning trigger changes. `en` and `en-US` are still two rows of one bundle.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/service-datasource': patch
3+
---
4+
5+
fix(service-datasource)!: the datasource admin doors refuse an empty `secret` instead of sealing it over the working credential
6+
7+
Clause-②: no (narrowing) — `POST /api/v1/datasources` and `PATCH /api/v1/datasources/:name` refuse one body that used to answer 201 / 200: a `secret` whose value is the empty string (`"secret": ""` or `"secret": { "value": "" }`), now `400 DATASOURCE_ADMIN_ERROR` naming `secret`. No new error code, no new answer member, no exported type changes.
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: secret is the doors' own credential channel, split off the body before the datasource draft is judged. The refused value stored nothing usable, and a row sealed with it before is reported at connect with a reason that says the credential is empty, so there is nothing at rest for a migration to rewrite. -->
11+
12+
**BREAKING** accept-set narrowing at the datasource admin doors (`@objectstack/service-datasource`): an empty `secret` is refused.
13+
14+
- **Before.** An empty `secret` was taken as a value. A create sealed it as the datasource's credential. An edit took it as a rotation: a new `sys_secret` row holding an empty value, `external.credentialsRef` repointed at it, and the working row removed. The live pool kept serving, so the datasource broke only at its next connect, with the old credential already gone.
15+
- **Now.** Both doors refuse it before anything is written: no `sys_secret` row is written, the stored record and its `credentialsRef` are unchanged, and no row is removed. A whitespace-only value is still a value, sealed and used as sent. `null` and an absent `secret` keep the stored credential, as before.
16+
- **Rows sealed before.** A datasource whose stored credential decrypts to an empty value still fails closed at connect (`failed-credentials`), and its status reason now says the credential is empty instead of blaming a missing `sys_secret` row or a changed encryption key.
17+
- **Who moves.** The console sends `secret` only when the field holds a value, so it never sent an empty one. A script or SDK call that sends `"secret": ""` to mean "no change" gets the 400.
18+
19+
**The remedy.** To keep the stored credential, leave `secret` out of the request (or send `null`). To replace it, send the new credential.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
fix(cli): `os migrate meta --json` says when no migration step ran
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: none
9+
10+
An empty range (`--from N` where `N` is already the highest major this build carries a step for, or `--from N --to N`) and an inverted one (`--from` above `--to`) replay no step. The human run has always warned that such a run "replayed nothing — that is not a finding that the metadata is canonical", but the `--json` answer looked exactly like a clean replay: `applied: []`, `todos: []`, `schemaValid: true`, exit 0. A script or CI step with a wrong `--from` was told its metadata had been migrated.
11+
12+
The `--json` answer now carries `replayedNothing` whenever no step ran:
13+
14+
- `reason`: `empty-range` when the range is well-formed but holds no step, `inverted-range` when `--from` is above `--to`.
15+
- `widestRange`: the widest range this build carries from the same `--from` (`from`, `to`) and how many mechanical (`applied`) and manual (`manual`) changes it holds for this stack, or `null` when no wider range exists: `--to` already reaches the highest major, or `--from` is at or above it.
16+
17+
Both faces read the same answer, so the human run now also names an inverted range as inverted. A run that replays at least one step carries no `replayedNothing` member and its payload is unchanged, and the exit code is unchanged in every case: an inverted range is answered, not refused.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
Studio field inspector: when a field of a read-only base package opens in display-patch mode, every control it locks (API name, Type, Required and Unique, Default value, option values and colours, Track history, the rule editors, Move up/down, Remove and the rest) now explains itself. Each sits in a focusable wrapper described by the "you can change only …" sentence, which also shows as a tooltip on hover and keyboard focus. The editable display properties (Label, Description, Help text, Placeholder, option labels) carry no reason.
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(console): a caller the Setup app refuses gets "You don't have access to this app" on an object list spelled with the `setup` alias, as on the package-id spelling, instead of the list inside another app's shell
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`/apps/setup/OBJECT`, `/apps/setup/OBJECT/view/ID` and `/apps/setup/OBJECT/data` (and the legacy `/apps/setup/system/users`, which forwards onto the first) now wait on the Setup app's access verdict, the way Setup's root, metadata, settings and marketplace routes already did. A member the server refuses the Setup app sees the access-denied screen there, as on `/apps/com.objectstack.setup/OBJECT`; before, they saw the object list under the default app's header and sidebar while the address bar read `setup`. The server's data reads are unchanged, and so is everything an admitted caller sees. Record pages under the Setup segment (`/apps/setup/OBJECT/record/ID`, the address the approvals inbox links to) stay reachable as before.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/metadata-protocol': patch
4+
'@objectstack/metadata': patch
5+
---
6+
7+
fix(spec): a connector read serves only the keys `retryConfig` and each `actions` element declare, and a save of the served form keeps the rest
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
The built-in `connector` read-path redactor now serves, inside `retryConfig` and inside each element of `actions`, only the keys those shapes declare. Every metadata read exit that serves a stored connector applies it. Each withheld position is named in `redactedKeys` (an `actions` element by its index), and the stored row is never changed. A `retryConfig` that is not an object, and an `actions` that is not an array or holds an element that is not an object, are withheld whole (a cleared form excepted).
13+
14+
A save of the served form keeps every withheld nested value: the save door carries each one forward from the stored row. An `actions` element is followed by its `key`, so a reordered list keeps each element's value on that element; for every carried-forward position, an array element with no `id` is now identified by its `key`. A `retryConfig` or an `actions` element the author removes is removed.
15+
16+
`MetadataManager.getPublished` now hands the type's redactor the authored document alone and serves the metadata layer's own scalar bookkeeping beside the answer unchanged (`packageId`, `state`, and the publish keys). A publish snapshot nested under `publishedDefinition` (a package published more than once) is served through the same redaction at every depth; any other bookkeeping value that is not a scalar is not served.
17+
18+
What a save accepts is unchanged.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
fix(app-shell): a read-only flow node inspector says why its controls are disabled, on hover, on keyboard focus and to assistive tech
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: none
9+
10+
On a read-only package, Studio's flow node inspector disabled every control (ID, Label, Node Type, the config fields, Remove node) and gave no reason anywhere: no tooltip, no accessible description, and Tab skipped the whole panel. The inspector body now carries the treatment Studio's field rail and validation-rule editor carry: it is a tab stop described by the reason, and hovering any disabled control in it shows the reason in a tooltip.
11+
12+
The reason is the host's to give, because the inspector is shared by hosts whose read-only causes differ. `MetadataInspectorProps` gains an optional `readOnlyReason?: string`; an inspector that honours it draws the reason while `readOnly` is true. Studio's Automations pillar passes the read-only package sentence. A host that passes nothing renders exactly as before.

‎content/docs/getting-started/your-first-project.mdx‎

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,20 @@ The two paths produce identical projects.
2525
| A package manager | npm 9+ / pnpm 10.15+ / yarn / bun | `npm --version` |
2626

2727
That's all. A standalone project does **not** need pnpm, TypeScript pre-installed,
28-
or a database server — the default template runs on an in-memory driver, and
29-
TypeScript comes in as a dev dependency.
28+
or a database server — the default template stores its data in a SQLite file,
29+
`.objectstack/data/objectstack.db` inside the project (git-ignored), and
30+
TypeScript comes in as a dev dependency. Records survive a restart; to start
31+
from an empty database, stop the server and delete `.objectstack/data/`, or run
32+
`npx os dev --fresh` for a throwaway one.
3033

31-
<Callout type="warn">
32-
**npm 10 cannot install the CLI right now.** npm 10, the npm that Node 22 ships,
33-
fails with `Cannot read properties of null (reading 'edgesOut')`. Upgrade npm
34-
first with `npm install -g npm@11` (npm 11 needs Node 22.9+), or use pnpm.
35-
Already scaffolded? Upgrade, then run `npm install` in the project.
34+
<Callout type="info">
35+
**`Cannot read properties of null (reading 'edgesOut')` from npm 10?** npm 10,
36+
the npm that Node 22 ships, crashed this way installing the CLI (measured on
37+
10.9.4 and 10.9.9) while vitest 4's newest release had no matching
38+
`@vitest/browser-webdriverio`. That release, 4.1.12, is now published, and npm
39+
10.9.9 installs `@objectstack/cli` again (measured on 18.2.0). If you still hit
40+
it, upgrade with `npm install -g npm@11` (npm 11 needs Node 22.9+) or use pnpm,
41+
then run `npm install` in the project.
3642
[Troubleshooting](/docs/deployment/troubleshooting#cannot-read-properties-of-null-reading-edgesout-from-npm-install)
3743
has the other fix.
3844
</Callout>
@@ -263,11 +269,23 @@ is refused. No code changes either way — see [Drivers](/docs/data-modeling/dri
263269
npm run dev # objectstack dev — rebuild + server restart on change
264270
```
265271

266-
Or with the visual Console (data browser, metadata explorer, API docs):
272+
The dev server prints the database file and the Console link on boot. The
273+
Console — data browser, metadata explorer, API docs — is served at
274+
`http://localhost:3000/_console/`; sign in as the dev admin
275+
(`admin@objectos.ai` / `admin123`).
267276

268-
```bash
269-
npx os dev --ui # then open http://localhost:3000/_console/
270-
```
277+
<Callout type="info">
278+
**The starter has no app, so `my_app_note` is in no Console navigation.** You
279+
will see the platform's own apps and not the note object: this template ships
280+
objects only, with no app and no views. That is the intended starting point,
281+
not a broken install — the object is live, and the REST calls in step 4 read
282+
and write it. **An object appears in Console navigation only when an app lists
283+
it.** `npx os generate app notes` writes one under `src/apps/`, with a
284+
navigation entry for the starter's only object and its export line in
285+
`src/apps/index.ts`; the Console shows it after the dev server rebuilds. Or
286+
describe the app you want to your coding agent —
287+
[Build with Claude Code](/docs/getting-started/build-with-claude-code).
288+
</Callout>
271289

272290
## 4. Call your API
273291

‎content/docs/references/system/email-template.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const result = EmailTemplateDefinitionSchema.parse(data);
4848
| **name** | `string` | ✅ | Template identifier (dotted snake_case) |
4949
| **label** | `string` | ✅ | Display label |
5050
| **category** | `never` | optional | [REMOVED] `email_template.category` was removed in @objectstack/spec 18 (ADR-0049 enforce-or-remove) — nothing read it: the Studio listing never offered the filter facet it promised, and delivery never depended on it. Delete the key. A template is found by its `name`, so group templates with a dotted namespace prefix instead (`auth.password_reset`, `crm.welcome`). Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. |
51-
| **locale** | `string` | optional (default: `"en-US"`) | BCP-47 locale (e.g. en-US, zh-CN) — the bundle key the resolver matches EXACTLY. A call that NAMES a locale gets exactly one retry rung, the literal `en-US`, with no language-subtag folding: `en` and `en-US` are different ROWS of one bundle and neither reaches the other, so a bundle with no `en-US` row has no fallback floor for those calls and every recipient locale it does not carry a row for raises TEMPLATE_NOT_FOUND, which is permanent — the delivery dead-letters with no retry. A call naming NO locale is the other case and does not dead-letter: it drops to the bundle's lowest locale tag and renders that silently. Your stack's own `i18n.defaultLocale` is the wrong tag here unless it is spelled `en-US`. |
51+
| **locale** | `string` | optional (default: `"en-US"`) | BCP-47 locale (e.g. en-US, zh-CN) — the bundle key. Each rung of the resolver reads one row at one tag exactly, so `en` and `en-US` are different ROWS of one bundle. A call that NAMES a locale, over the built-in template loader, folds it against the bundle's tags (exact, case-insensitive, base language, then variant expansion: `en-GB` reaches `en`, `zh-TW` reaches `zh-CN`), then folds the stack's declared fallback locale (`i18n.fallbackLocale`, else `defaultLocale`) the same way, then tries the literal `en-US`; a replacement template loader matches the tag exactly and retries only `en-US`. `en-US` is the floor every loader honours: when no rung lands on a row the call raises TEMPLATE_NOT_FOUND, which is permanent — the delivery dead-letters with no retry. A call naming NO locale folds nothing and does not dead-letter: it starts at `en-US` and otherwise drops to the bundle's lowest locale tag and renders that silently. Tag the English row `en-US` so every loader has the floor. |
5252
| **subject** | `string` | ✅ | Subject template. Holes are `{{ path }}` or `{{ path \| formatter[:arg] }}` over the send's `data`, with at most one formatter per hole (a second, chained formatter is refused). A formatter is one word, optionally followed by `:` and its argument (text that is not, such as `date-long`, is refused), and it is one the template engine knows (an unknown name, such as a misspelled `curency`, is refused, naming the known formatters). A `currency` argument is either a literal ISO 4217 code in three capital letters (`currency:EUR`) or, in a mail template only, `@` followed by a path into the send's data whose value is such a code (`currency:@currency_code`). |
5353
| **bodyHtml** | `string` | ✅ | HTML body template. Holes are `{{ path }}` or `{{ path \| formatter[:arg] }}` over the send's `data`, with at most one formatter per hole (a second, chained formatter is refused). A formatter is one word, optionally followed by `:` and its argument (text that is not, such as `date-long`, is refused), and it is one the template engine knows (an unknown name, such as a misspelled `curency`, is refused, naming the known formatters). A `currency` argument is either a literal ISO 4217 code in three capital letters (`currency:EUR`) or, in a mail template only, `@` followed by a path into the send's data whose value is such a code (`currency:@currency_code`). |
5454
| **bodyText** | `string` | optional | Plain-text body template (auto-derived from HTML when omitted). Holes are `{{ path }}` or `{{ path \| formatter[:arg] }}` over the send's `data`, with at most one formatter per hole (a second, chained formatter is refused). A formatter is one word, optionally followed by `:` and its argument (text that is not, such as `date-long`, is refused), and it is one the template engine knows (an unknown name, such as a misspelled `curency`, is refused, naming the known formatters). A `currency` argument is either a literal ISO 4217 code in three capital letters (`currency:EUR`) or, in a mail template only, `@` followed by a path into the send's data whose value is such a code (`currency:@currency_code`). |

0 commit comments

Comments
 (0)