Skip to content

Covel v0.0.10

Choose a tag to compare

@github-actions github-actions released this 01 Jul 14:49
· 2946 commits to main since this release

[0.0.10] - 2026-06-29

A plugin-configuration pass: worlds can now preset any plugin's player-tunable settings and declare genre-specific memory dimensions, the player's per-plugin settings finally reach the scheduled turn loop, and the plugin config layer is consolidated onto a single declaration with server-enforced constraints. Behavior-unchanged for worlds and plugins that don't adopt the new fields.

Added

  • World-preset plugin settings (pluginSettings). A world.yaml can now declare per-plugin defaults for any plugin's userSettings, keyed pluginId → settingKey → value. They form the middle layer of a three-tier resolution chain — player override → world default → manifest default — merged at the turn boundary into TurnInput.userSettings and consumed by agent {{ userSettings.* }} templates, guards, and hooks. A dialogue world can ship "70% dialogue, short replies" as its default while players keep the freedom to override. See docs/reference/world-data.md.
  • World-declared core-memory blocks (memoryBlocks). A world can add genre-specific memory dimensions (a detective world's clues / suspects, a business sim's deals / rivals) without forking a plugin — same shape as a plugin's memoryBlocks. The memory system resolves the block schema per session, merging a session's world blocks onto the global plugin blocks (base wins on label collision; the world only adds new labels), so the extra dimensions render and extract only for the worlds that declare them. Closes the long-documented "(or by a world package)" gap.
  • integer / slider user-setting types, and a consolidated design-principles page (docs/architecture/design-principles.md) that roots the framework's "kernel provides primitives, plugins carry gameplay" contract, the agent / function / composition writing styles, and the plug-vs-appliance test.
  • Character portraits + presence wiring for the flagship worlds. Both worlds ship a curated portrait set (mistport fog-noir, haruka GalGame-style), generated via scripts/generate-portraits.mjs + scripts/emit-presence.mjs and wired to the character-presence plugin through media + presence world-data sources (content-addressed by sha256) — portraits render in the right-panel character card and as dialogue sprites. The two worlds also gained tuned plugin defaults (haruka: activeSpeakerCount, npc-graph; mistport: a cost-gate budget guardrail). Prompt spec in worlds/PORTRAITS.md; shipping contract in docs/reference/world-data.md.
  • Hot-reload llm.toml without restarting. Settings → LLM gains a Reload config button (POST /api/llm-config/reload) that re-reads llm.toml and applies it to the live gateway in place — the provider / preset / slot registries are reconfigured rather than rebuilt, so the gateway and every adapter pick up added/removed slots without a restart. A malformed llm.toml (e.g. a key with = and no value) no longer fails silently: the file still falls back to the built-in default, but the parse error is now surfaced via the new error field on GET /api/llm-config and a red banner in Settings — instead of every plugin's slot just showing as "missing" with no explanation. On desktop the reload endpoint is gated by the same one-time REST token as other config writes. See docs/guide/desktop-config.md.
  • Character portraits show as avatar badges in the character list. Each row in the char-creator character panel now leads with the character's portrait as a small avatar badge, via a new generic CharacterAvatar json-render component. It reads presence records from a source plugin/namespace named in the spec (char-creator wires it to character-presence / presence) — keeping the framework component free of any hard-coded plugin id, mirroring how ImageGallery takes its pluginId by prop. Matching tolerates the <sessionId>-<characterId> ids the character list uses against the bare characterId the presence records key on. Characters without a portrait — and entire worlds without presence data — render exactly as before: the badge simply doesn't appear.
  • Worlds can declare character attributes with i18n labels (characterAttributes). AttributeDefinition.name / description now accept an I18nText (plain string or { "zh-CN": …, "en-US": … } record), and a world.yaml can ship its own characterAttributes array. world-init's guard writes it verbatim as the session's character-attributes schema — and does so authoritatively, ahead of cross-session reuse, so editing the declaration takes effect on new sessions instead of inheriting an older session's stale/derived schema. The right-panel character card resolves each label to the UI locale (resolveI18nText), and the prompt-injected <world-schema> is deep-resolved to one language too (resolveI18nDeep), so a custom field like Haruka's affection shows as 好感度 / Affection instead of a raw affection key under "其他". Both flagship worlds now declare their cast fields (mistport: faction / role / tideSense / fogRot / …; haruka: club / affection / trust / …) with bilingual labels. Worlds that declare nothing are unchanged — the guard still derives generic attributes from dimensions, then falls back to the LLM. See docs/reference/world-data.md and docs/reference/plugins.md.
  • Click-to-enlarge for portraits, avatars, and generated images. The image-generation gallery's preview was extracted into a generic MediaPreviewDialog. The json-render Image component gains a zoom prop, the character-portrait gallery and the character-list avatar badges opt into it, and the image gallery now delegates to the same dialog — one enlarge + download surface everywhere. The avatar badge stops its click from also toggling the surrounding collapsible card. The Image component also gains a framed prop (rounded bordered card + hover) so the portrait gallery's thumbnails match the image-generation gallery's cards — the two read as one family. The enlarge view is a tight lightbox that hugs the image (w-auto) rather than a wide dialog with the image floating in empty space.
  • branch-reply reply-swipe revived as a real feature. The GalGame "swipe between AI replies" plugin shipped active in both default worlds but was a permanently-invisible dead feature — a bootstrap deadlock where the only candidate-writer lived behind a button inside a block that never rendered. It is now a working auto-seeded swipe: after each story turn it captures the narrator's reply as the original (engine-agnostic — discovered via the narrative-output contract, no hardcoded narrator / chat-mode-narrator id), and a Regenerate control produces genuine LLM-generated alternative phrasings (fast slot, session locale) the player can compare and Accept to rewrite prompt history. The original is never re-rendered as a card, so a reply never appears twice; the old English deterministic filler is gone.

