Skip to content

Commit 36a84e0

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-54kzzv
2 parents 1eedd80 + cd6618e commit 36a84e0

81 files changed

Lines changed: 3099 additions & 380 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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@object-ui/collaboration': patch
3+
'@object-ui/components': patch
4+
---
5+
6+
refactor(collaboration, components)!: retire two zero-consumer type exports from the package entries (`CollaborationTranslate`, `MobileDialogContentProps`)
7+
8+
Clause-②: no (narrowing)
9+
Metadata-protocol: none
10+
11+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/collaboration#CollaborationTranslate, @object-ui/components#MobileDialogContentProps) the retired operands are two TypeScript type aliases, the translate-function type of the collaboration package's i18n hook and the props type of the components package's mobile dialog content; nothing in the workspace or in hotcrm imports or names either outside its package, and no packages/spec schema, registered node type, conversion surface or stored shape names them, so there is nothing for `objectstack migrate meta` to rewrite -->
12+
13+
**BREAKING** for a host that imports `CollaborationTranslate` from `@object-ui/collaboration` or `MobileDialogContentProps` from `@object-ui/components`. Neither had an importer or a mention anywhere outside its package, in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected. Nothing renders differently.
14+
15+
Both stay in their modules, which their package's own code still reads; only the entries stop publishing them:
16+
17+
- `CollaborationTranslate` types the `t` that `CommentThread` and `PresenceAvatars` pass to their timestamp and status helpers.
18+
- `MobileDialogContentProps` is the props type of `MobileDialogContent`, and the props stay recoverable as `React.ComponentPropsWithoutRef<typeof MobileDialogContent>`.
19+
20+
Every other name the two entries exported stays exported unchanged, among them `useCollaborationTranslation`, `COLLAB_DEFAULT_TRANSLATIONS`, `CommentThread`, `PresenceAvatars` and `MobileDialogContent`.
21+
22+
What leaves, and what to write instead:
23+
24+
- FROM `CollaborationTranslate` TO `ReturnType<typeof useCollaborationTranslation>['t']`, the expression the type was defined as.
25+
- FROM `MobileDialogContentProps` TO `React.ComponentPropsWithoutRef<typeof MobileDialogContent>`.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/service-settings': patch
4+
'@objectstack/objectql': patch
5+
---
6+
7+
feat(spec): a `map` settings specifier for keyed rows; the data lifecycle retention overrides, row quotas and per-class quota defaults use it, and both settings doors judge them
8+
9+
Clause-②: yes (widening) — `SpecifierType` gains a member; the save and env doors also start refusing malformed values for the three keys (a narrowing on values that never took effect, named in the PR's BREAKING note)
10+
Metadata-protocol: added — a package author can now declare a `map` specifier in a settings manifest (a new accepted value of `SpecifierType`)
11+
12+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is removed, renamed or re-shaped: `SpecifierType` gains `map` and `Specifier` gains the optional `keyColumn` and `columns`. The three lifecycle keys keep their stored shape, their env variable names and their cascade. What narrows is the set of values the settings doors accept for those three keys: a stored value is runtime state in `sys_setting` / `sys_platform_setting` and an `OS_LIFECYCLE_*` override is a deployment's environment, so there is nothing for a migration to rewrite, and every refused value is one the sweep never applied. -->
13+
14+
**New: the `map` specifier** (`@objectstack/spec`, ADR-0007 as amended 2026-11-08). A setting whose value is keyed rows declares `type: 'map'` with a `keyColumn` (its header) and `columns` (`{ name, label, kind }`, `kind` is `duration` or `positive_integer`). One value column stores `Record<key, value>`; several store `Record<key, { [column]: value }>`. The keys a map admits are served at run time by an option source the settings service registers for the key, never listed in the manifest. `json` stays for raw config.
15+
16+
**`lifecycle.retention_overrides`, `lifecycle.quotas` and `lifecycle.quota_defaults` are `map` specifiers** (`@objectstack/objectql`). Stored values, `OS_LIFECYCLE_*` names and the env, global, organization cascade are unchanged, and the sweep reads the same shapes. Their keys are served from the running system: the objects that declare a lifecycle class other than `record` for the first two, the lifecycle classes other than `record` for `quota_defaults`.
17+
18+
**BREAKING** accept-set narrowing at the settings doors (`@objectstack/service-settings`), for those three keys only.
19+
20+
- **Before.** `PUT /api/settings/lifecycle` and `OS_LIFECYCLE_*` accepted any object under them: a misspelt object (`sys_audit_logs`), a quota written as text (`"1e6"`) or zero, a window written as `30 days`, a column misspelt (`max_age`). Each was stored, answered "saved", and the sweep silently applied nothing for it.
21+
- **Now.** The save door refuses such a value with `400 SETTINGS_VALIDATION` and one field error for the key, which names the entry and the expected form: `invalid_option` for a key the running system does not have, `invalid_shape` for a cell that is not a duration such as `7y` or a whole number above 0, `unknown_field` for a property no column declares, `invalid_type` for a value that is not an object (JSON text included). The env door rejects such an override with one `error` line, and the key resolves from the next layer of the cascade. A value already stored is not judged until a save touches its key.
22+
- **Who moves.** Nobody whose values took effect. A script or a deployment that wrote one of the refused values was configuring nothing; the refusal now says so. Durations take `h`, `d`, `w` or `y` (`90d`, `7y`), quotas a whole number above 0, and keys are the object names (or classes) the refusal lists.
23+
24+
**The remedy.** Send keys the deployment has and cells in their column's form: `{ "quotas": { "sys_audit_log": 1000000 } }`, `{ "retention_overrides": { "sys_job_run": { "maxAge": "90d" } } }`; for an override, `OS_LIFECYCLE_QUOTAS='{"sys_audit_log":1000000}'`.
25+
26+
**The console.** Until its `map` control lands (a separate change), Setup → Data Lifecycle draws these three keys as an unsupported specifier type; env overrides and the API are unaffected.
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): objectstack-automation carries the flow-authoring judgment the hosted build agent learned — option values in conditions and writes, a named hour with its time zone, who an approval-outcome cascade runs as
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Card 1 of the cloud#3659 ruling A split, the `objectstack-automation` port — the judgment the schema cannot express and the published skill did not yet state. `SKILL.md` § Valid-but-silently-wrong: a `select` is compared and written by its option `value`, never the label the request speaks, in the start `condition` and every `fields` / `filter` entry. `references/examples-flows.md`: a wall-clock hour the request names is written as said with its IANA `timezone` on the start node's `config.schedule`, never converted to UTC by hand (a bare expression runs in UTC and records no zone); the schedule example carries one. `references/state-machines-and-approvals.md`: a flow reacting to the mirrored `approvalStatusField` runs as the person who acted and stays `runAs: 'user'`; only the SLA auto-decision and the dead-run release carry no user, so a flow that must react to those declares `runAs: 'system'` — the hosted corpus's blanket "declare system" is corrected against the approval service on `main`. The same file's three Chinese glosses are gone: the shipped skill text is English-only. Three eval cases pin the teachings (flows-triggers-approvals 17–19).
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
fix(spec)!: the flow parse refuses a start node's `config.filter` beside `config.timeRelative`, and a `config.schedule` the schedule readers cannot use
6+
7+
Clause-②: yes (narrowing) — `FlowSchema` refuses two start-node `config` shapes it accepted before, at every door that parses a flow; `@objectstack/spec/automation` also exports `flowStartConfigRefusals`, `flowStartScheduleReadsNothing` and the `FlowStartConfigRefusal` type.
8+
Metadata-protocol: narrowed
9+
Skills-docs: none — `skills/**` and `content/docs/**` teach `timeRelative.filter` inside the descriptor and typed `{ type: 'cron', expression }` schedules, which this accepts. The generated `skills/objectstack-automation/references/_index.md` gains the source files the flow closure now reaches (`system/job.zod.ts` and its imports).
10+
11+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed or renamed: FlowNodeSchema.config stays an open record, and the parse now refuses two shapes on it. The filter arm refuses an undeclared key on that open-record config: the published time-relative descriptor declares filter inside timeRelative and nowhere else, so filter beside timeRelative was never a declared shape and no protocol step migrates from it (the #4277 class). The schedule arm refuses values the published ScheduleSchema refuses, or that the schedule reader reads nothing from. Each refusal message names the cure at the refused key. -->
12+
13+
**BREAKING** accept-set narrowing of `FlowSchema` (every door that parses a flow: `defineStack`, `os validate` / `os build`, the metadata save door including drafts, publish, and the automation engine's registration).
14+
15+
- **`config.filter` beside `config.timeRelative`.** Before, it parsed and nothing read it: the time-relative sweep reads its row filter from `timeRelative.filter`, so the flow launched for every record in the date window. Now it is refused at `nodes[i].config.filter`, when `config.timeRelative` is an object (the start node the engine routes as a sweep); a `timeRelative: null` start node is not judged.
16+
- **A `config.schedule` the readers cannot use.** Both readers (the schedule trigger, and the time-relative sweep's cadence) pass it through `normalizeSchedule`. When that reads nothing, a schedule flow stays unbound (one warn in the server log) and a sweep falls back to daily 08:00 UTC. Now, at `nodes[i].config.schedule`:
17+
- an object carrying `type` is judged against the published `ScheduleSchema` (the discriminant, a cron `timezone` that is an IANA zone, a positive integer `intervalMs`, an ISO `at`), and then for being readable at all (a cron `expression` written as an envelope is not). The schema does not declare the aliases `cron` and `every` on a typed object, so the two typed aliases the reader happens to bind today, `{ type: 'cron', cron }` and `{ type: 'interval', every }`, are refused too, and the refusal names the declared spelling (`expression`, `intervalMs`). Neither occurs in objectstack or hotcrm;
18+
- any other value is refused only when the reader reads nothing from it (an empty string, `{}`, `{ cadence: 'daily' }`, a number, an array, a non-positive interval);
19+
- accepted as before: a bare cron string, and the untyped aliases the reader takes (`{ cron }`, `{ expression }`, `{ every }`, `{ intervalMs }`, `{ at }`).
20+
- **One reading, pinned.** `flowStartScheduleReadsNothing` mirrors `normalizeSchedule` branch for branch, and `@objectstack/trigger-schedule` pins the two equal over every form either side distinguishes.
21+
22+
**What an author does.** Nothing for a sweep whose filter sits inside `timeRelative`, or a schedule that binds today in a form the published schema declares. For a refused shape, the parse refusal names where the key belongs, or the schedule spellings the readers take.
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 platform skill says how `os deploy` exits 1 on a self-hosted runtime target
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`objectstack-platform`'s operations reference scopes its `os deploy` exit-1 paragraph to ObjectOS Cloud and adds one for a target `os environments use-runtime` remembered: it asks for no cloud login, and it exits 1 on a failed build, a dry run the runtime refuses, cannot serve or ignores (an older runtime installed anyway), an install refusal (rerun with the `--confirm-access-upgrade` or `--confirm-upgrade` token it printed), or a package the running kernel did not load (live after a restart). The `os deploy` row's use-runtime tail moves into that paragraph, and a pitfalls row that only pointed to the data skill's permission-set assignment is cut. The CLI behaviour already shipped; this release only teaches it.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@objectstack/types': patch
3+
---
4+
5+
fix(types): `POST /api/v1/actions` answers a driver error carrying a string code the way `/api/v1/data` does, as a server fault
6+
7+
Clause-②: no (a status and code correction on an error answer: a driver fault inside an action body moves from a 400 refusal to the 5xx fault `/data` already answers; no accepted input and no success shape changes)
8+
Metadata-protocol: none
9+
10+
An action body that hit a driver error carrying its own string code (`SQLITE_BUSY`, `ECONNREFUSED`, `57P01`) and no HTTP status was answered by `POST /api/v1/actions/:object/:action` as a client refusal: `400 VALIDATION_ERROR`, the driver's text as the message, and the driver's code in `declaredCode`. `/api/v1/data` answers the same throw as a server fault. The MCP `run_action` and `resume_run` tools answer what `/actions` answers, so they moved with it.
11+
12+
| The action threw | `/actions` answered | `/actions` and `/data` now answer |
13+
| --- | --- | --- |
14+
| `{ code: 'SQLITE_BUSY', message: 'SQLITE_BUSY: database is locked' }` | `400`, `VALIDATION_ERROR`, the driver text, `declaredCode: 'SQLITE_BUSY'` | `500`, `DATABASE_ERROR`, `Internal data error` |
15+
| `{ code: 'ECONNREFUSED', message: 'connect ECONNREFUSED 127.0.0.1:5432' }` | `400`, `VALIDATION_ERROR`, the driver text, `declaredCode: 'ECONNREFUSED'` | `500`, `INTERNAL_ERROR`, `Internal server error` |
16+
17+
The driver's code and text are logged on the server instead, as a `driver fault` line.
18+
19+
- **Which throws move.** A throw that declared no status and whose `code` is not a closed ADR-0112 code, and only when the `/data` door's classifier (`mapDataError`) answers it as a server fault. `actionsDoorAnswerOf` (`@objectstack/types`) asks that classifier for this case; it holds no copy of its reading.
20+
- **Unchanged.** A closed code with no status (`RECORD_LOCKED`, `PERMISSION_DENIED`) is still the `400` refusal with that code. A bare `Error` is still `400 VALIDATION_ERROR` with its own sentence. A throw that declared its status keeps it, and an unregistered code beside it still rides `declaredCode`. A sandboxed action body's coded refusal (`code: 'CREDIT_LIMIT'` with no status) is still the `400` refusal with `declaredCode`, which is what `/data` answers for it.
21+
- **Stated cost.** An in-process action handler that throws its own unregistered code with no status, which `/data` also answers as a fault, now gets the fault answer here too and loses the code (the 2026-08-27 ruling on #12509: the discriminator is the status channel). It keeps its code by declaring the status it means.
22+
23+
This supersedes the line in the `31271` changeset that says a driver string code answers `400 VALIDATION_ERROR` with `declaredCode` at `/actions` and that the difference from `/data` is not changed.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/runtime': patch
3+
---
4+
5+
fix(runtime): MCP `run_action` answers a declared action with no handler as `POST /api/v1/actions` does, `404 RESOURCE_NOT_FOUND`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A declared `script` action with no handler bound anywhere (for example, an install-local package whose handlers never bound) got two different answers. `POST /api/v1/actions/:object/:action` answers it from its routing-miss branch: `404`, `RESOURCE_NOT_FOUND`, `Action 'X' on object 'Y' not found`. MCP `run_action` answered `400 VALIDATION_ERROR`, `No handler registered for action 'X' on 'Y'`, which told the agent its input was bad.
11+
12+
The MCP bridge threw that miss as an uncoded error. It now throws the routing miss as `/actions` answers it, with the same sentence, `404` and `RESOURCE_NOT_FOUND`, so `run_action` gives the same answer. The `action_invocation` row MCP writes for the miss moves the same way: it recorded `500` / `INTERNAL_ERROR`, and now records `404` / `RESOURCE_NOT_FOUND`, as the REST row does. A declared action with a handler, and a handler's own coded refusal, answer as before. No REST answer changes.
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 deploy` to a self-hosted runtime takes `--confirm-global-uniques`, the retry its installation-wide uniques stop prints
6+
7+
Clause-②: yes (widening) — `os deploy` gains an accepted flag, `--confirm-global-uniques`, widening a published CLI command's accept set
8+
Metadata-protocol: none
9+
10+
- **What was wrong.** With a self-hosted runtime as the deploy target (`os environments use-runtime`), `os deploy` installs through `os package install` run in the same process. When an `isolated`-posture runtime stops the install on the app's installation-wide (`unique: 'global'`) constraints (`UNIQUE_SCOPE_CONFIRMATION_REQUIRED`), the retry it prints is `os deploy --confirm-global-uniques`, but `os deploy` did not declare that flag: following the printed advice was refused as an unknown flag, and the deploy had no way to pass the confirmation.
11+
- **What changes.** `os deploy` declares `--confirm-global-uniques` and passes it through to the install, as it already does `--confirm-access-upgrade` and `--confirm-upgrade`: all three go through one seam, to the install only (the dry run sends none, as before). Named while the target is ObjectOS Cloud, it is refused before anything is built or sent, like the two upgrade confirmations.
12+
- **What does not change.** `os package install --confirm-global-uniques` and the two upgrade confirmations behave as before.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@objectstack/mcp': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
The MCP record data tools (`query_records`, `aggregate_records`, `get_record`, `create_record`, `update_record`, `delete_record`, `delete_records`' selection read) and the `objectstack://objects/{name}/records/{id}` resource now serve the `/api/v1/data` door's `declaredCode` and `userMessage` whenever they answer a throw with that door's answer. An app's own unregistered code with a declared 5xx, such as `{ code: 'VENDOR_DOWN', status: 503 }`, answers `SERVICE_UNAVAILABLE` / 503 with `declaredCode: 'VENDOR_DOWN'`, as `/data` does; since the previous release it answered the closed code alone. A producer's `userMessage` rides the answer after `status`, as `run_action` and `resume_run` render it. Each member is omitted when the door serves none. A coded throw with a declared status below 500, and the metadata tools and `list_actions`, answer as before.
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): clearing a start node's Cron schedule in the flow designer no longer leaves a typed schedule block with no cadence
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Clearing the Cron schedule box on a typed `config.schedule` such as `{ type: 'cron', expression, timezone }` used to store `{ type: 'cron', timezone }`. The engine binds nothing from that block, so a schedule flow silently never ran and a time-relative sweep did not fall back to its daily default the way the field's help says. The published `ScheduleSchema` refuses the same block. An untyped `{ expression, timezone }` had the same fault: clearing it left `{ timezone }`, which binds nothing either. The designer now removes `config.schedule` entirely whenever clearing the cron leaves no cadence, as it already did for an untyped `{ expression }`. Typing a cron over a typed block still keeps its `type` and `timezone`.

0 commit comments

Comments
 (0)