Link protocol 3; a session the client opens runs on the chat's model or not at all
- LEMBAS_PROTOCOL, the device protocol and the protocols the CLI logs in to and links with are 3 alone (harness/acp.md *Versions*). A server listing only 1 and 2 is refused at login and at every dial — before anything is dialled — with its version and protocols and "update the server, or use LLeMbas CLI 1.x with it"; a newer one is told to update the CLI (ProtocolError). A 4400 stops the link with the same advice. The old downgrade to protocol 1 is gone. - session/new's result says `instance`: whether the session's model is the link's instance's. - `lembas_model` is the model, full stop: a device not logged in to the link's instance, a link with no instance (serve --stdio), or a model the instance does not serve to this device is -32602 with the reason, never a session on the device's own model. `_lembas/configure` naming such a model is refused likewise and the session keeps its model. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
7 files changed
+151
-66
No files matched your search
@@ -396,8 +396,12 @@ test("a denial, another service, and another protocol are each said plainly", as
|
||||
await expect(login(fake.url, { ...quick, onCode: () => {} })).rejects.toThrow("denied")
|
||||
fake.stop()
|
||||
|
||||
// A newer server: the CLI needs updating; a 1.x server (1 and 2): the server does (2.0 speaks 3 alone).
|
||||
fake = lembas({ protocol: PROTOCOL + 1 })
|
||||
await expect(login(fake.url, { ...quick, onCode: () => {} })).rejects.toThrow("device protocol")
|
||||
await expect(login(fake.url, { ...quick, onCode: () => {} })).rejects.toThrow("Update LLeMbas CLI")
|
||||
fake.stop()
|
||||
fake = lembas({ protocol: 2 })
|
||||
await expect(login(fake.url, { ...quick, onCode: () => {} })).rejects.toThrow("needs a LLeMbas 2.0 server (protocol 3). Update the server, or use LLeMbas CLI 1.x with it.")
|
||||
fake.stop()
|
||||
|
||||
const other = Bun.serve({ port: 0, fetch: () => new Response("hello", { status: 404 }) })
|
||||
|
||||
Reference in new issue
Block a user