Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
fix(web): show an interrupted Run as a stop, not an error
jeffrey37f6ea2c27e2
diff --git a/apps/web/src/features/rooms/chat/message-timeline.tsx b/apps/web/src/features/rooms/chat/message-timeline.tsxindex 12082315..3637b9c6 100644--- a/apps/web/src/features/rooms/chat/message-timeline.tsx+++ b/apps/web/src/features/rooms/chat/message-timeline.tsx@@ -16,7 +16,10 @@ import {AgentAvatarStatusContext,type AgentAvatarStatus,} from "../members/agent-avatar-status-context";-import { runtimeFailureMessage } from "../runtime-status/runtime-failure-message";+import {+ isRunInterruption,+ runtimeFailureMessage,+} from "../runtime-status/runtime-failure-message";import type { RuntimeExecutionFailure } from "../runtime-status/runtime-presentation-events";import { Fragment, type ReactNode, useMemo, useRef, useState } from "react";import { cn } from "@/lib/cn";@@ -636,7 +639,9 @@ function resolveAgentRuntimeStatusSegment({: terminalOutcome === "canceled"? "Canceled": terminalOutcome === "failed"- ? "Failed"+ ? isRunInterruption(failure)+ ? "Canceled"+ : "Failed": activeActivity?.kind === "recovery"? "Recovering": activeActivity?.kind === "interaction"diff --git a/apps/web/src/features/rooms/runtime-status/runtime-activity-path.test.tsx b/apps/web/src/features/rooms/runtime-status/runtime-activity-path.test.tsxindex 5a2344bc..711ca9af 100644--- a/apps/web/src/features/rooms/runtime-status/runtime-activity-path.test.tsx+++ b/apps/web/src/features/rooms/runtime-status/runtime-activity-path.test.tsx@@ -45,6 +45,27 @@ describe("Runtime activity path", () => {expect(screen.getByText("Unconfirmed")).toBeVisible();},);+ it("shows an interrupted Run as a stop and any other failure as an error", () => {+ const stopped = (code: "interrupted" | "timeout") =>+ projectRuntimeActivityPath(+ [+ record("1", {+ type: "status.changed",+ status: "stopped",+ outcome: "failed",+ failure: { code, runtime_type: "claude" },+ }),+ ],+ new Map(),+ "ended",+ );+ expect(stopped("interrupted")).toEqual([+ expect.objectContaining({ kind: "outcome", tone: "canceled" }),+ ]);+ expect(stopped("timeout")).toEqual([+ expect.objectContaining({ kind: "outcome", tone: "failed" }),+ ]);+ });it("keeps each Task step its own item whatever kind the Computer gave it", () => {const input = (command: string) => [{diff --git a/apps/web/src/features/rooms/runtime-status/runtime-activity-path.ts b/apps/web/src/features/rooms/runtime-status/runtime-activity-path.tsindex 6b02ec49..d61e4635 100644--- a/apps/web/src/features/rooms/runtime-status/runtime-activity-path.ts+++ b/apps/web/src/features/rooms/runtime-status/runtime-activity-path.ts@@ -1,6 +1,9 @@import type { TeamHubRuntimePresentationEventRecord } from "@/features/teamhub/teamhub-types";-import { runtimeFailureMessage } from "./runtime-failure-message";+import {+ isRunInterruption,+ runtimeFailureMessage,+} from "./runtime-failure-message";import {projectRuntimeChatPresentation,type RuntimeActivityEntry,@@ -161,7 +164,10 @@ export function projectRuntimeActivityPath(event.outcome === "failed"? runtimeFailureMessage(event.failure): "Run canceled",- tone: event.outcome,+ tone:+ event.outcome === "failed" && !isRunInterruption(event.failure)+ ? "failed"+ : "canceled",});}continue;diff --git a/apps/web/src/features/rooms/runtime-status/runtime-failure-message.test.ts b/apps/web/src/features/rooms/runtime-status/runtime-failure-message.test.tsindex 93672bfd..c1f8acba 100644--- a/apps/web/src/features/rooms/runtime-status/runtime-failure-message.test.ts+++ b/apps/web/src/features/rooms/runtime-status/runtime-failure-message.test.ts@@ -61,7 +61,7 @@ describe("Runtime failure messages", () => {it("names a failure the Agent Service observed without a Runtime prefix", () => {expect(runtimeFailureMessage({ code: "interrupted" })).toMatch(- /^The Run was interrupted before it finished/,+ /^The Run stopped before it finished because its Computer restarted/,);expect(runtimeFailureMessage({ code: "computer_unavailable" })).toContain("Make sure the Computer is online",diff --git a/apps/web/src/features/rooms/runtime-status/runtime-failure-message.ts b/apps/web/src/features/rooms/runtime-status/runtime-failure-message.tsindex e28d7210..787fc931 100644--- a/apps/web/src/features/rooms/runtime-status/runtime-failure-message.ts+++ b/apps/web/src/features/rooms/runtime-status/runtime-failure-message.ts@@ -30,7 +30,7 @@ const messages: Record<RuntimeExecutionFailure["code"], string> = {reply_not_sent:"The Agent finished without sending its reply to the Room. Its model may have answered without using the message command. Ask again, or choose a stronger model for the Agent.",interrupted:- "The Run was interrupted before it finished, for example by a restart or by stopping the Agent on its Computer. Part of its work may have taken effect; check the result before asking again.",+ "The Run stopped before it finished because its Computer restarted, for example to apply a system permission, or the Agent was stopped there. Part of its work may have taken effect; check the result before asking again.",computer_unavailable:"The Agent's Computer could not run it. Make sure the Computer is online, the Agent is not stopped there, and its Runtime is enabled.",cleanup_unconfirmed:@@ -41,6 +41,15 @@ const messages: Record<RuntimeExecutionFailure["code"], string> = {"The Run stopped because of an error the system could not identify. Try again; if it repeats, tell your administrator when it happened.",};+/**+ * An interrupted Run was stopped from outside, by a restart such as the one+ * macOS asks for after a permission grant, or by stopping the Agent. Nothing+ * failed, so the Room shows it as a stop, not as an error.+ */+export function isRunInterruption(failure?: RuntimeExecutionFailure): boolean {+ return failure?.code === "interrupted";+}+export function runtimeFailureMessage(failure?: RuntimeExecutionFailure,): string {diff --git a/skills/builtin/catalog.yaml b/skills/builtin/catalog.yamlindex d0102ba8..79e4b61a 100644--- a/skills/builtin/catalog.yaml+++ b/skills/builtin/catalog.yaml@@ -231,14 +231,14 @@ skills:version: 1.0.0package_path: builtin/personal-profile/1.0.0- skill_id: simplexai_humanlike_browse- bootstrap_manifest_id: skill_manifest_simplexai_humanlike_browse_1_0_8+ bootstrap_manifest_id: skill_manifest_simplexai_humanlike_browse_1_0_9default_agent_types:- anotherme- generalmanifests:- - manifest_id: skill_manifest_simplexai_humanlike_browse_1_0_8- version: 1.0.8- package_path: builtin/humanlike-browse/1.0.8+ - manifest_id: skill_manifest_simplexai_humanlike_browse_1_0_9+ version: 1.0.9+ package_path: builtin/humanlike-browse/1.0.9- manifest_id: skill_manifest_simplexai_humanlike_browse_1_0_4version: 1.0.4package_path: builtin/humanlike-browse/1.0.4diff --git a/skills/builtin/humanlike-browse/1.0.8/SKILL.md b/skills/builtin/humanlike-browse/1.0.9/SKILL.mdsimilarity index 95%rename from skills/builtin/humanlike-browse/1.0.8/SKILL.mdrename to skills/builtin/humanlike-browse/1.0.9/SKILL.mdindex 9c5bfc64..787a4e2c 100644--- a/skills/builtin/humanlike-browse/1.0.8/SKILL.md+++ b/skills/builtin/humanlike-browse/1.0.9/SKILL.md@@ -11,7 +11,7 @@ description: Read, survey, post to or manage a site that watches for automated b- Anything else on a social network, a marketplace or a site where the user is signed in: only the computer tools, through `launch_app({agent_browser: true, urls: [url]})`. In Chrome or Safari this opens a window of the Computer's own in the user's everyday browser, with the user's sign-ins; Edge and Firefox run as separate instances. Pass `bundle_id` only when the user asks for one browser. The browser tools drive a page in a way these sites detect, so never use them on these sites; the Computer keeps them off every site the task opened this way.- If `launch_app` has no `agent_browser`, this needs a Mac Computer: tell the user and stop.- If a call says a computer tool does not exist, take the tool's exact name from your tool list and call it again before telling the user the tools are unavailable.-- If `launch_app` answers `COMPUTER_BROWSER_RESTART_REQUIRED`, ask the user with a question card to quit Chrome from its menu and leave it closed, saying that the Computer starts it again with their windows and tabs; then end your turn. When they answer that Chrome is closed, call `launch_app` again; if they decline, end the task.+- Never ask the user to quit or restart their browser. If `launch_app` says the Chrome window updates only while part of it shows on the user's screen and a page stops changing, ask the user to leave part of that window uncovered.- If the site asks to sign in, ask the user to sign in once in that browser window and stop; the sign-in stays for later tasks.## Move like a person