Skip to content

Commit 6674886

Browse files
committed
Merge origin/main into claude/project-thread-uv3zpb
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jQpUMdR7QmHKTFR8iB
2 parents 4bff297 + a06feb7 commit 6674886

65 files changed

Lines changed: 3957 additions & 144 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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
'@objectstack/service-automation': patch
5+
'@objectstack/platform-objects': patch
6+
---
7+
8+
feat(console): Connector connections, a Setup page to connect, reconnect or disconnect each OAuth connector instance and see its status
9+
10+
Clause-②: yes (widening: new Setup entry nav_connector_connections resolving automation:connector-connections; no existing key, route or shape changes)
11+
Metadata-protocol: none
12+
13+
A connector instance declared with `auth: { type: 'oauth2', grant: 'authorization_code' }` needs an administrator to sign in to the vendor once for their organization. The Console now has a page for that (`automation:connector-connections`). `@objectstack/service-automation` contributes its Setup → Integrations entry, **Connector Connections**, gated on `manage_connector_connections`, the organization-scoped capability the connection door asks, so an organization administrator sees it; `@objectstack/platform-objects` carries the entry's label in its four Setup translation packs. The page lists every such instance with the organization's connection status as the server answers it (Not connected, Connected, or Reconnect required with the reason the server recorded), the granted scopes, who connected it and when, and when the access token renews. A `degraded` instance shows the server's reason in the same row as the connection that caused it.
14+
15+
**Connect** and **Reconnect** open the vendor's sign-in in its own window, detached from the page, and send it to the authorization URL the server answered. The page re-reads the status until the connect lands, then closes the window and shows the new status. **Disconnect** removes the connection after a confirmation. No token, code or authorization URL is ever rendered.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/formula': patch
3+
---
4+
5+
feat(formula): a CEL syntax refusal keeps the engine's own fault code and the source range it points at, so an editor can say what is wrong and where in its own words (#27904)
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`validateExpression`'s catch-all CEL refusal, `invalid-cel`, now carries two optional params beside `role` and `detail`:
11+
12+
- `celCode` — cel-js's own code for the fault, read off its error object: the parser's for a syntax fault (`unexpected_token` when an operand or the end is missing, `expected_token` when a closing `)` / `]` / `}` is missing, `unexpected_character`, `unterminated_string`, …) or the checker's for a type fault (`no_such_overload`, …).
13+
- `pos` — `{ start, end }`, the UTF-16 offsets into `source` that the engine points at (`end` exclusive). A missing `)` reads `start === end === source.length`.
14+
15+
Both are absent when the engine reported none, and `pos` is absent when the engine read a source the platform rewrote first (the null-guard ternary lowering), since a range into that text would point at characters the author never wrote. A guessed `0` is never written.
16+
17+
`EvalError.pos`, declared before and never filled, is now filled by `celEngine.compile` and `celEngine.evaluate` for a cel-js parse, check or evaluation fault that carries a range, on the same terms.
18+
19+
The refusal's `message` is unchanged, byte for byte, and so are the codes and the params of every other refusal.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(studio): "New similar" on a flow in the Automations pillar, opening the copy where the clone door landed it
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
An admin who wants a second flow like one a package ships, for another rule, gets it without changing the package's flow (ADR-0146 D4). The flow clone door lands the copy switched off in a writable package, by default the source's paired `<base>.custom`, so Studio can offer the gesture where the flow is designed.
12+
13+
- **New similar in the flow's menu.** The open flow's ⋯ menu offers "New similar" on a read-only package's flow and on a writable package's flow. It asks for a new machine name and a label, both mandatory, and posts them to `POST /api/v1/automation/:name/clone`. On a read-only base the request names no package, so the door picks the pair; on a writable package it names the open package.
14+
- **The copy opens where the answer says.** The door's answer names the package the copy landed in. A copy in another package opens on that package's Automations pillar (`/studio/<package>/automations?surface=flow:<copy>`); a copy in the open package opens in place after the rail re-reads. Either way the server's sentence that the copy is switched off is shown as sent. An answer that names no package says so and opens nothing. Nothing records or draws what the copy was made from.
15+
- **Refusals and gates.** A refusal, a `409` for a taken name included, is the server's sentence, shown in the dialog, which stays open. A caller without `manage_metadata` sees the item disabled with the console's sentence for why. A read-only package's flow still offers no Delete, and the package-less scope draws no menu.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(studio): the All metadata area marks a base's customizations, filters to them and counts them
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
In Studio's All metadata area (ADR-0146 D3, "On top, one surface"), an installed base's lists now show its own items and the items of its paired `BASE.custom` package together. Every mark and number comes from the server's customization read, `GET /api/v1/packages/:id/customizations`. Nothing is computed from the documents: there is no diff and no `basedOn` verdict.
12+
13+
- **Marks.** An item the read lists as an override is marked "Customized (BASE)". For a type identified by name and member, such as an email template's locale, only that member is marked. Any other item of the pair is marked "Added". The base's other items carry no mark.
14+
- **Filter.** Each list offers "Only customizations (n)" once the read has answered and the base has a customization.
15+
- **Counts.** Each directory tile shows how many items of its type the read lists as overrides. The object tile also counts the extension members (fields, validation rules, indexes). The directory header shows the base's total, the served overrides plus the served extensions, which is the landing's "customized" figure.
16+
- **Pending or failed read.** While the read is pending, or after it fails, the area draws no mark, no filter and no number, never a "0". A failure shows the server's sentence. A base with no pair is unchanged, and so is Setup, which makes no customization read.
17+
- **Across packages.** In `/studio/~all/metadata`, an item of a `BASE.custom` package is labelled "Customization of BASE".
18+
- **One mark component.** `CustomizationMark` (`views/studio-design/CustomizationMark.tsx`) draws these marks for the whole console, and the pillar rails will reuse it. `fetchPackageCustomizations` returns the read in full, and `fetchPackageCustomizationCounts` (the landing's reader) now uses it.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/cloud-connection': patch
3+
---
4+
5+
fix(cloud-connection)!: install-local judges a ledger entry stored in the CLI's lifted shape through the install door's flatten, at the boot rehydrate and on the sample-data doors (#28604)
6+
7+
Clause-②: no (narrowing) — at `kernel:ready` the install-local rehydrate no longer loads, and `POST /api/v1/marketplace/install-local/:manifestId/reseed-sample-data` and `/purge-sample-data` answer 422 `OS_PROTOCOL_INCOMPATIBLE` for, a ledger entry written by an install before #28535 in the body `os package install <file>` sends (`id` and `version` lifted beside a nested `manifest`) whose nested `engines.protocol` excludes this runtime. Such an entry loaded and those doors acted on it before. A flat entry with the same range was already refused the same way. Nothing is widened.
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 changes: the rehydrate's existing ADR-0087 handshake, its ADR-0141 D5 dependency order and the sample-data doors' handshake now read a lifted ledger entry through the flatten the install door already uses, as they already read a flat entry. The refusals are the existing shared answers, so there is nothing for a migration to rewrite. -->
11+
12+
**BREAKING** boot-load and accept-set narrowing for already-ledgered install-local entries (`@objectstack/cloud-connection`): the `kernel:ready` rehydrate and the two sample-data doors, reached by a deployment where `os package install ./dist/objectstack.json` ran before #28535.
13+
14+
An install before #28535 ledgered the CLI's body unflattened, so the entry's `engines` and `dependencies` sat one level down, and the rehydrate and the sample-data doors judged `engines.protocol` at the top: an entry built for another protocol was re-registered at every boot with no error. They now read the entry through the install door's one flatten (`flattenPackageBody`), and the rehydrate orders entries by the dependencies they nest too. Such an entry gets exactly what a flat entry with the same range gets: it is not loaded, one error line names the code, the package and the remedy, the listing marks it `notLoaded`, and DELETE or a compatible reinstall still act on it. A compatible lifted entry rehydrates exactly as before, registering the body as it was ledgered.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
fix(spec): the datasource read redactor covers the declared `ssl` secret members
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- 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, and no authored value is refused, so there is nothing for `objectstack migrate meta` to rewrite. What narrows is a read answer: the metadata read exits serve a datasource without `ssl.key` and name it in `redactedKeys`, the posture they already apply to `config` credentials. The stored row keeps the key for the connect path, and the generic write-path carry-forward keeps it on a save that omits it. No exported declaration is removed or narrowed (not runtime-interface-only or type-surface-only); the package publishes (not unpublished); no ADR-0087 id is named or touched (not registered or already-registered). -->
11+
12+
**BREAKING** (a read-answer narrowing), shipped as `patch`: a non-protocol narrowing takes `patch` and keeps this banner and its ADR-0087 disposition.
13+
14+
`DatasourceSchema.ssl.key` (the client private key) is now marked a credential value (`.meta({ credential: 'value' })`), and the built-in `datasource` read redactor applies the schema's credential markers beside its `config` rule. Every metadata read exit that resolves the `datasource` redactor (`/meta` item, list and layered reads, and the stored-row seam behind the `sys_metadata` data door) drops `ssl.key` from the served item and lists `ssl.key` in `redactedKeys`.
15+
16+
**Unchanged.** `ssl.enabled`, `ssl.rejectUnauthorized`, `ssl.ca` and `ssl.cert` are public material and stay served. A datasource with no `ssl` block, or with an empty `key`, is served exactly as stored. The stored row is never rewritten, and a save that sends back the served body keeps the stored key.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
fix(cli): `os build` runs the override write gate `os validate` runs (ADR-0146 D2, #28643)
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
`os build` now calls `findOverrideDeclarationRefusals` beside the dependency-range check, the same walk over the publish door's own judge (`judgeOverrideWrite`) that `os validate`, the publish doors and the managed install ask. A stack carrying an `overrides` declaration the gate does not admit, or a dependent's item bearing a name a package in its dependency closure ships, is refused at build with the rows `os validate` prints (`NOT_OVERRIDABLE`, exit 1), and no artifact is written. Before, the build emitted that artifact and the managed install or a publish door refused it later with the same judge; what any door accepts is unchanged.
11+
12+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export or type changes: `os build` now runs the override write gate `os validate`, the publish doors and the managed install already run, with the same judge (`judgeOverrideWrite`) and the same rows. An artifact it now refuses was already refused wherever it landed, so there is nothing for `objectstack migrate meta` to rewrite and no tombstone; the remedy is the judge's own sentence (rename the item, or remove `overrides`). -->

‎content/docs/automation/connectors.mdx‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,15 @@ a rotating refresh token is never spent twice.
640640
DELETE /api/v1/automation/connectors/:name/connection → revoke
641641
```
642642

643+
**In the Console**, **Setup → Integrations → Connector Connections** drives
644+
these calls; the entry is shown to holders of `manage_connector_connections`.
645+
It lists each `authorization_code` instance with the organization's status,
646+
the reason the server recorded and, for a `degraded` instance, the server's
647+
reason beside the connection that caused it. **Connect** and **Reconnect**
648+
open the vendor's sign-in in its own window, detached from the page, and the
649+
page shows the new status once the callback has stored it; **Disconnect**
650+
revokes after a confirmation.
651+
643652
`GET …/:name/connection` answers the organization's status
644653
(`not_connected`, `connected`, `reconnect_required`), never a token. The
645654
`state` and the PKCE verifier are bound to the user and organization that

‎packages/cli/src/commands/compile.ts‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ import { findViewContainerNameRefusals } from '../utils/view-container-names.js'
7676
// A field `picklist` that names no picklist the stack declares — the walk
7777
// `os validate` step 2d runs, over the same judge.
7878
import { judgePicklistReferences, picklistRefusalHeading, printPicklistReferenceNotices } from '../utils/picklist-references.js';
79+
// [ADR-0146 D2, #28643] The override write gate — the walk `os validate` step
80+
// 3a-iii runs, over the publish door's own judge (`judgeOverrideWrite`).
81+
import { findOverrideDeclarationRefusals } from '../utils/override-declarations.js';
7982

8083
export default class Compile extends Command {
8184
static override description = 'Compile ObjectStack configuration to JSON artifact';
@@ -768,6 +771,37 @@ export default class Compile extends Command {
768771
);
769772
}
770773

774+
// 3b-iii. [ADR-0146 D2, #28643] The override write gate, at build time —
775+
// the SAME call `os validate` makes at its step 3a-iii, over the
776+
// walk `utils/override-declarations.ts` takes and the publish door's
777+
// own judge (`judgeOverrideWrite`). Only the base's paired
778+
// `<base>.custom` declares an override; a dependent's item bearing a
779+
// name a package in its closure ships, and an `overrides` declaration
780+
// the gate does not admit, are refused. Before this the build emitted
781+
// such an artifact and the managed install or a publish door refused
782+
// it later with the same judge; now the door that ships refuses it
783+
// and writes no artifact.
784+
//
785+
// Beside the dependency-range check below and ahead of every artifact
786+
// write. The `--json` face is this command's failure envelope
787+
// (`errors`, the rows `os validate --json` carries); the text face is
788+
// `os validate`'s. No step line, as on `os validate`.
789+
const overrideRefusals = findOverrideDeclarationRefusals(result.data as Record<string, unknown>);
790+
if (overrideRefusals.length > 0) {
791+
if (flags.json) {
792+
await emitJson({ success: false, errors: overrideRefusals, warnings: warningsSoFar(), conversions: conversionNotices }, 0, { compact: true });
793+
this.exit(1);
794+
}
795+
const n = overrideRefusals.length;
796+
console.log('');
797+
printError(`The publish door would refuse ${n} item${n > 1 ? 's' : ''} under the override write gate (ADR-0146 D2)`);
798+
printBulletList(
799+
overrideRefusals.map((r) => `${r.path} [${r.code}] ${r.message}`),
800+
{ noun: 'override refusal(s)', remedy: JSON_FULL_LIST_REMEDY },
801+
);
802+
this.exit(1);
803+
}
804+
771805
// 3b-quater. ADR-0141 D2, author side — every `manifest.dependencies`
772806
// range of the packages one install act would deliver, judged by the
773807
// install's own predicate (`utils/dependency-range-check.ts`).

0 commit comments

Comments
 (0)