Skip to content

Commit b1ed011

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-vrlmvd
2 parents 93b08ba + 97c2982 commit b1ed011

104 files changed

Lines changed: 5201 additions & 590 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+
'@object-ui/cli': patch
3+
---
4+
5+
fix(cli): scaffolded apps declare `postcss ^8.5.32`, the range the repo itself uses
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The development-dependencies bump moved every in-repo `postcss` to `^8.5.32`. The scaffold's own table (`SCAFFOLD_DEV_DEPENDENCIES` in `ui/packages/cli/src/utils/scaffold-dependencies.ts`) still said `^8.5.26`, so the routed, plain and init manifests it generates named a range the repo no longer uses. They now name `^8.5.32`.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/runtime': patch
3+
'@objectstack/client': patch
4+
'@objectstack/cli': patch
5+
'@objectstack/spec': patch
6+
---
7+
8+
feat(runtime,client,cli): export a deployment's whole ontology as installable packages in one read (`GET /packages/export`, `os package export`)
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: none
12+
13+
A tenant could take its ontology out of a deployment only one package at a time (`GET /packages/:id/export`). The whole-deployment export declared in `@objectstack/spec` (`PackageExportBundleSchema`) is now served.
14+
15+
- **`@objectstack/runtime`**: `GET /api/v1/packages/export` answers `{ packages }`: every installed package whose registry row's `source` is not `code` (the marketplace and authored packages, each base's `.custom` pair among them), disabled ones included, each exactly as `GET /packages/:id/export` answers it, dependencies first, so a pair follows its base. It reads with the per-package export's gate (`studio.access` or `setup.access`), refuses any query parameter `400 VALIDATION_ERROR` naming it, and is whole or absent: a package whose export cannot be assembled fails the read, naming that package. No credential value is carried: credential positions are withheld as on every served metadata read, and a connector's `credentialRef` stays a reference.
16+
- **`@objectstack/client`**: `client.packages.exportAll()` calls it.
17+
- **`@objectstack/cli`**: `os package export [--out DIR]` writes one directory per package, numbered in install order (`DIR/01-ID/objectstack.json`), each installable with `os package install`. A refusal is printed with its status and code and nothing is written; an `--out` directory that already holds files is refused.
18+
- **`@objectstack/spec`**: the `[PLANNED — not yet served]` marker comes off `PackageExportBundleSchema`'s description, which now names the route and the command.
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+
feat(app-shell): a Studio item header keeps the item's name readable; its chips, item tools and action labels give way first
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
On a narrow content column (a laptop window with the right panel open) the item header's title row no longer cuts the item's name to nothing. The title keeps its first twelve characters (its whole name when shorter), and the row gives way in two steps before the title does. First the identity chips (the api-name chip, the kind chip, the override and pair chips) and the five item tools (Layers, References, History, Audit, Source) leave the row and read at the top of the item's ⋯ menu: the chips as one entry, the tools as menu items opening the same sheets. Then the labelled actions (Customize, a flow's on/off switches, the Design and Run buttons) show their icon alone, the label staying their accessible name. The Interfaces and Automations headers fold into their own ⋯ menu; the Data header, which has none, draws one while something is folded. With the row's boxes fitting the row again, the ⋯ trigger stays inside the column instead of under the right panel. The draft status chip stays in the row. `StudioItemHeader` takes this as a `foldMenu` prop and exports `StudioItemHeaderFoldedItems` for a pillar's own menu; a header without `foldMenu` is unchanged.
11+
12+
The pillar rails draw the customization mark as its glyph alone ("Customized (BASE)" and "Added" are its accessible name and lead its tooltip), so a customized row keeps its label. The All metadata lists keep the mark's text.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
feat(cli): `os migrate text-scalars` rewrites numbers and booleans still stored raw on text fields to their string, and lists the SQLite `"N.0"` text it cannot decide
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Since #29241 the write door stores a number or boolean written to a text-family field (the spec's `BOUNDED_STRING_FIELD_TYPES`: `text`, `textarea`, `email`, `url`, `phone`, `password`, `markdown`, `html`, `richtext`, `code`, `signature`, `qrcode`) as its string. Rows written before keep the old form: the raw `42` / `true` on driver-memory with persistence, the TEXT `"42.0"` / `"1.0"` / `"0.0"` on SQLite. A filter on `"42"` misses them, a read hands back the old form, and a unique field admits a new `"42"` beside an old `42` or `"42.0"`. This new command is the one-time data step, a sibling of `os migrate option-codes`, not part of `os migrate value-shapes`, which rewrites nothing.
11+
12+
- **Raw numbers and booleans are rewritten** to `String(value)`, the string the door stores for the same input.
13+
- **SQLite `"N.0"` text is reported per object and field, never rewritten.** A text field declares no values, so `"42.0"` may be the old number or text a client typed.
14+
- **Dry run by default.** `--apply` rewrites each affected row through the engine; a row the door refuses (a unique collision, a format the field no longer admits) is a per-row failure and the walk goes on. `--object` narrows the walk and refuses a name the deployment does not declare. `--apply` refuses a SQLite file another process holds unless `--force`.
15+
- **No flag.** Nothing is gated on it. A re-run that reports nothing to rewrite is the verification.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/react': patch
4+
'@object-ui/plugin-list': patch
5+
'@object-ui/plugin-detail': patch
6+
'@object-ui/i18n': patch
7+
---
8+
9+
feat(app-shell): the publish sheet speaks in the console's language, and a load error the server answered shows its code and sentence
10+
11+
Clause-②: yes (widening)
12+
Metadata-protocol: none
13+
14+
The Pending changes sheet now names an updated item's changed keys by the label the inspector gives them, in the console's language (a customized dashboard reads 「~ 显示名称」, not "~ Label"). It no longer lists the ADR-0146 override declaration (`overrides`) as a change. A new item is added whole, so it lists no key list and no 平台生成 group: it shows only the fields and flow nodes it brings, or "Publishing adds this item." An `object_extension` group reads as its translated name ("2 object extensions", 「对象扩展 2」). This widens the ten shipped packs by `preview.changes.detailNewItem` and the `preview.changes.typeCount.object_extension` count family.
15+
16+
When a read fails and the server answered, the list page, the record page, the app page and the related list now show the server's sentence and code, for example 404 `OBJECT_NOT_FOUND` with "Object '…' is not registered". "Check your connection and try again" is only shown when no answer came back. All four share one rule, `answeredLoadFailure`, newly exported from `@object-ui/react`.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
feat(spec): the flow clone answer declares an optional `noticeCode` beside its English `notice`
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: none
9+
10+
`CloneFlowResponseSchema` (the answer of `POST /api/v1/automation/:name/clone`, "New similar") declared `data: { flow, packageId, notice }`, and `notice` is the server's English sentence with nothing that names it, so a console could only print it verbatim. `data` now also declares `noticeCode?: string`: a stable code naming the `notice` sentence. A client maps a code it knows to its own translated sentence and falls back to `notice` verbatim for a code it does not know, or when the key is absent.
11+
12+
- **Optional.** An answer without `noticeCode` (every server before the one that sends it) still parses; `notice` is still required and keeps its meaning as the English fallback.
13+
- **The values are the server's.** The schema does not enumerate them; the server that serves the clone door owns the vocabulary.
14+
- **Not metadata.** This is a REST answer shape, not something a metadata author writes, so the metadata protocol does not move. `@objectstack/client`'s `automation.clone()` returns `CloneFlowResponse['data']`, so its return type gains the optional key with no change to the client package.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec)!: an authored connector entry refuses a key `retryConfig` or an `actions` element does not declare
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: narrowed
9+
10+
<!-- adr-0087: registered connector-entry-nested-undeclared-key-refused -->
11+
12+
**BREAKING** accept-set narrowing on an authored connector entry (`DeclarativeConnectorEntrySchema`), at every door that parses it: `defineConnector()`, `defineStack({ connectors })`, `os validate` / `os compile`, the metadata plugin's artifact load at boot and on reload, and the metadata save door `PUT /api/v1/meta/connector/:name`.
13+
14+
- **Before.** The entry refused an undeclared top-level key, but its two nested shapes were plain objects: an undeclared key inside `retryConfig` or inside an `actions` element parsed green and meant nothing to the runtime.
15+
- **Now.** Each is refused by name, in one `unrecognized_keys` issue located at the container (`retryConfig`, `actions.N`) that lists every undeclared key; at the save door `422 INVALID_METADATA`, and nothing is stored. A credential-shaped key (`secret`, `token`, `apiKey`, `password`, `credentialRef`, …) meets the entry's own prescription (`auth.credentialRef`); an execution binding on an action (`method`, `path`, `url`) is refused with ADR-0097 §5's: an action carries none.
16+
- **Unchanged.** The published open shapes — `ConnectorSchema`, `RetryConfigSchema`, `ConnectorActionSchema` — keep their posture: the def a plugin hands to `registerConnector`, the actions a provider derives, and the retry policy the runtime parses at materialization. A row stored before this refusal keeps working: the runtime parses its policy with the open `RetryConfigSchema`, which drops the undeclared key, and the read withholds it.
17+
- **A save over such a row.** An explicit `retryConfig` replaces the stored one whole (the maintainer's ruling): a save that sends `retryConfig` — the served form, `{}`, any object — does not carry the stored row's undeclared retry key forward, and its answer names each key it dropped (advisory rule `withheld-key-dropped`). A save that leaves `retryConfig` out removes it, as before. An undeclared key in an `actions` element stays at rest through a save of the served form.
18+
19+
## FROM → TO
20+
21+
```ts
22+
// before — parsed green; `secret` was read by nothing
23+
retryConfig: { strategy: 'exponential_backoff', maxAttempts: 3, secret: '…' },
24+
actions: [{ key: 'get_invoice', label: 'Get invoice', method: 'GET', path: '/invoices/{id}' }],
25+
26+
// after — refused at retryConfig and at actions.0; keep the declared keys only
27+
retryConfig: { strategy: 'exponential_backoff', maxAttempts: 3 },
28+
actions: [{ key: 'get_invoice', label: 'Get invoice', effect: 'read' }],
29+
```
30+
31+
A credential moves to the secrets layer under the name `auth.credentialRef` gives; an execution binding has no home on an action (a provider-bound instance derives its actions from the upstream). The upgrade guide entry is `connector-entry-nested-undeclared-key-refused`.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec)!: an authored connector URL holds no credential part, and the connector read judges every `providerConfig` and `auth` URL by the same walk
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: narrowed
9+
10+
<!-- adr-0087: registered connector-entry-url-credential-refused -->
11+
12+
**BREAKING** accept-set narrowing on an authored connector instance (`DeclarativeConnectorEntrySchema`), at every door that runs its refinement: `defineStack({ connectors })`, `os validate` / `os compile`, the metadata plugin's artifact load at boot and on reload, and the metadata save door `PUT /api/v1/meta/connector/:name`.
13+
14+
- **Before.** A URL under `providerConfig` or `auth` parsed green whatever it held.
15+
- **Now.** A URL holding a userinfo (`user@` or `user:password@` before the host) or a credential query parameter with a value (`api_key`, `token`, `access_token`, `key`, `secret`, `signature` and the rest of the connector redactor's list, matched case-insensitively on the decoded name, plus the instance's own `auth.paramName`) is refused: one issue per URL, located at the URL (`providerConfig.baseUrl`, `providerConfig.transport.url`, `providerConfig.spec`, `auth.tokenUrl`, `auth.authorizationUrl`, `auth.resource`, and any other URL at any depth under `providerConfig`, array elements included), naming the parts it holds — never the URL — and prescribing `auth: { type, credentialRef }`; at the save door `422 INVALID_METADATA`, and nothing is stored. There is no rule per provider: a URL is recognised by its value.
16+
- **One judgement, one walk, both doors.** The write door and the read redactor run one walk over an entry's URLs with one definition of a credential part, so the door refuses exactly the URLs the read rewrites or withholds. A URL inside a header or environment map (`providerConfig.headers`, `defaultHeaders`, `transport.headers`, `transport.env`) is judged by neither: the read withholds those maps whole.
17+
- **Read.** The built-in `connector` redactor rewrites the credential parts out of every URL that walk returns, the `auth` endpoints (`tokenUrl`, `authorizationUrl`, `resource`) as well as `providerConfig`, the rest of each URL served byte for byte and the position named in `redactedKeys`.
18+
- **Unchanged.** `ConnectorSchema` — the def a plugin hands to `registerConnector` — keeps its posture. The runtime materializes a stored row as it is stored and never re-judges it, so a connector stored before this refusal keeps dispatching with its stored URL; a save of its served form keeps the stored URL (the metadata protocol's carry-forward), and an edit of the served URL stores exactly the edit.
19+
20+
## FROM → TO
21+
22+
```ts
23+
// before — parsed green; the secret lived in the URL
24+
{ name: 'billing_api', label: 'Billing API', type: 'api', provider: 'rest',
25+
providerConfig: { baseUrl: 'https://billing.example.com/v1?api_key=…' },
26+
auth: { type: 'none' } },
27+
28+
// after — refused at providerConfig.baseUrl; the URL is credential-free and the key is a reference
29+
{ name: 'billing_api', label: 'Billing API', type: 'api', provider: 'rest',
30+
providerConfig: { baseUrl: 'https://billing.example.com/v1' },
31+
auth: { type: 'api-key', credentialRef: 'BILLING_API_KEY', paramName: 'api_key' } },
32+
```
33+
34+
Set the secret under the name `credentialRef` gives (an environment variable in the open tier, or Setup → Connector credentials) and delete it from the URL. There is deliberately no automatic rewrite: the value in the URL may be the only copy of the secret. The upgrade guide entry is `connector-entry-url-credential-refused`.

‎apps/docs/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@types/react": "^19.2.18",
3535
"@types/react-dom": "^19.2.4",
3636
"negotiator": "^1.1.0",
37-
"postcss": "^8.5.28",
37+
"postcss": "^8.5.32",
3838
"tailwindcss": "^4.3.3",
3939
"typescript": "^6.0.3",
4040
"zod": "^4.6.6"

‎content/docs/concepts/metadata-lifecycle.mdx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ document **whole** for every read that serves the base's name
158158
layered read in `overlay` with `effective` = the base's document.
159159
- **Export carries the declaration.** `GET /packages/hotcrm.custom/export` carries the
160160
overriding item with its `overrides` block; `GET /packages/hotcrm/export` carries the
161-
base unchanged.
161+
base unchanged. `GET /packages/export` (`os package export`) answers the whole
162+
deployment in one read: every installed package its own code does not register, the
163+
pair as its own entry after its base, each entry exactly the per-package export.
162164

163165
## Overlay whitelist (shared-DB tenancy invariant)
164166

0 commit comments

Comments
 (0)