DF0080: Agent In-Page Function Not JSON-Serializable
An in-page channel function sets `agent` but `jsonSerializable` is `false`.
Message
In-page channel function "" hasagentset butjsonSerializableisfalse; MCP requires JSON-serializable data.
Cause
The agent field exposes an in-page function over the browser-to-node agent bridge and MCP, which only consumes JSON-shaped data, so it implicitly enables strict JSON serialization. An explicit jsonSerializable: false conflicts with that contract.
Example
import { createPageScriptChannel } from 'devframe/in-page-channel'
createPageScriptChannel({
name: 'devframes:example',
functions: {
addTodo: {
agent: { description: 'Add a todo item.' },
jsonSerializable: false, // ✗ throws DF0080
handler: (text: string) => ({ added: text }),
},
},
})Fix
Remove jsonSerializable: false to use the implicit JSON contract, or remove agent to keep the function channel-only.
const addTodo = {
agent: { description: 'Add a todo item.' }, // jsonSerializable is inferred true
handler: (text: string) => ({ added: text }),
}Source
packages/devframe/src/in-page-channel/internal.ts:createLocalFunctionRegistry().register()throws this when a definition combinesagentwithjsonSerializable: false, and infersjsonSerializable: trueotherwise.
DF0079: MCP Enabled Without @devframes/agentic
The mcp option is enabled, but the optional peer "@devframes/agentic" could not be loaded: {reason}
DF8000: Devframe Id Collides With a Reserved Hub Path
Devframe id "{id}" collides with a reserved hub path; it cannot be mounted directly under the hub base.