Skip to content

Commit fb2fd21

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-oj61dz
2 parents 787f842 + d5fd948 commit fb2fd21

59 files changed

Lines changed: 2954 additions & 637 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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/objectql': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
refactor(objectql): the `ObjectQL#find` and `ObjectQL#findOne` bodies move into the find facet
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
- The bodies of `find` and `findOne` move out of `engine.ts` into `engine-find.ts`, the facet that already holds their read helpers. Each method stays on the class as a one-call stub with its signature and its docblock. Where a body handed the engine itself on (`ql: this` in the before/after hook context), it reads the same engine through the host's `facade` entry.
12+
- No behaviour changes and nothing to do on upgrade. The built declaration files keep every member and every docblock; the source maps move.
13+
- The `query.fields` and `query.top` liveness rows in `@objectstack/spec` now cite `engine-top-level.ts`, where `planFormulaProjection` and `ENGINE_QUERY_SLOTS` are declared, and `engine-find.ts`, where the `find` / `findOne` bodies fold the `top` alias, since `engine.ts` no longer imports those names; the evidence they cite is unchanged.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
feat(cli): `os deploy` and the `d` key in `os dev` deploy to a self-hosted runtime (Docker Community or Enterprise) that `os environments use-runtime` remembered; `os package install` falls back to it
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
**`os environments use-runtime <url> --token <key>`** (new) remembers a self-hosted runtime and an API key it issued, and makes it the deploy target. The key is tried on the runtime's install-local door first (`--no-verify` skips that); a rejected key, a runtime that does not serve install-local, or one that cannot be reached is refused and nothing is recorded. Both are stored in `~/.objectstack/cloud.json` (0600) as their own record beside the cloud session: `os cloud login` and `os cloud logout` keep it, and the key is only ever sent to that url. `os environments switch <id>` makes ObjectOS Cloud the deploy target again (the runtime stays remembered); `os environments use-runtime --forget` drops it.
11+
12+
**`os deploy`** with a runtime as the active target (and no `--env`) builds the app, asks the runtime's install-local dry run and prints the upgrade plan (declared `renamedFrom` renames included), then installs the build inline — no catalog publish and no `-dev` version — and reports it live from the runtime's answer. A refusal from the dry run or the install stops the deploy with exit 1 and the runtime's sentence; a runtime that does not serve install-local (one booted from a composed artifact) or that predates the dry run is named, with what to do, exit 1. `--confirm-access-upgrade <finding-set>` passes the access-upgrade confirmation through (and is refused when the target is ObjectOS Cloud). **The `d` key** names the remembered runtime and deploys there without asking for a cloud login.
13+
14+
**`os package install`** without `-u` / `$OS_RUNTIME_URL` installs into the remembered runtime, and without `-t` / `--email` uses its key — only when the url is that runtime's. With nothing remembered the default stays `http://localhost:3000`. Its 404 answer now names the composed-artifact case and what to do.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/plugin-audit': patch
3+
---
4+
5+
fix(plugin-audit): a comment write leaves a ledger row and an activity row, stamped when the author was impersonated
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`sys_comment` is no longer on the audit writer's skip list. Creating, editing and deleting a comment now writes one `sys_audit_log` row and one `sys_activity` row, exactly like a write to any other object, and a comment written from an impersonation session carries the administrator in `metadata.impersonated_by` (and `impersonated_by_name` on the activity row). Before, such a comment could not be told from one the user wrote.
11+
12+
The rows name the comment as their parent (`object_name: 'sys_comment'`, `record_id`: the comment's id), so a record's own activity timeline does not show the comment twice; they appear in the object-agnostic feeds (the recent-activity feed, the Audit Logs list). A reader is served them only when it can read the comment, which means reading the record the comment is on: the activity and ledger read gates now enumerate `sys_comment` as a parent and ask the comment's own read gate. A holder of the ledger's audit capability keeps reading every ledger row of the organization, as before. Comments written before this change have no rows; nothing is backfilled.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
---
4+
5+
fix(plugin-auth): withdrawing an AI assistant in one organization no longer signs it out of the person's other organizations
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A person can authorize the same AI assistant (an OAuth client such as Claude Desktop) in two organizations. Withdrawing it in one of them, from the console (`POST /api/v1/auth/authorized-clients/withdraw` or the admin door) or with `POST /oauth2/revoke`, deleted only that organization's consent but every refresh token the assistant held for that person, in every organization. The assistant then stopped working in the other organization once its access token expired, and the person had to authorize it there again. A withdraw now deletes the refresh tokens minted in the withdrawn organization only: every one of them, rotated or live, and the access tokens minted from them. The other organization's refresh token keeps refreshing. A refresh token minted with no active organization belongs to the grant with no organization and is deleted when that grant is withdrawn. `/oauth2/revoke` answers exactly as before.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/platform-objects': patch
3+
---
4+
5+
feat(platform-objects): Setup's user page gains an "AI Assistants" tab, for platform administrators
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **`@objectstack/platform-objects`**: the `sys_user` record page (`sys_user_detail`) has a new "AI Assistants" tab, beside API Keys, labelled in en, zh-CN, ja-JP, es-ES and zh-Hant. Its body is the console widget `mcp:authorized-assistants`: the AI assistants (OAuth clients such as Claude Desktop) this person authorized, each with a confirm-first Revoke. An administrator can now see and end what acts as a person who cannot sign in to withdraw it themselves (a lost laptop, a departure). The tab is shown only to a platform administrator (`current_user.isPlatformAdmin == true` on the tab item): the widget's list and Revoke go through the platform-admin-gated `/api/v1/auth/admin/authorized-clients` doors, so any other viewer could only see a refusal. The server's gate is unchanged.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/platform-objects': patch
3+
'@objectstack/plugin-auth': patch
4+
---
5+
6+
feat(platform-objects): mint and revoke SCIM connection credentials from the console
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
`sys_scim_connection_credential` gains two actions, so a platform administrator setting up SCIM provisioning no longer needs curl to get a bearer token:
12+
13+
- **Mint Credential** (list toolbar) posts `POST /api/v1/auth/admin/scim/mint-credential` with a connection ID and the optional label, organization, provisioning domain and expiry, then shows the token once in a result dialog the administrator must close. Only the token's one-way digest is stored, so it cannot be shown again. Mint is not exposed to AI tools: an agent that ran it would hold a live SCIM bearer.
14+
- **Revoke Credential** (a credential row or its record header) posts `POST /api/v1/auth/admin/scim/revoke-credential` for that row, after a confirmation. It is offered on an active credential only; the route's 404 and 409 answers show as the action's error. Revoke is exposed to AI tools and always asks the human to confirm first.
15+
16+
Both are offered only to a platform administrator and declare the routes' own gate (`manage_platform_settings`). Who may mint or revoke is unchanged: the routes still decide.
17+
18+
`@objectstack/plugin-auth`: a mint made on an impersonation session now names the administrator at the keyboard in its `sys_audit_log` row, as `metadata.impersonated_by` (the key the audit writers use). A mint on an ordinary session writes the same row as before.
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): validation examples guard nullable fields, hooks teach `body`, the `requires:` table names `mailbox` and `package-registry`, `os generate` drops `agent`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`objectstack-data` `rules/validation.md` now guards every ordering or arithmetic operand in its examples with `!= null` (the due-date, date-range, amount, discount and order-total predicates) and states the rule once: an unguarded `<` or `+` on a field with no `required: true` / `defaultValue` is refused at publish. Its external-validation hook and the `examples-objects.md` lifecycle hook are written as a sandboxed `body`, and the `SKILL.md` index names the inline `handler` only as the deprecated form; the validation section says a `body` has no outbound HTTP, so an external-API check goes through a Connector recipe. `objectstack-platform` lists `mailbox` (`@objectstack/service-mailbox`) and `package-registry` (`@objectstack/service-package`) in the `requires:` table, and `references/operations.md` no longer offers the retired `os generate agent`. The platform behaviour already shipped; this release only teaches it.

