Skip to content

Commit 9782f9e

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-lgpfso
2 parents ab483c1 + 2d52e29 commit 9782f9e

53 files changed

Lines changed: 2256 additions & 159 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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@objectstack/plugin-approvals': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
An approver's agent can now decide a pending approval request over MCP. The four approver decisions on `sys_approval_request` (approve, reject, reassign, send back) declare `ai: { exposed: true, description, requiresConfirmation: true }`, so `list_actions` lists them and `run_action` runs them once the call carries `confirm: true`. Each forwards to its approvals route as the caller, so the approval service admits the same people the console's buttons admit: a current approver of the request, and, for approve, reject and reassign, the administrator who may override it. Anyone else, the submitter included, is refused and the request stays pending. The submitter's levers, request-info and comments stay unexposed.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
'@objectstack/formula': minor
3+
'@objectstack/spec': patch
4+
---
5+
6+
fix(formula)!: the gate refuses a date or datetime field handed straight to a call that takes a timestamp, which faults wherever the field's text reaches it, and stops refusing its concatenation with text and its ordering against a literal (#32595)
7+
8+
Clause-②: no (narrowing) — the author-time gate (`os validate`, `os build`, `os lint`, the object save door and the other doors of the active authoring gate) refuses a call on a date or datetime field it passed before. The two refusals it drops (concatenating a date field with text, ordering one against a text literal) are behaviour the published text already declares accepted: the `registerDateTextOverloads` docblock in `packages/formula/src/cel-engine.ts` ("ordering against another date field or a text literal → string-lex", "`+` with text … → string concatenation") and this package's 18.3.0 changelog entry for #28944 (51058ef: "Date comparisons (`<`, `==`, against a literal, against `today()`), concatenation, … all stay accepted"). Nothing is newly accepted.
9+
Metadata-protocol: narrowed
10+
11+
<!-- adr-0087: registered formula-date-text-call-refused -->
12+
13+
**BREAKING** accept-set narrowing at the authoring type-soundness gate (`@objectstack/formula` `validateExpression`), shipped as `minor`. The gate declared a `date` / `datetime` field a CEL Timestamp, so `isoDate(record.start_at)` and `record.start_date.getFullYear()` checked clean. The SQL driver's read doors (ADR-0053 D-F1) and a write that hands the value as text (every JSON body) give the evaluator a date field as its `YYYY-MM-DD` text and a datetime field as its ISO-8601 instant text, and there the evaluator finds no overload for the call, on every record whose value reaches it.
14+
15+
- **Before.** A formula `isoDate(record.start_at)` built green and read `null` on every record whose value reached the call as text, with a server WARN as the only trace. A validation rule `!startsWith(isoDate(record.start_at), "2026")` published clean and then refused every such write as unevaluable, because a validation rule fails closed. A fail-open predicate of the same shape never fired. `isoDatetime(...)` and the Timestamp methods (`getFullYear()`, `getHours()`, …) on a date field behaved the same.
16+
- **Now.** The same expression is refused (`severity: error`) under the new code `date-text-call`, or `date-text-call-fail-closed` / `-fail-open` / `-run-fails` / `-run-may-fail` where the site's fault outcome is known. The message names the call and the field, says what the fault does at that site, and prescribes the rewrite with the field parsed by `date(…)` first. The gate checks the rewrite clean before it prescribes it. `params: { call, reference, rewrite }`.
17+
- **No longer refused.** `record.title + " " + record.start_at` and `"Due: " + record.end_date` (concatenation), and `record.start_date < "2026-12-01"` (ordering against a text literal), evaluate to a value at runtime. The gate refused them as `type-mismatch-fail-closed` at a fail-closed site and warned `type-mismatch` elsewhere. They are clean now, as the declared text above says.
18+
- **Unchanged.** Ordering a date field against text that is not a literal keeps its `type-mismatch` verdict, because no declared text covers it: a text field read directly (`record.title < record.start_at`) or through a ternary, and text computed by `+`, `upper(…)`, `string(…)` or `isoDate(…)` (`record.start_date < isoDate(today())`). Date arithmetic keeps its `date-arithmetic` / `date-text-arithmetic` / `date-duration-value` refusals word for word. `daysBetween`, `addDays`, `addMonths` and comparison against `today()` stay accepted.
19+
- **Also refused: a guarded call.** `record.start_at != null && isoDate(record.start_at) == "2026-11-16"` evaluates to `false` on a row without a value and faults on every row with one, so it is refused like the bare call; the rewrite keeps the guard.
20+
- **Where a date-time arrives as a JS `Date`.** A server-side writer that hands a `Date` (measured through the engine), or a MongoDB read, whose storage form for a datetime is a BSON `Date` (not measured end to end), gives the evaluator a Timestamp, and there the refused call evaluates. The refusal applies there too. The prescribed rewrite reads the same value on the text and on a `Date`, so rewriting changes no value that worked.
21+
- **Who sees it.** An author whose expression hands a date field straight to `isoDate`, `isoDatetime` or a Timestamp method. On an SQL-backed object written through the API, that expression already read `null` or refused the write wherever the field had a value. No expression shipped in this repository's `packages/`, `examples/`, `skills/` or `content/docs/` has this shape.
22+
- **`@objectstack/spec`.** The upgrade guide entry `formula-date-text-call-refused` (a semantic migration: the rewrite is shown per call in the refusal, and it reads the same value on both shapes the field arrives in).
23+
24+
## FROM → TO
25+
26+
```ts
27+
// before: built green, read null wherever the field's text reached the call (a validation rule refused the write)
28+
day: Field.formula({ expression: 'isoDate(record.start_at)' }),
29+
year: Field.formula({ expression: 'record.start_date.getFullYear()' }),
30+
31+
// after: parse the field's text into a timestamp first
32+
day: Field.formula({ expression: 'isoDate(date(record.start_at))' }),
33+
year: Field.formula({ expression: 'date(record.start_date).getFullYear()' }),
34+
```
35+
36+
`date(…)` keeps a datetime's instant, so `isoDatetime(date(record.start_at))` and `date(record.start_at).getHours()` read the value they were written to read.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/runtime': patch
3+
---
4+
5+
fix(runtime): on a multi-kernel host, a same-origin `type: 'api'` action called through `dispatchAction` forwards into the environment the call ran in
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **The forward is placed where the call ran.** `dispatchAction(hostKernel, { environmentId, … })` places the call on the environment's own kernel, and a same-origin `type: 'api'` action then forwards into the host's raw app, which places the forwarded request as it places any request. A REST request placed by its hostname or its `X-Environment-Id` carries that signal into its forward; the host door's request carried neither, so the forward arrived as `Host: localhost`, landed in no environment, and its target answered the caller `401` where the REST door answered `200`. On a host with a `kernel-resolver`, the forward now carries the environment the resolver placed the call in as `X-Environment-Id`. It is the resolver's answer: when the resolver placed the call in an environment, an `X-Environment-Id` in `credentialHeaders` is replaced by it. A call placed in no environment, or in `platform` (the control plane), and every call on a host with no `kernel-resolver`, forwards exactly as before.
11+
- **An environment's own kernel still cannot forward.** Handed to `dispatchAction`, a kernel with no HTTP server (an environment's kernel on a multi-kernel host owns no socket) refuses a same-origin `type: 'api'` action `503 SERVICE_UNAVAILABLE`, as before. The sentence at this door now names the remedy: pass the kernel your HTTP door is served from, which on a multi-kernel host is the kernel that registers `kernel-resolver`, with the call's `environmentId`. The REST and MCP doors keep their sentence.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
fix(app-shell): on a phone, a record-drawer link that carries a related-record form opens that form over the record page
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A phone draws no record drawer: it answers a `?recordId=` link with the record's page in the list's place. A link that also named a record form (`?form=new&formObject=…&formLink=…`, as a desktop writes it when a related record is created from the drawer) lost those parameters on the way, so the form closed a moment after it opened and the reader was left on the record page. The record page now carries the form's parameters, and the seeded create values of the history entry, so the form stays open over it; the list kept as the page's way back no longer names the form. A link with no form is answered exactly as before.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/mcp': patch
3+
---
4+
5+
feat(mcp): a host that mounts a build door can tell a connection that cannot build how to get one that can — `dataOnlyInstructions` on the authoring injection and on `renderSkillMarkdown` (#32766)
6+
7+
Clause-②: yes (widening) — one optional member joins two exported shapes: `McpAuthoringInjection.dataOnlyInstructions` (the `authoring` option of `MCPServerRuntime.handleHttpRequest`) and `RenderSkillOptions.dataOnlyInstructions`. A host that passes neither gets the same tools, the same `SKILL.md` bytes and the same instructions selection as before; only the built-in default sentence changes (below).
8+
Metadata-protocol: none
9+
10+
- **`initialize` instructions.** A request whose grant does not admit the authoring family (a `data:read`, `data:write` or `actions:execute` token, an empty grant, or the undefined grant of an API key or a session) is now answered with the injection's `dataOnlyInstructions` when the host supplies them. A request whose grant does admit the family still gets the injection's `instructions` and never sees the data-only text. Either one omitted or blank falls back to the runtime's configured `instructions`, then to the default. The text rides the authoring injection on purpose: only a host that injects an authoring registry, that is, one that mounts a build door, can serve it. To reach API-key and session requests, such a host passes the injection on every request it serves; for those grants the registry registers nothing and the injection's `principal` is not read.
11+
- **`SKILL.md`.** `renderSkillMarkdown({ dataOnlyInstructions })` renders the host's text as its own block after the tool list, only when `authoringTools` names at least one tool and `grantedScopes` do not admit the family: the exact complement of the authoring section. Without authoring tools, which is how the public `GET /mcp/skill` route renders it, the skill is byte-identical to before.
12+
- **Default instructions over HTTP.** With no host text and no configured text, `initialize` now answers "ObjectStack MCP Server. The tools this connection lists depend on what its credential was granted." The old sentence said every connection could query and modify data, which a `data:read` token cannot modify and a `metadata:write`-only or `actions:execute`-only token cannot even query. The new one promises no building, so it stays true on a deployment without a build door. A host that pinned the old sentence should configure `instructions` explicitly.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): objectstack-automation teaches the namespace-qualified inbound hook of a flow name two packages hold
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-automation/SKILL.md` § Inbound webhook (`api`) triggers gains one line. For a flow name two packages hold, the bare hook `POST /api/v1/automation/hooks/:flowName/:hookId` answers `401 INVALID_SIGNATURE` to every post, whatever the signature, and the cause goes to the server log only. Each package's flow is reached only at `POST /api/v1/automation/hooks/:namespace/:flowName/:hookId`, where `:namespace` is its package's `manifest.namespace`; `_env` in that position names a flow no package ships. A name one package holds is served at the bare hook as before, and the line does not say otherwise.
11+
12+
Paid for inside the file's token ceiling, which does not move (6854 -> 6854 of 6861), by nine restatements cut from the same file, each keeping its other home:
13+
14+
1. The `parallel` row's "no split/join pair to mis-wire": the same cell's "joined implicitly at block end", and the `parallel_gateway` / `join_gateway` row ("Not author-facing … author the container").
15+
2. The `connector_action` row's "nothing sent": the same sentence's "judged against the action's `inputSchema` … before dispatch: a breach fails the step".
16+
3. The fault-edge note's "`type: 'fault'` is what routes": the sentence before it ("`{ source, target, type: 'fault' }` routes a failed node to a handler").
17+
4. The `readonly` note's "the value never lands": the same sentence's "the engine strips it" and "the drop is named in the step's warnings".
18+
5. Filter operands' "a literal or a CEL envelope": Valid-but-silently-wrong #1 ("A value slot takes a literal or a CEL envelope"), which lists every CRUD `filter` operand as a value slot.
19+
6. Valid-but-silently-wrong #2's "writes the whole record object": the item's opening sentence ("holds the created RECORD, not its id").
20+
7. The `defineStack({ functions })` example's "declared writer" comment: the sentence above the block ("A function that writes where the platform cannot see declares it") and the `effect: 'writes'` it annotated.
21+
8. Valid-but-silently-wrong #4's "write the `value` in the `condition` AND every `fields` / `filter` entry": the item's opening sentence ("compared and written by its option `value`, never its label") and its `condition` and `fields` / `filter` examples.
22+
9. Integrations' "(OpenAPI, remote MCP, plain REST)": the same sentence's `provider: 'openapi' | 'mcp' | 'rest'`.
23+
24+
No rule's teaching changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/service-settings': patch
3+
---
4+
5+
fix(service-settings): the deployment notice no longer reports an unset mail transport
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`GET /api/settings/deployment/notice` used to add an `email_not_configured` finding whenever the email service did not report a configured transport. Mail is an optional setting, and the notice should speak about mail only when something needs mail and cannot send it; nothing states that today, and the flows that send mail, such as invitations and password reset, already read the transport themselves. The finding is gone: a production deployment without mail gets no mail line, and the notice's `fingerprint` no longer names it.
11+
12+
Configuring mail therefore no longer changes the fingerprint, so a notice an administrator hid stays hidden when mail is set up later. One-time effect of the upgrade: a hide recorded against a fingerprint that still named `email_not_configured` no longer matches, so that notice shows once more on its remaining findings until it is hidden again. The Console stopped drawing this finding in an earlier change; no other platform reader names it.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/plugin-email': patch
3+
---
4+
5+
feat(plugin-email): `GET /api/settings/mail` states the provider in use as `live.provider`
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: none
9+
10+
The mail page's live status now carries the provider in use, served as the page's `live.provider` in the shape the `ai` namespace's runtime already uses: `{ value, source }`, `value` one of the `provider` options. New served keys: `live`, `live.provider`, `live.provider.value`, `live.provider.source`.
11+
12+
- `{ value: null, source: 'none' }` while the live transport is the development log (no mail leaves the machine).
13+
- `{ value: 'smtp' | 'resend' | 'postmark', source: 'settings' }` when the transport was built from the `mail` settings namespace (saved, or `OS_MAIL_*`-locked).
14+
- `{ value: 'smtp' | 'resend' | 'postmark', source: 'environment' }` when the boot built it (the stack's `email` block, `OS_EMAIL_*`) or the host handed over a stock transport.
15+
- Not stated (no `live` key) when the host's own transport class is live, which no `provider` option names; when something other than this plugin swapped in a delivering transport; or when a save could not build what the namespace now resolves and an earlier save's transport stays live. That is unknown, which a reader tells from `none`; a live development log reads `none` whoever installed it.
16+
17+
The banner the page already shows (`label`, `bannerSeverity`, `bannerText`) is unchanged. A reader such as the console's first-run checklist can now read mail as configured from what is live rather than from what is saved.
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 objectstack-ui skill states the one-app-per-package rule for app and module packages alike
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-ui/SKILL.md` § App Navigation said `defineStack` refuses a second app "in a `type: 'app'` package", which let an author conclude that a `type: 'module'` package may carry several apps. `defineStack` refuses a second app in a module package too (`STACK_SINGLE_APP_VIOLATION`, ADR-0019 (app-as-consumer-unit) D3 as amended), so the paragraph now names both package types and the remedy: each further app goes in a module of its own with the objects it shows. Growth is paid in the same file by deleting the restated tail of Common Pitfalls 2; the file's token count is unchanged at its ceiling.

0 commit comments

Comments
 (0)