Repository navigation
Covel v0.0.10
[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). Aworld.yamlcan now declare per-plugin defaults for any plugin'suserSettings, keyedpluginId → settingKey → value. They form the middle layer of a three-tier resolution chain — player override → world default → manifest default — merged at the turn boundary intoTurnInput.userSettingsand 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. Seedocs/reference/world-data.md. - World-declared core-memory blocks (
memoryBlocks). A world can add genre-specific memory dimensions (a detective world'sclues/suspects, a business sim'sdeals/rivals) without forking a plugin — same shape as a plugin'smemoryBlocks. 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/slideruser-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.mjsand wired to thecharacter-presenceplugin throughmedia+presenceworld-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: acost-gatebudget guardrail). Prompt spec inworlds/PORTRAITS.md; shipping contract indocs/reference/world-data.md. - Hot-reload
llm.tomlwithout restarting. Settings → LLM gains a Reload config button (POST /api/llm-config/reload) that re-readsllm.tomland 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 malformedllm.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 newerrorfield onGET /api/llm-configand 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. Seedocs/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
CharacterAvatarjson-render component. It reads presence records from a source plugin/namespace named in the spec (char-creator wires it tocharacter-presence/presence) — keeping the framework component free of any hard-coded plugin id, mirroring howImageGallerytakes itspluginIdby prop. Matching tolerates the<sessionId>-<characterId>ids the character list uses against the barecharacterIdthe 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/descriptionnow accept anI18nText(plain string or{ "zh-CN": …, "en-US": … }record), and aworld.yamlcan ship its owncharacterAttributesarray.world-init's guard writes it verbatim as the session'scharacter-attributesschema — 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'saffectionshows as 好感度 / Affection instead of a rawaffectionkey 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. Seedocs/reference/world-data.mdanddocs/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-renderImagecomponent gains azoomprop, 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. TheImagecomponent also gains aframedprop (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-replyreply-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 hardcodednarrator/chat-mode-narratorid), 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.
userSettingsis now the single source for player-tunable plugin settings; the dead, never-consumedconfigmanifest field is removed. A stragglerPLUGIN.mdthat still declaresconfig:is stripped with a deprecation warning rather than failing to load. ThePluginUserSettingSpectype 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 inresolveUserSettings, 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-levelrequiredPlugins/recommendedPlugins/excludedPluginsnow fold (de-duplicated) intopluginPolicyat world-load time, soWorldRecord.metadatacarries plugin selection in one place. The top-level fields remain valid inworld.yamlfor back-compat. Per-turn world reads are served from a short-TTL per-worldIdcache. - 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/tidesmemory blocks; Haruka grows to eight characters across five routes withrelationships/promises/rumors/festivalmemory. The redundantcloudmereandneonridgestory worlds move toworlds/_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 decodedX-Plugin-User-Settings, so in the scheduled loop every runtime'suserSettingscollapsed to manifest defaults — a player's UI-tuned values (chat-mode-narrator'sdialogueRatio, 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-Settingswas 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 worldpluginSettingslayer. It now carries only the keys a player explicitly set (store.has()). - Archived bundled worlds no longer linger in existing users' databases.
seedWorldsonly 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 touchesmetadata.source === "file"worlds (AI-generatedgenerated/generated-fileworlds 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. Seedocs/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
modelPresetIduserSetting. 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-Settingsheader. Seedocs/guide/desktop-config.md. - Creating a world that ships portraits no longer 500s on SQLite (
database is locked).POST /api/sessionswrapscreateSession+ world-data import in a singlewithTransaction. WithSTORE_BACKEND=sqlite, the mirror media store opened a second connection to the samecovel.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-presenceright 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 (repeatover the presence entries → oneImageper character, captioned bydisplayName), 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 sharedchat-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 onGET /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 customPortraitGallerycomponent: 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 newPOST /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+mediasources). - 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, neverCOVEL_MEDIA_TOKEN_SECRET. SoGET /api/sessions/:id/media-token500'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-setCOVEL_MEDIA_TOKEN_SECRETvia process env / a repo.envstill 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), andplayer-identity(player voice) each declaredgroup: "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 dropscharacter-blueprintfrom its recommended set — a dialogue-mode cast-authoring tool that overlapschar-creatorfor 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 — whilelorewas already locale-resolved at load.buildWorldContextViewnow deep-resolves the dimensions to the session locale (new sharedresolveI18nDeep), so the narrator (andworld-init/schema-gen) see one language. As a bonus,tone/openingScenarionow extract correctly when authored as i18n records (the oldtypeof === "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
mergeSchemaDefaultsmerges declared schemadefaultValues into storedfieldsin bothcreate-characterand the player-init guard, so the panel (which overlaid defaults at render), the model'sget-character, and the prompt context finally agree — previously the panel showedhp 100/100that existed in neither the record nor the prompt. scene-castactiveSpeakerCountknob works. It was declared onchat-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 ontoscene-cast; the narrator defers to the injected<active-cast>.living-world-rulesno longer silently drops rules. Atriggered/evolvingrule saved without keywords mapped to a keyword-gated lorebook entry that never activated, yet showed as enabled. Only keyword-bearingtriggeredrules are now keyword-gated; everything else is always-on.cost-gateaborts are visible. A hard-budget abort on the main turn emitted an emptyexecution.completedwith no signal; it now carriesabortReason(protocol + SSE + UI) so the player gets a reason instead of a silent empty turn.chat-mode-narratorstops double-injecting the active-cast and NPC-relationship context each turn (inline{{ inputs }}+input.injectboth 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 genericEntryCardisActivebadge marks the active player voice); the deadcodexui.messagespec and the redundant raw-JSONworld-entriestab 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), andchat-mode-narrator's prompt body (addedPLUGIN.en.md).check-plugin-i18nwas extended to scan handler.jslabel/title/placeholderliterals so the class can't regress (it caught a real pregame leak). memory.character_relationshipsre-scoped to player-centric bonds so it complements rather than duplicatesnpc-graph's NPC↔NPC graph (a careful check showed a naive merge would have regressed player-relationship continuity).
- Character defaults persist at the write boundary. New
中文(备份翻译)
一次插件配置整理:世界现在能为任意插件预置玩家可调设置、声明题材专属的记忆维度,玩家的 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 角色面板每一行现在以角色立绘的小头像角标开头,通过新增的通用
CharacterAvatarjson-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-attributesschema,并且优先于跨 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-renderImage组件新增zoom属性,角色立绘画廊与角色列表头像角标都启用它,图像画廊也改为复用同一个 dialog——放大 + 下载到处一致。头像角标会阻止点击冒泡,避免顺带折叠外层卡片。Image组件还新增framed属性(圆角边框卡片 + hover),让立绘画廊的缩略图和图像生成画廊的卡片视觉一致——看起来像一家人。放大视图是贴合图片的紧凑 lightbox(w-auto),而不是图片浮在大片空白里。 branch-reply「换一个回复」复活为可用功能:这个 GalGame「在 AI 回复间滑动切换」的插件随两个默认世界发布,却是永久不可见的死功能——自举死锁:唯一写候选的入口藏在一个永不渲染的块里的按钮后。现在是真正可用的自动 seed 滑动:每个叙事回合把 narrator 的回复捕获为「原始」(引擎无关——按叙事输出契约发现,不硬编码narrator/chat-mode-narratorid),重新生成控件用 LLM(fast slot、会话语言)产出真实的不同说法供对比,采纳后重写 prompt 历史。原始回复不会被再渲染成卡片,所以一条回复绝不出现两次;旧的英文死板填充已删除。
Changed
- 单一插件配置声明:
userSettings现为玩家可调设置的唯一来源;死的、从未被消费的configmanifest 字段被移除。仍声明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 插件(如图像生成)通过
modelPresetIduserSetting 指定其 provider slot。开局准备界面此前只读这个设置的 manifest 默认值,所以永远显示默认 slot —— 即使玩家明明配了可用的同类 slot,也会标红「缺少 [covel.<默认>]」,且除了去 Settings → Plugins 改外无法就地指定。现在该行反映玩家的有效覆盖并提供就地下拉选择;选中一个已配置的 slot 即可消除警告,覆盖值通过(本版已修复的)X-Plugin-User-Settingsheader 传到 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+mediasource)批量导入。 - 桌面端媒体(立绘、生成图)不再加载失败:打包桌面 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「已保存…」倒数据,换成结构化卡片(新增通用EntryCardisActive角标标记当前生效的玩家口吻);删除了 codex 的死ui.messagespec 和与总览重复的原始 JSONworld-entriestab。 - 运行时写出的字符串本地化:工具/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