Skip to content

Commit aad96d3

Browse files
Merge branch 'main' into claude/issue-32055-dispatch-action-scope
2 parents d0af7df + b96d492 commit aad96d3

696 files changed

Lines changed: 43622 additions & 6608 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+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the Plugin Interface overview in objectstack-platform's plugin-lifecycle rule imports what it uses
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-platform/rules/plugin-lifecycle.md` § Plugin Interface imported the `Plugin` type it then declares, and used `PluginType` without importing it. It now imports `PluginContext` and `PluginType` from `@objectstack/core`, the same shape as the overview in `references/plugin-development.md`. No rule changes. The other blocks in the two platform rules files stay unmarked: each needs `@objectstack/core` or a project-local name, or is a fragment, and the example checker resolves `@objectstack/spec` only.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the `conditionalRequired` → `requiredWhen` rule and the flow `runAs` rule for `readonly` fields each keep one home
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The removed `conditionalRequired` alias was stated in three skills. `objectstack-data` § Conditional Field Rules keeps it. `objectstack-formula` § 3 Predicate drops its copy for a one-line link to that section, and `objectstack-ui` § Field Conditional Rules in Forms drops its copy and turns its existing plain-text pointer to the same section into a real link. The rule that a flow maintaining a `readonly` field runs `runAs: 'system'`, and that `os validate` / `os build` fail a `runAs: 'user'` `update_record` writing one, was stated in `objectstack-data` and `objectstack-automation`. `objectstack-automation` § Failure routing & `runAs` keeps it, and the `readonly` bullet in `objectstack-data` now links there. The data bullet keeps what only it says: REST/UI writes are stripped too, system hooks, seeds, imports and migrations are exempt, and the field stays `readonly` when automation maintains it. No rule's teaching changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
---
4+
5+
feat(automation): the flow credential channel reads and writes by package, so each slot of a flow name two packages hold reads its own package's credentials (ADR-0150 D8 row R9, part of #31696)
6+
7+
Clause-②: yes (widening)
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 is removed or renamed. The credential reads widen (a shared slot's read is now answered), and the save refusal relaxes, so there is nothing for a migration to rewrite and no tombstone. -->
11+
12+
- `FlowCredentialChannel` now declares `readsByPackage = true`. Its index is keyed by flow name and package (`sys_flow_credential.flow_package`), so a credential read for a slot of a name two packages hold (an http node's signing secret, an inbound hook's secret) is answered by that package's rows only. It used to be refused. Under two holders a row naming no package (one the boot backfill could not attribute, or one written before this release) belongs to no slot anyone can tell, so it fails closed for every slot: it reads as held, and its read is refused with `FlowCredentialUnresolvableError` (503) naming the flow, so an http node is refused and sends nothing rather than falling back to its literal or going unsigned.
13+
- Each row the save door writes is stamped with the flow's one package holder. The plugin passes the engine's `flowHolderPackage` as the channel's new optional third constructor parameter (`holderOf`); existing two-argument callers keep compiling.
14+
- Under a name two packages hold, a save or a publish never reads a holder's row, so it never rewrites or removes another package's credential. A save that sets a credential there, clears one where a row of any package stands, or would delete a row naming no package, and a publish that would promote, consume or remove a row naming no package, are refused with `RESOURCE_CONFLICT`, naming every holder, before anything is written. A save that drops a position where only a holder's row stands no longer is (that row stays), and a save that touches no row still saves.
15+
- A slot's run history is no longer cut short by another slot's newer runs of the same name: the store's window widens until the slot's own `limit` rows are in it or the store has no more.
16+
- A stored run naming no package, written back while one package's slot holds a name the registry holds twice, keeps naming no package instead of being stamped with that slot's package.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
'@objectstack/trigger-api': patch
4+
'@objectstack/trigger-schedule': patch
5+
'@objectstack/runtime': patch
6+
---
7+
8+
feat(automation): triggers and the inbound hook dispatch by slot, so each package's flow of a name two packages hold is armed on its trigger and reached by its own hook (ADR-0150 D4/D5, part of #31696)
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: none
12+
13+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export is removed or renamed. A slot of a shared name that was declined at arming is now armed, and every hook answer a post could already get is unchanged (the bare hook of a shared name still answers the one 401), so there is nothing for a migration to rewrite and no tombstone. -->
14+
15+
- **Triggers.** A trigger now arms each slot of a flow name two packages hold under the slot's key (`PACKAGE/NAME`) and fires that slot's own body. It never re-resolves the bare name at fire time. Before, both slots were declined at arming, each with a warning. A name one package holds keeps its bare binding and its run unchanged. The one slot left when the registry holds a name twice but one body was refused stays declined, behind the same warning.
16+
- **Re-arming.** When a second package's flow of a name arrives, the incumbent's binding is released before it is armed under its qualified key, and the reverse happens when that package leaves. An event the released binding still delivers (a job whose cancel has not landed) runs nothing, so each slot fires once across the re-arm window. A schedule job is `flow-schedule:NAME` while one package holds the name and `flow-schedule:PACKAGE/NAME` for each slot of a shared one. The run reads the flow's own name in `params.flowName`, never a slot key.
17+
- **Dispatch keys.** `AutomationEngine.flowDispatchHolder` answers a slot key with the slot's package, `claimBare: false`, and the flow's `name`. The schedule and time-relative triggers spell the dispatch key with that name (`schedule:PACKAGE:NAME:WINDOW`), which is the key the same slot claimed while it held the name alone. The `name` member is optional on both triggers' structural interfaces.
18+
- **Inbound hook.** The new `AutomationEngine.inboundHookSlot(flowName, address?)` says which slot's hook an address reaches. It answers `undefined` for any other name, and those addresses are judged exactly as before.
19+
- The qualified hook `/api/v1/automation/hooks/:ns/:flowName/:hookId` serves its namespace's slot. Its secret is read by slot through the flow credential channel.
20+
- The bare hook of a shared name names neither flow, so it answers the door's one refusal (401), exactly as before this change and as every unverified post is answered; nothing is enqueued. Its cause (`shared-name`) and both holders are written to the server log only. ADR-0150 D5's `409` naming the holders does not apply to this anonymous door, whose answer never says whether a flow name exists or which packages are installed.
21+
- A qualified address no slot answers, and a slot key in the name position, get the hook's one unverified answer (401).
22+
- The self-hosted mount and the `trigger-api` member both route this way. The hosted face (`@objectstack/runtime`) routes the qualified address and serves a routed slot through the service's new `handleInboundSlotHook` door (not on the `ITriggerApiService` contract). Its bare route still reads no service before the member.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/plugin-audit': minor
4+
'@objectstack/platform-objects': patch
5+
---
6+
7+
feat(plugin-audit): seal audit-class objects that declare `lifecycle.seal` into signed, chained checkpoints
8+
9+
Clause-②: yes (widening) (a new optional key; its refusals bind only an object that declares it, and none does)
10+
Metadata-protocol: added (`lifecycle.seal` joins the ADR-0057 lifecycle block)
11+
12+
The third slice of ADR-0154. No object opts in by default: `sys_audit_log`'s own `lifecycle.seal` comes with expiry amendments, in a later release, so nothing is sealed until an object declares the key.
13+
14+
- **`@objectstack/spec`.** `lifecycle.seal = { valueFields: string[] }` opts an `audit`-class object into tamper evidence. Refused at parse time, each with its reason: `seal` on another class, a `valueFields` name that is not a declared field or is `id` or `created_at`, and beside `seal` a `retention.onlyWhen` or `ttl.onlyWhen`, a `ttl` on a field other than `created_at`, or rotation `storage`. Until expiry amendments ship, the retention sweeper still deletes sealed rows, which then read as missing. `ICryptoProvider.rotateKey`'s `audit_seal` reason now says which handle sits in a signed body (the seed's) and which does not (the signing key's private half), and `AuditCheckpointSinkEntry` lists every member a sink receives.
15+
- **`@objectstack/plugin-audit`.** The sealer starts at `kernel:ready`. Each hour of `created_at` is sealed ten minutes after it ends, under the cluster lock `audit.sealer` (an in-process lock when no cluster service is registered): one checkpoint per organization and one for rows about no organization, each with a Merkle root, the previous checkpoint's digest, the sealed-through watermark and the lock's fencing token, signed with the deployment's Ed25519 key. Late rows of the last seven days are sealed as `late` checkpoints first; rows that existed before sealing started are sealed oldest first, archived rows included. The key is created on first use, its private half sealed under the crypto provider, and its creation recorded as one `audit_signing_key_change` ledger row. Every column type has one canonical spelling or none: an object with a column of no rule (`password`, `secret`, `formula`, `summary`, or a file type), or with no `tenant_id` field, is not sealed. Compose a crypto provider with the new `AuditPluginOptions.cryptoProvider`; without one, nothing is sealed and that is reported at `error`, again each hour while it lasts.
16+
- **`@objectstack/platform-objects`.** `sys_secret`'s source comments name the audit sealer as its fourth producer.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/objectql': minor
3+
---
4+
5+
feat(objectql): a child amount follows its parent's currency through its master_detail, a summary through that master_detail rolls up in the parent's currency, and the parent's code locks while a child follows it (ADR-0144 D2 and D6, amended)
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added
9+
10+
The engine half of the ADR-0144 amendment (ruling A on #31743). The spec half landed in #31910: `currencyField` may name `MASTER_DETAIL.CODE`, and a `summary` through that `master_detail` declares `currencyConfig: { currencyMode: 'record', currencyField: CODE }`. Until now the engine refused or misread both.
11+
12+
- **The write path reads the parent's code.** A `record`-mode amount whose `currencyField` is `invoice.currency_code` reads its currency from the parent the row names in `invoice`. The engine reads it once per batch, under the write's elevated read, which keeps the organization. The blank-code guard (`ERR_CURRENCY_CODE_REQUIRED`) refuses a line with an amount under a parent with no code, naming `invoice.currency_code`. The home projection converts the line from the parent's code at the line's document date. Moving a line to another parent re-converts it from that parent's code, as writing a sibling code does. The parent is read through the writer's own read door first. A parent it does not return (one the writer may not read, one in another organization, one that does not exist) gets the reference check's `reference_not_found` on the `master_detail` field, before any currency verdict, so no answer names a currency of a row the writer cannot read. A system writer's parent that is not there reads as no code, and the amount is refused. An update that would convert the line again (its document date) judges its parent too, so no following amount is stored without a currency. This holds on insert, batch insert, the by-id and predicate updates, and the `validate()` preview.
13+
- **A `summary` through that `master_detail` registers.** The amount must follow the parent through the very relation the roll-up reads (`relationshipField`, or else the child's one relation back to the parent). Each parent then totals only its own lines, in its own currency: USD 100 and JPY 15000 under two invoices are two subtotals, never 15100. The exported `aggregateSummaryValue` admits such an amount only for one concrete parent id; an operator such as `{ $ne: null }` asks the aggregate as any caller does, and is refused. A roll-up through any other relation, over an amount that follows another object, or one level up over a parent's roll-up keeps the `INVALID_METADATA` / 422 refusal.
14+
- **An aggregate over such a line amount is refused whatever it groups by.** That covers `INVALID_FIELD` / 400, the ADR's Open item 14 reading. The engine reads a group key `invoice.currency_code` as a column of the line, which no line stores, so USD 100 and EUR 100 summed to 200 in one null group. Grouping by `invoice` is a maintainer ruling the ADR leaves open, so it stays refused. The remedy names the stored home field or the parent's roll-up. A `summary` declaring `currencyMode: 'record'` is judged like a record-mode amount: a raw aggregate over it groups by the parent's code field.
15+
- **The parent's code field locks once a child row follows it.** An update that changes a parent's code to another code or to blank is refused `VALIDATION_FAILED` / 400 before anything is written. It carries one `invalid_value` finding on the code field, naming the child objects whose rows follow it. A deleted child row in the recycle bin still counts until it is restored or purged. Writing the same code again passes, and so does a first code over a blank one. The lock lifts once no child row follows. It holds on the by-id and predicate updates and the `validate()` preview, so REST, import, flows and bulk updates all meet it.
16+
- **`os migrate recompute-home-amounts` handles a path pointer.** It reads the `master_detail` column instead of projecting the dotted pointer, which the read door refused with `INVALID_FIELD`. It converts each line from its parent's code. A line whose parent holds no code is listed `code_blank`, with the parent's code field as the remedy. The `currency_field_repointed` 409 already named this command for a path pointer, and is now true.
17+
- **`os migrate record-currency-codes` refuses a path pointer** with `INVALID_FIELD` / 400, before any row is read: such an amount stores no code on its own object. The remedy is the parent's code, and a first code over a blank one is always accepted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@object-ui/console': patch
3+
'@object-ui/auth': patch
4+
'@object-ui/i18n': patch
5+
'@objectstack/service-settings': patch
6+
'@objectstack/platform-objects': patch
7+
---
8+
9+
fix(console): a clean self-hosted install reads as a first run — the sign-in page leads with creating the owner account, sign-up says every problem inline at once, Home says each item once, and a wrong password on a box with no mail points to the administrator
10+
11+
Clause-②: yes (widening)
12+
Metadata-protocol: none
13+
14+
What a visitor and an administrator see on a fresh deployment (objectstack#32021):
15+
16+
- **Sign-in on a box nobody has an account on.** The page asked the first visitor "Welcome back". When `GET /api/v1/auth/bootstrap-status` answers `hasOwner: false` (the probe that already switched the card's footer between "Sign up" and "Have an invitation?"), the card is now titled "Set up this deployment" and leads with a "Create the owner account" button, with the sign-in form below it. The probe now runs for every posture that offers a form to a visitor not invited, not only `invite_only`. A probe that fails, or a box that has an owner, keeps "Welcome back" exactly as before.
17+
- **Sign-up.** `RegisterForm` is `noValidate` and checks every field on submit, so the browser's one-at-a-time bubble (in the browser's language) is gone, and a short password that also does not match shows both messages together, each under its own field with `aria-invalid` and `aria-describedby`. Three new labels, `nameRequiredError`, `emailRequiredError` and `emailInvalidError`, carry the empty-name, empty-email and malformed-email messages; the minimum stays 8, as the auth config serves none. The banner still carries what the server refuses.
18+
- **Home.** "No email service is set up" and "Connect an AI assistant" are each said once: the deployment notice keeps its email line (what it says and who sees it are ruled, objectstack#30120), and the first-run checklist leaves its Email delivery row out while that line is drawn; the checklist's assistant row, while it is not done, stands in for Home's Connect an AI Assistant card, which members (who get no checklist) still see. The notice now uses the same 1120px width as the rest of Home, and the checklist sits closer under it, so "Your apps" is not pushed below the fold.
19+
- **The checklist's assistant row** says it is about an external AI assistant over MCP, and that the built-in AI is set up separately.
20+
- **A wrong password with no mail transport.** When `/api/v1/auth/config` reports `features.emailDelivery: false`, the refusal says to ask the administrator to reset the password, instead of pointing to a reset email that never arrives.
21+
- **zh-CN wording.** The checklist names the current language and country in the reader's language; the managed-by note says 账号系统 instead of 「经身份服务写入」; and the AI settings page translates Embedder, Trace, Prompt and PII (向量化, 请求追踪, 提示词, 个人敏感信息).
22+
23+
New `@object-ui/i18n` keys, in every pack: `auth.login.firstOwner.{title,description,createButton,signInDivider}`, `auth.login.errors.invalidCredentialsNoMail`, `auth.register.{nameRequiredError,emailRequiredError,emailInvalidError}` and `auth.register.firstOwner.{title,description}`. Nothing is removed or renamed.

0 commit comments

Comments
 (0)