Repository navigation
Covel v0.0.20
[0.0.20] - 2026-07-25
A follow-up to the cleanup release, from watching real sessions run. Three fixes, all found by reading traces rather than tests: a runtime could report success having done nothing, a hazard warning fired every turn regardless of the truth, and several runtimes were handed tools their own prompts told them never to call.
Fixed
- A bare
runtime-doneno longer satisfiesrequireToolUse. A runtime whose whole declared job is to call a tool could finish as a success having called only the framework's loop terminator. Seen in production withscene-prompts: the model answered with prose, the gate nudged it once, and the model replied by callingruntime-donewith the reason "完成 scene prompts 生成" — the actual work tool was never called. The turn reported success in 47.6s and the player got an empty quick-reply panel behind a green check. Two paths let it through: the gate counted any successful call, terminator included, and the runtime-done early exit breaks the loop before the gate runs. Both now require a business tool call, and an unmet contract finalizes asfailedwith a diagnostic instead of an empty success. - UI effects hazards are reported per slot, not per plugin. Any manifest declaring a
uiblock was credited with writingui:*, so every pair of UI-declaring runtimes in a DAG layer was flagged — nine warnings in a three-turn session, all false: a right-panel plugin cannot overwrite a message block.EffectResourcenow admitsui:<slot>and the derivation emits one key per declared slot.ui:*still wildcard-matches them, so an explicit declaration keeps its meaning, and two plugins that really do share a surface still hazard.
Changed
- Runtimes no longer receive tools their prompts forbid. Five declarations were paid for twice — once in the tool schema on every LLM call, once in the prompt text spent forbidding them.
character-trackerdroppedlist-characters(its roster is injected as<existing-characters>), both imageprompt-generatorruntimes droppedplugin-data-list(they inject thepromptsnamespace), andworld-init/schema-gendroppedplugin-data-get/plugin-data-list(it writes during setup and never reads back).get-characterandlist-npc-graphstay: unlike the others they are the documented escape hatch for a truncated snapshot, and a live session confirmedget-characterbeing used exactly that way.extractor's guidance, which said "无需调用" in bold and then described when to call it eight lines later, is now one instruction.
The cleanup release, following a full audit of the core framework. Nothing here adds capability; it removes surface that was declared but never honoured, and closes the security gaps that hid behind it.
Breaking — six PLUGIN.md fields no longer parse. A manifest declaring any of them fails to load, so check yours before upgrading. None of them did anything at runtime, so removing them changes no behaviour except that the declaration is now an error instead of a silent no-op.
Removed field Replacement prioritystage(setup/pre-turn/narrative/post-turn/audit)upstreamRequiredneeds(same entries; turn-scoped by default)jobStatus— (its legacyViewsprojection had no reader)tools.localregister in the entrymodule viacovel.registerTool, then list the names undertools.pluginsuspensionSafe— (no handler replay exists to guard) rpc streaming— (dispatch is always synchronous; progress travels as plugin-data.changedSSE from a background job)
priority,upstreamRequiredandtools.localproduce a load error naming their replacement. One sharp edge inherited from the rpc parse policy: an unrecognized key skips the wholerpcblock rather than the offending action, so a plugin that declaredstreamingloses every rpc action at once — the warning names the file, line and key.
Added
- The test-runtime harness loads entry-registered tools.
pnpm test:runtimeruns a plugin'stests/runtime-cases.jsonthrough the real turn executor, so a case can have the mock LLM call the plugin's own tools — it never could, because the harness only ever readtools.localand every plugin moved toentryin v0.0.14. The concrete cost was the scaffolding template:templates/plugin-with-toolsships a case whose LLM callsrecord-note, so a new author's firstpnpm test:runtimefailed on a tool that was never registered. The harness now runs theentrymodule with aPluginAPIthat implementsregisterTooland no-ops hooks / RPC / wires (server-bootstrap concerns a single-runtime harness turn never reaches), and a name collision with a framework tool throws rather than quietly shadowing it.
Fixed
- Tool calling on the Anthropic adapter.
createAnthropicMessagesAdapternever serializedparams.toolsand dropped every tool-role message, so an agent runtime routed to ananthropic-messages-v1slot sent no tool definitions, got no tool calls back, and produced no proposals — no character updates, no plugin data, no image generation. It degraded to plain narration with nothing logged as an error while the protocol registry advertisedfunction_callingall along. create-notificationrenders again. The tool returned{ notified: true, level }, which the runtime never promotes (only a result carryinguiorinteractionis proposed) — the model was told the notification succeeded and the player saw nothing. It now returns the nestedAlertspec the renderer expects.- SVG media is rejected on upload and sandboxed on read.
POST /api/mediaacceptedimage/svg+xmlunder itsimage/*check andGET /api/media/:idechoed the MIME back with noContent-Disposition; a session owner could upload a scripted SVG, get a correctly signed URL, and read the web tier's localStorage provider keys from the app origin. Stored rows predating the ban are served as sandboxed attachments. - Provider-key availability requires the operator token.
GET /api/provider-keysgated only its raw-key branch, so on demo/commercial an anonymous caller still got a masked listing revealing which providers were configured plus the first and last four characters of each key. The whole route is now behindcheckHostedOperator(a strict no-op on self/desktop). - Community local-tool factories get the deny-all store. The unified
entrypath already scoped a community plugin's store, but thetools.localfactory path injected the raw DataStore for every trust tier — a community plugin could calllistSessions()or touch any session's plugin_data, bypassing proposal → validate → commit. Both paths now sharescopeStoreToPlugin. - Media-GC scans page soundly.
buildProtectedMediaIdspaged four lists by offset over a non-total order (two had noORDER BYat all), so a concurrently-upserted row could slip between pages and lose its media id — a destructive cleanup would then delete still-referenced bytes. All four now order by(createdAt, id). - Locale variants inherit what they omit.
reconcileValuetreated any field aPLUGIN.<locale>.mddid not declare as drift, forcing every translation to mirror the whole canonical manifest — and a mirrored manifest goes stale silently. An omitted field now inherits; a field declared with a different value still overrides and still warns. - Unknown-field load errors name the field. Zod reports
unrecognized_keyswith an emptypath, so every unknown-field failure fell through to the "ensure the file begins with---" hint even though the frontmatter parsed fine. The hint now readsissue.keys, and removed scheduling fields point at their replacements.
Removed
- Legacy scheduling fields.
priority,upstreamRequiredandjobStatusare rejected by both manifest schemas — a PLUGIN.md declaring any of them fails to load with a hint pointing atstage/needs. The compat fold (stageForPriority,aliasUpstreamRequired) and the never-readjobStatus.legacyViewsprojection are gone, and theRuntimeManifesttype no longer carries the fields. - Inert manifest fields
suspensionSafeand rpcstreaming. Both were accepted and stored but never read: no handler replay exists (resumeSuspendedRuntimere-enters the shared agent tool loop without re-invoking the handler), and rpc dispatch is unconditionally synchronous. Removing them changes no runtime behaviour. - The
tools.localregistration path. It was the last loader that imported plugin code by frontmatter path. Plugin tools register in theentrymodule (covel.registerTool) and a runtime declares their names undertools.plugin; every bundled plugin moved in v0.0.14 and the field's own doc had promised removal in v0.0.17. Deleting it also removes — rather than patches — the trust asymmetry the audit found: theentrypath scoped a community plugin's store to a deny-all view while this one injected the raw DataStore.local-tools.ts(240 lines) collapses toplugin-tool-access.ts(23);activatePluginServerCodenow does exactly what its name says. - Four designs that were drafted and never wired —
prompt-delta(+RuntimeOutput.metaData.rawPromptDelta),runtime-slot-resolver, and the json-render presets. Each was reachable only from a barrel export and a test that supplied the input no producer ever supplied.GET /runtime-outputs/:id/full-promptnow returns history and states plainly that the system prompt and injected segments are absent;trace_eventsremains the exact path.
Changed
- Two identifiers renamed to match what they do —
NormalizedRuntimeSpec.provenance.legacyFields→derivedFrom(it records only live normalizations now), and theactivatePluginLocalToolsHono context key →activatePluginServerCode. - Redundancy the audit flagged. The snapshot payload builder read every
turn_resultsrow for a session to build a plugin-id set, then filteredplugin_databy it — a filter that could never drop anything, since the set is the union of both sources. Long sessions paid a full-table read (each row carrying its complete runtimeResults payload) for a no-op. Also folded away an identity function (summarizeStorageMigrations→ theSTORAGE_MIGRATIONSconstant), a nine-linevector-factory.tswhose comment explained there is no factory, a second identicalTimeCursordefinition, and the unconsumedResolvedTool/ToolClient/ToolDefinitiontypes. - Ponytail debt is now a ledger.
PONYTAIL-DEBT.mdlists the 19 deliberate shortcuts still carried, each with the ceiling it accepts and the observation that should trigger revisiting it. Six markers that explained why the code is shaped as it is — rather than naming something owed — were downgraded to plain comments so the list stays readable. - Docs realigned to the shipped surface. Removed the deleted
POST /api/sessions/:id/turnendpoint from the API reference, corrected pointers at moved/deleted modules, and rewrote every passage that described removed features as still-live compat — the reference docs now describe the current shape only, with history left to this changelog.
What's Changed
Full Changelog: v0.0.19...v0.0.20