Skip to content

Commit e2f2e21

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-30347-spec-docblock-fold
2 parents 8629666 + ffeda13 commit e2f2e21

94 files changed

Lines changed: 6063 additions & 284 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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@object-ui/auth': patch
3+
---
4+
5+
refactor(auth)!: retire twelve zero-consumer exports (the Turnstile script URL, the two phone-identifier helpers, the authenticated-fetch options type, the org-role list, the invitation-status list and guard, and five form primitives)
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/auth#TURNSTILE_SCRIPT_URL, @object-ui/auth#normalizePhoneIdentifier, @object-ui/auth#looksLikePhoneIdentifier, @object-ui/auth#AuthenticatedAdapterOptions, @object-ui/auth#ORG_ROLES, @object-ui/auth#AUTH_INVITATION_STATUSES, @object-ui/auth#isAuthInvitationStatus, @object-ui/auth#AUTH_FIELD_LABEL_CLASS, @object-ui/auth#AUTH_INPUT_CLASS, @object-ui/auth#AuthCheckIcon, @object-ui/auth#AuthDivider, @object-ui/auth#AuthMailIcon) the retired operands are a script URL constant, two sign-in identifier helpers, an options interface, two closed vocabulary lists with one narrowing guard, two class-name strings and three presentational components; nothing in the workspace or in hotcrm imports any of them from the package entry, 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 -->
11+
12+
**BREAKING** for a host that imports any of these twelve names from `@object-ui/auth`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected. Every module stays in the package: `TurnstileWidget` keeps loading its script, `LoginForm` keeps reading phone identifiers, `createAuthClient` keeps narrowing invitation statuses, `org-roles.ts` keeps building its pickers from the role list, and `LoginForm` / `RegisterForm` / `ForgotPasswordForm` keep drawing with the form primitives. Only the entry stops publishing them. `TurnstileWidget`, `createAuthenticatedFetch`, `ORG_ROLE_OWNER` / `ORG_ROLE_ADMIN` / `ORG_ROLE_DELEGATED_ADMIN` / `ORG_ROLE_MEMBER`, `ORG_ROLE_LABELS`, `orgRoleGrade`, `invitableOrgRoles`, `assignableOrgRoles`, the `OrgRole` and `AuthInvitationStatus` types, `AUTH_LINK_CLASS`, `AUTH_PRIMARY_BUTTON_CLASS`, `AuthAlertIcon`, `AuthErrorBanner`, `AuthFormHeader` and `AuthSpinner` stay exported unchanged.
13+
14+
What leaves, and what to write instead:
15+
16+
- FROM `TURNSTILE_SCRIPT_URL` TO `TurnstileWidget`, which loads the Cloudflare Turnstile script itself.
17+
- FROM `normalizePhoneIdentifier`, `looksLikePhoneIdentifier` TO `LoginForm`, which accepts a phone number as the identifier and normalizes it; keep a local copy if your own sign-in form needs them.
18+
- FROM `AuthenticatedAdapterOptions` TO a local interface: no function in the package takes it (`createAuthenticatedFetch` has its own options).
19+
- FROM `ORG_ROLES` TO `invitableOrgRoles` / `assignableOrgRoles` for the roles a picker offers, or the four `ORG_ROLE_*` constants.
20+
- FROM `AUTH_INVITATION_STATUSES`, `isAuthInvitationStatus` TO the `AuthInvitationStatus` type; `AuthInvitation.status` already arrives narrowed from `createAuthClient`.
21+
- FROM `AUTH_FIELD_LABEL_CLASS`, `AUTH_INPUT_CLASS`, `AuthCheckIcon`, `AuthDivider`, `AuthMailIcon` TO no replacement: the built-in forms apply them themselves; copy the class strings or icons if a custom form needs the same look.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
---
4+
5+
refactor(plugin-detail)!: retire twenty-one zero-consumer exports (record-page synthesis, layout, related-card and timeline helpers, one hook and three types)
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/plugin-detail#queueClaimAdmitted, @object-ui/plugin-detail#extractLookupId, @object-ui/plugin-detail#TEXTUAL_REF_FALLBACK_TYPES, @object-ui/plugin-detail#inferDetailColumns, @object-ui/plugin-detail#applyAutoSpan, @object-ui/plugin-detail#applyDetailAutoLayout, @object-ui/plugin-detail#DetailTabsProps, @object-ui/plugin-detail#buildDefaultDiscussion, @object-ui/plugin-detail#buildDefaultTimeline, @object-ui/plugin-detail#deriveStages, @object-ui/plugin-detail#RECORD_PAGE_WIDE_MIN_WIDTH, @object-ui/plugin-detail#recordPageColumnOfTab, @object-ui/plugin-detail#RecordPageColumn, @object-ui/plugin-detail#useDefaultRecordPage, @object-ui/plugin-detail#relatedCountTargetOf, @object-ui/plugin-detail#filterTimelineStream, @object-ui/plugin-detail#RELATED_CARD_NEW_BADGE_MS, @object-ui/plugin-detail#editRelatedArrangement, @object-ui/plugin-detail#relatedCardId, @object-ui/plugin-detail#relatedDefaultOrderHash, @object-ui/plugin-detail#RelatedArrangementEdit) the retired operands are pure helpers of the synthesized record page, its layout and its related cards, one React context hook, and three TypeScript types; nothing in the workspace or in hotcrm imports any of them from the package entry, 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 -->
11+
12+
**BREAKING** for a host that imports any of these twenty-one names from `@object-ui/plugin-detail`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected. Every module stays in the package and keeps its in-package readers (the record page synthesizer, `DetailView`, `RecordPageColumns`, the related cards and the timeline stream); only the entry stops publishing them. Everything else on the entry, including `buildDefaultPageSchema`, `buildDefaultTabs`, `isWideFieldType`, `InlineFieldInput`, `recordSitsInQueue`, `DefaultRecordPageContext`, `prefetchRelatedCounts`, `relatedCountTargetsIn`, `mergeTimelineStream`, `resolveRelatedArrangement` and the `RelatedArrangement` / `RecordPageTier` / `DefaultPageColumns` types, stays exported unchanged.
13+
14+
What leaves, and what to write instead:
15+
16+
- FROM `buildDefaultDiscussion`, `buildDefaultTimeline`, `deriveStages` TO `buildDefaultPageSchema`, which builds the whole default record page including its discussion, timeline and stage path.
17+
- FROM `RECORD_PAGE_WIDE_MIN_WIDTH`, `recordPageColumnOfTab`, `RecordPageColumn` TO `recordPageTierFor` and `buildDefaultPageColumns`, which place the page's tabs into columns for a width.
18+
- FROM `inferDetailColumns`, `applyAutoSpan`, `applyDetailAutoLayout` TO `DetailView`, which lays out its sections itself; `isWideFieldType` stays.
19+
- FROM `extractLookupId`, `TEXTUAL_REF_FALLBACK_TYPES` TO `InlineFieldInput`, which reads lookup values itself.
20+
- FROM `queueClaimAdmitted` TO `useQueueClaimOffered`, which answers whether the Claim button shows.
21+
- FROM `useDefaultRecordPage` TO `DefaultRecordPageContext` with `useContext`.
22+
- FROM `relatedCountTargetOf` TO `relatedCountTargetsIn`.
23+
- FROM `filterTimelineStream` TO `mergeTimelineStream`; the timeline panel applies its filter chips itself.
24+
- FROM `RELATED_CARD_NEW_BADGE_MS`, `editRelatedArrangement`, `relatedCardId`, `relatedDefaultOrderHash`, `RelatedArrangementEdit` TO `resolveRelatedArrangement` with `relatedArrangementFromRecord` / `relatedArrangementToRecord`; the related cards edit and badge the arrangement themselves.
25+
- FROM `DetailTabsProps` TO `DetailViewProps`: `DetailTabs` is not on the entry, `DetailView` renders it.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
fix(spec): the liveness ledger grades an app page's `record` binding `live`, citing the console reader for each of its keys
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- `liveness/page.json` graded `record` and every key under it `planned`, with the note that nothing read a page-level `record` yet. The console now reads it: an app page's binding is read once per page open as the first row under `sort`, and every component's `visibleWhen` sees that row as `record`. `record` and every key under it (`object`, `view`, `filter` with `field` / `operator` / `value`, `sort` with `field` / `order`) are now `live`, each citing the code that reads it.
11+
- Nothing to do on upgrade: only the shipped `liveness/page.json` grades and evidence text change. No key, schema shape or export changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
fix(spec): an array in an analytics filter slot is refused once, and the refusal shows the object form
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A dashboard widget `filter`, a dataset or measure `filter`, or a report's `runtimeFilter` written as a list view's rule array (`[{ field: 'status', operator: 'in', value: ['new', 'in_progress'] }]`) used to fail `os validate` with two lines that contradicted each other and named no fix: `Expected record but received object.` and `Expected object but received object.`. It now fails with one `invalid_type` issue at the same path, saying that these slots take the condition object a query's `where` takes and showing it: `{ status: { $in: ['new', 'in_progress'] } }`.
11+
12+
Only the text changes, and the duplicate line goes. Every filter accepted before is accepted, every filter refused before is refused, and the published JSON Schema is unchanged.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/plugin-audit': patch
3+
'@objectstack/platform-objects': patch
4+
---
5+
6+
fix(plugin-audit,platform-objects): the audit log's default list shows what people did, not the rows the platform writes beside it; the audit objects read in Chinese
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
Setup's 审计日志 opens the first `sys_audit_log` list view, `recent`. One sign-in used to put two rows there (the `login` row and an `update` of the person's `sys_user` stamping `last_login_at` / `last_login_ip`), the first sign-in through the console a third (the token-signing key in `sys_jwks`), and one settings change three or four (the `config_change` row, the stored setting, a secret's ciphertext, and the settings trail's own entry).
12+
13+
- The ledger writer now marks the sign-in stamp row with `metadata: {"event":"auth.last_login_stamp"}`, the way `config_change` rows carry `settings.set`. Only an update of `sys_user` whose changes are the stamp's fields alone is marked; an administrator's edit of a user is not. The row is still written.
14+
- `recent` leaves out the marked row, the rows on `sys_secret`, `sys_setting_audit`, `sys_platform_setting_audit`, `sys_jwks`, `sys_migration` and `sys_migration_journal`, and the rows on `sys_setting` / `sys_platform_setting` other than `config_change`. Nothing is removed from storage, and `all_events` (全部) still lists every row.
15+
- `sys_platform_setting` and `sys_platform_setting_audit` were in no translation bundle, so they read English in every locale; they now ship in `@objectstack/platform-objects`' bundles with zh-CN translations (ja-JP and es-ES carry the English fill). `sys_comment_reaction`'s zh-CN bundle is translated.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/platform-objects': patch
3+
'@objectstack/lint': patch
4+
---
5+
6+
fix: the Business Unit page and the `security-private-no-readscope` hint say what needs the enterprise edition
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
- **Business Unit page (`sys_business_unit` description, en and zh-CN).** It used to say units are "used to scope data and reports". It now says what a unit does in the open edition: sharing rules can share records with a unit, or a unit and the units under it, and members get that access and lose it when they leave. It also says that letting a permission set read every record of a unit (read scope `unit`) needs the enterprise edition. That matches the compile refusal, which is unchanged.
12+
- **Business unit Timezone help (en and zh-CN).** It used to say date boundaries are computed in this zone. Nothing reads the column, so the help now says it changes no date calculation and that Settings → Localization → Default timezone is the one in effect, as the organization's Timezone help already does.
13+
- **`security-private-no-readscope` hint (`os validate`, `os lint`).** The hint now offers only the scopes the stack can compile. When `requires` lists `hierarchy-security`, nothing changes: it offers `own_and_reports`, `unit`, `unit_and_below` and `org`. Without it, the hint offers `org` (or widening the object's `sharingModel`), and says that the three hierarchy scopes need `requires: ['hierarchy-security']`, which `@objectstack/security-enterprise` provides. The rule still fires on the same grants at the same severity.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/cloud-connection': patch
3+
---
4+
5+
feat(cloud-connection): `GET /api/v1/marketplace/install-local/:manifestId/sample-data` answers how many of an installed app's sample records a purge would delete now
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: none
9+
10+
- **New read-only route.** `GET /api/v1/marketplace/install-local/:manifestId/sample-data` answers `{ success: true, data: { manifestId, count, unidentified } }`. `count` is the number of rows `POST …/purge-sample-data` would delete if it ran now, found by the purge's own matcher with nothing deleted. A record a user added is not counted, and neither is a sample record whose key field (its dataset's `externalId`) was edited, because the purge deletes neither. A sample record edited only in other fields is still a sample row: the purge deletes it and the count includes it. `unidentified` counts the sample records the purge would report in `errors` and leave in place (no usable key value, or a key two rows carry). Before this, the count was known only from the install answer's `data.seeded`, so after a reload no API could say how much sample data was left; the installed-apps listing's `withSampleData` says only whether any is left.
11+
- **Same rules as the purge.** It requires `manage_metadata`, answers `404` for a package that is not installed and `422 OS_PROTOCOL_INCOMPATIBLE` for an entry this runtime refused to load, and counts in the purge's scope (the caller's active organization under an organization wall, every row without one). A walled session with no active organization gets `count: 0`, the same answer as the listing's `withSampleData: false` for that session. A package with no seed datasets gets `count: 0`. With no data engine or metadata service it answers `500 DRIVER_UNAVAILABLE`, never `0`.
12+
- **It cannot delete.** It is a `GET` and accepts no query parameter: any parameter (`dryRun`, `confirm`, …) is refused with `400 VALIDATION_ERROR` before any row is read.
13+
- **Unchanged.** What the purge deletes, its permission and its answer; the listing's `withSampleData`.
14+
- `@objectstack/cloud-connection` now depends on `@objectstack/rest`, for the shared closed-query-set refusal message.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/service-datasource': minor
4+
---
5+
6+
fix(spec)!: a SQLite datasource's `config.filename` must name a database: `''` and a name that starts with `:` without being exactly `:memory:` are refused by the stack parse and the metadata save door, not only by the datasource admin doors
7+
8+
Clause-②: no (narrowing) — `SqliteConfigSchema.filename` and `SqliteWasmConfigSchema.filename` refuse `''` and any `:`-prefixed value other than exactly `:memory:`, so `defineStack` / `os validate` / `os build` and `PUT /api/v1/meta/datasource/NAME` refuse a `sqlite` / `sqlite-wasm` datasource they accepted before. Nothing is widened.
9+
Metadata-protocol: narrowed
10+
Skills-docs: none — `skills/**` teaches no SQLite `filename` value, and `content/docs/**` teaches only `:memory:` and file paths, which stay accepted. The prescription ships in the refusal text, the FROM → TO below and the upgrade-guide entry.
11+
12+
<!-- adr-0087: registered sqlite-filename-names-no-database-refused -->
13+
14+
**BREAKING** accept-set narrowing on `SqliteConfigSchema.filename` and `SqliteWasmConfigSchema.filename` (`@objectstack/spec`), and so at every door that judges a datasource against the spec: `defineStack`, `os validate`, `os build` and `PUT /api/v1/meta/datasource/NAME`.
15+
16+
- **Before.** Both schemas typed `filename` as any placeholder-free string. `:memory:/srv/data/parts.db` (the New datasource dialog's prefilled `:memory:` with a path typed after it) and `''` parsed. Every layer reads a name that starts with `:` as fileless, so no file was ever opened: a `sqlite` datasource opened it as a relative path whose directory does not exist and every statement failed, and a `sqlite-wasm` one opened a throwaway in-memory database whose writes were gone at the next connect. The datasource admin doors (Test connection, create, update) already refused both; a datasource declared in a stack or saved through the metadata door was stored anyway, and the admin door's update would not take it back.
17+
- **Now.** The parse answers one issue at `filename` (`config.filename` on a datasource, `datasources.N.config.filename` in a stack) that names the value, says why and prescribes the fix: `'…' is neither ':memory:' nor a file path. A name that starts with ':' is not read as a file, so this datasource would store nothing: use exactly ':memory:' …`, or `'' is empty and names no database file. …`. `defineStack` raises it as `STACK_SCHEMA_INVALID` (422); the metadata door answers `422 INVALID_METADATA`.
18+
- **Unchanged.** Exactly `:memory:`, an absent `filename` (still defaulting to `:memory:`), and relative, absolute, Windows-drive and `file:` paths parse as before. Whether a path can be opened or created is still judged only at runtime, by the datasource admin doors; the schema cannot touch the file system.
19+
- **`@objectstack/service-datasource`.** The admin doors give the same answers as before, word for word. The two arms the string alone decides now come from the driver-contract parse they already run, so `sqlite-database-filename.ts` keeps only its filesystem arm: one definition, in the spec.
20+
- **`@objectstack/spec`.** The upgrade-guide entry `sqlite-filename-names-no-database-refused` (a semantic migration: no automatic rewrite, because whether the author meant an ephemeral database or the path typed after the prefix is a judgement about the datasource).
21+
22+
**FROM → TO.** `config: { filename: ':memory:/srv/data/parts.db' }` → `filename: '/srv/data/parts.db'` to keep the data in that file, or `filename: ':memory:'` for an ephemeral database; `filename: ''` → `':memory:'` or a file path.

0 commit comments

Comments
 (0)