Skip to content

Commit 9f34971

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-0hebo5
# Conflicts: # packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts
2 parents 0b4d782 + 04e0c2c commit 9f34971

262 files changed

Lines changed: 14320 additions & 1041 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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/plugin-designer': patch
3+
---
4+
5+
refactor(plugin-designer)!: retire six zero-consumer exports (the collaboration provider and its status indicator, three canvas hooks and the property editor)
6+
7+
Clause-②: yes (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/plugin-designer#CollaborationProvider, @object-ui/plugin-designer#ConnectionStatusIndicator, @object-ui/plugin-designer#useClipboard, @object-ui/plugin-designer#useMultiSelect, @object-ui/plugin-designer#useCanvasPanZoom, @object-ui/plugin-designer#PropertyEditor) the retired operands are React components and hooks in a published ui package's entry that nothing in the workspace or in hotcrm imported; no packages/spec schema, registered node type, ADR-0087 conversion surface or stored shape names them, so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**BREAKING** for a host that imports any of these six names from `@object-ui/plugin-designer`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected. Every module stays in the package (the four designers keep using the hooks and the property panel internally); only the entry stops publishing them. The designers, their `…Props` types, `useUndoRedo`, `useDesignerHistory`, `useConfirmDialog`, `ConfirmDialog`, `Minimap`, `VersionHistory`, the app pages and the metadata pages stay exported unchanged.
13+
14+
What leaves, and what to write instead (none has a replacement export):
15+
16+
- FROM `CollaborationProvider`, `ConnectionStatusIndicator` TO no replacement: render the designers without the wrapper; real-time co-editing is no longer offered from outside the package.
17+
- FROM `useClipboard`, `useMultiSelect`, `useCanvasPanZoom` TO no replacement: the designer canvases already copy/paste, multi-select and pan/zoom on their own; keep a local copy of the hook if you used it in your own canvas.
18+
- FROM `PropertyEditor` TO no replacement: the designers render their own property panel; for a form of your own, use `SchemaRenderer` with a form schema.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@object-ui/plugin-gantt': patch
3+
---
4+
5+
refactor(plugin-gantt)!: retire nineteen zero-consumer exports (the quick-filter bar, the resource-workload grid, the workload math and the shift-band helpers)
6+
7+
Clause-②: yes (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/plugin-gantt#QuickFilterBar, @object-ui/plugin-gantt#QuickFilterBarProps, @object-ui/plugin-gantt#QuickFilterField, @object-ui/plugin-gantt#QuickFilterOption, @object-ui/plugin-gantt#QuickFilterLabels, @object-ui/plugin-gantt#QuickFilterDef, @object-ui/plugin-gantt#ResourceWorkload, @object-ui/plugin-gantt#ResourceWorkloadProps, @object-ui/plugin-gantt#computeWorkload, @object-ui/plugin-gantt#WorkloadColumn, @object-ui/plugin-gantt#WorkloadOptions, @object-ui/plugin-gantt#ResourceCell, @object-ui/plugin-gantt#ResourceLoad, @object-ui/plugin-gantt#normalizeDependencies, @object-ui/plugin-gantt#normalizeShiftSegments, @object-ui/plugin-gantt#shiftDayStart, @object-ui/plugin-gantt#bandAt, @object-ui/plugin-gantt#ShiftSegmentsConfig, @object-ui/plugin-gantt#ShiftBandConfig) the retired operands are React components, helper functions and their TypeScript types in a published ui package's entry that nothing in the workspace or in hotcrm imported; no packages/spec schema, registered node type, ADR-0087 conversion surface or stored shape names them, so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**BREAKING** for a host that imports any of these nineteen names from `@object-ui/plugin-gantt`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected. Every module stays in the package (`ObjectGantt` still renders the quick-filter bar, the resource view and the shift bands from them); only the entry stops publishing them. `ObjectGantt`, `ObjectGanttRenderer`, `GanttView`, the task, dependency, link and marker types, `normalizeTaskType`, `parseHHMM` and the `NormShiftSegments` / `NormShiftBand` types that `GanttViewProps.shiftSegments` takes stay exported unchanged.
13+
14+
What leaves, and what to write instead (none has a replacement export):
15+
16+
- FROM `QuickFilterBar`, `QuickFilterBarProps`, `QuickFilterField`, `QuickFilterOption`, `QuickFilterLabels`, `QuickFilterDef` TO no replacement: declare `gantt.quickFilters` on the `object-gantt` node and let `ObjectGantt` draw the bar.
17+
- FROM `ResourceWorkload`, `ResourceWorkloadProps`, `computeWorkload`, `WorkloadColumn`, `WorkloadOptions`, `ResourceCell`, `ResourceLoad` TO no replacement: set `gantt.resourceView: true` with `assigneeField` (and optionally `effortField` / `capacity`) and let `ObjectGantt` render the workload grid.
18+
- FROM `normalizeShiftSegments`, `shiftDayStart`, `bandAt`, `ShiftSegmentsConfig`, `ShiftBandConfig` TO no replacement: declare `gantt.timeSegments`; to drive `GanttView` directly, pass `shiftSegments` already in the `NormShiftSegments` shape.
19+
- FROM `normalizeDependencies` TO no replacement: give each `GanttTask` you pass to `GanttView` a `dependencies` array of ids or `{ id, type }` objects (`GanttDependency[]`).
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec): the customizations read's `contributions` declares a `nav` kind, with an entry shape per kind
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added
9+
10+
`GET /packages/:id/customizations` names the package behind each item another installed package contributes to a base (ADR-0029 D7 as amended by ADR-0146 D3). `GetPackageCustomizationsResponseSchema.contributions` now declares a third kind: the navigation items another package's `navigationContributions` add to an app the base owns.
11+
12+
- **The entry shape is per kind.** A `field` or `flow` entry is `{ kind, object, name, packageId }` and accepts exactly what it accepted before. A `nav` entry is `{ kind: 'nav', app, group?, name, packageId }`: the base-owned app, the group the contribution targets when it targets one, the nav item's id, and the contributing package. Each shape is strict, so a `nav` entry carrying `object`, or a `field` entry carrying `app`, is refused.
13+
- **Order.** The `field` and `flow` entries come first, in the order they had before. The `nav` entries follow, by app, group (an entry with no group first), name and package. `counts.contributions` still counts items.
14+
- **Not served yet.** The runtime lists no `nav` entry yet. The kind is declared ahead of its producer, and its describe opens `[PLANNED — not yet served]`. No nav item gains a key: the served app's `navigation` stays as declared.
15+
16+
TypeScript code that reads `object` from a `contributions` entry now narrows on `kind` first (`entry.kind !== 'nav'`), because a `nav` entry has no `object`.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
'@objectstack/platform-objects': patch
4+
'@objectstack/core': patch
5+
---
6+
7+
feat(plugin-auth): a platform administrator sees who holds platform-admin standing from Setup → Users (#28793)
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: none
11+
12+
The Users list carries no column for platform-admin standing, because that standing is derived per user and is not stored on `sys_user`. The list toolbar now has one entry instead, **Platform Administrators**, which opens a list of every user who holds that standing right now.
13+
14+
- **The answer.** `POST /api/v1/auth/admin/list-platform-admins` (`@objectstack/plugin-auth`) enumerates the candidates with the last-admin guard's own enumerator: the in-window `admin_full_access` grants the Default Organization owns, and the verified `sys_user` rows on the `OS_PLATFORM_OWNER_EMAIL` list. It then confirms each candidate through `hasPlatformAdminStanding`. The roster can only be narrower than that predicate, never wider. Organization owners and admins are not platform administrators and are not listed.
15+
- **Who may read it.** Only a caller who holds platform-admin standing. Anonymous callers get 401, and every other caller, an organization owner or admin included, gets 403 `PERMISSION_DENIED` with no data.
16+
- **Exported.** `resolveAdminUserIds(engine, { standing })` (`@objectstack/plugin-auth`): `'administrators'` (the default) is the population the break-glass guard protects, and `'platform-admins'` drops the organization half. The guard's own behaviour is unchanged.
17+
- **Pinned.** `ADMIN_STANDING_PLATFORM_ENUMERATION` (`@objectstack/core`) names the enumerator and classifies every input of the administrator derivation as a candidate source or not, so a new source of platform-admin standing is red until the enumerator reads it.
18+
- **Unchanged.** The Users list still reads one page per request. No `sys_user` field is added.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/service-automation': patch
4+
'@objectstack/runtime': patch
5+
---
6+
7+
feat(automation): an `oauth2` connector instance with `clientSource: 'installer'` connects with the OAuth client its administrator entered, and uses it for every exchange and refresh
8+
9+
Clause-②: yes (narrowing)
10+
Metadata-protocol: none
11+
Ruling-ref: 6566728470
12+
13+
<!-- adr-0087: not-required (no-migration-prescription) No metadata key, schema, accepted value, stored row, export or error code is removed or renamed: the begin leg of the connector connection door now refuses, with the existing 400 VALIDATION_ERROR, a request body it used to drop unread, so nothing stored changes and there is nothing for objectstack migrate meta to rewrite, and the two contract types only gain OPTIONAL members no existing caller has to send. -->
14+
15+
**BREAKING** for three call shapes only, each of which used to be answered as if its extra input were absent and now answers `400 VALIDATION_ERROR` with nothing connected, read or revoked: a `POST /api/v1/automation/connectors/NAME/connection` whose JSON body carries a key other than `clientId` and `clientSecret`; the same begin carrying a client for an instance that does not declare `clientSource: 'installer'`; and an in-process `getConnectorConnection` or `revokeConnectorConnection` call whose request carries `client`. What to do: nothing, unless a caller sends a body to that begin leg. Send none (or `{}`) for an instance that declares its client or leaves it to MCP dynamic registration, and send only `clientId` and `clientSecret` for one that takes the installer's.
16+
17+
An `authorization_code` instance that declares `clientSource: 'installer'` names no client in its definition. Its administrator registers a client with the vendor against this deployment's redirect URI and hands it to the connect door:
18+
19+
```http
20+
POST /api/v1/automation/connectors/esign/connection
21+
{ "clientId": "CLIENT_ID", "clientSecret": "CLIENT_SECRET" }
22+
```
23+
24+
- **What it does.** The authorization request, the code exchange and every refresh of that connection go out as the administrator's client. Each organization's connection keeps its own client, and a reconnect replaces it. On `provider: 'mcp'` over http the MCP authorization flow still discovers the endpoints, and registers nothing.
25+
- **Where the client is kept.** In the connection record's encrypted client column, the one that keeps a dynamically registered client. The id alone is also kept in plain text, so the connection's read shows `client: { source: 'installer', clientId, hasSecret }`. The secret is never answered back, logged or written to metadata.
26+
- **What it refuses (400 `VALIDATION_ERROR`).** A connect of such an instance with no client: the message names the instance and the vendor registration step, with the redirect URI to register. A client offered to an instance that declares its own client or leaves it to dynamic registration, which used to be ignored. A body key other than `clientId` and `clientSecret` on the begin leg, which used to be ignored too. A client on the read or revoke leg. No refusal repeats a value the caller sent.
27+
- **Contracts.** `ConnectorConnectionRequest` gains an optional `client`, and `ConnectorConnectionState` an optional `client`.
28+
- **Unchanged.** An instance that declares its `clientId`, or leaves its client to MCP dynamic registration, connects, exchanges and refreshes exactly as before, and a begin with no body is still a begin with no client.
29+
30+
The `clientSource` key no longer carries `[PLANNED — not enforced]`, and the liveness ledger's `connector/auth` row no longer calls it planned.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/metadata-protocol': minor
4+
'@objectstack/lint': minor
5+
---
6+
7+
feat(spec): a field marked `searchable: true` is searched when its object declares no `searchableFields`
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: semantic
11+
12+
`FieldSchema.searchable` was declared, defaulted and served, and nothing read it: `$search` skipped a field marked `searchable: true`, and a `$searchFields` override naming it was refused `400 INVALID_FIELD` "is not searchable" while the object's served schema said `searchable: true`. It is now honoured (ruling record 6573569376, letter A).
13+
14+
- **Before.** With no `searchableFields` declared, the search set was the type-based auto-default only: the text-like and `select` columns. A `code`, `html`, `lookup` or `json` field marked `searchable: true` was not scanned, and naming it in `$searchFields` answered 400.
15+
- **Now.** With no `searchableFields` declared, the set is the type-based auto-default plus every field marked `searchable: true`, of any type except `secret`, `password` and `vector`, which stay excluded (a virtual `formula` field has no stored column and stays out too). The `$searchFields` ingress allow-list is the same set, so naming a marked field narrows the search to it instead of answering 400. The flag is read before the auto-default's own exclusions, so a marked `hidden` field or a marked field named like a system column joins too.
16+
- **Unchanged.** A declared `searchableFields` is still the whole search set, and no field's own flag is read there. A field without the flag (or with `searchable: false`, the default) resolves exactly as before. A credential field is still never scanned.
17+
- **What may now match more.** A field you already marked `searchable: true` on an object without `searchableFields` is now part of `$search`. For a `lookup` that means its stored record id, not the related record's title. Remove the flag, or declare `searchableFields` to pin the set.
18+
- **New export.** `SEARCH_FLAG_EXCLUDED_TYPES` (`@objectstack/spec/data`) names the three hard exclusions. `SearchFieldMeta` gains the optional `searchable`.
19+
- **Messages.** The `$searchFields` refusal for a field outside the auto-default, and the `searchable-field-unsearchable` lint verdict, now name the missing `searchable: true` and offer it as the fix, instead of calling the field's type unscannable.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/metadata-protocol': minor
3+
'@objectstack/metadata-core': minor
4+
'@objectstack/service-automation': patch
5+
---
6+
7+
**BREAKING** fix(metadata)!: a flow whose loop is not closed by a `type: 'back'` edge is refused at publish, and its draft read says so, instead of publishing and then never registering
8+
9+
Clause-②: no (narrowing)
10+
Metadata-protocol: narrowed
11+
Skills-docs: none — `skills/objectstack-automation/references/state-machines-and-approvals.md` teaches that the resubmit edge MUST be typed `'back'` and that `registerFlow` rejects an unmarked cycle; both stay true, and the publish door now refuses the same flow earlier, in the same words.
12+
13+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped. The publish doors now refuse a flow body the automation engine already refused to register, with the engine's own sentence, so a published body that could never run has nothing a migration could rewrite it to: the author's fix is the one the refusal names. -->
14+
15+
**BREAKING** accept-set narrowing at the runtime authoring gate (`@objectstack/metadata-protocol`), which the metadata draft read and every publish door run (`PUT /api/v1/meta/:type/:name` live, `POST …/publish`, `POST /api/v1/packages/:id/publish-drafts`).
16+
17+
- **Before.** A flow whose top-level graph had a cycle with no edge typed `back` (ADR-0044) saved as a draft, its draft read answered `_diagnostics: { valid: true }`, and it published (`outcome: 'published'`). The automation engine then refused to register it ("Flow contains a cycle: push → check → revise → push. …"), so the flow never ran, and only the by-name read's `registration` and a boot-log warning said why.
18+
- **Now.** The draft still saves (drafts are never gated). Its read answers `valid: false` with an error coded `flow-undeclared-cycle` on the cycle-closing edge (`edges.N`), and every publish door refuses it `422 INVALID_METADATA` with that finding; a package publish refuses the batch (`outcome: 'refused'`). The message is the engine's registration refusal, word for word.
19+
- **One judge.** The cycle walk moved from `@objectstack/service-automation` to `@objectstack/metadata-core` as `findUndeclaredFlowCycle` (with `undeclaredFlowCycleMessage`). The engine's registration and the publish gate both call it, so they refuse exactly the same graphs; the engine's behaviour and message are unchanged. `@objectstack/metadata-core/testing` exports `FLOW_CYCLE_CORPUS`, the case table both faces are tested against.
20+
- **Unchanged.** A cycle with any of its edges typed `back` publishes and registers, as before. Cycles inside a `loop` / `parallel` / `try_catch` region are judged where they were. `os validate` and `os build` do not run this check yet.
21+
22+
**The remedy.** None for a flow that registers today: it publishes exactly as before. A flow this now refuses was already refused by the engine at registration and never ran; the refusal names the closing edge, and ADR-0044's `type: 'back'` on that edge is how an intended loop is declared. A stored flow published before this change is re-registered exactly as before (still refused by the engine).
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)!: a flow's record nodes treat a computed filter operand as a value, never as a query operator
6+
7+
Clause-②: no (narrowing)
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. A flow definition the save doors accept is accepted as before; what narrows is the run-time value a `get_record`, `update_record` or `delete_record` node takes from an evaluated filter operand. There is no stored row or authored key for `objectstack migrate meta` to rewrite and no tombstone. -->
11+
12+
**The rule.** A flow's record nodes (`get_record`, `update_record`, `delete_record`) treat an evaluated value in a filter's operand position as a value, never as a query operator: a value that is not a scalar (or a list of scalars where the operator takes a list) is refused before the query runs.
13+
14+
- **A value.** A string, a number, a bigint, a boolean or a date. At the comparand of `$in`, `$nin` or `$between`, a list of them with no empty entry.
15+
- **Refused.** Anything else an operand expression evaluates to (an object, a list where one value belongs, a list holding anything but values, a list with an entry that is nothing), at every operand position and under every key, whatever the value came from. The node fails as a guard before the data engine is asked, and the message names the node, the expression and the operand's place in the filter.
16+
- **Unchanged.** The filter the author wrote: its fields, operators and `$and` / `$or` / `$not` conditions, and every literal operand. An operand that evaluates to nothing is refused as before.
17+
18+
**BREAKING** for a flow that hands a computed object or list into a filter operand where the rule above refuses it: it now fails at that node. Make the expression evaluate to the value the condition compares against (for a record, read its `id`), and write any condition the flow needs in the filter itself.

0 commit comments

Comments
 (0)