‎.claude/skills/pm-dispatch/references/platform-readings.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@
385385
- 强制档不因临缺授权降档:临缺非退役,退役唯维护者裁;不达档起隔离达档子代理或等档。
386386
- 本车道强制多是过宽的回忆:`dispatch-gates.mjs --tier PATH` 逐路径现推,路径线是下限非放行。
387387
- 该脚本只答自己那棵树:姊妹仓路径回 absent from this tree,姊妹仓的档位与条款②只能手推。
388-
- required checks 的名单是每仓事实,objectstack 十个:
389-
`TypeScript Type Check` · `Lint & Repo Gates` · `Test Core` · `Build Core` · `Lint UI` ·
390-
`Governed Surface Queue Guard` · `Type Check UI` · `Test UI` · `Build & E2E UI` · `Live E2E UI`。
388+
- required checks 的名单是每仓事实,objectstack 十一个:
389+
`TypeScript Type Check` · `Lint & Repo Gates` · `Test Core` · `Build Core` · `Lint UI` · `Test UI` ·
390+
`Governed Surface Queue Guard` · `Type Check UI` · `Build & E2E UI` · `Live E2E UI` · `Dogfood Regression Gate`。
391391
- ⭐ 本表的 `mustName` 声明 `statesTheSet` ⇒ 必须逐字等于注册表,加注册行不跟改本表即红。
392392
- ⇒ 门绿即名单逐字齐全的读数;⛔ 但数量词未钉:实测 七→六 照绿,只能手跟改。
393393
- ⛔ 聚合命令同样不作判定:`check:type-check-debt` 可在包级 typecheck 绿时红。

