feat(spec)!: Studio 授权面收紧(#4001 批 7) - #4541
Merged
Merged
Conversation
All 27 shapes across `studio/` — plugin manifests, the flow builder, the object designer. These are the configs a Studio extension author writes by hand, and a dropped key here is quiet in the way this campaign cares about: the plugin loads, the canvas renders, the designer opens, each contributing less than its author declared. A viewer that never appears in the switcher looks like a registration bug, not a spelling one. The triage verdicts were provisional and verifying them found one wrong. All three files carried `(p)`; `plugin.zod.ts` was `mixed` with an EMPTY note, which is how an unexamined label survives. Reading it settles it: all eight shapes are contribution points on a hand-written manifest, no wire half. The method is the part worth keeping, because the original triage had none — each file exports a `define*` factory that parses an author-written literal, and a `define*` factory IS the authoring door. Same lens the registered-type batches used, and cheaper than reasoning about who consumes the output. Recorded in the ledger for the next row that needs promoting out of `(p)`. The manifest gets the guidance it invites: this file says outright that it is "the package.json equivalent" and that `contributes` is "analogous to VS Code's". That analogy is the point and the hazard — every near-miss is a word that is correct over there. `displayName` → `name`, `publisher` → `author`, `contributions` → `contributes`; and for keys with no counterpart (`main`, `engines`, `categories`, `keywords`, `repository`, `icon`, `dependencies`) a sentence saying what to use instead. `main` is the dangerous one: an author declares an entry point, gets a plugin that loads and contributes nothing, and it looks exactly like a broken `activate()`. What this checkout could not settle is stated in the ledger rather than glossed: whether objectui also CONSTRUCTS these configs programmatically and parses them with extra internal keys. If it does, strictness makes that a loud 422 at its build, with the rename suggested, instead of the silent narrowing it replaces. Verified: full monorepo suite 132/132 tasks, spec 7241 tests, tsc clean, 8 generated artifacts current, all 10 spec gates green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WnqGjQFQMqd5k81LYV8SCY
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
os-zhuang
marked this pull request as ready for review
August 2, 2026 01:29
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 107 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#4001 批 7。批 1–6e = #4514 → #4534,均已合并(25 个注册类型的完整性闸门已到位)。
studio/全部 27 个形状收紧:插件清单、flow builder、object designer。这些是 Studio 扩展作者手写的配置,而这里被丢弃的键,安静得正是本战役在意的那种:插件加载了、画布渲染了、设计器打开了——每一个都比它作者声明的贡献得少。一个从没出现在视图切换器里的 viewer,看起来像注册出了 bug,而不是拼写出了 bug。
这一批的核心不是转换,是验证分类
三个文件都挂着原始 triage 的
(p),而plugin.zod.ts标的是 mixed——备注栏是空的。读完就清楚了:八个形状全是 VS Code 式插件清单上的贡献点,全部手写。没有 wire 那一半。 判定改为
authorable。定案的方法值得留下,因为原来的 triage 根本没有方法:
这和注册类型批次用的是同一个透镜,而且比推理「谁消费输出」便宜得多。已写进账本,留给下一个需要摘
(p)的行。清单的 guidance,是这个文件自己招来的
它明写着自己是「
package.json的等价物」、contributes「类比 VS Code 的」。这个类比既是卖点也是陷阱——懂 VS Code 的作者会伸手去拿那套词汇,而每一个近似键在那边都是对的。
displayNamenamepublisherauthorcontributionscontributesactivation/eventsactivationEvents对根本没有对应物的键(
main·engines·categories·keywords·repository·icon·dependencies),给的是一句「该用什么」。main是最值得点名的那个:现在拒绝信息说:没有入口点键;贡献在清单里声明,运行时组件在
activate()里命令式注册。一件这个 checkout 没能验证的事(写进账本,不含糊过去)
objectui不在这个 checkout 里,所以「它会不会也程序化地构造这些 config、带着内部键去解析」我确认不了。如果会:收紧把它变成它构建时一个响亮的 422(带改名建议),而不是现在这种静默收窄。那正是整场战役做的交易,而残余风险写在账本里,好让有
objectui权限的人去关掉它,而不是重新发现它。验证
@objectstack/spec:7241 用例,tsc --noEmit干净check:*全绿(含check:strictness-ledger,它会对账本里的站点计数和分类逐行核)授权影响:这些形状没声明的键从「静默丢弃」变成「拒绝」——本来就已经被忽略。
剩余
只剩批 8(
ui/automation/data长尾,~190 站点,逐 schema 按分类规则判定)。不阻塞任何东西。🤖 Generated with Claude Code
https://claude.ai/code/session_01WnqGjQFQMqd5k81LYV8SCY
Generated by Claude Code