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:
13 files changed
+636
-32
No files matched your search
+1
-9
@@ -6,7 +6,7 @@ import { mkdirSync, mkdtempSync, realpathSync, writeFileSync } from "node:fs"
|
||||
import { tmpdir } from "node:os"
|
||||
import { join } from "node:path"
|
||||
import { AcpAgent, clampMode, underRoots, type Limits } from "../src/acp/agent.ts"
|
||||
import { LinkError, runLink } from "../src/acp/link.ts"
|
||||
import { runLink } from "../src/acp/link.ts"
|
||||
import { Peer, type Transport } from "../src/acp/rpc.ts"
|
||||
import { paths } from "../src/config/paths.ts"
|
||||
import { setTrust } from "../src/project/root.ts"
|
||||
@@ -300,14 +300,6 @@ test("an approval nobody answers is a denial", async () => {
|
||||
expect(fake.requests[1].messages.at(-1).content).toContain("Nobody answered")
|
||||
})
|
||||
|
||||
test("the link: off unless the device says so", async () => {
|
||||
mkdirSync(paths.config, { recursive: true })
|
||||
writeFileSync(join(paths.config, "config.yaml"), "")
|
||||
await expect(runLink()).rejects.toBeInstanceOf(LinkError)
|
||||
writeFileSync(join(paths.config, "config.yaml"), "remote:\n enabled: true\n")
|
||||
await expect(runLink()).rejects.toThrow("remote.roots is empty")
|
||||
})
|
||||
|
||||
test("the link dials out with the token, says hello, is driven, and stops when refused", async () => {
|
||||
fake = fakeProvider([{ chunks: [delta({ content: "linked reply" })] }])
|
||||
const root = project()
|
||||
|
||||
Reference in new issue
Block a user