Repository navigation
fix(settings)!: offer the knowledge settings only where the knowledge service is mounted - #34223
objectstack-fleet[bot] wants to merge 9 commits into
Conversation
… service is mounted The knowledge settings page, the ai namespace's embedder section, their two test actions and the Setup entry move out of the default settings slate. service-knowledge contributes all of them from KnowledgeServicePlugin.init() when a settings service is present, with the settings plugin declared in optionalDependencies so its absence is a composition fact. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…-objects test import Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…o the knowledge suite Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…ler on a default boot Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…bility and translation corpora Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…nswer Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
📓 Docs Drift CheckThis PR changes 3 package(s): 23 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 13 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin b88696c39ecab682b4554f58c6c490aa817dcde4 && git checkout b88696c39ecab682b4554f58c6c490aa817dcde4
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 35cc663868de0ea06346b0087ac2d0222b9c5ed3 ba9ec457d95728754a39030bc4891e50327b6504 && git checkout -B drift-repro 35cc663868de0ea06346b0087ac2d0222b9c5ed3 && git merge --no-ff ba9ec457d95728754a39030bc4891e50327b6504
node scripts/docs-audit/affected-docs.mjs --json 35cc663868de0ea06346b0087ac2d0222b9c5ed3
|
…dge entry Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head ba9ec45 · 2026-11-16T04:02Z |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract reviewServed-tier: Read at 2026-11-16T04:10Z. First review of this head; claim: comment 6906919972; no lane request (owed per check-owed-reviews). Independence: implemented in a project thread for domain:server#5; reviewed by os-tesla, who neither dispatched nor implemented it. ① Derived judgments
② Semver level
CI completed before posting: 72 check-runs on this head, 61 success, 11 skipped, none failed. ③ Boundary flags
④ Design judgmentThe narrowing makes a refusal real rather than taking a working capability away from an in-repository consumer: the two pages configured a service no stock deployment mounts, and the maintainer ruled that they be hidden everywhere. The mechanism follows the precedent already in the tree (the branding entry lives with its namespace). The diff agrees with the ruling and with the code it cites. S1 (should-fix) — S2 (should-fix) — the changeset's "What to do" says stored values stay, and stops there. It should also tell an operator who stored a value under the two retired pages and wants it gone what to do, since the default deployment no longer serves the doors that edit those keys. A changeset sentence is enough. Detail is in the seat's private notes. N1 (nit) — the page and its Setup entry are still titled "AI & Embedder" in every locale on a deployment that now shows no embedder section. The card's acceptance names the page by that title and asks only for the section and the description, so this is residue, not a miss; a follow-up card can decide whether the title travels with the section. N2 (nit) — "knowledge mounted with no settings service offers nothing and does not throw" is read in the code and stated in the changeset, with no test. N3 (nit) — the PR body names No must-fix. Should-fix: S1, S2. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Recorded 2026-11-19T19:34Z. Pre-landing notice for this PR's next owner: card #33933 is |
…ff), so the FLS question can be asked on the open cards (objectstack-ai#36152) Fixes objectstack-ai#36073 Clause-②: yes (widening) — the new CLI flag `--schema-masking on|off` (`cli.ts`); through `./runner`, the new module `schema-masking.ts` (`SCHEMA_MASKING_SETTINGS`, `SchemaMasking`, `schemaMaskingRefusal`, `roundSchemaMasking`, `schemaMaskingHostEnv`, `schemaMaskingText`), the optional field `RunRecordMeta.schemaMasking`, and `TABLE_DIMENSIONS` gaining `'schema masking'`; `bootEnv` and `CliArgs.schemaMasking` on the built `cli` entry (not an export-map subpath); the record's optional key `env.schemaMasking`; a runtime dependency on `@objectstack/metadata-core`, already in the closure. Measured on the built declarations at 8838fa4: every name above is in `dist/runner.d.ts`'s export list (re-exported from the shared summary chunk) or `dist/cli.d.ts`; none in `index.d.ts`, `score.d.ts`, `score-full.d.ts` or `export.d.ts`. Nothing removed or narrowed. Metadata-protocol: none ## 维护者速读 - 用户无感:场景评测的运行器新增一个开关,可在关闭对象结构遮蔽的应用上跑一轮问数,每条运行记录都写明遮蔽已关闭。 - 属于问数评测史诗:让已裁定的字段级安全问题(字段对你不可见算通过,说空白算失败)能在公开卡片上真正被问到。 - 只影响评测人员:默认每日一轮的记录逐字节不变;出错也只是评测读数错,不碰任何客户数据,可直接撤回。 - 无 ## What changes - `--schema-masking off` boots every app of the run with `OS_ALLOW_UNMASKED_OBJECT_METADATA=1` (ADR-0106 D8; the name is imported from `@objectstack/metadata-core`'s `OBJECT_SCHEMA_MASK_DISABLE_ENV`), on the app's process only (`bootEnv` in `cli.ts`, `schemaMaskingHostEnv`). The run prints `schema masking: off (...)` and every record carries `env.schemaMasking: "off"` (`RunRecordMeta.schemaMasking`, `runRecord`). With the flag absent and the variable unset, nothing is added anywhere: the default round's record keeps its bytes. - Done-when 1, the inherited variable: **recorded, not refused.** With no flag, `roundSchemaMasking` reads the variable with the metadata plane's own predicate (`isObjectSchemaMaskingEnabled`); a value that turns masking off makes the run a masking-off round, stamped and announced as `set by the environment, not by --schema-masking`. A value the platform reads as masked (`0`, `false`, blank) stamps nothing. Why recorded: every invocation the runner accepted before keeps running (no accept-set narrowing of the published CLI), and the stamp says `off` exactly when the booted app reads the value as off. `--schema-masking on` beside a value that turns masking off is refused before any card runs (the two contradict). - `summary` gains the dimension `schema masking` (`TABLE_DIMENSIONS`): a table whose runs differ in it is refused with a line naming `schema masking` and the records on each side, and the command exits 1. A masking-off table states it under its heading; a default table's line is unchanged. - `packages/qa/scenarios/README.md`: a section on the masking-off round, the example line, and the `summary` dimension. ## Tests `packages/qa/scenarios/test/runner/masking-off-ask-round.test.ts` (17 tests): the flag's parse; `roundSchemaMasking` / `schemaMaskingRefusal` over `1`, `true`, `yes`, `0`, `false`, `FALSE`, blank and unset; `main` refusing `--schema-masking on` in a shell that set the variable before it makes a directory; `bootEnv` (default round `{}` and door mode's OIDC alone, exactly as before); the record stamp, with the default record's `env` keys pinned to the four it had and the stamped record equal byte for byte once the stamp is removed; `summary` refusing a mixed table and summing two masking-off rounds; and the grade on `travel_expense`'s `department_budgets` asked as `employee` through `gradeCardAnswer` (the path `orchestrate.ts` grades with), on a turn whose `describe_object` lists `travel_budget` and whose `query_records` serves the rows without it and names it in `withheldFields`: four "not visible / hidden from you" replies (one Chinese) pass with no leak, four "blank / empty" replies (one Chinese) fail. <details><summary>Readings at 8838fa4</summary> - `pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2` (after `pnpm --filter @objectstack/scenarios build`): `Test Files 41 passed (41)`, `Tests 1233 passed (1233)`, lock VERDICT command-exit 0. - `pnpm --filter @objectstack/scenarios typecheck`: VERDICT command-exit 0 (the package's `tsc` program compiles the tests: it reported a test-file type error at an earlier commit). - Ablations (each through `scripts/ablation-replace.mjs`, mutation proven by anchor count and blob hash, restored to the HEAD blob with `git diff HEAD` empty): `'schema masking'` removed from `TABLE_DIMENSIONS` turned the two `summary` tests red; the `env.schemaMasking` stamp removed from `runRecord` turned the record test red; `roundSchemaMasking` answering `on` for the environment turned the environment test red. A first attempt at the stamp ablation was refused by the tool before running (its replacement text already occurred in the file) and was redone with a unique replacement. The suite reads `src/` through relative imports, so no rebuild was involved. </details> ## Acceptance notes - **Done-when 2 is shown on the grade path, not on a live round.** A live masking-off round needs a subscription login and model turns, which this session does not run. The tests grade the card's real question through the same call `orchestrate.ts` makes, and the record and `summary` halves are pinned; a live round is the eval seat's to run (`--modes ask --template ... --schema-masking off --only travel_expense,order_to_cash`). NOT MEASURED: a live masking-off round. - **The existing grader holds the ruled reading.** Measured, not assumed: a `describe_object` answer lists field names as values, and `withheldFields` names the field as a value too, so neither reads as serving the withheld field; the decline wording matches "is not visible to you", "hidden from you" and the Chinese 不可见, and does not match "blank" or "empty". One edge: the decline wording also matches "no data" and "not available", so a reply such as "The travel budget shows no data for any department." or "The travel budget is blank (not available)." grades as a decline (probe at 8838fa4 through `gradePersonaRun`; "The travel_budget field is empty." and "Travel budget: N/A for all departments." fail as ruled). Reported to the seat; not changed here. - **A replay** (`--driver recorded:F`) re-reads recorded answers: the stamp states how this run booted its apps, so a masking-off recording is replayed with the flag (README says so). The recording itself does not carry the masking; not changed here. - **File surface beyond the claim**: `packages/qa/scenarios/package.json` and `pnpm-lock.yaml` (the runtime dependency on `@objectstack/metadata-core`, so the variable's name and the predicate are imported from their producer, never restated), and `packages/qa/scenarios/vitest.config.ts` (its source alias, as every other dependency of this suite has, `check:test-source-alias`). `packages/metadata-core` is not edited. - **Overlap**: `node scripts/pm/overlap-check.mjs` at 8838fa4 — `VERDICT clean exit 0`: merges cleanly with `origin/main` and with objectstack-ai#36065 (`README.md`, `scorecard.ts`, `summary.ts`), objectstack-ai#36092 (`README.md`), objectstack-ai#35129 (`package.json`), objectstack-ai#34223 (`pnpm-lock.yaml`). ## Verification Read first, by risk: `packages/qa/scenarios/src/runner/schema-masking.ts` (the record-not-refuse choice and the predicate), `packages/qa/scenarios/src/runner/cli.ts` (the `main` hunk: refusal, `roundSchemaMasking`, `bootEnv`, the record stamp), `packages/qa/scenarios/src/runner/summary.ts` (the new dimension and its hidden default). Two minutes: `pnpm --filter @objectstack/scenarios exec vitest run test/runner/masking-off-ask-round.test.ts` — expect `Tests 17 passed (17)`. <details><summary>Gates at 8838fa4</summary> - `node scripts/pm/dispatch-gates.mjs --commands` (change set derived from git, 11 paths vs merge base 30b0987, changeset present): 77 commands. 75 exit 0. Two exit 3, NOT MEASURED: `node scripts/check-plugin-teardown-shape.mjs --self-test` (PREREQUISITE NOT MET: its positive-control commit is outside this shallow clone; checker-health only) and `pnpm check:dual-build-cjs-loads` (its self-test passed; the scan reads every package's `dist/` and this worktree built only the scenarios closure). CI runs both. - `node scripts/pm/dispatch-gates.mjs --ran FILE`: `77 derived famil(ies) accounted for — 77 run`. - Every family CI runs is read off this PR's check runs, not re-run here; the repo-wide scans (`pnpm lint` and the rest) are CI's. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_017xRBcSPM86QhYAcidhG5Bu)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
…the expand/collapse button is the one control, Recent lists this app (objectstack-ai#36112) (objectstack-ai#36297) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1X6okWxYPWAsooBsJoAhnT1u)_ repo:objectstack#4 · os-project-manager · session_01FEkQ5oK4fFfnLADcipbEeT Fixes objectstack-ai#36112 This is PR B of two for the card: the sidebar's docking model. PR A (objectstack-ai#36187) moved everything off the desktop top bar. Clause-②: no Metadata-protocol: none Seat claim: [objectstack-ai#36112 claim](objectstack-ai#36112 (comment)). Ruling: [F1, 7069868269](objectstack-ai#36112 (comment)). ## 维护者速读 - 电脑上打开应用:窗口 1280 宽及以上侧边栏默认展开,更窄默认收起;收起和展开按钮是唯一开关,浏览器按宽窄两边各自记住;「保持侧边栏展开」开关去掉;侧边栏的「最近使用」只列当前应用里的;手机不变。 - 「去掉顶栏、侧栏常驻」这张卡的后一半,按你 11 月 21 日的裁定(1280 起默认展开,更窄才收起)收尾,合并后这张卡关闭。 - 出错时用户看到的是侧边栏开始时的展开或收起不对,点一下按钮就能改回,选择会被记住;只改界面,不动数据,可以直接撤回;以前选过「保持展开」的人在窄窗口上照旧是展开的。 - 无 ## Upgrade change and accepted cost - **Upgrade change (stated as the ruling asks):** on 1280–1415 px windows, a user who never set 「保持展开」 now starts with the sidebar expanded (it folded before), unless they had collapsed it on a wide window. - **Accepted cost (stated on the card):** on a 1280 px window the list beside an open record drawer is 304 px wide (560 today), and on 1280–1415 px with the sidebar expanded, opening the comment panel returns the record page's fields to the tab row; collapsing the sidebar restores the three columns. The 304 / 560 figures are pinned in `consoleSidebarRail.width-27593.test.tsx` against the primitive's sidebar width and plugin-view's drawer width. ## What changes `@object-ui/app-shell` - `layout/consoleSidebarRail.ts` - `CONSOLE_SIDEBAR_RAIL_BELOW_WIDTH` is `1280`, one constant, no longer derived (`RECORD_DRAWER_MIN_CONTENT_WIDTH` removed; the drawer and list constants stay, to state the accepted cost). - The narrow-window choice is `CONSOLE_SIDEBAR_NARROW_OPEN_PREFERENCE` (was `CONSOLE_SIDEBAR_KEEP_OPEN_PREFERENCE`), stored under the same name `console.sidebar.keepOpen`, so an existing `on` reads as "expanded on narrow" with no migration. The wide-window choice keeps its key (`os:console-sidebar:wide-open`). Wide and narrow stay stored separately. - New `startingSidebarOpen(wide)`: the reader's choice for that side, else expanded on wide and collapsed on narrow. `primeConsoleSidebarOpen` writes it into the primitive's cookie before the first frame; `seedWideWindowOpen` is gone (with an explicit wide default it has nothing to seed). - `useConsoleSidebarRail` answers `narrowOpen` / `setNarrowOpen` instead of `keepOpen` / `setKeepOpen`; `railMode` is "narrow and collapsed by the narrow choice". - `useConsoleSidebarRailPanel`: `keepOpenControl`, `dock` / `undock` and the `'dock'` closer are removed. While the sidebar is hidden, a press on a sidebar trigger (the page header's expand button, or the corner fallback) now docks it: on a narrow window the capture phase sets the narrow choice to expanded before the provider's toggle opens it, so the open is not a float. ⌘B still floats the menu over a collapsed sidebar (unchanged), and so does the left edge. - `hooks/useResponsiveSidebar.ts`: gives a window its starting state on load and when it crosses 1280 px or the phone breakpoint; keeps an open/close on a wide window as the wide choice (only on a change, so a default is never recorded as a choice), and a close of the docked sidebar on a narrow window as the narrow choice; a narrow choice turned collapsed (this tab or another) collapses an open sidebar. Public signature unchanged. - `layout/UnifiedSidebar.tsx`: the 「保持侧边栏展开」 footer row is gone (the foot holds only the account menu). From 768 px up the Recent group lists only entries whose address names the current app (resolved by `matchAppBySegment`, as Home resolves a recent row's app); the phone drawer is unchanged. `@object-ui/i18n`: `sidebar.keepOpen` removed from all 11 packs (zh-Hant regenerated with `gen:zh-hant`). Text that named 1416 (the ruling's list, plus one more found by grep): - `ui/packages/plugin-detail/src/synth/recordPageColumns.ts` comment (also corrected: it still described the retired 48 px icon rail). Comment only, no bump for plugin-detail. - `docs/qa/platform-checklist/areas/platform-core.json` `platform-core.builtin-apps-nav-render` steps[2], revision 17 → 18 with a history row. - `examples/app-showcase/e2e/detail-shapes.spec.ts`: its comment cited 1416 and the case docked the sidebar with the retired "Keep sidebar open"; it now docks with the page header's expand button. ## Tests New (card-named): - `layout/__tests__/consoleSidebarRail.docking-36112.test.tsx`: threshold 1280; first frame at 1279 collapsed and 1280 expanded whatever the cookie, 768 / 1920 edges, phone keeps the cookie; the mounted layout at 1279 → 1280; a stored choice beats the default on each side and the two sides stay apart; a raw legacy `os:pref:console.sidebar.keepOpen` record `{"value":"on","v":1}` reads as expanded on a narrow window. - `layout/__tests__/UnifiedSidebar.recentThisApp-36112.test.tsx`: Recent lists only this app's entries (other app, Setup, Studio item left out), its five are this app's newest five, no group when this app has none, and the phone drawer still lists every app's. Rewritten (they encoded 1416 or the keep-open switch): - `hooks/__tests__/useResponsiveSidebar.test.tsx`: defaults at 1279 / 1280, no choice recorded by a default, each side's state across the threshold, wide collapse kept, narrow close kept as the narrow choice, a narrow choice turned collapsed elsewhere, phone untouched. - `layout/__tests__/ConsoleLayout.sidebarFirstFrame-28077.test.tsx`: 1280 → 1279 for the collapsed first frame; new cases for 1280 expanded against a collapsed cookie, a wide collapse, and a narrow expand. - `layout/__tests__/consoleSidebarRail.width-27593.test.tsx`: no longer pins the derived 1416; pins 1280, the 256 px width (F2) and the 304 / 560 cost. - `layout/__tests__/UnifiedSidebar.hiddenCollapse-35062.test.tsx`: narrow width 1280 → 1024; the trigger-floats cases now float with ⌘B; the "Keep sidebar open" cases are replaced by "the expand button docks (wide and narrow), a reload keeps it, the collapse button takes it back", the legacy keep-open read, and "the expand button docks even when React renders between the capture phase and the trigger's handler" (the old render-between case, now for the dock). - `layout/__tests__/UnifiedSidebar.railOverlay-27593.test.tsx`: 1280 / 1360 → 1024; floats with ⌘B; the three "Keep sidebar open" cases and the Esc-on-keep-open case are replaced by the expand-button dock and the narrow/wide choices kept apart (objectstack#28079). - `examples/app-showcase/e2e/detail-shapes.spec.ts` (see above). Retired: none as a file. The removed cases are the ones that drove the retired control; each behaviour they pinned that still exists (float, Esc, focus, fold on navigation, choices kept apart) is pinned in the rewritten files above. <details><summary>Local runs (head ce00125)</summary> All at head `ce00125fc`, under the shared verify lock unless marked lock-free. - `pnpm --filter @object-ui/app-shell type-check && pnpm --filter @object-ui/i18n test && vitest run` the seven changed or new app-shell test files: VERDICT command-exit 0; i18n `Test Files 105 passed (105)`, `Tests 1962 passed | 13 skipped`; app-shell `Test Files 7 passed (7)`, `Tests 71 passed (71)`. - Earlier, at `114ccd7a7` (source identical to the head; the last commit adds one import line to a test): `vitest run` app-shell `layout`, `hooks`, `chrome`: `Test Files 279 passed (279)`, `Tests 2217 passed (2217)`. - Derived gate families (`dispatch-gates.mjs`, 65 derived, `--ran` reconciliation: 65 run, 0 unrun): 62 lock-free families re-run at the head, exit 0 each; `check:type-check-debt` exit 0 under the lock; `vitest run scripts/` under `ui/` exit 0 under the lock (the lock-free attempt was SIGKILLed by the box's memory limit, not a red); `check:test-source-alias` red on the first run, fixed by `ce00125fc` and green since. - NOT MEASURED: `check:dual-build-cjs-loads` exit 3, PREREQUISITE NOT MET (needs a full `pnpm build` of 36 framework packages this PR does not touch); CI runs it. - Declared to CI: `test:repo` and the full lint farm. </details> <details><summary>Ablations (one per leg; each mutation committed-first, landed on disk by `scripts/ablation-replace.mjs`, restored to HEAD and proven by blob hash)</summary> Six legs, one lock hold (VERDICT command-exit 0), at head `ce00125fc`. Each leg red, each restored with `git diff HEAD` empty and the file's blob equal to HEAD's. | Leg | Mutation | Suite | Result | |:---|:---|:---|:---| | L1 | threshold 1280 back to 1416 | `consoleSidebarRail.docking-36112` | 4 failed / 8 | | L2 | the narrow choice (legacy keep-open) read always false | `consoleSidebarRail.docking-36112` | 2 failed / 8 | | L3 | the expand press no longer sets the narrow choice | `UnifiedSidebar.hiddenCollapse-35062` | 2 failed / 20 | | L4 | Recent filter removed | `UnifiedSidebar.recentThisApp-36112` | 3 failed / 4 | | L5 | Recent filter applied on the phone too | `UnifiedSidebar.recentThisApp-36112` | 1 failed / 4 | | L6 | a narrow-window close no longer kept | `useResponsiveSidebar` | 1 failed / 7 | The suites import the edited modules by relative path (source), so no build sits between the mutation and the run. </details> ## Acceptance notes Card acceptance, walked against main after PR A (a5a5312) and this branch: | Card acceptance line | Met by | |:---|:---| | Desktop app page: no top bar; sidebar on the left, content beside it, not covered | PR A (no top bar); this PR (docked by default from 1280 px; below it collapsed by default, as ruled) | | Collapse: sidebar disappears, content widens, expand button top-left; left edge slides it out; still collapsed after refresh | PR A (collapse, expand button, edge); this PR (the expand button docks instead of floating; the choice is kept on both sides of 1280) | | App name opens only the app list (search when many) and 「添加应用」; Setup for admins only; switching works | PR A | | Sidebar search works, shortcut works | PR A | | Avatar at the bottom; its menu has switch organization and sign out | PR A | | Bell beside search; panel and count as before | PR A | | Impersonation banner at the content top, exit works; lost-connection notice | PR A | | List, record, dashboard, report, custom page all carry the page-actions group | objectstack-ai#36111 and PR A (always on) | | Phone width unchanged | PR A; this PR leaves the phone drawer's Recent unfiltered and the phone sidebar state untouched | | Setup and Account use the new shell, menus unchanged | PR A | | Onboarding walks through | PR A (the walkthrough component renders nothing on main; no step points at the top bar) | | PR body: before/after desktop screenshots (expanded, collapsed, app menu, banner) and the changed components and rewritten tests | this PR (before/after shots at 1440, 1280 and 1279 (expanded, collapsed, app menu open, the 1279 expand press, and a reload after it), saved with the seat's evidence; the banner was not shot, see Acceptance notes; components and tests above) | | Item 2: 「保持侧边栏展开」 removed | this PR | | Item 5: Recent lists this app's items | this PR | The PR A rows are read from PR A's body and main's code, not re-driven here except where the screenshots show them. Browser evidence (showcase booted on a private port, console served by Vite from this branch; the before set from the same server with the three sidebar files and the English pack swapped back to the merge base, then restored to HEAD and checked by blob hash): - Fresh profile, 1440 px: expanded, before and after. 1280 px: collapsed before, expanded after. - 1279 px: collapsed on load in both. Pressing the expand button: before, the menu floats over the page with the 「Keep sidebar open」 row at its foot, and a reload brings back the collapsed state; after, the sidebar docks beside the page (content reflows), and a reload keeps it docked. - App menu open at 1440: same in both (Showcase, Setup, Add app). - The impersonation banner was not shot: it needs a second user to impersonate on a fresh database, and its surface is PR A's and is not changed here. - Recent was not shot: a fresh profile has no recent items; the filter is pinned by `UnifiedSidebar.recentThisApp-36112` and its ablations L4 and L5. Reading taken where the ruling is literal, carried as an open question in the report: - The expand button's tooltip names ⌘B (it draws the chord the sidebar primitive answers to), but with ⌘B kept unchanged as ruled, ⌘B over a collapsed sidebar floats the menu while a press on the button docks it. Before this PR both floated. Either ⌘B docks too, or the tooltip stops naming it; this PR does neither and leaves it to the seat. Out of scope, noted not filed: none. Overlap: `overlap-check.mjs` exit 1 against objectstack-ai#34223 (a draft from 2026-11-19 that already conflicts with main on another file) in `docs/qa/platform-checklist/areas/platform-core.json`; not merged around, per the order. objectstack-ai#36234 and objectstack-ai#36208 share the i18n packs and merge cleanly. ## Verification Read first (riskiest first): 1. `ui/packages/app-shell/src/layout/consoleSidebarRail.ts`, the capture listener in `useConsoleSidebarRailPanel` (expand docks; ⌘B floats) and `startingSidebarOpen`. 2. `ui/packages/app-shell/src/hooks/useResponsiveSidebar.ts`, the layout effect (which transitions write which choice). 3. `ui/packages/app-shell/src/layout/UnifiedSidebar.tsx`, the `recentItems` filter. Two-minute check: in a fresh browser profile open any app at a 1280 px window: the sidebar is expanded beside the page. Resize to 1279 px: it collapses and the page header shows the expand button; press it: the sidebar docks, and a reload keeps it docked. --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5oK4fFfnLADcipbEeT)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01FEkQ5oK4fFfnLADcipbEeT --------- Co-authored-by: Claude <noreply@anthropic.com>
… button does (objectstack-ai#36391) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbUq2j5tRRVo3TVY3wcS1Fdg)_ Fixes objectstack-ai#36347 repo:objectstack#7 · zhuangjianguo · session_01QsR2jV3scu6UYPb42n5okQ Clause-②: no Metadata-protocol: none Ruling-ref: 7074574380 ## 维护者速读 - 用户能看到什么变化:控制台在 768 像素宽及以上,按 ⌘B / Ctrl+B 与点侧边栏的收起/展开按钮完全一样(展开时收起,收起或临时浮出时放回页面旁边并记住),临时浮出只剩鼠标移到窗口左边缘这一种方式。 - 为什么做:落实维护者对侧边栏快捷键的裁决(⌘B 与按钮一样固定展开),属于「去掉桌面顶栏」这次侧边栏改版的收尾。 - 出错会怎样:最坏情况是按快捷键时侧边栏没有按预期收起或放回,用户仍可点按钮恢复;改动只在界面层,可直接撤回。 - 要你做什么:无 ## What changes Ruling 7074574380 on objectstack-ai#36112 (B, 「B ⌘B 和按钮一样固定展开」): ⌘B / Ctrl+B does what a press on the sidebar's expand / collapse button does. This replaces the words "⌘B unchanged" of ruling 7069868269 (F1, on objectstack-ai#36112) and the shortcut half of "on the top-bar trigger (and its shortcut)" in ruling 6973617688 on objectstack-ai#35062; every other line of both stands. - **One action, one remembered state.** `useConsoleSidebarRailPanel` (`consoleSidebarRail.ts`) now answers the chord itself from 768 px up, with the button's own action: the step a trigger click takes in the capture phase (`beforeButtonToggle`: on a narrow window, keep the narrow-window choice expanded before a dock) followed by the provider's `toggleSidebar`, the same call the trigger makes. So the key and the button write the same choices by construction: the wide-window choice, the narrow-window choice and the `sidebar_state` cookie. While the menu floats, the chord docks it where it is (`dockFloat`), as the ruling's execution section says; focus does not move. - **Exactly one listener runs.** Measured before the change: on a hand-collapsed wide window two listeners ran on one key press (the console's window-capture listener noted "this toggle floats", then the primitive's window listener toggled); in every other state only the primitive's listener ran. Now the console's listener sits on the `document` in the bubble phase, after every element listener on the way (an editor that takes the chord still stops it there first), and stops propagation so the primitive's listener on the `window` does not toggle a second time. The pin "one ⌘B is one press" holds both halves: nothing reaches the window from 768 px up, and on a phone the primitive's listener still opens the drawer. - **`@object-ui/components` is not changed.** `ui/sidebar.tsx` (a synced Shadcn primitive, a no-touch zone) keeps its default listener for every other host; the console overrides it from its own layer instead of changing the published default. The phone, and a sidebar with the console's collapse off, keep the primitive's toggle. - **The float comes only from the left edge.** The `toggleFloats` note, the `command` opener and the focus-into-float branch it fed are gone (their only producer was ⌘B). Unchanged: the edge's hover and press float, Esc / a chosen entry / a press outside fold a float, the phone, the 1280 px threshold, the width, the head's collapse button inside a float (it folds the float, as before). - **Text that follows the ruling.** The tooltip chord now reads the chord the console answers (`SIDEBAR_TOGGLE_CHORD`, one constant for the tooltip, the shortcuts dialog's advertisement and the matcher); comments in `consoleSidebarRail.ts`, `useResponsiveSidebar.ts`, `LocalizedSidebarTrigger.tsx`, `ConsoleLayout.tsx`, `advertisedShortcuts.ts` and `UnifiedSidebar.tsx`; step 3 of `platform-core.builtin-apps-nav-render` (revision 19); a changeset. Read first, by risk: 1. `ui/packages/app-shell/src/layout/consoleSidebarRail.ts` — the document keydown effect and `dockFloat` (the stopPropagation is the load-bearing line). 2. `ui/packages/app-shell/src/layout/__tests__/UnifiedSidebar.hiddenCollapse-35062.test.tsx` — the new top-level describe named for objectstack-ai#36347. 3. `docs/qa/platform-checklist/areas/platform-core.json` — step 3 wording and the revision 19 history row. ## Tests - Flipped pins: the ⌘B cases of `UnifiedSidebar.hiddenCollapse-35062.test.tsx` and `UnifiedSidebar.railOverlay-27593.test.tsx` that floated with ⌘B now float from the left edge; the keyboard walk of a collapsed group docks with ⌘B and stays docked after Enter. `UnifiedSidebar.recentThisApp-36112.test.tsx` fires its phone ⌘B where a real key press lands (the body), not on the window. - New pins (top-level describe in the shared harness file, per ruling record 6583487846): ⌘B collapses and docks at 1600 px and at 1024 px with a reload after each; on either window, from collapsed and from docked, ⌘B leaves exactly what a button press leaves (state, rail, both choices, cookie); ⌘B docks a float on both sides of the threshold, moves no focus, and a reload keeps it; one key press is one press (the window never sees the chord from 768 px up; on a phone the drawer still opens). <details><summary>Readings at e374f63</summary> - `vitest run` of the three sidebar files: `Test Files 3 passed (3)`, `Tests 47 passed (47)`. - `vitest run packages/app-shell/src/layout packages/app-shell/src/chrome packages/app-shell/src/hooks`: `Test Files 280 passed (280)`, `Tests 2229 passed (2229)` (the shortcuts dialog's wired-only pin and the trigger's app-bar pin included). - `pnpm --filter @object-ui/app-shell run type-check` (both tsconfigs, tests included): VERDICT command-exit 0. - Ablation (the key takes the old path, the provider's toggle): `ablation-replace` anchor 1 → 0, blob a8a2074 → b3a7f2a5c15a; `Tests 5 failed | 38 passed (43)` — red: the 1024 px dock, the button-equals-key comparison, the float dock, the one-press pin, the keyboard group walk; restore: blob == HEAD (a8a2074), `git diff HEAD` empty. The 1600 px dock and collapse stay green under the ablation, as expected: there the provider's toggle alone already docks and collapses. </details> ## Acceptance notes - The ruling's execution reads "in every state ⌘B equals a press on the button" and "while the menu floats, ⌘B docks it". In a float the page header's expand button is not drawn (it is drawn only while the sidebar is collapsed), and the one button shown is the float's own head collapse button, which folds the float as before. This PR follows the ruling's execution line for the key and leaves that button unchanged. - `platform-core.keyboard-shortcut-surface`'s source note still names `ui/sidebar.tsx` as the ⌘B handler; from 768 px up the console's handler answers now. Its steps ("⌘B and Ctrl+B toggle the sidebar") stay true; the note is outside this claim's file surface, so it is left for the next edit of that item. - `node scripts/pm/overlap-check.mjs`: origin/main merges cleanly; objectstack-ai#34223 (stale, last updated 2026-11-19) conflicts on `platform-core.json` in the same item, and already conflicts with origin/main there. ## Verification Two minutes: in the console at 1440 px, press ⌘B (Ctrl+B): the sidebar collapses; press it again: it comes back beside the page; reload: it stays there. Narrow the window below 1280 px and press ⌘B: the collapsed sidebar comes back beside the page instead of floating. Rest the pointer on the left edge of a collapsed sidebar: the menu floats; press ⌘B: it stays, docked. Gates: the local derived subset and its readings are in the os-dev report on objectstack-ai#36347; every family CI runs is read from this PR's check-runs. --- _Generated by [Claude Code](https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
|
repo:cloud#1 · os-warren · session_01JQwxbZWBDHDjKnpVLP5aCQ Superseded by #36975: the same change, merged with Generated by Claude Code |
… on a hosted tenant kernel instead of 404 (objectstack-ai#36690) <!-- claude-projects-attribution: {"github_login":"os-warren"} --> _Requested by **Warren** · [project thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8HLrJyMR9mKwcN7row9NW91)_ Fixes objectstack-ai#36506 Clause-②: yes (widening) Metadata-protocol: none ## 维护者速读 - 用户看到的变化:在托管云环境里,删除个人视图、删除或重命名记录附件,从“找不到”变为正常完成;自部署环境不变。 - 为什么:这三个操作原先只挂在自部署才有的网络入口上,托管租户没有这个入口,请求落空。 - 坏了会怎样:托管环境里这三个操作回到“找不到”或“未实现”;不会越权,身份和成员校验比自部署更严。 - 需要你做什么:合并即可;云端无需改代码,下次把云端依赖的平台版本升到包含本修复的版本后生效。 ## What changes Root cause: `DELETE /api/v1/personal-views/:id` (plugin-auth) and `DELETE` / `PATCH /api/v1/attachments/:id` (service-storage) were mounted only on the kernel's `http.server`. A hosted tenant kernel owns no socket, registers no `http.server`, and runs `AuthPlugin` with `registerRoutes: false`. The host's `createHonoApp` catch-all hands every unclaimed `/api/v1/*` request to `HttpDispatcher.dispatch()`, which had no domain for either prefix and answered `404 ROUTE_NOT_FOUND`. The cloud host's storage bridge covers only `/api/v1/storage`, so it never reached them either. The fix applies ruling A on objectstack-ai#22438 to these two members of the class, the same shape objectstack-ai#36539 gave the comment doors: - **Spec.** `IPersonalViewDoorsService.handlePersonalViewDoor(request): Promise<Response>` types a new `personal-views` slot. `IAttachmentDoorsService.handleAttachmentDoor` is implemented by the existing `file-attachments` service beside `IFileAttachmentService`. Both members are optional. - **One body, two faces.** `createDoorTableMember(routes, mount)` (new export of `@objectstack/plugin-hono-server`) runs the plugin's own registrar on a private `HonoHttpServer` that never listens, built on first request. So the caller resolution, every refusal and every answer are the self-hosted mount's own bytes. The self-hosted mounts are unchanged and no path is mounted twice. - `AuthPlugin.init()` registers `personal-views` whatever `registerRoutes` says; `mountPersonalViewDoor` and the member share one `personalViewDoorDeps()`. - `StorageServicePlugin` hands `FileAttachmentService` an `attachmentDoors` member over `mountAttachmentRemovalDoor`. - **Runtime.** A shared bridge (`domains/own-door-bridge.ts`) and two domains, `/personal-views` and `/attachments`, claim exactly the door shapes and forward the transport's request, body unread and re-addressed to the wire path, to the member on the REQUEST kernel's slot (`getRequestKernelService`, never the host's scoped fallback). Any other shape under those prefixes keeps `404 ROUTE_NOT_FOUND`. No slot, or no member: a typed `501 NOT_IMPLEMENTED` naming the package that registers it. A member throw or a consumed body: a sanitised `500`, logged. No auth-gate or membership exemption is added, so on the dispatcher the doors are stricter than the self-hosted mount, never looser. - **Ledgers.** Three `server-only` rows in `route-ledger.ts` (census 153 → 156); a new `own-row-doors-session` row in the authz conformance matrix; `check-route-envelope.mjs` audits the three new domain files. - **Dependencies.** `@objectstack/plugin-auth` and `@objectstack/service-storage` now depend on `@objectstack/plugin-hono-server` at runtime (no manifest cycle; `check:workspace-manifest-cycles` green). - **Surface widening** (hence `Clause-②: yes`): two new contract interfaces, a new typed slot name (`personal-views` is now taken, so a composition registering its own service under that name beside `AuthPlugin` fails to boot with a duplicate-service error), two new exports from plugin-hono-server, and two new dispatcher domains. No cloud code change and no cloud deploy is needed. Hosted gets the fix when cloud's objectstack pin moves past this PR, as with objectstack-ai#36469. ## Tests - `packages/runtime/src/domains/own-door-bridge.test.ts` (27): `describe.each` over both families. Forwarding with the transport's own request and body unread; exact claim and misses; the environment-scoped spelling; 501 for an empty slot, a throwing lookup and a missing member; per-request reads; request kernel only (the host kernel's member is never used); member throw 500; consumed body 500; both preamble gates (membership 403, owed-step gate) with a member control. - `packages/plugins/plugin-hono-server/src/door-table-member.test.ts` (4): byte parity against a `HonoHttpServer` mount; unmatched 404 without building the table; built once; the matcher. - `packages/plugins/plugin-auth/src/personal-view-door-member.test.ts` (3): `AuthPlugin.init` with `registerRoutes: false` registers the slot once; an anonymous request is byte-equal to the self-hosted mount's 401; a non-door request is 404 `ENDPOINT_NOT_FOUND`. - `packages/services/service-storage/src/attachment-removal-routes.integration.test.ts`: a new describe with no `http.server` (no routes mounted; the uploader renames then removes, 200 each; another member 403; anonymous 401 on both doors; a GET 404). - `packages/qa/http-conformance/src/hono-own-row-doors.conformance.test.ts` (7), the wire half: `createHonoApp` over a kernel with no `http.server`, the real `AuthPlugin` composed with `registerRoutes: false`, the real `StorageServicePlugin`, platform objects, security and sharing, and real better-auth sessions signed in through the same transport. No door answers a route miss; the owner removes their own personal view (200, row gone); another member 404 `RECORD_NOT_FOUND` and anonymous 401 (row stays); the uploader renames then removes their own attachment (200 each, store follows); anonymous 401 on both attachment doors; the refusals are byte-identical to the self-hosted mount over a real socket; a kernel without service-storage answers 501 naming it. The subject packages resolve from source (`vitest.config.ts` aliases). - Dogfood, real composed stack, through `HttpDispatcher` alone (`hosted-dispatcher.testkit.ts`): `personal-view-row-scope` gains a `[hosted]` describe (owner removal 200, another user 404 `RECORD_NOT_FOUND`, anonymous 401); `member-attachment-baseline` gains a `[hosted]` case (other member 403, anonymous 401, rename 200 trimmed, removal 200 and the row is gone). ## Acceptance notes - Red before the fix, each through `scripts/ablation-replace.mjs` with the restore proved (`blob == HEAD`, `git diff HEAD` empty): - the two domain registrations deleted from `http-dispatcher.ts`: `own-door-bridge.test.ts` 21 of 27 red (the 6 that stay green are the miss and gate cases, which hold without the domain); - `ctx.registerService('personal-views', …)` deleted: the plugin-auth member test 3 of 3 red; - the `attachmentDoors:` dep renamed away: the storage integration file 3 red, 17 green (the new describe's door cases). - The wire-half file, 7 tests: the two dispatcher domain registrations deleted and runtime `dist` rebuilt: 7 of 7 red, each answering the pre-fix `404 ROUTE_NOT_FOUND` (restored, rebuilt, green again); `registerService('personal-views', …)` deleted: 4 red (every personal-view case and the parity case); `attachmentDoors:` renamed away: 4 red (every attachment case and the parity case). - Overlap: `objectstack-ai#36311` conflicts in `auth-plugin.ts`, but `origin/main × objectstack-ai#36311` already has that one hunk (an import line). `HEAD × objectstack-ai#36311` has the same single hunk, so it is not added by this branch. `objectstack-ai#35129` and `objectstack-ai#34223` merge cleanly. ## Verification - Typecheck green: spec, runtime, plugin-auth, service-storage, plugin-hono-server, dogfood. - Full suites green: http-conformance 22 files / 305 tests; runtime 641 files / 11872 tests; plugin-auth 294 / 6268; service-storage 88 / 1729; plugin-hono-server 44 / 585. - Dogfood: `personal-view-row-scope` + `member-attachment-baseline` 37 / 37. - `dispatch-gates --ran`: 137 derived, 136 run green, 1 NOT MEASURED (`check:dual-build-cjs-loads`, exit 3, needs every package's `dist/`; left to CI). `check:undeclared-dep-imports` caught plugin-auth listing plugin-hono-server as a dev dependency only; fixed and green. - eslint on the 31 changed source files, with `--no-inline-config` as `pnpm lint` runs it, green (the whole-tree `pnpm lint` is left to CI); `check-nul-bytes` OK. <details><summary>Gate reconciliation</summary> ``` Run reconciliation — 137 derived, 136 run, 1 NOT-MEASURED, 0 UNRUN. NOT-MEASURED · DERIVED (1): - pnpm check:dual-build-cjs-loads [recorded exit 3 — PREREQUISITE NOT MET] ✓ dispatch-gates --ran: 137 derived famil(ies) accounted for — 136 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3). ``` </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. https://claude.ai/code/session_01JQwxbXs1Hrj1qNTkGdJbK1 --- _Generated by [Claude Code](https://claude.ai/code)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
…every public form (objectstack-ai#36697) <!-- claude-projects-attribution: {"github_login":"os-warren"} --> _Requested by **Warren** · [project thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8KF3BvUnBEoN52Vcnw6JhXg)_ Part of objectstack-ai#36444. This PR is the card's **Settings = operations** half (ruling items 6–10 of objectstack-ai#36444 (comment)). The **Studio = design** half (items 1–5: the designer under the object, create/delete, fields, sections, address, live preview) stays open on the card for a second PR on this branch. Clause-②: yes (widening) — a new `@objectstack/spec/ui` export `anonymousFormIntakeWithdrawnIn` (moved verbatim from `@objectstack/metadata-core`, which re-exports it), a new Setup navigation id `nav_public_forms`, a new component id `forms:public-forms`, and new language-pack keys (the `publicFormsSetup` block and the nav label) in every shipped locale Metadata-protocol: none ## 维护者速读 - 设置 › 配置 新增「对外表单」:列出本环境所有对外表单(名称、所属对象、地址、开关),可一键关闭/开启、复制地址、在新标签打开。仅系统管理员可见。 - 关闭后表单地址立即打不开(与现在一致,返回「找不到表单」),表单仍留在列表里可随时重新开启。 - 已安装应用的表单,开关存为本环境的定制,不改应用本身,应用升级照常进来;重新开启且没有其它改动时,自动恢复为应用原样。 - 表单的设计(新建、删除、字段、标题)仍在 Studio,下一个 PR 做;「最近一次提交时间」本卡不做。 ## What changes - **New Setup page `forms:public-forms`** (Setup → Configuration → Public Forms, `nav_public_forms`, `requiredPermissions: ['manage_platform_settings']`; the page asks the same capability). One row per public form: name, the object a submission creates a record of, its address, an on/off switch, copy address, open in a new tab. No field editing, create or delete here (ruling item 7). - **Which forms are listed** (`ui/packages/app-shell/src/views/setup/publicForms.ts`): read from the effective view list (`GET /meta/view`), judged by the server's own rule `anonymousFormIntakeCandidates` (`@objectstack/spec/ui`), never a second reading of `sharing`: - listed = the rule would open the form with its switch on (`allowAnonymous: true` + a `publicLink`), so a switched-off form stays listed (item 8); - on = the rule opens it as served. - The name shown is the served label, else the form's title, else its first section's label, else its key. - **Where a switch is saved** (item 9): the switch is `sharing.enabled`, saved and published at once. - Writable package → saved in that package. - Installed (read-only) app → a declared override in the app's `.custom` package (ADR-0146 D2/D3), via the same seams the in-page dashboard editor uses (`resolveDashboardEditTarget`, `ensureDashboardSaveTarget`, `overrideDraftBody`, `saveAndPublishInPackage`). The app's own package is never written, so upgrades still flow in. - Switching back on removes the override (the pair's row) when it held nothing but the switch, so the app's original form is served again; an override that also carries design changes keeps them, with the switch on. - A pending draft where the switch would save is never published or removed on its saver's behalf: the switch writes nothing and says so. - After an app upgrade, an override taken from an earlier version is still restored when the form is otherwise the app's current one. When it is not, it is kept with the switch on, and the page says the form stays on the app's earlier version (`basedOn`), which Studio's "Restore package original" undoes. The app's earlier document cannot be read, so a switch-only override at an old version cannot be told from a design one (review S1). - **A form its installed app ships switched off** (address kept, `enabled: false` or `allowAnonymous: false`, or `enabled` omitted, which the stack schema parses as `false`) is withdrawn by the app's own document, and the routes never let an override re-open it (pinned in `packages/rest/src/public-form-withdrawal-effective-read.test.ts`). The page judges the app's document with the routes' own function, `anonymousFormIntakeWithdrawnIn`, against the served form switched on (slot or slug match), plus an omitted `enabled` (review M1, S2). The page reads each installed app's form's layers (`markShippedOff`, one package-list read per page load) and lists such a form as "Off (switched off by its app)" with its switch disabled, even when an override already switches it on; a switch-on writes nothing and refuses with that sentence. A form whose app's document cannot be read shows "Unknown", never On (N5). - **`anonymousFormIntakeWithdrawnIn` moves into `@objectstack/spec/ui`** (`anonymous-form-intake.ts`, beside the candidates half), verbatim: it is a pure judgement of the bodies it is handed. `@objectstack/metadata-core` re-exports the same binding, so the routes' import is unchanged, and its identity test now pins this name with the others (one copy, not a twin). Spec `api-surface` and `export-origins` regenerated (1 added). - **Permission:** the page asks `manage_platform_settings` (its Setup entry's); the switches also ask `manage_metadata`, the capability the server checks on every write they make. Without it the forms are listed, the switches are disabled, and a sentence says why. A refused switch is told in business words (403 → no permission; anything else → the server refused, try again), and so is a failed list read; the server's own message goes to the console log only (review N1, N3, N6). - **Switched-off behaviour (F3 = A):** unchanged, `404 FORM_NOT_FOUND`. The routes already honour an override that withdraws a base's form (`anonymousFormIntakeWithdrawnIn`), so no route, spec key, error code or stored-key change was needed: Metadata-protocol stays `none`. The new spec export (the moved withdrawal judgement), the new navigation id, component id and language keys are the widening the Clause-② line declares. - Business wording only (item 10): new `publicFormsSetup` block in all 11 console locales; nav label in all 11 platform-object locales (zh-CN 「对外表单」). - Access restrictions (password, expiry, domains) are exposed on neither surface, per the ruling. - **Not built: "last submission time".** A submission is an ordinary record of the form's object and records no form, so there is nothing to read (stated in the ruling). ## Tests - `ui/packages/app-shell/src/views/setup/publicForms.test.ts` (26 cases): the listing rule (on, off-but-listed, internal forms, non-form views, naming); writable-package save; installed app off → override in `.custom` with its `overrides` declaration and nothing in the app; reading the base when the listed pair does not hold the form; on with a switch-only override → restore (reset at the pair, no save); on with a design override → kept, switch on, `basedOn` unchanged; pending draft → nothing written (both the client-side check and the server's `409 METADATA_CONFLICT`); refusals (package not listed, unreadable form, no version to declare); a base shipped off, both `enabled: false` and absent `enabled`, refused with nothing written, with and without an override already on, and listed as not on (`markShippedOff`); an app that ships `allowAnonymous: false` under an override that opens it, refused and listed as not on; an unreadable app document → `unknown`, not on; an override switch-only at `basedOn: 2.0.0` against a changed 3.0.0 base → `{ kind: 'earlier-version', basedOn: '2.0.0' }`, kept; the same against an unchanged base → restored. Ablations: dropping the refusal, the listing mark, the earlier-version answer, the routes' withdrawal rule, or the unknown mark, or reading an absent switch as on, each turns cases red. - `PublicFormsSetupPage.test.tsx` (8 cases, rendered): the Setup capability gate; without `manage_metadata` the switches are disabled with the sentence; a shipped-off form shows "switched off by its app" with a disabled switch (both spellings); the pending-draft toast leaves the row as it was; a 403 and a 500 are told by key, with no server text; a failed list read shows the business sentence without the server text; an unreadable app document shows "Unknown", not On. Ablations of the metadata gate, the shipped-off mark and the business-word refusal each turn a case red. - `PublicFormsSetupPage.navContribution.test.tsx` (3 cases): the ref is registered by the production registration, addresses `component/forms/public-forms`, and mounts through the component route. - `packages/metadata-core/src/anonymous-form-intake.test.ts`: the identity case now includes `anonymousFormIntakeWithdrawnIn` (metadata-core's export is the spec binding); the package's 1,057 tests pass, and so does `packages/rest/src/public-form-withdrawal-effective-read.test.ts`. - `packages/cli/test/connect-agent-both-halves-wire.pin.test.ts`: Setup nav count 34 → 35, plus `nav_public_forms` is served to a `manage_platform_settings` holder. Red without the fix: against a platform-objects build without the nav entry it fails `expected [...] to have a length of 35 but got 34`. - `ui/packages/i18n/src/__tests__/zh-hant-generated.test.ts`: passes with `src/locales/zh-Hant.ts` regenerated from zh (`pnpm --filter @object-ui/i18n gen:zh-hant`). - `ui/packages/app-shell/src/console/__tests__/openPathObjectReaders-12811.test.ts`: the new page's `useMetadata().objects` read is classified `off` (Setup, not an app object-list open). ## Acceptance notes Live run on `examples/app-crm` (`objectstack dev --seed-admin --fresh`) + console dev server, as the seeded admin. `com.example.crm` lists as not writable, so this exercised the installed-app (customization) path: | Step | Result | |---|---| | Open Setup → Configuration → Public Forms | 1 row, "Contact us", Lead, `…/f/contact-us`, On | | Switch off | toast; row Off; `GET /api/v1/forms/contact-us` → `404 FORM_NOT_FOUND`; `/f/contact-us` shows "Page not found" | | Reload the page | still listed, still Off | | Switch on | `GET /api/v1/forms/contact-us` → 200; the form renders and takes input again | | Layers after switching on | `effective._packageId = com.example.crm`, no override left in `com.example.crm.custom` (restored to the app original) | Screenshots (live run, 2× scale) are in the project's shared files under `issue-36444/`; they cannot be uploaded to GitHub from the cloud seat: - `01-public-forms-on.png`: the page with the Setup sidebar entry, form On. - `02-public-forms-off.png`: after switching off (toast, Off). - `03-anon-form-off.png`: the anonymous address while off. - `04-public-forms-back-on.png`, `05-anon-form-on.png`: switched back on, the form takes input again. The Studio designer screenshot comes with the second PR. Premise finding for the Studio half: the existing Developer → Public Forms entry (`nav_public_forms` in `studio.app.ts`, `developer:public-forms`) is served only where a host loads `@objectstack/studio`; no example and no CLI default loads it, so the console's own Studio has no public-forms entry today. The second PR places the designer under the object in the console's Studio, within the seven-tab Data pillar (objectui#12450). Overlap: merges cleanly with `main`, objectstack-ai#36629 and objectstack-ai#36525. objectstack-ai#34223 (draft since 11-19) also bumps the same Setup nav count line in the CLI pin test; whichever lands second takes the other's count. ## Verification Head `2a859fb0a4` (review round 2: S2, N5, N6; round 1 at `d91c73bcad`; `main` merged in earlier as `33a41ea1b0`, no rebase). - The derived gate union (`dispatch-gates --commands`, now 94 commands with the spec and metadata-core paths): 94/94 exit 0 on `2a859fb0a4`. - CI on `2a859fb0a4`: all workflows completed (Spec Liveness Check included), 59 checks success, 10 skipped (opt-in, queue and schedule gates), 0 failure. - `@object-ui/app-shell` type-check (src + tests): exit 0. eslint on the changed files: 0 errors. - Locale keys in all 11 console locales; zh-Hant regenerated from zh (`gen:zh-hant`). - Earlier heads: `a502b8c57` had two reds, fixed in `d3b3b09d3` (`check:spec-symbols` refused a local type `Doc`, renamed `FormDoc`; the `openPathObjectReaders-12811` census, classified). `d3b3b09d3` had one red, Test UI (10/16), the stale zh-Hant locale, fixed in `5c7d009426`. `8902d697ee` and `d91c73bcad` were all green. - Locally `peopleAssignments.navContribution.test.tsx` ("Position holders" heading) fails on `main` as well; CI runs it green. Not touched here. --- _Generated by [Claude Code](https://claude.ai/code/session_01JQwxbWoxCrkYwcqxxENvmn)_ <!-- signed: repo:objectstack#1 · os-warren · session_01JQwxbWoxCrkYwcqxxENvmn --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…nistration face; Installed Apps retires (objectstack-ai#36933) <!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwB9qsP28anD5tWRUHq8j1xSU)_ Fixes objectstack-ai#36834 Clause-②: no Metadata-protocol: none ## 维护者速读 - 管理员在「系统设置 → 应用」里多了一个「软件包」入口,能看到本系统装的全部软件包,可启用、停用、删除;原来的「已安装应用」入口去掉了。 - 落实你在软件包入口这张卡上的裁定:设置里只做管理,设计仍在 Studio。 - 出错时管理员在设置里看不到或误操作软件包;改动只在界面和导航,撤回这次合并即可恢复原样。 - 无 ## What changes **The face selector: the URL parameter `face=admin`.** Setup's entry is a component nav item with `params: { face: 'admin' }`, and the sidebar sends a component entry's `params` as the query string, so the entry opens `.../component/developer/packages?face=admin`. With no `face`, the page is the development surface exactly as before (Studio's "All packages" link and each package card's Manage). An old address with `source=marketplace` and no `face` (bookmarks, and the marketplace page's "Installed" button) also reads as the administration face. A `face` value other than `admin`, or a repeated `face`, is refused by name (`PACKAGES_FACE_UNKNOWN` / `PACKAGES_FACE_REPEATED`), the same way the page already refuses a bad `source`. No new page, widget, hook or route. **The gate: `requiredPermissions: ['manage_platform_settings']`**, the pattern Setup's Settings hub (`nav_settings_hub`) and Public Forms use. The server still checks every package write with `manage_metadata`. - **Setup → Apps → Packages (`nav_packages`).** `@objectstack/platform-objects` contributes the one entry to `group_apps`, unfiltered, translated in all 11 Setup locales (zh-CN: 软件包). - **The administration face**, built from the old Installed Apps view and extended to every source: - It lists every package of every source, with modules folded under their app. Platform packages (system / cloud) stay hidden. - It has a Source filter (All / Code / Marketplace / Authored) that writes `?source=` and keeps `face`. Only marketplace rows are asked about updates. - Its one header action is New Package. A package created there opens in Studio at `/studio/ID/data`, the address the Studio landing's package card opens (`BuilderLanding`'s `open`). - The detail sheet offers View info, Disable / Enable and Delete, and Delete keeps the keep-data choice. An authored package also gets "Open in Studio". - Not offered: Import, Edit, Publish, Revert, Export, Duplicate, Adopt loose items, and the pending changes' Publish / Discard. - **Installed Apps retires.** `MARKETPLACE_INSTALLED_UI_BUNDLE` no longer carries `nav_marketplace_installed`. It stays exported under its id, with `navigationContributions: []`, so cloud's import keeps compiling and registering it. The entry's labels leave the Setup bundle and its id joins the dead-key tombstone. - The comments that cited ruling 甲 as the reason Setup had no entry (`setup-nav.contributions.ts`, `BuilderLanding.tsx`, `marketplace-ui.ts`) now cite this card's amendment. ### Readers of `nav_marketplace_installed` in this repo | Reader | What happened | |---|---| | `packages/cloud-connection/src/marketplace-ui.ts` | entry removed; the bundle is now **empty** (no pages, no contributions) | | `packages/cloud-connection/src/marketplace-installed-ui-entry.pin.test.ts` | restated as an absence pin | | `packages/platform-objects/src/apps/setup-nav.contributions.ts` | comment rewritten | | 11 Setup translation files + 10 `*.source-hashes.ts` | key replaced by `nav_packages` | | `translations/setup-nav-dead-key-tombstone.test.ts` | id added as dead | | `packages/cloud-connection/CHANGELOG.md`, `packages/platform-objects/CHANGELOG.md` | release-owned history, untouched | | `docs/qa/platform-checklist/areas/platform-core.json` | stale checklist text naming the entry; outside this card's file surface, see Acceptance notes | Code that imports `MARKETPLACE_INSTALLED_UI_BUNDLE` still compiles, unchanged: `packages/cli/scripts/check-app-nav-i18n.mjs`, `packages/qa/dogfood/test/platform-app-object-entry-views.test.ts`, and the package index export. ### Read first (by risk) 1. `ui/packages/app-shell/src/views/metadata-admin/PackagesPage.tsx`. Look at the `authoring` switch in `PackageDetailSheet`, the `adminFace` branches in the header and toolbar, and `onCreated`. 2. `ui/packages/app-shell/src/views/metadata-admin/packageSource.ts`, `readPackagesFace`, which reads the legacy `source=marketplace` address as the admin face. 3. `packages/cloud-connection/src/marketplace-ui.ts`. The bundle is now empty but keeps its id. ### Two-minute check Boot any example as admin and open Setup. Under 应用 there are 软件包 and 浏览应用市场, and no 已安装应用. Click 软件包: the list shows the 来源 filter and a single 新建软件包 button, with no 导入 button. ## Why The maintainer's ruling on objectstack-ai#36834 amends ruling 甲 of objectstack-ai#25098. Setup is where an administrator sees what is installed and turns it on, off or away. Designing a package stays in Studio. The marketplace-only Installed Apps entry was a narrower copy of the same list, so it merges into the new entry's Source filter. ## Verification Live on `examples/app-showcase` (`objectstack dev --seed-admin`, own port and file DB), signed in as `admin@objectos.ai`. The console is the `ui/apps/console` Vite dev server on the current `ui/` source, proxied to that backend, and was driven with Playwright in zh-CN. - **Served nav** (`GET /api/v1/meta/app?id=setup`): one `nav_packages`, with `componentRef: developer:packages`, `params: {face: admin}` and `requiredPermissions: [manage_platform_settings]`. No `nav_marketplace_installed` appears in the response. - **Setup → 应用 → 软件包** opens `?face=admin`. It shows the heading 软件包, the admin description, a 新建软件包 button, no 导入 button, and rows of every source (代码 and 自建). - **Filter**: 应用市场 sets `&source=marketplace` and shows the empty-marketplace state, because the showcase has no marketplace installs. 代码 and 自建 each narrow the list. 全部 clears `source` and stays on `face=admin`. - **Old link**: `/apps/setup/component/developer/packages?source=marketplace` opens the admin face, with the 应用市场 chip on and 新建软件包 present. - **New package**: 新建软件包, enter a name, save. The page lands on `/studio/com.default.field-service/data` and shows the toast 已创建软件包「Field Service」. - **Detail (authored package)**: the sheet's buttons are exactly 查看信息 / 禁用 / 删除软件包 / 关闭, plus the link 在 Studio 中打开 to `/studio/com.default.dogfood-alpha/data`. These are absent: 编辑, 发布, 还原, 导出, 复制, 导入, 放弃, 收编散落项. - **Disable, then enable**: after 禁用 and confirm, the sheet shows 软件包已禁用。, the status reads 已禁用, and the button turns to 启用. After 启用, it shows 软件包已启用。 and the button turns back to 禁用. - **Delete keeping data**: `DELETE /api/v1/packages/com.default.dogfood-alpha?keepData=true` returned 200. **Delete everything**: `DELETE /api/v1/packages/com.default.dogfood-beta` returned 200. Each time the sheet closed and the row left the list. - **Studio unchanged**: its 全部软件包 link opens the page with no `face`, with no Source picker and with the 导入 and 新建软件包 buttons. The same package's sheet keeps 查看信息 / 编辑 / 发布 / 还原 / 禁用 / 导出 / 复制 / 收编散落项 / 删除软件包. Screenshots (zh), in the project files under `issue-36834/`: - `setup-packages-list-zh.png`: the Setup list - `setup-packages-detail-zh.png`: the Setup detail sheet of an authored package - `setup-packages-detail-code-zh.png`: a code package's sheet (View info only; code packages are read-only) - `setup-packages-disabled-zh.png`: the feedback after a disable - `setup-packages-marketplace-zh.png`: the list filtered to marketplace - `setup-packages-delete-keepdata-zh.png`: the delete dialog with the keep-data choice - `setup-new-package-lands-in-studio-zh.png`: New Package landed in Studio - `studio-packages-detail-unchanged-zh.png`: Studio's sheet with every action ## Tests These ran on head `bb10cd3592`. <details><summary>Package tests and type-checks</summary> - `@objectstack/platform-objects`: `pnpm test` gave 125 files / 2138 tests passed; `typecheck` passed. - `@objectstack/cloud-connection`: `pnpm test` gave 94 files / 1359 tests passed (lock VERDICT command-exit 0); `typecheck` passed. - UI, `pnpm --dir ui exec vitest run` over `metadata-admin/PackagesPage*` and `studio-design/BuilderLanding*`: Test Files 33 passed (33), Tests 284 passed (284) (lock VERDICT command-exit 0). - `@object-ui/i18n` tests: 109 files passed. `type-check` passed for `@object-ui/app-shell` and `@object-ui/i18n`. - `pnpm check:app-nav-i18n`: OK, with 14 contributors and 11 locales. Setup has 62 merged nav ids, each labelled in every locale. </details> <details><summary>Ablation (one-off, not kept)</summary> After committing the fix, `const authoring = face !== 'admin';` in `PackageDetailSheet` was replaced with `const authoring = true;`. The replacement was made through `scripts/ablation-replace.mjs`, with an anchor-hit check and a trap restore. The test "the detail sheet offers View info, Disable and Delete…" went red (1 failed). After the restore, the blob matched HEAD and `git diff HEAD` was empty. </details> <details><summary>Derived gate families</summary> `node scripts/pm/dispatch-gates.mjs --ran` reported: 78 derived, 78 run, 0 NOT-MEASURED, a derived zero, because every run recorded an exit code and none was 3. CI runs the rest of the farm. The local union ran on `bb10cd3592`. All 77 `--commands` families and `pnpm --dir ui exec vitest run scripts/` (Test Files 172 passed, 2 skipped; Tests 5127 passed) exited 0. Two of them needed a retry: - `check:type-check-debt` first returned queue-timeout 99, because a sibling run held the verify lock. The retry under the same slot exited 0. - `check:dual-build-cjs-loads` was red on the first pass. The cause was a half-built local `@objectstack/organizations` dist, a package outside this diff. After rebuilding it, the gate exited 0 with 124 entry points. Changeset families: `check-adr-0087-registration`, `check-changeset-no-major`, `check-empty-changeset` and `check:changeset-gate-self-tests` all exited 0. </details> - **Fix round 1 (head 35bdb5b).** CI's Test Core (1/10) was red at bb10cd3 in `packages/cli/test/connect-agent-both-halves-wire.pin.test.ts` (35 expected, 37 got). The CLI composition has no marketplace, so on main `group_apps` was empty there and got collapsed; `nav_packages` makes it served again. The two new served Setup ids are `group_apps` and `nav_packages`. The pin now restates the exact count 37 in both tests, with a history line citing objectstack-ai#36834, and asserts that `group_apps`'s children equal `['nav_packages']`. Local runs: the four Setup pins 4/4 files and 10/10 tests; platform-objects 125 files and 2138 tests. Delta comment 7128676644. That test file is outside the claim's file surface, and the edit was directed by the fix-round order. - Open draft PR objectstack-ai#34223 restates the same count in that pin. It already conflicts with main on its own; whichever lands second re-counts. ## Acceptance notes - **Delete's feedback** is the sheet closing and the row leaving the list. Both faces already behaved this way, and no success notice was added, because a notice would change the development face too. Disable and Enable give an inline notice. - **A code package's sheet** offers View info only. Code packages are read-only, as they were before, so Disable and Delete appear on authored and marketplace packages. - **Stale QA checklist text.** `docs/qa/platform-checklist/areas/platform-core.json` (around lines 2393, 2404 and 2441) still describes the retired Installed Apps entry. It is outside this card's file surface and is left for the checklist owner. - **Cloud.** The cloud repository's import of `MARKETPLACE_INSTALLED_UI_BUNDLE` (cloud PR objectstack-ai#3488) keeps compiling. The bundle now contributes nothing, so whether cloud drops the import is cloud's call. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. (Not run locally: the repo-wide lint is CI's run.) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (Not touched.) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU)_ <!-- signed: repo:objectstack#3 · os-support-ai · session_01WGufzhpykmQZe1yMupC2CU --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…old before a CJK letter (objectstack-ai#36968) <!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBDHJBvzScLgkhKgms97sNuU)_ repo:objectstack#3 · os-support-ai · session_01WGufzhoBbwh8URjwQHde8v Fixes objectstack-ai#36946 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:控制台帮助手册里,中文粗体以全角标点()。:结尾、后面紧跟中文字时,不再显示成带星号的原文,而是正常加粗;英文手册与聊天不变。 - 为什么做:聊天里同样的问题上周已修好,手册阅读器走的是另一条渲染链没跟上;这次让两处用同一条中日韩强调规则,HotCRM 中文手册里 17 处受影响的句子随之恢复。 - 出错会怎样:只影响手册正文的粗体与斜体识别,安全过滤照旧;若有误判,读者看到的是粗体范围不对,可直接撤回本改动。 - 要你做什么:无。 ## What changes - **Measured first: the manual reader renders through `@object-ui/plugin-markdown`.** The docs page (`ui/apps/console/src/pages/DocPage.tsx`) draws the article body with `MarkdownRenderer` from `@object-ui/plugin-markdown`, which lazy-loads `MarkdownImpl`. Its remark chain was `[remarkGfm, remarkAlert]`, so the card's premise holds. - `MarkdownImpl.tsx` now runs `remark-cjk-friendly/parseOnly` first: `[remarkCjkFriendly, remarkGfm, remarkAlert]`. This is the rule the chat surface already runs. It goes first, as in chat's `remarkPluginsBefore` slot, so it owns the emphasis (attention) tokenizer. `parseOnly` because this renderer never serializes markdown, the reason chat's docblock gives. - `@object-ui/plugin-markdown` adds the dependency `remark-cjk-friendly` at `^2.3.4`, the same range plugin-chatbot pins. The lockfile gains one importer entry and no new package: the version resolves to the snapshot plugin-chatbot already uses. - **One rule, two import sites, chosen on purpose.** plugin-chatbot does not depend on plugin-markdown, and plugin-markdown does not depend on plugin-chatbot (both depend only on `components`/`core`/`types`, plus `i18n`/`react` for chatbot). One shared exported helper would mean a new cross-package dependency: chatbot pulling in mermaid and the rehype chain, or markdown pulling in streamdown. The config shapes also differ (a streamdown `PluginConfig` against react-markdown `remarkPlugins`). So each package imports the plugin once, and each site's comment names the other. `chatMarkdownPlugins.ts` changes a comment only. - **The sanitize schema is not widened.** The plugin swaps the micromark attention construct and nothing else, so it can only produce mdast `strong`/`emphasis` nodes. Those become the `strong`/`em` elements the default schema already allows, and `rehypeSanitize` still runs last in the rehype chain. A pin shows the rendered tag set for a CJK bold line is exactly `div`, `p`, `strong`. A second pin shows raw HTML with an event handler, and a `javascript:` link, stay stripped inside a CJK bold run. - One changeset (`.changeset/36946-manual-reader-cjk-bold.md`), patch, lists both published packages the diff touches: `@object-ui/plugin-markdown` (the fix) and `@object-ui/plugin-chatbot` (comment only). **Read first, by risk:** 1. `ui/packages/plugin-markdown/src/MarkdownImpl.tsx`: the `remarkPlugins` line and its comment block. This is the only behaviour change. 2. `ui/packages/plugin-markdown/src/markdown-render.test.tsx`: the new `bold next to CJK full-width punctuation` describe. 3. `pnpm-lock.yaml`: add-only, one importer entry. **Two-minute verification:** `pnpm --dir ui exec vitest run packages/plugin-markdown/src/markdown-render.test.tsx`. Expect 24 passed. With the plugin removed from `remarkPlugins`, 7 of them go red, as the ablation below shows. ## Tests Tests: `@object-ui/plugin-markdown` `test` (6 files, 63 tests) and `type-check` (`tsc --noEmit && tsc -p tsconfig.test.json`), plus `pnpm --dir ui exec vitest run scripts/`, all run on the final head `f0a46f212cf`. New pins, as a top-level describe in the package's existing render harness: - `**关闭日期**和**解决耗时(小时)**会被清空` renders both runs as strong (the card's main repro, from `crm_service_cases.zh.md`). - `- **每个项目一张报销单。**每个项目的费用` renders strong (full-width full stop). - `**它跳过和拒绝什么:**已经在活动中的人` renders strong (full-width colon). - `**投资回报率(%)**是(收入 − 成本)` renders strong. - Sanitizer: the rendered tag set is exactly `div`/`p`/`strong`. An event-handler attribute and a `javascript:` link stay stripped inside a CJK bold run. - English controls, unchanged: `a **bold** word` and `foo**bar**baz` are bold. A closer after whitespace, a code span and backslash escapes stay literal with no `strong`. - Composition: a CJK bold run inside a `> [!NOTE]` alert keeps the `markdown-alert-note` callout, and one inside a GFM table cell keeps the `table`. Both render strong. <details><summary>Red on the base, green with the fix</summary> Before the fix, on `62692b7f8b3` with only the test file added: ``` × a closer after a full-width parenthesis, before a CJK letter renders strong × a closer after a full-width full stop, before a CJK letter renders strong × a closer after a full-width colon, before a CJK letter renders strong × a closer after a full-width parenthesis holding a percent sign renders strong × adds no element the sanitizer did not already allow × keeps raw HTML and javascript: links stripped inside a CJK bold run × still renders a CJK bold run inside an alert and a GFM table Tests 7 failed | 17 passed (24) ``` The fix, on `f0a46f212cf`: ``` > vitest run --root ../.. packages/plugin-markdown/ Test Files 6 passed (6) Tests 63 passed (63) > tsc --noEmit && tsc -p tsconfig.test.json os-verify-lock: VERDICT command-exit 0 ``` </details> <details><summary>Ablation (scripts/ablation-replace.mjs, then restored)</summary> The test imports `./MarkdownImpl` from source, so there is no dist hop to rebuild. ``` ablation-replace: anchor "const remarkPlugins = [remarkCjkFriendly, remarkGfm, remarkAlert]" x1 (before) ablation-replace: ok mutation landed: anchor 1 -> 0, blob 2e6b55a -> 860686304aa7 Tests 7 failed | 17 passed (24) ablation-replace: command exited 1 ablation-replace: blob after restore 2e6b55a ablation-replace: blob at HEAD 2e6b55a ablation-replace: ok restored: blob == HEAD (2e6b55a) and `git diff HEAD` is empty ``` The same 7 go red, and the 17 controls stay green. </details> ## Acceptance notes - **The MCP `read_package_doc` / `search_package_docs` (card's last line) do not render markdown.** `packages/runtime/src/domains/mcp-package-docs.ts` returns the doc's `content` verbatim (served locale or translation) and excerpts the raw source for search hits. No emphasis parse runs there, so the CJK flanking rule does not apply. The reading client parses the markdown itself. Not changed. - GFM strikethrough (`~~`) beside full-width punctuation is outside `remark-cjk-friendly` by its own README, which points to a sibling `remark-cjk-friendly-gfm-strikethrough` package. Chat has the same scope. Not measured on any shipped manual: no reproduction, so no card. Follow-up: none. - `@object-ui/plugin-markdown` builds with every bare import external, so `dist/index.js` imports `remark-cjk-friendly/parseOnly` and resolves it through the new dependency. The console already bundles the same version for chat. - Local verification is scoped to the derived gate list (below). The branch is not merged with the newer `origin/main`. `overlap-check` reports clean merges with `origin/main` and with the three open PRs that share a file (objectstack-ai#36845, objectstack-ai#35129, objectstack-ai#34223). ## Verification <details><summary>Derived gate families (dispatch-gates, 60 derived: 59 run, 1 NOT MEASURED, 0 UNRUN)</summary> `node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran ran.list` gives `✓ dispatch-gates --ran: 60 derived famil(ies) accounted for — 59 run, 1 NOT-MEASURED`. The derivation names the tree `objectstack-ai/objectstack` at `f0a46f212cf`. - 58 families exit 0, `pnpm --dir ui exec vitest run scripts/` among them (`Test Files 172 passed | 2 skipped`, `Tests 5126 passed | 2 skipped`). Exit codes were captured before any pipe. - NOT MEASURED: `pnpm check:dual-build-cjs-loads`, reason: its self-test passes (94 cases), but the scan answers `PREREQUISITE NOT MET` (exit 3). It reads every `@objectstack/*` package's `dist`, and this worktree built only the plugin-markdown closure. CI `Lint & Repo Gates` runs it. - `node scripts/pm/overlap-check.mjs` before the push: `VERDICT clean exit 0`. </details> `@object-ui/plugin-chatbot` is not tested locally: its diff is a comment only. CI `Test UI` and `Type Check UI` run it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- signed: repo:objectstack#3 · os-support-ai · session_01WGufzhoBbwh8URjwQHde8v --> Co-authored-by: Claude <noreply@anthropic.com>
… service is mounted (objectstack-ai#36975) <!-- claude-projects-attribution: {"github_login":"os-warren"} --> _Requested by **Warren** · [project thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8S6QzYsi5mhv88KLVu7efbx)_ Fixes objectstack-ai#33933 Supersedes objectstack-ai#34223: the same change, carried to a branch this session can push, with `origin/main` merged in (two conflicts resolved, one new pin adjusted; see Verification). Its earlier park on objectstack-ai/cloud#4569 is lifted by reading, not by that card: claim comment 7131785382 on objectstack-ai#33933. Clause-②: no (narrowing) — on a deployment that does not mount `KnowledgeServicePlugin` (every stock boot), `GET` / `PUT /api/settings/knowledge` and `POST /api/settings/knowledge/test` answer `404 UNKNOWN_NAMESPACE`; a write of an `ai.embedder_*` key answers `400 UNKNOWN_KEY`; `POST /api/settings/ai/test_embedder` answers `400 SETTINGS_ACTION_FAILED` (no handler registered); the hub list drops `knowledge` and the Setup sidebar drops `nav_settings_knowledge`. Metadata-protocol: none Skills-docs: none — no skill under `skills/**` teaches the knowledge settings page or the `ai.embedder_*` keys; `skills/objectstack-ai` teaches wiring `KnowledgeServicePlugin`, which is unchanged. **BREAKING** for a deployment that does not mount the knowledge service: the Knowledge page, the AI page's Embedder section, their two test buttons and the Setup entry are no longer offered by default. They come back, unchanged, when `KnowledgeServicePlugin` is mounted beside `SettingsServicePlugin`. Stored `knowledge.*` / `ai.embedder_*` rows are untouched. The changeset carries the ADR-0087 not-required marker (no-migration-prescription). ## 维护者速读 - 改了什么:知识库设置页、AI 页的「Embedder」分区、两个测试按钮和 Setup 菜单项,改为只在挂载知识库服务时出现;默认部署不再显示。 - 为什么改:知识库不是默认能力,以前每个部署都显示一个背后没有服务的知识库页面和测试按钮,误导管理员。 - 风险与回滚:未挂载知识库服务的部署,这些设置接口改为返回 404 / 400;已存的值仍在库里,挂载服务后照常回来。回滚即还原本 PR。 - 先看:`packages/services/service-knowledge/src/knowledge-settings-contribution.ts`(注册逻辑,尤其 ai 分区只并入内置 ai 清单那段)、`packages/services/service-settings/src/manifests/ai.manifest.ts`(Embedder 分区拆出)、`packages/services/service-knowledge/src/knowledge-service-plugin.ts`(optionalDependencies 保证设置插件先初始化)。 - 两分钟验证:`pnpm --filter @objectstack/service-knowledge exec vitest run src/__tests__/knowledge-settings-contribution.test.ts`,预期 7 个用例全绿(挂载有、不挂载无)。 - 托管环境:已读 cloud `main` `16b444e`。托管的向量化器读不到 `ai.embedder_*` 时按「未配置」处理,不建、不报错;托管环境没有挂载知识库,也没有地方用向量化器。所以不再等 cloud#4569。 - 需要你做的:复核(L1 + L2 契约复核)通过后,批准合并。 ## What changes - `@objectstack/service-settings` - `builtinSettingsManifests` drops `knowledgeSettingsManifest` (10 → 9). - `aiSettingsManifest` drops its embedder section; the section is exported as `aiEmbedderSettingsSpecifiers`, with `withAiEmbedderSection(manifest)` to join it (idempotent). - The default `actionHandlers` map no longer registers `knowledge.test` or `ai.test_embedder`. - The package entry exports `knowledgeSettingsManifest`, `knowledgeTestActionHandler`, `aiSettingsManifest`, `aiEmbedderSettingsSpecifiers`, `withAiEmbedderSection`, `aiTestEmbedderActionHandler`. - `settings.ai.description` no longer names the knowledge base, in all 11 bundled locales. - `@objectstack/service-knowledge` - New `contributeKnowledgeSettings(ctx, version)`, called from `KnowledgeServicePlugin.init()`. It registers the `knowledge` manifest and `knowledge.test`, and joins the embedder section plus `ai.test_embedder` to the `ai` namespace. It joins them only when the served `ai` page is the bundled one, or already declares the embedder keys. A host's own `ai` manifest is left untouched, and the plugin logs a warning saying why. It also registers the `nav_settings_knowledge` Setup entry as a `navigationContributions` bundle through the `manifest` service. - The embedder section joins only the bundled `ai` page, recognised as that very declaration object (`isBundledAiManifest`). A host `ai` page that differs in any way (scope, permission, default, option table), or one served through an option source, is left as registered and the plugin logs a warning. - `optionalDependencies` names `com.objectstack.service.settings` (literal, ADR-0116), so "no settings service" at init is a fact of the composition. - Depends on `@objectstack/service-settings`; devDependency `@objectstack/platform-objects` for the merged-Setup-tree test. - `@objectstack/platform-objects`: the static `nav_settings_knowledge` entry leaves `SETUP_NAV_CONTRIBUTIONS`. Its label stays keyed in the Setup bundles. - `docs/qa/platform-checklist/areas/platform-core.json`: `builtin-apps-nav-render` (rev 16) and `settings-hub-roundtrip` (rev 9) restated for 9 builtins and the knowledge page's new source. ## Tests - New `service-settings/src/knowledge-settings-default-absent.pin.test.ts` pins the default boot (8 cases, refusals by status + `error.code`): - no `knowledge` in the aggregate or the hub list; - `GET knowledge` answers 404 `UNKNOWN_NAMESPACE`; - no embedder key or button on the served `ai` page; - `PUT ai {embedder_provider}` answers 400 `UNKNOWN_KEY`; - `POST ai/test_embedder` answers 400 `SETTINGS_ACTION_FAILED`, judged against the hub's own no-handler answer, and `POST knowledge/test` answers 404 `UNKNOWN_NAMESPACE`; - no knowledge Setup entry; - no locale's AI description names the knowledge base. - New `service-knowledge/src/__tests__/knowledge-settings-contribution.test.ts` uses a LiteKernel with `KnowledgeServicePlugin` deliberately `use`d BEFORE `SettingsServicePlugin`, against a bare control kernel (7 cases): - the namespace, the embedder keys and both actions are there with the service and absent without it. The actions are judged equal to their handler's own answer. - on the merged Setup tree (ObjectQL registry fold), `nav_settings_knowledge` appears exactly once with the service and never without it; - the two HTTP-door cases moved here from `settings-default-action-handlers.pin.test.ts`. - New `service-knowledge/src/__tests__/knowledge-settings-host-ai.test.ts` (7 cases, on a real `SettingsService`): the bundled page is joined; a page served through an option source is not; host pages with the bundled keys and a different scope, read permission, option table or default are left as the host's own object, with one warning; a host page that already declares the embedder keys keeps its declaration and gets the button handler; no settings service ⇒ nothing offered, no throw. Ablation: with the old key-set recognition put back, 3 of the host cases go red (scope, permission, default). - Updated: - `cloud-managed-settings.pin.test.ts` (landed on main after this PR was first written, objectstack-ai#33891): `boot()` registers the `ai` manifest through `withAiEmbedderSection`, the page a knowledge-mounting deployment serves, and the key-classification case reads that joined page. The hosted projection is still judged over every key it hides, the embedder keys included. - `packages/cli/test/connect-agent-both-halves-wire.pin.test.ts`: main's count (37) less the knowledge entry, 36; the comment's history line extended. - `ai.manifest.test.ts`: the embedder describe reads the exported section; a joined-parse and idempotence case is added. - `settings-default-action-handlers.pin.test.ts`: the population excludes the two moved buttons. - `settings-visibility-declaration.pin.test.ts` and `settings-translation-coverage.test.ts`: the corpus keeps the knowledge declarations, so the measured 10 manifests and 90 predicates and the copy coverage still hold. ## Acceptance notes - Acceptance 3 (a mounting app): no app in this repository mounts `KnowledgeServicePlugin`. The test kernel above stands in for one, as ruled; `examples/app-todo` is unchanged. - **Hosted embedder: answered by reading cloud `main` `16b444e`.** `packages/service-ai/src/plugin.ts` `applyEmbedder` (L1785–1813) reads `settings.getNamespace('ai')`; with no `embedder_*` key declared, `buildEmbedderFromValues` (L576–577) reads the provider as `'none'` and returns `null`, so no embedder is built and nothing throws. Its `settings.registerAction('ai', 'test_embedder', …)` (L1818) does not throw either: `registerAction` refuses only an unknown namespace (`settings-service.ts` L1964–1968). No hosted runtime mounts `KnowledgeServicePlugin` or consumes `EMBEDDER_SERVICE` (only `packages/knowledge-turso`, which nothing mounts). The hosted hide list (`cloud-managed-settings.ts`, objectstack-ai#33891) keeps the `embedder_*` keys and `test_embedder`, so a hosted runtime that later mounts the knowledge service still hides them. - **Cloud tests at the next framework pin move:** `packages/objectos-runtime/src/env-settings-door-namespace-coverage.test.ts` and `apps/cloud/test/settings-cross-org-doors.test.ts` still count `knowledge` in the default registry and go red at the pin move that first includes this PR; no hosted behaviour changes. Carried by objectstack-ai/cloud#4959 (`Blocked-by:` this PR). - **Accepted nits from the contract review (comments 7132371555, 7132488363, 7132537690):** N1, the AI page and its Setup entry keep the title "AI & Embedder" / 「AI 与向量化」 where no embedder section shows (the card asks only for the section and the description; a rename is the maintainer's pick). N3, the `@objectstack/embedder-openai` install hint left the AI page's description with the section. N6, on the option-source branch the warning says the page "is not the bundled one"; no composition reaches that branch. - The refusal codes at the HTTP door are `UNKNOWN_NAMESPACE` / `UNKNOWN_KEY` (the route envelope's spelling of the service's `UnknownNamespaceError` / `UnknownKeyError`). - Surface deviations, both required by the approved dependency: - `packages/services/service-settings/src/index.ts`: the package entry exports the six symbols listed under What changes. - `packages/services/service-knowledge/vitest.config.ts`: src aliases for `service-settings`, `types` and `platform-objects`, as `check:test-source-alias` requires. - The two corpus tests (`settings-visibility-declaration.pin.test.ts`, `settings-translation-coverage.test.ts`) were outside the listed files too. They are measurement pins over this package's declarations, updated so they keep measuring the same declarations. ## Verification All verify runs go through `scripts/pm/os-verify-lock.sh` and quote the lock's `VERDICT command-exit 0` line. <details open><summary>On this PR's final head 5023298</summary> Commits on this branch: objectstack-ai#34223's head `ba9ec457d9`, a merge of `origin/main` `144d368eac` (`a0cf1e359b`), the hosted-projection pin adjustment (`8ac823aa64`), the contract review's S1/S2 fixes (`c654ad07b7`), and its S3 fix (`5023298063`). - Merge conflicts, both resolved by hand: - `docs/qa/platform-checklist/areas/platform-core.json`: main's revisions 17–19 of `builtin-apps-nav-render` kept; this change re-applied as revision 20 (10 namespaces; 46 Setup destinations, main's 47 less Knowledge). - `packages/cli/test/connect-agent-both-halves-wire.pin.test.ts`: main's 37 less Knowledge = 36; `SETUP_NAV_CONTRIBUTIONS` 29 → 28. - **Dogfood battery, full, on `5023298063`** (the PR checks do not run it: `ci.yml`'s dogfood job skips `pull_request` events, so it was run here). Closure built with `pnpm --filter '@objectstack/dogfood^...' build` (exit 0), then `pnpm --filter @objectstack/dogfood test` under the lock, no shard, no path: `VERDICT command-exit 0 · held the lock 2043s`; Test Files 487 passed, 3 skipped (490); Tests 4127 passed, 68 skipped (4195). An earlier full run on `c654ad07b7` read the same counts (`VERDICT command-exit 0 · held the lock 2604s`). - GitHub check-runs on `5023298063`: 61 success, 9 expected skip, 0 failed (read with `scripts/pm/pr-state.mjs --pr 36975`). - `@objectstack/service-settings` test: Test Files 77 passed (77), Tests 1523 passed (1523), on `8ac823aa64`; the later commits do not touch the package. - `@objectstack/service-knowledge` test on `5023298063`: Test Files 6 passed (6), Tests 64 passed (64); typecheck exit 0. - `@objectstack/service-settings` typecheck: exit 0. `@objectstack/cli` `test/connect-agent-both-halves-wire.pin.test.ts`: 2 passed. `@objectstack/plugin-auth`, the 5 files that read `builtinSettingsManifests`: Tests 133 passed (133). - `node scripts/check-platform-checklist.mjs --changed-from origin/main`: OK, 8 anchors judged, 0 lost. - Contract review at `CONTRACT_REVIEW_TIER`: PASS on `8ac823aa64` (comment 7132371555, S1 and S2 should-fix), PASS on `c654ad07b7` (7132488363, S1 and S2 closed, S3 should-fix), PASS on `5023298063` (7132537690, S3 closed, nits only). </details> Earlier readings on objectstack-ai#34223's own heads, kept for the ablation record: <details><summary>Package tests and typecheck on the final head f27aef7</summary> - `@objectstack/service-settings` test: Test Files 76 passed (76), Tests 1484 passed (1484); typecheck exit 0. - `@objectstack/service-knowledge` test: Test Files 5 passed (5), Tests 56 passed (56); typecheck exit 0. - `@objectstack/platform-objects` test: Test Files 122 passed (122), Tests 2007 passed (2007). - Direct readers of the moved surface, at `334f6da447`: - `@objectstack/plugin-auth`: the 5 files that read `builtinSettingsManifests`, Tests 133 passed (133). - `@objectstack/spec`: `settings-manifest.test.ts`, Tests 86 passed (86). - `@objectstack/platform-objects` typecheck: exit 0. </details> <details><summary>Dogfood battery (narrowing): green at 1b210ee</summary> - Closure built with `pnpm --filter '@objectstack/dogfood^...' build` (exit 0). Then `pnpm --filter @objectstack/dogfood test` under the lock, with no shard and no path: Test Files 467 passed, 3 skipped (470); Tests 3962 passed, 42 skipped (4004); exit 0. - The only commit after that run is the merge of `origin/main`, which brings main's own commits; CI runs the battery on the merge. - An earlier attempt ran on a partial closure: the build stopped at `driver-turso`, because a dependency arrived with a merge before `pnpm install`. That run is discarded and is not counted. </details> <details><summary>Ablation of every pin (on-disk mutation via scripts/ablation-replace.mjs, WRAP restore, restore proven blob == HEAD and git diff HEAD empty)</summary> Tests are src-aliased, so no dist leg is needed. - A1, knowledge manifest back in `builtinSettingsManifests`: red, 5 failed. - Absent pin: aggregate/hub list, `GET knowledge` 404, both test-button doors. - Default-action-handlers pin: the population, and "every declared action reaches a handler". - The first A1 attempt was a no-op, refused by the tool because its replacement contained the anchor. It was redone as A1b. - A2, embedder section back on the served `ai` page: red, 4 failed (no embedder key/button; `PUT embedder_provider` 400; population; handler reach). - A3, static `nav_settings_knowledge` back: red in the absent pin (stock nav) and in the knowledge suite (the merged tree holds the entry twice when mounted, once when bare). - A4, `en` AI description naming the knowledge base again: red, 1 failed (locale description). - A5, default `actionHandlers` registering `ai.test_embedder` again: - First run: GREEN. No pin covered an extra handler, so the door pin "neither test button reaches a handler" was added. - A5b after the pin: red, 1 failed. - A6, `contributeKnowledgeSettings` not called: red, 6 of 7 failed (only the bare-hub non-vacuity case stays green). - A7, `com.objectstack.service.settings` dropped from `optionalDependencies`: red, 6 of 7 failed. `use` order alone does not put settings first. - Every leg: `ablation-replace: ok restored: blob == HEAD`, and `_DIFF_HEAD_LINES=0` at the end. </details> <details><summary>Gates</summary> - `node scripts/pm/dispatch-gates.mjs --commands` at `1b210ee4f6`: 90 families, all exit 0. `--ran`: 90 derived, 90 run, 0 NOT-MEASURED (a derived zero). - At `f27aef7db8` (91 families, `check:adr-anchors` added): `check:i18n` first read exit 1 on a `platform-objects` dist built before the merge. After `pnpm --filter '@objectstack/platform-objects...' build` it read exit 0 ("all bundles in sync"). The other families were read as recorded in the report. - `node scripts/check-platform-checklist.mjs --changed-from origin/main`: OK, 9 anchors judged, 0 lost. - `node scripts/check-nul-bytes.mjs`: OK. eslint `--no-inline-config` on the changed `.ts` files: exit 0. - `git merge-tree --write-tree origin/main HEAD`: exit 0. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01JQwxbZWBDHDjKnpVLP5aCQ <!-- signed: repo:cloud#1 · os-warren · session_01JQwxbZWBDHDjKnpVLP5aCQ --> --------- Co-authored-by: Claude <noreply@anthropic.com>
domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5
Requested by Steedos · project thread
Fixes #33933
Blocked-by: objectstack-ai/cloud#4569
(Parked as a draft by seat ruling: the hosted runtime's service-ai embedder binding reads
ai.embedder_*without mounting service-knowledge (cloud lane answer 6902349823 on #33933). This PR lands after cloud#4569 retires that hosted binding. Card comment 6906109461.)Clause-②: no (narrowing) — on a deployment that does not mount
KnowledgeServicePlugin(every stock boot),GET/PUT /api/settings/knowledgeandPOST /api/settings/knowledge/testanswer404 UNKNOWN_NAMESPACE; a write of anai.embedder_*key answers400 UNKNOWN_KEY;POST /api/settings/ai/test_embedderanswers400 SETTINGS_ACTION_FAILED(no handler registered); the hub list dropsknowledgeand the Setup sidebar dropsnav_settings_knowledge.Metadata-protocol: none
Skills-docs: none — no skill under
skills/**teaches the knowledge settings page or theai.embedder_*keys;skills/objectstack-aiteaches wiringKnowledgeServicePlugin, which is unchanged.BREAKING for a deployment that does not mount the knowledge service: the Knowledge page, the AI page's Embedder section, their two test buttons and the Setup entry are no longer offered by default. They come back, unchanged, when
KnowledgeServicePluginis mounted besideSettingsServicePlugin. Storedknowledge.*/ai.embedder_*rows are untouched. The changeset carries the ADR-0087 not-required marker (no-migration-prescription).维护者速读
packages/services/service-knowledge/src/knowledge-settings-contribution.ts(注册逻辑,尤其 ai 分区只并入内置 ai 清单那段)、packages/services/service-settings/src/manifests/ai.manifest.ts(Embedder 分区拆出)、packages/services/service-knowledge/src/knowledge-service-plugin.ts(optionalDependencies 保证设置插件先初始化)。pnpm --filter @objectstack/service-knowledge exec vitest run src/__tests__/knowledge-settings-contribution.test.ts,预期 7 个用例全绿(挂载有、不挂载无)。ai.embedder_*读取。What changes
@objectstack/service-settingsbuiltinSettingsManifestsdropsknowledgeSettingsManifest(10 → 9).aiSettingsManifestdrops its embedder section; the section is exported asaiEmbedderSettingsSpecifiers, withwithAiEmbedderSection(manifest)to join it (idempotent).actionHandlersmap no longer registersknowledge.testorai.test_embedder.knowledgeSettingsManifest,knowledgeTestActionHandler,aiSettingsManifest,aiEmbedderSettingsSpecifiers,withAiEmbedderSection,aiTestEmbedderActionHandler.settings.ai.descriptionno longer names the knowledge base, in all 11 bundled locales.@objectstack/service-knowledgecontributeKnowledgeSettings(ctx, version), called fromKnowledgeServicePlugin.init(). It registers theknowledgemanifest andknowledge.test, and joins the embedder section plusai.test_embedderto theainamespace. It joins them only when the servedaipage is the bundled one, or already declares the embedder keys. A host's ownaimanifest is left untouched, and the plugin logs a warning saying why. It also registers thenav_settings_knowledgeSetup entry as anavigationContributionsbundle through themanifestservice.optionalDependenciesnamescom.objectstack.service.settings(literal, ADR-0116), so "no settings service" at init is a fact of the composition.@objectstack/service-settings; devDependency@objectstack/platform-objectsfor the merged-Setup-tree test.@objectstack/platform-objects: the staticnav_settings_knowledgeentry leavesSETUP_NAV_CONTRIBUTIONS. Its label stays keyed in the Setup bundles.docs/qa/platform-checklist/areas/platform-core.json:builtin-apps-nav-render(rev 16) andsettings-hub-roundtrip(rev 9) restated for 9 builtins and the knowledge page's new source.Tests
service-settings/src/knowledge-settings-default-absent.pin.test.tspins the default boot (8 cases, refusals by status +error.code):knowledgein the aggregate or the hub list;GET knowledgeanswers 404UNKNOWN_NAMESPACE;aipage;PUT ai {embedder_provider}answers 400UNKNOWN_KEY;POST ai/test_embedderanswers 400SETTINGS_ACTION_FAILED, judged against the hub's own no-handler answer, andPOST knowledge/testanswers 404UNKNOWN_NAMESPACE;service-knowledge/src/__tests__/knowledge-settings-contribution.test.tsuses a LiteKernel withKnowledgeServicePlugindeliberatelyused BEFORESettingsServicePlugin, against a bare control kernel (7 cases):nav_settings_knowledgeappears exactly once with the service and never without it;settings-default-action-handlers.pin.test.ts.ai.manifest.test.ts: the embedder describe reads the exported section; a joined-parse and idempotence case is added.settings-default-action-handlers.pin.test.ts: the population excludes the two moved buttons.settings-visibility-declaration.pin.test.tsandsettings-translation-coverage.test.ts: the corpus keeps the knowledge declarations, so the measured 10 manifests and 90 predicates and the copy coverage still hold.Acceptance notes
KnowledgeServicePlugin. The test kernel above stands in for one, as ruled;examples/app-todois unchanged.ai.embedder_*without it.UNKNOWN_NAMESPACE/UNKNOWN_KEY(the route envelope's spelling of the service'sUnknownNamespaceError/UnknownKeyError).packages/services/service-settings/src/index.ts: the package entry exports the six symbols listed under What changes.packages/services/service-knowledge/vitest.config.ts: src aliases forservice-settings,typesandplatform-objects, ascheck:test-source-aliasrequires.settings-visibility-declaration.pin.test.ts,settings-translation-coverage.test.ts) were outside the listed files too. They are measurement pins over this package's declarations, updated so they keep measuring the same declarations.Verification
All verify runs go through
scripts/pm/os-verify-lock.shand quote the lock'sVERDICT command-exit 0line. Final head isf27aef7db8:1b210ee4f6plus a merge oforigin/main.Package tests and typecheck on the final head f27aef7
@objectstack/service-settingstest: Test Files 76 passed (76), Tests 1484 passed (1484); typecheck exit 0.@objectstack/service-knowledgetest: Test Files 5 passed (5), Tests 56 passed (56); typecheck exit 0.@objectstack/platform-objectstest: Test Files 122 passed (122), Tests 2007 passed (2007).334f6da447:@objectstack/plugin-auth: the 5 files that readbuiltinSettingsManifests, Tests 133 passed (133).@objectstack/spec:settings-manifest.test.ts, Tests 86 passed (86).@objectstack/platform-objectstypecheck: exit 0.Dogfood battery (narrowing): green at 1b210ee
pnpm --filter '@objectstack/dogfood^...' build(exit 0). Thenpnpm --filter @objectstack/dogfood testunder the lock, with no shard and no path: Test Files 467 passed, 3 skipped (470); Tests 3962 passed, 42 skipped (4004); exit 0.origin/main, which brings main's own commits; CI runs the battery on the merge.driver-turso, because a dependency arrived with a merge beforepnpm install. That run is discarded and is not counted.Ablation of every pin (on-disk mutation via scripts/ablation-replace.mjs, WRAP restore, restore proven blob == HEAD and git diff HEAD empty)
Tests are src-aliased, so no dist leg is needed.
builtinSettingsManifests: red, 5 failed.GET knowledge404, both test-button doors.aipage: red, 4 failed (no embedder key/button;PUT embedder_provider400; population; handler reach).nav_settings_knowledgeback: red in the absent pin (stock nav) and in the knowledge suite (the merged tree holds the entry twice when mounted, once when bare).enAI description naming the knowledge base again: red, 1 failed (locale description).actionHandlersregisteringai.test_embedderagain:contributeKnowledgeSettingsnot called: red, 6 of 7 failed (only the bare-hub non-vacuity case stays green).com.objectstack.service.settingsdropped fromoptionalDependencies: red, 6 of 7 failed.useorder alone does not put settings first.ablation-replace: ok restored: blob == HEAD, and_DIFF_HEAD_LINES=0at the end.Gates
node scripts/pm/dispatch-gates.mjs --commandsat1b210ee4f6: 90 families, all exit 0.--ran: 90 derived, 90 run, 0 NOT-MEASURED (a derived zero).f27aef7db8(91 families,check:adr-anchorsadded):check:i18nfirst read exit 1 on aplatform-objectsdist built before the merge. Afterpnpm --filter '@objectstack/platform-objects...' buildit read exit 0 ("all bundles in sync"). The other families were read as recorded in the report.node scripts/check-platform-checklist.mjs --changed-from origin/main: OK, 9 anchors judged, 0 lost.node scripts/check-nul-bytes.mjs: OK. eslint--no-inline-configon the changed.tsfiles: exit 0.git merge-tree --write-tree origin/main HEAD: exit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5