Skip to content

lmgw 0.4.3

Choose a tag to compare

@github-actions github-actions released this 09 Oct 22:14
· 12 commits to main since this release

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_profile setting 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_set and lmgw__profile_delete manage 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.
  • Approvals for MCP tools. require_approval on a thread (or folder default) stops a turn at a gated call.
    • The thread reports pending_approvals; POST /chat/api/threads/{id}/approvals decides, and the resumed reply streams on as its starter. A new message declines what waits. approval.requested and approval.decided events on the feed, the tool frame and the realtime mcp_approval_* items carry the call's call_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.
  • 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_result pair placed in chronological order, never while a turn runs, and a send, edit or regenerate keeps it.
    • GET /chat/api/threads/{id}/tasks lists a thread's jobs, POST /chat/api/threads/{id}/tasks/{task}/cancel cancels one, and POST /chat/api/threads/{id}/answer lets the model answer results that arrived while nobody was talking.
    • Bound voice sessions hear lmgw.task.done and 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_tasks on GET /api/mcp-servers).
    • device.revoked is a stored feed event for a deleted paired device, so a host can cancel the jobs that device started. A disable says nothing.
  • Devices host MCP tools. A paired device can serve tools over GET /mcp/host; initialize tells it the link's limits (lmgw/host_limits in _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.
  • /mcp passes resources through, namespaced by tool prefix, with MCP Apps metadata: tools/list stamps each tool with _meta["lmgw/server"], and the Chat tool frame gains server_label, ui_resource and structured_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 says tool_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.
  • structuredContent stays 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/responses all 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.sh runs the suite under load.
    • The self-update code moved into the lmgw-update crate; 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.