@runuai/host 0.9.111 → 0.9.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/engine-login.ts +18 -3
- package/package.json +1 -1
- package/src/protocol.ts +7 -2
package/lib/engine-login.ts
CHANGED
|
@@ -27,6 +27,7 @@ import { homedir, tmpdir } from "node:os";
|
|
|
27
27
|
import { basename, dirname, join, resolve } from "node:path";
|
|
28
28
|
|
|
29
29
|
import {
|
|
30
|
+
ENGINE_LOGIN_KINDS,
|
|
30
31
|
HOST_ACCOUNT_SCOPE,
|
|
31
32
|
isEngineAccountLabel,
|
|
32
33
|
isEngineAccountScope,
|
|
@@ -808,7 +809,14 @@ export class EngineLoginManager {
|
|
|
808
809
|
"The login container stopped unexpectedly.",
|
|
809
810
|
),
|
|
810
811
|
);
|
|
811
|
-
} catch {
|
|
812
|
+
} catch (error) {
|
|
813
|
+
// The operator sees a one-line failure; the journal must say WHY (the
|
|
814
|
+
// 2026-09-09 sweep refusal was silent for six hours).
|
|
815
|
+
console.warn(
|
|
816
|
+
`[engine-login] ${operation.engine} login could not start: ${
|
|
817
|
+
error instanceof Error ? error.message : String(error)
|
|
818
|
+
}`,
|
|
819
|
+
);
|
|
812
820
|
if (processHandle && !operation.process) {
|
|
813
821
|
await this.stopDetachedProcess(processHandle);
|
|
814
822
|
}
|
|
@@ -2260,8 +2268,15 @@ export function codexCallbackReplayDockerRequest(
|
|
|
2260
2268
|
};
|
|
2261
2269
|
}
|
|
2262
2270
|
|
|
2263
|
-
|
|
2264
|
-
|
|
2271
|
+
const ENGINE_LOGIN_CONTAINER_NAME = new RegExp(
|
|
2272
|
+
`^uai-login-(?:${ENGINE_LOGIN_KINDS.join("|")})-[0-9a-f]{16}$`,
|
|
2273
|
+
);
|
|
2274
|
+
|
|
2275
|
+
/** `uai-login-<kind>-<16 hex>` for every login kind. The sweep, the log
|
|
2276
|
+
* follower, the remover, and the codex callback replay all gate on this, so
|
|
2277
|
+
* a kind missing here strands its containers AND blocks every later login. */
|
|
2278
|
+
export function isEngineLoginContainerName(value: string): boolean {
|
|
2279
|
+
return ENGINE_LOGIN_CONTAINER_NAME.test(value);
|
|
2265
2280
|
}
|
|
2266
2281
|
|
|
2267
2282
|
/** The CLI that owns login containers (ADR-106): the ambient docker client,
|
package/package.json
CHANGED
package/src/protocol.ts
CHANGED
|
@@ -332,7 +332,12 @@ export type HostLogsEndFrame =
|
|
|
332
332
|
/** Engines with a REMOTE sign-in (login container driven from the cloud).
|
|
333
333
|
* grok since host 0.9.105: `grok login --device-auth`, same device-code shape
|
|
334
334
|
* as codex. Kimi/OpenCode remain host-terminal (or key) for now. */
|
|
335
|
-
|
|
335
|
+
/** Every engine with a remote sign-in flow. ONE list: the login container
|
|
336
|
+
* name pattern, the wire guard, and the cloud validator all derive from it
|
|
337
|
+
* (a kind added to the type alone left grok containers unrecognized by the
|
|
338
|
+
* stale-container sweep, which then refused EVERY login — live 2026-09-09). */
|
|
339
|
+
export const ENGINE_LOGIN_KINDS = ["claude", "codex", "grok"] as const;
|
|
340
|
+
export type EngineLoginKind = (typeof ENGINE_LOGIN_KINDS)[number];
|
|
336
341
|
export type EngineLoginPhase =
|
|
337
342
|
| "starting"
|
|
338
343
|
| "authorize"
|
|
@@ -674,7 +679,7 @@ function isBoundedMessage(value: unknown): value is string {
|
|
|
674
679
|
}
|
|
675
680
|
|
|
676
681
|
function isEngineLoginKind(value: unknown): value is EngineLoginKind {
|
|
677
|
-
return
|
|
682
|
+
return (ENGINE_LOGIN_KINDS as readonly unknown[]).includes(value);
|
|
678
683
|
}
|
|
679
684
|
|
|
680
685
|
function isEngineLoginErrorCode(value: unknown): value is EngineLoginErrorCode {
|