Changed

  • One plugin-config declaration. userSettings is now the single source for player-tunable plugin settings; the dead, never-consumed config manifest field is removed. A straggler PLUGIN.md that still declares config: is stripped with a deprecation warning rather than failing to load. The PluginUserSettingSpec type is single-sourced in @covel/shared (two divergent copies removed), and its declared constraints (min / max / options / type) are now enforced — client-side in the SettingsStore and server-side in resolveUserSettings, so an out-of-range world or header value degrades to the manifest default instead of reaching a guard or hook.
  • Plugin selection consolidated into pluginPolicy. The deprecated top-level requiredPlugins / recommendedPlugins / excludedPlugins now fold (de-duplicated) into pluginPolicy at world-load time, so WorldRecord.metadata carries plugin selection in one place. The top-level fields remain valid in world.yaml for back-compat. Per-turn world reads are served from a short-TTL per-worldId cache.
  • Sample worlds curated to two deeply-built flagships. The bundled set is now Mistport (traditional-story / dark-fantasy mystery) and Haruka Academy (dialogue / GalGame-style), each greatly expanded and doubling as the canonical example of the new fields. Mistport gains a seven-character seed cast, a fourth faction, bilingual lore, and clues / relics / tides memory blocks; Haruka grows to eight characters across five routes with relationships / promises / rumors / festival memory. The redundant cloudmere and neonridge story worlds move to worlds/_archive/ (kept for reference, not loaded).

