Skip to content

refactor(ui)!: retire @object-ui/plugin-ai and its three node types - #26365

Closed
objectstack-fleet[bot] wants to merge 18 commits into
mainfrom
claude/project-thread-vl2c07
Closed

objectstack-fleet[bot] wants to merge 18 commits into
mainfrom
claude/project-thread-vl2c07

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Part of #25921 (the plugin-ai item only; the card's other items stay open).
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Ruling-ref: #26365 (comment)

维护者速读

  • 改了什么:删除没有任何加载者的 @object-ui/plugin-ai 包;十个语言包删掉它的 ai.* 文案块;@object-ui/types 里它的类型/zod 镜像改为 @deprecated 的 never 墓碑,三个节点类型(ai-form-assist / ai-recommendations / nl-query)改为按名拒收并给出处方。
  • 为什么改:执行 retire the zero-consumer surface: nine dead modules (2,211 LOC), plugin-ai, runner's publish flag, test-only reset helpers on public barrels, the providers trio, 122 dead i18n keys, root orphans #25921 的裁决 A(6398569691)。console 既不急加载也不懒加载它,工作区里没有任何导入者,发布着却从未被渲染。
  • 风险与回滚:npm 外部使用者未实测(changeset 的 BREAKING 说明覆盖);回滚即 revert 本 PR。18.2.0 是 plugin-ai 最后一次发布。ADR-0087 门禁已绿:按 feat(adr-0087): retire a deleted published package whole (PACKAGE#*, D9 amendment) #26766 的 D9 整包条款写成 @object-ui/plugin-ai#*。唯一的红是有意的:待发 changeset 26080 里删了 '@object-ui/plugin-ai': patch 那一行(不删则 changeset status 退出码 1,发版失败),你已在项目线程确认(「同意」,2026-10-28T03:32Z)。Check Changeset 不在合并队列的九个必需检查里。
  • 先看:ui/packages/types/src/zod/ai.zod.ts(拒收 arm 与 never 墓碑)、.changeset/25921-retire-plugin-ai.md(处方与 ADR-0087 标记)、.changeset/26080-readme-contributing-links.md(删掉的那一行)。
  • 两分钟验证:pnpm --dir ui exec vitest run packages/types/src/__tests__/plugin-ai-retired-25921.test.ts,预期 17 条全绿:三个旧节点各自被按名拒收、提到 plugin-ai。
  • 需要你做的:本 PR 超 3000 行,按 AGENTS.md 要一个有权限的 APPROVED 审批,然后由你转 ready 并合并或入队。

What changes

  • Package deleted. ui/packages/plugin-ai/** (736 LOC of source plus its tests), its pnpm-lock.yaml importer and its ui/vitest.config.mts alias.
  • Release group. Its entry leaves the fixed group in .changeset/config.json. Its line also leaves the pending .changeset/26080-readme-contributing-links.md: with it in place pnpm exec changeset status exits 1 (Found changeset 26080-readme-contributing-links for package @object-ui/plugin-ai which is not in the workspace), and with it removed it exits 0. That edit is a deliberate correction of somebody else's pending note, so check-empty-changeset stays red on it by design; see Acceptance notes.
  • Locale packs. The ai.* block (ai.nlQuery.*, ai.formAssist.*, ai.recommendations.*) is deleted from all ten packs, with its comment in en.ts. No other reader of those keys exists (repo-wide grep: 0 hits outside the 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 (RetiredAIFormAssistNodeSchema, RetiredAIRecommendationsNodeSchema, RetiredNLQueryNodeSchema), listed in AnyComponentSchema and not exported from the barrel, the shape of the cloud:plan-status and html retirements. The eight published zod names (AIFormAssistSchema and the rest, AIComponentSchema included) stay exported as @deprecated z.never() schemas that accept nothing. When the names leave the published face is docs/adr: a sunset rule for @deprecated tombstones — 574 tags (504 in packages/types, 640 'never' members) with no rule for when a tombstone leaves the authoring face #25912's sunset rule. zod/README.md says so.
  • CLI. known-schema-types.ts regenerated with node scripts/regenerate-known-schema-types.mjs (the three keys leave).
  • Docs. ui/content/docs/plugins/plugin-ai.mdx and its meta.json entry, and the package row in the root CONTRIBUTING.md table.
  • Records. None: the per-package sdui records were retired on main by ci(sdui): retire the per-package SDUI manifest records; CI's regeneration holds freshness (#26137 PR B) #26367. node scripts/gen-sdui-manifest-node.mjs leaves sdui.manifest.json unchanged (plugin-ai registered no public component).
  • Changeset. .changeset/25921-retire-plugin-ai.md: @object-ui/types, @object-ui/i18n, @object-ui/cli minor, BREAKING, naming 18.2.0 as the last published version, the ADR-0087 marker not-required (runtime-export-retired @object-ui/plugin-ai#*) (ADR-0087 D9 whole-package clause, feat(adr-0087): retire a deleted published package whole (PACKAGE#*, D9 amendment) #26766), and one FROM / TO line naming the package.

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 (they pinned the arms and member tombstones of the three nodes) and the package's own five test files.
  • ai-insights-retired-8800.test.ts: lit controls re-pointed at what the module still carries (the never declarations, the refusal arm).
  • zod-mirror-parity.test.ts: seven pairs out of MIRRORS; the two runtime-slot KnownDrift entries out (51 entries / 87 keys, header history sentence added); EXPECTED_MIRROR_PAIRS 204 to 197; the eleven new consts in EXCLUSIONS with reasons.
  • arm-named-export-8784.test.ts (three ABSENT_BY_DECISION rows), any-component-emit-headroom-11573.test.ts (three inline arms replace the category union), component-docs-retired-handler-keys-7340.test.ts (31 to 29, ai.ts leaves; onDismiss becomes unambiguously retired), content-channel-family-d-9256.test.ts (the nl-query row, 31 to 30), content-channel-parser-tier-clause-10928.test.ts (two message sources remain), silence-clause-parser-tier-closure-10981.test.ts (non-vacuity probe moves to views.ts).
  • 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; the README end-to-end case left with the README. ui/scripts/markdown-test-inputs.mjs follows (two entries).
  • 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 and the case that read it.
  • console-vite-alias-closure-4925.test.ts: its named negative control was plugin-ai; it is now @object-ui/cli, a published library with an exports map that the console neither imports nor aliases. select-type-check-scope.test.ts: its leaf-package fixture moves to plugin-markdown (same closure shape, no fields / dashboard / grid).

Tests

  • On the merged tree at d81562e: pnpm --dir ui exec vitest run packages/types packages/i18n packages/cli scripts packages/components/src/__tests__: 942 files, 19881 passed, 0 failed. Console and CLI closure builds 71 / 71 and 62 / 62.
  • After the last merge of main (e0535a3): the retirement pin, zod-mirror-parity, the cli ratchet, package-files-exist and the markdown-input tests, 5 files, 132 / 132.
  • Ablation of the new pin: RetiredNLQueryNodeSchema deleted from AnyComponentSchema in zod/index.zod.ts (scripts/ablation-replace.mjs) turns exactly the two nl-query cases of suite 1 red (2 failed, 15 passed of 17); restored, blob equals HEAD.
  • Full dogfood battery (pnpm --filter @objectstack/dogfood test) on db6ddb4: 297 files, 2528 passed, 0 failed.

Acceptance notes

  • ADR-0087 green. check-adr-0087-registration --base origin/main passes in CI: verified: @object-ui/plugin-ai#* (package, ui/packages/plugin-ai/package.json), under the D9 whole-package clause (ruling 6439038287, landed by feat(adr-0087): retire a deleted published package whole (PACKAGE#*, D9 amendment) #26766).
  • Pending changeset edited on purpose, confirmed. .changeset/26080-readme-contributing-links.md loses one line, '@object-ui/plugin-ai': patch; the README edit it described left with the package. check-empty-changeset reports it as a changed changeset this PR did not add, the DELIBERATE CORRECTION class. The maintainer confirmed it (「同意」, 2026-10-28T03:32Z; recorded in comment 6460230552) and chose to land with that one red. Check Changeset is not one of the queue's nine required contexts.
  • Lands as a >3,000-line PR (AGENTS.md, merge queue rule (c)): an authorized APPROVED review, then the maintainer's ready flip and merge or enqueue.
  • External npm consumers of @object-ui/plugin-ai: NOT MEASURED; the changeset carries the FROM / TO lines.
  • 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, and are untouched.

Verification

  • Premise re-measured with a positive control: 0 package.json dependents of @object-ui/plugin-ai; ui/apps/console/src/register-plugins.ts and ui/apps/console/vite.config.ts name it 0 times, against 2 and 4 for @object-ui/plugin-markdown.
  • node scripts/pm/dispatch-gates.mjs --ran at d81562e: 56 derived families, 56 run, 0 NOT-MEASURED. The one red is check-empty-changeset --base origin/main (the confirmed 26080 correction).
  • pnpm exec changeset status: exit 0, plugin-ai not listed; check-changeset-fixed: the fixed group is in sync (108 public + 1 private).
  • CI at d81562e: everything green except Check Changeset, red only on the 26080 correction.
  • 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.

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01VBDBR9oS1MNUcjBVXds5D6

claude added 12 commits October 26, 2026 22:18
…(WIP)

Part of the plugin-ai retirement (ruling A on the zero-consumer card).

Claude-Session: https://claude.ai/code/session_01VBDBR9oS1MNUcjBVXds5D6
Co-authored-by: Claude <noreply@anthropic.com>
…puts and the types pins (WIP)

Claude-Session: https://claude.ai/code/session_01VBDBR9oS1MNUcjBVXds5D6
Co-authored-by: Claude <noreply@anthropic.com>
…he new retirement pin (WIP)

Claude-Session: https://claude.ai/code/session_01VBDBR9oS1MNUcjBVXds5D6
Co-authored-by: Claude <noreply@anthropic.com>
… ledgers after the plugin-ai retirement (WIP)

Claude-Session: https://claude.ai/code/session_01VBDBR9oS1MNUcjBVXds5D6
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VBDBR9oS1MNUcjBVXds5D6
Co-authored-by: Claude <noreply@anthropic.com>

# Conflicts:
#	scripts/sdui-manifest.sources/i18n.json
#	scripts/sdui-manifest.sources/types.json
…plugin-ai retirement

Claude-Session: https://claude.ai/code/session_01VBDBR9oS1MNUcjBVXds5D6
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation tests tooling labels Oct 27, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Check Changeset is red on 20d75f1 for exactly the two reasons this PR's Acceptance notes name, and neither can be fixed from this PR:

Every other step in the job passed: no major bump, the level axis reads no (narrowing) / narrowed, and protocol lockstep holds. No re-run: both failures are deterministic.


Generated by Claude Code

Claude-Session: https://claude.ai/code/session_01VBDBR9oS1MNUcjBVXds5D6
Co-authored-by: Claude <noreply@anthropic.com>

# Conflicts:
#	.changeset/25831-object-ui-18-1-to-merge.md
#	content/docs/protocol/backward-compatibility.mdx
#	scripts/publish-smoke-pack.mjs
#	scripts/sdui-manifest.sources/i18n.json
#	scripts/sdui-manifest.sources/types.json
#	ui/packages/plugin-ai/CHANGELOG.md
#	ui/packages/plugin-ai/package.json
#	ui/scripts/__tests__/package-files-exist.test.ts
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Check Changeset on bde1e72 (after merging main past the 18.2.0 release) has one red left. The 25831 correction is gone because 18.2 consumed that note, and check-empty-changeset is green.

The remaining red is check-adr-0087-registration --base: three predicate-1 refusals, cannot be read at HEAD: no workspace manifest at HEAD is named @object-ui/plugin-ai. The gate now maps the .tsx entry at the base. What it refuses is a whole-package removal, which leaves no HEAD manifest to read. This is a disposition decision for the maintainer (a D9 whole-package limb, or a registered disposition on this PR), so the marker stays as it is until that decision is made. No re-run: the failure is deterministic.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Ruling: the ADR-0087 gate on a whole-package deletion · letter A (a D9 whole-package clause) · maintainer 「同意」 2026-10-27T10:07Z

Recorded by the director seat (summon #51 continuation, session_01KrKXQVvgYk2AJ4VkqMobyb, ledger objectstack#12708), on the ui seat's question relayed by the maintainer (「定 plugin-ai 下线 #26365 的门禁问题:给 ADR-0087 D9 加整包删除条款,还是改用 registered?我倾向加条款」) and the maintainer's 「同意」 to the seat's analysis. Letter A: ADR-0087 D9 gains a whole-package clause — when a published package is deleted at HEAD, the operand is the package itself (<package>#*), the proof is "in the workspace with a published entry at the merge base; absent from the workspace at HEAD (no package.json, not in pnpm-workspace.yaml, not in the changesets fixed group)", and the FROM → TO block names the package on one line; the gate gains the matching predicate. Not B (registered names a conversion os migrate meta would apply; the three retired node types are refused by name with a remedy, not converted — a registered rewrite would delete the user's nodes silently) and not not-required (unpublished) (that disposition reads private: true at HEAD, which a deleted package cannot carry).

Execution: the spec lane that holds the gate (#26220, pm:dispatched) opens the ADR-0087 D9 amendment PR (Tier H, docs/adr/**) and the gate predicate PR (scripts/check-adr-0087-registration.mjs), split per the mixed-diff rule or landed together by the maintainer's approval; this PR's changeset marker then takes the new spelling and check-adr-0087-registration --base origin/main goes green, after which #26365 lands by its own Tier H approval (over 3,000 lines). The two skills/objectui/guides/* mentions stay in their own governed follow-up as the body says. Ruling-ref: names this comment.

This was referenced Oct 27, 2026
Claude-Session: https://claude.ai/code/session_01VBDBR9oS1MNUcjBVXds5D6
Co-authored-by: Claude <noreply@anthropic.com>

# Conflicts:
#	ui/QUICK_REFERENCE.md
#	ui/README.md
#	ui/packages/plugin-ai/README.md
#	ui/scripts/__tests__/package-files-exist.test.ts
#	ui/scripts/markdown-test-inputs.mjs
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Head d81562e merges main past #26766, the ADR-0087 D9 whole-package clause.

  • ADR-0087. The changeset marker now reads runtime-export-retired @object-ui/plugin-ai#*, and the FROM → TO block names the package on a single line. check-adr-0087-registration --base origin/main passes locally: 1 declared-breaking changeset, carrying an ADR-0087 disposition.
  • Pending .changeset/26080-readme-contributing-links.md: deliberate correction, confirmed by the maintainer. I removed one line from it, '@object-ui/plugin-ai': patch. With the line left in, pnpm exec changeset status exits 1 (Found changeset 26080-readme-contributing-links for package @object-ui/plugin-ai which is not in the workspace). With the line removed it exits 0. The package's README edit under that note left with the package. Steve confirmed the edit in the project thread with 「同意」 at 2026-10-28T03:32Z. check-empty-changeset stays red on this file by design.
  • I also removed the @object-ui/plugin-ai row from the CONTRIBUTING.md package table, which docs: fold the ui/ top-level docs into the root README, ROADMAP and CONTRIBUTING (#26080 slice 1) #27001 had just added.
  • Local verification. The Console and CLI builds succeed (71/71 and 62/62). Vitest over types, i18n, cli, scripts and components: 942 files, 19881 tests, all passing. sdui.manifest.json is unchanged.

Generated by Claude Code

@os-zhuang os-zhuang closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/xl tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants