{"owner":"Fei-Away","repo":"Codex-Dream-Skin","hasSkills":true,"totalSkillsCount":13,"totalTokensCount":12877,"categories":["anthropic-skill","root-instruction"],"hasMcp":false,"mcpConfig":null,"found":["macos/SKILL.md","macos/references/acceptance-report-2026-07-15.md","macos/references/asset-provenance.md","macos/agents/openai.yaml","windows/SKILL.md","AGENTS.md","tools/selectors.json","macos/references/runtime-notes.md","macos/references/incident-review.md","macos/references/qa-inventory.md","windows/agents/openai.yaml","windows/references/qa-inventory.md","windows/references/runtime-notes.md"],"skills":{"macos/SKILL.md":"---\nname: codex-dream-skin-studio\ndescription: Install, customize, launch, verify, repair, update, or restore Codex Dream Skin Studio on macOS. Use when a user wants to turn a personal image into one continuous full-window Codex wallpaper with adaptive readability layers while preserving the native interface, or needs safe CDP theme troubleshooting and rollback.\ncompatibility: macOS, official Codex Desktop app, signed bundled Node.js 20 or newer\n---\n\n# Codex Dream Skin Studio\n\nThis file is an optional Codex capability entry. The delivery is a complete standalone project; users do not need to install it as a Skill.\n\n## Workflow\n\n1. Run `Install Codex Dream Skin.command` from the complete project folder.\n2. Run `Customize Codex Dream Skin.command`, choose an image in Finder, and enter a theme name.\n3. To add a complete downloaded pack, use the native menu's “导入主题 ZIP…”. Accept ordinary `.zip` only. Every new official Studio pack contains `manifest.json`, non-empty `theme.json`, non-empty locally validated `theme.css`, exactly one registered background, and optional license/signature files; the trusted local simplified format contains exactly `theme.json`, `theme.css`, and its referenced image. Import into saved themes without changing the active theme. A manually extracted complete three-file directory may instead be moved into the saved themes folder. Previously saved legacy themes without CSS remain switchable but inject no extra CSS.\n4. Verify the live result with `Verify Codex Dream Skin.command`. A pass requires a visible native sidebar and composer, no horizontal overflow, non-interactive decoration, and—on the home route—a continuous wallpaper with live native heading, project controls, and any suggestion cards exposed by the current Codex version.\n5. Restore the official appearance with `Restore Codex Dream Skin.command`.\n\n## Guardrails\n\n- Never modify the official `.app`, `app.asar`, or its code signature.\n- Use the official Codex app's signed Node.js runtime only after validating its signature, Team ID, architecture, and minimum version.\n- Bind CDP to loopback, verify that the listener belongs to Codex, and reject non-Codex renderer targets.\n- Preserve all native cards, navigation, project selectors, task content, composer controls, and keyboard focus.\n- Theme images must be UI-free wallpapers. Paint one 16:9 image continuously across the window; keep home expressive and task routes quieter. `appearance: auto` follows Codex/native or system appearance rather than image brightness.\n- Theme-pack import does not support `.dreamskin`; reject traversal, links, nested archives, ambiguous roots, size/count abuse, and packs that fail the existing theme/image payload checks.\n- Keep decoration at `pointer-events: none`.\n- Require explicit authorization before restarting an already-running Codex instance.\n- Stop an injector only when its recorded PID, executable, command line, and start time all match.\n\n## Key resources\n\n- `README.md`: user installation and customization guide.\n- `scripts/injector.mjs`: CDP connection, injection, removal, verification, and screenshots.\n- `assets/dream-skin.css`: live native interface styling.\n- `assets/renderer-inject.js`: idempotent DOM integration and cleanup.\n- `scripts/doctor-macos.sh`: signed-runtime, payload, and optional live-session self-check.\n- `references/qa-inventory.md`: release and visual acceptance criteria.\n","macos/references/acceptance-report-2026-07-15.md":"# Acceptance report — 2026-07-15\n\n## Result\n\nCodex Dream Skin Studio `1.0.0` passed its macOS release checks on the live Codex desktop app during the original private release validation.\n\n- macOS architecture: `arm64`\n- Codex version: `26.707.72221`\n- Codex signing Team ID: `2DC432GLL2`\n- Codex bundled Node.js: `v24.14.0`\n- CDP endpoint: loopback port `9341`\n- Official app deep signature after installation: valid\n- `app.asar` modification: none\n\n## Automated result\n\n`tests/run-tests.sh` passed syntax, default and custom payload, exact TOML theme-setting round trip, missing-`HOME` recovery, signed runtime, and doctor checks.\n\nLive doctor returned `pass: true`, `officialAppSignatureValid: true`, `modifiesAppAsar: false`, and `live: true`.\n\nLive renderer verification returned `pass: true` after `Page.reload`:\n\n- injected version `1.0.0`;\n- style and decorative chrome present;\n- decorative chrome `pointer-events: none`;\n- native sidebar and composer visible;\n- no horizontal document overflow;\n- home banner visible with native suggestion cards and project selector.\n\n## Evidence note (open-source tree)\n\nPrivate release builds included CDP screenshots under `docs/screenshots/`. Those captures may contain third-party UI chrome and demo art and are **not** shipped in this public tree. Reproduce evidence on your machine:\n\n```bash\n~/.codex/codex-dream-skin-studio/scripts/verify-dream-skin-macos.sh \\\n  --reload --screenshot \"$HOME/Desktop/Codex Dream Skin Verification.png\"\n```\n","macos/references/asset-provenance.md":"# Asset provenance\n\n## Bundled demo hero\n\n- File: `assets/portal-hero.png`\n- SHA-256: `cec7a03d1ca8f60add2bfb7d3fcd3fe29225ffeb3f68f98301f140535c470ac5`\n- Created: 2026-07-15 via gpt-image-2 (fuck.codexapis.com)\n- Purpose: default banner / task background preset for light red-white product hero\n- Rights: generated for this project theme pack\n\n## User themes\n\nImages chosen through Customize belong to the user (or their licensors).\n","macos/agents/openai.yaml":"interface:\n  display_name: \"Codex Dream Skin Studio\"\n  short_description: \"Turn a personal image into a reversible macOS Codex theme\"\n  default_prompt: \"Use $codex-dream-skin-studio to install, customize, verify, or restore my macOS Codex theme without modifying the official app.\"\n","windows/SKILL.md":"---\nname: codex-dream-skin\ndescription: Apply, launch, verify, repair, update, or restore a full decorative skin for the Windows Codex desktop app. Use when the user asks for a Codex theme that goes beyond official color settings, wants the pink-purple Dream/Fiona-style interface, needs the skin reapplied after a Codex update, or needs a safe rollback without modifying WindowsApps or app.asar.\n---\n\n# Codex Dream Skin\n\nApply a reversible renderer skin through Chromium DevTools Protocol while launching the official Store-installed Codex executable. Never replace or take ownership of files under `WindowsApps`.\n\n## Workflow\n\n1. Install Node.js 22 or newer, close Codex, then run `scripts/install-dream-skin.ps1` once. The installer preserves the user's native appearance settings, seeds the Arina Hashimoto theme, copies the runtime to `%LOCALAPPDATA%\\CodexDreamSkin\\engine`, and creates launch/restore/tray shortcuts that do not depend on the source checkout.\n2. Use the `Codex Dream Skin` shortcut, or run `%LOCALAPPDATA%\\CodexDreamSkin\\engine\\scripts\\start-dream-skin.ps1`. The shortcut asks before restarting an already-open Codex app; CLI callers must explicitly add `-RestartExisting`.\n3. Run `scripts/verify-dream-skin.ps1 -ScreenshotPath <absolute-path>` after launch. Treat a missing continuous wallpaper, home shell, native composer, sidebar layer, or injection marker as failure. The native suggestion count is responsive and may be two to four.\n4. To add a complete downloaded pack, use the tray's “导入主题 ZIP…”. Accept ordinary `.zip` only. Every new official Studio pack contains `manifest.json`, non-empty `theme.json`, non-empty locally validated `theme.css`, exactly one registered background, and optional license/signature files; the trusted local simplified format contains exactly `theme.json`, `theme.css`, and its referenced image. Import into saved themes without changing the active theme. A manually extracted complete three-file directory may instead be moved into the saved themes folder. Previously saved legacy themes without CSS remain switchable but inject no extra CSS.\n5. A compatible DreamSkin.cc theme can use the exact `dreamskin://apply?version=ver_...` link registered by Setup.exe. The handler always obtains approved metadata and the ZIP from the fixed API, requires `applyCompatible: true`, shows a native confirmation, verifies byte count and SHA-256, then reuses the strict importer before applying. It never accepts an arbitrary URL/path/command or a silent-apply flag.\n6. Inspect the screenshot against `references/qa-inventory.md`. Verify both the home screen and a normal task before signing off.\n7. Run `scripts/restore-dream-skin.ps1` to remove the live skin, close the saved CDP session, and reopen Codex normally. Add `-RestoreBaseTheme` to restore only saved appearance keys, `-RecoverConfigBackup` for explicit byte-for-byte recovery of a damaged config, or `-Uninstall` to delete shortcuts. A completed config restore archives that install's backup so a later install captures a fresh baseline.\n\n## Guardrails\n\n- Preserve the official executable, package signature, user threads, pets, plugins, and authentication state.\n- Theme images must be UI-free wallpapers. Never import a README screenshot, fake window, sidebar, card, composer, logo, or text baked into the bitmap.\n- Paint one continuous 16:9 wallpaper across the full Codex window. Let the sidebar, main area, header, and composer act as coordinated readability layers; keep the home route expressive and task routes quieter.\n- `appearance: auto` follows the native computed `color-scheme` first and the system appearance only as a fallback. Image brightness may tune color and composition, but must not flip the user's shell mode; explicit `light` and `dark` remain authoritative.\n- Attach the \"选择项目\" treatment to Codex's real project-selector toolbar and keep the current project button clickable; never draw a disconnected replacement.\n- Keep decorative layers `pointer-events: none` and keep real buttons, navigation, and composer above them.\n- On app updates, rerun install and launch; the scripts discover the current Appx package dynamically. Saved paths are never trusted for process control unless they still match a registered package identity.\n- Keep manifest-derived package activation as the preferred Windows launch, and always pair remote-debugging switches with the persistent non-default managed CDP profile that Chromium 136+ requires. The exact Store `app\\ChatGPT.exe` fallback is allowed only after visible process arguments prove owl encoded the CDP flag inside `codex://`, and only with the package identity/path checks in `common-windows.ps1`. Preserve the pre-launch PID set during rollback. Treat access denial and raw arguments without a verified listener as terminal. This fallback is diagnostic, not proof of owl compatibility; never change WindowsApps ACLs to make it run.\n- The default launcher scans for a free port when `9335` is occupied. An explicitly requested occupied port fails closed.\n- Keep the injection daemon running for navigation/reload resilience. Its state and logs live under `%LOCALAPPDATA%\\CodexDreamSkin`.\n- The watcher registers a generation-checked early payload for connected renderers so reload/navigation can paint the skin before the normal load-event fallback; unsupported CDP targets fall back safely.\n- The active theme, saved themes, imported images, pause marker, and tray controls live under `%LOCALAPPDATA%\\CodexDreamSkin`. Reject empty or over-10 MB images before copying or encoding them.\n- Theme-pack import does not support `.dreamskin`; reject traversal, links/reparse entries, nested archives, ambiguous roots, Windows-reserved paths, size/count abuse, and packs that fail the existing theme/image payload checks.\n- Community deep links accept only a canonical version ID. Reject redirects, non-approved or non-compatible metadata, mismatched IDs, non-boolean compatibility, unsafe display metadata, unexpected media types, byte/hash mismatches, and concurrent applies before changing the active theme.\n- Every managed-store write rejects junctions and other reparse points in every existing path component. Imports also use the bundled Node metadata parser before copying to reject dimensions above 16384px or 50MP.\n- CDP targets must use a same-port loopback WebSocket, belong to the current Store package, retain the launch-time Browser ID, and expose expected Codex renderer markers.\n- Loopback prevents LAN exposure, but Chromium CDP has no same-user authentication. Run only trusted local software while the skin is active, and use restore to close the debug session when it is no longer needed.\n- Preserve `config.toml` as strict UTF-8. Never use encoding-dependent whole-file PowerShell reads/writes, silently transcode UTF-16, or overwrite a file that changed after it was read. Ambiguous TOML shapes must fail before writing rather than receive a best-effort rewrite.\n- Keep install/start/restore/verify serialized with the per-user operation lock in `common-windows.ps1`.\n- Treat `%LOCALAPPDATA%\\CodexDreamSkin\\engine` as an installer-managed runtime. Exit the Dream Skin tray before reinstalling so the installer can replace that runtime atomically and update every shortcut to the same copy.\n- Keep installed shortcuts and tray child processes on `RemoteSigned`, never `Bypass`. Clear Internet-zone markers only from staged managed `.ps1` copies after their byte-content hashes match the selected source; never change the user's persistent execution policy or override Group Policy.\n\n## Checks\n\n```powershell\npowershell -NoProfile -File tests\\run-tests.ps1\nnode --check scripts\\injector.mjs\nnode --check assets\\renderer-inject.js\n```\n\n## Resources\n\n- `scripts/injector.mjs`: CDP connection, renderer injection, verification, screenshot, and removal.\n- `scripts/common-windows.ps1`: Store-package discovery, Node validation, managed runtime installation, port ownership, state, and process identity safety.\n- `scripts/config-utf8.ps1`: atomic UTF-8 configuration backup, selective restore, and explicit recovery.\n- `assets/dream-skin.css`: full visual layer.\n- `assets/renderer-inject.js`: idempotent DOM integration and cleanup.\n- `assets/dream-reference.jpg`: pure 2560 × 1440 Arina Hashimoto wallpaper seeded as the default and as a saved theme; it contains no Codex UI.\n- `assets/theme.json`: shared adaptive theme contract for the seeded preset.\n- `scripts/theme-windows.ps1`: persistent active/saved theme store, safe image import, pause state, and preset seeding.\n- `scripts/apply-community-theme.ps1`: fixed-origin, confirmed community download, integrity verification, strict ZIP import, apply, and rollback orchestration.\n- `scripts/tray-dream-skin.ps1`: Windows Forms tray for apply, pause, import, save, switch, and complete restore.\n- `references/qa-inventory.md`: required functional and visual signoff coverage.\n- `references/runtime-notes.md`: troubleshooting and update behavior.\n- `tests/run-tests.ps1`: managed runtime, configuration, state, recovery, payload, and CDP validation regression checks. Use `-EngineOnly` for the source-independence contract.\n","AGENTS.md":"# Codex Dream Skin Agent Guide\n\n本文件适用于仓库根目录及全部子目录。平台目录中的 `SKILL.md` 提供运行时操作细节；与本文件冲突时，优先遵守更严格的安全和发布要求。\n\n## 开始任务\n\n- 先阅读根目录 README、**最新的 `docs/handoff-*.md`**、相关平台文档、当前分支状态和目标文件，不凭记忆推断现状。交接文档是了解当前状态最快的入口：`main` 上有哪些已合并但未发布的提交、哪些事卡在外部确认、以及本机做不了哪些验证。\n- 中大型任务必须建立或更新根目录 `TASK_PROGRESS.md`。记录目标、范围、当前分支或 worktree、已完成项、进行中项、阻塞、测试结果、PR、合并及 Release 状态。\n- 在每个里程碑、任务切换、出现阻塞、准备交接以及上下文可能压缩前更新 `TASK_PROGRESS.md`。内容必须可让新 Agent 直接续做，不只写“处理中”。\n- `TASK_PROGRESS.md` 是本地连续性文件，不提交密钥、令牌、Webhook、个人路径中的隐私数据或未经确认的生产配置。\n- `TASK_PROGRESS.md`、`.local-evidence/` 等任务流水与本机证据只保留本地，禁止提交；`main` 文件树不得包含 `TASK_PROGRESS.md`。已跟踪的进度文件须取消跟踪并保留本地副本。\n\n## 优先级\n\n1. P0：安全问题、数据损坏、不可恢复卸载、错误发布、公开密钥和供应链风险。\n2. P1：用户无法安装、启动、恢复、导入或应用主题，以及发布版本与代码不一致。\n3. P2：兼容性、性能、交互和可维护性改进。\n4. P3：文档润色和非阻塞清理。\n\n- 最新的明确用户指令可以调整当前优先级。插入高优任务时，先把被中断任务的精确状态写入 `TASK_PROGRESS.md`。\n- 不把待定事项擅自升级为前置条件，也不把无关 Issue 或 PR 拉入当前范围。\n\n## 多 Agent 协作\n\n- 中大型且可独立拆分的任务默认并行分给多个 Agent；每个子任务必须有清晰边界、输入、允许的写入范围和验收条件。\n- 主 Agent 负责计划、冲突协调、最终集成、回归测试和事实核对。子 Agent 的“完成”不能代替主 Agent 验收。\n- 多个写入任务优先使用独立分支或 worktree。所有 Agent 共享文件系统，编辑前必须检查现有改动，禁止覆盖、回滚或顺手提交他人的工作。\n- 同一文件由一个 Agent 负责写入；无法避免时先协调所有权。只读审计可以并行，但不能伪装成已经实现或验证。\n- 页面或原生交互需要实机证据时使用项目指定的浏览器或原生测试工具；工具不可用必须明确记录缺口。\n\n## 进度与事实表述\n\n- 严格区分：本地实现、已测试、已提交、已推送、PR 已开、PR 已合并、tag 已创建、Release 已发布、用户已可下载。\n- `merged != released`。只有 GitHub Release 已公开、目标版本资产存在且可下载，才能说“已发布”。\n- 只有安装包实际包含目标代码并完成对应版本验证，才能说用户通过 Release 获得了功能。\n- Issue 只有在修复、证据、回复和状态都核对后才能说“已处理”；受上游限制或证据不足时保持真实状态。\n\n## 主题 ZIP 合同\n\n- 客户端只导入普通 `.zip`，不支持 `.dreamskin`，也不接受仅修改扩展名的伪装文件。\n- 新主题必须同时包含非空 `theme.json`、非空 `theme.css` 和 `theme.json` 引用的唯一背景图；三者缺一不可。\n- 背景图最大 10 MiB，并继续执行像素、尺寸、媒体魔数和解码校验。前端、Studio、服务端和双端客户端的限制必须一致。\n- 正式 Studio 包还必须校验 `manifest.json` 的平台、最低客户端版本、注册文件集合、字节数和 SHA-256。未知文件、重复路径、路径穿越、链接、reparse、嵌套归档、压缩炸弹和歧义根目录必须 fail closed。\n- `theme.css` 在导入时和每次应用时都必须通过共享 Safe CSS 策略，只允许作用于登记的公开主题部件。不得为新导入包增加旧主题兼容旁路。\n- 导入成功只写入“已保存主题”库，不自动切换活动主题，也不覆盖 last-known-good。用户必须在菜单中明确选择后才应用。\n- 手动移动目录仅用于可信、已解压的完整三文件主题；不得把它描述为与受限 ZIP 导入器同等安全。\n\n## 实现与测试\n\n- 优先复用 `runtime/` 的共享源，通过现有同步工具生成双端资产；不要直接制造 macOS、Windows 漂移。\n- 版本发布必须同步 `macos/VERSION`、`windows/VERSION`、`macos/package.json`、`macos/scripts/common-macos.sh`、`macos/scripts/injector.mjs` 和 `windows/scripts/injector.mjs`，并更新绑定当前版本的断言。\n- 修改主题 schema、manifest、Safe CSS、导入或提取逻辑时，必须覆盖合法包、缺件、空文件、边界大小、哈希不符、路径攻击、链接、嵌套归档、压缩滥用、重复导入和 ID 冲突。\n- 修改共享 renderer 或 CSS 时，运行同步校验和双端 payload 检查；不得只验证一个平台副本。\n- macOS 相关改动至少运行适用的 Node、shell 语法和 Swift 测试；Windows 相关改动至少运行适用的 Node 与 PowerShell 测试。无法在本机执行的平台测试必须交给 CI 并明确说明。\n- 发布前必须通过版本一致性、仓库 CI、DMG/Setup 构建与挂载或静态校验，并对原生文件选择器、ZIP 导入、已保存主题切换和真实 Codex 渲染做 smoke test。\n- 不为追求绿色测试降低安全断言、跳过失败用例或把真实失败改成无条件 skip。\n\n## Git 与发布\n\n- Write all new commit messages in English, including squash/merge commit titles and bodies.\n- 每次发布遵循 [`docs/releases/README.md`](docs/releases/README.md)：版本 PR 必须包含中文 `docs/releases/vX.Y.Z.md` 和完整英文 `docs/releases/vX.Y.Z-en.md`，顶部互链；以用户可感知的新增、修复和升级说明为先，附贡献者与完整变更链接；Release 展示中文正文，下载信息由工作流追加。\n\n- 保留用户现有改动；禁止未经授权的 reset、checkout 丢弃、强推、移动已公开 tag 或覆盖已公开 Release。\n- 功能开发、版本准备和紧急修复使用独立分支；提交只包含当前范围，推送前审查 staged diff。\n- 客户端发布由 `main` 上的版本变化驱动。版本未变化的普通合并不得重复构建或覆盖 Release。\n- Issue 修复的 PR 合并、CI 转绿后，同一轮工作里直接完成版本号提升（含六处版本一致）与 Release 触发，并在关闭 Issue 的评论中写清根因、修复提交与验证方式；不要把\"已修复\"停在合并这一步、让发布和关闭 Issue 变成另一次单独请求才做的事。\n- 自动发布必须验证六处版本一致、版本递增、tag 与发布提交一致、目标 Release 尚未公开。失败后的 `workflow_dispatch` 只能幂等重试同一 tag 和提交。\n- 构建资产必须来自 tag 对应提交。发布前核对 DMG、Setup.exe、`SHA256SUMS.txt` 的文件名、非空大小和摘要；发布后再次核对 Release 为公开状态且三个资产齐全。\n- 发布失败时保留可诊断状态，不把不完整资产标记为成功，也不通过重用旧版本号规避更新检测。\n\n## 安全边界\n\n- 不提交 GitHub token、Cloudflare 凭据、飞书或邮件 Webhook、签名私钥、用户数据和本机状态文件。示例只能使用明确占位符。\n- 使用最小 GitHub Actions 权限并固定第三方 Action 的完整 commit SHA。发布写权限只授予需要创建 tag 或 Release 的 job。\n- 不修改官方 Codex/ChatGPT 的 `app.asar`、签名、系统 ACL 或受保护安装目录；不要求关闭 Gatekeeper、Defender、SmartScreen 或执行 `ExecutionPolicy Bypass`。\n- 安装、升级和卸载必须保留原子 staging、备份与回滚，验证目标身份后才操作进程或路径。拒绝不可信符号链接和路径重定向。\n- 对外部包、网络响应和状态文件使用有界读取、严格 schema、内容校验和 fail-closed 行为；日志和错误信息不得泄露凭据或私人路径内容。\n","tools/selectors.json":"{\n  \"schema\": \"codex-dream-skin-selectors/1\",\n  \"description\": \"双端统一选择器契约。scope 与 required 来自双端 DOM 快照实测；shell-main 与 header-tint 另由 2026-07-31 Codex 26.727.40816 真实 macOS renderer 复核。doctor / CI 应逐条 querySelector 并按 tier 判级：L1 缺失=皮肤主行为受损，L2 缺失=精修静默降级。\",\n  \"verifiedAgainst\": {\n    \"date\": \"2026-09-26\",\n    \"codexVersions\": [\n      {\n        \"version\": \"26.924.22138\",\n        \"platform\": \"macos\",\n        \"evidence\": \"reporter: issue #415 / #414 报告 26.924 下主区会话与输入框不可见；本机在隔离 CODEX_HOME 与独立 user-data-dir 的 Codex 26.924.22138 renderer 上用 loopback CDP 复现，逐条二分定位到该规则；补丁后 thread 滚动容器与 composer 恢复渲染\"\n      },\n      {\n        \"version\": \"26.818\",\n        \"platform\": \"windows\",\n        \"evidence\": \"reporter: #378 本机已验证补丁与 #373 @QingYe-05 的实机源码证据；v1.5.16 据此扩展 composer / Markdown / message 绑定，维护者未做本机 renderer 复核\"\n      },\n      {\n        \"version\": \"26.814.41407\",\n        \"platform\": \"macos\",\n        \"evidence\": \"reporter: #373 @GreenLv 的 loopback CDP 只读 DOM 与样式读数，确认 _ComposerLayoutRoot_ 是真实输入框壳、_ComposerLayoutFooter_ 只是其内层 footer\"\n      },\n      {\n        \"version\": \"26.814.5517.0\",\n        \"platform\": \"windows\",\n        \"evidence\": \"reporter: #376 复现环境；该版本设置页外观切换后的混色问题仍未修复，settings/appearance 路径未验证\"\n      },\n      {\n        \"version\": \"26.803.10989.0\",\n        \"platform\": \"windows\",\n        \"evidence\": \"reporter: #363 实机探测（Chromium 151.0.7922.76）；受管 --user-data-dir 下 CDP、app://-/index.html renderer 与真实主题注入验证全部通过\"\n      },\n      {\n        \"version\": \"26.803\",\n        \"platform\": \"both\",\n        \"evidence\": \"reporter: #359 Owl composer 布局报告；_ComposerLayoutBody_ / _ComposerLayoutFooter_ / _ComposerHomeUtilityBar_ 前缀别名已并入合同\"\n      },\n      {\n        \"version\": \"26.727.40816\",\n        \"platform\": \"macos\",\n        \"evidence\": \"maintainer: 已签名 macOS app 的 live app:// renderer 实测复核（Chromium 150.0.7871.182），shell-main 与 header-tint 逐条 querySelector\"\n      },\n      {\n        \"version\": \"26.715.61943\",\n        \"platform\": \"macos\",\n        \"evidence\": \"fixture: runtime/dom-fixtures/codex-dom-fixture-darwin-watch.json（15 状态，Chromium 150.0.7871.124）\"\n      },\n      {\n        \"version\": \"unrecorded\",\n        \"platform\": \"windows\",\n        \"evidence\": \"fixture: runtime/dom-fixtures/codex-dom-fixture-win32-watch.json（7 状态）；bundle hash 与 mac 不同（ModelPickerTrigger mac=1fm6a win=1w4ob），确认双端存在版本错位\"\n      }\n    ],\n    \"verdict\": \"双端运行时继续共用一份 selector/CSS 合同。26.727.40816 起主表面与顶栏的旧语义类改为 CSS Modules，26.803~26.818 又把输入框壳迁到 _ComposerLayoutRoot_；合同的做法始终是保留旧锚点、追加稳定属性或模块名前缀，绝不匹配完整 hash。注意 26.803 之后每一条证据都来自报告者，维护者没有对应平台的本机 renderer 复核——不要把它们当成与 26.727 同等强度的验收。\",\n    \"gaps\": [\n      \"Windows 26.727 之后至今没有维护者本机 renderer 复核\",\n      \"#376：26.814.5517.0 上 Codex 设置→外观切换深浅色后主题混色，settings/appearance 路径的锚点行为未验证\",\n      \"#371：Windows 顶部与底部区域配色与主区不一致，尚未确认是 header-tint 未命中还是原生层未被覆盖\"\n    ]\n  },\n  \"appearanceSignal\": {\n    \"dark\": \"html.electron-dark\",\n    \"light\": \"html.electron-light\",\n    \"warning\": \"html.electron-opaque 随窗口聚焦/毛玻璃状态闪动，与明暗无关，禁止用作外观信号\"\n  },\n  \"scopeVocabulary\": {\n    \"all\": \"除设置页外的全部路由（home / thread / detail）及其上的 menu / dialog 覆盖层\",\n    \"home\": \"首页（建议卡屏）。注意首页渐进渲染：home-icon 先出现，utility bar 可晚 1~2 秒\",\n    \"thread\": \"会话/任务页（含 markdown 内容）\",\n    \"settings\": \"设置页。mac 26.715.61943 实测设置页替换整个 shell（main/侧栏/header 全部消失）；win 实测设置页保留 shell。皮肤不得假设二者其一，锚点缺失时降为 L0\",\n    \"overlay\": \"菜单 / 弹窗 / popper 浮层\",\n    \"config\": \"依赖用户配置才出现（如未配置项目则无项目选择器）\"\n  },\n  \"selectors\": [\n    { \"key\": \"shell-main\", \"selector\": \"main:is(.main-surface, [data-app-shell-main-surface], [class*=\\\"_MainContentSurface_\\\"])\", \"tier\": \"L1\", \"scope\": \"all\", \"required\": true, \"notes\": \"全局主表面。26.727.40816 提供 data-app-shell-main-surface，并使用 _MainContentSurface_ CSS Module；保留旧类兼容历史版本，前缀只限定在 main 元素。mac 设置页缺失（win 存在），缺失时整页仅 L0\" },\n    { \"key\": \"left-panel\", \"selector\": \"aside.app-shell-left-panel\", \"tier\": \"L1\", \"scope\": \"all\", \"required\": true, \"notes\": \"左侧栏；收起/重建时会移除节点，勿在其消失时清皮\" },\n    { \"key\": \"header-tint\", \"selector\": \"header:is(.app-header-tint, [data-app-shell-header-edge-scroll], [class*=\\\"_Header_\\\"])\", \"tier\": \"L1\", \"scope\": \"all\", \"required\": true, \"notes\": \"顶栏。26.727.40816 输出 data-app-shell-header-edge-scroll 并使用 _Header_ CSS Module；保留旧类兼容历史版本，前缀只限定在 header 元素。皮肤不得覆盖其 position/z-index（既有回归约束）\" },\n    { \"key\": \"main-content-top-fade\", \"selector\": \":is(.app-shell-main-content-top-fade, [data-app-shell-main-content-top-fade]:not(:has(*)), [class*=\\\"_MainContentTopFade_\\\"])\", \"tier\": \"L2\", \"scope\": \"all\", \"required\": false, \"notes\": \"主区顶部渐变遮罩。26.727.40816 提供 data-app-shell-main-content-top-fade 并使用 _MainContentTopFade_ CSS Module；用于在主题背景下移除原生白色 fade。26.924 把该属性从遮罩层移到了包裹整条路由的容器上，裸属性会连带命中 thread 滚动容器与 composer，导致任意会话右栏空白（#415/#414）。属性形式因此限定为无子元素的原生遮罩层，两个旧 class 形式保持不变\" },\n    { \"key\": \"home-icon\", \"selector\": \"[data-testid=\\\"home-icon\\\"]\", \"tier\": \"L1\", \"scope\": \"home\", \"required\": true, \"notes\": \"首页判定信号，双端一致\" },\n    { \"key\": \"home-route\", \"selector\": \"[role=\\\"main\\\"]:has([data-testid=\\\"home-icon\\\"])\", \"tier\": \"L1\", \"scope\": \"home\", \"required\": true, \"notes\": \"首页容器。实测 [role=main] 仅存在于首页——它不是通用路由锚点，thread 页没有\" },\n    { \"key\": \"home-route-css\", \"selector\": \"[role=\\\"main\\\"]\", \"tier\": \"L1\", \"scope\": \"home\", \"required\": true, \"notes\": \"home-route 的 CSS 可组合别名：不含 :has()。CSS 禁止 :has() 嵌套，home-route 原选择器一旦写进 :has()/:not(:has()) 整条规则会被解析器丢弃（v1.3.1 全窗口首页与任务页氛围背景因此失效）。依据与 home-route 相同的实测：[role=main] 仅存在于首页；该锚点缺失时 CSS 路由门控整体失效，故必须按 L1 必需项监控\" },\n    { \"key\": \"home-banners\", \"selector\": \".home-banners\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false, \"notes\": \"Codex 26.721+ 新增的原生首页 banner 插槽，位于 home-route 第一个子节点内、通常为空（0 子节点）靠原生 empty:hidden 折叠。真正的首页内容（标题/建议卡/输入框）在这个版本上已变成该插槽外层容器的兄弟节点，不再是它的后代（见 #244 实测：home-route > div:first-child 被撑到 100% 高度会把内容挤出视口）。用于判定新旧 home DOM 形态，皮肤据此把 first-child 链路的强制尺寸限定在旧形态或改走兄弟节点\" },\n    { \"key\": \"composer-chrome\", \"selector\": \":is(.composer-surface-chrome, [class*=\\\"_ComposerLayoutRoot_\\\"], [data-composer-surface-variant][data-composer-radius-variant])\", \"tier\": \"L2\", \"scope\": \"home+thread\", \"required\": false, \"notes\": \"输入框视觉壳。兼容旧语义类、26.814 ComposerLayoutRoot CSS Module 与稳定 surface/radius 语义属性；hash 随版本变化。win 实测存在无 composer 的 detail 路由，不可当全局锚点\" },\n    { \"key\": \"composer-toolbar\", \"selector\": \":is(.composer-surface-chrome [class*=\\\"_footer_\\\"], [class*=\\\"_ComposerLayoutRoot_\\\"] [class*=\\\"_ComposerLayoutFooter_\\\"], [data-composer-surface-variant][data-composer-radius-variant] :is([data-composer-footer-responsive], [class*=\\\"_ComposerLayoutFooter_\\\"], [class*=\\\"_footer_\\\"]))\", \"tier\": \"L2\", \"scope\": \"home+thread\", \"required\": false, \"notes\": \"输入框工具栏；兼容旧 footer、ComposerLayoutFooter CSS Module 与 data-composer-footer-responsive，hash 随版本变化\" },\n    { \"key\": \"home-utility\", \"selector\": \":is([class*=\\\"_homeUtilityBar_\\\"], [class*=\\\"_ComposerHomeUtilityBar_\\\"])\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false, \"notes\": \"CSS Modules 前缀匹配；兼容旧 homeUtilityBar 与 ComposerHomeUtilityBar，模块名跨端稳定、hash 随版本变，禁止匹配完整 hash\" },\n    { \"key\": \"game-source\", \"selector\": \"[data-feature=\\\"game-source\\\"]\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false },\n    { \"key\": \"home-suggestions\", \"selector\": \".group\\\\/home-suggestions\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false },\n    { \"key\": \"project-selector\", \"selector\": \".group\\\\/project-selector\", \"tier\": \"L2\", \"scope\": \"home config\", \"required\": false, \"notes\": \"依赖用户项目配置；win 快照未出现（该机可能未配置项目），不算平台差异\" },\n    { \"key\": \"markdown\", \"selector\": \"[class*=\\\"_markdown\\\"]\", \"tier\": \"L2\", \"scope\": \"thread\", \"required\": false, \"notes\": \"会话内容块，单页可达 100+ 个，样式规则注意性能\" },\n    { \"key\": \"thread-surface\", \"selector\": \".thread-scroll-container\", \"tier\": \"L2\", \"scope\": \"thread\", \"required\": false, \"notes\": \"会话滚动表面；双端活动会话快照均存在\" },\n    { \"key\": \"message\", \"selector\": \":is([data-message-author-role], [data-local-conversation-user-anchor], [data-local-conversation-final-assistant])\", \"tier\": \"L2\", \"scope\": \"thread\", \"required\": false, \"notes\": \"用户与助手消息的稳定语义边界；兼容旧版 role 属性和 Codex 26.727+ 语义属性。当前全宽 user anchor 在运行时优先映射到内部自适应圆角气泡，找不到气泡时保留旧版 anchor fallback\" },\n    { \"key\": \"settings-panel\", \"selector\": \"[data-settings-panel-slug=\\\"general-settings\\\"]\", \"tier\": \"L2\", \"scope\": \"settings\", \"required\": false, \"notes\": \"Codex 26.727 设置页稳定导航锚点；设置页可先落在 General，不再保证 appearance-theme 或 theme-preview 存在\" },\n    { \"key\": \"appearance-radio\", \"selector\": \"input[name=\\\"appearance-theme\\\"]\", \"tier\": \"L2\", \"scope\": \"settings\", \"required\": false, \"notes\": \"旧版外观三选一；新设置页可能仅有 settings-panel\" },\n    { \"key\": \"overlay-menu\", \"selector\": \"[role=\\\"menu\\\"]\", \"tier\": \"L2\", \"scope\": \"overlay\", \"required\": false },\n    { \"key\": \"overlay-dialog\", \"selector\": \"[role=\\\"dialog\\\"]\", \"tier\": \"L2\", \"scope\": \"overlay\", \"required\": false },\n    { \"key\": \"overlay-popper\", \"selector\": \"[data-radix-popper-content-wrapper]\", \"tier\": \"L2\", \"scope\": \"overlay\", \"required\": false }\n  ],\n  \"removed\": [\n    { \"key\": \"suggestion-item\", \"selector\": \".group\\\\/home-suggestion-list-item\", \"reason\": \"双端全部 22 个实测状态命中 0 次——当前 Codex 版本已无此类；CSS 中引用它的规则为化石，待清理\" }\n  ],\n  \"stableTestids\": [\"app-shell-header-context-menu-surface\", \"home-icon\", \"theme-preview\"],\n  \"notes\": [\n    \"锚点优先级：data-testid > role/语义标签 > 稳定类名 > CSS Modules 前缀；禁止精确 hash 与纯结构路径\",\n    \"首页渐进渲染：L2 home 锚点必须容忍晚到，找不到 = 暂不精修，不得阻断 L0/L1\",\n    \"跨端适配 = 版本管理：同版本双端 DOM 同源；升级 Codex 后先跑 doctor 对本清单，再决定是否改适配\"\n  ]\n}\n","macos/references/runtime-notes.md":"# Runtime notes\n\n- Discover the official `com.openai.codex` bundle on every launch; do not assume an upgrade keeps the same executable internals.\n- Use `Contents/Resources/cua_node/bin/node` from that bundle. Require Node.js 20+, a valid strict code signature, matching architecture, and OpenAI Team ID `2DC432GLL2` on both app and runtime.\n- State readers that can run before a validated launch must establish this runtime identity at their own execution boundary; never treat an inherited `NODE` value as proof of trust.\n- Do not ship a Node binary and do not depend on a globally installed `node` or `npm`.\n- Launch the official executable through a per-user `launchd` job with `--remote-debugging-address=127.0.0.1` and a selected port. LaunchServices may discard Chromium flags.\n- Prefer port `9341`; scan through `9441` on collision and record the selected port in state.\n- Accept CDP only when the listener belongs to the discovered Codex main process or one of its legitimate descendants, the WebSocket URL is loopback-only, and an `app://` renderer exposes expected native shell markers.\n- Treat loopback CDP as locally privileged but unauthenticated. Keep the themed session limited to trusted local use and close the port through a full Restore when finished.\n- Poll page targets and reinject after document loads. A debounced mutation observer plus a low-frequency safety timer handles in-page route changes.\n- Record injector PID, start time, executable, script path, app identity, selected port, and theme directory. Refuse to stop a PID when any required identity differs.\n- Store mutable data under `~/Library/Application Support/CodexDreamSkinStudio`; keep the installed program under `~/.codex/codex-dream-skin-studio`.\n- Back up and restore only `appearanceTheme` and `appearanceDarkCodeThemeId`. Leave `appearanceDarkChromeTheme` and unrelated TOML content untouched.\n- Never modify, replace, unpack, repack, re-sign, or back up `app.asar`.\n","macos/references/incident-review.md":"# Implementation incident review\n\nThe working theme initially failed intermittently despite correct CSS. The final project incorporates the following fixes:\n\n- macOS LaunchServices discarded Chromium debugging flags. The launcher now starts the official executable through a user-level `launchd` job.\n- `launchd` jobs did not reliably inherit `HOME`. Shared shell code resolves the current user's home directory when the variable is missing.\n- Two shell helpers returned the status of their final conditional expression, reporting failure after successful work. Successful helper paths now return explicitly or end with successful commands.\n- The home-suggestion selector was under-escaped inside a CDP JavaScript string. Verification now resolves `.group\\\\/home-suggestions` correctly and must return `pass: true`.\n- A Computer Use child process could inherit the CDP listener. Port ownership now accepts the official Codex process and verified descendants, while rejecting unrelated listeners.\n- A large bundled Node binary made GitHub delivery impractical. Version 1.0.0 validates and reuses Codex's own signed Node instead.\n- Static preview images were not accepted as release evidence. Final signoff requires JSON from the live DOM verifier plus a CDP screenshot.\n","macos/references/qa-inventory.md":"# QA inventory\n\n## Required user-visible behavior\n\n1. Home route paints one continuous wallpaper across sidebar and main content, with a live native heading, the real project utility row/composer, and any native suggestion cards exposed by the current Codex version.\n2. Normal tasks show the selected image behind restrained gradients and translucent live content surfaces.\n3. Sidebar, navigation, messages, approvals, project selector, attachments, composer, menus, hover, focus, and keyboard input remain native and interactive.\n4. Decorative layers have `pointer-events: none`; no screenshot or raster UI is used as an overlay.\n5. Route changes, renderer reloads, and ordinary refreshes reapply the current theme while the verified injector runs.\n6. Official application signature and `app.asar` remain unchanged.\n7. Restore removes live DOM/CSS, restores the two saved base-theme values, closes the CDP session after restart, and supports later reinstallation.\n\n## Automated checks\n\n- Shell and JavaScript syntax checks.\n- Payload construction with bundled demo and an isolated custom theme.\n- Reject unsupported theme config, unsafe image paths, invalid colors, oversized images, non-loopback WebSocket URLs, and unrecognized renderer targets.\n- Exact install/restore round trip for the two TOML settings while preserving unrelated values.\n- Empty `HOME` recovery.\n- Official app and internal Node signature, Team ID, architecture, and version validation.\n- Port collision selection and saved-port reuse.\n- PID reuse protection through PID, start time, executable, script path, and command-line matching.\n- Live verification after `Page.reload` returns version `1.2.0` and `pass: true`.\n- Strict home verification requires a visible wallpaper composition region of at least 320×160, composer, sidebar, non-interactive decoration, and no horizontal overflow. Suggestion cards and the standalone project button are optional only when the current Codex host does not render them.\n\n## Visual checks\n\n- Home at normal desktop size: the subject stays clear of the text-safe area, text remains live, native cards are not clipped when present, and the merged project/composer surface does not overlap content.\n- Narrower window: wallpaper cropping preserves the declared focus and safe area before essential controls are compressed.\n- Task route: background remains atmospheric, messages and output panels keep high contrast, and the composer remains reachable.\n- Task side panel: open and close the native thread panel twice, resize the window, and repeat; the toggle remains visible and clickable.\n- Selected image contains no fake interface controls or raster text intended to impersonate Codex.\n- Inspect sidebar selection, header, wallpaper edges, cards, project utility row, composer buttons, scrollbars, focus outlines, dialogs, and menus.\n\n## Release signoff\n\n- Run `tests/run-tests.sh` successfully.\n- Install from a clean extracted copy with no global Node.js.\n- Complete install → live verify → reload verify → restore → reinstall.\n- Capture a real CDP screenshot and retain the verifier JSON.\n- Confirm `codesign --verify --deep --strict` still succeeds for the official Codex app.\n- Build ZIP and record SHA-256.\n","windows/agents/openai.yaml":"interface:\r\n  display_name: \"Codex Dream Skin\"\r\n  short_description: \"Apply and safely restore the full pink-purple Codex skin\"\r\n  default_prompt: \"Use $codex-dream-skin to apply, verify, update, or restore the full Codex desktop skin.\"\r\n","windows/references/qa-inventory.md":"# QA inventory\n\n## User-visible claims\n\n1. The home screen paints one UI-free wallpaper continuously across sidebar and main content, with a live native heading, the real project utility/composer surface, and any suggestion cards rendered by the current Codex host.\n2. Sidebar, main area, header, and composer use coordinated readability layers; home remains expressive while normal task routes use a stronger quiet veil.\n3. All real Codex controls remain interactive; the skin is not a screenshot overlay.\n4. The skin survives route changes and renderer reloads while the injector daemon runs.\n5. The official Store package and `app.asar` remain unchanged.\n6. Restore removes the injected DOM/CSS and install/restore can be repeated.\n7. Restore closes the saved CDP listener before reopening Codex normally.\n\n## Functional checks\n\n- Home feature card: click one card and confirm the real composer is populated or the normal action occurs.\n- Project selector: click the real project chip under the \"选择项目\" label and confirm the native project menu opens.\n- Sidebar: open a real task, then return to New Task.\n- Task side panel: open and close the native thread panel twice, resize the window, and repeat; the toggle must remain visible and clickable.\n- Composer: type text, verify caret/readability, then clear it without sending.\n- Reload: use CDP `Page.reload`, wait, and confirm the injection marker returns.\n- Pet overlay: open a desktop pet and confirm its auxiliary window stays transparent with no skin background or decoration layer behind it.\n- Restore/reapply cycle: remove live skin, verify marker absent, apply again, verify marker present.\n- Update resilience: resolve the current `OpenAI.Codex` Appx location dynamically for launch. A versioned path saved for cleanup must be revalidated against the registered package full/family identity before any process is stopped.\n- Restart consent: an existing normal Codex window is never force-closed without explicit CLI authorization or shortcut confirmation.\n- Shortcut policy: installed launch, restore, tray, and tray-child commands use `RemoteSigned` without `Bypass`; Internet-zone markers are removed only from hash-verified managed PowerShell copies.\n- Config safety: Chinese project names, LF/CRLF choice, quoted target keys, table-header comments, and unrelated TOML sections survive install/selective restore; ambiguous target shapes fail unchanged, exact recovery keeps a copy of the replaced current file, and install refuses both registered and state-recorded old Codex processes.\n- Theme safety: empty/over-10 MB images, over-16384px/50MP dimensions, path escapes, symlinks/junctions, malformed JSON, unsafe CSS, and unsupported formats are rejected before payload construction.\n- Tray lifecycle: pause/resume reflects the clicked state, bundled Arina Hashimoto theme is present on first install, and complete restore terminates any separately launched tray before it can reapply the skin.\n\n## Visual checks\n\n- 1280x820 initial home: the declared focus stays in frame, the text-safe side remains readable, the real project utility row and composer form one coherent surface, and no horizontal scrolling appears.\n- Narrower window: accept Codex's native responsive card reduction or omission; no essential control is covered and wallpaper cropping preserves the focus/safe-area contract.\n- Normal task: the wallpaper is visibly quieter than home, messages keep high contrast, and composer does not overlap content.\n- Inspect the sidebar, header, wallpaper edges, native card labels when present, project utility row, composer controls, scrollbar, dialogs, and menus.\n- Reject black/transparent sidebar artifacts, clipped controls, duplicated/disconnected project labels, rasterized native controls, fake UI inside the wallpaper, weak contrast, or decorations intercepting clicks.\n\n## Exploratory checks\n\n- Start when the debug port is occupied: fail with a clear message or use a caller-selected port.\n- Start after Codex updates: package discovery and injection still work without patching installed files.\n- Tamper `state.json` with a reused PID: if the PID is still live but its identity differs, confirm cleanup fails closed and preserves `state.json`; if the PID is gone, confirm the stale record is replaced only after confirming no process is running, without stopping an unrelated process.\n- Serve a fake `app://` CDP target or remote/mismatched WebSocket URL and confirm both launcher and injector reject it. Reuse the port with a new Browser ID and confirm the existing watcher exits without reconnecting.\n- Force verification failure and confirm the injector, state file, and newly launched debug session are rolled back.\n- Start two operations concurrently and confirm the second fails clearly without changing config, state, or processes.\n- Close Codex without restore and confirm the Browser identity anchor closes and the watcher exits without reconnecting or rapidly growing logs.\n\n## Automated checks\n\n- `tests/run-tests.ps1`: strict UTF-8/no-BOM writes, UTF-16 rejection, LF/CRLF preservation, concurrent-write detection, exact backup/recovery, `[desktop]`-scoped restore, ambiguous TOML rejection, non-ASCII paths, Appx/state identity, argument quoting, theme seeding/import/save/switch/pause, canonical community-link and compatible-metadata rejection, fixed-origin download/apply boundaries, byte/dimension limits, junction rejection, payload construction, Browser ID, loopback URL rejection, and renderer isolation for transparent auxiliary windows.\n- `node --check` for the injector and renderer payload.\n- Live Windows signoff remains required for Store process ownership, restart consent, screenshot, and CDP closure.\n","windows/references/runtime-notes.md":"# References Skill\n\nPath: `windows/references/runtime-notes.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/windows/references/runtime-notes.md)"},"files":{"macos/SKILL.md":"---\nname: codex-dream-skin-studio\ndescription: Install, customize, launch, verify, repair, update, or restore Codex Dream Skin Studio on macOS. Use when a user wants to turn a personal image into one continuous full-window Codex wallpaper with adaptive readability layers while preserving the native interface, or needs safe CDP theme troubleshooting and rollback.\ncompatibility: macOS, official Codex Desktop app, signed bundled Node.js 20 or newer\n---\n\n# Codex Dream Skin Studio\n\nThis file is an optional Codex capability entry. The delivery is a complete standalone project; users do not need to install it as a Skill.\n\n## Workflow\n\n1. Run `Install Codex Dream Skin.command` from the complete project folder.\n2. Run `Customize Codex Dream Skin.command`, choose an image in Finder, and enter a theme name.\n3. To add a complete downloaded pack, use the native menu's “导入主题 ZIP…”. Accept ordinary `.zip` only. Every new official Studio pack contains `manifest.json`, non-empty `theme.json`, non-empty locally validated `theme.css`, exactly one registered background, and optional license/signature files; the trusted local simplified format contains exactly `theme.json`, `theme.css`, and its referenced image. Import into saved themes without changing the active theme. A manually extracted complete three-file directory may instead be moved into the saved themes folder. Previously saved legacy themes without CSS remain switchable but inject no extra CSS.\n4. Verify the live result with `Verify Codex Dream Skin.command`. A pass requires a visible native sidebar and composer, no horizontal overflow, non-interactive decoration, and—on the home route—a continuous wallpaper with live native heading, project controls, and any suggestion cards exposed by the current Codex version.\n5. Restore the official appearance with `Restore Codex Dream Skin.command`.\n\n## Guardrails\n\n- Never modify the official `.app`, `app.asar`, or its code signature.\n- Use the official Codex app's signed Node.js runtime only after validating its signature, Team ID, architecture, and minimum version.\n- Bind CDP to loopback, verify that the listener belongs to Codex, and reject non-Codex renderer targets.\n- Preserve all native cards, navigation, project selectors, task content, composer controls, and keyboard focus.\n- Theme images must be UI-free wallpapers. Paint one 16:9 image continuously across the window; keep home expressive and task routes quieter. `appearance: auto` follows Codex/native or system appearance rather than image brightness.\n- Theme-pack import does not support `.dreamskin`; reject traversal, links, nested archives, ambiguous roots, size/count abuse, and packs that fail the existing theme/image payload checks.\n- Keep decoration at `pointer-events: none`.\n- Require explicit authorization before restarting an already-running Codex instance.\n- Stop an injector only when its recorded PID, executable, command line, and start time all match.\n\n## Key resources\n\n- `README.md`: user installation and customization guide.\n- `scripts/injector.mjs`: CDP connection, injection, removal, verification, and screenshots.\n- `assets/dream-skin.css`: live native interface styling.\n- `assets/renderer-inject.js`: idempotent DOM integration and cleanup.\n- `scripts/doctor-macos.sh`: signed-runtime, payload, and optional live-session self-check.\n- `references/qa-inventory.md`: release and visual acceptance criteria.\n","macos/references/acceptance-report-2026-07-15.md":"# Acceptance report — 2026-07-15\n\n## Result\n\nCodex Dream Skin Studio `1.0.0` passed its macOS release checks on the live Codex desktop app during the original private release validation.\n\n- macOS architecture: `arm64`\n- Codex version: `26.707.72221`\n- Codex signing Team ID: `2DC432GLL2`\n- Codex bundled Node.js: `v24.14.0`\n- CDP endpoint: loopback port `9341`\n- Official app deep signature after installation: valid\n- `app.asar` modification: none\n\n## Automated result\n\n`tests/run-tests.sh` passed syntax, default and custom payload, exact TOML theme-setting round trip, missing-`HOME` recovery, signed runtime, and doctor checks.\n\nLive doctor returned `pass: true`, `officialAppSignatureValid: true`, `modifiesAppAsar: false`, and `live: true`.\n\nLive renderer verification returned `pass: true` after `Page.reload`:\n\n- injected version `1.0.0`;\n- style and decorative chrome present;\n- decorative chrome `pointer-events: none`;\n- native sidebar and composer visible;\n- no horizontal document overflow;\n- home banner visible with native suggestion cards and project selector.\n\n## Evidence note (open-source tree)\n\nPrivate release builds included CDP screenshots under `docs/screenshots/`. Those captures may contain third-party UI chrome and demo art and are **not** shipped in this public tree. Reproduce evidence on your machine:\n\n```bash\n~/.codex/codex-dream-skin-studio/scripts/verify-dream-skin-macos.sh \\\n  --reload --screenshot \"$HOME/Desktop/Codex Dream Skin Verification.png\"\n```\n","macos/references/asset-provenance.md":"# Asset provenance\n\n## Bundled demo hero\n\n- File: `assets/portal-hero.png`\n- SHA-256: `cec7a03d1ca8f60add2bfb7d3fcd3fe29225ffeb3f68f98301f140535c470ac5`\n- Created: 2026-07-15 via gpt-image-2 (fuck.codexapis.com)\n- Purpose: default banner / task background preset for light red-white product hero\n- Rights: generated for this project theme pack\n\n## User themes\n\nImages chosen through Customize belong to the user (or their licensors).\n","macos/agents/openai.yaml":"interface:\n  display_name: \"Codex Dream Skin Studio\"\n  short_description: \"Turn a personal image into a reversible macOS Codex theme\"\n  default_prompt: \"Use $codex-dream-skin-studio to install, customize, verify, or restore my macOS Codex theme without modifying the official app.\"\n","windows/SKILL.md":"---\nname: codex-dream-skin\ndescription: Apply, launch, verify, repair, update, or restore a full decorative skin for the Windows Codex desktop app. Use when the user asks for a Codex theme that goes beyond official color settings, wants the pink-purple Dream/Fiona-style interface, needs the skin reapplied after a Codex update, or needs a safe rollback without modifying WindowsApps or app.asar.\n---\n\n# Codex Dream Skin\n\nApply a reversible renderer skin through Chromium DevTools Protocol while launching the official Store-installed Codex executable. Never replace or take ownership of files under `WindowsApps`.\n\n## Workflow\n\n1. Install Node.js 22 or newer, close Codex, then run `scripts/install-dream-skin.ps1` once. The installer preserves the user's native appearance settings, seeds the Arina Hashimoto theme, copies the runtime to `%LOCALAPPDATA%\\CodexDreamSkin\\engine`, and creates launch/restore/tray shortcuts that do not depend on the source checkout.\n2. Use the `Codex Dream Skin` shortcut, or run `%LOCALAPPDATA%\\CodexDreamSkin\\engine\\scripts\\start-dream-skin.ps1`. The shortcut asks before restarting an already-open Codex app; CLI callers must explicitly add `-RestartExisting`.\n3. Run `scripts/verify-dream-skin.ps1 -ScreenshotPath <absolute-path>` after launch. Treat a missing continuous wallpaper, home shell, native composer, sidebar layer, or injection marker as failure. The native suggestion count is responsive and may be two to four.\n4. To add a complete downloaded pack, use the tray's “导入主题 ZIP…”. Accept ordinary `.zip` only. Every new official Studio pack contains `manifest.json`, non-empty `theme.json`, non-empty locally validated `theme.css`, exactly one registered background, and optional license/signature files; the trusted local simplified format contains exactly `theme.json`, `theme.css`, and its referenced image. Import into saved themes without changing the active theme. A manually extracted complete three-file directory may instead be moved into the saved themes folder. Previously saved legacy themes without CSS remain switchable but inject no extra CSS.\n5. A compatible DreamSkin.cc theme can use the exact `dreamskin://apply?version=ver_...` link registered by Setup.exe. The handler always obtains approved metadata and the ZIP from the fixed API, requires `applyCompatible: true`, shows a native confirmation, verifies byte count and SHA-256, then reuses the strict importer before applying. It never accepts an arbitrary URL/path/command or a silent-apply flag.\n6. Inspect the screenshot against `references/qa-inventory.md`. Verify both the home screen and a normal task before signing off.\n7. Run `scripts/restore-dream-skin.ps1` to remove the live skin, close the saved CDP session, and reopen Codex normally. Add `-RestoreBaseTheme` to restore only saved appearance keys, `-RecoverConfigBackup` for explicit byte-for-byte recovery of a damaged config, or `-Uninstall` to delete shortcuts. A completed config restore archives that install's backup so a later install captures a fresh baseline.\n\n## Guardrails\n\n- Preserve the official executable, package signature, user threads, pets, plugins, and authentication state.\n- Theme images must be UI-free wallpapers. Never import a README screenshot, fake window, sidebar, card, composer, logo, or text baked into the bitmap.\n- Paint one continuous 16:9 wallpaper across the full Codex window. Let the sidebar, main area, header, and composer act as coordinated readability layers; keep the home route expressive and task routes quieter.\n- `appearance: auto` follows the native computed `color-scheme` first and the system appearance only as a fallback. Image brightness may tune color and composition, but must not flip the user's shell mode; explicit `light` and `dark` remain authoritative.\n- Attach the \"选择项目\" treatment to Codex's real project-selector toolbar and keep the current project button clickable; never draw a disconnected replacement.\n- Keep decorative layers `pointer-events: none` and keep real buttons, navigation, and composer above them.\n- On app updates, rerun install and launch; the scripts discover the current Appx package dynamically. Saved paths are never trusted for process control unless they still match a registered package identity.\n- Keep manifest-derived package activation as the preferred Windows launch, and always pair remote-debugging switches with the persistent non-default managed CDP profile that Chromium 136+ requires. The exact Store `app\\ChatGPT.exe` fallback is allowed only after visible process arguments prove owl encoded the CDP flag inside `codex://`, and only with the package identity/path checks in `common-windows.ps1`. Preserve the pre-launch PID set during rollback. Treat access denial and raw arguments without a verified listener as terminal. This fallback is diagnostic, not proof of owl compatibility; never change WindowsApps ACLs to make it run.\n- The default launcher scans for a free port when `9335` is occupied. An explicitly requested occupied port fails closed.\n- Keep the injection daemon running for navigation/reload resilience. Its state and logs live under `%LOCALAPPDATA%\\CodexDreamSkin`.\n- The watcher registers a generation-checked early payload for connected renderers so reload/navigation can paint the skin before the normal load-event fallback; unsupported CDP targets fall back safely.\n- The active theme, saved themes, imported images, pause marker, and tray controls live under `%LOCALAPPDATA%\\CodexDreamSkin`. Reject empty or over-10 MB images before copying or encoding them.\n- Theme-pack import does not support `.dreamskin`; reject traversal, links/reparse entries, nested archives, ambiguous roots, Windows-reserved paths, size/count abuse, and packs that fail the existing theme/image payload checks.\n- Community deep links accept only a canonical version ID. Reject redirects, non-approved or non-compatible metadata, mismatched IDs, non-boolean compatibility, unsafe display metadata, unexpected media types, byte/hash mismatches, and concurrent applies before changing the active theme.\n- Every managed-store write rejects junctions and other reparse points in every existing path component. Imports also use the bundled Node metadata parser before copying to reject dimensions above 16384px or 50MP.\n- CDP targets must use a same-port loopback WebSocket, belong to the current Store package, retain the launch-time Browser ID, and expose expected Codex renderer markers.\n- Loopback prevents LAN exposure, but Chromium CDP has no same-user authentication. Run only trusted local software while the skin is active, and use restore to close the debug session when it is no longer needed.\n- Preserve `config.toml` as strict UTF-8. Never use encoding-dependent whole-file PowerShell reads/writes, silently transcode UTF-16, or overwrite a file that changed after it was read. Ambiguous TOML shapes must fail before writing rather than receive a best-effort rewrite.\n- Keep install/start/restore/verify serialized with the per-user operation lock in `common-windows.ps1`.\n- Treat `%LOCALAPPDATA%\\CodexDreamSkin\\engine` as an installer-managed runtime. Exit the Dream Skin tray before reinstalling so the installer can replace that runtime atomically and update every shortcut to the same copy.\n- Keep installed shortcuts and tray child processes on `RemoteSigned`, never `Bypass`. Clear Internet-zone markers only from staged managed `.ps1` copies after their byte-content hashes match the selected source; never change the user's persistent execution policy or override Group Policy.\n\n## Checks\n\n```powershell\npowershell -NoProfile -File tests\\run-tests.ps1\nnode --check scripts\\injector.mjs\nnode --check assets\\renderer-inject.js\n```\n\n## Resources\n\n- `scripts/injector.mjs`: CDP connection, renderer injection, verification, screenshot, and removal.\n- `scripts/common-windows.ps1`: Store-package discovery, Node validation, managed runtime installation, port ownership, state, and process identity safety.\n- `scripts/config-utf8.ps1`: atomic UTF-8 configuration backup, selective restore, and explicit recovery.\n- `assets/dream-skin.css`: full visual layer.\n- `assets/renderer-inject.js`: idempotent DOM integration and cleanup.\n- `assets/dream-reference.jpg`: pure 2560 × 1440 Arina Hashimoto wallpaper seeded as the default and as a saved theme; it contains no Codex UI.\n- `assets/theme.json`: shared adaptive theme contract for the seeded preset.\n- `scripts/theme-windows.ps1`: persistent active/saved theme store, safe image import, pause state, and preset seeding.\n- `scripts/apply-community-theme.ps1`: fixed-origin, confirmed community download, integrity verification, strict ZIP import, apply, and rollback orchestration.\n- `scripts/tray-dream-skin.ps1`: Windows Forms tray for apply, pause, import, save, switch, and complete restore.\n- `references/qa-inventory.md`: required functional and visual signoff coverage.\n- `references/runtime-notes.md`: troubleshooting and update behavior.\n- `tests/run-tests.ps1`: managed runtime, configuration, state, recovery, payload, and CDP validation regression checks. Use `-EngineOnly` for the source-independence contract.\n","AGENTS.md":"# Codex Dream Skin Agent Guide\n\n本文件适用于仓库根目录及全部子目录。平台目录中的 `SKILL.md` 提供运行时操作细节；与本文件冲突时，优先遵守更严格的安全和发布要求。\n\n## 开始任务\n\n- 先阅读根目录 README、**最新的 `docs/handoff-*.md`**、相关平台文档、当前分支状态和目标文件，不凭记忆推断现状。交接文档是了解当前状态最快的入口：`main` 上有哪些已合并但未发布的提交、哪些事卡在外部确认、以及本机做不了哪些验证。\n- 中大型任务必须建立或更新根目录 `TASK_PROGRESS.md`。记录目标、范围、当前分支或 worktree、已完成项、进行中项、阻塞、测试结果、PR、合并及 Release 状态。\n- 在每个里程碑、任务切换、出现阻塞、准备交接以及上下文可能压缩前更新 `TASK_PROGRESS.md`。内容必须可让新 Agent 直接续做，不只写“处理中”。\n- `TASK_PROGRESS.md` 是本地连续性文件，不提交密钥、令牌、Webhook、个人路径中的隐私数据或未经确认的生产配置。\n- `TASK_PROGRESS.md`、`.local-evidence/` 等任务流水与本机证据只保留本地，禁止提交；`main` 文件树不得包含 `TASK_PROGRESS.md`。已跟踪的进度文件须取消跟踪并保留本地副本。\n\n## 优先级\n\n1. P0：安全问题、数据损坏、不可恢复卸载、错误发布、公开密钥和供应链风险。\n2. P1：用户无法安装、启动、恢复、导入或应用主题，以及发布版本与代码不一致。\n3. P2：兼容性、性能、交互和可维护性改进。\n4. P3：文档润色和非阻塞清理。\n\n- 最新的明确用户指令可以调整当前优先级。插入高优任务时，先把被中断任务的精确状态写入 `TASK_PROGRESS.md`。\n- 不把待定事项擅自升级为前置条件，也不把无关 Issue 或 PR 拉入当前范围。\n\n## 多 Agent 协作\n\n- 中大型且可独立拆分的任务默认并行分给多个 Agent；每个子任务必须有清晰边界、输入、允许的写入范围和验收条件。\n- 主 Agent 负责计划、冲突协调、最终集成、回归测试和事实核对。子 Agent 的“完成”不能代替主 Agent 验收。\n- 多个写入任务优先使用独立分支或 worktree。所有 Agent 共享文件系统，编辑前必须检查现有改动，禁止覆盖、回滚或顺手提交他人的工作。\n- 同一文件由一个 Agent 负责写入；无法避免时先协调所有权。只读审计可以并行，但不能伪装成已经实现或验证。\n- 页面或原生交互需要实机证据时使用项目指定的浏览器或原生测试工具；工具不可用必须明确记录缺口。\n\n## 进度与事实表述\n\n- 严格区分：本地实现、已测试、已提交、已推送、PR 已开、PR 已合并、tag 已创建、Release 已发布、用户已可下载。\n- `merged != released`。只有 GitHub Release 已公开、目标版本资产存在且可下载，才能说“已发布”。\n- 只有安装包实际包含目标代码并完成对应版本验证，才能说用户通过 Release 获得了功能。\n- Issue 只有在修复、证据、回复和状态都核对后才能说“已处理”；受上游限制或证据不足时保持真实状态。\n\n## 主题 ZIP 合同\n\n- 客户端只导入普通 `.zip`，不支持 `.dreamskin`，也不接受仅修改扩展名的伪装文件。\n- 新主题必须同时包含非空 `theme.json`、非空 `theme.css` 和 `theme.json` 引用的唯一背景图；三者缺一不可。\n- 背景图最大 10 MiB，并继续执行像素、尺寸、媒体魔数和解码校验。前端、Studio、服务端和双端客户端的限制必须一致。\n- 正式 Studio 包还必须校验 `manifest.json` 的平台、最低客户端版本、注册文件集合、字节数和 SHA-256。未知文件、重复路径、路径穿越、链接、reparse、嵌套归档、压缩炸弹和歧义根目录必须 fail closed。\n- `theme.css` 在导入时和每次应用时都必须通过共享 Safe CSS 策略，只允许作用于登记的公开主题部件。不得为新导入包增加旧主题兼容旁路。\n- 导入成功只写入“已保存主题”库，不自动切换活动主题，也不覆盖 last-known-good。用户必须在菜单中明确选择后才应用。\n- 手动移动目录仅用于可信、已解压的完整三文件主题；不得把它描述为与受限 ZIP 导入器同等安全。\n\n## 实现与测试\n\n- 优先复用 `runtime/` 的共享源，通过现有同步工具生成双端资产；不要直接制造 macOS、Windows 漂移。\n- 版本发布必须同步 `macos/VERSION`、`windows/VERSION`、`macos/package.json`、`macos/scripts/common-macos.sh`、`macos/scripts/injector.mjs` 和 `windows/scripts/injector.mjs`，并更新绑定当前版本的断言。\n- 修改主题 schema、manifest、Safe CSS、导入或提取逻辑时，必须覆盖合法包、缺件、空文件、边界大小、哈希不符、路径攻击、链接、嵌套归档、压缩滥用、重复导入和 ID 冲突。\n- 修改共享 renderer 或 CSS 时，运行同步校验和双端 payload 检查；不得只验证一个平台副本。\n- macOS 相关改动至少运行适用的 Node、shell 语法和 Swift 测试；Windows 相关改动至少运行适用的 Node 与 PowerShell 测试。无法在本机执行的平台测试必须交给 CI 并明确说明。\n- 发布前必须通过版本一致性、仓库 CI、DMG/Setup 构建与挂载或静态校验，并对原生文件选择器、ZIP 导入、已保存主题切换和真实 Codex 渲染做 smoke test。\n- 不为追求绿色测试降低安全断言、跳过失败用例或把真实失败改成无条件 skip。\n\n## Git 与发布\n\n- Write all new commit messages in English, including squash/merge commit titles and bodies.\n- 每次发布遵循 [`docs/releases/README.md`](docs/releases/README.md)：版本 PR 必须包含中文 `docs/releases/vX.Y.Z.md` 和完整英文 `docs/releases/vX.Y.Z-en.md`，顶部互链；以用户可感知的新增、修复和升级说明为先，附贡献者与完整变更链接；Release 展示中文正文，下载信息由工作流追加。\n\n- 保留用户现有改动；禁止未经授权的 reset、checkout 丢弃、强推、移动已公开 tag 或覆盖已公开 Release。\n- 功能开发、版本准备和紧急修复使用独立分支；提交只包含当前范围，推送前审查 staged diff。\n- 客户端发布由 `main` 上的版本变化驱动。版本未变化的普通合并不得重复构建或覆盖 Release。\n- Issue 修复的 PR 合并、CI 转绿后，同一轮工作里直接完成版本号提升（含六处版本一致）与 Release 触发，并在关闭 Issue 的评论中写清根因、修复提交与验证方式；不要把\"已修复\"停在合并这一步、让发布和关闭 Issue 变成另一次单独请求才做的事。\n- 自动发布必须验证六处版本一致、版本递增、tag 与发布提交一致、目标 Release 尚未公开。失败后的 `workflow_dispatch` 只能幂等重试同一 tag 和提交。\n- 构建资产必须来自 tag 对应提交。发布前核对 DMG、Setup.exe、`SHA256SUMS.txt` 的文件名、非空大小和摘要；发布后再次核对 Release 为公开状态且三个资产齐全。\n- 发布失败时保留可诊断状态，不把不完整资产标记为成功，也不通过重用旧版本号规避更新检测。\n\n## 安全边界\n\n- 不提交 GitHub token、Cloudflare 凭据、飞书或邮件 Webhook、签名私钥、用户数据和本机状态文件。示例只能使用明确占位符。\n- 使用最小 GitHub Actions 权限并固定第三方 Action 的完整 commit SHA。发布写权限只授予需要创建 tag 或 Release 的 job。\n- 不修改官方 Codex/ChatGPT 的 `app.asar`、签名、系统 ACL 或受保护安装目录；不要求关闭 Gatekeeper、Defender、SmartScreen 或执行 `ExecutionPolicy Bypass`。\n- 安装、升级和卸载必须保留原子 staging、备份与回滚，验证目标身份后才操作进程或路径。拒绝不可信符号链接和路径重定向。\n- 对外部包、网络响应和状态文件使用有界读取、严格 schema、内容校验和 fail-closed 行为；日志和错误信息不得泄露凭据或私人路径内容。\n","tools/selectors.json":"{\n  \"schema\": \"codex-dream-skin-selectors/1\",\n  \"description\": \"双端统一选择器契约。scope 与 required 来自双端 DOM 快照实测；shell-main 与 header-tint 另由 2026-07-31 Codex 26.727.40816 真实 macOS renderer 复核。doctor / CI 应逐条 querySelector 并按 tier 判级：L1 缺失=皮肤主行为受损，L2 缺失=精修静默降级。\",\n  \"verifiedAgainst\": {\n    \"date\": \"2026-09-26\",\n    \"codexVersions\": [\n      {\n        \"version\": \"26.924.22138\",\n        \"platform\": \"macos\",\n        \"evidence\": \"reporter: issue #415 / #414 报告 26.924 下主区会话与输入框不可见；本机在隔离 CODEX_HOME 与独立 user-data-dir 的 Codex 26.924.22138 renderer 上用 loopback CDP 复现，逐条二分定位到该规则；补丁后 thread 滚动容器与 composer 恢复渲染\"\n      },\n      {\n        \"version\": \"26.818\",\n        \"platform\": \"windows\",\n        \"evidence\": \"reporter: #378 本机已验证补丁与 #373 @QingYe-05 的实机源码证据；v1.5.16 据此扩展 composer / Markdown / message 绑定，维护者未做本机 renderer 复核\"\n      },\n      {\n        \"version\": \"26.814.41407\",\n        \"platform\": \"macos\",\n        \"evidence\": \"reporter: #373 @GreenLv 的 loopback CDP 只读 DOM 与样式读数，确认 _ComposerLayoutRoot_ 是真实输入框壳、_ComposerLayoutFooter_ 只是其内层 footer\"\n      },\n      {\n        \"version\": \"26.814.5517.0\",\n        \"platform\": \"windows\",\n        \"evidence\": \"reporter: #376 复现环境；该版本设置页外观切换后的混色问题仍未修复，settings/appearance 路径未验证\"\n      },\n      {\n        \"version\": \"26.803.10989.0\",\n        \"platform\": \"windows\",\n        \"evidence\": \"reporter: #363 实机探测（Chromium 151.0.7922.76）；受管 --user-data-dir 下 CDP、app://-/index.html renderer 与真实主题注入验证全部通过\"\n      },\n      {\n        \"version\": \"26.803\",\n        \"platform\": \"both\",\n        \"evidence\": \"reporter: #359 Owl composer 布局报告；_ComposerLayoutBody_ / _ComposerLayoutFooter_ / _ComposerHomeUtilityBar_ 前缀别名已并入合同\"\n      },\n      {\n        \"version\": \"26.727.40816\",\n        \"platform\": \"macos\",\n        \"evidence\": \"maintainer: 已签名 macOS app 的 live app:// renderer 实测复核（Chromium 150.0.7871.182），shell-main 与 header-tint 逐条 querySelector\"\n      },\n      {\n        \"version\": \"26.715.61943\",\n        \"platform\": \"macos\",\n        \"evidence\": \"fixture: runtime/dom-fixtures/codex-dom-fixture-darwin-watch.json（15 状态，Chromium 150.0.7871.124）\"\n      },\n      {\n        \"version\": \"unrecorded\",\n        \"platform\": \"windows\",\n        \"evidence\": \"fixture: runtime/dom-fixtures/codex-dom-fixture-win32-watch.json（7 状态）；bundle hash 与 mac 不同（ModelPickerTrigger mac=1fm6a win=1w4ob），确认双端存在版本错位\"\n      }\n    ],\n    \"verdict\": \"双端运行时继续共用一份 selector/CSS 合同。26.727.40816 起主表面与顶栏的旧语义类改为 CSS Modules，26.803~26.818 又把输入框壳迁到 _ComposerLayoutRoot_；合同的做法始终是保留旧锚点、追加稳定属性或模块名前缀，绝不匹配完整 hash。注意 26.803 之后每一条证据都来自报告者，维护者没有对应平台的本机 renderer 复核——不要把它们当成与 26.727 同等强度的验收。\",\n    \"gaps\": [\n      \"Windows 26.727 之后至今没有维护者本机 renderer 复核\",\n      \"#376：26.814.5517.0 上 Codex 设置→外观切换深浅色后主题混色，settings/appearance 路径的锚点行为未验证\",\n      \"#371：Windows 顶部与底部区域配色与主区不一致，尚未确认是 header-tint 未命中还是原生层未被覆盖\"\n    ]\n  },\n  \"appearanceSignal\": {\n    \"dark\": \"html.electron-dark\",\n    \"light\": \"html.electron-light\",\n    \"warning\": \"html.electron-opaque 随窗口聚焦/毛玻璃状态闪动，与明暗无关，禁止用作外观信号\"\n  },\n  \"scopeVocabulary\": {\n    \"all\": \"除设置页外的全部路由（home / thread / detail）及其上的 menu / dialog 覆盖层\",\n    \"home\": \"首页（建议卡屏）。注意首页渐进渲染：home-icon 先出现，utility bar 可晚 1~2 秒\",\n    \"thread\": \"会话/任务页（含 markdown 内容）\",\n    \"settings\": \"设置页。mac 26.715.61943 实测设置页替换整个 shell（main/侧栏/header 全部消失）；win 实测设置页保留 shell。皮肤不得假设二者其一，锚点缺失时降为 L0\",\n    \"overlay\": \"菜单 / 弹窗 / popper 浮层\",\n    \"config\": \"依赖用户配置才出现（如未配置项目则无项目选择器）\"\n  },\n  \"selectors\": [\n    { \"key\": \"shell-main\", \"selector\": \"main:is(.main-surface, [data-app-shell-main-surface], [class*=\\\"_MainContentSurface_\\\"])\", \"tier\": \"L1\", \"scope\": \"all\", \"required\": true, \"notes\": \"全局主表面。26.727.40816 提供 data-app-shell-main-surface，并使用 _MainContentSurface_ CSS Module；保留旧类兼容历史版本，前缀只限定在 main 元素。mac 设置页缺失（win 存在），缺失时整页仅 L0\" },\n    { \"key\": \"left-panel\", \"selector\": \"aside.app-shell-left-panel\", \"tier\": \"L1\", \"scope\": \"all\", \"required\": true, \"notes\": \"左侧栏；收起/重建时会移除节点，勿在其消失时清皮\" },\n    { \"key\": \"header-tint\", \"selector\": \"header:is(.app-header-tint, [data-app-shell-header-edge-scroll], [class*=\\\"_Header_\\\"])\", \"tier\": \"L1\", \"scope\": \"all\", \"required\": true, \"notes\": \"顶栏。26.727.40816 输出 data-app-shell-header-edge-scroll 并使用 _Header_ CSS Module；保留旧类兼容历史版本，前缀只限定在 header 元素。皮肤不得覆盖其 position/z-index（既有回归约束）\" },\n    { \"key\": \"main-content-top-fade\", \"selector\": \":is(.app-shell-main-content-top-fade, [data-app-shell-main-content-top-fade]:not(:has(*)), [class*=\\\"_MainContentTopFade_\\\"])\", \"tier\": \"L2\", \"scope\": \"all\", \"required\": false, \"notes\": \"主区顶部渐变遮罩。26.727.40816 提供 data-app-shell-main-content-top-fade 并使用 _MainContentTopFade_ CSS Module；用于在主题背景下移除原生白色 fade。26.924 把该属性从遮罩层移到了包裹整条路由的容器上，裸属性会连带命中 thread 滚动容器与 composer，导致任意会话右栏空白（#415/#414）。属性形式因此限定为无子元素的原生遮罩层，两个旧 class 形式保持不变\" },\n    { \"key\": \"home-icon\", \"selector\": \"[data-testid=\\\"home-icon\\\"]\", \"tier\": \"L1\", \"scope\": \"home\", \"required\": true, \"notes\": \"首页判定信号，双端一致\" },\n    { \"key\": \"home-route\", \"selector\": \"[role=\\\"main\\\"]:has([data-testid=\\\"home-icon\\\"])\", \"tier\": \"L1\", \"scope\": \"home\", \"required\": true, \"notes\": \"首页容器。实测 [role=main] 仅存在于首页——它不是通用路由锚点，thread 页没有\" },\n    { \"key\": \"home-route-css\", \"selector\": \"[role=\\\"main\\\"]\", \"tier\": \"L1\", \"scope\": \"home\", \"required\": true, \"notes\": \"home-route 的 CSS 可组合别名：不含 :has()。CSS 禁止 :has() 嵌套，home-route 原选择器一旦写进 :has()/:not(:has()) 整条规则会被解析器丢弃（v1.3.1 全窗口首页与任务页氛围背景因此失效）。依据与 home-route 相同的实测：[role=main] 仅存在于首页；该锚点缺失时 CSS 路由门控整体失效，故必须按 L1 必需项监控\" },\n    { \"key\": \"home-banners\", \"selector\": \".home-banners\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false, \"notes\": \"Codex 26.721+ 新增的原生首页 banner 插槽，位于 home-route 第一个子节点内、通常为空（0 子节点）靠原生 empty:hidden 折叠。真正的首页内容（标题/建议卡/输入框）在这个版本上已变成该插槽外层容器的兄弟节点，不再是它的后代（见 #244 实测：home-route > div:first-child 被撑到 100% 高度会把内容挤出视口）。用于判定新旧 home DOM 形态，皮肤据此把 first-child 链路的强制尺寸限定在旧形态或改走兄弟节点\" },\n    { \"key\": \"composer-chrome\", \"selector\": \":is(.composer-surface-chrome, [class*=\\\"_ComposerLayoutRoot_\\\"], [data-composer-surface-variant][data-composer-radius-variant])\", \"tier\": \"L2\", \"scope\": \"home+thread\", \"required\": false, \"notes\": \"输入框视觉壳。兼容旧语义类、26.814 ComposerLayoutRoot CSS Module 与稳定 surface/radius 语义属性；hash 随版本变化。win 实测存在无 composer 的 detail 路由，不可当全局锚点\" },\n    { \"key\": \"composer-toolbar\", \"selector\": \":is(.composer-surface-chrome [class*=\\\"_footer_\\\"], [class*=\\\"_ComposerLayoutRoot_\\\"] [class*=\\\"_ComposerLayoutFooter_\\\"], [data-composer-surface-variant][data-composer-radius-variant] :is([data-composer-footer-responsive], [class*=\\\"_ComposerLayoutFooter_\\\"], [class*=\\\"_footer_\\\"]))\", \"tier\": \"L2\", \"scope\": \"home+thread\", \"required\": false, \"notes\": \"输入框工具栏；兼容旧 footer、ComposerLayoutFooter CSS Module 与 data-composer-footer-responsive，hash 随版本变化\" },\n    { \"key\": \"home-utility\", \"selector\": \":is([class*=\\\"_homeUtilityBar_\\\"], [class*=\\\"_ComposerHomeUtilityBar_\\\"])\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false, \"notes\": \"CSS Modules 前缀匹配；兼容旧 homeUtilityBar 与 ComposerHomeUtilityBar，模块名跨端稳定、hash 随版本变，禁止匹配完整 hash\" },\n    { \"key\": \"game-source\", \"selector\": \"[data-feature=\\\"game-source\\\"]\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false },\n    { \"key\": \"home-suggestions\", \"selector\": \".group\\\\/home-suggestions\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false },\n    { \"key\": \"project-selector\", \"selector\": \".group\\\\/project-selector\", \"tier\": \"L2\", \"scope\": \"home config\", \"required\": false, \"notes\": \"依赖用户项目配置；win 快照未出现（该机可能未配置项目），不算平台差异\" },\n    { \"key\": \"markdown\", \"selector\": \"[class*=\\\"_markdown\\\"]\", \"tier\": \"L2\", \"scope\": \"thread\", \"required\": false, \"notes\": \"会话内容块，单页可达 100+ 个，样式规则注意性能\" },\n    { \"key\": \"thread-surface\", \"selector\": \".thread-scroll-container\", \"tier\": \"L2\", \"scope\": \"thread\", \"required\": false, \"notes\": \"会话滚动表面；双端活动会话快照均存在\" },\n    { \"key\": \"message\", \"selector\": \":is([data-message-author-role], [data-local-conversation-user-anchor], [data-local-conversation-final-assistant])\", \"tier\": \"L2\", \"scope\": \"thread\", \"required\": false, \"notes\": \"用户与助手消息的稳定语义边界；兼容旧版 role 属性和 Codex 26.727+ 语义属性。当前全宽 user anchor 在运行时优先映射到内部自适应圆角气泡，找不到气泡时保留旧版 anchor fallback\" },\n    { \"key\": \"settings-panel\", \"selector\": \"[data-settings-panel-slug=\\\"general-settings\\\"]\", \"tier\": \"L2\", \"scope\": \"settings\", \"required\": false, \"notes\": \"Codex 26.727 设置页稳定导航锚点；设置页可先落在 General，不再保证 appearance-theme 或 theme-preview 存在\" },\n    { \"key\": \"appearance-radio\", \"selector\": \"input[name=\\\"appearance-theme\\\"]\", \"tier\": \"L2\", \"scope\": \"settings\", \"required\": false, \"notes\": \"旧版外观三选一；新设置页可能仅有 settings-panel\" },\n    { \"key\": \"overlay-menu\", \"selector\": \"[role=\\\"menu\\\"]\", \"tier\": \"L2\", \"scope\": \"overlay\", \"required\": false },\n    { \"key\": \"overlay-dialog\", \"selector\": \"[role=\\\"dialog\\\"]\", \"tier\": \"L2\", \"scope\": \"overlay\", \"required\": false },\n    { \"key\": \"overlay-popper\", \"selector\": \"[data-radix-popper-content-wrapper]\", \"tier\": \"L2\", \"scope\": \"overlay\", \"required\": false }\n  ],\n  \"removed\": [\n    { \"key\": \"suggestion-item\", \"selector\": \".group\\\\/home-suggestion-list-item\", \"reason\": \"双端全部 22 个实测状态命中 0 次——当前 Codex 版本已无此类；CSS 中引用它的规则为化石，待清理\" }\n  ],\n  \"stableTestids\": [\"app-shell-header-context-menu-surface\", \"home-icon\", \"theme-preview\"],\n  \"notes\": [\n    \"锚点优先级：data-testid > role/语义标签 > 稳定类名 > CSS Modules 前缀；禁止精确 hash 与纯结构路径\",\n    \"首页渐进渲染：L2 home 锚点必须容忍晚到，找不到 = 暂不精修，不得阻断 L0/L1\",\n    \"跨端适配 = 版本管理：同版本双端 DOM 同源；升级 Codex 后先跑 doctor 对本清单，再决定是否改适配\"\n  ]\n}\n","macos/references/runtime-notes.md":"# Runtime notes\n\n- Discover the official `com.openai.codex` bundle on every launch; do not assume an upgrade keeps the same executable internals.\n- Use `Contents/Resources/cua_node/bin/node` from that bundle. Require Node.js 20+, a valid strict code signature, matching architecture, and OpenAI Team ID `2DC432GLL2` on both app and runtime.\n- State readers that can run before a validated launch must establish this runtime identity at their own execution boundary; never treat an inherited `NODE` value as proof of trust.\n- Do not ship a Node binary and do not depend on a globally installed `node` or `npm`.\n- Launch the official executable through a per-user `launchd` job with `--remote-debugging-address=127.0.0.1` and a selected port. LaunchServices may discard Chromium flags.\n- Prefer port `9341`; scan through `9441` on collision and record the selected port in state.\n- Accept CDP only when the listener belongs to the discovered Codex main process or one of its legitimate descendants, the WebSocket URL is loopback-only, and an `app://` renderer exposes expected native shell markers.\n- Treat loopback CDP as locally privileged but unauthenticated. Keep the themed session limited to trusted local use and close the port through a full Restore when finished.\n- Poll page targets and reinject after document loads. A debounced mutation observer plus a low-frequency safety timer handles in-page route changes.\n- Record injector PID, start time, executable, script path, app identity, selected port, and theme directory. Refuse to stop a PID when any required identity differs.\n- Store mutable data under `~/Library/Application Support/CodexDreamSkinStudio`; keep the installed program under `~/.codex/codex-dream-skin-studio`.\n- Back up and restore only `appearanceTheme` and `appearanceDarkCodeThemeId`. Leave `appearanceDarkChromeTheme` and unrelated TOML content untouched.\n- Never modify, replace, unpack, repack, re-sign, or back up `app.asar`.\n","macos/references/incident-review.md":"# Implementation incident review\n\nThe working theme initially failed intermittently despite correct CSS. The final project incorporates the following fixes:\n\n- macOS LaunchServices discarded Chromium debugging flags. The launcher now starts the official executable through a user-level `launchd` job.\n- `launchd` jobs did not reliably inherit `HOME`. Shared shell code resolves the current user's home directory when the variable is missing.\n- Two shell helpers returned the status of their final conditional expression, reporting failure after successful work. Successful helper paths now return explicitly or end with successful commands.\n- The home-suggestion selector was under-escaped inside a CDP JavaScript string. Verification now resolves `.group\\\\/home-suggestions` correctly and must return `pass: true`.\n- A Computer Use child process could inherit the CDP listener. Port ownership now accepts the official Codex process and verified descendants, while rejecting unrelated listeners.\n- A large bundled Node binary made GitHub delivery impractical. Version 1.0.0 validates and reuses Codex's own signed Node instead.\n- Static preview images were not accepted as release evidence. Final signoff requires JSON from the live DOM verifier plus a CDP screenshot.\n","macos/references/qa-inventory.md":"# QA inventory\n\n## Required user-visible behavior\n\n1. Home route paints one continuous wallpaper across sidebar and main content, with a live native heading, the real project utility row/composer, and any native suggestion cards exposed by the current Codex version.\n2. Normal tasks show the selected image behind restrained gradients and translucent live content surfaces.\n3. Sidebar, navigation, messages, approvals, project selector, attachments, composer, menus, hover, focus, and keyboard input remain native and interactive.\n4. Decorative layers have `pointer-events: none`; no screenshot or raster UI is used as an overlay.\n5. Route changes, renderer reloads, and ordinary refreshes reapply the current theme while the verified injector runs.\n6. Official application signature and `app.asar` remain unchanged.\n7. Restore removes live DOM/CSS, restores the two saved base-theme values, closes the CDP session after restart, and supports later reinstallation.\n\n## Automated checks\n\n- Shell and JavaScript syntax checks.\n- Payload construction with bundled demo and an isolated custom theme.\n- Reject unsupported theme config, unsafe image paths, invalid colors, oversized images, non-loopback WebSocket URLs, and unrecognized renderer targets.\n- Exact install/restore round trip for the two TOML settings while preserving unrelated values.\n- Empty `HOME` recovery.\n- Official app and internal Node signature, Team ID, architecture, and version validation.\n- Port collision selection and saved-port reuse.\n- PID reuse protection through PID, start time, executable, script path, and command-line matching.\n- Live verification after `Page.reload` returns version `1.2.0` and `pass: true`.\n- Strict home verification requires a visible wallpaper composition region of at least 320×160, composer, sidebar, non-interactive decoration, and no horizontal overflow. Suggestion cards and the standalone project button are optional only when the current Codex host does not render them.\n\n## Visual checks\n\n- Home at normal desktop size: the subject stays clear of the text-safe area, text remains live, native cards are not clipped when present, and the merged project/composer surface does not overlap content.\n- Narrower window: wallpaper cropping preserves the declared focus and safe area before essential controls are compressed.\n- Task route: background remains atmospheric, messages and output panels keep high contrast, and the composer remains reachable.\n- Task side panel: open and close the native thread panel twice, resize the window, and repeat; the toggle remains visible and clickable.\n- Selected image contains no fake interface controls or raster text intended to impersonate Codex.\n- Inspect sidebar selection, header, wallpaper edges, cards, project utility row, composer buttons, scrollbars, focus outlines, dialogs, and menus.\n\n## Release signoff\n\n- Run `tests/run-tests.sh` successfully.\n- Install from a clean extracted copy with no global Node.js.\n- Complete install → live verify → reload verify → restore → reinstall.\n- Capture a real CDP screenshot and retain the verifier JSON.\n- Confirm `codesign --verify --deep --strict` still succeeds for the official Codex app.\n- Build ZIP and record SHA-256.\n","windows/agents/openai.yaml":"interface:\r\n  display_name: \"Codex Dream Skin\"\r\n  short_description: \"Apply and safely restore the full pink-purple Codex skin\"\r\n  default_prompt: \"Use $codex-dream-skin to apply, verify, update, or restore the full Codex desktop skin.\"\r\n","windows/references/qa-inventory.md":"# QA inventory\n\n## User-visible claims\n\n1. The home screen paints one UI-free wallpaper continuously across sidebar and main content, with a live native heading, the real project utility/composer surface, and any suggestion cards rendered by the current Codex host.\n2. Sidebar, main area, header, and composer use coordinated readability layers; home remains expressive while normal task routes use a stronger quiet veil.\n3. All real Codex controls remain interactive; the skin is not a screenshot overlay.\n4. The skin survives route changes and renderer reloads while the injector daemon runs.\n5. The official Store package and `app.asar` remain unchanged.\n6. Restore removes the injected DOM/CSS and install/restore can be repeated.\n7. Restore closes the saved CDP listener before reopening Codex normally.\n\n## Functional checks\n\n- Home feature card: click one card and confirm the real composer is populated or the normal action occurs.\n- Project selector: click the real project chip under the \"选择项目\" label and confirm the native project menu opens.\n- Sidebar: open a real task, then return to New Task.\n- Task side panel: open and close the native thread panel twice, resize the window, and repeat; the toggle must remain visible and clickable.\n- Composer: type text, verify caret/readability, then clear it without sending.\n- Reload: use CDP `Page.reload`, wait, and confirm the injection marker returns.\n- Pet overlay: open a desktop pet and confirm its auxiliary window stays transparent with no skin background or decoration layer behind it.\n- Restore/reapply cycle: remove live skin, verify marker absent, apply again, verify marker present.\n- Update resilience: resolve the current `OpenAI.Codex` Appx location dynamically for launch. A versioned path saved for cleanup must be revalidated against the registered package full/family identity before any process is stopped.\n- Restart consent: an existing normal Codex window is never force-closed without explicit CLI authorization or shortcut confirmation.\n- Shortcut policy: installed launch, restore, tray, and tray-child commands use `RemoteSigned` without `Bypass`; Internet-zone markers are removed only from hash-verified managed PowerShell copies.\n- Config safety: Chinese project names, LF/CRLF choice, quoted target keys, table-header comments, and unrelated TOML sections survive install/selective restore; ambiguous target shapes fail unchanged, exact recovery keeps a copy of the replaced current file, and install refuses both registered and state-recorded old Codex processes.\n- Theme safety: empty/over-10 MB images, over-16384px/50MP dimensions, path escapes, symlinks/junctions, malformed JSON, unsafe CSS, and unsupported formats are rejected before payload construction.\n- Tray lifecycle: pause/resume reflects the clicked state, bundled Arina Hashimoto theme is present on first install, and complete restore terminates any separately launched tray before it can reapply the skin.\n\n## Visual checks\n\n- 1280x820 initial home: the declared focus stays in frame, the text-safe side remains readable, the real project utility row and composer form one coherent surface, and no horizontal scrolling appears.\n- Narrower window: accept Codex's native responsive card reduction or omission; no essential control is covered and wallpaper cropping preserves the focus/safe-area contract.\n- Normal task: the wallpaper is visibly quieter than home, messages keep high contrast, and composer does not overlap content.\n- Inspect the sidebar, header, wallpaper edges, native card labels when present, project utility row, composer controls, scrollbar, dialogs, and menus.\n- Reject black/transparent sidebar artifacts, clipped controls, duplicated/disconnected project labels, rasterized native controls, fake UI inside the wallpaper, weak contrast, or decorations intercepting clicks.\n\n## Exploratory checks\n\n- Start when the debug port is occupied: fail with a clear message or use a caller-selected port.\n- Start after Codex updates: package discovery and injection still work without patching installed files.\n- Tamper `state.json` with a reused PID: if the PID is still live but its identity differs, confirm cleanup fails closed and preserves `state.json`; if the PID is gone, confirm the stale record is replaced only after confirming no process is running, without stopping an unrelated process.\n- Serve a fake `app://` CDP target or remote/mismatched WebSocket URL and confirm both launcher and injector reject it. Reuse the port with a new Browser ID and confirm the existing watcher exits without reconnecting.\n- Force verification failure and confirm the injector, state file, and newly launched debug session are rolled back.\n- Start two operations concurrently and confirm the second fails clearly without changing config, state, or processes.\n- Close Codex without restore and confirm the Browser identity anchor closes and the watcher exits without reconnecting or rapidly growing logs.\n\n## Automated checks\n\n- `tests/run-tests.ps1`: strict UTF-8/no-BOM writes, UTF-16 rejection, LF/CRLF preservation, concurrent-write detection, exact backup/recovery, `[desktop]`-scoped restore, ambiguous TOML rejection, non-ASCII paths, Appx/state identity, argument quoting, theme seeding/import/save/switch/pause, canonical community-link and compatible-metadata rejection, fixed-origin download/apply boundaries, byte/dimension limits, junction rejection, payload construction, Browser ID, loopback URL rejection, and renderer isolation for transparent auxiliary windows.\n- `node --check` for the injector and renderer payload.\n- Live Windows signoff remains required for Store process ownership, restart consent, screenshot, and CDP closure.\n","windows/references/runtime-notes.md":"# References Skill\n\nPath: `windows/references/runtime-notes.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/windows/references/runtime-notes.md)"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# Codex Dream Skin Agent Guide\n\n本文件适用于仓库根目录及全部子目录。平台目录中的 `SKILL.md` 提供运行时操作细节；与本文件冲突时，优先遵守更严格的安全和发布要求。\n\n## 开始任务\n\n- 先阅读根目录 README、**最新的 `docs/handoff-*.md`**、相关平台文档、当前分支状态和目标文件，不凭记忆推断现状。交接文档是了解当前状态最快的入口：`main` 上有哪些已合并但未发布的提交、哪些事卡在外部确认、以及本机做不了哪些验证。\n- 中大型任务必须建立或更新根目录 `TASK_PROGRESS.md`。记录目标、范围、当前分支或 worktree、已完成项、进行中项、阻塞、测试结果、PR、合并及 Release 状态。\n- 在每个里程碑、任务切换、出现阻塞、准备交接以及上下文可能压缩前更新 `TASK_PROGRESS.md`。内容必须可让新 Agent 直接续做，不只写“处理中”。\n- `TASK_PROGRESS.md` 是本地连续性文件，不提交密钥、令牌、Webhook、个人路径中的隐私数据或未经确认的生产配置。\n- `TASK_PROGRESS.md`、`.local-evidence/` 等任务流水与本机证据只保留本地，禁止提交；`main` 文件树不得包含 `TASK_PROGRESS.md`。已跟踪的进度文件须取消跟踪并保留本地副本。\n\n## 优先级\n\n1. P0：安全问题、数据损坏、不可恢复卸载、错误发布、公开密钥和供应链风险。\n2. P1：用户无法安装、启动、恢复、导入或应用主题，以及发布版本与代码不一致。\n3. P2：兼容性、性能、交互和可维护性改进。\n4. P3：文档润色和非阻塞清理。\n\n- 最新的明确用户指令可以调整当前优先级。插入高优任务时，先把被中断任务的精确状态写入 `TASK_PROGRESS.md`。\n- 不把待定事项擅自升级为前置条件，也不把无关 Issue 或 PR 拉入当前范围。\n\n## 多 Agent 协作\n\n- 中大型且可独立拆分的任务默认并行分给多个 Agent；每个子任务必须有清晰边界、输入、允许的写入范围和验收条件。\n- 主 Agent 负责计划、冲突协调、最终集成、回归测试和事实核对。子 Agent 的“完成”不能代替主 Agent 验收。\n- 多个写入任务优先使用独立分支或 worktree。所有 Agent 共享文件系统，编辑前必须检查现有改动，禁止覆盖、回滚或顺手提交他人的工作。\n- 同一文件由一个 Agent 负责写入；无法避免时先协调所有权。只读审计可以并行，但不能伪装成已经实现或验证。\n- 页面或原生交互需要实机证据时使用项目指定的浏览器或原生测试工具；工具不可用必须明确记录缺口。\n\n## 进度与事实表述\n\n- 严格区分：本地实现、已测试、已提交、已推送、PR 已开、PR 已合并、tag 已创建、Release 已发布、用户已可下载。\n- `merged != released`。只有 GitHub Release 已公开、目标版本资产存在且可下载，才能说“已发布”。\n- 只有安装包实际包含目标代码并完成对应版本验证，才能说用户通过 Release 获得了功能。\n- Issue 只有在修复、证据、回复和状态都核对后才能说“已处理”；受上游限制或证据不足时保持真实状态。\n\n## 主题 ZIP 合同\n\n- 客户端只导入普通 `.zip`，不支持 `.dreamskin`，也不接受仅修改扩展名的伪装文件。\n- 新主题必须同时包含非空 `theme.json`、非空 `theme.css` 和 `theme.json` 引用的唯一背景图；三者缺一不可。\n- 背景图最大 10 MiB，并继续执行像素、尺寸、媒体魔数和解码校验。前端、Studio、服务端和双端客户端的限制必须一致。\n- 正式 Studio 包还必须校验 `manifest.json` 的平台、最低客户端版本、注册文件集合、字节数和 SHA-256。未知文件、重复路径、路径穿越、链接、reparse、嵌套归档、压缩炸弹和歧义根目录必须 fail closed。\n- `theme.css` 在导入时和每次应用时都必须通过共享 Safe CSS 策略，只允许作用于登记的公开主题部件。不得为新导入包增加旧主题兼容旁路。\n- 导入成功只写入“已保存主题”库，不自动切换活动主题，也不覆盖 last-known-good。用户必须在菜单中明确选择后才应用。\n- 手动移动目录仅用于可信、已解压的完整三文件主题；不得把它描述为与受限 ZIP 导入器同等安全。\n\n## 实现与测试\n\n- 优先复用 `runtime/` 的共享源，通过现有同步工具生成双端资产；不要直接制造 macOS、Windows 漂移。\n- 版本发布必须同步 `macos/VERSION`、`windows/VERSION`、`macos/package.json`、`macos/scripts/common-macos.sh`、`macos/scripts/injector.mjs` 和 `windows/scripts/injector.mjs`，并更新绑定当前版本的断言。\n- 修改主题 schema、manifest、Safe CSS、导入或提取逻辑时，必须覆盖合法包、缺件、空文件、边界大小、哈希不符、路径攻击、链接、嵌套归档、压缩滥用、重复导入和 ID 冲突。\n- 修改共享 renderer 或 CSS 时，运行同步校验和双端 payload 检查；不得只验证一个平台副本。\n- macOS 相关改动至少运行适用的 Node、shell 语法和 Swift 测试；Windows 相关改动至少运行适用的 Node 与 PowerShell 测试。无法在本机执行的平台测试必须交给 CI 并明确说明。\n- 发布前必须通过版本一致性、仓库 CI、DMG/Setup 构建与挂载或静态校验，并对原生文件选择器、ZIP 导入、已保存主题切换和真实 Codex 渲染做 smoke test。\n- 不为追求绿色测试降低安全断言、跳过失败用例或把真实失败改成无条件 skip。\n\n## Git 与发布\n\n- Write all new commit messages in English, including squash/merge commit titles and bodies.\n- 每次发布遵循 [`docs/releases/README.md`](docs/releases/README.md)：版本 PR 必须包含中文 `docs/releases/vX.Y.Z.md` 和完整英文 `docs/releases/vX.Y.Z-en.md`，顶部互链；以用户可感知的新增、修复和升级说明为先，附贡献者与完整变更链接；Release 展示中文正文，下载信息由工作流追加。\n\n- 保留用户现有改动；禁止未经授权的 reset、checkout 丢弃、强推、移动已公开 tag 或覆盖已公开 Release。\n- 功能开发、版本准备和紧急修复使用独立分支；提交只包含当前范围，推送前审查 staged diff。\n- 客户端发布由 `main` 上的版本变化驱动。版本未变化的普通合并不得重复构建或覆盖 Release。\n- Issue 修复的 PR 合并、CI 转绿后，同一轮工作里直接完成版本号提升（含六处版本一致）与 Release 触发，并在关闭 Issue 的评论中写清根因、修复提交与验证方式；不要把\"已修复\"停在合并这一步、让发布和关闭 Issue 变成另一次单独请求才做的事。\n- 自动发布必须验证六处版本一致、版本递增、tag 与发布提交一致、目标 Release 尚未公开。失败后的 `workflow_dispatch` 只能幂等重试同一 tag 和提交。\n- 构建资产必须来自 tag 对应提交。发布前核对 DMG、Setup.exe、`SHA256SUMS.txt` 的文件名、非空大小和摘要；发布后再次核对 Release 为公开状态且三个资产齐全。\n- 发布失败时保留可诊断状态，不把不完整资产标记为成功，也不通过重用旧版本号规避更新检测。\n\n## 安全边界\n\n- 不提交 GitHub token、Cloudflare 凭据、飞书或邮件 Webhook、签名私钥、用户数据和本机状态文件。示例只能使用明确占位符。\n- 使用最小 GitHub Actions 权限并固定第三方 Action 的完整 commit SHA。发布写权限只授予需要创建 tag 或 Release 的 job。\n- 不修改官方 Codex/ChatGPT 的 `app.asar`、签名、系统 ACL 或受保护安装目录；不要求关闭 Gatekeeper、Defender、SmartScreen 或执行 `ExecutionPolicy Bypass`。\n- 安装、升级和卸载必须保留原子 staging、备份与回滚，验证目标身份后才操作进程或路径。拒绝不可信符号链接和路径重定向。\n- 对外部包、网络响应和状态文件使用有界读取、严格 schema、内容校验和 fail-closed 行为；日志和错误信息不得泄露凭据或私人路径内容。\n","isInternal":false,"tokens":2795,"sizeBytes":8291},{"name":"openai.yaml","path":"macos/agents/openai.yaml","rawUrl":"https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/macos/agents/openai.yaml","title":"Agents Skill","category":"anthropic-skill","format":"yaml","content":"interface:\n  display_name: \"Codex Dream Skin Studio\"\n  short_description: \"Turn a personal image into a reversible macOS Codex theme\"\n  default_prompt: \"Use $codex-dream-skin-studio to install, customize, verify, or restore my macOS Codex theme without modifying the official app.\"\n","isInternal":false,"tokens":65,"sizeBytes":282},{"name":"acceptance-report-2026-07-15.md","path":"macos/references/acceptance-report-2026-07-15.md","rawUrl":"https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/macos/references/acceptance-report-2026-07-15.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Acceptance report — 2026-07-15\n\n## Result\n\nCodex Dream Skin Studio `1.0.0` passed its macOS release checks on the live Codex desktop app during the original private release validation.\n\n- macOS architecture: `arm64`\n- Codex version: `26.707.72221`\n- Codex signing Team ID: `2DC432GLL2`\n- Codex bundled Node.js: `v24.14.0`\n- CDP endpoint: loopback port `9341`\n- Official app deep signature after installation: valid\n- `app.asar` modification: none\n\n## Automated result\n\n`tests/run-tests.sh` passed syntax, default and custom payload, exact TOML theme-setting round trip, missing-`HOME` recovery, signed runtime, and doctor checks.\n\nLive doctor returned `pass: true`, `officialAppSignatureValid: true`, `modifiesAppAsar: false`, and `live: true`.\n\nLive renderer verification returned `pass: true` after `Page.reload`:\n\n- injected version `1.0.0`;\n- style and decorative chrome present;\n- decorative chrome `pointer-events: none`;\n- native sidebar and composer visible;\n- no horizontal document overflow;\n- home banner visible with native suggestion cards and project selector.\n\n## Evidence note (open-source tree)\n\nPrivate release builds included CDP screenshots under `docs/screenshots/`. Those captures may contain third-party UI chrome and demo art and are **not** shipped in this public tree. Reproduce evidence on your machine:\n\n```bash\n~/.codex/codex-dream-skin-studio/scripts/verify-dream-skin-macos.sh \\\n  --reload --screenshot \"$HOME/Desktop/Codex Dream Skin Verification.png\"\n```\n","isInternal":false,"tokens":364,"sizeBytes":1492},{"name":"asset-provenance.md","path":"macos/references/asset-provenance.md","rawUrl":"https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/macos/references/asset-provenance.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Asset provenance\n\n## Bundled demo hero\n\n- File: `assets/portal-hero.png`\n- SHA-256: `cec7a03d1ca8f60add2bfb7d3fcd3fe29225ffeb3f68f98301f140535c470ac5`\n- Created: 2026-07-15 via gpt-image-2 (fuck.codexapis.com)\n- Purpose: default banner / task background preset for light red-white product hero\n- Rights: generated for this project theme pack\n\n## User themes\n\nImages chosen through Customize belong to the user (or their licensors).\n","isInternal":false,"tokens":132,"sizeBytes":434},{"name":"incident-review.md","path":"macos/references/incident-review.md","rawUrl":"https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/macos/references/incident-review.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Implementation incident review\n\nThe working theme initially failed intermittently despite correct CSS. The final project incorporates the following fixes:\n\n- macOS LaunchServices discarded Chromium debugging flags. The launcher now starts the official executable through a user-level `launchd` job.\n- `launchd` jobs did not reliably inherit `HOME`. Shared shell code resolves the current user's home directory when the variable is missing.\n- Two shell helpers returned the status of their final conditional expression, reporting failure after successful work. Successful helper paths now return explicitly or end with successful commands.\n- The home-suggestion selector was under-escaped inside a CDP JavaScript string. Verification now resolves `.group\\\\/home-suggestions` correctly and must return `pass: true`.\n- A Computer Use child process could inherit the CDP listener. Port ownership now accepts the official Codex process and verified descendants, while rejecting unrelated listeners.\n- A large bundled Node binary made GitHub delivery impractical. Version 1.0.0 validates and reuses Codex's own signed Node instead.\n- Static preview images were not accepted as release evidence. Final signoff requires JSON from the live DOM verifier plus a CDP screenshot.\n","isInternal":false,"tokens":235,"sizeBytes":1269},{"name":"qa-inventory.md","path":"macos/references/qa-inventory.md","rawUrl":"https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/macos/references/qa-inventory.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# QA inventory\n\n## Required user-visible behavior\n\n1. Home route paints one continuous wallpaper across sidebar and main content, with a live native heading, the real project utility row/composer, and any native suggestion cards exposed by the current Codex version.\n2. Normal tasks show the selected image behind restrained gradients and translucent live content surfaces.\n3. Sidebar, navigation, messages, approvals, project selector, attachments, composer, menus, hover, focus, and keyboard input remain native and interactive.\n4. Decorative layers have `pointer-events: none`; no screenshot or raster UI is used as an overlay.\n5. Route changes, renderer reloads, and ordinary refreshes reapply the current theme while the verified injector runs.\n6. Official application signature and `app.asar` remain unchanged.\n7. Restore removes live DOM/CSS, restores the two saved base-theme values, closes the CDP session after restart, and supports later reinstallation.\n\n## Automated checks\n\n- Shell and JavaScript syntax checks.\n- Payload construction with bundled demo and an isolated custom theme.\n- Reject unsupported theme config, unsafe image paths, invalid colors, oversized images, non-loopback WebSocket URLs, and unrecognized renderer targets.\n- Exact install/restore round trip for the two TOML settings while preserving unrelated values.\n- Empty `HOME` recovery.\n- Official app and internal Node signature, Team ID, architecture, and version validation.\n- Port collision selection and saved-port reuse.\n- PID reuse protection through PID, start time, executable, script path, and command-line matching.\n- Live verification after `Page.reload` returns version `1.2.0` and `pass: true`.\n- Strict home verification requires a visible wallpaper composition region of at least 320×160, composer, sidebar, non-interactive decoration, and no horizontal overflow. Suggestion cards and the standalone project button are optional only when the current Codex host does not render them.\n\n## Visual checks\n\n- Home at normal desktop size: the subject stays clear of the text-safe area, text remains live, native cards are not clipped when present, and the merged project/composer surface does not overlap content.\n- Narrower window: wallpaper cropping preserves the declared focus and safe area before essential controls are compressed.\n- Task route: background remains atmospheric, messages and output panels keep high contrast, and the composer remains reachable.\n- Task side panel: open and close the native thread panel twice, resize the window, and repeat; the toggle remains visible and clickable.\n- Selected image contains no fake interface controls or raster text intended to impersonate Codex.\n- Inspect sidebar selection, header, wallpaper edges, cards, project utility row, composer buttons, scrollbars, focus outlines, dialogs, and menus.\n\n## Release signoff\n\n- Run `tests/run-tests.sh` successfully.\n- Install from a clean extracted copy with no global Node.js.\n- Complete install → live verify → reload verify → restore → reinstall.\n- Capture a real CDP screenshot and retain the verifier JSON.\n- Confirm `codesign --verify --deep --strict` still succeeds for the official Codex app.\n- Build ZIP and record SHA-256.\n","isInternal":false,"tokens":638,"sizeBytes":3232},{"name":"runtime-notes.md","path":"macos/references/runtime-notes.md","rawUrl":"https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/macos/references/runtime-notes.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Runtime notes\n\n- Discover the official `com.openai.codex` bundle on every launch; do not assume an upgrade keeps the same executable internals.\n- Use `Contents/Resources/cua_node/bin/node` from that bundle. Require Node.js 20+, a valid strict code signature, matching architecture, and OpenAI Team ID `2DC432GLL2` on both app and runtime.\n- State readers that can run before a validated launch must establish this runtime identity at their own execution boundary; never treat an inherited `NODE` value as proof of trust.\n- Do not ship a Node binary and do not depend on a globally installed `node` or `npm`.\n- Launch the official executable through a per-user `launchd` job with `--remote-debugging-address=127.0.0.1` and a selected port. LaunchServices may discard Chromium flags.\n- Prefer port `9341`; scan through `9441` on collision and record the selected port in state.\n- Accept CDP only when the listener belongs to the discovered Codex main process or one of its legitimate descendants, the WebSocket URL is loopback-only, and an `app://` renderer exposes expected native shell markers.\n- Treat loopback CDP as locally privileged but unauthenticated. Keep the themed session limited to trusted local use and close the port through a full Restore when finished.\n- Poll page targets and reinject after document loads. A debounced mutation observer plus a low-frequency safety timer handles in-page route changes.\n- Record injector PID, start time, executable, script path, app identity, selected port, and theme directory. Refuse to stop a PID when any required identity differs.\n- Store mutable data under `~/Library/Application Support/CodexDreamSkinStudio`; keep the installed program under `~/.codex/codex-dream-skin-studio`.\n- Back up and restore only `appearanceTheme` and `appearanceDarkCodeThemeId`. Leave `appearanceDarkChromeTheme` and unrelated TOML content untouched.\n- Never modify, replace, unpack, repack, re-sign, or back up `app.asar`.\n","isInternal":false,"tokens":432,"sizeBytes":1961},{"name":"SKILL.md","path":"macos/SKILL.md","rawUrl":"https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/macos/SKILL.md","title":"codex-dream-skin-studio","category":"anthropic-skill","format":"markdown","content":"---\nname: codex-dream-skin-studio\ndescription: Install, customize, launch, verify, repair, update, or restore Codex Dream Skin Studio on macOS. Use when a user wants to turn a personal image into one continuous full-window Codex wallpaper with adaptive readability layers while preserving the native interface, or needs safe CDP theme troubleshooting and rollback.\ncompatibility: macOS, official Codex Desktop app, signed bundled Node.js 20 or newer\n---\n\n# Codex Dream Skin Studio\n\nThis file is an optional Codex capability entry. The delivery is a complete standalone project; users do not need to install it as a Skill.\n\n## Workflow\n\n1. Run `Install Codex Dream Skin.command` from the complete project folder.\n2. Run `Customize Codex Dream Skin.command`, choose an image in Finder, and enter a theme name.\n3. To add a complete downloaded pack, use the native menu's “导入主题 ZIP…”. Accept ordinary `.zip` only. Every new official Studio pack contains `manifest.json`, non-empty `theme.json`, non-empty locally validated `theme.css`, exactly one registered background, and optional license/signature files; the trusted local simplified format contains exactly `theme.json`, `theme.css`, and its referenced image. Import into saved themes without changing the active theme. A manually extracted complete three-file directory may instead be moved into the saved themes folder. Previously saved legacy themes without CSS remain switchable but inject no extra CSS.\n4. Verify the live result with `Verify Codex Dream Skin.command`. A pass requires a visible native sidebar and composer, no horizontal overflow, non-interactive decoration, and—on the home route—a continuous wallpaper with live native heading, project controls, and any suggestion cards exposed by the current Codex version.\n5. Restore the official appearance with `Restore Codex Dream Skin.command`.\n\n## Guardrails\n\n- Never modify the official `.app`, `app.asar`, or its code signature.\n- Use the official Codex app's signed Node.js runtime only after validating its signature, Team ID, architecture, and minimum version.\n- Bind CDP to loopback, verify that the listener belongs to Codex, and reject non-Codex renderer targets.\n- Preserve all native cards, navigation, project selectors, task content, composer controls, and keyboard focus.\n- Theme images must be UI-free wallpapers. Paint one 16:9 image continuously across the window; keep home expressive and task routes quieter. `appearance: auto` follows Codex/native or system appearance rather than image brightness.\n- Theme-pack import does not support `.dreamskin`; reject traversal, links, nested archives, ambiguous roots, size/count abuse, and packs that fail the existing theme/image payload checks.\n- Keep decoration at `pointer-events: none`.\n- Require explicit authorization before restarting an already-running Codex instance.\n- Stop an injector only when its recorded PID, executable, command line, and start time all match.\n\n## Key resources\n\n- `README.md`: user installation and customization guide.\n- `scripts/injector.mjs`: CDP connection, injection, removal, verification, and screenshots.\n- `assets/dream-skin.css`: live native interface styling.\n- `assets/renderer-inject.js`: idempotent DOM integration and cleanup.\n- `scripts/doctor-macos.sh`: signed-runtime, payload, and optional live-session self-check.\n- `references/qa-inventory.md`: release and visual acceptance criteria.\n","frontmatter":{"name":"codex-dream-skin-studio","description":"Install, customize, launch, verify, repair, update, or restore Codex Dream Skin Studio on macOS. Use when a user wants to turn a personal image into one continuous full-window Codex wallpaper with adaptive readability layers while preserving the native interface, or needs safe CDP theme troubleshooting and rollback.","compatibility":"macOS, official Codex Desktop app, signed bundled Node.js 20 or newer"},"isInternal":false,"tokens":706,"sizeBytes":3434},{"name":"selectors.json","path":"tools/selectors.json","rawUrl":"https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/tools/selectors.json","title":"Tools Skill","category":"anthropic-skill","format":"json","content":"{\n  \"schema\": \"codex-dream-skin-selectors/1\",\n  \"description\": \"双端统一选择器契约。scope 与 required 来自双端 DOM 快照实测；shell-main 与 header-tint 另由 2026-07-31 Codex 26.727.40816 真实 macOS renderer 复核。doctor / CI 应逐条 querySelector 并按 tier 判级：L1 缺失=皮肤主行为受损，L2 缺失=精修静默降级。\",\n  \"verifiedAgainst\": {\n    \"date\": \"2026-09-26\",\n    \"codexVersions\": [\n      {\n        \"version\": \"26.924.22138\",\n        \"platform\": \"macos\",\n        \"evidence\": \"reporter: issue #415 / #414 报告 26.924 下主区会话与输入框不可见；本机在隔离 CODEX_HOME 与独立 user-data-dir 的 Codex 26.924.22138 renderer 上用 loopback CDP 复现，逐条二分定位到该规则；补丁后 thread 滚动容器与 composer 恢复渲染\"\n      },\n      {\n        \"version\": \"26.818\",\n        \"platform\": \"windows\",\n        \"evidence\": \"reporter: #378 本机已验证补丁与 #373 @QingYe-05 的实机源码证据；v1.5.16 据此扩展 composer / Markdown / message 绑定，维护者未做本机 renderer 复核\"\n      },\n      {\n        \"version\": \"26.814.41407\",\n        \"platform\": \"macos\",\n        \"evidence\": \"reporter: #373 @GreenLv 的 loopback CDP 只读 DOM 与样式读数，确认 _ComposerLayoutRoot_ 是真实输入框壳、_ComposerLayoutFooter_ 只是其内层 footer\"\n      },\n      {\n        \"version\": \"26.814.5517.0\",\n        \"platform\": \"windows\",\n        \"evidence\": \"reporter: #376 复现环境；该版本设置页外观切换后的混色问题仍未修复，settings/appearance 路径未验证\"\n      },\n      {\n        \"version\": \"26.803.10989.0\",\n        \"platform\": \"windows\",\n        \"evidence\": \"reporter: #363 实机探测（Chromium 151.0.7922.76）；受管 --user-data-dir 下 CDP、app://-/index.html renderer 与真实主题注入验证全部通过\"\n      },\n      {\n        \"version\": \"26.803\",\n        \"platform\": \"both\",\n        \"evidence\": \"reporter: #359 Owl composer 布局报告；_ComposerLayoutBody_ / _ComposerLayoutFooter_ / _ComposerHomeUtilityBar_ 前缀别名已并入合同\"\n      },\n      {\n        \"version\": \"26.727.40816\",\n        \"platform\": \"macos\",\n        \"evidence\": \"maintainer: 已签名 macOS app 的 live app:// renderer 实测复核（Chromium 150.0.7871.182），shell-main 与 header-tint 逐条 querySelector\"\n      },\n      {\n        \"version\": \"26.715.61943\",\n        \"platform\": \"macos\",\n        \"evidence\": \"fixture: runtime/dom-fixtures/codex-dom-fixture-darwin-watch.json（15 状态，Chromium 150.0.7871.124）\"\n      },\n      {\n        \"version\": \"unrecorded\",\n        \"platform\": \"windows\",\n        \"evidence\": \"fixture: runtime/dom-fixtures/codex-dom-fixture-win32-watch.json（7 状态）；bundle hash 与 mac 不同（ModelPickerTrigger mac=1fm6a win=1w4ob），确认双端存在版本错位\"\n      }\n    ],\n    \"verdict\": \"双端运行时继续共用一份 selector/CSS 合同。26.727.40816 起主表面与顶栏的旧语义类改为 CSS Modules，26.803~26.818 又把输入框壳迁到 _ComposerLayoutRoot_；合同的做法始终是保留旧锚点、追加稳定属性或模块名前缀，绝不匹配完整 hash。注意 26.803 之后每一条证据都来自报告者，维护者没有对应平台的本机 renderer 复核——不要把它们当成与 26.727 同等强度的验收。\",\n    \"gaps\": [\n      \"Windows 26.727 之后至今没有维护者本机 renderer 复核\",\n      \"#376：26.814.5517.0 上 Codex 设置→外观切换深浅色后主题混色，settings/appearance 路径的锚点行为未验证\",\n      \"#371：Windows 顶部与底部区域配色与主区不一致，尚未确认是 header-tint 未命中还是原生层未被覆盖\"\n    ]\n  },\n  \"appearanceSignal\": {\n    \"dark\": \"html.electron-dark\",\n    \"light\": \"html.electron-light\",\n    \"warning\": \"html.electron-opaque 随窗口聚焦/毛玻璃状态闪动，与明暗无关，禁止用作外观信号\"\n  },\n  \"scopeVocabulary\": {\n    \"all\": \"除设置页外的全部路由（home / thread / detail）及其上的 menu / dialog 覆盖层\",\n    \"home\": \"首页（建议卡屏）。注意首页渐进渲染：home-icon 先出现，utility bar 可晚 1~2 秒\",\n    \"thread\": \"会话/任务页（含 markdown 内容）\",\n    \"settings\": \"设置页。mac 26.715.61943 实测设置页替换整个 shell（main/侧栏/header 全部消失）；win 实测设置页保留 shell。皮肤不得假设二者其一，锚点缺失时降为 L0\",\n    \"overlay\": \"菜单 / 弹窗 / popper 浮层\",\n    \"config\": \"依赖用户配置才出现（如未配置项目则无项目选择器）\"\n  },\n  \"selectors\": [\n    { \"key\": \"shell-main\", \"selector\": \"main:is(.main-surface, [data-app-shell-main-surface], [class*=\\\"_MainContentSurface_\\\"])\", \"tier\": \"L1\", \"scope\": \"all\", \"required\": true, \"notes\": \"全局主表面。26.727.40816 提供 data-app-shell-main-surface，并使用 _MainContentSurface_ CSS Module；保留旧类兼容历史版本，前缀只限定在 main 元素。mac 设置页缺失（win 存在），缺失时整页仅 L0\" },\n    { \"key\": \"left-panel\", \"selector\": \"aside.app-shell-left-panel\", \"tier\": \"L1\", \"scope\": \"all\", \"required\": true, \"notes\": \"左侧栏；收起/重建时会移除节点，勿在其消失时清皮\" },\n    { \"key\": \"header-tint\", \"selector\": \"header:is(.app-header-tint, [data-app-shell-header-edge-scroll], [class*=\\\"_Header_\\\"])\", \"tier\": \"L1\", \"scope\": \"all\", \"required\": true, \"notes\": \"顶栏。26.727.40816 输出 data-app-shell-header-edge-scroll 并使用 _Header_ CSS Module；保留旧类兼容历史版本，前缀只限定在 header 元素。皮肤不得覆盖其 position/z-index（既有回归约束）\" },\n    { \"key\": \"main-content-top-fade\", \"selector\": \":is(.app-shell-main-content-top-fade, [data-app-shell-main-content-top-fade]:not(:has(*)), [class*=\\\"_MainContentTopFade_\\\"])\", \"tier\": \"L2\", \"scope\": \"all\", \"required\": false, \"notes\": \"主区顶部渐变遮罩。26.727.40816 提供 data-app-shell-main-content-top-fade 并使用 _MainContentTopFade_ CSS Module；用于在主题背景下移除原生白色 fade。26.924 把该属性从遮罩层移到了包裹整条路由的容器上，裸属性会连带命中 thread 滚动容器与 composer，导致任意会话右栏空白（#415/#414）。属性形式因此限定为无子元素的原生遮罩层，两个旧 class 形式保持不变\" },\n    { \"key\": \"home-icon\", \"selector\": \"[data-testid=\\\"home-icon\\\"]\", \"tier\": \"L1\", \"scope\": \"home\", \"required\": true, \"notes\": \"首页判定信号，双端一致\" },\n    { \"key\": \"home-route\", \"selector\": \"[role=\\\"main\\\"]:has([data-testid=\\\"home-icon\\\"])\", \"tier\": \"L1\", \"scope\": \"home\", \"required\": true, \"notes\": \"首页容器。实测 [role=main] 仅存在于首页——它不是通用路由锚点，thread 页没有\" },\n    { \"key\": \"home-route-css\", \"selector\": \"[role=\\\"main\\\"]\", \"tier\": \"L1\", \"scope\": \"home\", \"required\": true, \"notes\": \"home-route 的 CSS 可组合别名：不含 :has()。CSS 禁止 :has() 嵌套，home-route 原选择器一旦写进 :has()/:not(:has()) 整条规则会被解析器丢弃（v1.3.1 全窗口首页与任务页氛围背景因此失效）。依据与 home-route 相同的实测：[role=main] 仅存在于首页；该锚点缺失时 CSS 路由门控整体失效，故必须按 L1 必需项监控\" },\n    { \"key\": \"home-banners\", \"selector\": \".home-banners\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false, \"notes\": \"Codex 26.721+ 新增的原生首页 banner 插槽，位于 home-route 第一个子节点内、通常为空（0 子节点）靠原生 empty:hidden 折叠。真正的首页内容（标题/建议卡/输入框）在这个版本上已变成该插槽外层容器的兄弟节点，不再是它的后代（见 #244 实测：home-route > div:first-child 被撑到 100% 高度会把内容挤出视口）。用于判定新旧 home DOM 形态，皮肤据此把 first-child 链路的强制尺寸限定在旧形态或改走兄弟节点\" },\n    { \"key\": \"composer-chrome\", \"selector\": \":is(.composer-surface-chrome, [class*=\\\"_ComposerLayoutRoot_\\\"], [data-composer-surface-variant][data-composer-radius-variant])\", \"tier\": \"L2\", \"scope\": \"home+thread\", \"required\": false, \"notes\": \"输入框视觉壳。兼容旧语义类、26.814 ComposerLayoutRoot CSS Module 与稳定 surface/radius 语义属性；hash 随版本变化。win 实测存在无 composer 的 detail 路由，不可当全局锚点\" },\n    { \"key\": \"composer-toolbar\", \"selector\": \":is(.composer-surface-chrome [class*=\\\"_footer_\\\"], [class*=\\\"_ComposerLayoutRoot_\\\"] [class*=\\\"_ComposerLayoutFooter_\\\"], [data-composer-surface-variant][data-composer-radius-variant] :is([data-composer-footer-responsive], [class*=\\\"_ComposerLayoutFooter_\\\"], [class*=\\\"_footer_\\\"]))\", \"tier\": \"L2\", \"scope\": \"home+thread\", \"required\": false, \"notes\": \"输入框工具栏；兼容旧 footer、ComposerLayoutFooter CSS Module 与 data-composer-footer-responsive，hash 随版本变化\" },\n    { \"key\": \"home-utility\", \"selector\": \":is([class*=\\\"_homeUtilityBar_\\\"], [class*=\\\"_ComposerHomeUtilityBar_\\\"])\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false, \"notes\": \"CSS Modules 前缀匹配；兼容旧 homeUtilityBar 与 ComposerHomeUtilityBar，模块名跨端稳定、hash 随版本变，禁止匹配完整 hash\" },\n    { \"key\": \"game-source\", \"selector\": \"[data-feature=\\\"game-source\\\"]\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false },\n    { \"key\": \"home-suggestions\", \"selector\": \".group\\\\/home-suggestions\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false },\n    { \"key\": \"project-selector\", \"selector\": \".group\\\\/project-selector\", \"tier\": \"L2\", \"scope\": \"home config\", \"required\": false, \"notes\": \"依赖用户项目配置；win 快照未出现（该机可能未配置项目），不算平台差异\" },\n    { \"key\": \"markdown\", \"selector\": \"[class*=\\\"_markdown\\\"]\", \"tier\": \"L2\", \"scope\": \"thread\", \"required\": false, \"notes\": \"会话内容块，单页可达 100+ 个，样式规则注意性能\" },\n    { \"key\": \"thread-surface\", \"selector\": \".thread-scroll-container\", \"tier\": \"L2\", \"scope\": \"thread\", \"required\": false, \"notes\": \"会话滚动表面；双端活动会话快照均存在\" },\n    { \"key\": \"message\", \"selector\": \":is([data-message-author-role], [data-local-conversation-user-anchor], [data-local-conversation-final-assistant])\", \"tier\": \"L2\", \"scope\": \"thread\", \"required\": false, \"notes\": \"用户与助手消息的稳定语义边界；兼容旧版 role 属性和 Codex 26.727+ 语义属性。当前全宽 user anchor 在运行时优先映射到内部自适应圆角气泡，找不到气泡时保留旧版 anchor fallback\" },\n    { \"key\": \"settings-panel\", \"selector\": \"[data-settings-panel-slug=\\\"general-settings\\\"]\", \"tier\": \"L2\", \"scope\": \"settings\", \"required\": false, \"notes\": \"Codex 26.727 设置页稳定导航锚点；设置页可先落在 General，不再保证 appearance-theme 或 theme-preview 存在\" },\n    { \"key\": \"appearance-radio\", \"selector\": \"input[name=\\\"appearance-theme\\\"]\", \"tier\": \"L2\", \"scope\": \"settings\", \"required\": false, \"notes\": \"旧版外观三选一；新设置页可能仅有 settings-panel\" },\n    { \"key\": \"overlay-menu\", \"selector\": \"[role=\\\"menu\\\"]\", \"tier\": \"L2\", \"scope\": \"overlay\", \"required\": false },\n    { \"key\": \"overlay-dialog\", \"selector\": \"[role=\\\"dialog\\\"]\", \"tier\": \"L2\", \"scope\": \"overlay\", \"required\": false },\n    { \"key\": \"overlay-popper\", \"selector\": \"[data-radix-popper-content-wrapper]\", \"tier\": \"L2\", \"scope\": \"overlay\", \"required\": false }\n  ],\n  \"removed\": [\n    { \"key\": \"suggestion-item\", \"selector\": \".group\\\\/home-suggestion-list-item\", \"reason\": \"双端全部 22 个实测状态命中 0 次——当前 Codex 版本已无此类；CSS 中引用它的规则为化石，待清理\" }\n  ],\n  \"stableTestids\": [\"app-shell-header-context-menu-surface\", \"home-icon\", \"theme-preview\"],\n  \"notes\": [\n    \"锚点优先级：data-testid > role/语义标签 > 稳定类名 > CSS Modules 前缀；禁止精确 hash 与纯结构路径\",\n    \"首页渐进渲染：L2 home 锚点必须容忍晚到，找不到 = 暂不精修，不得阻断 L0/L1\",\n    \"跨端适配 = 版本管理：同版本双端 DOM 同源；升级 Codex 后先跑 doctor 对本清单，再决定是否改适配\"\n  ]\n}\n","frontmatter":{"schema":"codex-dream-skin-selectors/1","description":"双端统一选择器契约。scope 与 required 来自双端 DOM 快照实测；shell-main 与 header-tint 另由 2026-07-31 Codex 26.727.40816 真实 macOS renderer 复核。doctor / CI 应逐条 querySelector 并按 tier 判级：L1 缺失=皮肤主行为受损，L2 缺失=精修静默降级。","verifiedAgainst":{"date":"2026-09-26","codexVersions":[{"version":"26.924.22138","platform":"macos","evidence":"reporter: issue #415 / #414 报告 26.924 下主区会话与输入框不可见；本机在隔离 CODEX_HOME 与独立 user-data-dir 的 Codex 26.924.22138 renderer 上用 loopback CDP 复现，逐条二分定位到该规则；补丁后 thread 滚动容器与 composer 恢复渲染"},{"version":"26.818","platform":"windows","evidence":"reporter: #378 本机已验证补丁与 #373 @QingYe-05 的实机源码证据；v1.5.16 据此扩展 composer / Markdown / message 绑定，维护者未做本机 renderer 复核"},{"version":"26.814.41407","platform":"macos","evidence":"reporter: #373 @GreenLv 的 loopback CDP 只读 DOM 与样式读数，确认 _ComposerLayoutRoot_ 是真实输入框壳、_ComposerLayoutFooter_ 只是其内层 footer"},{"version":"26.814.5517.0","platform":"windows","evidence":"reporter: #376 复现环境；该版本设置页外观切换后的混色问题仍未修复，settings/appearance 路径未验证"},{"version":"26.803.10989.0","platform":"windows","evidence":"reporter: #363 实机探测（Chromium 151.0.7922.76）；受管 --user-data-dir 下 CDP、app://-/index.html renderer 与真实主题注入验证全部通过"},{"version":"26.803","platform":"both","evidence":"reporter: #359 Owl composer 布局报告；_ComposerLayoutBody_ / _ComposerLayoutFooter_ / _ComposerHomeUtilityBar_ 前缀别名已并入合同"},{"version":"26.727.40816","platform":"macos","evidence":"maintainer: 已签名 macOS app 的 live app:// renderer 实测复核（Chromium 150.0.7871.182），shell-main 与 header-tint 逐条 querySelector"},{"version":"26.715.61943","platform":"macos","evidence":"fixture: runtime/dom-fixtures/codex-dom-fixture-darwin-watch.json（15 状态，Chromium 150.0.7871.124）"},{"version":"unrecorded","platform":"windows","evidence":"fixture: runtime/dom-fixtures/codex-dom-fixture-win32-watch.json（7 状态）；bundle hash 与 mac 不同（ModelPickerTrigger mac=1fm6a win=1w4ob），确认双端存在版本错位"}],"verdict":"双端运行时继续共用一份 selector/CSS 合同。26.727.40816 起主表面与顶栏的旧语义类改为 CSS Modules，26.803~26.818 又把输入框壳迁到 _ComposerLayoutRoot_；合同的做法始终是保留旧锚点、追加稳定属性或模块名前缀，绝不匹配完整 hash。注意 26.803 之后每一条证据都来自报告者，维护者没有对应平台的本机 renderer 复核——不要把它们当成与 26.727 同等强度的验收。","gaps":["Windows 26.727 之后至今没有维护者本机 renderer 复核","#376：26.814.5517.0 上 Codex 设置→外观切换深浅色后主题混色，settings/appearance 路径的锚点行为未验证","#371：Windows 顶部与底部区域配色与主区不一致，尚未确认是 header-tint 未命中还是原生层未被覆盖"]},"appearanceSignal":{"dark":"html.electron-dark","light":"html.electron-light","warning":"html.electron-opaque 随窗口聚焦/毛玻璃状态闪动，与明暗无关，禁止用作外观信号"},"scopeVocabulary":{"all":"除设置页外的全部路由（home / thread / detail）及其上的 menu / dialog 覆盖层","home":"首页（建议卡屏）。注意首页渐进渲染：home-icon 先出现，utility bar 可晚 1~2 秒","thread":"会话/任务页（含 markdown 内容）","settings":"设置页。mac 26.715.61943 实测设置页替换整个 shell（main/侧栏/header 全部消失）；win 实测设置页保留 shell。皮肤不得假设二者其一，锚点缺失时降为 L0","overlay":"菜单 / 弹窗 / popper 浮层","config":"依赖用户配置才出现（如未配置项目则无项目选择器）"},"selectors":[{"key":"shell-main","selector":"main:is(.main-surface, [data-app-shell-main-surface], [class*=\"_MainContentSurface_\"])","tier":"L1","scope":"all","required":true,"notes":"全局主表面。26.727.40816 提供 data-app-shell-main-surface，并使用 _MainContentSurface_ CSS Module；保留旧类兼容历史版本，前缀只限定在 main 元素。mac 设置页缺失（win 存在），缺失时整页仅 L0"},{"key":"left-panel","selector":"aside.app-shell-left-panel","tier":"L1","scope":"all","required":true,"notes":"左侧栏；收起/重建时会移除节点，勿在其消失时清皮"},{"key":"header-tint","selector":"header:is(.app-header-tint, [data-app-shell-header-edge-scroll], [class*=\"_Header_\"])","tier":"L1","scope":"all","required":true,"notes":"顶栏。26.727.40816 输出 data-app-shell-header-edge-scroll 并使用 _Header_ CSS Module；保留旧类兼容历史版本，前缀只限定在 header 元素。皮肤不得覆盖其 position/z-index（既有回归约束）"},{"key":"main-content-top-fade","selector":":is(.app-shell-main-content-top-fade, [data-app-shell-main-content-top-fade]:not(:has(*)), [class*=\"_MainContentTopFade_\"])","tier":"L2","scope":"all","required":false,"notes":"主区顶部渐变遮罩。26.727.40816 提供 data-app-shell-main-content-top-fade 并使用 _MainContentTopFade_ CSS Module；用于在主题背景下移除原生白色 fade。26.924 把该属性从遮罩层移到了包裹整条路由的容器上，裸属性会连带命中 thread 滚动容器与 composer，导致任意会话右栏空白（#415/#414）。属性形式因此限定为无子元素的原生遮罩层，两个旧 class 形式保持不变"},{"key":"home-icon","selector":"[data-testid=\"home-icon\"]","tier":"L1","scope":"home","required":true,"notes":"首页判定信号，双端一致"},{"key":"home-route","selector":"[role=\"main\"]:has([data-testid=\"home-icon\"])","tier":"L1","scope":"home","required":true,"notes":"首页容器。实测 [role=main] 仅存在于首页——它不是通用路由锚点，thread 页没有"},{"key":"home-route-css","selector":"[role=\"main\"]","tier":"L1","scope":"home","required":true,"notes":"home-route 的 CSS 可组合别名：不含 :has()。CSS 禁止 :has() 嵌套，home-route 原选择器一旦写进 :has()/:not(:has()) 整条规则会被解析器丢弃（v1.3.1 全窗口首页与任务页氛围背景因此失效）。依据与 home-route 相同的实测：[role=main] 仅存在于首页；该锚点缺失时 CSS 路由门控整体失效，故必须按 L1 必需项监控"},{"key":"home-banners","selector":".home-banners","tier":"L2","scope":"home","required":false,"notes":"Codex 26.721+ 新增的原生首页 banner 插槽，位于 home-route 第一个子节点内、通常为空（0 子节点）靠原生 empty:hidden 折叠。真正的首页内容（标题/建议卡/输入框）在这个版本上已变成该插槽外层容器的兄弟节点，不再是它的后代（见 #244 实测：home-route > div:first-child 被撑到 100% 高度会把内容挤出视口）。用于判定新旧 home DOM 形态，皮肤据此把 first-child 链路的强制尺寸限定在旧形态或改走兄弟节点"},{"key":"composer-chrome","selector":":is(.composer-surface-chrome, [class*=\"_ComposerLayoutRoot_\"], [data-composer-surface-variant][data-composer-radius-variant])","tier":"L2","scope":"home+thread","required":false,"notes":"输入框视觉壳。兼容旧语义类、26.814 ComposerLayoutRoot CSS Module 与稳定 surface/radius 语义属性；hash 随版本变化。win 实测存在无 composer 的 detail 路由，不可当全局锚点"},{"key":"composer-toolbar","selector":":is(.composer-surface-chrome [class*=\"_footer_\"], [class*=\"_ComposerLayoutRoot_\"] [class*=\"_ComposerLayoutFooter_\"], [data-composer-surface-variant][data-composer-radius-variant] :is([data-composer-footer-responsive], [class*=\"_ComposerLayoutFooter_\"], [class*=\"_footer_\"]))","tier":"L2","scope":"home+thread","required":false,"notes":"输入框工具栏；兼容旧 footer、ComposerLayoutFooter CSS Module 与 data-composer-footer-responsive，hash 随版本变化"},{"key":"home-utility","selector":":is([class*=\"_homeUtilityBar_\"], [class*=\"_ComposerHomeUtilityBar_\"])","tier":"L2","scope":"home","required":false,"notes":"CSS Modules 前缀匹配；兼容旧 homeUtilityBar 与 ComposerHomeUtilityBar，模块名跨端稳定、hash 随版本变，禁止匹配完整 hash"},{"key":"game-source","selector":"[data-feature=\"game-source\"]","tier":"L2","scope":"home","required":false},{"key":"home-suggestions","selector":".group\\/home-suggestions","tier":"L2","scope":"home","required":false},{"key":"project-selector","selector":".group\\/project-selector","tier":"L2","scope":"home config","required":false,"notes":"依赖用户项目配置；win 快照未出现（该机可能未配置项目），不算平台差异"},{"key":"markdown","selector":"[class*=\"_markdown\"]","tier":"L2","scope":"thread","required":false,"notes":"会话内容块，单页可达 100+ 个，样式规则注意性能"},{"key":"thread-surface","selector":".thread-scroll-container","tier":"L2","scope":"thread","required":false,"notes":"会话滚动表面；双端活动会话快照均存在"},{"key":"message","selector":":is([data-message-author-role], [data-local-conversation-user-anchor], [data-local-conversation-final-assistant])","tier":"L2","scope":"thread","required":false,"notes":"用户与助手消息的稳定语义边界；兼容旧版 role 属性和 Codex 26.727+ 语义属性。当前全宽 user anchor 在运行时优先映射到内部自适应圆角气泡，找不到气泡时保留旧版 anchor fallback"},{"key":"settings-panel","selector":"[data-settings-panel-slug=\"general-settings\"]","tier":"L2","scope":"settings","required":false,"notes":"Codex 26.727 设置页稳定导航锚点；设置页可先落在 General，不再保证 appearance-theme 或 theme-preview 存在"},{"key":"appearance-radio","selector":"input[name=\"appearance-theme\"]","tier":"L2","scope":"settings","required":false,"notes":"旧版外观三选一；新设置页可能仅有 settings-panel"},{"key":"overlay-menu","selector":"[role=\"menu\"]","tier":"L2","scope":"overlay","required":false},{"key":"overlay-dialog","selector":"[role=\"dialog\"]","tier":"L2","scope":"overlay","required":false},{"key":"overlay-popper","selector":"[data-radix-popper-content-wrapper]","tier":"L2","scope":"overlay","required":false}],"removed":[{"key":"suggestion-item","selector":".group\\/home-suggestion-list-item","reason":"双端全部 22 个实测状态命中 0 次——当前 Codex 版本已无此类；CSS 中引用它的规则为化石，待清理"}],"stableTestids":["app-shell-header-context-menu-surface","home-icon","theme-preview"],"notes":["锚点优先级：data-testid > role/语义标签 > 稳定类名 > CSS Modules 前缀；禁止精确 hash 与纯结构路径","首页渐进渲染：L2 home 锚点必须容忍晚到，找不到 = 暂不精修，不得阻断 L0/L1","跨端适配 = 版本管理：同版本双端 DOM 同源；升级 Codex 后先跑 doctor 对本清单，再决定是否改适配"]},"isInternal":false,"tokens":4104,"sizeBytes":12232},{"name":"openai.yaml","path":"windows/agents/openai.yaml","rawUrl":"https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/windows/agents/openai.yaml","title":"Agents Skill","category":"anthropic-skill","format":"yaml","content":"interface:\r\n  display_name: \"Codex Dream Skin\"\r\n  short_description: \"Apply and safely restore the full pink-purple Codex skin\"\r\n  default_prompt: \"Use $codex-dream-skin to apply, verify, update, or restore the full Codex desktop skin.\"\r\n","isInternal":false,"tokens":58,"sizeBytes":238},{"name":"qa-inventory.md","path":"windows/references/qa-inventory.md","rawUrl":"https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/windows/references/qa-inventory.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# QA inventory\n\n## User-visible claims\n\n1. The home screen paints one UI-free wallpaper continuously across sidebar and main content, with a live native heading, the real project utility/composer surface, and any suggestion cards rendered by the current Codex host.\n2. Sidebar, main area, header, and composer use coordinated readability layers; home remains expressive while normal task routes use a stronger quiet veil.\n3. All real Codex controls remain interactive; the skin is not a screenshot overlay.\n4. The skin survives route changes and renderer reloads while the injector daemon runs.\n5. The official Store package and `app.asar` remain unchanged.\n6. Restore removes the injected DOM/CSS and install/restore can be repeated.\n7. Restore closes the saved CDP listener before reopening Codex normally.\n\n## Functional checks\n\n- Home feature card: click one card and confirm the real composer is populated or the normal action occurs.\n- Project selector: click the real project chip under the \"选择项目\" label and confirm the native project menu opens.\n- Sidebar: open a real task, then return to New Task.\n- Task side panel: open and close the native thread panel twice, resize the window, and repeat; the toggle must remain visible and clickable.\n- Composer: type text, verify caret/readability, then clear it without sending.\n- Reload: use CDP `Page.reload`, wait, and confirm the injection marker returns.\n- Pet overlay: open a desktop pet and confirm its auxiliary window stays transparent with no skin background or decoration layer behind it.\n- Restore/reapply cycle: remove live skin, verify marker absent, apply again, verify marker present.\n- Update resilience: resolve the current `OpenAI.Codex` Appx location dynamically for launch. A versioned path saved for cleanup must be revalidated against the registered package full/family identity before any process is stopped.\n- Restart consent: an existing normal Codex window is never force-closed without explicit CLI authorization or shortcut confirmation.\n- Shortcut policy: installed launch, restore, tray, and tray-child commands use `RemoteSigned` without `Bypass`; Internet-zone markers are removed only from hash-verified managed PowerShell copies.\n- Config safety: Chinese project names, LF/CRLF choice, quoted target keys, table-header comments, and unrelated TOML sections survive install/selective restore; ambiguous target shapes fail unchanged, exact recovery keeps a copy of the replaced current file, and install refuses both registered and state-recorded old Codex processes.\n- Theme safety: empty/over-10 MB images, over-16384px/50MP dimensions, path escapes, symlinks/junctions, malformed JSON, unsafe CSS, and unsupported formats are rejected before payload construction.\n- Tray lifecycle: pause/resume reflects the clicked state, bundled Arina Hashimoto theme is present on first install, and complete restore terminates any separately launched tray before it can reapply the skin.\n\n## Visual checks\n\n- 1280x820 initial home: the declared focus stays in frame, the text-safe side remains readable, the real project utility row and composer form one coherent surface, and no horizontal scrolling appears.\n- Narrower window: accept Codex's native responsive card reduction or omission; no essential control is covered and wallpaper cropping preserves the focus/safe-area contract.\n- Normal task: the wallpaper is visibly quieter than home, messages keep high contrast, and composer does not overlap content.\n- Inspect the sidebar, header, wallpaper edges, native card labels when present, project utility row, composer controls, scrollbar, dialogs, and menus.\n- Reject black/transparent sidebar artifacts, clipped controls, duplicated/disconnected project labels, rasterized native controls, fake UI inside the wallpaper, weak contrast, or decorations intercepting clicks.\n\n## Exploratory checks\n\n- Start when the debug port is occupied: fail with a clear message or use a caller-selected port.\n- Start after Codex updates: package discovery and injection still work without patching installed files.\n- Tamper `state.json` with a reused PID: if the PID is still live but its identity differs, confirm cleanup fails closed and preserves `state.json`; if the PID is gone, confirm the stale record is replaced only after confirming no process is running, without stopping an unrelated process.\n- Serve a fake `app://` CDP target or remote/mismatched WebSocket URL and confirm both launcher and injector reject it. Reuse the port with a new Browser ID and confirm the existing watcher exits without reconnecting.\n- Force verification failure and confirm the injector, state file, and newly launched debug session are rolled back.\n- Start two operations concurrently and confirm the second fails clearly without changing config, state, or processes.\n- Close Codex without restore and confirm the Browser identity anchor closes and the watcher exits without reconnecting or rapidly growing logs.\n\n## Automated checks\n\n- `tests/run-tests.ps1`: strict UTF-8/no-BOM writes, UTF-16 rejection, LF/CRLF preservation, concurrent-write detection, exact backup/recovery, `[desktop]`-scoped restore, ambiguous TOML rejection, non-ASCII paths, Appx/state identity, argument quoting, theme seeding/import/save/switch/pause, canonical community-link and compatible-metadata rejection, fixed-origin download/apply boundaries, byte/dimension limits, junction rejection, payload construction, Browser ID, loopback URL rejection, and renderer isolation for transparent auxiliary windows.\n- `node --check` for the injector and renderer payload.\n- Live Windows signoff remains required for Store process ownership, restart consent, screenshot, and CDP closure.\n","isInternal":false,"tokens":1133,"sizeBytes":5722},{"name":"runtime-notes.md","path":"windows/references/runtime-notes.md","rawUrl":"https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/windows/references/runtime-notes.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# References Skill\n\nPath: `windows/references/runtime-notes.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/windows/references/runtime-notes.md)","tokens":300,"sizeBytes":195},{"name":"SKILL.md","path":"windows/SKILL.md","rawUrl":"https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/windows/SKILL.md","title":"codex-dream-skin","category":"anthropic-skill","format":"markdown","content":"---\nname: codex-dream-skin\ndescription: Apply, launch, verify, repair, update, or restore a full decorative skin for the Windows Codex desktop app. Use when the user asks for a Codex theme that goes beyond official color settings, wants the pink-purple Dream/Fiona-style interface, needs the skin reapplied after a Codex update, or needs a safe rollback without modifying WindowsApps or app.asar.\n---\n\n# Codex Dream Skin\n\nApply a reversible renderer skin through Chromium DevTools Protocol while launching the official Store-installed Codex executable. Never replace or take ownership of files under `WindowsApps`.\n\n## Workflow\n\n1. Install Node.js 22 or newer, close Codex, then run `scripts/install-dream-skin.ps1` once. The installer preserves the user's native appearance settings, seeds the Arina Hashimoto theme, copies the runtime to `%LOCALAPPDATA%\\CodexDreamSkin\\engine`, and creates launch/restore/tray shortcuts that do not depend on the source checkout.\n2. Use the `Codex Dream Skin` shortcut, or run `%LOCALAPPDATA%\\CodexDreamSkin\\engine\\scripts\\start-dream-skin.ps1`. The shortcut asks before restarting an already-open Codex app; CLI callers must explicitly add `-RestartExisting`.\n3. Run `scripts/verify-dream-skin.ps1 -ScreenshotPath <absolute-path>` after launch. Treat a missing continuous wallpaper, home shell, native composer, sidebar layer, or injection marker as failure. The native suggestion count is responsive and may be two to four.\n4. To add a complete downloaded pack, use the tray's “导入主题 ZIP…”. Accept ordinary `.zip` only. Every new official Studio pack contains `manifest.json`, non-empty `theme.json`, non-empty locally validated `theme.css`, exactly one registered background, and optional license/signature files; the trusted local simplified format contains exactly `theme.json`, `theme.css`, and its referenced image. Import into saved themes without changing the active theme. A manually extracted complete three-file directory may instead be moved into the saved themes folder. Previously saved legacy themes without CSS remain switchable but inject no extra CSS.\n5. A compatible DreamSkin.cc theme can use the exact `dreamskin://apply?version=ver_...` link registered by Setup.exe. The handler always obtains approved metadata and the ZIP from the fixed API, requires `applyCompatible: true`, shows a native confirmation, verifies byte count and SHA-256, then reuses the strict importer before applying. It never accepts an arbitrary URL/path/command or a silent-apply flag.\n6. Inspect the screenshot against `references/qa-inventory.md`. Verify both the home screen and a normal task before signing off.\n7. Run `scripts/restore-dream-skin.ps1` to remove the live skin, close the saved CDP session, and reopen Codex normally. Add `-RestoreBaseTheme` to restore only saved appearance keys, `-RecoverConfigBackup` for explicit byte-for-byte recovery of a damaged config, or `-Uninstall` to delete shortcuts. A completed config restore archives that install's backup so a later install captures a fresh baseline.\n\n## Guardrails\n\n- Preserve the official executable, package signature, user threads, pets, plugins, and authentication state.\n- Theme images must be UI-free wallpapers. Never import a README screenshot, fake window, sidebar, card, composer, logo, or text baked into the bitmap.\n- Paint one continuous 16:9 wallpaper across the full Codex window. Let the sidebar, main area, header, and composer act as coordinated readability layers; keep the home route expressive and task routes quieter.\n- `appearance: auto` follows the native computed `color-scheme` first and the system appearance only as a fallback. Image brightness may tune color and composition, but must not flip the user's shell mode; explicit `light` and `dark` remain authoritative.\n- Attach the \"选择项目\" treatment to Codex's real project-selector toolbar and keep the current project button clickable; never draw a disconnected replacement.\n- Keep decorative layers `pointer-events: none` and keep real buttons, navigation, and composer above them.\n- On app updates, rerun install and launch; the scripts discover the current Appx package dynamically. Saved paths are never trusted for process control unless they still match a registered package identity.\n- Keep manifest-derived package activation as the preferred Windows launch, and always pair remote-debugging switches with the persistent non-default managed CDP profile that Chromium 136+ requires. The exact Store `app\\ChatGPT.exe` fallback is allowed only after visible process arguments prove owl encoded the CDP flag inside `codex://`, and only with the package identity/path checks in `common-windows.ps1`. Preserve the pre-launch PID set during rollback. Treat access denial and raw arguments without a verified listener as terminal. This fallback is diagnostic, not proof of owl compatibility; never change WindowsApps ACLs to make it run.\n- The default launcher scans for a free port when `9335` is occupied. An explicitly requested occupied port fails closed.\n- Keep the injection daemon running for navigation/reload resilience. Its state and logs live under `%LOCALAPPDATA%\\CodexDreamSkin`.\n- The watcher registers a generation-checked early payload for connected renderers so reload/navigation can paint the skin before the normal load-event fallback; unsupported CDP targets fall back safely.\n- The active theme, saved themes, imported images, pause marker, and tray controls live under `%LOCALAPPDATA%\\CodexDreamSkin`. Reject empty or over-10 MB images before copying or encoding them.\n- Theme-pack import does not support `.dreamskin`; reject traversal, links/reparse entries, nested archives, ambiguous roots, Windows-reserved paths, size/count abuse, and packs that fail the existing theme/image payload checks.\n- Community deep links accept only a canonical version ID. Reject redirects, non-approved or non-compatible metadata, mismatched IDs, non-boolean compatibility, unsafe display metadata, unexpected media types, byte/hash mismatches, and concurrent applies before changing the active theme.\n- Every managed-store write rejects junctions and other reparse points in every existing path component. Imports also use the bundled Node metadata parser before copying to reject dimensions above 16384px or 50MP.\n- CDP targets must use a same-port loopback WebSocket, belong to the current Store package, retain the launch-time Browser ID, and expose expected Codex renderer markers.\n- Loopback prevents LAN exposure, but Chromium CDP has no same-user authentication. Run only trusted local software while the skin is active, and use restore to close the debug session when it is no longer needed.\n- Preserve `config.toml` as strict UTF-8. Never use encoding-dependent whole-file PowerShell reads/writes, silently transcode UTF-16, or overwrite a file that changed after it was read. Ambiguous TOML shapes must fail before writing rather than receive a best-effort rewrite.\n- Keep install/start/restore/verify serialized with the per-user operation lock in `common-windows.ps1`.\n- Treat `%LOCALAPPDATA%\\CodexDreamSkin\\engine` as an installer-managed runtime. Exit the Dream Skin tray before reinstalling so the installer can replace that runtime atomically and update every shortcut to the same copy.\n- Keep installed shortcuts and tray child processes on `RemoteSigned`, never `Bypass`. Clear Internet-zone markers only from staged managed `.ps1` copies after their byte-content hashes match the selected source; never change the user's persistent execution policy or override Group Policy.\n\n## Checks\n\n```powershell\npowershell -NoProfile -File tests\\run-tests.ps1\nnode --check scripts\\injector.mjs\nnode --check assets\\renderer-inject.js\n```\n\n## Resources\n\n- `scripts/injector.mjs`: CDP connection, renderer injection, verification, screenshot, and removal.\n- `scripts/common-windows.ps1`: Store-package discovery, Node validation, managed runtime installation, port ownership, state, and process identity safety.\n- `scripts/config-utf8.ps1`: atomic UTF-8 configuration backup, selective restore, and explicit recovery.\n- `assets/dream-skin.css`: full visual layer.\n- `assets/renderer-inject.js`: idempotent DOM integration and cleanup.\n- `assets/dream-reference.jpg`: pure 2560 × 1440 Arina Hashimoto wallpaper seeded as the default and as a saved theme; it contains no Codex UI.\n- `assets/theme.json`: shared adaptive theme contract for the seeded preset.\n- `scripts/theme-windows.ps1`: persistent active/saved theme store, safe image import, pause state, and preset seeding.\n- `scripts/apply-community-theme.ps1`: fixed-origin, confirmed community download, integrity verification, strict ZIP import, apply, and rollback orchestration.\n- `scripts/tray-dream-skin.ps1`: Windows Forms tray for apply, pause, import, save, switch, and complete restore.\n- `references/qa-inventory.md`: required functional and visual signoff coverage.\n- `references/runtime-notes.md`: troubleshooting and update behavior.\n- `tests/run-tests.ps1`: managed runtime, configuration, state, recovery, payload, and CDP validation regression checks. Use `-EngineOnly` for the source-independence contract.\n","frontmatter":{"name":"codex-dream-skin","description":"Apply, launch, verify, repair, update, or restore a full decorative skin for the Windows Codex desktop app. Use when the user asks for a Codex theme that goes beyond official color settings, wants the pink-purple Dream/Fiona-style interface, needs the skin reapplied after a Codex update, or needs a safe rollback without modifying WindowsApps or app.asar."},"isInternal":false,"tokens":1915,"sizeBytes":9195}],"systemPromptSnippet":"<yakaai_skills repo=\"Fei-Away/Codex-Dream-Skin\">\n<!-- File: AGENTS.md (Tokens: ~2795 | Category: root-instruction) -->\n# Codex Dream Skin Agent Guide\n\n本文件适用于仓库根目录及全部子目录。平台目录中的 `SKILL.md` 提供运行时操作细节；与本文件冲突时，优先遵守更严格的安全和发布要求。\n\n## 开始任务\n\n- 先阅读根目录 README、**最新的 `docs/handoff-*.md`**、相关平台文档、当前分支状态和目标文件，不凭记忆推断现状。交接文档是了解当前状态最快的入口：`main` 上有哪些已合并但未发布的提交、哪些事卡在外部确认、以及本机做不了哪些验证。\n- 中大型任务必须建立或更新根目录 `TASK_PROGRESS.md`。记录目标、范围、当前分支或 worktree、已完成项、进行中项、阻塞、测试结果、PR、合并及 Release 状态。\n- 在每个里程碑、任务切换、出现阻塞、准备交接以及上下文可能压缩前更新 `TASK_PROGRESS.md`。内容必须可让新 Agent 直接续做，不只写“处理中”。\n- `TASK_PROGRESS.md` 是本地连续性文件，不提交密钥、令牌、Webhook、个人路径中的隐私数据或未经确认的生产配置。\n- `TASK_PROGRESS.md`、`.local-evidence/` 等任务流水与本机证据只保留本地，禁止提交；`main` 文件树不得包含 `TASK_PROGRESS.md`。已跟踪的进度文件须取消跟踪并保留本地副本。\n\n## 优先级\n\n1. P0：安全问题、数据损坏、不可恢复卸载、错误发布、公开密钥和供应链风险。\n2. P1：用户无法安装、启动、恢复、导入或应用主题，以及发布版本与代码不一致。\n3. P2：兼容性、性能、交互和可维护性改进。\n4. P3：文档润色和非阻塞清理。\n\n- 最新的明确用户指令可以调整当前优先级。插入高优任务时，先把被中断任务的精确状态写入 `TASK_PROGRESS.md`。\n- 不把待定事项擅自升级为前置条件，也不把无关 Issue 或 PR 拉入当前范围。\n\n## 多 Agent 协作\n\n- 中大型且可独立拆分的任务默认并行分给多个 Agent；每个子任务必须有清晰边界、输入、允许的写入范围和验收条件。\n- 主 Agent 负责计划、冲突协调、最终集成、回归测试和事实核对。子 Agent 的“完成”不能代替主 Agent 验收。\n- 多个写入任务优先使用独立分支或 worktree。所有 Agent 共享文件系统，编辑前必须检查现有改动，禁止覆盖、回滚或顺手提交他人的工作。\n- 同一文件由一个 Agent 负责写入；无法避免时先协调所有权。只读审计可以并行，但不能伪装成已经实现或验证。\n- 页面或原生交互需要实机证据时使用项目指定的浏览器或原生测试工具；工具不可用必须明确记录缺口。\n\n## 进度与事实表述\n\n- 严格区分：本地实现、已测试、已提交、已推送、PR 已开、PR 已合并、tag 已创建、Release 已发布、用户已可下载。\n- `merged != released`。只有 GitHub Release 已公开、目标版本资产存在且可下载，才能说“已发布”。\n- 只有安装包实际包含目标代码并完成对应版本验证，才能说用户通过 Release 获得了功能。\n- Issue 只有在修复、证据、回复和状态都核对后才能说“已处理”；受上游限制或证据不足时保持真实状态。\n\n## 主题 ZIP 合同\n\n- 客户端只导入普通 `.zip`，不支持 `.dreamskin`，也不接受仅修改扩展名的伪装文件。\n- 新主题必须同时包含非空 `theme.json`、非空 `theme.css` 和 `theme.json` 引用的唯一背景图；三者缺一不可。\n- 背景图最大 10 MiB，并继续执行像素、尺寸、媒体魔数和解码校验。前端、Studio、服务端和双端客户端的限制必须一致。\n- 正式 Studio 包还必须校验 `manifest.json` 的平台、最低客户端版本、注册文件集合、字节数和 SHA-256。未知文件、重复路径、路径穿越、链接、reparse、嵌套归档、压缩炸弹和歧义根目录必须 fail closed。\n- `theme.css` 在导入时和每次应用时都必须通过共享 Safe CSS 策略，只允许作用于登记的公开主题部件。不得为新导入包增加旧主题兼容旁路。\n- 导入成功只写入“已保存主题”库，不自动切换活动主题，也不覆盖 last-known-good。用户必须在菜单中明确选择后才应用。\n- 手动移动目录仅用于可信、已解压的完整三文件主题；不得把它描述为与受限 ZIP 导入器同等安全。\n\n## 实现与测试\n\n- 优先复用 `runtime/` 的共享源，通过现有同步工具生成双端资产；不要直接制造 macOS、Windows 漂移。\n- 版本发布必须同步 `macos/VERSION`、`windows/VERSION`、`macos/package.json`、`macos/scripts/common-macos.sh`、`macos/scripts/injector.mjs` 和 `windows/scripts/injector.mjs`，并更新绑定当前版本的断言。\n- 修改主题 schema、manifest、Safe CSS、导入或提取逻辑时，必须覆盖合法包、缺件、空文件、边界大小、哈希不符、路径攻击、链接、嵌套归档、压缩滥用、重复导入和 ID 冲突。\n- 修改共享 renderer 或 CSS 时，运行同步校验和双端 payload 检查；不得只验证一个平台副本。\n- macOS 相关改动至少运行适用的 Node、shell 语法和 Swift 测试；Windows 相关改动至少运行适用的 Node 与 PowerShell 测试。无法在本机执行的平台测试必须交给 CI 并明确说明。\n- 发布前必须通过版本一致性、仓库 CI、DMG/Setup 构建与挂载或静态校验，并对原生文件选择器、ZIP 导入、已保存主题切换和真实 Codex 渲染做 smoke test。\n- 不为追求绿色测试降低安全断言、跳过失败用例或把真实失败改成无条件 skip。\n\n## Git 与发布\n\n- Write all new commit messages in English, including squash/merge commit titles and bodies.\n- 每次发布遵循 [`docs/releases/README.md`](docs/releases/README.md)：版本 PR 必须包含中文 `docs/releases/vX.Y.Z.md` 和完整英文 `docs/releases/vX.Y.Z-en.md`，顶部互链；以用户可感知的新增、修复和升级说明为先，附贡献者与完整变更链接；Release 展示中文正文，下载信息由工作流追加。\n\n- 保留用户现有改动；禁止未经授权的 reset、checkout 丢弃、强推、移动已公开 tag 或覆盖已公开 Release。\n- 功能开发、版本准备和紧急修复使用独立分支；提交只包含当前范围，推送前审查 staged diff。\n- 客户端发布由 `main` 上的版本变化驱动。版本未变化的普通合并不得重复构建或覆盖 Release。\n- Issue 修复的 PR 合并、CI 转绿后，同一轮工作里直接完成版本号提升（含六处版本一致）与 Release 触发，并在关闭 Issue 的评论中写清根因、修复提交与验证方式；不要把\"已修复\"停在合并这一步、让发布和关闭 Issue 变成另一次单独请求才做的事。\n- 自动发布必须验证六处版本一致、版本递增、tag 与发布提交一致、目标 Release 尚未公开。失败后的 `workflow_dispatch` 只能幂等重试同一 tag 和提交。\n- 构建资产必须来自 tag 对应提交。发布前核对 DMG、Setup.exe、`SHA256SUMS.txt` 的文件名、非空大小和摘要；发布后再次核对 Release 为公开状态且三个资产齐全。\n- 发布失败时保留可诊断状态，不把不完整资产标记为成功，也不通过重用旧版本号规避更新检测。\n\n## 安全边界\n\n- 不提交 GitHub token、Cloudflare 凭据、飞书或邮件 Webhook、签名私钥、用户数据和本机状态文件。示例只能使用明确占位符。\n- 使用最小 GitHub Actions 权限并固定第三方 Action 的完整 commit SHA。发布写权限只授予需要创建 tag 或 Release 的 job。\n- 不修改官方 Codex/ChatGPT 的 `app.asar`、签名、系统 ACL 或受保护安装目录；不要求关闭 Gatekeeper、Defender、SmartScreen 或执行 `ExecutionPolicy Bypass`。\n- 安装、升级和卸载必须保留原子 staging、备份与回滚，验证目标身份后才操作进程或路径。拒绝不可信符号链接和路径重定向。\n- 对外部包、网络响应和状态文件使用有界读取、严格 schema、内容校验和 fail-closed 行为；日志和错误信息不得泄露凭据或私人路径内容。\n\n<!-- File: macos/agents/openai.yaml (Tokens: ~65 | Category: anthropic-skill) -->\ninterface:\n  display_name: \"Codex Dream Skin Studio\"\n  short_description: \"Turn a personal image into a reversible macOS Codex theme\"\n  default_prompt: \"Use $codex-dream-skin-studio to install, customize, verify, or restore my macOS Codex theme without modifying the official app.\"\n\n<!-- File: macos/references/acceptance-report-2026-07-15.md (Tokens: ~364 | Category: anthropic-skill) -->\n# Acceptance report — 2026-07-15\n\n## Result\n\nCodex Dream Skin Studio `1.0.0` passed its macOS release checks on the live Codex desktop app during the original private release validation.\n\n- macOS architecture: `arm64`\n- Codex version: `26.707.72221`\n- Codex signing Team ID: `2DC432GLL2`\n- Codex bundled Node.js: `v24.14.0`\n- CDP endpoint: loopback port `9341`\n- Official app deep signature after installation: valid\n- `app.asar` modification: none\n\n## Automated result\n\n`tests/run-tests.sh` passed syntax, default and custom payload, exact TOML theme-setting round trip, missing-`HOME` recovery, signed runtime, and doctor checks.\n\nLive doctor returned `pass: true`, `officialAppSignatureValid: true`, `modifiesAppAsar: false`, and `live: true`.\n\nLive renderer verification returned `pass: true` after `Page.reload`:\n\n- injected version `1.0.0`;\n- style and decorative chrome present;\n- decorative chrome `pointer-events: none`;\n- native sidebar and composer visible;\n- no horizontal document overflow;\n- home banner visible with native suggestion cards and project selector.\n\n## Evidence note (open-source tree)\n\nPrivate release builds included CDP screenshots under `docs/screenshots/`. Those captures may contain third-party UI chrome and demo art and are **not** shipped in this public tree. Reproduce evidence on your machine:\n\n```bash\n~/.codex/codex-dream-skin-studio/scripts/verify-dream-skin-macos.sh \\\n  --reload --screenshot \"$HOME/Desktop/Codex Dream Skin Verification.png\"\n```\n\n<!-- File: macos/references/asset-provenance.md (Tokens: ~132 | Category: anthropic-skill) -->\n# Asset provenance\n\n## Bundled demo hero\n\n- File: `assets/portal-hero.png`\n- SHA-256: `cec7a03d1ca8f60add2bfb7d3fcd3fe29225ffeb3f68f98301f140535c470ac5`\n- Created: 2026-07-15 via gpt-image-2 (fuck.codexapis.com)\n- Purpose: default banner / task background preset for light red-white product hero\n- Rights: generated for this project theme pack\n\n## User themes\n\nImages chosen through Customize belong to the user (or their licensors).\n\n<!-- File: macos/references/incident-review.md (Tokens: ~235 | Category: anthropic-skill) -->\n# Implementation incident review\n\nThe working theme initially failed intermittently despite correct CSS. The final project incorporates the following fixes:\n\n- macOS LaunchServices discarded Chromium debugging flags. The launcher now starts the official executable through a user-level `launchd` job.\n- `launchd` jobs did not reliably inherit `HOME`. Shared shell code resolves the current user's home directory when the variable is missing.\n- Two shell helpers returned the status of their final conditional expression, reporting failure after successful work. Successful helper paths now return explicitly or end with successful commands.\n- The home-suggestion selector was under-escaped inside a CDP JavaScript string. Verification now resolves `.group\\\\/home-suggestions` correctly and must return `pass: true`.\n- A Computer Use child process could inherit the CDP listener. Port ownership now accepts the official Codex process and verified descendants, while rejecting unrelated listeners.\n- A large bundled Node binary made GitHub delivery impractical. Version 1.0.0 validates and reuses Codex's own signed Node instead.\n- Static preview images were not accepted as release evidence. Final signoff requires JSON from the live DOM verifier plus a CDP screenshot.\n\n<!-- File: macos/references/qa-inventory.md (Tokens: ~638 | Category: anthropic-skill) -->\n# QA inventory\n\n## Required user-visible behavior\n\n1. Home route paints one continuous wallpaper across sidebar and main content, with a live native heading, the real project utility row/composer, and any native suggestion cards exposed by the current Codex version.\n2. Normal tasks show the selected image behind restrained gradients and translucent live content surfaces.\n3. Sidebar, navigation, messages, approvals, project selector, attachments, composer, menus, hover, focus, and keyboard input remain native and interactive.\n4. Decorative layers have `pointer-events: none`; no screenshot or raster UI is used as an overlay.\n5. Route changes, renderer reloads, and ordinary refreshes reapply the current theme while the verified injector runs.\n6. Official application signature and `app.asar` remain unchanged.\n7. Restore removes live DOM/CSS, restores the two saved base-theme values, closes the CDP session after restart, and supports later reinstallation.\n\n## Automated checks\n\n- Shell and JavaScript syntax checks.\n- Payload construction with bundled demo and an isolated custom theme.\n- Reject unsupported theme config, unsafe image paths, invalid colors, oversized images, non-loopback WebSocket URLs, and unrecognized renderer targets.\n- Exact install/restore round trip for the two TOML settings while preserving unrelated values.\n- Empty `HOME` recovery.\n- Official app and internal Node signature, Team ID, architecture, and version validation.\n- Port collision selection and saved-port reuse.\n- PID reuse protection through PID, start time, executable, script path, and command-line matching.\n- Live verification after `Page.reload` returns version `1.2.0` and `pass: true`.\n- Strict home verification requires a visible wallpaper composition region of at least 320×160, composer, sidebar, non-interactive decoration, and no horizontal overflow. Suggestion cards and the standalone project button are optional only when the current Codex host does not render them.\n\n## Visual checks\n\n- Home at normal desktop size: the subject stays clear of the text-safe area, text remains live, native cards are not clipped when present, and the merged project/composer surface does not overlap content.\n- Narrower window: wallpaper cropping preserves the declared focus and safe area before essential controls are compressed.\n- Task route: background remains atmospheric, messages and output panels keep high contrast, and the composer remains reachable.\n- Task side panel: open and close the native thread panel twice, resize the window, and repeat; the toggle remains visible and clickable.\n- Selected image contains no fake interface controls or raster text intended to impersonate Codex.\n- Inspect sidebar selection, header, wallpaper edges, cards, project utility row, composer buttons, scrollbars, focus outlines, dialogs, and menus.\n\n## Release signoff\n\n- Run `tests/run-tests.sh` successfully.\n- Install from a clean extracted copy with no global Node.js.\n- Complete install → live verify → reload verify → restore → reinstall.\n- Capture a real CDP screenshot and retain the verifier JSON.\n- Confirm `codesign --verify --deep --strict` still succeeds for the official Codex app.\n- Build ZIP and record SHA-256.\n\n<!-- File: macos/references/runtime-notes.md (Tokens: ~432 | Category: anthropic-skill) -->\n# Runtime notes\n\n- Discover the official `com.openai.codex` bundle on every launch; do not assume an upgrade keeps the same executable internals.\n- Use `Contents/Resources/cua_node/bin/node` from that bundle. Require Node.js 20+, a valid strict code signature, matching architecture, and OpenAI Team ID `2DC432GLL2` on both app and runtime.\n- State readers that can run before a validated launch must establish this runtime identity at their own execution boundary; never treat an inherited `NODE` value as proof of trust.\n- Do not ship a Node binary and do not depend on a globally installed `node` or `npm`.\n- Launch the official executable through a per-user `launchd` job with `--remote-debugging-address=127.0.0.1` and a selected port. LaunchServices may discard Chromium flags.\n- Prefer port `9341`; scan through `9441` on collision and record the selected port in state.\n- Accept CDP only when the listener belongs to the discovered Codex main process or one of its legitimate descendants, the WebSocket URL is loopback-only, and an `app://` renderer exposes expected native shell markers.\n- Treat loopback CDP as locally privileged but unauthenticated. Keep the themed session limited to trusted local use and close the port through a full Restore when finished.\n- Poll page targets and reinject after document loads. A debounced mutation observer plus a low-frequency safety timer handles in-page route changes.\n- Record injector PID, start time, executable, script path, app identity, selected port, and theme directory. Refuse to stop a PID when any required identity differs.\n- Store mutable data under `~/Library/Application Support/CodexDreamSkinStudio`; keep the installed program under `~/.codex/codex-dream-skin-studio`.\n- Back up and restore only `appearanceTheme` and `appearanceDarkCodeThemeId`. Leave `appearanceDarkChromeTheme` and unrelated TOML content untouched.\n- Never modify, replace, unpack, repack, re-sign, or back up `app.asar`.\n\n<!-- File: macos/SKILL.md (Tokens: ~706 | Category: anthropic-skill) -->\n---\nname: codex-dream-skin-studio\ndescription: Install, customize, launch, verify, repair, update, or restore Codex Dream Skin Studio on macOS. Use when a user wants to turn a personal image into one continuous full-window Codex wallpaper with adaptive readability layers while preserving the native interface, or needs safe CDP theme troubleshooting and rollback.\ncompatibility: macOS, official Codex Desktop app, signed bundled Node.js 20 or newer\n---\n\n# Codex Dream Skin Studio\n\nThis file is an optional Codex capability entry. The delivery is a complete standalone project; users do not need to install it as a Skill.\n\n## Workflow\n\n1. Run `Install Codex Dream Skin.command` from the complete project folder.\n2. Run `Customize Codex Dream Skin.command`, choose an image in Finder, and enter a theme name.\n3. To add a complete downloaded pack, use the native menu's “导入主题 ZIP…”. Accept ordinary `.zip` only. Every new official Studio pack contains `manifest.json`, non-empty `theme.json`, non-empty locally validated `theme.css`, exactly one registered background, and optional license/signature files; the trusted local simplified format contains exactly `theme.json`, `theme.css`, and its referenced image. Import into saved themes without changing the active theme. A manually extracted complete three-file directory may instead be moved into the saved themes folder. Previously saved legacy themes without CSS remain switchable but inject no extra CSS.\n4. Verify the live result with `Verify Codex Dream Skin.command`. A pass requires a visible native sidebar and composer, no horizontal overflow, non-interactive decoration, and—on the home route—a continuous wallpaper with live native heading, project controls, and any suggestion cards exposed by the current Codex version.\n5. Restore the official appearance with `Restore Codex Dream Skin.command`.\n\n## Guardrails\n\n- Never modify the official `.app`, `app.asar`, or its code signature.\n- Use the official Codex app's signed Node.js runtime only after validating its signature, Team ID, architecture, and minimum version.\n- Bind CDP to loopback, verify that the listener belongs to Codex, and reject non-Codex renderer targets.\n- Preserve all native cards, navigation, project selectors, task content, composer controls, and keyboard focus.\n- Theme images must be UI-free wallpapers. Paint one 16:9 image continuously across the window; keep home expressive and task routes quieter. `appearance: auto` follows Codex/native or system appearance rather than image brightness.\n- Theme-pack import does not support `.dreamskin`; reject traversal, links, nested archives, ambiguous roots, size/count abuse, and packs that fail the existing theme/image payload checks.\n- Keep decoration at `pointer-events: none`.\n- Require explicit authorization before restarting an already-running Codex instance.\n- Stop an injector only when its recorded PID, executable, command line, and start time all match.\n\n## Key resources\n\n- `README.md`: user installation and customization guide.\n- `scripts/injector.mjs`: CDP connection, injection, removal, verification, and screenshots.\n- `assets/dream-skin.css`: live native interface styling.\n- `assets/renderer-inject.js`: idempotent DOM integration and cleanup.\n- `scripts/doctor-macos.sh`: signed-runtime, payload, and optional live-session self-check.\n- `references/qa-inventory.md`: release and visual acceptance criteria.\n\n<!-- File: tools/selectors.json (Tokens: ~4104 | Category: anthropic-skill) -->\n{\n  \"schema\": \"codex-dream-skin-selectors/1\",\n  \"description\": \"双端统一选择器契约。scope 与 required 来自双端 DOM 快照实测；shell-main 与 header-tint 另由 2026-07-31 Codex 26.727.40816 真实 macOS renderer 复核。doctor / CI 应逐条 querySelector 并按 tier 判级：L1 缺失=皮肤主行为受损，L2 缺失=精修静默降级。\",\n  \"verifiedAgainst\": {\n    \"date\": \"2026-09-26\",\n    \"codexVersions\": [\n      {\n        \"version\": \"26.924.22138\",\n        \"platform\": \"macos\",\n        \"evidence\": \"reporter: issue #415 / #414 报告 26.924 下主区会话与输入框不可见；本机在隔离 CODEX_HOME 与独立 user-data-dir 的 Codex 26.924.22138 renderer 上用 loopback CDP 复现，逐条二分定位到该规则；补丁后 thread 滚动容器与 composer 恢复渲染\"\n      },\n      {\n        \"version\": \"26.818\",\n        \"platform\": \"windows\",\n        \"evidence\": \"reporter: #378 本机已验证补丁与 #373 @QingYe-05 的实机源码证据；v1.5.16 据此扩展 composer / Markdown / message 绑定，维护者未做本机 renderer 复核\"\n      },\n      {\n        \"version\": \"26.814.41407\",\n        \"platform\": \"macos\",\n        \"evidence\": \"reporter: #373 @GreenLv 的 loopback CDP 只读 DOM 与样式读数，确认 _ComposerLayoutRoot_ 是真实输入框壳、_ComposerLayoutFooter_ 只是其内层 footer\"\n      },\n      {\n        \"version\": \"26.814.5517.0\",\n        \"platform\": \"windows\",\n        \"evidence\": \"reporter: #376 复现环境；该版本设置页外观切换后的混色问题仍未修复，settings/appearance 路径未验证\"\n      },\n      {\n        \"version\": \"26.803.10989.0\",\n        \"platform\": \"windows\",\n        \"evidence\": \"reporter: #363 实机探测（Chromium 151.0.7922.76）；受管 --user-data-dir 下 CDP、app://-/index.html renderer 与真实主题注入验证全部通过\"\n      },\n      {\n        \"version\": \"26.803\",\n        \"platform\": \"both\",\n        \"evidence\": \"reporter: #359 Owl composer 布局报告；_ComposerLayoutBody_ / _ComposerLayoutFooter_ / _ComposerHomeUtilityBar_ 前缀别名已并入合同\"\n      },\n      {\n        \"version\": \"26.727.40816\",\n        \"platform\": \"macos\",\n        \"evidence\": \"maintainer: 已签名 macOS app 的 live app:// renderer 实测复核（Chromium 150.0.7871.182），shell-main 与 header-tint 逐条 querySelector\"\n      },\n      {\n        \"version\": \"26.715.61943\",\n        \"platform\": \"macos\",\n        \"evidence\": \"fixture: runtime/dom-fixtures/codex-dom-fixture-darwin-watch.json（15 状态，Chromium 150.0.7871.124）\"\n      },\n      {\n        \"version\": \"unrecorded\",\n        \"platform\": \"windows\",\n        \"evidence\": \"fixture: runtime/dom-fixtures/codex-dom-fixture-win32-watch.json（7 状态）；bundle hash 与 mac 不同（ModelPickerTrigger mac=1fm6a win=1w4ob），确认双端存在版本错位\"\n      }\n    ],\n    \"verdict\": \"双端运行时继续共用一份 selector/CSS 合同。26.727.40816 起主表面与顶栏的旧语义类改为 CSS Modules，26.803~26.818 又把输入框壳迁到 _ComposerLayoutRoot_；合同的做法始终是保留旧锚点、追加稳定属性或模块名前缀，绝不匹配完整 hash。注意 26.803 之后每一条证据都来自报告者，维护者没有对应平台的本机 renderer 复核——不要把它们当成与 26.727 同等强度的验收。\",\n    \"gaps\": [\n      \"Windows 26.727 之后至今没有维护者本机 renderer 复核\",\n      \"#376：26.814.5517.0 上 Codex 设置→外观切换深浅色后主题混色，settings/appearance 路径的锚点行为未验证\",\n      \"#371：Windows 顶部与底部区域配色与主区不一致，尚未确认是 header-tint 未命中还是原生层未被覆盖\"\n    ]\n  },\n  \"appearanceSignal\": {\n    \"dark\": \"html.electron-dark\",\n    \"light\": \"html.electron-light\",\n    \"warning\": \"html.electron-opaque 随窗口聚焦/毛玻璃状态闪动，与明暗无关，禁止用作外观信号\"\n  },\n  \"scopeVocabulary\": {\n    \"all\": \"除设置页外的全部路由（home / thread / detail）及其上的 menu / dialog 覆盖层\",\n    \"home\": \"首页（建议卡屏）。注意首页渐进渲染：home-icon 先出现，utility bar 可晚 1~2 秒\",\n    \"thread\": \"会话/任务页（含 markdown 内容）\",\n    \"settings\": \"设置页。mac 26.715.61943 实测设置页替换整个 shell（main/侧栏/header 全部消失）；win 实测设置页保留 shell。皮肤不得假设二者其一，锚点缺失时降为 L0\",\n    \"overlay\": \"菜单 / 弹窗 / popper 浮层\",\n    \"config\": \"依赖用户配置才出现（如未配置项目则无项目选择器）\"\n  },\n  \"selectors\": [\n    { \"key\": \"shell-main\", \"selector\": \"main:is(.main-surface, [data-app-shell-main-surface], [class*=\\\"_MainContentSurface_\\\"])\", \"tier\": \"L1\", \"scope\": \"all\", \"required\": true, \"notes\": \"全局主表面。26.727.40816 提供 data-app-shell-main-surface，并使用 _MainContentSurface_ CSS Module；保留旧类兼容历史版本，前缀只限定在 main 元素。mac 设置页缺失（win 存在），缺失时整页仅 L0\" },\n    { \"key\": \"left-panel\", \"selector\": \"aside.app-shell-left-panel\", \"tier\": \"L1\", \"scope\": \"all\", \"required\": true, \"notes\": \"左侧栏；收起/重建时会移除节点，勿在其消失时清皮\" },\n    { \"key\": \"header-tint\", \"selector\": \"header:is(.app-header-tint, [data-app-shell-header-edge-scroll], [class*=\\\"_Header_\\\"])\", \"tier\": \"L1\", \"scope\": \"all\", \"required\": true, \"notes\": \"顶栏。26.727.40816 输出 data-app-shell-header-edge-scroll 并使用 _Header_ CSS Module；保留旧类兼容历史版本，前缀只限定在 header 元素。皮肤不得覆盖其 position/z-index（既有回归约束）\" },\n    { \"key\": \"main-content-top-fade\", \"selector\": \":is(.app-shell-main-content-top-fade, [data-app-shell-main-content-top-fade]:not(:has(*)), [class*=\\\"_MainContentTopFade_\\\"])\", \"tier\": \"L2\", \"scope\": \"all\", \"required\": false, \"notes\": \"主区顶部渐变遮罩。26.727.40816 提供 data-app-shell-main-content-top-fade 并使用 _MainContentTopFade_ CSS Module；用于在主题背景下移除原生白色 fade。26.924 把该属性从遮罩层移到了包裹整条路由的容器上，裸属性会连带命中 thread 滚动容器与 composer，导致任意会话右栏空白（#415/#414）。属性形式因此限定为无子元素的原生遮罩层，两个旧 class 形式保持不变\" },\n    { \"key\": \"home-icon\", \"selector\": \"[data-testid=\\\"home-icon\\\"]\", \"tier\": \"L1\", \"scope\": \"home\", \"required\": true, \"notes\": \"首页判定信号，双端一致\" },\n    { \"key\": \"home-route\", \"selector\": \"[role=\\\"main\\\"]:has([data-testid=\\\"home-icon\\\"])\", \"tier\": \"L1\", \"scope\": \"home\", \"required\": true, \"notes\": \"首页容器。实测 [role=main] 仅存在于首页——它不是通用路由锚点，thread 页没有\" },\n    { \"key\": \"home-route-css\", \"selector\": \"[role=\\\"main\\\"]\", \"tier\": \"L1\", \"scope\": \"home\", \"required\": true, \"notes\": \"home-route 的 CSS 可组合别名：不含 :has()。CSS 禁止 :has() 嵌套，home-route 原选择器一旦写进 :has()/:not(:has()) 整条规则会被解析器丢弃（v1.3.1 全窗口首页与任务页氛围背景因此失效）。依据与 home-route 相同的实测：[role=main] 仅存在于首页；该锚点缺失时 CSS 路由门控整体失效，故必须按 L1 必需项监控\" },\n    { \"key\": \"home-banners\", \"selector\": \".home-banners\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false, \"notes\": \"Codex 26.721+ 新增的原生首页 banner 插槽，位于 home-route 第一个子节点内、通常为空（0 子节点）靠原生 empty:hidden 折叠。真正的首页内容（标题/建议卡/输入框）在这个版本上已变成该插槽外层容器的兄弟节点，不再是它的后代（见 #244 实测：home-route > div:first-child 被撑到 100% 高度会把内容挤出视口）。用于判定新旧 home DOM 形态，皮肤据此把 first-child 链路的强制尺寸限定在旧形态或改走兄弟节点\" },\n    { \"key\": \"composer-chrome\", \"selector\": \":is(.composer-surface-chrome, [class*=\\\"_ComposerLayoutRoot_\\\"], [data-composer-surface-variant][data-composer-radius-variant])\", \"tier\": \"L2\", \"scope\": \"home+thread\", \"required\": false, \"notes\": \"输入框视觉壳。兼容旧语义类、26.814 ComposerLayoutRoot CSS Module 与稳定 surface/radius 语义属性；hash 随版本变化。win 实测存在无 composer 的 detail 路由，不可当全局锚点\" },\n    { \"key\": \"composer-toolbar\", \"selector\": \":is(.composer-surface-chrome [class*=\\\"_footer_\\\"], [class*=\\\"_ComposerLayoutRoot_\\\"] [class*=\\\"_ComposerLayoutFooter_\\\"], [data-composer-surface-variant][data-composer-radius-variant] :is([data-composer-footer-responsive], [class*=\\\"_ComposerLayoutFooter_\\\"], [class*=\\\"_footer_\\\"]))\", \"tier\": \"L2\", \"scope\": \"home+thread\", \"required\": false, \"notes\": \"输入框工具栏；兼容旧 footer、ComposerLayoutFooter CSS Module 与 data-composer-footer-responsive，hash 随版本变化\" },\n    { \"key\": \"home-utility\", \"selector\": \":is([class*=\\\"_homeUtilityBar_\\\"], [class*=\\\"_ComposerHomeUtilityBar_\\\"])\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false, \"notes\": \"CSS Modules 前缀匹配；兼容旧 homeUtilityBar 与 ComposerHomeUtilityBar，模块名跨端稳定、hash 随版本变，禁止匹配完整 hash\" },\n    { \"key\": \"game-source\", \"selector\": \"[data-feature=\\\"game-source\\\"]\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false },\n    { \"key\": \"home-suggestions\", \"selector\": \".group\\\\/home-suggestions\", \"tier\": \"L2\", \"scope\": \"home\", \"required\": false },\n    { \"key\": \"project-selector\", \"selector\": \".group\\\\/project-selector\", \"tier\": \"L2\", \"scope\": \"home config\", \"required\": false, \"notes\": \"依赖用户项目配置；win 快照未出现（该机可能未配置项目），不算平台差异\" },\n    { \"key\": \"markdown\", \"selector\": \"[class*=\\\"_markdown\\\"]\", \"tier\": \"L2\", \"scope\": \"thread\", \"required\": false, \"notes\": \"会话内容块，单页可达 100+ 个，样式规则注意性能\" },\n    { \"key\": \"thread-surface\", \"selector\": \".thread-scroll-container\", \"tier\": \"L2\", \"scope\": \"thread\", \"required\": false, \"notes\": \"会话滚动表面；双端活动会话快照均存在\" },\n    { \"key\": \"message\", \"selector\": \":is([data-message-author-role], [data-local-conversation-user-anchor], [data-local-conversation-final-assistant])\", \"tier\": \"L2\", \"scope\": \"thread\", \"required\": false, \"notes\": \"用户与助手消息的稳定语义边界；兼容旧版 role 属性和 Codex 26.727+ 语义属性。当前全宽 user anchor 在运行时优先映射到内部自适应圆角气泡，找不到气泡时保留旧版 anchor fallback\" },\n    { \"key\": \"settings-panel\", \"selector\": \"[data-settings-panel-slug=\\\"general-settings\\\"]\", \"tier\": \"L2\", \"scope\": \"settings\", \"required\": false, \"notes\": \"Codex 26.727 设置页稳定导航锚点；设置页可先落在 General，不再保证 appearance-theme 或 theme-preview 存在\" },\n    { \"key\": \"appearance-radio\", \"selector\": \"input[name=\\\"appearance-theme\\\"]\", \"tier\": \"L2\", \"scope\": \"settings\", \"required\": false, \"notes\": \"旧版外观三选一；新设置页可能仅有 settings-panel\" },\n    { \"key\": \"overlay-menu\", \"selector\": \"[role=\\\"menu\\\"]\", \"tier\": \"L2\", \"scope\": \"overlay\", \"required\": false },\n    { \"key\": \"overlay-dialog\", \"selector\": \"[role=\\\"dialog\\\"]\", \"tier\": \"L2\", \"scope\": \"overlay\", \"required\": false },\n    { \"key\": \"overlay-popper\", \"selector\": \"[data-radix-popper-content-wrapper]\", \"tier\": \"L2\", \"scope\": \"overlay\", \"required\": false }\n  ],\n  \"removed\": [\n    { \"key\": \"suggestion-item\", \"selector\": \".group\\\\/home-suggestion-list-item\", \"reason\": \"双端全部 22 个实测状态命中 0 次——当前 Codex 版本已无此类；CSS 中引用它的规则为化石，待清理\" }\n  ],\n  \"stableTestids\": [\"app-shell-header-context-menu-surface\", \"home-icon\", \"theme-preview\"],\n  \"notes\": [\n    \"锚点优先级：data-testid > role/语义标签 > 稳定类名 > CSS Modules 前缀；禁止精确 hash 与纯结构路径\",\n    \"首页渐进渲染：L2 home 锚点必须容忍晚到，找不到 = 暂不精修，不得阻断 L0/L1\",\n    \"跨端适配 = 版本管理：同版本双端 DOM 同源；升级 Codex 后先跑 doctor 对本清单，再决定是否改适配\"\n  ]\n}\n\n<!-- File: windows/agents/openai.yaml (Tokens: ~58 | Category: anthropic-skill) -->\ninterface:\r\n  display_name: \"Codex Dream Skin\"\r\n  short_description: \"Apply and safely restore the full pink-purple Codex skin\"\r\n  default_prompt: \"Use $codex-dream-skin to apply, verify, update, or restore the full Codex desktop skin.\"\n\n<!-- File: windows/references/qa-inventory.md (Tokens: ~1133 | Category: anthropic-skill) -->\n# QA inventory\n\n## User-visible claims\n\n1. The home screen paints one UI-free wallpaper continuously across sidebar and main content, with a live native heading, the real project utility/composer surface, and any suggestion cards rendered by the current Codex host.\n2. Sidebar, main area, header, and composer use coordinated readability layers; home remains expressive while normal task routes use a stronger quiet veil.\n3. All real Codex controls remain interactive; the skin is not a screenshot overlay.\n4. The skin survives route changes and renderer reloads while the injector daemon runs.\n5. The official Store package and `app.asar` remain unchanged.\n6. Restore removes the injected DOM/CSS and install/restore can be repeated.\n7. Restore closes the saved CDP listener before reopening Codex normally.\n\n## Functional checks\n\n- Home feature card: click one card and confirm the real composer is populated or the normal action occurs.\n- Project selector: click the real project chip under the \"选择项目\" label and confirm the native project menu opens.\n- Sidebar: open a real task, then return to New Task.\n- Task side panel: open and close the native thread panel twice, resize the window, and repeat; the toggle must remain visible and clickable.\n- Composer: type text, verify caret/readability, then clear it without sending.\n- Reload: use CDP `Page.reload`, wait, and confirm the injection marker returns.\n- Pet overlay: open a desktop pet and confirm its auxiliary window stays transparent with no skin background or decoration layer behind it.\n- Restore/reapply cycle: remove live skin, verify marker absent, apply again, verify marker present.\n- Update resilience: resolve the current `OpenAI.Codex` Appx location dynamically for launch. A versioned path saved for cleanup must be revalidated against the registered package full/family identity before any process is stopped.\n- Restart consent: an existing normal Codex window is never force-closed without explicit CLI authorization or shortcut confirmation.\n- Shortcut policy: installed launch, restore, tray, and tray-child commands use `RemoteSigned` without `Bypass`; Internet-zone markers are removed only from hash-verified managed PowerShell copies.\n- Config safety: Chinese project names, LF/CRLF choice, quoted target keys, table-header comments, and unrelated TOML sections survive install/selective restore; ambiguous target shapes fail unchanged, exact recovery keeps a copy of the replaced current file, and install refuses both registered and state-recorded old Codex processes.\n- Theme safety: empty/over-10 MB images, over-16384px/50MP dimensions, path escapes, symlinks/junctions, malformed JSON, unsafe CSS, and unsupported formats are rejected before payload construction.\n- Tray lifecycle: pause/resume reflects the clicked state, bundled Arina Hashimoto theme is present on first install, and complete restore terminates any separately launched tray before it can reapply the skin.\n\n## Visual checks\n\n- 1280x820 initial home: the declared focus stays in frame, the text-safe side remains readable, the real project utility row and composer form one coherent surface, and no horizontal scrolling appears.\n- Narrower window: accept Codex's native responsive card reduction or omission; no essential control is covered and wallpaper cropping preserves the focus/safe-area contract.\n- Normal task: the wallpaper is visibly quieter than home, messages keep high contrast, and composer does not overlap content.\n- Inspect the sidebar, header, wallpaper edges, native card labels when present, project utility row, composer controls, scrollbar, dialogs, and menus.\n- Reject black/transparent sidebar artifacts, clipped controls, duplicated/disconnected project labels, rasterized native controls, fake UI inside the wallpaper, weak contrast, or decorations intercepting clicks.\n\n## Exploratory checks\n\n- Start when the debug port is occupied: fail with a clear message or use a caller-selected port.\n- Start after Codex updates: package discovery and injection still work without patching installed files.\n- Tamper `state.json` with a reused PID: if the PID is still live but its identity differs, confirm cleanup fails closed and preserves `state.json`; if the PID is gone, confirm the stale record is replaced only after confirming no process is running, without stopping an unrelated process.\n- Serve a fake `app://` CDP target or remote/mismatched WebSocket URL and confirm both launcher and injector reject it. Reuse the port with a new Browser ID and confirm the existing watcher exits without reconnecting.\n- Force verification failure and confirm the injector, state file, and newly launched debug session are rolled back.\n- Start two operations concurrently and confirm the second fails clearly without changing config, state, or processes.\n- Close Codex without restore and confirm the Browser identity anchor closes and the watcher exits without reconnecting or rapidly growing logs.\n\n## Automated checks\n\n- `tests/run-tests.ps1`: strict UTF-8/no-BOM writes, UTF-16 rejection, LF/CRLF preservation, concurrent-write detection, exact backup/recovery, `[desktop]`-scoped restore, ambiguous TOML rejection, non-ASCII paths, Appx/state identity, argument quoting, theme seeding/import/save/switch/pause, canonical community-link and compatible-metadata rejection, fixed-origin download/apply boundaries, byte/dimension limits, junction rejection, payload construction, Browser ID, loopback URL rejection, and renderer isolation for transparent auxiliary windows.\n- `node --check` for the injector and renderer payload.\n- Live Windows signoff remains required for Store process ownership, restart consent, screenshot, and CDP closure.\n\n<!-- File: windows/references/runtime-notes.md (Tokens: ~300 | Category: anthropic-skill) -->\n# References Skill\n\nPath: `windows/references/runtime-notes.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/Fei-Away/Codex-Dream-Skin/HEAD/windows/references/runtime-notes.md)\n\n<!-- File: windows/SKILL.md (Tokens: ~1915 | Category: anthropic-skill) -->\n---\nname: codex-dream-skin\ndescription: Apply, launch, verify, repair, update, or restore a full decorative skin for the Windows Codex desktop app. Use when the user asks for a Codex theme that goes beyond official color settings, wants the pink-purple Dream/Fiona-style interface, needs the skin reapplied after a Codex update, or needs a safe rollback without modifying WindowsApps or app.asar.\n---\n\n# Codex Dream Skin\n\nApply a reversible renderer skin through Chromium DevTools Protocol while launching the official Store-installed Codex executable. Never replace or take ownership of files under `WindowsApps`.\n\n## Workflow\n\n1. Install Node.js 22 or newer, close Codex, then run `scripts/install-dream-skin.ps1` once. The installer preserves the user's native appearance settings, seeds the Arina Hashimoto theme, copies the runtime to `%LOCALAPPDATA%\\CodexDreamSkin\\engine`, and creates launch/restore/tray shortcuts that do not depend on the source checkout.\n2. Use the `Codex Dream Skin` shortcut, or run `%LOCALAPPDATA%\\CodexDreamSkin\\engine\\scripts\\start-dream-skin.ps1`. The shortcut asks before restarting an already-open Codex app; CLI callers must explicitly add `-RestartExisting`.\n3. Run `scripts/verify-dream-skin.ps1 -ScreenshotPath <absolute-path>` after launch. Treat a missing continuous wallpaper, home shell, native composer, sidebar layer, or injection marker as failure. The native suggestion count is responsive and may be two to four.\n4. To add a complete downloaded pack, use the tray's “导入主题 ZIP…”. Accept ordinary `.zip` only. Every new official Studio pack contains `manifest.json`, non-empty `theme.json`, non-empty locally validated `theme.css`, exactly one registered background, and optional license/signature files; the trusted local simplified format contains exactly `theme.json`, `theme.css`, and its referenced image. Import into saved themes without changing the active theme. A manually extracted complete three-file directory may instead be moved into the saved themes folder. Previously saved legacy themes without CSS remain switchable but inject no extra CSS.\n5. A compatible DreamSkin.cc theme can use the exact `dreamskin://apply?version=ver_...` link registered by Setup.exe. The handler always obtains approved metadata and the ZIP from the fixed API, requires `applyCompatible: true`, shows a native confirmation, verifies byte count and SHA-256, then reuses the strict importer before applying. It never accepts an arbitrary URL/path/command or a silent-apply flag.\n6. Inspect the screenshot against `references/qa-inventory.md`. Verify both the home screen and a normal task before signing off.\n7. Run `scripts/restore-dream-skin.ps1` to remove the live skin, close the saved CDP session, and reopen Codex normally. Add `-RestoreBaseTheme` to restore only saved appearance keys, `-RecoverConfigBackup` for explicit byte-for-byte recovery of a damaged config, or `-Uninstall` to delete shortcuts. A completed config restore archives that install's backup so a later install captures a fresh baseline.\n\n## Guardrails\n\n- Preserve the official executable, package signature, user threads, pets, plugins, and authentication state.\n- Theme images must be UI-free wallpapers. Never import a README screenshot, fake window, sidebar, card, composer, logo, or text baked into the bitmap.\n- Paint one continuous 16:9 wallpaper across the full Codex window. Let the sidebar, main area, header, and composer act as coordinated readability layers; keep the home route expressive and task routes quieter.\n- `appearance: auto` follows the native computed `color-scheme` first and the system appearance only as a fallback. Image brightness may tune color and composition, but must not flip the user's shell mode; explicit `light` and `dark` remain authoritative.\n- Attach the \"选择项目\" treatment to Codex's real project-selector toolbar and keep the current project button clickable; never draw a disconnected replacement.\n- Keep decorative layers `pointer-events: none` and keep real buttons, navigation, and composer above them.\n- On app updates, rerun install and launch; the scripts discover the current Appx package dynamically. Saved paths are never trusted for process control unless they still match a registered package identity.\n- Keep manifest-derived package activation as the preferred Windows launch, and always pair remote-debugging switches with the persistent non-default managed CDP profile that Chromium 136+ requires. The exact Store `app\\ChatGPT.exe` fallback is allowed only after visible process arguments prove owl encoded the CDP flag inside `codex://`, and only with the package identity/path checks in `common-windows.ps1`. Preserve the pre-launch PID set during rollback. Treat access denial and raw arguments without a verified listener as terminal. This fallback is diagnostic, not proof of owl compatibility; never change WindowsApps ACLs to make it run.\n- The default launcher scans for a free port when `9335` is occupied. An explicitly requested occupied port fails closed.\n- Keep the injection daemon running for navigation/reload resilience. Its state and logs live under `%LOCALAPPDATA%\\CodexDreamSkin`.\n- The watcher registers a generation-checked early payload for connected renderers so reload/navigation can paint the skin before the normal load-event fallback; unsupported CDP targets fall back safely.\n- The active theme, saved themes, imported images, pause marker, and tray controls live under `%LOCALAPPDATA%\\CodexDreamSkin`. Reject empty or over-10 MB images before copying or encoding them.\n- Theme-pack import does not support `.dreamskin`; reject traversal, links/reparse entries, nested archives, ambiguous roots, Windows-reserved paths, size/count abuse, and packs that fail the existing theme/image payload checks.\n- Community deep links accept only a canonical version ID. Reject redirects, non-approved or non-compatible metadata, mismatched IDs, non-boolean compatibility, unsafe display metadata, unexpected media types, byte/hash mismatches, and concurrent applies before changing the active theme.\n- Every managed-store write rejects junctions and other reparse points in every existing path component. Imports also use the bundled Node metadata parser before copying to reject dimensions above 16384px or 50MP.\n- CDP targets must use a same-port loopback WebSocket, belong to the current Store package, retain the launch-time Browser ID, and expose expected Codex renderer markers.\n- Loopback prevents LAN exposure, but Chromium CDP has no same-user authentication. Run only trusted local software while the skin is active, and use restore to close the debug session when it is no longer needed.\n- Preserve `config.toml` as strict UTF-8. Never use encoding-dependent whole-file PowerShell reads/writes, silently transcode UTF-16, or overwrite a file that changed after it was read. Ambiguous TOML shapes must fail before writing rather than receive a best-effort rewrite.\n- Keep install/start/restore/verify serialized with the per-user operation lock in `common-windows.ps1`.\n- Treat `%LOCALAPPDATA%\\CodexDreamSkin\\engine` as an installer-managed runtime. Exit the Dream Skin tray before reinstalling so the installer can replace that runtime atomically and update every shortcut to the same copy.\n- Keep installed shortcuts and tray child processes on `RemoteSigned`, never `Bypass`. Clear Internet-zone markers only from staged managed `.ps1` copies after their byte-content hashes match the selected source; never change the user's persistent execution policy or override Group Policy.\n\n## Checks\n\n```powershell\npowershell -NoProfile -File tests\\run-tests.ps1\nnode --check scripts\\injector.mjs\nnode --check assets\\renderer-inject.js\n```\n\n## Resources\n\n- `scripts/injector.mjs`: CDP connection, renderer injection, verification, screenshot, and removal.\n- `scripts/common-windows.ps1`: Store-package discovery, Node validation, managed runtime installation, port ownership, state, and process identity safety.\n- `scripts/config-utf8.ps1`: atomic UTF-8 configuration backup, selective restore, and explicit recovery.\n- `assets/dream-skin.css`: full visual layer.\n- `assets/renderer-inject.js`: idempotent DOM integration and cleanup.\n- `assets/dream-reference.jpg`: pure 2560 × 1440 Arina Hashimoto wallpaper seeded as the default and as a saved theme; it contains no Codex UI.\n- `assets/theme.json`: shared adaptive theme contract for the seeded preset.\n- `scripts/theme-windows.ps1`: persistent active/saved theme store, safe image import, pause state, and preset seeding.\n- `scripts/apply-community-theme.ps1`: fixed-origin, confirmed community download, integrity verification, strict ZIP import, apply, and rollback orchestration.\n- `scripts/tray-dream-skin.ps1`: Windows Forms tray for apply, pause, import, save, switch, and complete restore.\n- `references/qa-inventory.md`: required functional and visual signoff coverage.\n- `references/runtime-notes.md`: troubleshooting and update behavior.\n- `tests/run-tests.ps1`: managed runtime, configuration, state, recovery, payload, and CDP validation regression checks. Use `-EngineOnly` for the source-independence contract.\n</yakaai_skills>"}