Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
feat(routines): keep the chat's computer for a routine made there
AdityaUmale4184d865ea4b
diff --git a/packages/phone-protocol/src/routines.ts b/packages/phone-protocol/src/routines.tsindex 31324ea897..8335fcf3bd 100644--- a/packages/phone-protocol/src/routines.ts+++ b/packages/phone-protocol/src/routines.ts@@ -141,6 +141,10 @@ export function isCountedSkip(run: Pick<RoutineRun, "skipped">): boolean {* indicators count, or one exact status. */export type RoutineRunStatusFilter = "all" | "problems" | RoutineRunStatus;+/** A computer a routine's runs can be kept on: the person's own, the Local VM, the cloud computer, or the built-in browser only. */+export type RoutineComputer = "local" | "vm" | "cloud" | "browser";+export const ROUTINE_COMPUTERS: readonly RoutineComputer[] = ["local", "vm", "cloud", "browser"];+export interface Routine {id: string;name: string;@@ -189,6 +193,9 @@ export interface Routine {heldFor?: RoutineHoldCause;attachments?: RoutineContextAttachment[];sourceThreadId?: string;+ /** The computer each run works on, kept from the chat the routine was made in when that chat was set to one.+ * Missing means the bot's own Works on setting. */+ computer?: RoutineComputer;resultsThreadId?: string;nextRunAt: number | null;createdAt: number;@@ -219,6 +226,8 @@ export interface RoutineRun {/** Room task created for a team-goal run. */executionThreadId?: string;sourceThreadId?: string;+ /** The routine's own computer when the run started (Routine.computer). */+ computer?: RoutineComputer;resultsThreadId?: string;threadId?: string;startedAt?: number;@@ -283,6 +292,8 @@ export interface RoutineInput {/** Omission preserves routing; null resets it to the bot's main thread (on a Team Cloud, a results chat everyone who* sees the bot reads); RESULTS_JUST_ME, on a Team Cloud only, the person's own private chat with the bot. */resultsThreadId?: string | null;+ /** Omission preserves it on updates; null clears it, so runs follow the bot's Works on setting again. */+ computer?: RoutineComputer | null;}/** On a Team Cloud, "Just me": the routine reports into the person's own private chat with the bot, theirs alone. */diff --git a/server/index.ts b/server/index.tsindex e8b24b6a66..99f736cc2d 100644--- a/server/index.ts+++ b/server/index.ts@@ -504,6 +504,7 @@ import { CONTROL_ACT_WITHIN_MS, CONTROL_HANDED_BACK, CONTROL_NOT_READY, CONTROL_import { computerFreeAfterText, computerParkedRefusal, computerParkedText, computerPersonAwayText, computerStoppedWaitingText, computerWaitingText, type ComputerHolder } from "./computer-wait.ts"; import { createComputerGateAnswers } from "./host/computer-gate-answers.ts";import { modelContextWindow } from "./model-context-window.ts";import { browserIsThePlace, chosenPin, cloudPlaceRefusal, computerSelectionPrompt, computerSkippedNote, computerToolsRefusal, handoffUsesOwnCloud, isHandedWork, failedOnHostPath, openBrowserBeside, ownCloudStateWithin, parseSurface, pinSource, PlaceUnavailableError, placeUnavailable, resolveSurface, surfaceLabel, surfaceOfComputerKind, surfacePrompt, thisComputerSwitch, whereWorksControl, type ComputerWant, type PlaceSource, type Surface } from "./surface.ts";+import { chatComputer, runComputerPin } from "./routine-computer.ts";import { cloudRefusal, type PlaceRow } from "../shared/place-view.ts";import { cloudFailureOf, cloudLimitFields, cloudLimitText } from "./boat-limit.ts";import {@@ -8671,6 +8672,7 @@ routines = new RoutineManager({const task = store.createTask(botId, title, false, undefined, undefined, undefined, routineThreadModel(run && routines?.listRoutines().find((routine) => routine.id === run.routineId), routineModelChecks), undefined,CLOUD_HOME && run ? (created) => threadStarters.set(created.threadId, run.triggerSource === "webhook" ? CLOUD_OWNER_KEY! : routineOpener(run.routineId)) : undefined);if (task && run && outsideEvent(run)) outsideLineage.mark(task.threadId);+ const pin = task && run ? runComputerPin(run) : undefined; if (task && pin) store.patchTask(botId, task.threadId, pin);return task;},joinConversation: (run) => {@@ -8863,7 +8865,7 @@ const routineRequests = new RoutineRequestService({routines, engines: { name: engineName, resetAt: (engine) => limitClock.resetAt(engine), botEngine: (botId) => store.bot(botId)?.modelSelection.instanceId },autoApply: routineAppliesDirectly,cloudReady: cloudRoutineReadiness,- canPersist: proposalPersistence,+ canPersist: proposalPersistence, chatComputer: (botId, threadId) => chatComputer(store.taskByThread(botId, threadId)),// The card can sit open indefinitely, so the target is re-authorized at confirm, not just at proposal.validateTarget: (proposerBotId, target) => {const proposer = store.bot(proposerBotId);diff --git a/server/routine-computer.test.ts b/server/routine-computer.test.tsnew file mode 100644index 0000000000..d82035cba9--- /dev/null+++ b/server/routine-computer.test.ts@@ -0,0 +1,142 @@+import { mkdtempSync, rmSync } from "node:fs";+import { tmpdir } from "node:os";+import { join } from "node:path";+import { afterEach, describe, expect, it } from "vitest";++import { chatComputer, runComputerPin } from "./routine-computer.ts";+import { loadRoutine, loadRun } from "./routine-load.ts";+import { RoutineRequestService, type RoutineRequestMessage, type RoutineRequestOptionCard, type RoutineRequestStore } from "./routine-requests.ts";+import { routineRunDefinition } from "./routine-run-definition.ts";+import { RoutineManager, type Routine, type RoutineInput, type RoutineManagerOptions, type RoutineRun } from "./routines.ts";++const dirs: string[] = [];+afterEach(() => {+ for (const dir of dirs.splice(0)) rmSync(dir, { recursive: true, force: true });+});++const START = Date.parse("2026-11-29T10:00:00Z");+const daily = { type: "daily" as const, time: "09:00", weekdays: [1] };+const base: RoutineInput = { name: "Inbox sweep", prompt: "Sweep the inbox", botId: "bot-a", schedule: daily };+type Pin = { surface?: "local" | "vm" | "cloud" | "browser"; surfaceSource?: "user" | "auto" };++function manager() {+ const dir = mkdtempSync(join(tmpdir(), "omb-routine-computer-"));+ dirs.push(dir);+ const options: RoutineManagerOptions = {+ file: join(dir, "routines.json"),+ now: () => START,+ botState: () => "ready",+ createTask: () => ({ threadId: "thread-1" }),+ startTurn: async () => {},+ };+ return { options, routines: new RoutineManager(options) };+}++class MemoryStore implements RoutineRequestStore {+ private readonly threads = new Map<string, RoutineRequestMessage[]>();+ messagesFor(threadId: string): RoutineRequestMessage[] {+ return this.threads.get(threadId) ?? [];+ }+ appendMessage(threadId: string, message: { card: RoutineRequestOptionCard }): RoutineRequestMessage {+ const stored = { id: `message-${this.messagesFor(threadId).length + 1}`, card: message.card };+ this.threads.set(threadId, [...this.messagesFor(threadId), stored]);+ return stored;+ }+ patchMessage(threadId: string, messageId: string, patch: { card: RoutineRequestOptionCard }): RoutineRequestMessage | null {+ const message = this.messagesFor(threadId).find((candidate) => candidate.id === messageId);+ if (message) message.card = patch.card;+ return message ?? null;+ }+}++function chatCards(pins: Record<string, Pin>) {+ const { routines } = manager();+ const requests = new RoutineRequestService({+ store: new MemoryStore(),+ routines,+ now: () => START,+ timeZone: () => "UTC",+ autoApply: () => "full-access",+ chatComputer: (botId, threadId) => chatComputer(pins[`${botId}/${threadId}`]),+ });+ const create = (threadId: string, forBot?: { botId: string; name: string }) => requests.submit({+ botId: "bot-a",+ threadId,+ proposal: {+ action: "create",+ ...(forBot ? { forBot } : {}),+ routine: { name: `Sweep ${threadId}`, instructions: `Sweep the inbox for ${threadId}`, schedule: { type: "weekly", time: "09:00", weekdays: ["monday"] } },+ },+ });+ return { routines, create };+}++describe("a routine made in a chat keeps that chat's computer", () => {+ it("keeps the computer the person chose for the chat, and nothing for an Auto pick or an unpinned chat", async () => {+ const { routines, create } = chatCards({+ "bot-a/pinned": { surface: "vm", surfaceSource: "user" },+ "bot-a/auto": { surface: "cloud", surfaceSource: "auto" },+ });+ await create("pinned");+ await create("auto");+ await create("plain");+ const byThread = Object.fromEntries(routines.listRoutines().map((routine) => [routine.sourceThreadId, routine.computer]));+ expect(byThread).toEqual({ pinned: "vm", auto: undefined, plain: undefined });+ });++ it("keeps nothing for a routine made for another bot, which works on its own setting", async () => {+ const { routines, create } = chatCards({ "bot-a/pinned": { surface: "local", surfaceSource: "user" } });+ await create("pinned", { botId: "bot-b", name: "Peer" });+ expect(routines.listRoutines()[0]).not.toHaveProperty("computer");+ });+});++describe("a routine's own computer", () => {+ it("is copied to each run, which starts its conversation pinned there", () => {+ const { routines } = manager();+ const routine = routines.create({ ...base, computer: "vm" });+ const run = routines.runNow(routine.id)!;+ expect(run.computer).toBe("vm");+ expect(runComputerPin(run)).toEqual({ surface: "vm", surfaceSource: "user" });+ });++ it("leaves a routine without one exactly as before: no pin on its runs", () => {+ const { routines } = manager();+ const routine = routines.create(base);+ expect(routine).not.toHaveProperty("computer");+ const run = routines.runNow(routine.id)!;+ expect(run.computer).toBeUndefined();+ expect(runComputerPin(run)).toBeUndefined();+ });++ it("survives an unrelated edit and a restart, changes on an edit, and clears on null", () => {+ const { options, routines } = manager();+ const routine = routines.create({ ...base, computer: "local" });+ expect(routines.update(routine.id, { prompt: "Sweep it twice" })?.computer).toBe("local");+ expect(new RoutineManager(options).listRoutines()[0]?.computer).toBe("local");+ expect(routines.update(routine.id, { computer: "browser" })?.computer).toBe("browser");+ expect(routines.update(routine.id, { computer: null })).not.toHaveProperty("computer");+ expect(new RoutineManager(options).listRoutines()[0]).not.toHaveProperty("computer");+ });++ it("refuses an unknown computer and is dropped when the routine runs in the cloud", () => {+ const { routines } = manager();+ // SAFETY: deliberately invalid to exercise the input check.+ expect(() => routines.create({ ...base, computer: "mainframe" as never })).toThrow("Choose a computer");+ expect(routines.create({ ...base, runOn: "cloud", computer: "vm" })).not.toHaveProperty("computer");+ const routine = routines.create({ ...base, computer: "vm" });+ expect(routines.update(routine.id, { runOn: "cloud" })).not.toHaveProperty("computer");+ });++ it("loads a kept computer and drops one that is unknown or on a room goal", () => {+ const saved: Routine = { ...manager().routines.create(base), computer: "vm" };+ expect(loadRoutine(saved, START)?.computer).toBe("vm");+ // SAFETY: deliberately invalid persisted value.+ expect(loadRoutine({ ...saved, computer: "mainframe" as never }, START)).not.toHaveProperty("computer");+ expect(loadRoutine({ ...saved, target: "room-goal", groupId: "group-1" }, START)).not.toHaveProperty("computer");+ const run: RoutineRun = { ...routineRunDefinition(saved), id: "run-1", routineId: saved.id, scheduledFor: START, status: "running", manual: true, createdAt: START };+ expect(loadRun(run).computer).toBe("vm");+ // SAFETY: deliberately invalid persisted value.+ expect(loadRun({ ...run, computer: "mainframe" as never })).not.toHaveProperty("computer");+ });+});diff --git a/server/routine-computer.ts b/server/routine-computer.tsnew file mode 100644index 0000000000..ac89ed8132--- /dev/null+++ b/server/routine-computer.ts@@ -0,0 +1,21 @@+// The computer a bot routine keeps from the chat it was made in, and the pin each of its runs starts with.+import { ROUTINE_COMPUTERS, type RoutineComputer } from "../shared/routines.ts";+import { chosenPin } from "./surface.ts";+import type { Routine, RoutineRun } from "./routines.ts";++/** A routine's own computer as it may hold one: only a bot routine that runs on this server keeps one. */+export function routineComputer(value: unknown, routine: Pick<Routine, "target" | "runOn">): RoutineComputer | undefined {+ if (routine.target !== "bot" || routine.runOn === "cloud") return undefined;+ return ROUTINE_COMPUTERS.find((computer) => computer === value);+}++/** The computer the person chose for a chat; a place a turn picked on its own (Auto) is not kept. */+export function chatComputer(task: { surface?: RoutineComputer; surfaceSource?: "user" | "auto" } | undefined): RoutineComputer | undefined {+ return chosenPin(task) ?? undefined;+}++/** The pin a run's own new conversation starts with, so its turns work where the routine's chat did. */+export function runComputerPin(run: Pick<RoutineRun, "computer" | "runOn" | "target">): { surface: RoutineComputer; surfaceSource: "user" } | undefined {+ const computer = routineComputer(run.computer, run);+ return computer ? { surface: computer, surfaceSource: "user" } : undefined;+}diff --git a/server/routine-input.ts b/server/routine-input.tsindex 6f370e3172..5e16c2aaf2 100644--- a/server/routine-input.ts+++ b/server/routine-input.ts@@ -2,6 +2,7 @@import { approvalModeFor, type ApprovalMode } from "../shared/approval-mode.ts";import { runsOnce } from "../shared/limit-reset.ts";import { cleanAttachments, cleanTimeoutMinutes } from "./routine-attachments.ts";+import { routineComputer } from "./routine-computer.ts";import { loadChecks, loadModelSelection } from "./routine-load.ts";import { cleanSchedule } from "./routine-schedules.ts";import type { ModelSelection } from "../shared/wire.ts";@@ -91,6 +92,8 @@ export function sanitizeInput(input: RoutineInput, after: number): Omit<Routine,if (checks && (target !== "bot" || runsOnce(schedule))) throw userErrorThrown("serverError.routine.checksRepeat");if (input.access != null && input.access !== "read-and-draft") throw userErrorThrown("serverError.routine.access");if (input.deliver != null && (input.deliver !== "brief" || target !== "bot")) throw userErrorThrown("serverError.routine.deliver");+ if (input.computer != null && !routineComputer(input.computer, { target: "bot", runOn: "maus" })) throw new Error("Choose a computer for this routine");+ const computer = routineComputer(input.computer, { target, runOn });return {name,prompt,@@ -111,5 +114,6 @@ export function sanitizeInput(input: RoutineInput, after: number): Omit<Routine,...(checks ? { checks } : {}),...(input.access === "read-and-draft" ? { access: "read-and-draft" as const } : {}),...(input.deliver === "brief" ? { deliver: "brief" as const } : {}),+ ...(computer ? { computer } : {}),};}diff --git a/server/routine-load.ts b/server/routine-load.tsindex 51c3bb6ba5..c79492c797 100644--- a/server/routine-load.ts+++ b/server/routine-load.ts@@ -8,6 +8,7 @@ import { isEffortLevel, type ModelSelection } from "../shared/wire.ts";import { isModelVariant } from "./contracts.ts";import { ROUTINE_PARTS, type PartPair, type RoutinePart } from "./package-parts.ts";import { loadAttachments, loadTimeoutMinutes } from "./routine-attachments.ts";+import { routineComputer } from "./routine-computer.ts";import { isRoutineHoldCause } from "./routine-holds.ts";import { MAX_DATE_MS } from "./routine-intervals.ts";import { loadSchedule } from "./routine-schedules.ts";@@ -114,10 +115,11 @@ export function loadRoutine(routine: Routine, now: number): Routine | null {checkTroubleCode: typeof routine.checkTrouble === "string" && routine.checkTrouble && typeof routine.checkTroubleCode === "string" ? routine.checkTroubleCode.slice(0, 80) : undefined,wakeAt: instant(routine.wakeAt),heldFor: isRoutineHoldCause(routine.heldFor) ? routine.heldFor : undefined,+ computer: routineComputer(routine.computer, { target, runOn: routine.runOn }),};delete loaded.failureStreak;delete loaded.noStartStreak;- return withCheckFields(withoutUndefined(loaded, ["timeoutMinutes", "runOnStartup", "modelSelection", "installedPackage", "checkedAt", "checkTrouble", "checkTroubleCode", "wakeAt", "heldFor"]));+ return withCheckFields(withoutUndefined(loaded, ["timeoutMinutes", "runOnStartup", "modelSelection", "installedPackage", "checkedAt", "checkTrouble", "checkTroubleCode", "wakeAt", "heldFor", "computer"]));}export function loadRun(run: RoutineRun): RoutineRun {@@ -134,6 +136,7 @@ export function loadRun(run: RoutineRun): RoutineRun {resultsThreadId: persistedSourceThreadId.parse(run.resultsThreadId),access: run.access === "read-and-draft" ? "read-and-draft" : undefined,deliver: run.deliver === "brief" ? "brief" : undefined,+ computer: routineComputer(run.computer, { target, runOn: run.runOn }),checkKey: typeof run.checkKey === "string" && /^[\w-]{1,128}$/.test(run.checkKey) ? run.checkKey : undefined,busyMs: instant(run.busyMs),workedMs: instant(run.workedMs),@@ -141,7 +144,7 @@ export function loadRun(run: RoutineRun): RoutineRun {wakeRetries: loadWakeRetries(run.wakeRetries),wakeRetryUntil: instant(run.wakeRetryUntil),};- return withoutUndefined(loaded, ["timeoutMinutes", "access", "deliver", "checkKey", "busyMs", "workedMs", "skipped", "wakeRetries", "wakeRetryUntil"]);+ return withoutUndefined(loaded, ["timeoutMinutes", "access", "deliver", "computer", "checkKey", "busyMs", "workedMs", "skipped", "wakeRetries", "wakeRetryUntil"]);}const REQUEST_ACTIONS = new Set<RoutineRequestOperation["action"]>(["create", "update", "pause", "resume", "run_now", "delete"]);diff --git a/server/routine-requests.ts b/server/routine-requests.tsindex ca8b334ee2..cf124da42b 100644--- a/server/routine-requests.ts+++ b/server/routine-requests.ts@@ -117,7 +117,7 @@ export interface RoutineRequestServiceOptions {) => { ok: true } | { ok: false; status: number; error: string };/** Re-authorizes a cross-bot target at propose and confirm time: the card can outlive the target's section. */validateTarget?: (proposerBotId: string, target: { botId: string; name: string }) => string | null;- engines?: LimitResetEngines;+ engines?: LimitResetEngines; /** The computer the person chose for a chat, which a routine made there keeps. */ chatComputer?: (botId: string, threadId: string) => RoutineInput["computer"];}export interface ProposeRoutineRequestArgs {@@ -934,7 +934,7 @@ export class RoutineRequestService {private readonly canPersist?: RoutineRequestServiceOptions["canPersist"];private readonly validateTarget?: RoutineRequestServiceOptions["validateTarget"];private readonly autoApply?: RoutineRequestServiceOptions["autoApply"];- private readonly engines?: LimitResetEngines;+ private readonly engines?: LimitResetEngines; private readonly chatComputer?: RoutineRequestServiceOptions["chatComputer"];constructor(options: RoutineRequestServiceOptions) {this.store = options.store;@@ -945,7 +945,7 @@ export class RoutineRequestService {this.canPersist = options.canPersist;this.validateTarget = options.validateTarget;this.autoApply = options.autoApply;- this.engines = options.engines;+ this.engines = options.engines; this.chatComputer = options.chatComputer;}/** Writes the card without applying it, the first half of submit(); no production path stops here since Triggers v2. */@@ -1386,12 +1386,10 @@ export class RoutineRequestService {const operation = payload.operation;const confirmationAt = this.now();switch (operation.action) {- case "create":- return this.routines.create(inputFromDefinition(- operation.routine,- operation.forBot?.botId ?? payload.botId,- confirmationAt,- ), {+ case "create": {+ // Only a routine for the chat's own bot keeps the chat's computer; another bot works on its own setting.+ const botId = operation.forBot?.botId ?? payload.botId, computer = botId === payload.botId ? this.chatComputer?.(botId, payload.threadId) : undefined;+ return this.routines.create({ ...inputFromDefinition(operation.routine, botId, confirmationAt), ...(computer ? { computer } : {}) }, {requestId: payload.requestId,messageId,botId: payload.botId,@@ -1400,6 +1398,7 @@ export class RoutineRequestService {fingerprintVersion: ROUTINE_REQUEST_FINGERPRINT_VERSION,fingerprint,}).id;+ }case "update": {const current = verifyManageSnapshot(operation, this.routines, operation.forBot?.botId ?? payload.botId);const updated = this.routines.update(diff --git a/server/routine-run-definition.ts b/server/routine-run-definition.tsindex b2150971a2..09f2651839 100644--- a/server/routine-run-definition.ts+++ b/server/routine-run-definition.ts@@ -1,4 +1,5 @@import { cloneAttachments } from "./routine-attachments.ts";+import { routineComputer } from "./routine-computer.ts";import type { Routine, RoutineManagerOptions, RoutineRun } from "./routines.ts";export type ResultsThreadAllocation = { botId: string; threadId: string };@@ -23,7 +24,7 @@ export function resolveRoutineResultsThread(}export function routineRunDefinition(routine: Routine): Pick<RoutineRun,- "routineName" | "prompt" | "durationMinutes" | "timeoutMinutes" | "attachments" | "target" | "groupId" | "botId" | "runOn" | "access" | "deliver" | "sameConversation"> {+ "routineName" | "prompt" | "durationMinutes" | "timeoutMinutes" | "attachments" | "target" | "groupId" | "botId" | "runOn" | "access" | "deliver" | "sameConversation" | "computer"> {return {routineName: routine.name,prompt: routine.prompt,@@ -37,5 +38,6 @@ export function routineRunDefinition(routine: Routine): Pick<RoutineRun,access: routine.access,deliver: routine.deliver,sameConversation: routine.sameConversation ? true : undefined,+ computer: routineComputer(routine.computer, routine),};}diff --git a/server/routines.ts b/server/routines.tsindex f749390f62..19b64d0483 100644--- a/server/routines.ts+++ b/server/routines.ts@@ -16,7 +16,7 @@ import { cloneSchedule, limitResetOccurrence, mergeScheduleUpdate, nextOccurrencimport { runsOnce } from "../shared/limit-reset.ts"; import { limitResetRunOwed } from "./limit-reset-owed.ts";import {ROUTINE_HANDOFF_WAIT, isRoutineProblemRun, type RoutineAccess, type RoutineCheck, type RoutineContextAttachment, type RoutineDelivery, type RoutineIntervalWindow, type RoutineRetryCause,- type RoutineHoldCause, type RoutineRunReport, type RoutineRunStatus, type RoutineRunTrigger,+ type RoutineComputer, type RoutineHoldCause, type RoutineRunReport, type RoutineRunStatus, type RoutineRunTrigger,} from "../shared/routines.ts";import type { PartPair, RoutinePart } from "./package-parts.ts";import {@@ -83,7 +83,7 @@ export interface Routine extends RoutineTroubleCode {weekRuns?: { ok: number; total: number };warning?: string;heldFor?: RoutineHoldCause;- sourceThreadId?: string;+ sourceThreadId?: string; computer?: RoutineComputer;resultsThreadId?: string;installedPackage?: RoutinePackageStamp;nextRunAt: number | null;@@ -136,7 +136,7 @@ export interface RoutineRun extends RoutineLineCodes, RoutineOwnerMark, WakeRetreventSource?: "app" | "wait"; /** Security invariant: harness-set only, on the follow-up of a wait a person's own turn set (waits.ts setBy): that run is theirs, not an outside event's. */ waitSetBy?: "owner" | "person"; sameConversation?: true; /** A person's own "Run now" test of its webhook started it: a usage cap treats it as a run started by hand. */ byPerson?: true;webhookId?: string;deliveryId?: string;- sourceThreadId?: string;+ sourceThreadId?: string; computer?: RoutineComputer;resultsThreadId?: string;threadId?: string;startedAt?: number;@@ -198,7 +198,7 @@ export interface RoutineInput {checks?: RoutineCheck[] | null;access?: RoutineAccess | null;deliver?: RoutineDelivery | null;- resultsThreadId?: string | null;+ resultsThreadId?: string | null; computer?: RoutineComputer | null;}interface RoutineFile {@@ -625,7 +625,7 @@ export class RoutineManager {runOnStartup: patch.runOnStartup ?? routine.runOnStartup,checks: Object.hasOwn(patch, "checks") ? patch.checks : routine.checks,access: Object.hasOwn(patch, "access") ? patch.access : routine.access,- deliver: Object.hasOwn(patch, "deliver") ? patch.deliver : routine.deliver,+ deliver: Object.hasOwn(patch, "deliver") ? patch.deliver : routine.deliver, computer: Object.hasOwn(patch, "computer") ? patch.computer : routine.computer,}, now);clean.schedule = this.timedSchedule(clean.schedule, routine.id);if (this.targetState(clean) === "missing") throw new Error(this.missingTargetMessage(clean.target));@@ -650,7 +650,7 @@ export class RoutineManager {updatedAt: Math.max(now, routine.updatedAt + 1),});if (patch.enabled !== undefined) delete routine.heldFor;- for (const key of ["continuity", "sameConversation", "modelSelection", "overlap", "runOnStartup", "access", "deliver"] as const) if (!clean[key]) delete routine[key];+ for (const key of ["continuity", "sameConversation", "modelSelection", "overlap", "runOnStartup", "access", "deliver", "computer"] as const) if (!clean[key]) delete routine[key];if (!clean.checks) for (const key of ["checks", "checkedAt", "checkTrouble", "checkTroubleCode", "wakeAt"] as const) delete routine[key];if (Object.hasOwn(patch, "timeoutMinutes") && patch.timeoutMinutes == null) {delete routine.timeoutMinutes;diff --git a/src/components/RoutineCalendarPage.tsx b/src/components/RoutineCalendarPage.tsxindex 0a689358ac..362fa4ebc5 100644--- a/src/components/RoutineCalendarPage.tsx+++ b/src/components/RoutineCalendarPage.tsx@@ -60,13 +60,13 @@ import {import { limitResetWhen } from "@/lib/limit-resets";import { LimitResetFields, type LimitResetChoice } from "./routines/LimitResetFields";import { DAY_NAMES, dayName, durationLabel, niceDate, niceTime, scheduleLabel } from "@/lib/schedule-label";-import { Select } from "./Select";+import { Select } from "./Select"; import { RoutineComputerChoice } from "./routines/RoutineComputerChoice";import {isRoutineProblemRun,type Routine,type RoutineContextAttachment,type RoutineInput,- type RoutineRunOn,+ type RoutineComputer, type RoutineRunOn,type RoutineRun,type RoutineSchedule,type RoutineScheduleInput,@@ -346,7 +346,7 @@ export function EventEditor({};const [routineTarget, setRoutineTarget] = useState<RoutineTarget>(existingRoutine?.target ?? "bot");const [groupId, setGroupId] = useState(existingRoutine?.groupId ?? "");- const [runOn, setRunOn] = useState<RoutineRunOn>(existingRoutine?.runOn ?? defaultRunOn ?? "maus");+ const [runOn, setRunOn] = useState<RoutineRunOn>(existingRoutine?.runOn ?? defaultRunOn ?? "maus"); const [computer, setComputer] = useState<RoutineComputer | null>(existingRoutine?.computer ?? null);const [attachments, setAttachments] = useState<Array<RoutineContextAttachment | CalendarCallAttachment>>(existingRoutine?.target === "room-goal" ? [] : existingRoutine?.attachments ?? existingCall?.attachments ?? [],);@@ -496,7 +496,7 @@ export function EventEditor({continuity: routineTarget === "bot" && recurrence !== "none" && continuity,runOnStartup: recurrence !== "none" && runOnStartup,attachments: routineTarget === "room-goal" ? [] : attachments as RoutineContextAttachment[],- ...(routineTarget === "bot" ? { resultsThreadId } : {}),+ ...(routineTarget === "bot" ? { resultsThreadId, computer: runOn === "cloud" ? null : computer } : {}),};const response = await editorRequest(existingRoutine ? `/api/routines/${existingRoutine.id}` : "/api/routines", { method: existingRoutine ? "PATCH" : "POST", body: JSON.stringify(input) });dispatch({ type: "routinePatched", routine: response.routine });@@ -838,7 +838,7 @@ export function EventEditor({) : <div className="grid grid-cols-2 gap-2"><button type="button" onClick={() => setRunOn("maus")} className={cn("rounded-xl border p-3 text-left", runOn === "maus" ? "border-accent/60 bg-accent/10" : "border-hairline/50 bg-inset hover:bg-raised")}><div className="text-[13px] font-medium text-ink">{t("routines.editor.currentSetup")}</div><div className="mt-1 text-[11px] text-ink-secondary">Keeps its model and configured computer, including a self-hosted VPS.</div></button><button type="button" disabled={!cloudReady || attachments.length > 0} onClick={() => setRunOn("cloud")} className={cn("rounded-xl border p-3 text-left disabled:cursor-not-allowed disabled:opacity-45", runOn === "cloud" ? "border-accent/60 bg-accent/10" : "border-hairline/50 bg-inset hover:bg-raised")}><div className="text-[13px] font-medium text-ink">{t("routines.runsOn.boat")}</div><div className="mt-1 text-[11px] text-ink-secondary">{t(cloudHome ? "routines.runsOn.boatHintCloudHome" : "routines.runsOn.boatHint")}</div></button>- </div>}+ </div>}{!isRoomGoal && runOn === "maus" && <RoutineComputerChoice value={computer} cloudHome={cloudHome} onChange={setComputer} />}</div></div>);@@ -1278,7 +1278,7 @@ export function EventDetails({.slice(0, 3): [];const runOn = run?.runOn ?? routine?.runOn;- const runsOn = routineRunsOn({ roomGoal: isRoomGoal, runOn, computer: primary?.computer, cloudHome: state.config?.cloudHome === true });+ const runsOn = routineRunsOn({ roomGoal: isRoomGoal, runOn, computer: primary?.computer, kept: (run ?? routine)?.computer, cloudHome: state.config?.cloudHome === true });const resultsOwner = resultsThreadId? [...state.bots, ...state.groups].find((owner) => owner.threadId === resultsThreadId || owner.tasks?.some((task) => task.threadId === resultsThreadId)): undefined;diff --git a/src/components/routines/RoutineComputerChoice.tsx b/src/components/routines/RoutineComputerChoice.tsxnew file mode 100644index 0000000000..f653680318--- /dev/null+++ b/src/components/routines/RoutineComputerChoice.tsx@@ -0,0 +1,24 @@+import { useId } from "react";+import { ROUTINE_COMPUTERS, type RoutineComputer } from "../../../shared/routines";+import { t } from "@/lib/i18n";+import { routineComputerLabel } from "@/lib/routine-display";+import { Select } from "../Select";++/** Where each run of a bot routine works: the bot's own Works on setting, or a computer the routine keeps, by default+ * the one its chat was set to when it was made. Choosing the first clears the routine's own computer. */+export function RoutineComputerChoice({ value, cloudHome, onChange }: {+ value: RoutineComputer | null;+ cloudHome: boolean;+ onChange: (computer: RoutineComputer | null) => void;+}) {+ const id = useId();+ return <div className="mt-3 min-w-0 space-y-1.5">+ <label htmlFor={id} className="block text-[12px] font-medium text-ink">{t("routines.computer.label")}</label>+ <Select className="w-full" id={id} aria-describedby={`${id}-help`} value={value ?? ""}+ onChange={(event) => onChange(ROUTINE_COMPUTERS.find((computer) => computer === event.target.value) ?? null)}>+ <option value="">{t("routines.computer.worksOn")}</option>+ {ROUTINE_COMPUTERS.filter((computer) => computer !== "vm" || !cloudHome || value === "vm").map((computer) => <option key={computer} value={computer}>{routineComputerLabel(computer, cloudHome)}</option>)}+ </Select>+ <p id={`${id}-help`} className="text-[11px] leading-relaxed text-ink-secondary">{t("routines.computer.help")}</p>+ </div>;+}diff --git a/src/lib/bot-creation-draft.ts b/src/lib/bot-creation-draft.tsindex 7f2280f15a..69c991de01 100644--- a/src/lib/bot-creation-draft.ts+++ b/src/lib/bot-creation-draft.ts@@ -94,7 +94,7 @@ export class BotCreationDraft {dispose() { if (this.avatarObjectUrl) URL.revokeObjectURL(this.avatarObjectUrl); }private routine(input: RoutineInput, previous?: Routine): Routine {- const { groupId: _group, resultsThreadId: _results, checks: _checks, access: _access, deliver: _deliver, modelSelection: _model, schedule, ...fields } = input;+ const { groupId: _group, resultsThreadId: _results, checks: _checks, access: _access, deliver: _deliver, modelSelection: _model, computer: _computer, schedule, ...fields } = input;const normalizedSchedule = schedule.type === "interval" ? {...schedule, weekdays: schedule.weekdays ?? undefined,window: schedule.window ?? undefined, endsAt: schedule.endsAt ?? undefined,diff --git a/src/lib/routine-display.test.ts b/src/lib/routine-display.test.tsindex c1a884eceb..e941aa5e37 100644--- a/src/lib/routine-display.test.ts+++ b/src/lib/routine-display.test.ts@@ -84,3 +84,15 @@ describe("a run's status", () => {expect(routineRunLabel(run({ status: "completed", partial: true }))).toBe("Completed");});});++describe("a routine that keeps its chat's computer", () => {+ it("shows that computer, over the bot's Works on setting, and says where it came from", () => {+ const kept = (computer: "local" | "vm" | "cloud" | "browser", cloudHome = false) => routineRunsOn({ roomGoal: false, computer: "cloud", kept: computer, cloudHome });+ const hint = "Kept from the chat it was made in. Change it in Edit.";+ expect(kept("vm")).toEqual({ label: "The bot's private desktop", hint });+ expect(kept("local")).toEqual({ label: "This computer", hint });+ expect(kept("browser")).toEqual({ label: "The built-in browser", hint });+ expect(kept("cloud", true)).toEqual({ label: "The bot's cloud desktop", hint });+ expect(routineRunsOn({ roomGoal: false, runOn: "cloud", kept: "vm", cloudHome: false }).label).toBe("Cloud desktop");+ });+});diff --git a/src/lib/routine-display.ts b/src/lib/routine-display.tsindex 45dc1274c7..d69f06a516 100644--- a/src/lib/routine-display.ts+++ b/src/lib/routine-display.ts@@ -1,4 +1,4 @@-import { isCountedSkip, type Routine, type RoutineRun } from "./routines";+import { isCountedSkip, type Routine, type RoutineComputer, type RoutineRun } from "./routines";import { activeLocale, t } from "./i18n";import { routineLineText } from "./activity-text";import { clockOptions } from "./clock-time";@@ -57,12 +57,22 @@ export function routineNextLabel(routine: Routine): string {return routine.nextRunAt == null ? t("routines.noNextRun") : t("routines.nextRun", { time: routineDateTime(routine.nextRunAt) });}-export function routineRunsOn({ roomGoal, runOn, computer, cloudHome }: {- roomGoal: boolean; runOn?: string; computer?: string | null; cloudHome: boolean;+/** The words for a computer a routine keeps for its runs. */+export function routineComputerLabel(computer: RoutineComputer, cloudHome: boolean): string {+ if (computer === "cloud") return t("routines.runsOn.botCloud");+ if (computer === "vm" && !cloudHome) return t("routines.runsOn.botVm");+ if (computer === "browser") return t("routines.runsOn.browser");+ return t(cloudHome ? "routines.runsOn.cloudHome" : "routines.runsOn.local");+}++/** `computer`: the bot's Works on setting; `kept`: the routine's own computer, which its runs use instead. */+export function routineRunsOn({ roomGoal, runOn, computer, kept, cloudHome }: {+ roomGoal: boolean; runOn?: string; computer?: string | null; kept?: RoutineComputer; cloudHome: boolean;}): { label: string; hint: string } {const hint = t(cloudHome ? "routines.runsOn.cloudHomeHint" : "routines.runsOn.localHint");if (roomGoal) return { label: t(cloudHome ? "routines.runsOn.teamCloudHome" : "routines.runsOn.team"), hint };if (runOn === "cloud") return { label: t("routines.runsOn.boat"), hint: t(cloudHome ? "routines.runsOn.boatHintCloudHome" : "routines.runsOn.boatHint") };+ if (kept) return { label: routineComputerLabel(kept, cloudHome), hint: t("routines.runsOn.keptHint") };if (computer === "cloud") return { label: t("routines.runsOn.botCloud"), hint };if (computer === "vm" && !cloudHome) return { label: t("routines.runsOn.botVm"), hint };return { label: t(cloudHome ? "routines.runsOn.cloudHome" : "routines.runsOn.local"), hint };diff --git a/src/lib/routines.ts b/src/lib/routines.tsindex 74820e960e..83e450bc9b 100644--- a/src/lib/routines.ts+++ b/src/lib/routines.ts@@ -3,6 +3,7 @@ export type {RoutineSchedule,RoutineScheduleInput,RoutineRunOn,+ RoutineComputer,RoutineTarget,RoutineGoalStatus,RoutineContextAttachment,diff --git a/src/locales/de.json b/src/locales/de.jsonindex 8096d929eb..f225770537 100644--- a/src/locales/de.json+++ b/src/locales/de.json@@ -1958,6 +1958,11 @@"automations.app.placeCloud": "in der Cloud","routines.runsOn.botCloud": "Der Cloud-Desktop des Bots","routines.runsOn.botVm": "Der private Desktop des Bots",+ "routines.runsOn.browser": "Der eingebaute Browser",+ "routines.runsOn.keptHint": "Aus dem Chat übernommen, in dem sie erstellt wurde. Unter Bearbeiten änderbar.",+ "routines.computer.label": "Computer",+ "routines.computer.worksOn": "Die Einstellung „Arbeitet auf“ des Bots",+ "routines.computer.help": "Jeder Lauf arbeitet auf diesem Computer. Eine in einem Chat erstellte Routine behält den Computer dieses Chats.","routines.runsOn.boat": "Cloud-Desktop","routines.scheduleNote.local": "Läuft, solange {app} auf diesem Computer geöffnet ist. Ein schlafender Computer wird nicht geweckt; ein um weniger als 12 Stunden verpasster Lauf wird nachgeholt, sobald die App wieder läuft.","routines.scheduleNote.addCloud": "Füge eine Cloud hinzu, damit Routinen rund um die Uhr laufen.",diff --git a/src/locales/en.json b/src/locales/en.jsonindex 0eceb2f2dc..8a938625ec 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -5932,6 +5932,11 @@"routines.runsOn.localHint": "Starts while {app} is open here.","routines.runsOn.botCloud": "The bot's cloud desktop","routines.runsOn.botVm": "The bot's private desktop",+ "routines.runsOn.browser": "The built-in browser",+ "routines.runsOn.keptHint": "Kept from the chat it was made in. Change it in Edit.",+ "routines.computer.label": "Computer",+ "routines.computer.worksOn": "The bot's Works on setting",+ "routines.computer.help": "Each run works on this computer. A routine made in a chat keeps that chat's computer.","routines.runsOn.boat": "Cloud desktop","routines.scheduleNote.local": "Runs while {app} is open on this computer. It can't wake a sleeping computer; a run missed by less than 12 hours happens when the app is back.","routines.scheduleNote.addCloud": "To run routines 24/7, add a Cloud.",diff --git a/src/locales/es.json b/src/locales/es.jsonindex 9a7287ba41..e7c9fdeb9f 100644--- a/src/locales/es.json+++ b/src/locales/es.json@@ -4073,6 +4073,11 @@"routines.runsOn.localHint": "Empieza mientras {app} esté abierto aquí.","routines.runsOn.botCloud": "El escritorio en la nube del bot","routines.runsOn.botVm": "El escritorio privado del bot",+ "routines.runsOn.browser": "El navegador integrado",+ "routines.runsOn.keptHint": "Tomado del chat donde se creó. Cámbialo en Editar.",+ "routines.computer.label": "Equipo",+ "routines.computer.worksOn": "El ajuste «Trabaja en» del bot",+ "routines.computer.help": "Cada ejecución trabaja en este equipo. Una rutina creada en un chat conserva el equipo de ese chat.","routines.runsOn.boat": "Escritorio en la nube","routines.scheduleNote.local": "Se ejecuta mientras {app} está abierto en este equipo. No puede despertar un equipo en reposo; una ejecución perdida hace menos de 12 horas se hace cuando la app vuelve.","routines.scheduleNote.addCloud": "Para ejecutar rutinas las 24 horas, añade una Cloud.",diff --git a/src/locales/fr.json b/src/locales/fr.jsonindex 5d468a7fca..895e2fa6a9 100644--- a/src/locales/fr.json+++ b/src/locales/fr.json@@ -1801,6 +1801,11 @@"automations.app.placeCloud": "dans le Cloud","routines.runsOn.botCloud": "Le bureau cloud du bot","routines.runsOn.botVm": "Le bureau privé du bot",+ "routines.runsOn.browser": "Le navigateur intégré",+ "routines.runsOn.keptHint": "Repris de la discussion où elle a été créée. Modifiable dans Modifier.",+ "routines.computer.label": "Ordinateur",+ "routines.computer.worksOn": "Le réglage « Travaille sur » du bot",+ "routines.computer.help": "Chaque exécution travaille sur cet ordinateur. Une routine créée dans une discussion garde l'ordinateur de cette discussion.","routines.runsOn.boat": "Bureau cloud","routines.scheduleNote.local": "S'exécute tant que {app} est ouvert sur cet ordinateur. Un ordinateur en veille n'est pas réveillé ; une exécution manquée depuis moins de 12 heures a lieu quand l'app revient.","routines.scheduleNote.addCloud": "Pour exécuter des routines 24 h/24, ajoutez un Cloud.",diff --git a/src/locales/hi.json b/src/locales/hi.jsonindex ea15287a86..89c92d95ca 100644--- a/src/locales/hi.json+++ b/src/locales/hi.json@@ -1799,6 +1799,11 @@"automations.app.placeCloud": "Cloud में","routines.runsOn.botCloud": "बॉट का क्लाउड डेस्कटॉप","routines.runsOn.botVm": "बॉट का निजी डेस्कटॉप",+ "routines.runsOn.browser": "बिल्ट-इन ब्राउज़र",+ "routines.runsOn.keptHint": "जिस चैट में बना था, वहीं से लिया गया। इसे संपादित करें में बदलें।",+ "routines.computer.label": "कंप्यूटर",+ "routines.computer.worksOn": "बॉट की \"काम करता है\" सेटिंग",+ "routines.computer.help": "हर रन इसी कंप्यूटर पर काम करता है। किसी चैट में बना रूटीन उस चैट का कंप्यूटर रखता है।","routines.runsOn.boat": "क्लाउड डेस्कटॉप","routines.scheduleNote.local": "यह तब तक चलता है जब तक इस कंप्यूटर पर {app} खुला है। यह स्लीप में गए कंप्यूटर को नहीं जगा सकता; 12 घंटे से कम पहले छूटा रन ऐप लौटने पर हो जाता है।","routines.scheduleNote.addCloud": "रूटीन 24/7 चलाने के लिए Cloud जोड़ें।",diff --git a/src/locales/it.json b/src/locales/it.jsonindex 0d290b0ae9..2e308e069c 100644--- a/src/locales/it.json+++ b/src/locales/it.json@@ -5905,6 +5905,11 @@"routines.runsOn.localHint": "Parte mentre {app} è aperto qui.","routines.runsOn.botCloud": "Il desktop cloud del bot","routines.runsOn.botVm": "Il desktop privato del bot",+ "routines.runsOn.browser": "Il browser integrato",+ "routines.runsOn.keptHint": "Preso dalla chat in cui è stata creata. Cambialo in Modifica.",+ "routines.computer.label": "Computer",+ "routines.computer.worksOn": "L'impostazione «Lavora su» del bot",+ "routines.computer.help": "Ogni esecuzione lavora su questo computer. Una routine creata in una chat mantiene il computer di quella chat.","routines.runsOn.boat": "desktop cloud","routines.scheduleNote.local": "Si esegue mentre {app} è aperto su questo computer. Non può risvegliare un computer in sospensione; un'esecuzione persa da meno di 12 ore parte quando l'app è di nuovo aperta.","routines.scheduleNote.addCloud": "Per eseguire le routine 24 ore su 24, aggiungi un Cloud.",diff --git a/src/locales/ja.json b/src/locales/ja.jsonindex dd20356aa0..6cdf1df2a1 100644--- a/src/locales/ja.json+++ b/src/locales/ja.json@@ -5040,6 +5040,11 @@"routines.runsOn.localHint": "ここで {app} が開いている間に開始します。","routines.runsOn.botCloud": "ボットのクラウドデスクトップ","routines.runsOn.botVm": "ボットの専用デスクトップ",+ "routines.runsOn.browser": "内蔵ブラウザー",+ "routines.runsOn.keptHint": "作成したチャットから引き継ぎました。編集で変更できます。",+ "routines.computer.label": "コンピューター",+ "routines.computer.worksOn": "ボットの作業先の設定",+ "routines.computer.help": "毎回の実行はこのコンピューターで作業します。チャットで作成したルーティンは、そのチャットのコンピューターを使い続けます。","routines.runsOn.boat": "クラウドデスクトップ","routines.scheduleNote.local": "このコンピューターで {app} が開いている間に実行されます。スリープ中のコンピューターは起動できません。見逃してから 12 時間以内の実行は、アプリが戻ったときに行われます。","routines.scheduleNote.addCloud": "ルーティンを 24 時間実行するには、Cloud を追加してください。",diff --git a/src/locales/ko.json b/src/locales/ko.jsonindex c644de388e..3bd7b76999 100644--- a/src/locales/ko.json+++ b/src/locales/ko.json@@ -4834,6 +4834,11 @@"routines.runsOn.localHint": "여기서 {app}이 열려 있는 동안 시작해요.","routines.runsOn.botCloud": "봇의 클라우드 데스크톱","routines.runsOn.botVm": "봇의 비공개 데스크톱",+ "routines.runsOn.browser": "내장 브라우저",+ "routines.runsOn.keptHint": "만든 채팅에서 가져왔습니다. 수정에서 바꿀 수 있습니다.",+ "routines.computer.label": "컴퓨터",+ "routines.computer.worksOn": "봇의 작업 위치 설정",+ "routines.computer.help": "매 실행이 이 컴퓨터에서 작업합니다. 채팅에서 만든 루틴은 그 채팅의 컴퓨터를 유지합니다.","routines.runsOn.boat": "클라우드 데스크톱","routines.scheduleNote.local": "이 컴퓨터에서 {app}이 열려 있는 동안 실행돼요. 잠든 컴퓨터를 깨우지는 못하며, 12시간 이내에 놓친 실행은 앱이 다시 열리면 실행돼요.","routines.scheduleNote.addCloud": "루틴을 24시간 실행하려면 클라우드를 추가하세요.",diff --git a/src/locales/pl.json b/src/locales/pl.jsonindex ab87218523..6fef523cd6 100644--- a/src/locales/pl.json+++ b/src/locales/pl.json@@ -4427,6 +4427,11 @@"routines.runsOn.localHint": "Uruchamia się, gdy {app} jest otwarty na tym komputerze.","routines.runsOn.botCloud": "Pulpit w chmurze bota","routines.runsOn.botVm": "Prywatny pulpit bota",+ "routines.runsOn.browser": "Wbudowana przeglądarka",+ "routines.runsOn.keptHint": "Przejęte z czatu, w którym ją utworzono. Zmień w Edytuj.",+ "routines.computer.label": "Komputer",+ "routines.computer.worksOn": "Ustawienie „Działa na” bota",+ "routines.computer.help": "Każde uruchomienie działa na tym komputerze. Rutyna utworzona w czacie zachowuje komputer tego czatu.","routines.runsOn.boat": "Pulpit w chmurze","routines.scheduleNote.local": "Działa, gdy {app} jest otwarty na tym komputerze. Nie może wybudzić uśpionego komputera; uruchomienie pominięte o mniej niż 12 godzin nastąpi po powrocie aplikacji.","routines.scheduleNote.addCloud": "Aby rutyny działały 24/7, dodaj Chmurę.",diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex ccc22fb8ca..77d4732ea0 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -5561,6 +5561,11 @@"routines.runsOn.localHint": "Inicia enquanto o app {app} estiver aberto aqui.","routines.runsOn.botCloud": "O desktop na nuvem do bot","routines.runsOn.botVm": "O desktop privado do bot",+ "routines.runsOn.browser": "O navegador integrado",+ "routines.runsOn.keptHint": "Mantido do chat em que foi criada. Mude em Editar.",+ "routines.computer.label": "Computador",+ "routines.computer.worksOn": "A configuração \"Trabalha em\" do bot",+ "routines.computer.help": "Cada execução trabalha neste computador. Uma rotina criada em um chat mantém o computador desse chat.","routines.runsOn.boat": "Desktop na nuvem","routines.scheduleNote.local": "Roda enquanto o app {app} estiver aberto neste computador. Não consegue acordar um computador em repouso. Se uma execução estiver atrasada há menos de 12 horas, ela acontece quando o app volta.","routines.scheduleNote.addCloud": "Para rodar rotinas 24 horas por dia, adicione um Cloud.",diff --git a/src/locales/ru.json b/src/locales/ru.jsonindex 9fecfafd7e..304ca8c386 100644--- a/src/locales/ru.json+++ b/src/locales/ru.json@@ -4475,6 +4475,11 @@"routines.runsOn.localHint": "Запускается, пока {app} открыт здесь.","routines.runsOn.botCloud": "Облачный рабочий стол бота","routines.runsOn.botVm": "Личный рабочий стол бота",+ "routines.runsOn.browser": "Встроенный браузер",+ "routines.runsOn.keptHint": "Взято из чата, где она создана. Можно изменить в разделе «Изменить».",+ "routines.computer.label": "Компьютер",+ "routines.computer.worksOn": "Настройка бота «Работает на»",+ "routines.computer.help": "Каждый запуск работает на этом компьютере. Рутина, созданная в чате, сохраняет компьютер этого чата.","routines.runsOn.boat": "Облачный рабочий стол","routines.scheduleNote.local": "Выполняется, пока {app} открыт на этом компьютере. Приложение не может разбудить спящий компьютер; запуск, пропущенный менее 12 часов назад, выполнится, когда приложение снова заработает.","routines.scheduleNote.addCloud": "Чтобы рутины выполнялись круглосуточно, добавьте Cloud.",diff --git a/src/locales/tr.json b/src/locales/tr.jsonindex 4f42fdbbab..9c8a3c111e 100644--- a/src/locales/tr.json+++ b/src/locales/tr.json@@ -3498,6 +3498,11 @@"routines.runsOn.localHint": "{app} burada açıkken başlar.","routines.runsOn.botCloud": "Botun bulut masaüstü","routines.runsOn.botVm": "Botun özel masaüstü",+ "routines.runsOn.browser": "Yerleşik tarayıcı",+ "routines.runsOn.keptHint": "Oluşturulduğu sohbetten alındı. Düzenle'den değiştirin.",+ "routines.computer.label": "Bilgisayar",+ "routines.computer.worksOn": "Botun \"Çalıştığı ortam\" ayarı",+ "routines.computer.help": "Her çalıştırma bu bilgisayarda çalışır. Bir sohbette oluşturulan rutin o sohbetin bilgisayarını korur.","routines.runsOn.boat": "Bulut masaüstü","routines.scheduleNote.local": "{app} bu bilgisayarda açıkken çalışır. Uyku modundaki bir bilgisayarı uyandıramaz; 12 saatten daha kısa bir süre önce kaçırılan bir çalıştırma, uygulama yeniden açıldığında gerçekleşir.","routines.scheduleNote.addCloud": "Rutinleri 7/24 çalıştırmak için bir Cloud ekleyin.",diff --git a/src/locales/uk.json b/src/locales/uk.jsonindex caa7b7ed7d..4210884c10 100644--- a/src/locales/uk.json+++ b/src/locales/uk.json@@ -2180,6 +2180,11 @@"automations.app.placeCloud": "у Cloud","routines.runsOn.botCloud": "Хмарний робочий стіл бота","routines.runsOn.botVm": "Приватний робочий стіл бота",+ "routines.runsOn.browser": "Вбудований браузер",+ "routines.runsOn.keptHint": "Взято з чату, де її створено. Змініть у розділі «Редагувати».",+ "routines.computer.label": "Комп'ютер",+ "routines.computer.worksOn": "Налаштування бота «Працює на»",+ "routines.computer.help": "Кожен запуск працює на цьому комп'ютері. Рутина, створена в чаті, зберігає комп'ютер цього чату.","routines.runsOn.boat": "Хмарний робочий стіл","routines.scheduleNote.local": "Виконується, поки {app} відкритий на цьому комп’ютері. Він не може розбудити сплячий комп’ютер; запуск, пропущений менше ніж на 12 годин, відбудеться, коли застосунок повернеться.","routines.scheduleNote.addCloud": "Щоб рутини працювали цілодобово, додайте Cloud.",diff --git a/src/locales/vi.json b/src/locales/vi.jsonindex 0835b40bca..ed9a1f4da1 100644--- a/src/locales/vi.json+++ b/src/locales/vi.json@@ -3498,6 +3498,11 @@"routines.runsOn.localHint": "Chỉ chạy khi {app} đang mở trên máy này.","routines.runsOn.botCloud": "Desktop đám mây của bot","routines.runsOn.botVm": "Desktop riêng của bot",+ "routines.runsOn.browser": "Trình duyệt tích hợp",+ "routines.runsOn.keptHint": "Giữ từ cuộc trò chuyện đã tạo nó. Đổi trong Chỉnh sửa.",+ "routines.computer.label": "Máy tính",+ "routines.computer.worksOn": "Cài đặt \"Chạy trên\" của bot",+ "routines.computer.help": "Mỗi lần chạy làm việc trên máy tính này. Tác vụ định kỳ tạo trong một cuộc trò chuyện giữ máy tính của cuộc trò chuyện đó.","routines.runsOn.boat": "Desktop đám mây","routines.scheduleNote.local": "Chỉ chạy khi {app} đang mở trên máy tính này. Ứng dụng không thể đánh thức máy tính đang ở chế độ ngủ; nếu bị lỡ dưới 12 giờ, tác vụ sẽ chạy lại khi ứng dụng hoạt động trở lại.","routines.scheduleNote.addCloud": "Để chạy tác vụ định kỳ 24/7, hãy thêm máy chủ Cloud.",diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.jsonindex 5dfa1e0448..873cca9e07 100644--- a/src/locales/zh-tw.json+++ b/src/locales/zh-tw.json@@ -5227,6 +5227,11 @@"routines.runsOn.localHint": "在這裡開著 {app} 時啟動。","routines.runsOn.botCloud": "機器人的雲端桌面","routines.runsOn.botVm": "機器人的私人桌面",+ "routines.runsOn.browser": "內建瀏覽器",+ "routines.runsOn.keptHint": "沿用建立它的聊天。可在「編輯」中更改。",+ "routines.computer.label": "電腦",+ "routines.computer.worksOn": "機器人的「執行位置」設定",+ "routines.computer.help": "每次執行都在這台電腦上工作。在聊天中建立的例行工作會沿用該聊天的電腦。","routines.runsOn.boat": "雲端桌面","routines.scheduleNote.local": "在這台電腦開著 {app} 時執行。它無法喚醒睡眠中的電腦;錯過不到 12 小時的執行會在 App 回來時進行。","routines.scheduleNote.addCloud": "若要全天候執行例行工作,請新增 Cloud。",diff --git a/src/locales/zh.json b/src/locales/zh.jsonindex d7f8f2e1bc..70d4b0d834 100644--- a/src/locales/zh.json+++ b/src/locales/zh.json@@ -5893,6 +5893,11 @@"routines.runsOn.localHint": "在这台电脑上打开 {app} 时启动。","routines.runsOn.botCloud": "机器人的云端桌面","routines.runsOn.botVm": "机器人的私有桌面",+ "routines.runsOn.browser": "内置浏览器",+ "routines.runsOn.keptHint": "沿用创建它的聊天。可在“编辑”中更改。",+ "routines.computer.label": "电脑",+ "routines.computer.worksOn": "机器人的“工作位置”设置",+ "routines.computer.help": "每次运行都在这台电脑上工作。在聊天中创建的例行任务会沿用该聊天的电脑。","routines.runsOn.boat": "云端桌面","routines.scheduleNote.local": "在这台电脑上打开 {app} 时运行。它无法唤醒睡眠中的电脑;错过不到 12 小时的运行会在应用回来时进行。","routines.scheduleNote.addCloud": "如需全天候运行例行任务,请添加 Cloud。",