‎.claude/skills/pm-dispatch/references/review-checklist.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
- ⛔ 非当前 head 上的 `cancelled` 零动作、永不重跑:新推送自带全套 run。
4747
- 席位核对门禁证据 = check-runs(名+结论);本地并集只证本地子集,⛔ 不替缺席者。
4848
- `!` 或 `(narrowing)`:入队前核 `dogfood_battery` 钉 head、全量、红已修/已报;缺或收窄 ⇒ REWORK。
49-
- 把发送或写挪到应答之后的 PR:dogfood 门禁不跑于 PR 与队列,全绿照样红 `main` 的 push 全量。
49+
- 把发送或写挪到应答之后的 PR:dogfood 门禁不跑于 PR、跑于队列,全绿 PR 照样被队列弹出。
5050
- ⇒ 入队前 grep `packages/qa/dogfood/test` 里应答后紧读该副作用的用例,同一 PR 改为有界等待。
5151

5252
## 断言与收益

‎.github/workflows/ci.yml‎

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,8 @@ concurrency:
122122
# github.event_name != 'pull_request'
123123
#
124124
# in its `if:`, so a dogfood red shows on the queue build of the entry that
125-
# carries it rather than first on `main`'s push run after it. It is advisory
126-
# there: the context is outside the required set (below), so the queue may
127-
# merge the entry before or despite the shards.
125+
# carries it rather than first on `main`'s push run after it, and the red
126+
# ejects that entry: the context is in the required set again (below).
128127
# `main`'s 4-hourly `schedule` run, its `push` runs and an on-demand
129128
# `workflow_dispatch` carry the FULL BATTERY: all of that plus the three jobs
130129
# below that spell
@@ -139,9 +138,9 @@ concurrency:
139138
# `scripts/ci/scheduled-full-run.mjs --release-gate`). ⛔ No affected-only
140139
# dogfood filter on the queue: the shards run on every entry, through the
141140
# `core` output, which is 'true' on `merge_group` (letter C was not ruled).
142-
# The queue enforces only the ruleset's required set, and `Dogfood Regression
143-
# Gate` is outside it since #22998 (check:required-contexts' tombstone); this
144-
# file does not decide whether it rejoins.
141+
# The queue enforces only the ruleset's required set. `Dogfood Regression
142+
# Gate` left it by #22998 and rejoined it by the #30461 follow-up ruling
143+
# (ruling record 6669982756); check:required-contexts pins its row.
145144
#
146145
# Spelled as a DENY-list of the per-PR events on purpose — the filter
147146
# contract's half 1 below, applied to events: a trigger added to `on:` later
@@ -2724,9 +2723,9 @@ jobs:
27242723
overwrite: true
27252724

27262725
dogfood-gate:
2727-
# Stable check name for a SHARDED job (#3622 follow-up). Since #22998 the
2728-
# context is outside the required set (THE TWO SPEEDS above `jobs:`). On a
2729-
# PR both legs skip and this gate counts zero expected attestations; on a
2726+
# Stable check name for a SHARDED job (#3622 follow-up), a required
2727+
# context again since #30461 (THE TWO SPEEDS above `jobs:`). On a PR both
2728+
# legs skip and this gate counts zero expected attestations; on a
27302729
# queue build (since #30461) the three dogfood shards run and are counted,
27312730
# while `dogfood-verify` skips and is judged with zero expected; the full
27322731
# battery runs and counts both. The history below is why the name and the
@@ -2738,10 +2737,9 @@ jobs:
27382737
# EVERY pull request in the repo sat permanently BLOCKED (mergeable, all
27392738
# checks green, merge button dead). #3622's own comment called for updating
27402739
# branch protection; keeping the contract HERE instead means a future
2741-
# shard-count change cannot deadlock the repo a second time. From #6865
2742-
# until #22998 the bare name was pinned by `check:required-contexts`; it
2743-
# left that registry with the required set, so a rename now falsifies the
2744-
# prose that names it without reddening anything — treat it as contract.
2740+
# shard-count change cannot deadlock the repo a second time. The bare name
2741+
# is pinned by `check:required-contexts` (since #6865; out of that registry
2742+
# from #22998 until #30461) — treat it as contract.
27452743
#
27462744
# Also aggregates dogfood-verify (the CLI pass that used to ride shard 1),
27472745
# so the one context still covers everything it covered before the split.

0 commit comments

Comments
 (0)