Skip to content

Commit ddf4953

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-l8wnbr
2 parents ee212c2 + 0be247c commit ddf4953

129 files changed

Lines changed: 4931 additions & 927 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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): objectstack-upgrade says a stored row in a ≤16.x shape stops being rewritten at read on 18.3, and teaches the stored pass on 18.2 or earlier first
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **Before.** § "Stored rows" said every stored-row rehydration replays the conversion chain including entries retired from the load path, so "a row written under protocol 16 therefore rehydrates in its protocol-17 shape without anybody editing it", and offered `os migrate meta --stored --apply` only as a way to make that durable. § 3.6 called the read-time rehydration "still the guarantee", the report template marked the stored pass optional ("rows rehydrate correctly today"), and eval 4 expected the same answer. On 18.3, which drops every conversion retired at or below 16.x, that advice leaves such a row unconverted for good.
11+
- **Now.** The section says rehydration replays only the conversions the installed release still carries, that 18.3 drops those retired at or below 16.x, and to run the stored pass on the release being left (18.2 or earlier for such a row) before moving; § 3.6 says the `os migrate meta --stored --json` exit `0` counts only on the release being left, because one that dropped a row's conversions answers `0` without recognising the row; the report template's stored-pass line says it is owed before any release that drops the rows' conversions. Eval 4's expected answer says the same, and new eval 5 asks the 18.1 → 18.3 question directly.
12+
- `SKILL.md` and `references/examples-upgrade.md` stay under their token ceilings (no ceiling moves). No schema, key, command or behaviour changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
---
4+
5+
fix(service-automation)!: the subflow guards see a `subflow` / `map` call inside a region body (#28846)
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
**BREAKING** for a packaged flow that calls a packaged child from inside a `loop` body, a `parallel` branch or a `try_catch` slot.
11+
12+
- **Before.** The ADR-0126 §7.3 guards read a flow's calls from its top-level nodes only. A `subflow` or `map` node inside a region body was invisible to them. A packaged caller was armed onto a disabled packaged child and failed mid-run at that node, and the child could be switched off or removed while an enabled caller still called it.
13+
- **Now.** The guards read calls at every region depth, through the spec's region walk (`collectFlowGraphs`). A packaged caller whose region body calls a disabled packaged child registers but is not armed: it warns, and `/_status` reports `unboundCause: 'disabled_subflow'` naming the child. Switching off or removing a packaged child that an enabled packaged caller calls from a region body is refused with `DELETE_RESTRICTED` (409), naming the caller. Re-arming when the child is enabled or republished `active` works as it does for a top-level call.
14+
- **Not changed.** The save-notice half of the arming gate (#28840) still reads top-level calls only. A region cannot carry a durable pause, so a region-nested call whose child suspends fails the run at the region boundary before anything after it runs. Registration, the save door and `objectstack validate` accept the same flows as before.
15+
- **The fix.** Enable the child, or publish it `active`, and the caller arms. To switch off or remove a child, switch off its callers first, as the refusal names.
16+
- **Who moves.** HotCRM's `campaign_enrollment` calls two active children from loop bodies. It still arms. Switching off or removing those children while it is enabled is now refused, as it already was for a top-level call. Showcase and dogfood calls are all top-level.
17+
18+
<!-- adr-0087: not-required (no-migration-prescription) no metadata key is added, removed, renamed or re-shaped and the save door accepts the same flows: the runtime guards now read calls they already should have read, the remedy is an administrator's enable or a republish named in the warning and the refusal, and no migration could rewrite that choice -->
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/service-analytics': patch
3+
---
4+
5+
fix(service-analytics)!: the draft preview refuses a date bucket over a column that is not a date or datetime, as the published dataset does, instead of serving one null group
6+
7+
Clause-②: no (narrowing) — `queryDataset` with `previewDrafts: true` now refuses `INVALID_FIELD` / 400 at `groupBy.N.dateGranularity` a `timeDimensions` granularity over a field declared neither a date nor a datetime (text, select, number, boolean, …), with the refusal both live faces give the same selection, field for field; it served one `null` group (a `1970` group for a number). Nothing is widened: no export, public member, answer member, 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 or type of the package root changes: a draft preview that served a group the published dataset refuses is refused with the published refusal, already on the wire. There is nothing for a migration to rewrite and no tombstone. -->
11+
12+
**BREAKING** accept-set narrowing on the draft preview of `queryDataset` (`@objectstack/service-analytics`). The published faces are unchanged.
13+
14+
- **Before.** Measured on real SQLite on `main` `9a9823d9`. The native and ObjectQL faces refused a month bucket over a text, select or boolean column, and a year bucket over a number column, with the engine's `INVALID_FIELD` / 400 at `groupBy.0.dateGranularity`. The draft preview served one `null` group holding the whole total, or one `1970` group for the number.
15+
- **Now.** The preview judges the keys the ObjectQL strategy would hand the engine, with the engine's reading (the field's declared type, classed by the spec's date and datetime sets; no declared type or a `formula` is not judged). It gives the engine's refusal: the same message, `object`, `param`, `path`, `field` and `fields`. It runs after the preview's column-asked-twice refusal, as on the live faces.
16+
- **Unchanged.** A date or datetime bucket is served alike on every face. The live faces and the engine door are untouched.
17+
- **Who sees it.** An author previewing a drafted dataset that buckets a non-date column: the refusal the published dataset gives, instead of a chart it will not serve.
18+
19+
**The remedy.** Group by the column without a granularity, or bucket a date or datetime field.
20+
21+
Also in this change, the `/analytics/sql` dry run reads its time-dimension windows before its column-asked-twice refusal, as `/analytics/query` does. So a selection carrying both an unrecognised `dateRange` and one column asked twice is refused about the `dateRange` (`ANALYTICS_DATE_RANGE_UNRECOGNIZED` / 400) on both. The dry run answered the column refusal.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
---
4+
5+
fix(service-automation): a connection marked "reconnect required" says the cause that actually happened (#28863)
6+
7+
Clause-②: no — prose, and the stored `status_reason` text of two refresh paths. No accept set, status value, error code or export changes meaning.
8+
Metadata-protocol: none
9+
10+
A connector connection becomes `reconnect_required` four ways: the authorization server refuses the grant on refresh (`invalid_grant`); it issued no refresh token; the connection keeps no client to refresh with; or the upstream refuses the connection's token while an `mcp` instance discovers its tools. The connection's stored reason, the `sys_connector_connection.status` field help and the `ConnectorConnectionStore#markReconnectRequired` docblock all named only the first.
11+
12+
- **The stored reason, per path.** `reconnectRequiredReason` takes an optional cause (`'refused'`, `'no_refresh_token'`, `'no_client'`; `'refused'` when none is given, the old sentence unchanged). The no-refresh-token path now stores "…its authorization server issued no refresh token, so an access token the connection has to renew cannot be renewed…", and the no-client path "…its connection keeps no client to refresh with, so an access token it has to renew cannot be renewed…". Neither says the server refused anything, and neither says the access token expired: a refresh also runs on a cache miss and on a dispatch's 401, while the token may still be valid. The dispatch's 503 refusal carries the same sentence.
13+
- **The field help and the docblock** list all four causes and point to `status_reason` for which one happened.
14+
- Unchanged: the refused path's sentence, the MCP discovery path's own reason, and every status, code and write.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
'@object-ui/app-shell': patch
4+
'@objectstack/spec': patch
5+
---
6+
7+
fix(plugin-detail): the record page's highlight strip is the object's declared `highlightFields` only; the path's stage and the owner each show once, under one word for the owner (#28868)
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
**No guessed strip.** An object that declares no `highlightFields` now has no highlight strip, so every field stays in the details body. This holds on the default record page, the phone record header and the record hover card. `deriveHighlightFields` (`@object-ui/plugin-detail`) used to pick up to six fields from a preferred-name list (`owner` / `owner_id` first, then amount, rating, industry, …) and hide them from the body. That guess is deleted. The function keeps its signature and returns the declared list minus the record's title field, at most six, or nothing. A declared strip is unchanged.
13+
14+
**The stage once.** When the page draws `record:path`, its `statusField` joins the body's `hideFields`, so the stage is not drawn again as a body field. The body's hide list is also cut at the six fields the strip shows: a declared entry past the sixth is now drawn by the body instead of by neither.
15+
16+
**The owner once, under one word.** When the strip carries `owner_id`, the meta line under the details leaves the owner out. The platform label of the injected `owner_id` column (`@objectstack/spec`'s system-field fallback) now reads 「负责人」 in zh-CN, the word the ui's `detail.owner` already used. It was 「所有者」. en (`Owner`), ja-JP (`所有者`) and es-ES (`Propietario`) already matched the ui packs. A label an author wrote is still never overridden.
17+
18+
**What an app sees.** An object without declared `highlightFields` loses its strip. Declare the fields the header should show: `highlightFields: ['amount', 'close_date', 'owner_id']`.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/plugin-grid': patch
3+
---
4+
5+
fix(plugin-grid): the list grid's row ⋯ trigger is visible at rest, in a muted tone, instead of appearing only under the pointer
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The Actions column header is always drawn, but each row's ⋯ trigger was hidden by opacity on a fine pointer until the pointer reached the row, so a desktop list showed a headed column of cells that looked empty and read as "no actions available". The trigger is now drawn on every row at rest in the muted foreground tone, on every pointer type alike, and turns full strength on row hover, focus within the row, a selected row, its own keyboard focus, while its menu is open and on a coarse pointer. The menu's items, their gates and their order are unchanged. No key, option or prop is added.
11+
12+
What to do: nothing.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/plugin-auth': patch
4+
'@object-ui/console': patch
5+
'@object-ui/i18n': patch
6+
---
7+
8+
feat(console): the workspace prompt also asks an administrator for a default currency that is still unset, offering the browser region's currency
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: none
12+
13+
`@objectstack/spec/shared` gains `REGION_CURRENCY` and `currencyForLocale`, the checked-in CLDR region → currency table and its lookup. They move there from `@objectstack/plugin-auth`, which gives a new organization its creator's currency through them and no longer keeps its own copy. The table and the mapping are unchanged. Neither name was exported from the plugin-auth package entry, so nothing an importer of that package used moves.
14+
15+
The console's one-time workspace prompt (Setup → Localization's keys, asked once per administrator per workspace) now covers `localization.currency` too. While that key has no value on any rung, code-less amounts show as plain numbers; an administrator who may write the namespace is asked once, with the field pre-filled with the currency of the browser's first preferred language (`zh-CN` → CNY, shown as "人民币(CNY)" in Chinese). Confirm writes it through the Settings page's own `PUT /api/settings/localization`; "Not now" writes nothing. When the timezone is still the default as well, it is one dialog with both fields and one write. A browser language with no country region (`es-419`) offers no currency, and the prompt does not ask about it. No settings key, server-side dismissed flag or gate is added: the prompt keeps its existing per-device record, so an administrator already asked about the timezone is not asked again.
16+
17+
`@object-ui/i18n` gains eight `console.workspaceTimezonePrompt.*` strings in every built-in locale.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
'@objectstack/objectql': patch
4+
---
5+
6+
docs(metadata-protocol, objectql): three docblocks say where a code package's `objectExtensions` go: never stored as `object_extension` items or into the metadata service, but registered by the engine's `registerApp` as `'extend'` contributors (#28874)
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
Comment only, with no behaviour change. The header of `protocol-object-extension-item.ts`, the `foldObjectExtendersFromRegistry` docblock in `protocol.ts` and the `SchemaRegistry#foldObjectExtendersOnto` docblock each said that a compiled artifact's `objectExtensions` are stored (as `object_extension` items, or as a separate collection of the metadata service). They are not. The ObjectQL engine's `registerApp` registers each one as an `'extend'` contributor of its target object. The artifact loader maps the collection to `object_extension` but files no item from it, because an extension carries `extend` and no `name`. The type's items are the stored rows the `/api/v1/meta` doors write. The wording matches the `@objectstack/spec` registry row comment (#28873). A patch changeset is used because the corrected docblocks ship in each package's `dist` declarations.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
'@objectstack/core': patch
3+
'@objectstack/objectql': patch
4+
'@objectstack/metadata-protocol': patch
5+
'@objectstack/plugin-hono-server': patch
6+
'@objectstack/plugin-security': patch
7+
---
8+
9+
fix: a disabled package's objects are no longer granted by `/auth/me/permissions`, and an action that launches into a disabled package is no longer served
10+
11+
Clause-②: yes (narrowing)
12+
Metadata-protocol: none
13+
Skills-docs: none — no file under `skills/**` describes what `/auth/me/permissions` answers for a disabled package, or which actions a disabled package withholds; every taught use of `current_user.can(object, verb)` and of `type: 'flow'` actions stays true.
14+
15+
<!-- adr-0087: not-required (no-migration-prescription) No metadata moves: no spec key, authorable spelling, export or stored shape is removed, renamed or re-shaped, so there is nothing for `objectstack migrate meta` to rewrite. What narrows is two served answers while a package is disabled, and re-enabling the package restores both with no restart; nobody's code or metadata changes. No exported declaration is removed or narrowed (one optional member and one function are added); every package publishes; no ADR-0087 id is named or touched. -->
16+
17+
**BREAKING** (a served-answer narrowing, only while a package is disabled), shipped as `patch`: a non-protocol narrowing takes `patch` and keeps this banner and its ADR-0087 disposition (no authored value is refused). A disabled package is hidden, and refused on the data plane (#28117 ruling A). Two faces still answered as if it were on.
18+
19+
**FROM.** With a package disabled, on `origin/main`:
20+
21+
- `GET /api/v1/auth/me/permissions` still granted the package's objects in its `objects` map (an explicit grant, a plain `'*'`'s coverage or a super-user seed), while `GET /api/v1/data/<object>` answered `404 OBJECT_PACKAGE_DISABLED`. So `current_user.can(<object>, verb)` stayed `true` in the console and in the server's own formulas (`ISecurityService.getEffectiveObjectPermissions`, the same map), and every action gated on it stayed drawn.
22+
- An action of an ENABLED package that launches into the disabled one was still served: on the object it is bound to (`GET /api/v1/meta/object/<name>`'s `actions`, which the console draws) and in `GET /api/v1/meta/action` (list and by name). That is a `type: 'flow'` action whose flow only the disabled package ships (its launch answered `404` "Flow '…' not found"), and an action with a param whose `objectOverride` object belongs to the disabled package (its dialog could not draw the param).
23+
- `GET /api/v1/meta/action` also still listed an enabled package's action bound by `objectName` to the disabled package's object, while that object's own read answered `404 OBJECT_PACKAGE_DISABLED`.
24+
25+
**TO.** While the package is disabled:
26+
27+
- **`@objectstack/core`**: `buildEffectiveObjectPermissions` takes an optional `isObjectPackageDisabled` accessor and, as its last step, leaves out every object it answers `true` for (the `'*'` entry stays). `registryObjectPackageDisabled(registry)` is that accessor over an engine registry: its `isObjectPackageDisabled`, the predicate the data plane asks before it refuses an object. An object the map does not mention answers `current_user.can()` `false`.
28+
- **`@objectstack/plugin-hono-server`** and **`@objectstack/plugin-security`**: `/auth/me/permissions` and `ISecurityService.getEffectiveObjectPermissions` both hand that accessor over, so the two answers stay byte-for-byte the same map.
29+
- **`@objectstack/objectql`**: `SchemaRegistry.isActionWithheldByDisabledPackage(action)` extends #24400's rule (a disabled package's bound actions are withdrawn) to an action bound by `objectName` to an object of a disabled package, and to an action that launches into one: a `type: 'flow'` target that only disabled packages ship (`isFlowOfDisabledPackage`), or a param `objectOverride` object of a disabled package. The served object read leaves such an action out of `actions`, whether it was attached as a bound action or merged into the object by `defineStack()`. The code layer (`getArtifactItem`) keeps what the package ships.
30+
- **`@objectstack/metadata-protocol`**: `GET /meta/action` (the effective served list) and `GET /meta/action/:name` withhold the same actions, through the registry's predicate. The execution list and the per-package list (the package export) keep them.
31+
32+
An action that only names such an object elsewhere (a URL, a label) is unchanged, and so is a flow some enabled package also ships. Re-enabling the package serves every grant and action again on the next request.

0 commit comments

Comments
 (0)