Repository navigation
Commit c59b1bf
refactor(ui)!: retire
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ81VrFexr8r2XyceuMm7ZUF6)_
Part of #25921 (the plugin-ai item only; the card's other items stay
open).
Supersedes #26365 (its commits are carried here unchanged, then `main`
merged and the changeset finished).
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #27048 (the two `skills/objectui/guides/*`
mentions, kept out of this PR by ruling 6439038287)
## 维护者速读
- 改了什么:删除没有任何加载者的 `@object-ui/plugin-ai` 包;十个语言包删掉它的 `ai.*`
文案块;`@object-ui/types` 里它的类型/zod 镜像改为 `@deprecated` 的 `never`
墓碑,三个节点类型按名拒收并给出处方。changeset 改用整包操作数 `@object-ui/plugin-ai#*`。
- 为什么改:执行 #25921 的裁决 A(6398569691);ADR-0087 D9 的整包操作数已随 #26766 落地,按
6439038287 的「同意」改写 changeset 标记后门禁转绿。
- 风险与回滚:npm 外部使用者未实测(changeset 的 BREAKING 说明覆盖);回滚即 revert 本
PR。`check-empty-changeset` 故意红着:合并 main 后待发的 26080 changeset 列着已删除的包,本
PR 删掉那一行,需要你确认。
- 先看:`.changeset/25921-retire-plugin-ai.md`(整包标记与 FROM
行)、`.changeset/26080-readme-contributing-links.md`(删掉的一行)、`ui/packages/types/src/zod/ai.zod.ts`(拒收
arm 与墓碑)。
- 两分钟验证:`node scripts/check-adr-0087-registration.mjs --base
origin/main`,预期 exit 0,并打印 `verified: @object-ui/plugin-ai#* (package,
ui/packages/plugin-ai/package.json)`。
- 需要你做的:确认删掉 26080 changeset 里 `'@object-ui/plugin-ai': patch`
这一行(包已删除,留着会让 `changeset version` 失败),然后按 Tier H 批准(改动超过 3,000 行)。
## What changes
- **Package deleted.** `ui/packages/plugin-ai/**`, its `pnpm-lock.yaml`
importer and its `ui/vitest.config.mts` alias.
- **Release group.** Its entry leaves the fixed group in
`.changeset/config.json`.
- **Locale packs.** The `ai.*` block (`ai.nlQuery.*`, `ai.formAssist.*`,
`ai.recommendations.*`) is deleted from all ten packs.
- **Types tombstones (ruling A).** `ui/packages/types/src/ai.ts` keeps
its nine exported names as `@deprecated` `never` aliases with the
remedy, and `AnySchema` loses the three node members. In `zod/ai.zod.ts`
the three arms become `retiredNodeType()` refusal arms, listed in
`AnyComponentSchema` and not exported from the barrel. The eight
published zod names stay exported as `@deprecated` `z.never()` schemas
that accept nothing; when they leave the published face is #25912's
sunset rule.
- **CLI.** `known-schema-types.ts` loses the three keys.
- **Docs.** `ui/content/docs/plugins/plugin-ai.mdx` and its `meta.json`
entry. The package-table row now lives in the root `CONTRIBUTING.md`
(main folded `ui/README.md` into it), and is removed there.
- **Changeset.** `.changeset/25921-retire-plugin-ai.md`:
`@object-ui/types`, `@object-ui/i18n`, `@object-ui/cli` minor, BREAKING.
The ADR-0087 marker is `not-required (runtime-export-retired
@object-ui/plugin-ai#*)`, and the three per-export FROM lines are one
line naming the package (`FROM` the package `TO nothing`, the TO text
kept).
- **Pending changeset corrected.**
`.changeset/26080-readme-contributing-links.md` (landed on main after
#26365 was built) listed `'@object-ui/plugin-ai': patch`. A pending
changeset naming a deleted package breaks `changeset version`, so that
one line is deleted. Nothing else in that note changes.
**Follow-up, not here (Tier H):**
`skills/objectui/guides/project-setup.md` and
`skills/objectui/guides/page-builder.md` still name
`@object-ui/plugin-ai`. They are governed, so they go in a separate PR
after this one.
### Forced test edits (each follows the deletion, none relaxes a check)
- New pin
`ui/packages/types/src/__tests__/plugin-ai-retired-25921.test.ts`:
compile-time absence from `AnySchema` and the `never` names, the named
refusal for each literal with its remedy, a firing control (`button`
still accepted), a generic-path control for an unknown literal, and the
eight zod names accepting nothing.
- Deleted, because their subject left with the package:
`ai-zod-arms-10859.test.ts`, `ai-node-faces-agree-10874.test.ts`,
`ai-zero-read-members-retired-8178.test.ts` and the package's own test
files.
- `zod-mirror-parity.test.ts`, `arm-named-export-8784.test.ts`,
`any-component-emit-headroom-11573.test.ts`,
`component-docs-retired-handler-keys-7340.test.ts`,
`content-channel-family-d-9256.test.ts`,
`content-channel-parser-tier-clause-10928.test.ts`,
`silence-clause-parser-tier-closure-10981.test.ts`,
`ai-insights-retired-8800.test.ts`: rows and counts that named the three
nodes, as in #26365.
-
`ui/packages/cli/src/__tests__/registered-types-validate-ratchet-10859.test.ts`:
the "armed" case becomes a by-name refusal case with a generic-path
control. `ui/scripts/markdown-test-inputs.mjs` follows: the entries that
read the plugin-ai README go, and so does the `notRead:
['packages/cli/README.md']` that main added to the cli entry (the
scanner found that path only through the plugin-ai README's bare
`README.md` segment, so the audit reports it stale once the README is
gone).
- Deletions-only ledgers lose their plugin-ai rows:
`clickableNonControlCensus-13461`, `iconOnlyButtonCensus-12143`,
`runner-package-test-entry-3746`, `doc-version-claims`;
`percent-storage-callers-11475` loses its plugin-ai exclusion set.
- `console-vite-alias-closure-4925.test.ts`: its named negative control
is now `@object-ui/cli`. `select-type-check-scope.test.ts`: its
leaf-package fixture moves to `plugin-markdown`.
- `ui/scripts/__tests__/package-files-exist.test.ts`: main's side taken
on merge. #26576 moved both floors to the shared published-package
constant, which a retirement does not move, so #26365's hand-lowered
floors are gone.
## Tests
<details><summary>Readings at head 7040d92 (merge of main
acc9c57)</summary>
- `pnpm --dir ui exec vitest run packages/types packages/i18n
packages/cli`: 511 files passed, 12453 tests passed, 13 skipped.
- `pnpm --dir ui exec vitest run scripts/` at 53dfa40: 178 files, 1
failed (`markdown-test-inputs.test.ts`, the stale `notRead` above), 5017
passed. Fixed in 7040d92; that file rerun: 17 / 17 passed.
- `type-check` of `@object-ui/types`, `@object-ui/i18n`,
`@object-ui/cli` (script names echoed): exit 0. `pnpm --dir ui run
type-check:scripts`: exit 0.
- Build: `turbo run build` with the root script's filters, 115 / 115
tasks.
- Ablation of the new pin (from #26365, its test unchanged here):
`RetiredNLQueryNodeSchema` deleted from `AnyComponentSchema` turns
exactly the two `nl-query` cases red (2 failed, 15 passed of 17);
restored, blob equals HEAD.
</details>
## Acceptance notes
- **ADR-0087 predicate 2 and two code-string mentions.** Classified with
the gate's own `maskComments` and `packageReference`,
`ui/packages/types/src/zod/ai.zod.ts` at this head names
`@object-ui/plugin-ai` in code twice: both are the refusal remedy
strings of the retired node arms (the text ruling A asks for). Every
other mention in `ui/packages/types/src/zod/*.zod.ts` is a comment.
Predicate 2 judges the package at the merge base, where all four
mentions on main are comments, so the gate is green. The seat ruled to
proceed as is.
- **Tracker number in runtime strings.** Those refusal strings carry
`(objectstack#25921)`. AGENTS.md says runtime strings carry no tracker
number (`check:doc-authoring`); that gate is not in this diff's derived
set and nothing derived refused it, so the strings are left as built.
- **`check-empty-changeset` red by design.** It refuses the one-line
correction of `.changeset/26080-readme-contributing-links.md`
(DELIBERATE CORRECTION class). The gate stays red until a maintainer
confirms the correction on this PR.
- External npm consumers of `@object-ui/plugin-ai`: NOT MEASURED; the
changeset carries the FROM / TO line.
- Leftover pre-merge notes under `ui/.changeset/` still name
`@object-ui/plugin-ai`; the root changesets config does not read that
directory (`ui/AGENTS.md`), so they are untouched.
- Unrelated `plugin-ai` mentions under `packages/spec`,
`packages/metadata-protocol` and `scripts/check-service-providers.mjs`
name the platform's own AI service plugin, not this package.
## Verification
- `node scripts/check-adr-0087-registration.mjs --base origin/main`:
exit 0, `verified: @object-ui/plugin-ai#* (package,
ui/packages/plugin-ai/package.json)`.
- `pnpm changeset status`: exit 0.
- Lockfile: `pnpm install --frozen-lockfile` exit 0 after the merge, and
`pnpm install --lockfile-only` leaves `pnpm-lock.yaml` byte-identical (0
`plugin-ai` mentions).
- `node scripts/pm/dispatch-gates.mjs --ran`: 56 derived, 56 run, 0
NOT-MEASURED. Red: `check-empty-changeset --base origin/main` (by
design, above) and the first `vitest run scripts/` (fixed, above).
`check:dts-closure`, `check:dual-build-cjs-loads` and
`check:lean-entry-closure` exit 3 or 1 before the build and 0 after it.
- `node scripts/check-platform-checklist.mjs --changed-from
origin/main`: 0 anchored files in the change set.
- `dispatch-gates --tier`: no path-derived mandate (TIER_DEFAULT).
Changed lines 7568 (+439 / −7129): over the 3,000-line threshold, so
this lands by an authorized approval.
- Full dogfood on the final head: reading goes in the card's os-dev
report.
## 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 (CI-owned 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: 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.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbYonqfPMAts3ErwZAK)_
---------
Co-authored-by: Claude <noreply@anthropic.com>@object-ui/plugin-ai and its three node types (#27042)1 parent 2302b92 commit c59b1bf
61 files changed
Lines changed: 439 additions & 7129 deletions
File tree
- .changeset
- ui
- content/docs/plugins
- packages
- cli/src
- __tests__
- utils
- components/src/__tests__
- i18n/src/locales
- plugin-ai
- src
- types/src
- __tests__
- zod
- scripts
- __tests__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
508 | 507 | | |
509 | 508 | | |
510 | 509 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
| 382 | + | |
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
396 | 400 | | |
397 | | - | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
398 | 409 | | |
399 | 410 | | |
| 411 | + | |
| 412 | + | |
400 | 413 | | |
401 | 414 | | |
402 | 415 | | |
| |||
712 | 725 | | |
713 | 726 | | |
714 | 727 | | |
715 | | - | |
716 | 728 | | |
717 | 729 | | |
718 | 730 | | |
| |||
750 | 762 | | |
751 | 763 | | |
752 | 764 | | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | 765 | | |
774 | 766 | | |
775 | 767 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
| |||
222 | 220 | | |
223 | 221 | | |
224 | 222 | | |
225 | | - | |
226 | 223 | | |
227 | 224 | | |
228 | 225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
266 | 265 | | |
267 | 266 | | |
268 | 267 | | |
| |||
0 commit comments