Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Cloud computer refusals: read the Admin's reason, and a free trial's words (#5489)

Milind Soni21e6d6d2acc3
diff --git a/server/auto-vm-claims.test.ts b/server/auto-vm-claims.test.ts
index bd50b8c30b..2ab7eaab54 100644
--- a/server/auto-vm-claims.test.ts
+++ b/server/auto-vm-claims.test.ts
@@ -207,6 +207,13 @@ describe("lazyClaimFailedText", () => {
"Do not retry computer work in this turn; tell the person what you could not do.");
});
+ it("names the plan's limit in its own sentence when the Admin turned the computer away", () => {
+ expect(lazyClaimFailedText({ ...boat, cause: "Your Pro free trial's 20 cloud computer hours are used up.",
+ limit: "This Cloud's free trial cloud computer hours are used up; its full allowance starts with its first payment on 14 Nov.", backOnAuto: true })).toBe(
+ "The cloud computer could not be started. This Cloud's free trial cloud computer hours are used up; its full allowance starts with its first payment on 14 Nov. " +
+ "This call was not performed. This conversation is back on Auto. Do not retry computer work in this turn; tell the person what you could not do.");
+ });
+
it("keeps the claim wording for a computer the turn does not start", () => {
expect(lazyClaimFailedText({ label: "the Local VM", failure: "the Local VM is not ready" })).toBe(
"This turn could not claim the Local VM (the Local VM is not ready). This call was not performed. Do not retry computer work in this turn; tell the person what you could not do.");
diff --git a/server/auto-vm-claims.ts b/server/auto-vm-claims.ts
index c35530a6cf..90265146a9 100644
--- a/server/auto-vm-claims.ts
+++ b/server/auto-vm-claims.ts
@@ -16,6 +16,8 @@ export interface AutoVmClaimSlot {
failure?: string;
/** What went wrong in the computer's own words, when `failure` is the line the person sees. */
cause?: string;
+ /** The plan's limit that turned the computer away, as one sentence for the bot: said in place of `cause`. */
+ limit?: string;
/** The failure took the conversation's automatic pick off this computer. */
backOnAuto?: boolean;
/** The last claim failed on the network; the next screen call claims again. */
@@ -79,13 +81,14 @@ export function startAutoVmClaim(table: AutoVmClaimTable, threadId: string, gene
}
/** What every screen call hears for the rest of a turn whose computer could not be claimed. */
-export function lazyClaimFailedText(slot: Pick<AutoVmClaimSlot, "label" | "failure" | "cause" | "startsComputer" | "backOnAuto">): string {
+export function lazyClaimFailedText(slot: Pick<AutoVmClaimSlot, "label" | "failure" | "cause" | "limit" | "startsComputer" | "backOnAuto">): string {
const label = slot.label ?? "this computer";
const why = (slot.cause ?? slot.failure)?.trim().replace(/[\s.]+$/, "");
if (!slot.startsComputer) {
return `This turn could not claim ${label}${why ? ` (${why})` : ""}. This call was not performed. Do not retry computer work in this turn; tell the person what you could not do.`;
}
- return `${label.charAt(0).toUpperCase()}${label.slice(1)} could not be started${why ? `: ${why}` : ""}. This call was not performed.` +
+ const started = `${label.charAt(0).toUpperCase()}${label.slice(1)} could not be started`;
+ return `${slot.limit ? `${started}. ${slot.limit}` : `${started}${why ? `: ${why}` : ""}.`} This call was not performed.` +
`${slot.backOnAuto ? " This conversation is back on Auto." : ""} Do not retry computer work in this turn; tell the person what you could not do.`;
}
diff --git a/server/boat-errors.test.ts b/server/boat-errors.test.ts
index e21a00e161..d1bb8104bc 100644
--- a/server/boat-errors.test.ts
+++ b/server/boat-errors.test.ts
@@ -60,6 +60,15 @@ describe("boatRefusal", () => {
});
});
+ it("keeps the Admin's limit beside its code, and none from a body that names none", () => {
+ const message = "Your Pro plan's 200 cloud computer hours for November are used up. They reset on 1 December.";
+ const fields = { reason: "hours_used", plan: "Pro", limit: 200, used: 200.4, resetsAt: "2026-12-01T00:00:00.000Z" };
+ const refused = boatRefusal(429, "boat create", { ok: false, type: "sandbox.error", status: 429, code: "limit_reached", message, ...fields,
+ error: { code: "limit_reached", message, status: 429, ...fields } }, true);
+ expect(refused).toMatchObject({ message, boatStatus: 429, boatCode: "limit_reached", boatLimit: fields });
+ expect(boatRefusal(429, "boat create", { ok: false, code: "limit_reached", message }, true)).not.toHaveProperty("boatLimit");
+ });
+
it("never sets the status a route would answer with", () => {
expect(boatRefusal(200, "boat create", { ok: false, message: "no sandbox" })).not.toHaveProperty("status");
expect(boatRefusal(500, "boat create", { code: "Not A Code!" })).not.toHaveProperty("boatCode");
diff --git a/server/boat-limit.test.ts b/server/boat-limit.test.ts
new file mode 100644
index 0000000000..3fb45d74bc
--- /dev/null
+++ b/server/boat-limit.test.ts
@@ -0,0 +1,28 @@
+import { describe, expect, it } from "vitest";
+
+import { boatRefusal } from "./boat.ts";
+import { cloudFailureOf, cloudLimitFields, cloudLimitText } from "./boat-limit.ts";
+
+const envelope = (message: string, fields: Record<string, unknown> = {}) =>
+ ({ ok: false, type: "sandbox.error", status: 429, code: "limit_reached", message, ...fields, error: { code: "limit_reached", message, status: 429, ...fields } });
+const TRIAL_HOURS = "Your Pro free trial's 20 cloud computer hours are used up. Your full allowance starts with your first payment on 14 Nov.";
+
+describe("a refused cloud computer start, from the Admin's answer to the bot and the app", () => {
+ it("reads the Admin's reason through the home's error", () => {
+ const refused = boatRefusal(429, "boat create", envelope(TRIAL_HOURS, { reason: "hours_used", trial: true, plan: "Pro", limit: 20, used: 20, resetsAt: "2026-11-14T09:00:00.000Z" }), true);
+ expect(cloudFailureOf(refused)).toEqual({ message: TRIAL_HOURS, code: "limit_reached", status: 429,
+ limit: { reason: "hours_used", trial: true, plan: "Pro", limit: 20, used: 20, resetsAt: "2026-11-14T09:00:00.000Z" } });
+ expect(cloudLimitText(refused)).toBe("This Cloud's free trial cloud computer hours are used up; its full allowance starts with its first payment on 14 Nov.");
+ expect(cloudLimitFields(refused)).toEqual({ cloudLimit: { reason: "hours_used", trial: true, plan: "Pro", limit: 20, used: 20, resetsAt: "2026-11-14T09:00:00.000Z" } });
+ });
+
+ it("reads an Admin that sends no reason by its words, and tells the bot nothing new for any other failure", () => {
+ const older = boatRefusal(429, "boat create", envelope("Your Personal plan includes 1 cloud computer at once. Delete one to start another."), true);
+ expect(cloudFailureOf(older)).toEqual({ message: "Your Personal plan includes 1 cloud computer at once. Delete one to start another.", code: "limit_reached", status: 429 });
+ expect(cloudLimitText(older)).toBe("This Cloud already has as many cloud computers running as its plan allows.");
+ expect(cloudLimitFields(older)).toEqual({});
+ expect(cloudLimitText(new Error("the cloud computer could not be created or reached"))).toBeUndefined();
+ expect(cloudLimitText("not an error")).toBeUndefined();
+ expect(cloudLimitFields(null)).toEqual({});
+ });
+});
diff --git a/server/boat-limit.ts b/server/boat-limit.ts
new file mode 100644
index 0000000000..757f66734b
--- /dev/null
+++ b/server/boat-limit.ts
@@ -0,0 +1,25 @@
+import { cloudLimitFromBody, cloudLimitSentence, type CloudLimit } from "../shared/place-view.ts";
+
+type CloudFailure = { message: string; code?: string; status?: number; limit?: CloudLimit };
+
+export function cloudFailureOf(error: unknown): CloudFailure {
+ const failure = error instanceof Error ? error : new Error(String(error));
+ const { boatCode, boatStatus, status } = failure as { boatCode?: unknown; boatStatus?: unknown; status?: unknown };
+ const providerStatus = typeof boatStatus === "number" ? boatStatus : typeof status === "number" ? status : undefined;
+ const limit = cloudLimitFields(failure).cloudLimit;
+ return {
+ message: failure.message,
+ ...(typeof boatCode === "string" ? { code: boatCode } : {}),
+ ...(providerStatus !== undefined ? { status: providerStatus } : {}),
+ ...(limit ? { limit } : {}),
+ };
+}
+
+/** What the bot is told when the Admin turned its cloud computer away by one of the Cloud's limits. */
+export const cloudLimitText = (error: unknown): string | undefined => cloudLimitSentence(cloudFailureOf(error)) ?? undefined;
+
+/** An HTTP error body's `cloudLimit`: the Admin's limit, beside the words, for the app to read. */
+export function cloudLimitFields(error: unknown): { cloudLimit?: CloudLimit } {
+ const limit = error && typeof error === "object" ? cloudLimitFromBody((error as { boatLimit?: unknown }).boatLimit) : undefined;
+ return limit ? { cloudLimit: limit } : {};
+}
diff --git a/server/boat.ts b/server/boat.ts
index 81db0b50b4..40e18b5c7b 100644
--- a/server/boat.ts
+++ b/server/boat.ts
@@ -8,6 +8,7 @@ import { DATA_DIR, type AppConfig } from "./config.ts";
import { loadEnvironmentId } from "./environment.ts";
import { boatCredential, boatProviderApi, type ServiceCredential } from "./included-services.ts";
import { relayBody, relayPath } from "./boat-relay.ts";
+import { cloudLimitFromBody, type CloudLimit } from "../shared/place-view.ts";
import {
blockedUntilBoatFinishes,
boatDeletionOperation,
@@ -942,11 +943,9 @@ export function boatErrorMessage(status: number, what: string, body?: any, inclu
return theirs ? `${what} failed: ${theirs}` : `${what} failed (${status})`;
}
-export function boatRefusal(status: number, what: string, body?: any, included = false): Error & { boatStatus: number; boatCode?: string } {
- const code = body?.error?.code ?? body?.code;
- return Object.assign(new Error(boatErrorMessage(status, what, body, included)), {
- boatStatus: status, ...(typeof code === "string" && /^[a-z0-9_]{1,64}$/.test(code) ? { boatCode: code } : {}),
- });
+export function boatRefusal(status: number, what: string, body?: any, included = false): Error & { boatStatus: number; boatCode?: string; boatLimit?: CloudLimit } {
+ const code = body?.error?.code ?? body?.code, boatCode = typeof code === "string" && /^[a-z0-9_]{1,64}$/.test(code) ? code : undefined, boatLimit = cloudLimitFromBody(body);
+ return Object.assign(new Error(boatErrorMessage(status, what, body, included)), { boatStatus: status, ...(boatCode ? { boatCode } : {}), ...(boatLimit ? { boatLimit } : {}) });
}
/** boat.dev trial accounts refuse the eight-hour auto-stop with `trial_auto_stop_required`; retry once at the advertised maximum (documented: two hours). */
diff --git a/server/cloud-computer-slow-start.e2e.test.ts b/server/cloud-computer-slow-start.e2e.test.ts
index 2f546d7795..006cca50cb 100644
--- a/server/cloud-computer-slow-start.e2e.test.ts
+++ b/server/cloud-computer-slow-start.e2e.test.ts
@@ -32,8 +32,9 @@ describe("a slow cloud computer start", () => {
const requests: string[] = [];
/** The relay keeps a new computer "provisioning" while this is set, never
* answers a desktop link request while `desktop` is set, and cuts off this
- * many computer listings before answering, as a dropped connection does, and refuses every create while `refuseCreate` is set. */
- const hold = { provisioning: false, desktop: false, dropLists: 0, refuseCreate: false };
+ * many computer listings before answering, as a dropped connection does, and refuses every create while `refuseCreate` is set,
+ * or with the Admin's `limit` answer while that is set. */
+ const hold = { provisioning: false, desktop: false, dropLists: 0, refuseCreate: false, limit: null as Record<string, unknown> | null };
const held: ServerResponse[] = [];
const api = async (method: string, path: string, body?: unknown) => {
@@ -99,6 +100,7 @@ describe("a slow cloud computer start", () => {
if (path === "/boxes" && req.method === "GET" && hold.dropLists > 0) { hold.dropLists--; return void req.socket.destroy(); }
if (path === "/boxes" && req.method === "GET") return send(200, { ok: true, boxes: rows, pageInfo: { nextCursor: null } });
if (path === "/boxes" && req.method === "POST" && hold.refuseCreate) return send(422, { ok: false, message: "the sandbox image is unavailable" });
+ if (path === "/boxes" && req.method === "POST" && hold.limit) return send(429, hold.limit);
if (path === "/boxes" && req.method === "POST") {
const row = { id: `bx_${"23456789abcdefgh"[rows.length]}3456789`, state: "provisioning" };
rows.push(row);
@@ -244,6 +246,24 @@ describe("a slow cloud computer start", () => {
}
}, 60_000);
+ it("a start the Cloud's own limit turns away tells the bot which limit in one sentence, and the person the plan's card", async () => {
+ const message = "Your Pro plan's 200 cloud computer hours for November are used up. They reset on 1 December.";
+ const fields = { reason: "hours_used", plan: "Pro", limit: 200, used: 200.4, resetsAt: "2026-12-01T00:00:00.000Z" };
+ hold.limit = { ok: false, type: "sandbox.error", status: 429, code: "limit_reached", message, ...fields, error: { code: "limit_reached", message, status: 429, ...fields } };
+ try {
+ const bot = await cloudBot("Hours spent");
+ const answer = await screenshot(await startTurn(bot.id, "Open the cloud desktop"));
+ expect(answer).toEqual({ isError: true, content: [{ type: "text", text: "The cloud computer could not be started. This Cloud's cloud computer hours for this month are used up; "
+ + "they reset on 1 December. This call was not performed. Do not retry computer work in this turn; tell the person what you could not do." }] });
+ const [row] = await until(() => failedRows(bot.id), found => found.length > 0);
+ expect(row.tool.place).toEqual({ state: "cc-no-hours", params: { bot: "Hours spent", plan: "Pro", hours: 200, month: "December" }, source: "works-on" });
+ await until(() => task(bot.id), current => current?.busy === false, 20_000);
+ await api("DELETE", `/api/bots/${bot.id}`);
+ } finally {
+ hold.limit = null;
+ }
+ }, 45_000);
+
it("a start that fails while a call waits on it answers that call with the reason, not a refusal for an ended turn", async () => {
hold.refuseCreate = true;
try {
diff --git a/server/index.ts b/server/index.ts
index 1d07a34678..9409364a59 100644
--- a/server/index.ts
+++ b/server/index.ts
@@ -510,6 +510,7 @@ import { computerFreeAfterText, computerParkedText, computerPersonAwayText, comp
import { modelContextWindow } from "./model-context-window.ts";
import { browserIsThePlace, chosenPin, cloudPlaceRefusal, computerSkippedNote, computerToolsRefusal, handoffUsesOwnCloud, isHandedWork, ownCloudStateWithin, parseSurface, pinSource, PlaceUnavailableError, placeUnavailable, resolveSurface, surfaceLabel, surfaceOfComputerKind, surfacePrompt, type ComputerWant, type PlaceSource, type Surface } from "./surface.ts";
import { cloudRefusal, type PlaceRow } from "../shared/place-view.ts";
+import { cloudFailureOf, cloudLimitFields, cloudLimitText } from "./boat-limit.ts";
import {
PendingTurnCancellations,
ProviderTurnGenerationRegistry,
@@ -1884,13 +1885,7 @@ async function asPlaceFailure(
state: "place-failed", params: { bot: bot.name, cause: `${cause.charAt(0).toUpperCase()}${cause.slice(1)}.` }, source,
}, Boolean(CLOUD_HOME));
}
- const { boatCode, boatStatus, status } = failure as { boatCode?: unknown; boatStatus?: unknown; status?: unknown };
- const providerStatus = typeof boatStatus === "number" ? boatStatus : typeof status === "number" ? status : undefined;
- const read = cloudRefusal({
- message: failure.message,
- ...(typeof boatCode === "string" ? { code: boatCode } : {}),
- ...(providerStatus !== undefined ? { status: providerStatus } : {}),
- }, boat.boatAccount(cfg)?.included === true);
+ const read = cloudRefusal(cloudFailureOf(failure), boat.boatAccount(cfg)?.included === true);
const row: PlaceRow = { state: read.state, params: { bot: bot.name, ...read.params }, source };
if (row.state === "cc-at-once") row.params.holders = await cloudComputerHolders(bot.id);
return placeUnavailable(place, row, Boolean(CLOUD_HOME));
@@ -5794,7 +5789,7 @@ function mountTeamBoat(computer: TeamComputerRecord, botId: string, owner: TurnO
if (!boat.boatConfigured(cfg)) throw new Error("The team's Boat account is not configured; reconnect it in Settings");
teamComputerTurns.set(owner.threadId, { owner, computerId: computer.id, botId });
const slot: AutoVmClaimSlot = { owner, lazy: true, startsComputer: true, label: "the team's cloud computer", onRejected: opts.onRejected, claim: async () => {
- const attached = await attachTeamBoat(computer, owner, () => { slot.pendingReason = CLOUD_COMPUTER_STARTING; });
+ const attached = await attachTeamBoat(computer, owner, () => { slot.pendingReason = CLOUD_COMPUTER_STARTING; }).catch((error: unknown) => { slot.limit = cloudLimitText(error); throw error; });
slot.boxId = attached.boxId;
opts.onClaimed(attached.capture);
} };
@@ -5894,6 +5889,7 @@ function mountBotBoat(
if (!attached) throw new Error(opts.existingOnly ? "this bot no longer has a cloud computer of its own" : "the cloud computer could not be created or reached");
} catch (error) {
slot.cause = error instanceof Error ? error.message : String(error);
+ slot.limit = cloudLimitText(error);
throw keepTransient(error, opts.source ? await asPlaceFailure(error, "cloud", opts.source, bot, "box") : error);
}
slot.boxId = attached.boxId;
@@ -15301,7 +15297,7 @@ const handleRequest = async (req: IncomingMessage, res: ServerResponse) => {
const candidateCode = (e as { code?: unknown })?.code;
const code = typeof candidateCode === "string" && ["guarded_busy", "guarded_branch", "guarded_permissions", "guarded_request_changed", "guarded_request_untracked", "outside_workspace", "file_too_large", "no_ai", BOT_PAUSED_CODE].includes(candidateCode)
? candidateCode : undefined;
- return json(res, status, { error: e instanceof Error ? e.message : String(e), ...(code ? { code } : {}), ...userErrorFields(e) });
+ return json(res, status, { error: e instanceof Error ? e.message : String(e), ...(code ? { code } : {}), ...userErrorFields(e), ...cloudLimitFields(e) });
} finally {
releaseWorkspaceRequest?.();
}
diff --git a/server/place-view.e2e.test.ts b/server/place-view.e2e.test.ts
index 2f23db7336..d626a77eee 100644
--- a/server/place-view.e2e.test.ts
+++ b/server/place-view.e2e.test.ts
@@ -16,6 +16,7 @@ const refusal = (status: number, code: string, message: string) =>
({ status, body: { ok: false, type: "sandbox.error", status, code, message, error: { code, message, status } } });
const HOURS = refusal(429, "limit_reached", "Your Pro plan's 50 cloud computer hours for October are used up. They reset on 1 November.");
const AT_ONCE = refusal(429, "limit_reached", "Your Personal plan includes 1 cloud computer at once. Delete one to start another.");
+const TRIAL_HOURS = refusal(429, "limit_reached", "Your Pro free trial's 20 cloud computer hours are used up. Your full allowance starts with your first payment on 14 Nov.");
const DOWN = refusal(503, "service_unavailable", "Cloud computers are temporarily unavailable. Try again later.");
describe("a cloud computer that can't start, against the real server", () => {
@@ -168,6 +169,18 @@ describe("a cloud computer that can't start, against the real server", () => {
expect(boxes).toEqual([]);
}, 90_000);
+ it("J5b: a free trial's hours used up get the plan's card too, from an Admin that sends only its words", async () => {
+ await start();
+ const { bot } = await apiOk("POST", "/api/bots", { name: "Trial Bot" });
+ await apiOk("PATCH", `/api/bots/${bot.id}`, { computer: "cloud" });
+ createAnswer = TRIAL_HOURS;
+ await send(bot.id, bot.threadId, "Open the desktop.");
+ const row = await failedRow(bot.threadId);
+ expect(row.tool.name).toBe("error: The free trial's cloud desktop hours are used up. The full allowance starts with the first payment. See your plan on the Plan page.");
+ expect(row.tool.place).toEqual({ state: "cc-no-hours", params: { bot: "Trial Bot", trial: true }, source: "works-on" });
+ await idle(bot.id);
+ }, 90_000);
+
it("J6: at once names the bot that holds the plan's cloud computer", async () => {
await start();
const { bot: holder } = await apiOk("POST", "/api/bots", { name: "Ada" });
diff --git a/shared/place-view.test.ts b/shared/place-view.test.ts
index 9f27f21755..c01a854572 100644
--- a/shared/place-view.test.ts
+++ b/shared/place-view.test.ts
@@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest";
import en from "../src/locales/en.json";
import {
- cloudRefusal, PLACE_EN, PLACE_STATES, PLACE_WORDS, placeRowText, placeRowView, placeState, placeView, placeViewOf,
+ cloudLimitFromBody, cloudLimitSentence, cloudRefusal, PLACE_EN, PLACE_STATES, PLACE_WORDS, placeRowText, placeRowView, placeState, placeView, placeViewOf,
type PlaceFacts, type PlaceParams, type PlaceSource, type PlaceState,
} from "./place-view.ts";
@@ -89,6 +89,9 @@ describe("U1: one line and at most one action for every state", () => {
// A refusal known only by its code still reads whole.
expect(placeViewOf("cc-at-once", { plan: "Pro", max: 2 }, admin).line).toBe("All the cloud desktops your plan includes are in use.");
expect(placeViewOf("cc-no-hours", {}, admin).line).toBe("This month's cloud desktop hours are used up.");
+ expect(placeViewOf("cc-no-hours", { trial: true }, admin)).toMatchObject({
+ line: "The free trial's cloud desktop hours are used up. The full allowance starts with the first payment.", action: { id: "see-plan" },
+ });
expect(placeViewOf("cc-unavailable", {}, admin)).toMatchObject({
short: "Not available now", line: "Cloud desktops can't start right now. It isn't anything you did.", action: { id: "try-again" },
});
@@ -203,4 +206,61 @@ describe("cloudRefusal reads the Admin's refusals", () => {
.toEqual({ state: "cc-provider", params: { words: "Start the $20/month Boat plan to create sandboxes." } });
expect(included("something new").state).toBe("cc-no-start");
});
+
+ it("reads a free trial's own words, so a trial gets its card too", () => {
+ expect(included("Your Pro free trial's 20 cloud computer hours are used up. Your full allowance starts with your first payment on 14 Nov.", "limit_reached", 429))
+ .toEqual({ state: "cc-no-hours", params: { trial: true } });
+ expect(included("Your Pro free trial includes 2 cloud computers at once. Delete one to start another.", "limit_reached", 429))
+ .toEqual({ state: "cc-at-once", params: { plan: "Pro", max: 2 } });
+ });
+
+ it("goes by the Admin's reason when it sends one, whatever its words say", () => {
+ const limited = (limit: Parameters<typeof cloudRefusal>[0]["limit"], message = "Words this app doesn't know.") =>
+ cloudRefusal({ message, code: "limit_reached", status: 429, limit }, true);
+ expect(limited({ reason: "hours_used", plan: "Pro", limit: 200, used: 200.4, resetsAt: "2026-12-01T00:00:00.000Z" }))
+ .toEqual({ state: "cc-no-hours", params: { plan: "Pro", hours: 200, month: "December" } });
+ expect(limited({ reason: "hours_used", trial: true, plan: "Pro", limit: 20, resetsAt: "2026-11-14T09:00:00.000Z" })).toEqual({ state: "cc-no-hours", params: { trial: true } });
+ expect(limited({ reason: "at_once", plan: "Max", limit: 4, used: 4 })).toEqual({ state: "cc-at-once", params: { plan: "Max", max: 4 } });
+ expect(limited({ reason: "at_once" }, "Your Pro plan includes 2 cloud computers at once.")).toEqual({ state: "cc-at-once", params: {} });
+ expect(limited({ reason: "too_many_starts", window: "hour" }, "Your Pro plan's 50 cloud computer hours for October are used up. They reset on 1 November.").state).toBe("cc-unavailable");
+ expect(cloudRefusal({ message: "x", code: "usage_unavailable", status: 503, limit: { reason: "usage_unavailable" } }, true).state).toBe("cc-unavailable");
+ });
+});
+
+describe("the Admin's limit, read and told to the bot", () => {
+ it("reads `reason` and its numbers at a body's top or in its error, and nothing it doesn't know", () => {
+ const fields = { reason: "hours_used", trial: true, plan: "Pro", limit: 20, used: 20.1, resetsAt: "2026-11-14T09:00:00.000Z" };
+ expect(cloudLimitFromBody({ ok: false, code: "limit_reached", message: "…", ...fields, error: { code: "limit_reached", ...fields } })).toEqual(fields);
+ expect(cloudLimitFromBody({ ok: false, error: { code: "limit_reached", reason: "too_many_starts", limit: 3, used: 3, window: "minute" } }))
+ .toEqual({ reason: "too_many_starts", limit: 3, used: 3, window: "minute" });
+ expect(cloudLimitFromBody({ reason: "at_once", trial: "yes", plan: 7, limit: -1, used: "2", resetsAt: "soon", window: "week" })).toEqual({ reason: "at_once" });
+ expect(cloudLimitFromBody({ ok: false, code: "limit_reached", message: "Your Pro plan includes 2 cloud computers at once." })).toBeUndefined();
+ expect(cloudLimitFromBody({ reason: "some_new_reason" })).toBeUndefined();
+ expect(cloudLimitFromBody(null)).toBeUndefined();
+ });
+
+ it("names the kind of limit in one fixed sentence, from the reason or from today's words", () => {
+ const told = (limit: Parameters<typeof cloudLimitSentence>[0]["limit"], message = "", code?: string) => cloudLimitSentence({ message, code, limit });
+ expect(told({ reason: "hours_used", limit: 200, resetsAt: "2026-12-01T00:00:00.000Z" })).toBe("This Cloud's cloud computer hours for this month are used up; they reset on 1 December.");
+ expect(told(undefined, "Your Pro plan's 50 cloud computer hours for October are used up. They reset on 1 November."))
+ .toBe("This Cloud's cloud computer hours for this month are used up; they reset on 1 November.");
+ expect(told({ reason: "hours_used", trial: true, resetsAt: "2026-11-14T09:00:00.000Z" }))
+ .toBe("This Cloud's free trial cloud computer hours are used up; its full allowance starts with its first payment on 14 Nov.");
+ expect(told(undefined, "Your Pro free trial's 20 cloud computer hours are used up. Your full allowance starts with your first payment on 14 Nov."))
+ .toBe("This Cloud's free trial cloud computer hours are used up; its full allowance starts with its first payment on 14 Nov.");
+ expect(told({ reason: "hours_used" })).toBe("This Cloud's cloud computer hours for this month are used up.");
+ for (const message of ["Your Personal plan includes 1 cloud computer at once. Delete one to start another.", "Your Pro free trial includes 2 cloud computers at once. Delete 2 to start one again."]) {
+ expect(told(undefined, message)).toBe("This Cloud already has as many cloud computers running as its plan allows.");
+ }
+ expect(told({ reason: "at_once", limit: 2 })).toBe("This Cloud already has as many cloud computers running as its plan allows.");
+ expect(told({ reason: "too_many_starts", window: "hour" })).toBe("Cloud computers were started too often; try again in an hour.");
+ expect(told(undefined, "Your cloud computers were woken too often. Try again tomorrow.")).toBe("Cloud computers were started too often; try again tomorrow.");
+ expect(told(undefined, "Your cloud computer was woken too often. Try again in a minute.")).toBe("Cloud computers were started too often; try again in a minute.");
+ expect(told({ reason: "usage_unavailable" })).toBe("Cloud computer use can't be checked right now.");
+ expect(told(undefined, "Cloud computer use can't be checked right now, so new starts are paused. Try again later.", "usage_unavailable"))
+ .toBe("Cloud computer use can't be checked right now.");
+ // Anything else is no plan limit: the bot hears the computer's own words instead.
+ expect(told(undefined, "Cloud computers are busy right now. Try again in a few minutes.", "rate_limited")).toBeNull();
+ expect(told(undefined, "box did not become ready within 90s")).toBeNull();
+ });
});
diff --git a/shared/place-view.ts b/shared/place-view.ts
index dc2cf04730..f7df464b99 100644
--- a/shared/place-view.ts
+++ b/shared/place-view.ts
@@ -53,6 +53,8 @@ export interface PlaceParams {
words?: string;
reason?: string;
cause?: string;
+ /** The cloud desktop's limit is a free trial's. */
+ trial?: boolean;
}
export interface PlaceAction {
@@ -139,6 +141,7 @@ export const PLACE_EN = {
"place.view.ccNoHours.short": "No hours left",
"place.view.ccNoHours.line": "This month's {hours} cloud desktop hours are used up. They come back on 1 {month}.",
"place.view.ccNoHours.lineUnknown": "This month's cloud desktop hours are used up.",
+ "place.view.ccNoHours.lineTrial": "The free trial's cloud desktop hours are used up. The full allowance starts with the first payment.",
"place.view.ccAtOnce.short": "In use",
"place.view.ccAtOnce.lineOne": "Your {plan} plan includes 1 cloud desktop, and {holders} has it.",
"place.view.ccAtOnce.lineMany": "Your {plan} plan includes {max} cloud desktops, and {holders} have them.",
@@ -361,6 +364,7 @@ function lineKey(state: PlaceState, params: PlaceParams, server?: ServerKind): P
return server === "my-cloud" ? "place.view.auto.lineMyCloud" : server === "linux" || server === "remote" ? "place.view.auto.lineLinux" : "place.view.auto.lineDesktop";
}
if (state === "cc-sign-in" && server === "my-cloud") return "place.view.ccSignIn.lineMyCloud";
+ if (state === "cc-no-hours" && params.trial) return "place.view.ccNoHours.lineTrial";
// A refusal read from a code alone has no numbers or names to give.
if (state === "cc-no-hours" && (params.hours === undefined || !params.month)) return "place.view.ccNoHours.lineUnknown";
if (state === "cc-at-once") {
@@ -454,9 +458,13 @@ export function placeRowText(row: PlaceRow, server?: ServerKind): string {
}
-const MONTH = "(January|February|March|April|May|June|July|August|September|October|November|December)";
+const MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] as const;
+const MONTH = `(${MONTHS.join("|")})`;
const HOURS_USED = new RegExp(`Your (.+?) plan's (\\d+) cloud computer hours for \\w+ are used up\\. They reset on 1 ${MONTH}`);
-const AT_ONCE = /Your (.+?) plan includes (\d+) cloud computers? at once/;
+const TRIAL_HOURS_USED = new RegExp(`Your (.+?) free trial's (\\d+) cloud computer hours are used up\\. Your full allowance starts with your first payment on (\\d{1,2}) (${MONTHS.map((name) => name.slice(0, 3)).join("|")})`);
+const AT_ONCE = /Your (.+?) (plan|free trial) includes (\d+) cloud computers? at once/;
+const TOO_OFTEN = /(?:started|woken) too often\. Try again (in a minute|in an hour|tomorrow)/;
+const WINDOWS = { "in a minute": "minute", "in an hour": "hour", tomorrow: "day" } as const;
const PASSING_WORDS = [
/cloud computers are busy right now/i, /temporarily unavailable/i, /can't be checked right now/i, /could not be reached/i,
/returned an unexpected answer/i, /could not complete that request/i, /started too often/i, /woken too often/i,
@@ -469,22 +477,108 @@ const NO_START_WORDS = [
];
const CLEARING_WORDS = [/is being deleted/i, /previous cloud computer deletion/i, /deletion was not confirmed/i, /deletion is still being reconciled/i];
-/** The Admin's own codes come first; until every refusal has one, its English
- * is read. `included`: the plan's computers, not the person's own Boat key,
- * whose provider's words are shown as they are. */
-export function cloudRefusal(failure: { message: string; code?: string; status?: number }, included: boolean): { state: PlaceState; params: PlaceParams } {
+/** Why the Admin turned a start of a plan's cloud desktop away, by its own limits. */
+export const CLOUD_LIMIT_REASONS = ["hours_used", "at_once", "too_many_starts", "usage_unavailable"] as const;
+export type CloudLimitReason = (typeof CLOUD_LIMIT_REASONS)[number];
+
+/** The Admin's refusal of a start, beside its code and sentence: `reason`;
+ * `trial` while the Cloud is on a free trial; the plan's name; the limit and
+ * what is used of it; when it lifts (ISO: for a trial's hours, its first
+ * payment); and, for starts, the window whose limit was reached. */
+export interface CloudLimit {
+ reason: CloudLimitReason;
+ trial?: boolean;
+ plan?: string;
+ limit?: number;
+ used?: number;
+ resetsAt?: string;
+ window?: "minute" | "hour" | "day";
+}
+
+/** A refusal body's limit fields, at its top or in its `error`; undefined
+ * from an Admin that sends no `reason`, or one this app doesn't know. */
+export function cloudLimitFromBody(body: unknown): CloudLimit | undefined {
+ const top = body && typeof body === "object" ? body as Record<string, unknown> : undefined;
+ const nested = top?.error && typeof top.error === "object" ? top.error as Record<string, unknown> : undefined;
+ const fields = typeof top?.reason === "string" ? top : nested;
+ const reason = fields?.reason;
+ if (!fields || !(CLOUD_LIMIT_REASONS as readonly unknown[]).includes(reason)) return undefined;
+ const count = (value: unknown) => typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : undefined;
+ const limit = count(fields.limit), used = count(fields.used);
+ const plan = typeof fields.plan === "string" && fields.plan.length <= 40 ? fields.plan : undefined;
+ const resetsAt = typeof fields.resetsAt === "string" && !Number.isNaN(Date.parse(fields.resetsAt)) ? fields.resetsAt : undefined;
+ const window = fields.window === "minute" || fields.window === "hour" || fields.window === "day" ? fields.window : undefined;
+ return {
+ reason: reason as CloudLimitReason, ...(fields.trial === true ? { trial: true } : {}), ...(plan ? { plan } : {}),
+ ...(limit !== undefined ? { limit } : {}), ...(used !== undefined ? { used } : {}), ...(resetsAt ? { resetsAt } : {}), ...(window ? { window } : {}),
+ };
+}
+
+type CloudFailure = { message: string; code?: string; status?: number; limit?: CloudLimit };
+type LimitRead = { reason: CloudLimitReason; trial: boolean; plan?: string; max?: number; month?: string; resets?: string; window?: CloudLimit["window"] };
+
+function readLimit(failure: CloudFailure): LimitRead | null {
+ const { limit, code } = failure;
const message = failure.message.trim();
- const code = failure.code;
- const hours = HOURS_USED.exec(message);
- if (code === "hours_used" || hours) {
- return { state: "cc-no-hours", params: hours ? { plan: hours[1], hours: Number(hours[2]), month: hours[3] } : {} };
+ if (limit) {
+ const at = limit.resetsAt ? new Date(limit.resetsAt) : null;
+ const month = at ? MONTHS[at.getUTCMonth()] : undefined;
+ return {
+ reason: limit.reason, trial: limit.trial === true, ...(limit.plan ? { plan: limit.plan } : {}), ...(limit.limit !== undefined ? { max: limit.limit } : {}),
+ ...(at && month && !limit.trial ? { month } : {}),
+ ...(at && month ? { resets: `${at.getUTCDate()} ${limit.trial ? month.slice(0, 3) : month}` } : {}),
+ ...(limit.window ? { window: limit.window } : {}),
+ };
}
+ if ((CLOUD_LIMIT_REASONS as readonly unknown[]).includes(code)) return { reason: code as CloudLimitReason, trial: false };
+ const hours = HOURS_USED.exec(message);
+ if (hours) return { reason: "hours_used", trial: false, plan: hours[1], max: Number(hours[2]), month: hours[3], resets: `1 ${hours[3]}` };
+ const trialHours = TRIAL_HOURS_USED.exec(message);
+ if (trialHours) return { reason: "hours_used", trial: true, plan: trialHours[1], max: Number(trialHours[2]), resets: `${trialHours[3]} ${trialHours[4]}` };
const atOnce = AT_ONCE.exec(message);
- if (code === "at_once" || atOnce) {
- return { state: "cc-at-once", params: atOnce ? { plan: atOnce[1], max: Number(atOnce[2]) } : {} };
+ if (atOnce) return { reason: "at_once", trial: atOnce[2] === "free trial", plan: atOnce[1], max: Number(atOnce[3]) };
+ const often = TOO_OFTEN.exec(message);
+ if (often) return { reason: "too_many_starts", trial: false, window: WINDOWS[often[1] as keyof typeof WINDOWS] };
+ if (code === "usage_unavailable") return { reason: "usage_unavailable", trial: false };
+ return null;
+}
+
+/** The Admin's refusal of a start, worded for the bot, so it never says one
+ * limit is another; null for any other failure. */
+export function cloudLimitSentence(failure: CloudFailure): string | null {
+ const limit = readLimit(failure);
+ switch (limit?.reason) {
+ case "hours_used":
+ return limit.trial
+ ? `This Cloud's free trial cloud computer hours are used up; its full allowance starts with its first payment${limit.resets ? ` on ${limit.resets}` : ""}.`
+ : `This Cloud's cloud computer hours for this month are used up${limit.resets ? `; they reset on ${limit.resets}` : ""}.`;
+ case "at_once":
+ return "This Cloud already has as many cloud computers running as its plan allows.";
+ case "too_many_starts":
+ return `Cloud computers were started too often; try again ${limit.window === "minute" ? "in a minute" : limit.window === "day" ? "tomorrow" : limit.window === "hour" ? "in an hour" : "later"}.`;
+ case "usage_unavailable":
+ return "Cloud computer use can't be checked right now.";
+ default:
+ return null;
+ }
+}
+
+/** The Admin's `reason` comes first, then its codes; from an Admin that
+ * sends neither, its English is read. `included`: the plan's computers, not
+ * the person's own Boat key, whose provider's words are shown as they are. */
+export function cloudRefusal(failure: CloudFailure, included: boolean): { state: PlaceState; params: PlaceParams } {
+ const message = failure.message.trim();
+ const code = failure.code;
+ const limit = readLimit(failure);
+ if (limit?.reason === "hours_used") {
+ if (limit.trial) return { state: "cc-no-hours", params: { trial: true } };
+ return { state: "cc-no-hours", params: limit.plan && limit.max !== undefined && limit.month ? { plan: limit.plan, hours: limit.max, month: limit.month } : {} };
+ }
+ if (limit?.reason === "at_once") {
+ return { state: "cc-at-once", params: limit.plan && limit.max !== undefined ? { plan: limit.plan, max: limit.max } : {} };
}
if (code === "subscription_inactive") return { state: "cc-ended", params: {} };
- if (code === "too_many_starts" || code === "rate_limited" || code === "usage_unavailable" || code === "service_unavailable"
+ if (limit || code === "rate_limited" || code === "usage_unavailable" || code === "service_unavailable"
|| code === "upstream_unavailable" || code === "invalid_response" || code === "upstream_error") {
return { state: "cc-unavailable", params: {} };
}
diff --git a/src/components/ComputerPanel.tsx b/src/components/ComputerPanel.tsx
index d39ac1b6c9..708f50dae9 100644
--- a/src/components/ComputerPanel.tsx
+++ b/src/components/ComputerPanel.tsx
@@ -52,8 +52,8 @@ import {
type ComputerPanelView,
} from "@/lib/computer-panel-view";
import { approvalModeFor } from "../../shared/approval-mode";
-import { openPlaceAction, placeBlocked, placeFacts, placeHasIssue, placeViewFor, usePlaceSeat, worksOnSimpleLabel } from "@/lib/place-view";
-import { cloudRefusal, type PlaceActionId, type PlaceFacts, type PlaceView } from "../../shared/place-view";
+import { openPlaceAction, panelCloudRefusal, placeBlocked, placeFacts, placeHasIssue, placeViewFor, usePlaceSeat, worksOnSimpleLabel } from "@/lib/place-view";
+import type { PlaceActionId, PlaceFacts, PlaceView } from "../../shared/place-view";
import { t } from "@/lib/i18n";
import { LocalizedPanelError, panelErrorText } from "@/lib/computer-messages";
@@ -1107,7 +1107,7 @@ export function ComputerPanel({
...(refusal ? { refusal } : {}),
});
const cloudRefused = bot.computer === "cloud" && cloudBackend === "box" && phase === "error" && error && !(error instanceof LocalizedPanelError)
- ? cloudRefusal({ message: errorText ?? "", status: Number((error as { status?: unknown }).status ?? 0) || undefined }, state.config?.box?.included === true)
+ ? panelCloudRefusal(error, errorText ?? "", state.config?.box?.included === true)
: undefined;
const cloudView = viewOf("cloud", cloudRefused);
const autoView = viewOf("auto");
diff --git a/src/components/FailedTurnRow.place.test.ts b/src/components/FailedTurnRow.place.test.ts
index 7d6d421f94..9b3e5b2996 100644
--- a/src/components/FailedTurnRow.place.test.ts
+++ b/src/components/FailedTurnRow.place.test.ts
@@ -31,7 +31,7 @@ vi.mock("@/lib/use-owner-or-admin", () => ({ useOwnerOrAdmin: () => fixture.owne
vi.mock("@/lib/analytics", () => ({ track: vi.fn() }));
const { FailedTurnRow } = await import("./ChatView");
-const { placeRowViewFor } = await import("@/lib/place-view");
+const { panelCloudRefusal, placeRowViewFor } = await import("@/lib/place-view");
const stored = (place: PlaceRow): NonNullable<Message["tool"]> => failedTurnTool(placeRowText(place), { place });
@@ -116,3 +116,15 @@ describe("the phone row", () => {
}
});
});
+
+describe("the computer panel's refused cloud desktop", () => {
+ const TRIAL = "Your Pro free trial's 20 cloud computer hours are used up. Your full allowance starts with your first payment on 14 Nov.";
+ it("reads the Admin's limit from the home's error body, and a free trial's words from an Admin that sends none", () => {
+ const answered = (body: Record<string, unknown>) => Object.assign(new Error(String(body.error)), { status: 500, body });
+ expect(panelCloudRefusal(answered({ error: "Words this app doesn't know.", cloudLimit: { reason: "at_once", plan: "Max", limit: 4, used: 4 } }), "Words this app doesn't know.", true))
+ .toEqual({ state: "cc-at-once", params: { plan: "Max", max: 4 } });
+ expect(panelCloudRefusal(answered({ error: TRIAL }), TRIAL, true)).toEqual({ state: "cc-no-hours", params: { trial: true } });
+ expect(panelCloudRefusal(answered({ error: "Cloud computers are busy right now. Try again in a few minutes." }), "Cloud computers are busy right now. Try again in a few minutes.", true).state)
+ .toBe("cc-unavailable");
+ });
+});
diff --git a/src/lib/place-view.ts b/src/lib/place-view.ts
index cb5b552979..c30b26a802 100644
--- a/src/lib/place-view.ts
+++ b/src/lib/place-view.ts
@@ -13,12 +13,20 @@ import { openKeySettings } from "@/components/keys/key-focus";
import type { Action, Bot, ConfigStatus, InstanceInfo } from "@/state/store";
import type { LocaleKey } from "@/locales";
import {
- placeRowView, placeView, type Place, type PlaceActionId, type PlaceFacts, type PlaceRow, type PlaceTranslate, type PlaceView, type ServerKind,
+ cloudLimitFromBody, cloudRefusal, placeRowView, placeView, type Place, type PlaceActionId, type PlaceFacts, type PlaceRow, type PlaceTranslate, type PlaceView,
+ type ServerKind,
} from "../../shared/place-view";
import { canUseMcpServer } from "../../shared/tool-scope";
export const placeTranslate: PlaceTranslate = (key, params) => t(key as LocaleKey, params);
+/** A cloud desktop's failed start, read from the server's error: its words, its status and the Admin's limit. */
+export function panelCloudRefusal(error: unknown, message: string, included: boolean): NonNullable<PlaceFacts["refusal"]> {
+ const { status, body } = Object(error) as { status?: unknown; body?: { cloudLimit?: unknown } };
+ const limit = cloudLimitFromBody(body?.cloudLimit);
+ return cloudRefusal({ message, status: Number(status ?? 0) || undefined, ...(limit ? { limit } : {}) }, included);
+}
+
export interface PlaceSeat {
server: ServerKind;
plan: boolean;
diff --git a/src/locales/de.json b/src/locales/de.json
index 81d762001f..a748b0d8d6 100644
--- a/src/locales/de.json
+++ b/src/locales/de.json
@@ -2208,6 +2208,7 @@
"place.view.ccAsleep.line": "Der Cloud-Desktop von {bot} schläft. Er wacht in ein paar Sekunden auf, wenn {bot} ihn braucht.",
"place.view.ccNoHours.line": "Die {hours} Cloud-Desktop-Stunden dieses Monats sind aufgebraucht. Am 1. {month} gibt es neue.",
"place.view.ccNoHours.lineUnknown": "Die Cloud-Desktop-Stunden dieses Monats sind aufgebraucht.",
+ "place.view.ccNoHours.lineTrial": "Die Cloud-Desktop-Stunden der kostenlosen Testphase sind aufgebraucht. Das volle Kontingent beginnt mit der ersten Zahlung.",
"place.view.ccAtOnce.lineOne": "Dein Tarif {plan} enthält 1 Cloud-Desktop, und {holders} nutzt ihn.",
"place.view.ccAtOnce.lineMany": "Dein Tarif {plan} enthält {max} Cloud-Desktops, und {holders} nutzen sie.",
"place.view.ccAtOnce.lineUnknown": "Alle Cloud-Desktops deines Tarifs sind in Gebrauch.",
diff --git a/src/locales/en.json b/src/locales/en.json
index 4c94882652..a36e21f1c4 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -6500,6 +6500,7 @@
"place.view.ccNoHours.short": "No hours left",
"place.view.ccNoHours.line": "This month's {hours} cloud desktop hours are used up. They come back on 1 {month}.",
"place.view.ccNoHours.lineUnknown": "This month's cloud desktop hours are used up.",
+ "place.view.ccNoHours.lineTrial": "The free trial's cloud desktop hours are used up. The full allowance starts with the first payment.",
"place.view.ccAtOnce.short": "In use",
"place.view.ccAtOnce.lineOne": "Your {plan} plan includes 1 cloud desktop, and {holders} has it.",
"place.view.ccAtOnce.lineMany": "Your {plan} plan includes {max} cloud desktops, and {holders} have them.",
diff --git a/src/locales/es.json b/src/locales/es.json
index 6913220069..413e68fe9b 100644
--- a/src/locales/es.json
+++ b/src/locales/es.json
@@ -4962,6 +4962,7 @@
"place.view.ccNoHours.short": "Sin horas disponibles",
"place.view.ccNoHours.line": "Se agotaron las {hours} horas de escritorio en la nube de este mes. Vuelven el 1 de {month}.",
"place.view.ccNoHours.lineUnknown": "Se agotaron las horas de escritorio en la nube de este mes.",
+ "place.view.ccNoHours.lineTrial": "Se agotaron las horas de escritorio en la nube de la prueba gratis. La asignación completa empieza con el primer pago.",
"place.view.ccAtOnce.short": "En uso",
"place.view.ccAtOnce.lineOne": "Tu plan {plan} incluye 1 escritorio en la nube, y lo tiene {holders}.",
"place.view.ccAtOnce.lineMany": "Tu plan {plan} incluye {max} escritorios en la nube, y los tienen {holders}.",
diff --git a/src/locales/fr.json b/src/locales/fr.json
index 65b6d88347..8755c33602 100644
--- a/src/locales/fr.json
+++ b/src/locales/fr.json
@@ -2131,6 +2131,7 @@
"place.view.ccAsleep.line": "Le bureau cloud de {bot} est en veille. Il se réveille en quelques secondes quand {bot} en a besoin.",
"place.view.ccNoHours.line": "Les {hours} heures de bureau cloud de ce mois sont épuisées. Elles reviennent le 1er {month}.",
"place.view.ccNoHours.lineUnknown": "Les heures de bureau cloud de ce mois sont épuisées.",
+ "place.view.ccNoHours.lineTrial": "Les heures de bureau cloud de l'essai gratuit sont épuisées. L'allocation complète commence avec le premier paiement.",
"place.view.ccAtOnce.lineOne": "Votre forfait {plan} inclut 1 bureau cloud, et {holders} l'utilise.",
"place.view.ccAtOnce.lineMany": "Votre forfait {plan} inclut {max} bureaux cloud, et {holders} les utilisent.",
"place.view.ccAtOnce.lineUnknown": "Tous les bureaux cloud inclus dans votre forfait sont utilisés.",
diff --git a/src/locales/hi.json b/src/locales/hi.json
index 6bec9799c7..5910ea267f 100644
--- a/src/locales/hi.json
+++ b/src/locales/hi.json
@@ -2131,6 +2131,7 @@
"place.view.ccAsleep.line": "{bot} का क्लाउड डेस्कटॉप सो रहा है। {bot} को ज़रूरत होने पर यह कुछ सेकंड में जाग जाता है।",
"place.view.ccNoHours.line": "इस महीने के {hours} क्लाउड डेस्कटॉप घंटे खत्म हो गए हैं। ये 1 {month} को फिर मिलेंगे।",
"place.view.ccNoHours.lineUnknown": "इस महीने के क्लाउड डेस्कटॉप घंटे खत्म हो गए हैं।",
+ "place.view.ccNoHours.lineTrial": "मुफ़्त ट्रायल के क्लाउड डेस्कटॉप घंटे खत्म हो गए हैं। पूरा कोटा पहले भुगतान से शुरू होता है।",
"place.view.ccAtOnce.lineOne": "आपके {plan} प्लान में 1 क्लाउड डेस्कटॉप शामिल है, और वह {holders} के पास है।",
"place.view.ccAtOnce.lineMany": "आपके {plan} प्लान में {max} क्लाउड डेस्कटॉप शामिल हैं, और वे {holders} के पास हैं।",
"place.view.ccAtOnce.lineUnknown": "आपके प्लान में शामिल सभी क्लाउड डेस्कटॉप इस्तेमाल में हैं।",
diff --git a/src/locales/it.json b/src/locales/it.json
index 4dbc92f44e..c34bc77371 100644
--- a/src/locales/it.json
+++ b/src/locales/it.json
@@ -5240,6 +5240,7 @@
"place.view.ccNoHours.short": "Ore esaurite",
"place.view.ccNoHours.line": "Le {hours} ore di desktop cloud di questo mese sono esaurite. Tornano il 1° {month}.",
"place.view.ccNoHours.lineUnknown": "Le ore di desktop cloud di questo mese sono esaurite.",
+ "place.view.ccNoHours.lineTrial": "Le ore di desktop cloud della prova gratuita sono esaurite. L'allocazione completa inizia con il primo pagamento.",
"place.view.ccAtOnce.short": "In uso",
"place.view.ccAtOnce.lineOne": "Il tuo piano {plan} include 1 desktop cloud e lo sta usando {holders}.",
"place.view.ccAtOnce.lineMany": "Il tuo piano {plan} include {max} desktop cloud e li stanno usando {holders}.",
diff --git a/src/locales/ja.json b/src/locales/ja.json
index d752c08261..53198e969c 100644
--- a/src/locales/ja.json
+++ b/src/locales/ja.json
@@ -6031,6 +6031,7 @@
"place.view.ccNoHours.short": "残り時間なし",
"place.view.ccNoHours.line": "今月のクラウドデスクトップ利用時間 {hours} 時間を使い切りました。{month} 1 日にリセットされます。",
"place.view.ccNoHours.lineUnknown": "今月のクラウドデスクトップ利用時間を使い切りました。",
+ "place.view.ccNoHours.lineTrial": "無料トライアルのクラウドデスクトップ利用時間を使い切りました。最初のお支払いから通常の利用枠が始まります。",
"place.view.ccAtOnce.short": "使用中",
"place.view.ccAtOnce.lineOne": "{plan} プランにはクラウドデスクトップ 1 台が含まれ、{holders} が使用中です。",
"place.view.ccAtOnce.lineMany": "{plan} プランにはクラウドデスクトップ {max} 台が含まれ、{holders} が使用中です。",
diff --git a/src/locales/ko.json b/src/locales/ko.json
index 14fbf592b0..0a517fddb4 100644
--- a/src/locales/ko.json
+++ b/src/locales/ko.json
@@ -5803,6 +5803,7 @@
"place.view.ccNoHours.short": "남은 시간 없음",
"place.view.ccNoHours.line": "이번 달 클라우드 데스크톱 {hours}시간을 모두 썼어요. {month} 1일에 다시 채워져요.",
"place.view.ccNoHours.lineUnknown": "이번 달 클라우드 데스크톱 시간을 모두 썼어요.",
+ "place.view.ccNoHours.lineTrial": "무료 체험의 클라우드 데스크톱 시간을 모두 썼어요. 첫 결제부터 전체 사용량이 시작돼요.",
"place.view.ccAtOnce.short": "사용 중",
"place.view.ccAtOnce.lineOne": "{plan} 요금제에는 클라우드 데스크톱이 1개 포함되어 있는데, {holders}이(가) 쓰고 있어요.",
"place.view.ccAtOnce.lineMany": "{plan} 요금제에는 클라우드 데스크톱이 {max}개 포함되어 있는데, {holders}이(가) 쓰고 있어요.",
diff --git a/src/locales/pl.json b/src/locales/pl.json
index 92eb50e560..b81edcad3a 100644
--- a/src/locales/pl.json
+++ b/src/locales/pl.json
@@ -5383,6 +5383,7 @@
"place.view.ccNoHours.short": "Brak godzin",
"place.view.ccNoHours.line": "Wykorzystano miesięczny limit godzin pulpitu w chmurze: {hours}. Wracają 1. dnia miesiąca {month}.",
"place.view.ccNoHours.lineUnknown": "Wykorzystano wszystkie godziny pulpitu w chmurze na ten miesiąc.",
+ "place.view.ccNoHours.lineTrial": "Wykorzystano wszystkie godziny pulpitu w chmurze z bezpłatnego okresu próbnego. Pełny limit zaczyna się od pierwszej płatności.",
"place.view.ccAtOnce.short": "W użyciu",
"place.view.ccAtOnce.lineOne": "Twój plan {plan} obejmuje 1 pulpit w chmurze, a korzysta z niego {holders}.",
"place.view.ccAtOnce.lineMany": "Twój plan {plan} obejmuje pulpity w chmurze: {max}, a korzystają z nich {holders}.",
diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json
index 9d58aaa297..e3d9f5d3f1 100644
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@ -6186,6 +6186,7 @@
"place.view.ccNoHours.short": "Sem horas restantes",
"place.view.ccNoHours.line": "As {hours} horas de desktop na nuvem deste mês acabaram. Elas voltam em 1º de {month}.",
"place.view.ccNoHours.lineUnknown": "As horas de desktop na nuvem deste mês acabaram.",
+ "place.view.ccNoHours.lineTrial": "As horas de desktop na nuvem do teste grátis acabaram. A franquia completa começa com o primeiro pagamento.",
"place.view.ccAtOnce.short": "Em uso",
"place.view.ccAtOnce.lineOne": "Seu plano {plan} inclui 1 desktop na nuvem, e {holders} está com ele.",
"place.view.ccAtOnce.lineMany": "Seu plano {plan} inclui {max} desktops na nuvem, todos em uso por {holders}.",
diff --git a/src/locales/ru.json b/src/locales/ru.json
index cafb3c6a81..74c28e3ff8 100644
--- a/src/locales/ru.json
+++ b/src/locales/ru.json
@@ -5434,6 +5434,7 @@
"place.view.ccNoHours.short": "Часы закончились",
"place.view.ccNoHours.line": "Часы облачного рабочего стола на этот месяц ({hours}) израсходованы. Они вернутся 1 {month}.",
"place.view.ccNoHours.lineUnknown": "Часы облачного рабочего стола на этот месяц израсходованы.",
+ "place.view.ccNoHours.lineTrial": "Часы облачного рабочего стола бесплатного пробного периода израсходованы. Полный объём начнётся с первого платежа.",
"place.view.ccAtOnce.short": "Занят",
"place.view.ccAtOnce.lineOne": "Ваш тариф {plan} включает 1 облачный рабочий стол, и он занят ({holders}).",
"place.view.ccAtOnce.lineMany": "Ваш тариф {plan} включает {max} облачных рабочих столов, и они заняты ({holders}).",
diff --git a/src/locales/tr.json b/src/locales/tr.json
index c61b062ab1..23fdb3b884 100644
--- a/src/locales/tr.json
+++ b/src/locales/tr.json
@@ -4337,6 +4337,7 @@
"place.view.ccNoHours.short": "Saat kalmadı",
"place.view.ccNoHours.line": "Bu ayın {hours} bulut masaüstü saati tükendi. 1 {month} tarihinde yenilenir.",
"place.view.ccNoHours.lineUnknown": "Bu ayın bulut masaüstü saatleri tükendi.",
+ "place.view.ccNoHours.lineTrial": "Ücretsiz denemenin bulut masaüstü saatleri tükendi. Tam kullanım hakkı ilk ödemeyle başlar.",
"place.view.ccAtOnce.short": "Kullanımda",
"place.view.ccAtOnce.lineOne": "{plan} planınız 1 bulut masaüstü içerir ve şu anda {holders} kullanıyor.",
"place.view.ccAtOnce.lineMany": "{plan} planınız {max} bulut masaüstü içerir ve şu anda {holders} kullanıyor.",
diff --git a/src/locales/uk.json b/src/locales/uk.json
index 7cde28abe1..7d8c21d41a 100644
--- a/src/locales/uk.json
+++ b/src/locales/uk.json
@@ -2602,6 +2602,7 @@
"place.view.ccAsleep.line": "Хмарний робочий стіл {bot} спить. Він прокинеться за кілька секунд, коли знадобиться {bot}.",
"place.view.ccNoHours.line": "Години хмарного робочого столу цього місяця ({hours}) вичерпано. Вони повернуться 1 {month}.",
"place.view.ccNoHours.lineUnknown": "Години хмарного робочого столу цього місяця вичерпано.",
+ "place.view.ccNoHours.lineTrial": "Години хмарного робочого столу безкоштовного пробного періоду вичерпано. Повний обсяг почнеться з першого платежу.",
"place.view.ccAtOnce.lineOne": "Ваш план {plan} включає 1 хмарний робочий стіл, і ним користується {holders}.",
"place.view.ccAtOnce.lineMany": "Ваш план {plan} включає {max} хмарних робочих столів, і ними користуються {holders}.",
"place.view.ccAtOnce.lineUnknown": "Усі хмарні робочі столи вашого плану зараз зайняті.",
diff --git a/src/locales/vi.json b/src/locales/vi.json
index 40fe805206..8e6e47a6c4 100644
--- a/src/locales/vi.json
+++ b/src/locales/vi.json
@@ -4337,6 +4337,7 @@
"place.view.ccNoHours.short": "Đã hết giờ sử dụng",
"place.view.ccNoHours.line": "Đã dùng hết {hours} giờ desktop đám mây của tháng này. Số giờ sẽ được cấp lại vào ngày 1 {month}.",
"place.view.ccNoHours.lineUnknown": "Đã dùng hết số giờ desktop đám mây của tháng này.",
+ "place.view.ccNoHours.lineTrial": "Đã dùng hết số giờ desktop đám mây của bản dùng thử miễn phí. Hạn mức đầy đủ bắt đầu từ lần thanh toán đầu tiên.",
"place.view.ccAtOnce.short": "Đang sử dụng",
"place.view.ccAtOnce.lineOne": "Gói {plan} của bạn bao gồm 1 desktop đám mây, và {holders} đang sử dụng.",
"place.view.ccAtOnce.lineMany": "Gói {plan} của bạn bao gồm {max} desktop đám mây, và {holders} đang sử dụng.",
diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.json
index 6baaf7967b..f107b82841 100644
--- a/src/locales/zh-tw.json
+++ b/src/locales/zh-tw.json
@@ -6227,6 +6227,7 @@
"place.view.ccNoHours.short": "時數已用完",
"place.view.ccNoHours.line": "本月的 {hours} 小時雲端桌面時數已用完,將於 {month} 1 日恢復。",
"place.view.ccNoHours.lineUnknown": "本月的雲端桌面時數已用完。",
+ "place.view.ccNoHours.lineTrial": "免費試用的雲端桌面時數已用完。完整額度從第一次付款開始。",
"place.view.ccAtOnce.short": "使用中",
"place.view.ccAtOnce.lineOne": "你的 {plan} 方案包含 1 台雲端桌面,目前由 {holders} 使用中。",
"place.view.ccAtOnce.lineMany": "你的 {plan} 方案包含 {max} 台雲端桌面,目前由 {holders} 使用中。",
diff --git a/src/locales/zh.json b/src/locales/zh.json
index 0c27461868..388e686e19 100644
--- a/src/locales/zh.json
+++ b/src/locales/zh.json
@@ -6011,6 +6011,7 @@
"place.view.ccNoHours.short": "时长已用完",
"place.view.ccNoHours.line": "本月的 {hours} 小时云端桌面时长已用完,将于 {month} 1 日恢复。",
"place.view.ccNoHours.lineUnknown": "本月的云端桌面时长已用完。",
+ "place.view.ccNoHours.lineTrial": "免费试用的云端桌面时长已用完。完整额度从第一次付款开始。",
"place.view.ccAtOnce.short": "正在使用",
"place.view.ccAtOnce.lineOne": "你的 {plan} 方案包含 1 台云端桌面,目前由 {holders} 使用。",
"place.view.ccAtOnce.lineMany": "你的 {plan} 方案包含 {max} 台云端桌面,目前由 {holders} 使用。",