Fixed

  • Player per-plugin settings now actually reach the main turn loop. POST /api/actions (and the resume / plugin-rpc paths) never decoded X-Plugin-User-Settings, so in the scheduled loop every runtime's userSettings collapsed to manifest defaults — a player's UI-tuned values (chat-mode-narrator's dialogueRatio, cost-gate's token caps) were silently ignored while only the manual plugin-rpc path honored them. The main route now decodes the header and merges it with the world defaults.
  • The settings header no longer masks world defaults. X-Plugin-User-Settings was built from every registered plugin setting (store.get() returns the manifest default for untouched keys), so it always carried a full bucket of defaults that, sent as "player overrides," overrode the new world pluginSettings layer. It now carries only the keys a player explicitly set (store.has()).
  • Archived bundled worlds no longer linger in existing users' databases. seedWorlds only ever upserts, so a sample world removed from the bundle (e.g. cloudmere / neonridge) stayed seeded in every existing user's DB and kept showing in the world list. The server now runs a reconciliation pass after seeding that drops file-seeded worlds no longer present in any world source. Three safety rails keep it from ever removing real data: it only touches metadata.source === "file" worlds (AI-generated generated / generated-file worlds are never touched), it keeps any stale world that still has saved sessions (warned, never silently deleted), and it skips entirely when nothing seeded so a transient load failure can't wipe worlds. See docs/reference/world-data.md.
  • Plugin provider-slot overrides are honored in the prep screen. A function-runtime plugin (e.g. image generation) names its provider slot through the modelPresetId userSetting. The session-prep row read only that setting's manifest default, so it always displayed the default slot — flagging it red as "missing [covel.<default>]" even when the player had a perfectly good slot of the same kind configured, with no way to point the plugin at it short of editing Settings → Plugins. The row now reflects the player's effective value and offers an inline slot picker; choosing a configured slot clears the warning, and the override reaches the function runtime via the (now-honored) X-Plugin-User-Settings header. See docs/guide/desktop-config.md.
  • Creating a world that ships portraits no longer 500s on SQLite (database is locked). POST /api/sessions wraps createSession + world-data import in a single withTransaction. With STORE_BACKEND=sqlite, the mirror media store opened a second connection to the same covel.db, so materializing the world's bundled portraits inside that open write transaction deadlocked against the transaction's own lock — SQLITE_BUSY, surfaced as a generic 500 after the 5s busy-timeout. The SQLite DataStore and its mirror media store now share one refcounted connection per file, so media writes join the open transaction and commit atomically with the session (the intended behavior) instead of fighting it. Worlds without media were unaffected; this only bit the new portrait-carrying flagship worlds.
  • Imported character portraits now actually render. The portrait/presence wiring stored the data (sha256-addressed images + presence records), but the character-presence right panel only dumped the raw presence JSON — a wall of sha256 ids with no <img> anywhere, so players couldn't see the art. The panel now renders a portrait gallery at the top (repeat over the presence entries → one Image per character, captioned by displayName), and is surfaced as its own Character Portraits (角色立绘) tab right after the character list — instead of being buried as one of four providers inside the shared chat-mode ("对话") group tab, where it was effectively unfindable. Worlds without portraits degrade cleanly: an empty presence list shows no gallery, and a character missing an avatar falls back to the built-in "no image" placeholder tile — no broken images, no errors. The panel spec re-materializes on GET /api/ui-specs, so existing sessions pick it up on the next reload without starting over. The player-facing tab no longer exposes the world-author import form (which made you hand-enter an image's sha256 id / MIME / byte size). It's now a custom PortraitGallery component: each portrait is a framed click-to-enlarge thumbnail with a hover-to-replace action — the player just picks an image file, which uploads via the new POST /api/media?sessionId= (session-owned, content-addressed) and is written back as the character's presence through the plugin's own runtime. No internal fields, no JSON. World authors still bulk-import portraits via the world package (presence + media sources).
  • Desktop media (portraits, generated images) no longer fails to load. The packaged desktop sidecar runs with NODE_ENV=production, where the server refuses to mint media-access tokens from an ephemeral per-process secret — but the shell only provisioned the REST bearer token, never COVEL_MEDIA_TOKEN_SECRET. So GET /api/sessions/:id/media-token 500'd and every <Media> (character portraits, image-gen output) showed a "media unavailable" placeholder despite the bytes being on disk. The desktop shell now generates a per-launch media-token secret and injects it (a user-set COVEL_MEDIA_TOKEN_SECRET via process env / a repo .env still wins). Tokens are 5-minute TTL and re-requested by the renderer, so per-launch rotation is invisible.
  • Non-dialogue panels no longer hide under a "Chat Mode" tab. character-blueprint (preset characters), living-world-rules (world rules), and player-identity (player voice) each declared group: "chat-mode", so their panels merged into one tab literally labeled "对话" / Chat Mode in every world — jarring in a traditional-story world like Mistport, which doesn't run dialogue mode at all. They are now their own clearly-labeled tabs (预设角色 / 世界规则 / 玩家口吻); the genuinely dialogue-only panels (scene-cast / scene-prompts) keep the chat-mode group. Mistport also drops character-blueprint from its recommended set — a dialogue-mode cast-authoring tool that overlaps char-creator for traditional story.
  • World dimensions are localized before they reach the narrator's prompt. A dimension's i18n leaves ({ zh, en } faction names, descriptions, tone, opening scenario, …) were injected into {{ world.dimensions }} as a raw bilingual blob — wasting tokens and risking language-mixing — while lore was already locale-resolved at load. buildWorldContextView now deep-resolves the dimensions to the session locale (new shared resolveI18nDeep), so the narrator (and world-init/schema-gen) see one language. As a bonus, tone / openingScenario now extract correctly when authored as i18n records (the old typeof === "string" check silently skipped them).
  • Plugin UI/UX coherence pass (multi-agent audit). A systematic review of every bundled plugin's panel ↔ context ↔ tool wiring fixed a cluster of coordination defects where the player saw one thing while the model saw another, or a control did nothing:
    • Character defaults persist at the write boundary. New mergeSchemaDefaults merges declared schema defaultValues into stored fields in both create-character and the player-init guard, so the panel (which overlaid defaults at render), the model's get-character, and the prompt context finally agree — previously the panel showed hp 100/100 that existed in neither the record nor the prompt.
    • scene-cast activeSpeakerCount knob works. It was declared on chat-mode-narrator (a different plugin scope), so the slider never reached the plugin that enforces cast size (hard-capped at 2) while the narrator was told a count the cast never matched. The setting moved onto scene-cast; the narrator defers to the injected <active-cast>.
    • living-world-rules no longer silently drops rules. A triggered/evolving rule saved without keywords mapped to a keyword-gated lorebook entry that never activated, yet showed as enabled. Only keyword-bearing triggered rules are now keyword-gated; everything else is always-on.
    • cost-gate aborts are visible. A hard-budget abort on the main turn emitted an empty execution.completed with no signal; it now carries abortReason (protocol + SSE + UI) so the player gets a reason instead of a silent empty turn.
    • chat-mode-narrator stops double-injecting the active-cast and NPC-relationship context each turn (inline {{ inputs }} + input.inject both appended it).
    • Player-facing surfaces de-jargoned. The raw-JSON "full import" textareas (player-identity / living-world-rules / character-blueprint) and the raw JsonView "saved …" dumps were replaced with structured cards (a new generic EntryCard isActive badge marks the active player voice); the dead codex ui.message spec and the redundant raw-JSON world-entries tab were removed.
    • Runtime-written strings are localized. Labels/prose written by tools/hooks bypassed the i18n gate and rendered Chinese for en players — scene-prompts / guide badge labels (now I18nText), the director preamble + pregame welcome (now ctx.locale-resolved), and chat-mode-narrator's prompt body (added PLUGIN.en.md). check-plugin-i18n was extended to scan handler .js label/title/placeholder literals so the class can't regress (it caught a real pregame leak).
    • memory.character_relationships re-scoped to player-centric bonds so it complements rather than duplicates npc-graph's NPC↔NPC graph (a careful check showed a naive merge would have regressed player-relationship continuity).
