@runuai/host 0.9.122 → 0.9.123

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.
@@ -24,6 +24,7 @@ import {
24
24
  runtimeProviderStatePath,
25
25
  type RuntimeProviderStateStore,
26
26
  } from "./runtime-provider-state";
27
+ import { sidecarMode } from "./sidecar";
27
28
 
28
29
  export type RuntimePreference = "auto" | "docker" | "apple-container";
29
30
 
@@ -1347,6 +1348,11 @@ export function resetContainerRuntimeSelectionForTests(): void {
1347
1348
 
1348
1349
  /** Human-facing task failure, or null while the host can attempt Docker work. */
1349
1350
  export function containerRuntimeProblem(): string | null {
1351
+ // ADR-133 sidecar mode: the task runs on this machine, not in a container;
1352
+ // there is no runtime to be ready. Live 2026-09-10: the first hostless
1353
+ // task-up reached its machine and was refused with the Docker-context
1354
+ // message below, because this gate never knew the machine had no Docker.
1355
+ if (sidecarMode()) return null;
1350
1356
  if (state.status === "no-runtime") return state.message;
1351
1357
  if (state.status !== "ready" || !operational) {
1352
1358
  return (
@@ -38,6 +38,11 @@ export const AWS_MACHINE_TAG = "com.uai.machine";
38
38
  * UAI_MACHINE_IMAGE resolves the newest published payload in its region. */
39
39
  export const PAYLOAD_AMI_OWNER = "277057415208";
40
40
  export const PAYLOAD_AMI_NAME_PREFIX = "uai-machine-payload";
41
+ /** Regions the payload AMI is published to (build-ami.sh bakes in the first
42
+ * and copies to the rest). A BYO-AWS runner elsewhere would find no image
43
+ * and fail every launch, so setup refuses other regions up front (owner,
44
+ * 2026-09-10: "only show the available ones for now"). */
45
+ export const PAYLOAD_AMI_REGIONS: readonly string[] = ["us-west-2", "us-east-1"];
41
46
  /** Name of the security group auto-created in the default VPC when the host
42
47
  * config names none. Inbound: all TCP from the HOST's egress /32 only —
43
48
  * code-server runs auth-none and preview ports are plain HTTP, so exposure
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runuai/host",
3
- "version": "0.9.122",
3
+ "version": "0.9.123",
4
4
  "description": "Uai host — runs ephemeral AI tasks in containers on a machine you control.",
5
5
  "license": "MIT",
6
6
  "author": "Uai Tech <team@runuai.com>",
package/src/cli.ts CHANGED
@@ -109,6 +109,7 @@ import {
109
109
  TasksResponse,
110
110
  } from "./ui/types";
111
111
  import type { InstallContext, Installer } from "../scripts/install/types";
112
+ import { PAYLOAD_AMI_REGIONS } from "../lib/machine-provider-aws";
112
113
 
113
114
  // --- tiny ANSI (no chalk) ---------------------------------------------------
114
115
 
@@ -636,6 +637,14 @@ async function cmdAwsSetup(rest: string[]): Promise<void> {
636
637
  process.exitCode = 1;
637
638
  return;
638
639
  }
640
+ if (!PAYLOAD_AMI_REGIONS.includes(region)) {
641
+ console.error(
642
+ red(`task machines are not available in ${region} yet — Uai's machine image is published in ${PAYLOAD_AMI_REGIONS.join(", ")}`),
643
+ );
644
+ console.error(dim("pass --region with one of those; more regions are coming."));
645
+ process.exitCode = 1;
646
+ return;
647
+ }
639
648
 
640
649
  const identity = awsAdmin(["sts", "get-caller-identity"], region);
641
650
  if (identity.status !== 0) {