1480 lines
34 KiB
JSON
1480 lines
34 KiB
JSON
{
|
|
"about": "LLeMbas connection 1 (connection.md §11; the words: connection.json `codes` and `steps`). A condition → its machine code and the English sentence a person reads, or null when nothing is wrong. `condition.kind`: `network` (`error`: `dns`, `refused`, `reset`, `timeout`, `tls`); `discovery` (the answer to GET /.well-known/lembas.json: `status`, `json` false when the body is not JSON, `service` what it says); `http` (any other request's `status`, `retry_after` and `challenge` the `Retry-After` and `WWW-Authenticate` headers as sent); `close` (the link's close `code`); `versions` (`mine`, `theirs`, as conformance/version.json); `state` (`code` itself: a condition the client knows without asking). `vars`: `host` (default: \"the server\"), `product` (default `cli`), `version`, `needed`, `mine`, `other`, `status`, `stdio`, `minimum` (true: the sentence for a client below the server's `min_clients`) (true: the sentence of a client of lembas serve --stdio, where the code has one). The sentence is the code's text with the variables filled in, then the product's own step where it has one. A host's name is never changed; the stand-in for a host nobody named takes a capital where it begins the sentence. A 429 also answers `retry_s`, from `Retry-After`: whole seconds as sent, at least 1 and at most connection.json `retry_after.ceiling_s`; null for a header that is absent, a date or anything else (the client's own schedule decides). A 401 is `signed_out` only with the server's own challenge, `Bearer realm=\"lembas\"` (connection.json `challenge`; the scheme in any case of letters, the realm quoted or not): the server's /v1 passes a model provider's status through, so a 401 without it is `failed` — the server's own sentence is shown, and nobody is signed out.",
|
|
"cases": [
|
|
{
|
|
"condition": {
|
|
"kind": "network",
|
|
"error": "dns"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "cli"
|
|
},
|
|
"expect": {
|
|
"code": "unreachable",
|
|
"text": "Cannot reach ai.example.org."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "network",
|
|
"error": "refused"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "cli"
|
|
},
|
|
"expect": {
|
|
"code": "unreachable",
|
|
"text": "Cannot reach ai.example.org."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "network",
|
|
"error": "reset"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "cli"
|
|
},
|
|
"expect": {
|
|
"code": "unreachable",
|
|
"text": "Cannot reach ai.example.org."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "network",
|
|
"error": "timeout"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "cli"
|
|
},
|
|
"expect": {
|
|
"code": "timeout",
|
|
"text": "ai.example.org did not answer in time."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "network",
|
|
"error": "tls"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "cli"
|
|
},
|
|
"expect": {
|
|
"code": "tls_untrusted",
|
|
"text": "The TLS certificate of ai.example.org is not trusted. Pass --ca <file> with the CA that signed it."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "network",
|
|
"error": "tls"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "tls_untrusted",
|
|
"text": "The TLS certificate of ai.example.org is not trusted. Install the CA that signed it on this computer."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "network",
|
|
"error": "tls"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "tls_untrusted",
|
|
"text": "The TLS certificate of ai.example.org is not trusted. Install the CA that signed it on this phone."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "network",
|
|
"error": "tls"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "nvim"
|
|
},
|
|
"expect": {
|
|
"code": "tls_untrusted",
|
|
"text": "The TLS certificate of ai.example.org is not trusted."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "network",
|
|
"error": "refused"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "unreachable",
|
|
"text": "Cannot reach ai.example.org."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "discovery",
|
|
"status": 200,
|
|
"json": true,
|
|
"service": "lembas"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "android"
|
|
},
|
|
"expect": null
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "discovery",
|
|
"status": 200,
|
|
"json": true,
|
|
"service": "other"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "not_lembas",
|
|
"text": "ai.example.org answers, but is not a LLeMbas server."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "discovery",
|
|
"status": 200,
|
|
"json": true
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "not_lembas",
|
|
"text": "ai.example.org answers, but is not a LLeMbas server."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "discovery",
|
|
"status": 200,
|
|
"json": false
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "not_lembas",
|
|
"text": "ai.example.org answers, but is not a LLeMbas server."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "discovery",
|
|
"status": 404,
|
|
"json": true
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "not_lembas",
|
|
"text": "ai.example.org answers, but is not a LLeMbas server."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "discovery",
|
|
"status": 500,
|
|
"json": false
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "server_error",
|
|
"text": "ai.example.org answered 500."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "discovery",
|
|
"status": 502,
|
|
"json": false
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "server_error",
|
|
"text": "ai.example.org answered 502."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "discovery",
|
|
"status": 503,
|
|
"json": true,
|
|
"service": "lembas"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "server_error",
|
|
"text": "ai.example.org answered 503."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "discovery",
|
|
"status": 401,
|
|
"json": true
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "server_error",
|
|
"text": "ai.example.org answered 401."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "discovery",
|
|
"status": 403,
|
|
"json": false
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "server_error",
|
|
"text": "ai.example.org answered 403."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "discovery",
|
|
"status": 204,
|
|
"json": false
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "not_lembas",
|
|
"text": "ai.example.org answers, but is not a LLeMbas server."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "discovery",
|
|
"status": 301,
|
|
"json": false
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "server_error",
|
|
"text": "ai.example.org answered 301."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 200
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": null
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 204
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": null
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "failed",
|
|
"text": "That did not work."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 403
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "not_allowed",
|
|
"text": "ai.example.org did not allow this."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 404
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": null
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 429,
|
|
"retry_after": "7"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "busy",
|
|
"text": "ai.example.org is busy just now.",
|
|
"retry_s": 7
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 429,
|
|
"retry_after": "0"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "busy",
|
|
"text": "ai.example.org is busy just now.",
|
|
"retry_s": 1
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 429,
|
|
"retry_after": "600"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "busy",
|
|
"text": "ai.example.org is busy just now.",
|
|
"retry_s": 300
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 429,
|
|
"retry_after": "Wed, 21 Oct 2026 07:28:00 GMT"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "busy",
|
|
"text": "ai.example.org is busy just now.",
|
|
"retry_s": null
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 429
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "busy",
|
|
"text": "ai.example.org is busy just now.",
|
|
"retry_s": null
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 429,
|
|
"retry_after": " 12 "
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "busy",
|
|
"text": "ai.example.org is busy just now.",
|
|
"retry_s": 12
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 429,
|
|
"retry_after": "-3"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "busy",
|
|
"text": "ai.example.org is busy just now.",
|
|
"retry_s": null
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 429,
|
|
"retry_after": "1.5"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "busy",
|
|
"text": "ai.example.org is busy just now.",
|
|
"retry_s": null
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 500
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "server_error",
|
|
"text": "ai.example.org answered 500."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 502
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "server_error",
|
|
"text": "ai.example.org answered 502."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 503,
|
|
"retry_after": "30"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "server_error",
|
|
"text": "ai.example.org answered 503."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 400
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": null
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "failed",
|
|
"text": "That did not work."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401
|
|
},
|
|
"vars": {
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "failed",
|
|
"text": "That did not work."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "close",
|
|
"code": 1000
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "2.0.0"
|
|
},
|
|
"expect": {
|
|
"code": "unreachable",
|
|
"text": "Cannot reach ai.example.org."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "close",
|
|
"code": 1001
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "2.0.0"
|
|
},
|
|
"expect": {
|
|
"code": "unreachable",
|
|
"text": "Cannot reach ai.example.org."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "close",
|
|
"code": 1006
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "2.0.0"
|
|
},
|
|
"expect": {
|
|
"code": "unreachable",
|
|
"text": "Cannot reach ai.example.org."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "close",
|
|
"code": 1008
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "2.0.0"
|
|
},
|
|
"expect": {
|
|
"code": "signed_out",
|
|
"text": "ai.example.org no longer accepts this sign-in — sign in again. Run lembas login."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "close",
|
|
"code": 1009
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "2.0.0"
|
|
},
|
|
"expect": {
|
|
"code": "unreachable",
|
|
"text": "Cannot reach ai.example.org."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "close",
|
|
"code": 1011
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "2.0.0"
|
|
},
|
|
"expect": {
|
|
"code": "unreachable",
|
|
"text": "Cannot reach ai.example.org."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "close",
|
|
"code": 1012
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "2.0.0"
|
|
},
|
|
"expect": {
|
|
"code": "unreachable",
|
|
"text": "Cannot reach ai.example.org."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "close",
|
|
"code": 4400
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "2.0.0"
|
|
},
|
|
"expect": {
|
|
"code": "server_too_old",
|
|
"text": "ai.example.org runs LLeMbas 2.0.0, which is too old for this LLeMbas CLI. Update the server. Or use LLeMbas CLI 1.x with it."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "close",
|
|
"code": 4401
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "2.0.0"
|
|
},
|
|
"expect": {
|
|
"code": "signed_out",
|
|
"text": "ai.example.org no longer accepts this sign-in — sign in again. Run lembas login."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "close",
|
|
"code": 4403
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "2.0.0"
|
|
},
|
|
"expect": {
|
|
"code": "signed_out",
|
|
"text": "ai.example.org no longer accepts this sign-in — sign in again. Run lembas login."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "close",
|
|
"code": 4409
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "2.0.0"
|
|
},
|
|
"expect": {
|
|
"code": "replaced",
|
|
"text": "A newer link of this device took its place on ai.example.org, so this one stopped. If two machines share one sign-in, run lembas login on this one to give it its own."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "close",
|
|
"code": 4000
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "2.0.0"
|
|
},
|
|
"expect": {
|
|
"code": "unreachable",
|
|
"text": "Cannot reach ai.example.org."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "close",
|
|
"code": 4409
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "replaced",
|
|
"text": "A newer link of this device took its place on ai.example.org, so this one stopped."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "versions",
|
|
"mine": [
|
|
3
|
|
],
|
|
"theirs": [
|
|
3
|
|
]
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "2.0.0"
|
|
},
|
|
"expect": null
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "versions",
|
|
"mine": [
|
|
3
|
|
],
|
|
"theirs": [
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "1.7.3"
|
|
},
|
|
"expect": {
|
|
"code": "server_too_old",
|
|
"text": "ai.example.org runs LLeMbas 1.7.3, which is too old for this LLeMbas CLI. Update the server. Or use LLeMbas CLI 1.x with it."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "versions",
|
|
"mine": [
|
|
3
|
|
],
|
|
"theirs": [
|
|
4
|
|
]
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "3.0.0"
|
|
},
|
|
"expect": {
|
|
"code": "client_too_old",
|
|
"text": "ai.example.org runs LLeMbas 3.0.0, which is newer than this LLeMbas CLI can use. Update LLeMbas CLI. Run lembas update."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "versions",
|
|
"mine": [
|
|
2
|
|
],
|
|
"theirs": [
|
|
1
|
|
]
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "1.7.3",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "server_too_old",
|
|
"text": "ai.example.org runs LLeMbas 1.7.3, which is too old for this LLeMbas Desktop. Update the server."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "versions",
|
|
"mine": [
|
|
2
|
|
],
|
|
"theirs": [
|
|
3
|
|
]
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"version": "3.0.0",
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "client_too_old",
|
|
"text": "ai.example.org runs LLeMbas 3.0.0, which is newer than this LLeMbas for Android can use. Update LLeMbas for Android."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "versions",
|
|
"mine": [
|
|
3
|
|
],
|
|
"theirs": [
|
|
4
|
|
]
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "client_too_old",
|
|
"text": "ai.example.org runs LLeMbas (an unknown version), which is newer than this LLeMbas CLI can use. Update LLeMbas CLI. Run lembas update."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "server_too_old"
|
|
},
|
|
"vars": {
|
|
"product": "vscode",
|
|
"stdio": true,
|
|
"version": "2.0.0-beta.3",
|
|
"needed": "2.0.0-beta.18"
|
|
},
|
|
"expect": {
|
|
"code": "server_too_old",
|
|
"text": "This LLeMbas for VS Code needs LLeMbas CLI 2.0.0-beta.18 or later, and found 2.0.0-beta.3. Update LLeMbas CLI."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "server_too_old"
|
|
},
|
|
"vars": {
|
|
"product": "nvim",
|
|
"stdio": true,
|
|
"version": "2.0.0-beta.3"
|
|
},
|
|
"expect": {
|
|
"code": "server_too_old",
|
|
"text": "This LLeMbas for Neovim needs LLeMbas CLI (a newer version) or later, and found 2.0.0-beta.3. Update LLeMbas CLI."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "client_too_old"
|
|
},
|
|
"vars": {
|
|
"product": "tty",
|
|
"stdio": true,
|
|
"version": "3.0.0"
|
|
},
|
|
"expect": {
|
|
"code": "client_too_old",
|
|
"text": "LLeMbas CLI 3.0.0 is newer than this LLeMbas TTY can use. Update LLeMbas TTY."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "linked"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "linked",
|
|
"text": "Linked to ai.example.org."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "connecting"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "connecting",
|
|
"text": "Connecting to ai.example.org."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "replaced"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "replaced",
|
|
"text": "A newer link of this device took its place on ai.example.org, so this one stopped. If two machines share one sign-in, run lembas login on this one to give it its own."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "not_logged_in"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "not_logged_in",
|
|
"text": "This computer is not logged in to a LLeMbas server. Run lembas login <address>."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "not_allowed"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "not_allowed",
|
|
"text": "ai.example.org did not allow this."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "disabled"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "disabled",
|
|
"text": "The link to a LLeMbas server is turned off here."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "invalid_address"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "invalid_address",
|
|
"text": "That is not a server address. Give a host name, or an http or https address."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "expired"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "expired",
|
|
"text": "The code expired before it was approved. Start the sign-in again."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "stopped"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "stopped",
|
|
"text": "Stopped."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "failed"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "failed",
|
|
"text": "That did not work."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "signed_out"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "signed_out",
|
|
"text": "ai.example.org no longer accepts this sign-in — sign in again. Run lembas login."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "not_logged_in"
|
|
},
|
|
"vars": {
|
|
"product": "nvim"
|
|
},
|
|
"expect": {
|
|
"code": "not_logged_in",
|
|
"text": "This computer is not logged in to a LLeMbas server. Run lembas login <address> in a terminal."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "not_logged_in"
|
|
},
|
|
"vars": {
|
|
"product": "vscode"
|
|
},
|
|
"expect": {
|
|
"code": "not_logged_in",
|
|
"text": "This computer is not logged in to a LLeMbas server. Run lembas login <address> in a terminal."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "not_logged_in"
|
|
},
|
|
"vars": {
|
|
"product": "tty"
|
|
},
|
|
"expect": {
|
|
"code": "not_logged_in",
|
|
"text": "This computer is not logged in to a LLeMbas server. Run lembas login <address>."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "not_logged_in"
|
|
},
|
|
"vars": {
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "not_logged_in",
|
|
"text": "This computer is not logged in to a LLeMbas server."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "not_logged_in"
|
|
},
|
|
"vars": {
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "not_logged_in",
|
|
"text": "This computer is not logged in to a LLeMbas server."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "busy"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "busy",
|
|
"text": "ai.example.org is busy just now."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "server_error"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"status": 502
|
|
},
|
|
"expect": {
|
|
"code": "server_error",
|
|
"text": "ai.example.org answered 502."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "unreachable"
|
|
},
|
|
"vars": {},
|
|
"expect": {
|
|
"code": "unreachable",
|
|
"text": "Cannot reach the server."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "client_too_old"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"minimum": true,
|
|
"needed": "2.0.0",
|
|
"mine": "2.0.0-beta.17"
|
|
},
|
|
"expect": {
|
|
"code": "client_too_old",
|
|
"text": "ai.example.org needs LLeMbas CLI 2.0.0 or later, and this is 2.0.0-beta.17. Update LLeMbas CLI. Run lembas update."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "client_too_old"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"minimum": true,
|
|
"needed": "1.0.0",
|
|
"mine": "1.0.0-beta.5",
|
|
"product": "vscode"
|
|
},
|
|
"expect": {
|
|
"code": "client_too_old",
|
|
"text": "ai.example.org needs LLeMbas for VS Code 1.0.0 or later, and this is 1.0.0-beta.5. Update LLeMbas for VS Code."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "client_too_old"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"minimum": true,
|
|
"needed": "1.0.0",
|
|
"mine": "1.0.0-beta.16",
|
|
"product": "android"
|
|
},
|
|
"expect": {
|
|
"code": "client_too_old",
|
|
"text": "ai.example.org needs LLeMbas for Android 1.0.0 or later, and this is 1.0.0-beta.16. Update LLeMbas for Android."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "client_too_old"
|
|
},
|
|
"vars": {
|
|
"minimum": true
|
|
},
|
|
"expect": {
|
|
"code": "client_too_old",
|
|
"text": "The server needs LLeMbas CLI (a newer version) or later, and this is (an unknown version). Update LLeMbas CLI. Run lembas update."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "other_origin"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"other": "https://login.example.net/api/device/code"
|
|
},
|
|
"expect": {
|
|
"code": "other_origin",
|
|
"text": "ai.example.org names an address on another server (https://login.example.net/api/device/code) for this, and this LLeMbas CLI does not follow it. The server's own address is set wrong: whatever stands in front of it must pass on the host and scheme it was asked for."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "state",
|
|
"code": "other_origin"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "other_origin",
|
|
"text": "ai.example.org names an address on another server (another address) for this, and this LLeMbas Desktop does not follow it. The server's own address is set wrong: whatever stands in front of it must pass on the host and scheme it was asked for."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401,
|
|
"challenge": "Bearer realm=\"lembas\""
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "signed_out",
|
|
"text": "ai.example.org no longer accepts this sign-in — sign in again."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401,
|
|
"challenge": "bearer realm=\"lembas\""
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "signed_out",
|
|
"text": "ai.example.org no longer accepts this sign-in — sign in again."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401,
|
|
"challenge": "Bearer realm=lembas"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "signed_out",
|
|
"text": "ai.example.org no longer accepts this sign-in — sign in again."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401,
|
|
"challenge": "Bearer error=\"invalid_token\", realm=\"lembas\""
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "signed_out",
|
|
"text": "ai.example.org no longer accepts this sign-in — sign in again."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401,
|
|
"challenge": "Bearer realm=\"lembas\", error=\"invalid_token\""
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "signed_out",
|
|
"text": "ai.example.org no longer accepts this sign-in — sign in again."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401,
|
|
"challenge": "Bearer"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "failed",
|
|
"text": "That did not work."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401,
|
|
"challenge": "Bearer realm=\"other\""
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "failed",
|
|
"text": "That did not work."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401,
|
|
"challenge": "Basic realm=\"lembas\""
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "failed",
|
|
"text": "That did not work."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401,
|
|
"challenge": "Bearer realm=\"lembas-proxy\""
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "failed",
|
|
"text": "That did not work."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401,
|
|
"challenge": ""
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "failed",
|
|
"text": "That did not work."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401,
|
|
"challenge": "realm=\"lembas\""
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "failed",
|
|
"text": "That did not work."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "failed",
|
|
"text": "That did not work."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 401,
|
|
"challenge": "Bearer xrealm=\"lembas\""
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org",
|
|
"product": "desktop"
|
|
},
|
|
"expect": {
|
|
"code": "failed",
|
|
"text": "That did not work."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 403,
|
|
"challenge": "Bearer realm=\"lembas\""
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "not_allowed",
|
|
"text": "ai.example.org did not allow this."
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 429,
|
|
"retry_after": "300"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "busy",
|
|
"text": "ai.example.org is busy just now.",
|
|
"retry_s": 300
|
|
}
|
|
},
|
|
{
|
|
"condition": {
|
|
"kind": "http",
|
|
"status": 429,
|
|
"retry_after": "301"
|
|
},
|
|
"vars": {
|
|
"host": "ai.example.org"
|
|
},
|
|
"expect": {
|
|
"code": "busy",
|
|
"text": "ai.example.org is busy just now.",
|
|
"retry_s": 300
|
|
}
|
|
}
|
|
]
|
|
}
|