chore(spec): 综合清理 + legacy-layer 迁移 spec/plan/data

主要改动:
- 切到 funplay-cocos-mcp v0.5.1 (用户级配置, 项目级 .mcp.json 删除)
- 仓库文档/CLAUDE.md/.gitignore 等清理过时 cocos-mcp-server 引用
- memory 文件同步: cocos-mcp-setup/path/blocker/spriteframe-uuid/prefab-persist 等加 funplay 实测警告
- memory 新建 funplay-cocos-mcp-pending-verification.md (后已被实测覆盖)
- spec/plan/data:
  - docs/superpowers/specs/2026-09-02-legacy-layer-migration-design.md
  - docs/superpowers/plans/2026-09-02-legacy-layer-migration.md
  - docs/superpowers/data/layer-spirit-summary.json
- YouleNexus: profiles.ts / defaults.ts / PlayerInfoView.prefab / scene 改动

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-02 07:36:54 +08:00
co-authored by Claude Opus 5
parent fea85c6644
commit 02dc5d51ca
100 changed files with 3480 additions and 6961 deletions
@@ -0,0 +1,33 @@
import { _decorator, Component, Label } from 'cc';
const { ccclass, property } = _decorator;
/**
* PlayerInfoView: 自包含响应式视图组件(不依赖 framework/store-binder)。
*
* 设计:PlayerInfoView.ts 与 SceneStart.ts 配合工作。
* - PlayerInfoView 节点挂此脚本,声明 nicknameLabel/beanLabel/avatarSprite
* 三个 @property
* - SceneStart 构建 mock playerState,直接调用 view.applyPlayer() 触发
* 响应式更新(无需 binder 中间层)
*
* 此组件也接受 bindTo(session) API 形式(与之前兼容),内部创建极简
* signal 形式,避免依赖 framework/store-binder。
*/
@ccclass('PlayerInfoView')
export class PlayerInfoView extends Component {
@property(Label)
nicknameLabel: Label = null!;
@property(Label)
beanLabel: Label = null!;
/** avatar 暂不挂(简化版不展示头像) */
/** 公共方法:直接接受 player 数据,更新 Label */
applyPlayer(p: { nickname: string; bean: number }): void {
if (this.nicknameLabel) this.nicknameLabel.string = p.nickname ?? '';
if (this.beanLabel) this.beanLabel.string = String(p.bean ?? 0);
}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "08e6e0d0-570b-46e4-bcf8-2038993cc0e2",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "55c9602a-6422-4648-afbb-feebf36bd5b6",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "c9dc34dd-7ba0-4c0b-b325-b3a28e6ac58f",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -5,16 +5,17 @@ const { ccclass, property } = _decorator;
/**
* PlayerInfoView: 响应式视图组件(自包含,便于 Cocos 编辑器挂载)。
*
* 设计取舍:不 import framework/store-binder,以避免 framework/ 的 .ts 在
* cocos-mcp-server 的 mount_script 下出现 ctor 错误(framework/ 路径下
* .ts 不被 Cocos 3.8 当 Component 子类编译;见 memory cocos-mcp-mount-script-blocker)。
* 设计取舍:不 import framework/store-binder,让本组件保持"纯 cc.Component 子类 +
* 极简内联 binder"的单文件结构,方便通过 funplay-cocos-mcp 的 mount 流程挂到 prefab
* (挂脚本路径与持久化限制见 memory `prefab-persist-mount-script` /
* `cocos-mcp-mount-script-path`)。
*
* 实际订阅契约与 framework/ui/store-binder 一致:
* - bindTo(binder) 接收外部 binder 实例
* - 调用方持有 binder,内部 subscribe + 自动刷新 Label.string
*
* 后续如需让 framework/store-binder 与本组件复用同一份逻辑,可把 subscribe
* 抽到一个 cc-agnostic 的 pure module;目前为解 ctor blocker 暂以自包含方式落地。
* 抽到一个 cc-agnostic 的 pure module;目前以"单文件自包含"落地,优先确保编辑器挂载稳定。
*/
/** 内联极简 binder(语义与 framework/ui/store-binder 对齐) */
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "b9890bf8-c8e3-40f9-afef-d985493033b9",
"files": [],
"subMetas": {},
"userData": {}
}