中文(备份翻译)

一次插件配置整理:世界现在能为任意插件预置玩家可调设置、声明题材专属的记忆维度,玩家的 per-plugin 设置终于进入主回合循环,插件配置层收敛为单一声明并在服务端强制约束。未采用新字段的世界与插件行为不变。

Added

  • 世界预置插件设置(pluginSettings):world.yaml 现在可为任意插件的 userSettings 声明默认值,键为 pluginId → settingKey → value。它是三层解析链的中间层——玩家覆盖 → 世界默认 → manifest 默认——在回合边界合并进 TurnInput.userSettings,供 agent {{ userSettings.* }}、guard、hook 共用。对话世界能把"70% 对话、短回复"作为默认,玩家仍可覆盖。见 docs/reference/world-data.md。
  • 世界声明核心记忆块(memoryBlocks):世界可添加题材专属记忆维度(侦探世界的 clues / suspects、商战的 deals / rivals),无需 fork 插件——字段形状与插件 memoryBlocks 一致。记忆系统按 session 解析块 schema,把该会话所属世界的块合并到全局插件块之上(标签冲突基础块优先、世界只新增),使额外维度只在声明它的世界里渲染与抽取。兑现长期文档承诺的 "(or by a world package)"。
  • integer / slider 用户设置类型,以及一页收敛的设计原则(docs/architecture/design-principles.md),确立"内核提供原语、插件承载玩法"的契约、agent / function / 组合三种写法、以及"插头 vs 电器"裁决测试。
  • 旗舰世界的角色立绘 + presence 接线:两个世界各自交付一套精选立绘(mistport fog-noir、haruka GalGame 风),由 scripts/generate-portraits.mjs + scripts/emit-presence.mjs 生成,并通过 media + presence 世界数据 source(按 sha256 内容寻址)接入 character-presence 插件——立绘在右侧角色面板与对话立绘中显示。两个世界还预置了调优的插件默认值(haruka:activeSpeakerCount、npc-graph;mistport:cost-gate 预算护栏)。提示词规范见 worlds/PORTRAITS.md,交付契约见 docs/reference/world-data.md。
  • 热重载 llm.toml,无需重启:Settings → LLM 新增「重载配置」按钮(POST /api/llm-config/reload),重读 llm.toml 并原地应用到运行中的 gateway —— provider / preset / slot registry 是重新配置而非重建,所以 gateway 与所有 adapter 立即看到新增/删除的 slot,无需重启。llm.toml 写错(如某个 key 有 = 却无值)不再静默失败:文件仍回退内置默认,但解析错误现在通过 GET /api/llm-config 新增的 error 字段 + Settings 顶部红色提示暴露出来——而不是只让每个插件的 slot 显示「缺少」却不知为何。桌面版该接口受与其他写接口相同的一次性 REST token 保护。见 docs/guide/desktop-config.md。
  • 角色列表里直接显示立绘头像角标:char-creator 角色面板每一行现在以角色立绘的小头像角标开头,通过新增的通用 CharacterAvatar json-render 组件实现。它从 spec 指定的来源插件/namespace 读 presence 记录(char-creator 把它接到 character-presence / presence)——框架组件里不硬编码任何插件 id,与 ImageGallery 用 prop 接收 pluginId 同理。匹配兼容角色列表用的 <sessionId>-<characterId> 与 presence 记录用的裸 characterId。没有立绘的角色、以及完全没有 presence 数据的世界,渲染和以前一模一样:角标不出现而已。
  • 世界可声明带 i18n 标签的角色属性(characterAttributes):AttributeDefinition.name / description 现在接受 I18nText(字符串或 { "zh-CN": …, "en-US": … }),world.yaml 可自带 characterAttributes 数组。world-init 的 guard 把它原样写成 session 的 character-attributes schema,并且优先于跨 session 复用——所以编辑声明会在新 session 生效,而不会继承旧 session 推导/过时的 schema。右栏角色卡按界面语言解析每个标签(resolveI18nText),注入 prompt 的 <world-schema> 也被深度解析成单一语言(resolveI18nDeep),于是 Haruka 的 affection 这类自定义字段显示为 好感度 / Affection,而不是落在「其他」里的原始键 affection。两个旗舰世界已声明各自的角色字段(mistport:faction / role / tideSense / fogRot / …;haruka:club / affection / trust / …)并带双语标签。未声明的世界行为不变——guard 仍从 dimensions 推导通用属性,再回退到 LLM。见 docs/reference/world-data.md 与 docs/reference/plugins.md。
  • 立绘、头像、生成图都可点击放大:把图像生成画廊的预览抽成通用 MediaPreviewDialog。json-render Image 组件新增 zoom 属性,角色立绘画廊与角色列表头像角标都启用它,图像画廊也改为复用同一个 dialog——放大 + 下载到处一致。头像角标会阻止点击冒泡,避免顺带折叠外层卡片。Image 组件还新增 framed 属性(圆角边框卡片 + hover),让立绘画廊的缩略图和图像生成画廊的卡片视觉一致——看起来像一家人。放大视图是贴合图片的紧凑 lightbox(w-auto),而不是图片浮在大片空白里。
  • branch-reply「换一个回复」复活为可用功能:这个 GalGame「在 AI 回复间滑动切换」的插件随两个默认世界发布,却是永久不可见的死功能——自举死锁:唯一写候选的入口藏在一个永不渲染的块里的按钮后。现在是真正可用的自动 seed 滑动:每个叙事回合把 narrator 的回复捕获为「原始」(引擎无关——按叙事输出契约发现,不硬编码 narrator / chat-mode-narrator id),重新生成控件用 LLM(fast slot、会话语言)产出真实的不同说法供对比,采纳后重写 prompt 历史。原始回复不会被再渲染成卡片,所以一条回复绝不出现两次;旧的英文死板填充已删除。

