Repository navigation
lmgw 0.4.3
Personality profiles, approvals and late results for MCP tools, and client devices that host tools of their own.
- Personality profiles. A profile bundles a system prompt, reasoning settings and a voice, and shapes a thread's turns.
- Assign one to a thread or a folder's defaults; the
chat_profilesetting names the Chat's profile for new threads. A folder with no profile inherits the Chat's; it does not mean "none". A spoken session follows its thread's profile from the next response. - Edit them at
/chat/profiles(also Settings → Chat profile), with a drawer and folder picker, header chip and voice-panel chip in the Chat. Preview, voice Test and Speak work on an unsaved draft; a built-in profile can be reset. Unsaved edits ask before another profile opens, and Discard on a new profile drops the draft. - The self-admin tools
lmgw__profiles,lmgw__profile_setandlmgw__profile_deletemanage them. A device may change a profile that steers the admin tools only while it may write with them (403 profile_in_admin_use), and a device's TTS alias is checked against its key's scope.
- Assign one to a thread or a folder's defaults; the
- Approvals for MCP tools.
require_approvalon a thread (or folder default) stops a turn at a gated call.- The thread reports
pending_approvals;POST /chat/api/threads/{id}/approvalsdecides, and the resumed reply streams on as its starter. A new message declines what waits.approval.requestedandapproval.decidedevents on the feed, the tool frame and the realtimemcp_approval_*items carry the call'scall_id. - The dashboard shows Approve and Decline on the call's card, per card or as a batch.
- A device can only tighten the rules: a write that gates fewer calls is
403 approval_loosen_refused, and it decides only within its own reach (approval_out_of_scope). The owner's approval floor per thread and folder always holds, under either spelling of a tool's name.
- The thread reports
- Late tool results (MCP Tasks). An MCP server that answers a tool call with a task no longer holds the turn.
- The result enters the thread when it arrives, as an
lmgw__job_resultpair placed in chronological order, never while a turn runs, and a send, edit or regenerate keeps it. GET /chat/api/threads/{id}/taskslists a thread's jobs,POST /chat/api/threads/{id}/tasks/{task}/cancelcancels one, andPOST /chat/api/threads/{id}/answerlets the model answer results that arrived while nobody was talking.- Bound voice sessions hear
lmgw.task.doneand the continuation is spoken. The dashboard shows a card (Job · tool · status) and a strip of the thread's jobs with Cancel; the server list counts open tasks (open_tasksonGET /api/mcp-servers). device.revokedis a stored feed event for a deleted paired device, so a host can cancel the jobs that device started. A disable says nothing.
- The result enters the thread when it arrives, as an
- Devices host MCP tools. A paired device can serve tools over
GET /mcp/host;initializetells it the link's limits (lmgw/host_limitsin_meta). Closes say why (a deleted key is 4003; of two links the newer stays). A run calls only the tools it was offered. The dashboard's reach list shows a device chip. /mcppasses resources through, namespaced by tool prefix, with MCP Apps metadata:tools/liststamps each tool with_meta["lmgw/server"], and the Chat tool frame gainsserver_label,ui_resourceandstructured_content. App-only tools stay out of model runs.- Colliding tool names no longer shadow each other. Both tools move to
<server>__<tool>(the server's own name still goes upstream; the frame saystool_moved), stable across restarts. A key's deny list holds under every name a tool has; an allow list admits only the name it names; a built-in's switch does not reach a server's tool. structuredContentstays out of the model when a result also has text content: clients and app views get it, the model reads the text.- Gemini tool loops keep their thought signatures. The signature rides in the call's id and goes back to Gemini; an unsigned step gets the skip value. Chat completions, Messages and
/v1/responsesall pass it. - Fixes.
- The Chat page follows results stored before its own send in place, without a reload.
- Test flakes were fixed (a Stop sent before a start, the VRAM sampler, realtime and agent waits);
scripts/flake-hunt.shruns the suite under load. - The self-update code moved into the
lmgw-updatecrate; the feed's auth header goes only to the feed's own origin.
Upgrading: migrations 0071 to 0078 run on start (profiles, device MCP rows, tasks, pending approvals, a message's task, the approval floor, a message role index, known tools). Tools whose names collided are now prefixed by their server, so clients that called the bare name of the shadowed tool should list tools again.