lembas remote: manage remote: without YAML; a running service follows it

`lembas remote list | add | remove | enable | disable | mode | terminal`, with
`--json` printing {enabled, roots, max_mode, terminal}, for LLeMbas Desktop.
Writes go through the global config writer and keep comments.

The device's limits are now live getters over the remote: block, re-read when
config.yaml's stat changes. `lembas service` links even with remote work off
or no roots: it says roots: [] and refuses every session, directory and
terminal, so the instance can tell "no folder allowed yet" from "not running".
When what the instance was told changes, the link re-dials once nothing is
working, so `lembas remote add` or `enable` takes effect without a restart.
Harness spec 1.0.1 documents both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
HomerandClaude Opus 5.5 committed 2026-10-14 18:15:59 +00:00
1 parent fb8e6eb636
commit 479f647cc9
13 files changed
+636 -32

No files matched your search

+8
View File
@@ -40,6 +40,12 @@ Usage:
lembas serve --stdio an ACP agent on stdin/stdout, for an editor that speaks ACP
lembas service install | uninstall | status | logs [-f] | run
work from a LLeMbas instance as a background service (remote:)
lembas remote list | add <dir>… | remove <dir>… | enable | disable
| mode <manual|edit|auto|plan> | terminal <on|off> [--json]
what the instance may do here (remote:): the directories it may
work in (add turns remote work on), the most permissive mode,
terminals; a running service applies a change within seconds
(--json: one object, {enabled, roots, max_mode, terminal})
lembas mcp [list] connect the MCP servers and list their tools and prompts
lembas mcp auth <server> sign in to a remote MCP server (OAuth)
lembas mcp logout <server> forget a server's stored sign-in
@@ -168,6 +174,8 @@ async function main() {
if (cmd === "login" || cmd === "logout") return void (await loginCommand(cmd, argv.slice(1)))
if (cmd === "remote") process.exit((await import("./remote.ts")).remoteCommand(argv.slice(1)))
// A webui connection's models are the instance's as they are now: read before anything that
// loads the configuration to use it. A few seconds at most; an instance that does not answer
// leaves what it said last.