Changed

  • 单一插件配置声明:userSettings 现为玩家可调设置的唯一来源;死的、从未被消费的 config manifest 字段被移除。仍声明 config: 的旧 PLUGIN.md 会被 strip + 弃用警告,而非加载失败。PluginUserSettingSpec 类型在 @covel/shared 单一来源(移除两份发散副本),其声明的约束(min / max / options / type)现已强制——前端 SettingsStore 与服务端 resolveUserSettings,越界的世界 / header 值降级为 manifest 默认而非进入 guard 或 hook。
  • 插件选择收敛进 pluginPolicy:过期的顶层 requiredPlugins / recommendedPlugins / excludedPlugins 在加载时折叠(去重)进 pluginPolicy,使 WorldRecord.metadata 的插件选择单一来源。顶层字段在 world.yaml 仍兼容。每回合的世界读取由短 TTL 的 per-worldId 缓存服务。
  • 示例世界精选为两个深度打磨的旗舰:内置世界现为 Mistport(雾港·裂潮纪,传统叙事 / 黑暗奇幻悬疑) 与 Haruka Academy(遥风学园,对话 / GalGame 类),各自大幅扩充,并成为新字段的范例。Mistport 新增七名种子角色、第四派系、双语 lore 与 clues / relics / tides 记忆块;Haruka 扩到八名角色、五条线,配 relationships / promises / rumors / festival 记忆块。冗余的 cloudmere 与 neonridge 故事世界移入 worlds/_archive/(保留参考,不加载)。

