Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Merge pull request #6759 from davidneyra2804/feat/routine-run-limit-hours
milind-soni676a2522436d
diff --cc server/index.tsindex e8a0b63a98,0c8411c175..886d99c9c5--- a/server/index.ts+++ b/server/index.ts@@@ -435,8 -435,8 +435,8 @@@ import { loopGuardSettings } from "./hoimport { claudeUserSkillsEnabled } from "./turn-settings.ts";import { addHeldSecretScrubber, redactSecretsInText, scrubHeldSecrets } from "./redact.ts";import * as vps from "./vps-computer.ts";-import { vpsConfigForBot, vpsSshAliasForBot } from "./vps-hosts.ts";+import { vpsConfigForBot, vpsSshAliasForBot } from "./vps-hosts.ts"; import { vpsContainerExec } from "./vps-exec.ts";- import { ROUTINE_RESTARTED, RoutineManager, type Routine, type RoutineRun, type RoutineRunOn, type RoutineRunTrigger } from "./routines.ts"; import { routineModelRefusal, routineThreadModel, type RoutineModelChecks } from "./routine-input.ts"; import { routineHistoryFor, routineRunsFor } from "./routine-run-window.ts"; import { runTurnLive } from "./routine-turn-live.ts"; import { batchSaves, flushLaterSaves } from "./save-batch.ts";+ import { ROUTINE_RESTARTED, RoutineManager, type Routine, type RoutineRun, type RoutineRunOn, type RoutineRunTrigger } from "./routines.ts"; import { routineModelRefusal, routineThreadModel, type RoutineModelChecks } from "./routine-input.ts"; import { routineHistoryFor, routineRunsFor } from "./routine-run-window.ts"; import { routineRunLimits } from "./routine-run-limits.ts"; import { runTurnLive } from "./routine-turn-live.ts"; import { batchSaves, flushLaterSaves } from "./save-batch.ts";import { CalendarCallManager, type CalendarCall } from "./calendar-calls.ts";import { BROWSER_UPLOAD_TOOL, browserRuntimeEnv } from "./browser-runtime.ts";import { BrowserUploadRefusal, uploadableFiles } from "./browser-upload.ts";@@@ -14381,7 -14413,8 +14381,7 @@@ const handleRequest = async (req: Incomif (path === "/api/routines" && method === "GET") {return json(res, 200, {routines: routines!.listRoutines().filter((routine) => routineVisible(routine, visible)).map((routine) => routineForViewer(routine, visible)),-- runs: routineRunsFor((from, to) => routines!.listRuns(from, to), url.searchParams).filter((run) => routineRunVisible(run, visible)), ...routineHistoryFor(routines!, url.searchParams, (routine) => routineVisible(routine, visible)),- runLimits: routineRunLimits(),++ runs: routineRunsFor((from, to) => routines!.listRuns(from, to), url.searchParams).filter((run) => routineRunVisible(run, visible)), ...routineHistoryFor(routines!, url.searchParams, (routine) => routineVisible(routine, visible)), runLimits: routineRunLimits(),});}const routineBodyRefusal = (body: unknown, existing?: Routine): { status: number; error: string } | null => {diff --cc src/state/store.tsxindex 9fd0e33a1f,1b745fd2e6..4082ef7f10--- a/src/state/store.tsx+++ b/src/state/store.tsx@@@ -509,10 -507,10 +509,10 @@@ export interface AppStateliveCallVersion: number;liveCallLookupSeq: number;selectedId: string;- activeView: "chat" | "team-map" | "routines" | "files" | "web-panel" | "published-apps" | "team-files" | "announcements";+ activeView: "chat" | "team-map" | "routines" | "files" | "web-panel" | "published-apps" | "team-files" | "announcements" | "skill-burgers";/** Folders a finished move left on this computer, for Files to offer sharing. */filesSuggest: string[] | null; webPanelId?: string;- routines: Routine[];+ routines: Routine[]; routineRunLimits?: RoutineRunLimits;routineRuns: RoutineRun[];routinesLoadState: "loading" | "ready" | "error"; routineRunsSince: number | null;routinesFocus: { section?: "schedule" | "logs"; view?: "calendar" | "list"; botId?: string; routineId?: string; runStatus?: RoutineRunStatusFilter; nonce: number };@@@ -593,10 -590,10 +593,10 @@@ export type Action| { type: "botsOrdered"; botIds: string[] } | { type: "groupsOrdered"; groupIds: string[] }| { type: "sectionDeleted"; section: string; sections: string[] }| { type: "showRoutines"; section?: "schedule" | "logs"; view?: "calendar" | "list"; botId?: string; routineId?: string; runStatus?: RoutineRunStatusFilter }- | { type: "showTeamMap" } | { type: "showPublishedApps" } | { type: "showTeamFiles" } | { type: "showAnnouncements" } | { type: "showWebPanel"; id: string }+ | { type: "showTeamMap" } | { type: "showPublishedApps" } | { type: "showSkillBurgers" } | { type: "showTeamFiles" } | { type: "showAnnouncements" } | { type: "showWebPanel"; id: string }| { type: "showFiles"; suggest?: string[] }| { type: "showChat" }- | { type: "routinesHydrated"; routines: Routine[]; runs: RoutineRun[]; since?: number }+ | { type: "routinesHydrated"; routines: Routine[]; runs: RoutineRun[]; since?: number; runLimits?: RoutineRunLimits }| { type: "routinesLoadFailed" } | { type: "routineRunsLoaded"; runs: RoutineRun[]; from?: number; to?: number }| { type: "routinePatched"; routine: Routine }| { type: "routineDeleted"; routineId: string }