Skip to content

Commit 34e864c

Browse files
authored
Merge branch 'main' into claude/platform-migration-gating-764pf2
2 parents eb2e7da + f1a8114 commit 34e864c

105 files changed

Lines changed: 4459 additions & 1118 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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
Docs-only: development assessment routing the reference-integrity / option-key lint work for app metadata (issue #3583). Releases nothing.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
"@objectstack/plugin-auth": major
3+
"@objectstack/platform-objects": major
4+
"@objectstack/client": major
5+
"@objectstack/cli": patch
6+
"create-objectstack": patch
7+
"@objectstack/plugin-hono-server": patch
8+
"@objectstack/plugin-pinyin-search": patch
9+
"@objectstack/hono": patch
10+
---
11+
12+
chore(deps)!: better-auth 1.7.0-rc.2 (account identity restructuring) + the
13+
production-dependency batch from #3517
14+
15+
**better-auth 1.7.0-rc.1 → 1.7.0-rc.2** across the family (`better-auth`,
16+
`@better-auth/core`, `@better-auth/oauth-provider`, `@better-auth/sso`, and the
17+
adapter/telemetry overrides). `@better-auth/scim` deliberately stays on
18+
1.7.0-rc.1 — rc.2 replaces its whole model (code-defined connections; the
19+
`scimProvider` model and the generate-token endpoint are gone), which is a
20+
feature migration, not a version bump. Its peer range accepts rc.2 core, and the
21+
advisory that forced the original pin (GHSA-j8v8-g9cx-5qf4) is still fixed.
22+
23+
**BREAKING — account identity.** better-auth renamed `account.accountId` to
24+
`account.providerAccountId` and added a REQUIRED `account.issuer`; sign-in now
25+
resolves accounts by `(issuer, providerAccountId)`.
26+
27+
- FROM `fields: { accountId: 'account_id' }` → TO
28+
`fields: { issuer: 'issuer', providerAccountId: 'account_id' }`. The provider
29+
account id keeps its `account_id` column — only the better-auth-side name
30+
moved — and `sys_account` gains an `issuer` column.
31+
- FROM `internalAdapter.createAccount({ providerId, accountId, … })` → TO
32+
`createAccount({ providerId, issuer, providerAccountId, … })`. A local
33+
password account carries the issuer better-auth mints for itself,
34+
`local:credential`.
35+
- FROM `client.auth.accounts.unlink({ providerId, accountId })` → TO
36+
`unlink({ accountId })`, where `accountId` is now the account ROW id (the `id`
37+
from `accounts.list()`), matching better-auth's narrowed body.
38+
`accounts.list()` returns `issuer` + `providerAccountId` in place of
39+
`accountId`.
40+
41+
**Existing deployments:** rows written before 1.7 have no issuer and are
42+
invisible to sign-in until stamped. The auth plugin now runs an idempotent
43+
boot-time backfill that stamps what it can derive — `local:credential` for
44+
password accounts, `local:oauth:<providerId>` for configured social providers,
45+
and the registered IdP's real `iss` from `sys_sso_provider` for federated ones.
46+
Accounts from a federated IdP that is no longer registered cannot be derived;
47+
they are logged with their provider id and row count rather than guessed, and
48+
those users cannot sign in through that provider until the row is stamped with
49+
the IdP's issuer or removed so a fresh login re-links it.
50+
51+
**Also required by 1.7:** `SecondaryStorage` gained two mandatory methods, both
52+
now implemented over the kernel cache service — `getAndDelete` (single-use
53+
verification values) and `increment` (fixed-window rate-limit counter;
54+
`rateLimit.storage: 'secondary-storage'` throws at boot without it).
55+
56+
The rest of #3517's production-dependency batch rides along: `@oclif/core`
57+
4.13.0, `@hono/node-server` 2.0.12, `hono` 4.12.32, `tar` 7.5.22, `jose` 6.2.4,
58+
`pinyin-pro` 3.28.2, plus the private docs app's fumadocs/next/react bumps.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
"@objectstack/platform-objects": patch
3+
"@objectstack/plugin-auth": patch
4+
---
5+
6+
fix(auth): provision the better-auth 1.7 columns `sys_team` / `sys_team_member` / `sys_two_factor` were missing (#3624)
7+
8+
better-auth 1.7.0-rc.1 added fields to three models that the platform objects
9+
never provisioned and `auth-schema-config.ts` never mapped. Because an unmapped
10+
field keeps its camelCase name, the adapter emitted columns no table had:
11+
12+
| model | field | column now provisioned |
13+
|:---|:---|:---|
14+
| `team` | `memberCount` | `sys_team.member_count` |
15+
| `teamMember` | `membershipKey` | `sys_team_member.membership_key` |
16+
| `twoFactor` | `failedVerificationCount` / `lockedUntil` | `sys_two_factor.failed_verification_count` / `locked_until` |
17+
18+
The team pair broke org creation outright. The organization plugin's team
19+
sub-feature is on by default, so `POST /api/v1/auth/organization/create`
20+
auto-creates a default team — and that insert died with `table sys_team has no
21+
column named memberCount` *after* the organization row had already committed.
22+
Callers got an HTTP 500 on top of a half-created org: a real org row with no
23+
default team behind it. Every multi-org deployment's create-org flow hit this.
24+
25+
The two-factor pair broke the 2FA lockout path the same way: better-auth
26+
guard-increments `failedVerificationCount` on each wrong code and stamps
27+
`lockedUntil` past the threshold, so a wrong code 500'd instead of being
28+
counted. All four columns are better-auth's own state — provisioned, readable,
29+
and never written from the ObjectStack side.
30+
31+
Existing environments pick the columns up through the driver's additive schema
32+
sync; no data migration is needed. `member_count` backfills to 0 and
33+
better-auth's own `syncTeamMemberCount` reconciles it on the next membership
34+
change, and `membership_key` stays null on pre-upgrade rows, which better-auth
35+
tolerates by falling back to the `(team_id, user_id)` pair.
36+
37+
A new drift gate (`better-auth-schema-parity.test.ts`) now asserts that every
38+
column the installed better-auth version can write exists on the platform
39+
object backing it, across the auth manager's whole model surface. The ADR-0092
40+
D7 guard only ever caught *collisions* between our extension fields and
41+
better-auth's, so a bump that adds a brand-new field passed the build and failed
42+
at runtime — twice now, counting the 1.7 `oauthAccessToken.authorizationCodeId`
43+
regression. The next one fails the build instead.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@objectstack/client": minor
3+
"@objectstack/rest": patch
4+
---
5+
6+
feat(client): close the approvals (6) + record-shares (3) REST gaps (#3587 batch 3/5)
7+
8+
`client.approvals` gains the full request lifecycle beyond approve/reject:
9+
`recall` (submitter withdraw), `revise` / `resubmit` (ADR-0044 send-back
10+
round-trip), and the thread interactions `remind` / `requestInfo` / `comment`.
11+
New `client.shares` namespace for per-record sharing grants: `list` / `grant` /
12+
`revoke` (204-safe) under `/data/:object/:id/shares`. REST route-ledger
13+
ratchet: 26 → 17.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@objectstack/client": minor
3+
"@objectstack/rest": patch
4+
---
5+
6+
feat(client): close the sharing-rules (5) + security-explain (2) + search (1) REST gaps (#3587 batch 4/5)
7+
8+
New `client.shares.rules` sub-namespace for tenant-wide sharing rules
9+
(M10.17): `list` / `save` / `get` / `delete` (204-safe, grants cascade) /
10+
`evaluate` (reconcile). `client.security.explain` speaks the ADR-0090 D6
11+
access-explanation contract via the POST transport (the GET query form is the
12+
same `ExplainRequestSchema`). Top-level `client.search` covers global
13+
cross-object search (M10.5). REST route-ledger ratchet: 17 → 9.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@objectstack/client": minor
3+
"@objectstack/rest": patch
4+
---
5+
6+
feat(client): close the 8 reports-family REST gaps (#3587 batch 2/5)
7+
8+
New `client.reports` namespace speaking the plugin-reports REST surface:
9+
`list` / `save` / `get` / `delete` (schedules cascade), `run`, `schedule`,
10+
`listSchedules`, `unschedule`. The two DELETE routes return 204 — the client
11+
methods return `{ deleted: true }` without attempting to parse an empty body.
12+
Fixed path (`/api/v1/reports` is not in `ApiRoutesSchema`), matching the
13+
keys / share-links precedent. REST route-ledger ratchet: 34 → 26.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
"@objectstack/client": minor
3+
"@objectstack/rest": patch
4+
---
5+
6+
feat(client): close the final 9 REST gaps — ratchet 9 → 0 (#3587 batch 5/5)
7+
8+
`data.clone` (enable.clone duplication) and `data.export` (streaming
9+
CSV/JSON/XLSX; returns the raw `Response` — a file stream, not a JSON
10+
envelope). New `email.send` (IEmailService; branch on the returned `status`).
11+
`analytics.queryDataset` speaks the ADR-0021 REST dataset-query dialect. New
12+
`datasources.external.*` federation admin: `listTables` / `draft` / `import` /
13+
`refreshCatalog` / `validate` (ADR-0015 Addendum, 503-degrading). Every REST
14+
route is now either SDK-expressed or carries a reviewed non-sdk disposition —
15+
the #3587 gap ratchet rests at ZERO.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
"@objectstack/client": minor
3+
"@objectstack/rest": patch
4+
---
5+
6+
feat(client): close the 9 metadata-family REST gaps the #3587 ledger carried (#3587)
7+
8+
New `meta` surface: `getDiagnostics` (spec-validation sweep), `getReferences`
9+
(reverse references), `getBookTree` (ADR-0046 §6 spine resolution), `getAudit`
10+
(ADR-0010 §3.6 protection trail), `publishItem` / `rollbackItem` / `diffItem`
11+
(ADR-0033 per-item draft lifecycle). The two compound-name routes
12+
(`GET|PUT /meta/:type/:section/:name`) turned out to be already expressible —
13+
`getItem`/`saveItem` pass slashes through unencoded — so they are flipped to
14+
`sdk` with URL-pinning tests instead of new methods (the audit note claiming
15+
an encoding barrier was wrong; only `deleteItem` encodes). REST route-ledger
16+
ratchet: 43 → 34.

.changeset/console-09c6a177bb4a.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@objectstack/console": patch
3+
---
4+
5+
Console (objectui) refreshed to `09c6a177bb4a`. Frontend changes in this range:
6+
7+
- fix(grid): localize import result errors (objectstack#3566) (#2861)
8+
9+
objectui range: `c6cfdf1288b6...09c6a177bb4a`
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
Repo-plumbing only: two pending changesets referenced the scaffolder by its old `@objectstack/create-objectstack` name, which `changeset version` rejects because the workspace package is named `create-objectstack`. Renamed the entries; releases nothing by itself.

0 commit comments

Comments
 (0)