Fixed

  • 玩家 per-plugin 设置现在真正进入主回合循环:POST /api/actions(及 resume / plugin-rpc 路径)此前从不解码 X-Plugin-User-Settings,主循环里每个 runtime 的 userSettings 退化为 manifest 默认——玩家在 UI 调的值(chat-mode-narrator 的 dialogueRatio、cost-gate 的 token 上限)被静默忽略,仅手动 plugin-rpc 路径生效。主路由现在解码 header 并与世界默认合并。
  • 设置 header 不再掩盖世界默认:X-Plugin-User-Settings 此前由全部已注册插件设置构建(store.get() 对未设项返回 manifest 默认),所以总是携带一堆默认值,当作"玩家覆盖"盖掉新的世界 pluginSettings 层。现在只携带玩家显式设过的键(store.has())。
  • 被归档的内建世界不再残留在老用户库里:seedWorlds 只 upsert,从包里移除的示例世界(如 cloudmere / neonridge)会在每个老用户库里继续 seed 并出现在世界列表。服务器现在在 seed 后跑一次收敛,删除"已不在任何世界源里"的文件 seed 世界。三重安全栏确保绝不误删真实数据:仅触碰 metadata.source === "file" 的世界(AI 生成的 generated / generated-file 永不触碰)、仍有存档的陈旧世界保留(打 warn、绝不静默删)、本次没 seed 成任何世界时整体跳过,使瞬时加载故障无法清空世界。见 docs/reference/world-data.md。
  • 插件 provider-slot 覆盖在开局准备界面生效:function-runtime 插件(如图像生成)通过 modelPresetId userSetting 指定其 provider slot。开局准备界面此前只读这个设置的 manifest 默认值,所以永远显示默认 slot —— 即使玩家明明配了可用的同类 slot,也会标红「缺少 [covel.<默认>]」,且除了去 Settings → Plugins 改外无法就地指定。现在该行反映玩家的有效覆盖并提供就地下拉选择;选中一个已配置的 slot 即可消除警告,覆盖值通过(本版已修复的)X-Plugin-User-Settings header 传到 function runtime。见 docs/guide/desktop-config.md。
  • 创建带立绘的世界不再在 SQLite 上 500(database is locked):POST /api/sessions 把 createSession + 世界数据导入包在一个 withTransaction 里。STORE_BACKEND=sqlite 时,镜像 media store 对同一个 covel.db 开了第二个连接,于是在这个写事务进行中物化世界的立绘,就和事务自己的写锁死锁 —— SQLITE_BUSY,5 秒 busy-timeout 超时后报成笼统的 500。现在 SQLite DataStore 与其镜像 media store 按文件共享一个带引用计数的连接,media 写并入打开的事务、随 session 原子提交(设计本意如此),而非与之争锁。无媒体的世界不受影响;只有新的带立绘旗舰世界会触发。
  • 导入的角色立绘现在真的会显示:立绘/presence 接线把数据(sha256 寻址的图片 + presence 记录)落了库,但 character-presence 右侧面板只把 presence 原始 JSON 倒出来——一堆 sha256 字符串、全程没有一个 <img>,玩家根本看不到图。面板现在在顶部渲染立绘画廊(repeat 遍历 presence 条目 → 每个角色一个 Image,以 displayName 标注),并作为独立的「角色立绘」tab 排在角色列表正后面——而不是被并进共享的 chat-mode(「对话」)组 tab、当成四个 provider 之一藏在 provider 切换后面(那样根本找不到)。没有立绘的世界优雅降级:presence 为空则不显示画廊,缺 avatar 的角色回退到内置「no image」占位块——不裂图、不报错。面板规格在 GET /api/ui-specs 时重新物化,所以已有 session 下次 reload 就能看到、无需重开。玩家面板不再暴露世界作者的导入表单(那个让你手填图片 sha256 编号 / MIME / 字节大小的东西)。现在是一个自定义 PortraitGallery 组件:每张立绘是带边框、可点击放大的缩略图,hover 出现「替换」——玩家直接选一张图片,经新增的 POST /api/media?sessionId=(会话所有、内容寻址)上传,再通过插件自己的 runtime 写回为该角色的 presence。没有内部字段、没有 JSON。世界作者仍可通过世界包(presence + media source)批量导入。
  • 桌面端媒体(立绘、生成图)不再加载失败:打包桌面 sidecar 以 NODE_ENV=production 运行,此时服务端拒绝用临时的 per-process secret 签发媒体访问 token——但桌面壳只注入了 REST bearer token,从没注入 COVEL_MEDIA_TOKEN_SECRET。于是 GET /api/sessions/:id/media-token 报 500,尽管字节就在磁盘上,所有 <Media>(角色立绘、图像生成产物)都显示「media unavailable」占位。桌面壳现在每次启动生成一个媒体 token secret 并注入(用户通过 process env / 仓库 .env 自设的 COVEL_MEDIA_TOKEN_SECRET 仍优先)。token 是 5 分钟 TTL、由前端重新请求,所以每次启动轮换无感知。
  • 非对话面板不再藏在「对话」tab 下:character-blueprint(预设角色)、living-world-rules(世界规则)、player-identity(玩家口吻)各自都声明了 group: "chat-mode",于是在每个世界它们的面板都被并进一个字面叫「对话」的 tab——在像 Mistport 这样根本不跑对话模式的传统叙事世界里很违和。现在它们各自成为名字清晰的独立 tab(预设角色 / 世界规则 / 玩家口吻);真正只属于对话模式的面板(scene-cast / scene-prompts)保留 chat-mode 分组。Mistport 还把 character-blueprint 从推荐插件里移除——它是对话模式的角色预设工具,在传统叙事里和 char-creator 重叠。
  • 世界维度在进入 narrator 的 prompt 前就按语言解析好:维度的 i18n 叶子({ zh, en } 的派系名/描述/基调/开场等)此前以原始双语 JSON 注入 {{ world.dimensions }}——浪费 token 还可能让模型串语言;而 lore 早就在加载时按语言解析了。现在 buildWorldContextView 用新增的共享 resolveI18nDeep 把维度深度解析到 session 语言,narrator(及 world-init/schema-gen)只看到一种语言。附带:tone / openingScenario 用 i18n 记录写时现在也能正确提取(旧的 typeof === "string" 判断会静默跳过它们)。
  • 插件 UI/UX 协同审查(多 agent 审计):对全部内建插件「面板 ↔ 上下文 ↔ 工具」接线的系统性审查,修复了一批「玩家看到的与模型看到的不一致、或某个控件根本不起作用」的协同缺陷:
    • 角色默认值在写入边界落库:新增 mergeSchemaDefaults,在 create-character 与 player-init guard 把 schema 的 defaultValue 合并进存库 fields,使面板(渲染时叠加默认)、模型 get-character、prompt 上下文三者一致——此前面板显示的 hp 100/100 在存库记录和 prompt 里都不存在。
    • scene-cast 的 activeSpeakerCount 旋钮可用了:它此前声明在 chat-mode-narrator(另一个插件作用域),滑块永远到不了真正裁剪 cast 的插件(恒为 2),而 narrator 却被告知一个 cast 永远达不到的人数。设置已移到 scene-cast;narrator 改以注入的 <active-cast> 为准。
    • living-world-rules 不再静默丢规则:triggered/evolving 规则不填关键词时会映射成关键词门控的 lorebook 条目、永不激活,却显示为 enabled。现在只有带关键词的 triggered 才门控,其余常驻。
    • cost-gate 中止可见:主回合的硬预算中止此前发出空的 execution.completed 且无任何信号;现在带 abortReason(protocol + SSE + UI),玩家会看到原因而非静默空回合。
    • chat-mode-narrator 不再每回合双重注入 active-cast 与 NPC 关系上下文(正文内联 {{ inputs }} + input.inject 各一份)。
    • 玩家面板去术语化:裸 JSON「完整导入」文本框(player-identity / living-world-rules / character-blueprint)和裸 JsonView「已保存…」倒数据,换成结构化卡片(新增通用 EntryCard isActive 角标标记当前生效的玩家口吻);删除了 codex 的死 ui.message spec 和与总览重复的原始 JSON world-entries tab。
    • 运行时写出的字符串本地化:工具/hook 写出的标签/正文绕过 i18n 门禁、对 en 玩家显示中文——scene-prompts / guide 徽标(改 I18nText)、director 前言 + pregame 欢迎语(改 ctx.locale 解析)、chat-mode-narrator 正文(补 PLUGIN.en.md)。check-plugin-i18n 扩展到扫描 handler .js 的 label/title/placeholder 字面量以防回归(它抓到了一个真实的 pregame 泄漏)。
    • memory.character_relationships 重新限定为玩家中心的羁绊,与 npc-graph 的 NPC↔NPC 图谱互补而非重复(经仔细排查:盲目合并会退化玩家关系的连续性)。

What's Changed

Full Changelog: v0.0.9...v0.0.10