Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(agents): calm copy in the Agent section: plain names, honest costs, readable cards (#1034)
Ruben Lütke0664cee16ead
diff --git a/dodaios/ui/web/frontend/src/components/agentchat/WorkTrace.tsx b/dodaios/ui/web/frontend/src/components/agentchat/WorkTrace.tsxindex d08c335bf8..41055fe156 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/WorkTrace.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/WorkTrace.tsx@@ -8,7 +8,7 @@ import { PetMark } from "@/components/pets/PetMark";import type { PetState } from "@/lib/petStates";import { cn } from "@/lib/utils";import type { ApprovalDecision } from "@/lib/agentChatApi";-import { hasPersonCard, isCredentialTool, isQuestionTool, waitsOnCard, type ReasoningBlock, type TextBlock, type ToolBlock, type TurnBlock, type TurnItem, type TurnStatus } from "./reduce";+import { billedPerToken, hasPersonCard, isCredentialTool, isQuestionTool, waitsOnCard, type ReasoningBlock, type TextBlock, type ToolBlock, type TurnBlock, type TurnItem, type TurnStatus } from "./reduce";import { ChatMarkdown } from "./ChatMarkdown";import { CredentialCard } from "./CredentialCard";import { QuestionCard } from "./QuestionCard";@@ -799,10 +799,12 @@ export function TurnTrace({ turn, ...props }: { turn: TurnItem; onDecide?: Decidconst t = useT();const tokens = outputTokens(turn.usage ?? turn.liveUsage);const answered = turn.blocks.some(block => block.kind === "text" && block.text.trim());+ // Only a per-token key shows a price; a subscription's turn costs nothing extra.+ const cost = turn.costUsd !== null && turn.costUsd > 0 && billedPerToken(turn) ? turn.costUsd : null;return <WorkTrace {...props} blocks={turn.blocks} status={turn.status} startedMs={turn.startedMs} durationMs={turn.durationMs} error={turnErrorText(turn.error, t)}completionLabel={!answered ? t("agent_chat.turn_no_answer") : undefined}- receipt={tokens !== null && tokens > 0 || turn.costUsd !== null && turn.costUsd > 0 ? <>+ receipt={tokens !== null && tokens > 0 || cost !== null ? <>{tokens !== null && tokens > 0 ? <span aria-live="off" className="tabular-nums">{formatTokens(tokens)} {t("agent_chat.tokens")}</span> : null}- {turn.costUsd !== null && turn.costUsd > 0 ? <span className="tabular-nums">${turn.costUsd.toFixed(4)}</span> : null}+ {cost !== null ? <span className="tabular-nums">${cost.toFixed(4)}</span> : null}</> : undefined} />;}diff --git a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.css b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.cssindex ff334c6fdc..c01ad83a39 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.css+++ b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.css@@ -119,6 +119,40 @@white-space: pre-wrap;overflow-wrap: anywhere;}+/* A request read as label/value lines; the raw text waits behind a quiet toggle. */+.action-card-fields { margin-top: 6px; }+.action-card-rows {+ margin: 0;+ display: flex;+ flex-direction: column;+ gap: 2px;+ border-radius: 14px;+ background: hsl(var(--secondary) / 0.7);+ padding: 8px 12px;+}+.action-card-row {+ display: grid;+ grid-template-columns: minmax(6.5rem, 34%) minmax(0, 1fr);+ gap: 12px;+ padding: 2px 0;+ font-size: 13px;+ line-height: 19px;+}+.action-card-row dt { color: hsl(var(--muted-foreground)); overflow-wrap: anywhere; }+.action-card-row dd { margin: 0; color: hsl(var(--foreground)); overflow-wrap: anywhere; white-space: pre-wrap; }+.action-card-raw-toggle {+ margin-top: 6px;+ display: inline-flex;+ align-items: center;+ gap: 4px;+ border-radius: 999px;+ padding: 2px 8px 2px 4px;+ font-size: 12px;+ color: hsl(var(--muted-foreground));+ transition: color 120ms ease, background-color 120ms ease;+}+.action-card-raw-toggle:hover { color: hsl(var(--foreground)); background: hsl(var(--secondary) / 0.7); }+.action-card-raw-toggle:focus-visible { outline: none; box-shadow: 0 0 0 2px hsl(var(--ring)); }.action-card-copy {position: absolute;top: 5px;diff --git a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.tsx b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.tsxindex 70364ca6a5..b4f38efcc3 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ActionCard.tsx@@ -65,7 +65,14 @@ export interface ActionCardProps {ariaLabel: string;/** Subtitle lines in their fixed order: where, what, why, context. */lines?: ReactNode[];- disclosure?: { text: string; showLabel: string; hideLabel: string; defaultOpen?: boolean };+ /**+ * The exact request, copyable. With `rows` it reads as label/value lines+ * and the raw text waits behind a quieter `rawLabel` toggle.+ */+ disclosure?: {+ text: string; showLabel: string; hideLabel: string; defaultOpen?: boolean;+ rows?: { label: string; value: string }[]; rawLabel?: string;+ };children?: ReactNode;failure?: string | null;note?: ReactNode;@@ -194,16 +201,35 @@ function ActionButton({ action, pending, compact = false }: { action: ActionSpec</button>;}-function Disclosure({ text, showLabel, hideLabel, defaultOpen = false }: NonNullable<ActionCardProps["disclosure"]>) {+function Disclosure({ text, showLabel, hideLabel, defaultOpen = false, rows, rawLabel }: NonNullable<ActionCardProps["disclosure"]>) {const [open, setOpen] = useState(defaultOpen);+ const [raw, setRaw] = useState(false);const id = useId();+ const rawId = useId();+ const readable = Boolean(rows?.length);return <div className="mt-2.5 min-w-0"><button type="button" onClick={() => setOpen((v) => !v)} aria-expanded={open} aria-controls={id}className="flex items-center gap-1 rounded-md text-[13px] font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><ChevronDown aria-hidden className={cn("h-3.5 w-3.5 transition-transform duration-150", !open && "-rotate-90")} />{open ? hideLabel : showLabel}</button>- {open ? <div id={id} className="action-card-code">+ {open && readable ? <div id={id} className="action-card-fields">+ <dl className="action-card-rows" data-testid="action-card-rows">+ {rows!.map((row, i) => <div key={`${row.label}:${i}`} className="action-card-row">+ <dt>{row.label}</dt>+ <dd>{row.value}</dd>+ </div>)}+ </dl>+ <button type="button" onClick={() => setRaw((v) => !v)} aria-expanded={raw} aria-controls={rawId}+ className="action-card-raw-toggle" data-testid="action-card-raw">+ <ChevronDown aria-hidden className={cn("h-3 w-3 transition-transform duration-150", !raw && "-rotate-90")} />+ {rawLabel}+ </button>+ {raw ? <div id={rawId} className="action-card-code">+ <pre data-testid="action-card-detail">{text}</pre>+ <CopyText text={text} />+ </div> : null}+ </div> : open ? <div id={id} className="action-card-code"><pre data-testid="action-card-detail">{text}</pre><CopyText text={text} /></div> : null}diff --git a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.test.tsx b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.test.tsxindex 5428a6b36e..abdd59ee41 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.test.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.test.tsx@@ -76,6 +76,10 @@ describe("the approval action card", () => {drawTurn(asking());expect(screen.queryByTestId("action-card-detail")).toBeNull();fireEvent.click(screen.getByRole("button", { name: "Show details" }));+ // A structured request reads as label/value rows; the raw text waits behind "Raw".+ expect(screen.getByTestId("action-card-rows").textContent).toContain("[email protected]");+ expect(screen.queryByTestId("action-card-detail")).toBeNull();+ fireEvent.click(screen.getByTestId("action-card-raw"));expect(screen.getByTestId("action-card-detail").textContent).toContain("[email protected]");expect(screen.getByRole("button", { name: "Copy" })).toBeTruthy();});@@ -236,6 +240,7 @@ describe("paths on an approval card", () => {expect(card.textContent).toContain("In ~\\Desktop\\proj");expect(card.textContent).not.toContain("C:\\Users\\Ada");fireEvent.click(screen.getByRole("button", { name: "Show details" }));+ fireEvent.click(screen.getByTestId("action-card-raw"));expect(screen.getByTestId("action-card-detail").textContent).toContain("Users");rerender([...editAsking(), ev("approval_resolved", { turn_id: "t1", approval_id: "a1", decision: "allow" })]);const outcome = screen.getByTestId("approval-outcome");@@ -324,7 +329,7 @@ describe("a settled approval", () => {expect(toggle.getAttribute("aria-expanded")).toBe("false");fireEvent.click(toggle);expect(screen.getByText("The agent was told no and did not do it.")).toBeTruthy();- expect(screen.getByTestId("action-card-detail").textContent).toContain("[email protected]");+ expect(screen.getByTestId("action-card-rows").textContent).toContain("[email protected]");});it("offers Allow every time on an expired card and saves it as a rule", async () => {@@ -386,3 +391,43 @@ describe("secrets in the disclosure", () => {expect(screen.getByTestId("action-card-detail").textContent).not.toContain("x".repeat(30));});});++describe("an agent's own tool on the card", () => {+ const ROUTINE = "mcp__dodaios__society-create-routine";+ const routineAsk = (): AgentChatEvent[] => [+ ev("tool_call", { turn_id: "t1", call_id: "c1", name: ROUTINE, input: { title: "QA weekly check" } }),+ ev("approval_required", {+ turn_id: "t1", approval_id: "a1", call_id: "c1", name: ROUTINE, summary: ROUTINE,+ input: { title: "QA weekly check" },+ source: { kind: "connector", app: "Society Create Routine", verb: "" }, where: "", why: "", caution: null,+ detail: "{\n \"title\": \"QA weekly check\",\n \"schedule\": {\n \"local_time\": \"07:00\",\n \"days\": [\"mon\"]\n }\n}",+ rule: { scopes: ["chat"], chat: "tool", app: "Society Create Routine", verb: "", pattern: "", broad: "" },+ }),+ ];++ it("asks by what the tool does, never by its id, and shows the request as rows", () => {+ drawTurn(routineAsk());+ const card = screen.getByTestId("thread-approval");+ expect(screen.getByRole("heading", { name: "Create a routine?" })).toBeTruthy();+ expect(card.textContent).not.toMatch(/mcp__|society|Society/);+ fireEvent.click(screen.getByRole("button", { name: "Show details" }));+ const rows = screen.getByTestId("action-card-rows");+ expect(rows.textContent).toContain("Title");+ expect(rows.textContent).toContain("QA weekly check");+ expect(rows.textContent).toContain("Schedule · Local time");+ expect(rows.textContent).not.toContain("{");+ });++ it("reads its settled line by the action, not the id", () => {+ drawTurn([...routineAsk(), ev("approval_resolved", { turn_id: "t1", approval_id: "a1", decision: "allow" })]);+ const line = screen.getByTestId("approval-outcome");+ expect(line.textContent).toContain("Create a routine");+ expect(line.textContent).not.toContain("mcp__");+ });++ it("says a reason once when it repeats the summary", () => {+ drawTurn(asking("a1", { ...GMAIL_CARD, why: "Send the weekly report to [email protected]" }));+ const card = screen.getByTestId("thread-approval");+ expect(card.textContent?.split("Send the weekly report to [email protected]").length).toBe(2);+ });+});diff --git a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.tsx b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.tsxindex 0e17bc8fca..fc7c32d9ec 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/ApprovalActionCard.tsx@@ -8,7 +8,7 @@ import type { ApprovalState, ToolBlock } from "../reduce";import { ToolChoiceIcon } from "../ToolChoiceChips";import type { ToolChoice } from "../toolChoices";import { ActionCard, type ActionSpec, type SettledSpec } from "./ActionCard";-import { approvalTitle, cardInfoOf, disclosureText, narrowSentence, outcomeLabel, outcomeTone, ruleSentence, savedRuleSentence, shownSummary, sourceLabel } from "./approvalCopy";+import { approvalSummary, approvalTitle, cardInfoOf, detailRows, disclosureText, narrowSentence, outcomeLabel, outcomeTone, ruleSentence, sameWords, savedRuleSentence, sourceLabel, withReadableNames } from "./approvalCopy";import type { ApprovalCardInfo, ApprovalRuleOffer, RuleBreadth, RuleNarrow, RuleScope } from "./approvalInfo";import { claimKeyboardTarget, TARGET_PRIORITY } from "./keyboardTarget";@@ -26,8 +26,9 @@ type T = (key: string) => string;* happened, rebuilt from the event log after a reload.*/export const ApprovalActionCard = memo(function ApprovalActionCard({ block, onDecide }: { block: ToolBlock; onDecide?: ApprovalDecide }) {+ const t = useT();const approval = block.approval;- const info = useMemo(() => cardInfoOf(block), [block]);+ const info = useMemo(() => withReadableNames(cardInfoOf(block), block, t), [block, t]);if (!approval) return null;return approval.decision === null? <OpenApproval key={approval.approvalId} block={block} approval={approval} info={info} onDecide={onDecide} />@@ -59,7 +60,7 @@ function SourceIcon({ info }: { info: ApprovalCardInfo }) {return <Icon strokeWidth={1.75} />;}-function subtitleLines(info: ApprovalCardInfo, approval: ApprovalState, title: string, t: T): ReactNode[] {+function subtitleLines(info: ApprovalCardInfo, approval: ApprovalState, block: ToolBlock, title: string, t: T): ReactNode[] {const lines: ReactNode[] = [];const { kind } = info.source;if (info.where) {@@ -67,10 +68,14 @@ function subtitleLines(info: ApprovalCardInfo, approval: ApprovalState, title: slines.push(info.whereFull && info.whereFull !== info.where ? <span title={info.whereFull}>{line}</span> : line);}// A command is read in its own block below; a summary that only repeats it says nothing new.- const what = shownSummary(info, approval.summary);+ const what = approvalSummary(info, approval.summary, block);const repeatsCommand = kind === "terminal" && Boolean(info.detail) && info.detail.startsWith(approval.summary.trim());- if (what && !repeatsCommand && kind !== "plan" && what !== title) lines.push(<span className="text-foreground-secondary">{what}</span>);- if (info.why) lines.push(fill(t("action_card.field.why"), { why: info.why }));+ const shown = what && !repeatsCommand && kind !== "plan" && !sameWords(what, title) && !sameWords(what, info.action ?? "");+ if (shown) lines.push(<span className="text-foreground-secondary">{what}</span>);+ // The reason is said once: a "why" that repeats the summary adds nothing.+ if (info.why && !sameWords(info.why, what) && !sameWords(info.why, approval.summary)) {+ lines.push(fill(t("action_card.field.why"), { why: info.why }));+ }return lines;}@@ -146,9 +151,11 @@ function OpenApproval({ block, approval, info, onDecide }: {source={{ icon: <SourceIcon info={info} />, label: sourceLabel(info, t) }}title={title}ariaLabel={`${t("action_card.needs_approval")}: ${title}`}- lines={subtitleLines(info, approval, title, t)}+ lines={subtitleLines(info, approval, block, title, t)}disclosure={disclosure ? {text: disclosure,+ rows: detailRows(info.detail),+ rawLabel: t("action_card.raw"),showLabel: t(kind === "terminal" ? "action_card.show_command" : "action_card.show_details"),hideLabel: t(kind === "terminal" ? "action_card.hide_command" : "action_card.hide_details"),defaultOpen: kind === "terminal" && info.detail.length <= 400,@@ -305,7 +312,7 @@ function SettledApproval({ block, approval, info }: { block: ToolBlock; approvalconst settled: SettledSpec = {tone: outcomeTone(decision),label: outcomeLabel(decision, t),- detail: shownSummary(info, approval.summary) || title,+ detail: approvalSummary(info, approval.summary, block) || info.action || title,actions,receipt: saved ? <span className="action-card-receipt" title={savedText} data-testid="action-card-rule-saved"><Check aria-hidden />{t("action_card.rule.saved_short")}@@ -323,9 +330,11 @@ function SettledApproval({ block, approval, info }: { block: ToolBlock; approvalsource={{ icon: <SourceIcon info={info} />, label: sourceLabel(info, t) }}title={title}ariaLabel={`${settled.label}: ${title}`}- lines={subtitleLines(info, approval, title, t)}+ lines={subtitleLines(info, approval, block, title, t)}disclosure={disclosureText(info, t) ? {text: disclosureText(info, t),+ rows: detailRows(info.detail),+ rawLabel: t("action_card.raw"),showLabel: t(info.source.kind === "terminal" ? "action_card.show_command" : "action_card.show_details"),hideLabel: t(info.source.kind === "terminal" ? "action_card.hide_command" : "action_card.hide_details"),} : undefined}diff --git a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/approvalCopy.ts b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/approvalCopy.tsindex 89eba5ea2b..d47820251e 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/approvalCopy.ts+++ b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/approvalCopy.ts@@ -1,5 +1,6 @@import { fill } from "@/i18n";import type { ToolBlock } from "../reduce";+import { agentToolLabel, capitalize, isRawToolId, readableToolName } from "../traceEntries";import type { ApprovalCardInfo, ApprovalSourceKind, RuleBreadth, RuleKind, RuleNarrow, SavedApprovalRule } from "./approvalInfo";import { maskText, maskedRequest } from "./redact";@@ -50,8 +51,89 @@ export function cardInfoOf(block: ToolBlock): ApprovalCardInfo {};}+/**+ * The card with the agents' own tools named by what they do: "Create a+ * routine?" under a plain "Tool" chip, never "Society Create Routine" or+ * "mcp__dodaios__society-create-routine".+ */+export function withReadableNames(info: ApprovalCardInfo, block: ToolBlock, t: T): ApprovalCardInfo {+ const action = agentToolLabel(block.name || "", t);+ if (!action) return info;+ return {+ ...info,+ action,+ source: { kind: "tool", app: action, verb: info.source.verb },+ rule: info.rule ? { ...info.rule, app: action } : null,+ };+}++/**+ * What the card says it is about: the summary, unless it only repeats the+ * tool's id; then the tool's readable name, or nothing when the title already+ * names the action.+ */+export function approvalSummary(info: ApprovalCardInfo, summary: string, block: ToolBlock): string {+ const shown = shownSummary(info, summary);+ if (!isRawToolId(shown, block.name || "")) return shown;+ return info.action ? "" : readableToolName(block.name || shown);+}++/** Two lines that say the same thing, ignoring quotes, case and the closing stop. */+export function sameWords(a: string, b: string): boolean {+ const norm = (text: string) => text.toLowerCase().replace(/["'“”„«»‘’.!?…\s]+/g, " ").trim();+ return Boolean(norm(a)) && norm(a) === norm(b);+}++export interface DetailRow {+ label: string;+ value: string;+}++const MAX_ROWS = 24;+const MAX_VALUE = 400;++function words(key: string): string {+ return capitalize(key.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase());+}++function primitive(value: unknown): value is string | number | boolean {+ return typeof value === "string" || typeof value === "number" || typeof value === "boolean";+}++/**+ * A request as label/value rows ("Title · QA weekly check"), nested objects+ * one level down as "Schedule · Local time"; [] when it is not a JSON object+ * (a command line stays as it is).+ */+export function detailRows(detail: string): DetailRow[] {+ const text = detail.trim();+ if (!text.startsWith("{")) return [];+ let parsed: unknown;+ try { parsed = JSON.parse(text); } catch { return []; }+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return [];+ const rows: DetailRow[] = [];+ const walk = (record: Record<string, unknown>, prefix: string, depth: number) => {+ for (const [key, value] of Object.entries(record)) {+ if (rows.length >= MAX_ROWS) return;+ const label = prefix ? `${prefix} · ${words(key)}` : words(key);+ if (value === null || value === undefined || value === "" || (Array.isArray(value) && value.length === 0)) continue;+ let shown: string;+ if (primitive(value)) shown = String(value);+ else if (Array.isArray(value) && value.every(primitive)) shown = value.map(String).join(", ");+ else if (!Array.isArray(value) && depth < 1) {+ walk(value as Record<string, unknown>, label, depth + 1);+ continue;+ } else shown = JSON.stringify(value);+ rows.push({ label, value: shown.length > MAX_VALUE ? `${shown.slice(0, MAX_VALUE - 1)}…` : shown });+ }+ };+ walk(parsed as Record<string, unknown>, "", 0);+ return rows;+}+/** The source chip's label: what is asking. */export function sourceLabel(info: ApprovalCardInfo, t: T): string {+ if (info.action) return t("action_card.source.tool");const { kind, app } = info.source;if ((kind === "connector" || kind === "tool") && app) return app;return t(`action_card.source.${kind}`);@@ -59,6 +141,7 @@ export function sourceLabel(info: ApprovalCardInfo, t: T): string {/** The card's question-form title. */export function approvalTitle(info: ApprovalCardInfo, t: T): string {+ if (info.action) return fill(t("action_card.title.action"), { action: info.action });const { kind, app, verb } = info.source;if (kind === "connector") {if (verb && app) return fill(t("action_card.title.connector_verb"), { app, verb });diff --git a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/approvalInfo.ts b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/approvalInfo.tsindex af6ddad8ba..26c4ea5f0d 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/actionCard/approvalInfo.ts+++ b/dodaios/ui/web/frontend/src/components/agentchat/actionCard/approvalInfo.ts@@ -49,6 +49,8 @@ export interface ApprovalCardInfo {brief: string;/** `null`: the card offers no "Always allow" (a plan). */rule: ApprovalRuleOffer | null;+ /** One of the agents' own tools, by what it does ("Create a routine"); absent for any other call. */+ action?: string;}/** A standing rule saved from a card (`notice{kind:"approval_rule"}`). */diff --git a/dodaios/ui/web/frontend/src/components/agentchat/activity/activityModel.test.ts b/dodaios/ui/web/frontend/src/components/agentchat/activity/activityModel.test.tsindex 9009e09f63..c9f9f4f4b7 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/activity/activityModel.test.ts+++ b/dodaios/ui/web/frontend/src/components/agentchat/activity/activityModel.test.ts@@ -97,6 +97,9 @@ describe("activityOf", () => {expect(activityOf(turn([question, thought("r2")]))?.phrase).toBe("waiting");const approval = call("Bash", { command: "rm -rf x" }, null, { approval: { approvalId: "a", summary: "", decision: null } });expect(activityOf(turn([approval]))?.phrase).toBe("waiting_approval");+ // Answered here and on its way: the line stops asking for an OK at once.+ const answering = call("Bash", { command: "rm -rf x" }, null, { approval: { approvalId: "a", summary: "", decision: null, answering: true } });+ expect(activityOf(turn([answering]))?.phrase).not.toBe("waiting_approval");});it("question polls are plumbing, and running helpers keep the line on delegation", () => {diff --git a/dodaios/ui/web/frontend/src/components/agentchat/activity/activityModel.ts b/dodaios/ui/web/frontend/src/components/agentchat/activity/activityModel.tsindex 67a7be9f9e..51892341c8 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/activity/activityModel.ts+++ b/dodaios/ui/web/frontend/src/components/agentchat/activity/activityModel.ts@@ -214,7 +214,7 @@ function fileName(path: string): string {/** The call waits on the person: an open question, a credential field, an approval. */function waitsForPerson(block: TurnBlock): block is ToolBlock {- return block.kind === "tool" && (waitsOnCard(block) || Boolean(block.approval && block.approval.decision === null));+ return block.kind === "tool" && (waitsOnCard(block) || Boolean(block.approval && block.approval.decision === null && !block.approval.answering));}/** Question and credential polls draw nothing: the card speaks for them. */diff --git a/dodaios/ui/web/frontend/src/components/agentchat/inspector/WorkInspector.test.tsx b/dodaios/ui/web/frontend/src/components/agentchat/inspector/WorkInspector.test.tsxindex a103f2d6ea..5198ce8291 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/inspector/WorkInspector.test.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/inspector/WorkInspector.test.tsx@@ -226,3 +226,30 @@ describe("inspector width", () => {expect(inspectorDocked(700, 420)).toBe(false);});});++describe("the inspector's cost", () => {+ const costed = (runner: string, extra: Record<string, unknown> = {}) => turnOf([+ ev("turn_started", { turn_id: "c1", provider: "claude-api", runner }),+ ev("assistant_text", { turn_id: "c1", message_id: "m", text: "ok" }),+ ev("turn_finished", { turn_id: "c1", status: "done", duration_ms: 1_000, cost_usd: 0.3427, ...extra }),+ ]);++ it("names no price for a subscription seat: the plan covers it", () => {+ draw(costed("claude-cli"));+ const meta = screen.getByTestId("work-inspector").querySelector(".wi-meta")!.textContent ?? "";+ expect(meta).toContain("Included in your plan");+ expect(meta).not.toContain("$");+ });++ it("keeps the amount for a per-token key", () => {+ draw(costed("api"));+ expect(screen.getByTestId("work-inspector").querySelector(".wi-meta")!.textContent).toContain("$0.3427");+ cleanup();+ draw(costed("claude-cli", { billed_via_key: true }));+ expect(screen.getByTestId("work-inspector").querySelector(".wi-meta")!.textContent).toContain("$0.3427");+ cleanup();+ // A CLI on the person's own key (Grok Build bills per turn) is real money, not a seat.+ draw(costed("grok-cli"));+ expect(screen.getByTestId("work-inspector").querySelector(".wi-meta")!.textContent).toContain("$0.3427");+ });+});diff --git a/dodaios/ui/web/frontend/src/components/agentchat/inspector/WorkInspector.tsx b/dodaios/ui/web/frontend/src/components/agentchat/inspector/WorkInspector.tsxindex 8db18d50be..206d988bd2 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/inspector/WorkInspector.tsx+++ b/dodaios/ui/web/frontend/src/components/agentchat/inspector/WorkInspector.tsx@@ -5,7 +5,7 @@ import { cn } from "@/lib/utils";import { useStickToBottom } from "@/hooks/useStickToBottom";import { listSubagents, subagentTurn, type SubagentEntry } from "@/components/agentic/threads/subagents";import { ChatMarkdown } from "../ChatMarkdown";-import type { SubagentStatus, ToolBlock, TurnItem } from "../reduce";+import { billedPerToken, type SubagentStatus, type ToolBlock, type TurnItem } from "../reduce";import { toolDiff } from "../toolDiff";import { plural, readableOutput, traceDuration } from "../traceEntries";import { formatTokens, outputTokens } from "../toolView";@@ -105,7 +105,10 @@ export const WorkInspector = memo(function WorkInspector({if (turn.status === "running") meta.push(t("run_view.work.working"));else if (turn.durationMs) meta.push(fill(t("run_view.work.worked_for"), { duration: traceDuration(turn.durationMs) }));if (tokens && tokens > 0) meta.push(fill(t("run_view.inspector.tokens"), { count: formatTokens(tokens) }));- if (turn.costUsd !== null && turn.costUsd > 0) meta.push(`$${turn.costUsd.toFixed(4)}`);+ if (turn.costUsd !== null && turn.costUsd > 0) {+ // A subscription bills nothing per turn: a dollar figure would contradict "$0.00 spent".+ meta.push(billedPerToken(turn) ? `$${turn.costUsd.toFixed(4)}` : t("run_view.inspector.included"));+ }if (turn.model) meta.push(turn.model);return <aside ref={pane} tabIndex={-1} aria-labelledby={titleId}diff --git a/dodaios/ui/web/frontend/src/components/agentchat/reduce.ts b/dodaios/ui/web/frontend/src/components/agentchat/reduce.tsindex a0b318d834..693358c898 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/reduce.ts+++ b/dodaios/ui/web/frontend/src/components/agentchat/reduce.ts@@ -55,6 +55,8 @@ export interface ApprovalState {scope?: RuleScope;/** A standing rule saved from this card, now or later. */rule?: SavedApprovalRule;+ /** The person answered here and the answer is on its way: nothing waits on them any more. */+ answering?: boolean;}/** One prepared answer on an agent's question card. */@@ -302,6 +304,8 @@ export interface TurnItem {/** Tokens so far while the turn runs (``usage_delta``); the finished usage replaces it. */liveUsage: Record<string, number> | null;costUsd: number | null;+ /** Whether the cost was charged to a per-token key (`turn_finished.billed_via_key`); absent when the event does not say. */+ billedViaKey?: boolean | null;error: string | null;/** The runtime's raw output behind the error, redacted, for "Technical details". */errorDetails?: string | null;@@ -743,6 +747,40 @@ export function settleApproval(tl: Timeline, approvalId: string, decision: strinreturn pendingApprovals.length === withTurn.pendingApprovals.length ? withTurn : { ...withTurn, pendingApprovals };}+/**+ * Runners that answer on a vendor subscription seat, the same set as+ * `dodaios.costs.model.SUBSCRIPTION_RUNNERS`. Every other CLI (Grok Build,+ * Hermes, OpenClaw, OpenCode, ...) runs on a key and its cost is real money.+ */+const SUBSCRIPTION_RUNNERS: ReadonlySet<string> = new Set(["claude-cli", "codex-cli", "agy-cli", "kimi-cli"]);++/**+ * Whether a turn's cost was charged per token. A subscription seat reports+ * what the plan already covers, so its cost is not money spent.+ */+export function billedPerToken(turn: Pick<TurnItem, "runner" | "billedViaKey">): boolean {+ if (typeof turn.billedViaKey === "boolean") return turn.billedViaKey;+ return !SUBSCRIPTION_RUNNERS.has((turn.runner || "").trim().toLowerCase());+}++/**+ * Mark approval `approvalId` as answered here while the answer travels (or+ * clear the mark when it failed): the turn stops saying it needs the person+ * at once, while the card keeps its buttons until the decision lands.+ */+export function markApprovalAnswering(tl: Timeline, approvalId: string, answering: boolean): Timeline {+ const patch = (turn: TurnItem): TurnItem => {+ const blocks = mapToolDeep(+ turn.blocks,+ (b) => b.approval?.approvalId === approvalId && b.approval.decision === null && Boolean(b.approval.answering) !== answering,+ (b) => (b.approval ? { ...b, approval: { ...b.approval, answering } } : b),+ );+ return blocks && blocks !== turn.blocks ? { ...turn, blocks } : turn;+ };+ const items = tl.items.map((item) => (item.type === "turn" ? patch(item) : item));+ return items.some((item, i) => item !== tl.items[i]) ? { ...tl, items } : tl;+}+/** Record a standing rule saved from approval `approvalId`'s card, decided or not. */export function noteApprovalRule(tl: Timeline, approvalId: string, rule: SavedApprovalRule, turnId = ""): Timeline {const patch = (turn: TurnItem): TurnItem => {@@ -1314,6 +1352,7 @@ export function reduceEvent(tl: Timeline, ev: AgentChatEvent): Timeline {? (p.usage as Record<string, unknown>): turn.liveUsage,costUsd: num(p.cost_usd),+ ...(typeof p.billed_via_key === "boolean" ? { billedViaKey: p.billed_via_key } : {}),// A runtime's own error event earlier in the turn stays its reason// when the end of the turn names none.error: str(p.error, "") || turn.error || null,diff --git a/dodaios/ui/web/frontend/src/components/agentchat/traceEntries.test.ts b/dodaios/ui/web/frontend/src/components/agentchat/traceEntries.test.tsindex edfb783ac9..caa3280693 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/traceEntries.test.ts+++ b/dodaios/ui/web/frontend/src/components/agentchat/traceEntries.test.ts@@ -86,7 +86,7 @@ describe("trace timeline", () => {expect(viaClaude.kind).toBe("service");expect(viaClaude.text).not.toMatch(/claude/i);const own = only(tool("r", { name: "mcp__jarvis__society_routines", input: {}, output: "{}" }));- expect(own).toMatchObject({ kind: "tool", text: "Society routines" });+ expect(own).toMatchObject({ kind: "tool", text: "Check routines" });const cli = only(tool("j", { name: "mcp__jarvis__cli_jarvisctl", input: { command: "jarvisctl outputs list" }, output: "" }));expect(cli).toMatchObject({ kind: "command", text: "jarvisctl outputs list" });});@@ -97,7 +97,7 @@ describe("trace timeline", () => {expect(plugin).toMatchObject({ kind: "service", text: "Gmail" });expect(plugin.brand).toBeTruthy();const own = only(tool("r", { name: `mcp__${server}__society_routines`, input: {}, output: "{}" }));- expect(own).toMatchObject({ kind: "tool", text: "Society routines" });+ expect(own).toMatchObject({ kind: "tool", text: "Check routines" });const cli = only(tool("j", { name: `mcp__${server}__cli_jarvisctl`, input: { command: "jarvisctl outputs list" }, output: "" }));expect(cli).toMatchObject({ kind: "command", text: "jarvisctl outputs list" });const artifact = only(tool("a", { name: `mcp__${server}__create_artifact`, input: { title: "GitHub Stars" }, output: "Built." }));@@ -233,3 +233,17 @@ describe("readable call labels", () => {expect(isIdentifier("src/app.ts")).toBe(false);});});++describe("calls a person reads", () => {+ it("names the agents' own tools by what they do, under every road", () => {+ for (const name of ["mcp__dodaios__society_propose_change", "mcp_dodaios_society_propose_change", "dodaios/society_propose_change"]) {+ expect(only(tool("p", { name, input: { kind: "rule" }, output: "{}" })).text).toBe("Propose a change");+ }+ expect(only(tool("c", { name: "mcp__dodaios__society-create-routine", input: {}, output: "{}" })).text).toBe("Create a routine");+ });++ it("says a bare wildcard listing lists the folder", () => {+ expect(only(tool("l", { name: "Glob", input: { pattern: "*" }, output: "" })).text).toBe("Listed a folder");+ expect(only(tool("l", { name: "LS", input: { path: "src/app" }, output: "" })).text).toBe("Listed src/app");+ });+});diff --git a/dodaios/ui/web/frontend/src/components/agentchat/traceEntries.ts b/dodaios/ui/web/frontend/src/components/agentchat/traceEntries.tsindex 7aa9c51168..083a43e435 100644--- a/dodaios/ui/web/frontend/src/components/agentchat/traceEntries.ts+++ b/dodaios/ui/web/frontend/src/components/agentchat/traceEntries.ts@@ -368,6 +368,54 @@ export function readableToolName(name: string): string {return humanize(bare.replace(/^society_(?=.)/i, "")) || humanize(bare) || name;}+/**+ * The agents' own tools ("mcp__dodaios__society-create-routine") by what they+ * do for the person. Keys are bare names past "society", lowercase, without+ * "-" or "_"; values name a `trace_report.tool.*` line.+ */+const AGENT_TOOLS: Record<string, string> = {+ createroutine: "create_routine", routines: "routines", listroutines: "routines",+ updateroutine: "update_routine", routineoperation: "update_routine", invokeroutine: "invoke_routine",+ proposechange: "propose_change", messageagent: "message_agent", message: "message_agent",+ status: "status", review: "review", createagent: "create_agent", updateagent: "update_agent",+ archiveagent: "archive_agent", switchagentmodel: "switch_model",+ teamassign: "team", teamtasks: "team", teamreport: "team", teamgoals: "team", teamboard: "team", teamsweep: "team",+ wikinote: "wiki_note", memoryrecall: "memory_recall", conversationrecall: "conversation_recall",+ runskill: "run_skill", skill: "run_skill", browser: "browser", browseraction: "browser",+ shell: "shell", sandbox: "sandbox", requestcredential: "request_credential",+ capabilitycatalog: "catalog", agentcatalog: "catalog", context: "context",+};++/** The `trace_report.tool.*` key of one of the agents' own tools, or null. */+export function agentToolKey(name: string): string | null {+ const raw = name.trim();+ const routed = traceToolName(raw);+ const own = OWN_SINGLE.test(raw) || !routed.includes("/") || ownServerTool(routed) !== null;+ if (!own) return null;+ const bare = bareToolName(raw).toLowerCase();+ if (!/^society[-_]/.test(bare)) return null;+ return AGENT_TOOLS[bare.replace(/^society[-_]/, "").replace(/[-_\s]/g, "")] ?? null;+}++/** One of the agents' own tools in words ("Create a routine"), or null for any other tool. */+export function agentToolLabel(name: string, t: Translate): string | null {+ const key = agentToolKey(name);+ return key ? tr(t, `tool.${key}`) : null;+}++/** Any tool id a person can read: the agents' own tools by what they do, others by name. */+export function friendlyToolName(name: string, t: Translate): string {+ return agentToolLabel(name, t) ?? readableToolName(name);+}++/** A summary that is only the tool's id ("mcp__dodaios__society_routines"), not words. */+export function isRawToolId(text: string, name = ""): boolean {+ const clean = text.trim();+ if (!clean || /\s/.test(clean)) return false;+ if (name && (clean === name.trim() || bareToolName(clean) === bareToolName(name))) return true;+ return /^mcp_/i.test(clean) || /^society[-_][a-z0-9_-]+$/i.test(clean) || /^[a-z0-9]+(?:[_-][a-z0-9]+)*\/[\w-]+$/i.test(clean) || /__/.test(clean);+}+type InternalTool = "lookup" | "asked";/**@@ -443,7 +491,10 @@ export function callOf(block: ToolBlock, turn: TurnStatus, t: Translate, lang: s}if (action === "list") {const path = firstString(record, ACTION_KEYS.list) || description.detail || ".";- return { ...base, kind: "list", text: tr(t, "call.list", { target: shortPath(path) }), bucket: "list" };+ // "Listed *" says nothing: a bare wildcard or the current folder is the folder itself.+ const text = /^(?:\.[\\/]?|\*{1,2}(?:[\\/]\*)?(?:\.\*)?)$/.test(path.trim())+ ? capitalize(tr(t, "act.list_one")) : tr(t, "call.list", { target: shortPath(path) });+ return { ...base, kind: "list", text, bucket: "list" };}if (action === "search") {const pattern = oneLine(firstString(record, ACTION_KEYS.search) || description.detail, 60);@@ -463,6 +514,11 @@ export function callOf(block: ToolBlock, turn: TurnStatus, t: Translate, lang: sconst kind: CallKind = family === "web" ? "web" : "family";return { ...base, kind, text: capitalize(tr(t, `family.${family}`)), detail: oneLine(description.detail, 100), result, bucket: `family:${family}` };}+ // The agents' own tools say what they do ("Create a routine"), never their ids.+ const agentLabel = agentToolLabel(block.name, t);+ if (agentLabel) {+ return { ...base, kind: "tool", text: agentLabel, detail: oneLine((own ?? description).detail, 100), result, bucket: `agent:${agentLabel}` };+ }if (own && ownTool !== null) {// The app's own server is the road, not the destination: "dodaios/gmail"// is the Gmail plugin, "dodaios/society_routines" is that tool by name.@@ -492,6 +548,7 @@ export function summarize(calls: Call[], t: Translate, lang: string): string {const parts: string[] = [];for (const [bucket, n] of counts) {if (bucket.startsWith("used:")) used.push(bucket.slice(5));+ else if (bucket.startsWith("agent:")) parts.push(bucket.slice(6));else if (bucket.startsWith("family:")) parts.push(tr(t, `family.${bucket.slice(7)}`));else parts.push(tr(t, `act.${bucket}_${plural(lang, n)}`));}diff --git a/dodaios/ui/web/frontend/src/components/home/ChatStage.test.tsx b/dodaios/ui/web/frontend/src/components/home/ChatStage.test.tsxindex c0a04a9076..b01e4e4af0 100644--- a/dodaios/ui/web/frontend/src/components/home/ChatStage.test.tsx+++ b/dodaios/ui/web/frontend/src/components/home/ChatStage.test.tsx@@ -893,6 +893,21 @@ describe("ChatStage (agent chat)", () => {const footer = within(screen.getByTestId("work-trace")).getByRole("status");expect(footer.textContent).toContain("12s");expect(footer.textContent).toContain("219");+ // A subscription seat's turn costs nothing extra, so it shows no price.+ expect(footer.textContent).not.toContain("$");+ });++ it("shows the price of a turn billed to a per-token key", () => {+ const timeline = reduceEvents(EMPTY_TIMELINE, [+ ev("user_message", { text: "check the repo" }),+ ev("turn_started", { turn_id: "t10", provider: "claude-api", model: "claude-opus-5", effort: "high", runner: "claude-cli" }),+ ev("assistant_text", { turn_id: "t10", message_id: "m1", text: "Done." }),+ ev("turn_finished", { turn_id: "t10", status: "done", duration_ms: 12_000, usage: { input_tokens: 2, output_tokens: 219 }, cost_usd: 0.8483, billed_via_key: true }),+ ]);+ useAgentChatStore.setState({ activeSessionId: "s10", timeline });+ render(<ChatStage />);+ openWork();+ const footer = within(screen.getByTestId("work-trace")).getByRole("status");expect(footer.textContent).toContain("$0.8483");});diff --git a/dodaios/ui/web/frontend/src/components/society/attention/attentionStore.ts b/dodaios/ui/web/frontend/src/components/society/attention/attentionStore.tsindex e12a80ba10..a00317eb89 100644--- a/dodaios/ui/web/frontend/src/components/society/attention/attentionStore.ts+++ b/dodaios/ui/web/frontend/src/components/society/attention/attentionStore.ts@@ -20,9 +20,31 @@ interface AttentionState {status: AttentionStatus;/** When the list was last read (ms), 0 for never. */readAt: number;+ /**+ * Cards the person answered here (approval, question, proposal ids): the+ * roster and the chat header stop saying "needs you" for them at once,+ * before the next roster read confirms it.+ */+ answered: readonly string[];}-export const useAttentionStore = create<AttentionState>(() => ({ count: 0, list: null, status: "idle", readAt: 0 }));+/** How many answered ids are remembered; older ones have long left the roster. */+const ANSWERED_KEEP = 64;++export const useAttentionStore = create<AttentionState>(() => ({ count: 0, list: null, status: "idle", readAt: 0, answered: [] }));++/** Note that the card `refId` was answered here, so nothing keeps asking for it. */+export function markAnswered(refId: string): void {+ if (!refId) return;+ const { answered } = useAttentionStore.getState();+ if (answered.includes(refId)) return;+ useAttentionStore.setState({ answered: [...answered, refId].slice(-ANSWERED_KEEP) });+}++/** Whether the card `refId` was answered here. */+export function wasAnswered(refId: string | undefined): boolean {+ return Boolean(refId) && useAttentionStore.getState().answered.includes(refId!);+}const TITLE_BADGE = /^\(\d+\)\s+/;@@ -79,6 +101,7 @@ export function refreshAttention(): Promise<void> {export function forgetAttentionItem(item: AttentionItem): void {const { list } = useAttentionStore.getState();if (!list) return;+ markAnswered(item.refId);const items = list.items.filter((other) => !(other.refId === item.refId && other.sessionId === item.sessionId));if (items.length === list.items.length) return;const count = Math.max(0, list.count - (list.items.length - items.length));@@ -90,5 +113,5 @@ export function forgetAttentionItem(item: AttentionItem): void {export function resetAttentionStore(): void {inflight = null;again = false;- useAttentionStore.setState({ count: 0, list: null, status: "idle", readAt: 0 });+ useAttentionStore.setState({ count: 0, list: null, status: "idle", readAt: 0, answered: [] });}diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentBrowserPreview.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentBrowserPreview.tsxindex fcf65fb934..8e2f6424f7 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentBrowserPreview.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentBrowserPreview.tsx@@ -87,7 +87,8 @@ export function AgentBrowserPreview({ agent }: { agent: SocietyAgent }) {: state.connected && state.ready? t(state.manual ? "society.browser_live.manual" : "society.browser_live.live"): t(managedRuntime && install.data && !install.data.installed ? "society.card.browser_setting_up" : "society.card.browser_connecting");- const buttonClass = "inline-flex h-8 min-w-8 items-center justify-center rounded-full px-3 text-[13px] text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground disabled:opacity-40";+ // Readable even while it waits for the browser: a filled chip, never a 40%-faded word.+ const buttonClass = "inline-flex h-8 min-w-8 items-center justify-center rounded-full bg-secondary px-3 text-[13px] font-medium text-foreground transition-colors hover:bg-border disabled:cursor-not-allowed disabled:bg-secondary/70 disabled:text-foreground-secondary";const signInClass = "inline-flex h-8 items-center rounded-full bg-primary px-4 text-[13px] font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-40";const enterUrl = () => {const url = /^https?:\/\//i.test(address) ? address : "https://" + address;diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentHeader.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentHeader.tsxindex ce67e05d27..905636b83f 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentHeader.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentHeader.tsx@@ -22,7 +22,8 @@ import { useEventStore } from "@/store/events";import { AgentSwatch } from "../AgentSwatch";import { agentTint } from "../agentTint";import { rowToAgent, type SocietyAgent } from "../data";-import { previewText, rosterStatus, waitingReasonOf } from "../roster/rosterPreview";+import { useAttentionStore } from "../attention/attentionStore";+import { previewText, readableWaiting, rosterStatus, waitingReasonOf } from "../roster/rosterPreview";import { StatusMark } from "../roster/RosterRow";import type { DetailsControl } from "./AgentChatLayout";import { AGENT_APPROVAL_MODES, modeSupported, runnerFor } from "./approvalModes";@@ -40,12 +41,14 @@ export function AgentHeader({ agent, details }: AgentHeaderProps) {const t = useT();const assistantName = useEventStore((state) => state.assistantName);const displayName = societyDisplayName(agent, assistantName);+ // Re-read when a card is answered here, so "needs you" clears at once.+ useAttentionStore((state) => state.answered);const status = rosterStatus(agent, false);const reason = waitingReasonOf(agent);let phrase: ReactNode = null;if (status === "needs-you") {- const summary = previewText(reason?.summary);+ const summary = readableWaiting(previewText(reason?.summary), t);phrase = <span className="as-pill-status text-warning">{summary ? `${t("society.shell.preview_needs_you")} · ${summary}` : t("society.shell.status_waiting")}</span>;} else if (status === "working") {phrase = <span className="as-pill-status as-shimmer">{t("society.shell.preview_working")}</span>;diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentKnowledge.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentKnowledge.tsxindex 20a4466350..be505d4cbb 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentKnowledge.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentKnowledge.tsx@@ -11,6 +11,8 @@ import { reviewWaitReason } from "@/lib/skipReasons";export interface AgentKnowledge {files: { path: string; name: string; kind: "memory" | "skills"; updated_ms: number; size: number }[];learned_instructions: string[];+ /** Standing rules the person applied from a proposal and the instructions still hold. */+ applied_rules?: string[];reviews: { pending: number; done: number };/** The agent's newest review attempt (`review:last:<agent>`). A review that got* no answer carries why (`reason_code`, the seat's `provider`, the server'sdiff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentRoutineDetail.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentRoutineDetail.tsxindex 5916181a23..e6e4ffcac9 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentRoutineDetail.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentRoutineDetail.tsx@@ -19,12 +19,12 @@ import { useSocietyAgent } from "../data";import { TriggerBuilder } from "./TriggerBuilder";import { WebhookConnection } from "./WebhookConnection";import { SourceControls } from "./SourceControls";-import { RoutineSeatPicker, type RoutineSeat } from "./RoutineSeatPicker";+import { RoutineSeatPicker, useSeatLabel, type RoutineSeat } from "./RoutineSeatPicker";import { useRoutineNavigation } from "../chat/routineNavigation";import { routineSkipReason } from "@/lib/skipReasons";import type { RoutineTone } from "./routines/TriggerIcon";import { humanSchedule } from "./routines/humanSchedule";-import { fill, formatDuration, relativeTime } from "./routines/format";+import { calmMoment, fill, formatDuration, relativeTime } from "./routines/format";import { markRoutinesSeen, useRoutineRuns } from "./routines/routinesApi";import { mergeRunDetails, routineRuns, type Run } from "./routines/runs";import { RunHistory, runReason } from "./routines/RunHistory";@@ -90,6 +90,7 @@ export function AgentRoutineDetail({ agentId, routine, onClose, parked = false }const [seatDraft, setSeatDraft] = useState<RoutineSeat | null>(null);const [seatOpen, setSeatOpen] = useState(false);const seat = seatDraft ?? savedSeat;+ const seatName = useSeatLabel(seat);const seatDirty = seatDraft !== null && (seatDraft.provider !== savedSeat.provider || seatDraft.model !== savedSeat.model ||seatDraft.effort !== savedSeat.effort || seatDraft.account_id !== savedSeat.account_id@@ -170,7 +171,7 @@ export function AgentRoutineDetail({ agentId, routine, onClose, parked = false }<p className={cn("mt-0.5 text-xs leading-4", tone === "parked" ? "text-warning" : tone === "running" ? "text-primary" : "text-muted-foreground")}title={nextMs ? new Date(nextMs).toLocaleString(locale, { timeZoneName: "short" }) : undefined}>{status}</p></div>- <label className="flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground"><Switch aria-label={label("active")} checked={shownActive} disabled={pending || !editable} onCheckedChange={(enabled) => void act(async () => {+ <label className="flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground"><Switch aria-label={label(shownActive ? "active" : "paused")} checked={shownActive} disabled={pending || !editable} onCheckedChange={(enabled) => void act(async () => {for (const detail of details) if (detail && !terminal.includes(detail.state) && (detail.state === "paused") === enabled) await setTaskEnabled(detail.id, enabled);})} /><span className="sr-only sm:not-sr-only" aria-hidden data-testid="routine-switch-state">{label(shownActive ? "active" : "paused")}</span></label></div>@@ -197,7 +198,6 @@ export function AgentRoutineDetail({ agentId, routine, onClose, parked = false }</div>}<section className="space-y-2">- <h4 className={heading}>{own("instruction")}</h4><label className="block space-y-1 text-xs text-muted-foreground">{label("name")}<input className={field} aria-label={label("name")} maxLength={200} disabled={pending || !editable || Boolean(editing)} value={values.title} onChange={(event) => setDraft({ ...values, title: event.target.value })} /></label><label className="block space-y-1 text-xs text-muted-foreground">{label("prompt")}<textarea className={cn(field, "resize-y leading-relaxed")} aria-label={label("prompt")} maxLength={16000} rows={6} disabled={pending || !editable || Boolean(editing) || (first?.spec?.action as { kind?: string } | undefined)?.kind !== "agent"} value={values.prompt} onChange={(event) => setDraft({ ...values, prompt: event.target.value })} /></label>{draft && <div className="flex gap-2"><button className={primary} disabled={pending || !valid || !editable || Boolean(editing)} onClick={() => void act(async () => {@@ -219,7 +219,7 @@ export function AgentRoutineDetail({ agentId, routine, onClose, parked = false }</button></div><p className="text-[12px]">- {!seat.provider ? label("follow_agent") : `${seat.provider}${seat.model ? ` · ${seat.model}` : ""}${seat.effort ? ` · ${seat.effort}` : ""}`}+ {!seat.provider ? label("follow_agent") : seatName}</p>{seatOpen && <RoutineSeatPicker seat={seat} disabled={pending || !editable || Boolean(editing)} onChange={setSeatDraft} />}</div>}@@ -238,7 +238,7 @@ export function AgentRoutineDetail({ agentId, routine, onClose, parked = false }<button className="flex w-full items-start gap-2 rounded text-left text-[12px] transition-colors enabled:hover:text-foreground disabled:opacity-80" disabled={pending || !editable || Boolean(draft) || !detail || !timeKinds.includes(detail.trigger_type)} onClick={() => { setEditing({ ...member, trigger: detail?.trigger }); setSchedule(null); }}><span>{sentenceOf(detail?.trigger ?? member.trigger)}</span></button>- {detail?.due_at_ns && detail.state === "scheduled" ? <p className="text-xs text-muted-foreground">{t("society.card.next_run")}: {new Date(detail.due_at_ns / 1e6).toLocaleString(locale, { timeZoneName: "short" })}</p> : null}+ {detail?.due_at_ns && detail.state === "scheduled" ? <p className="text-xs text-muted-foreground" title={new Date(detail.due_at_ns / 1e6).toLocaleString(locale, { timeZoneName: "short" })}>{t("society.card.next_run")}: {calmMoment(detail.due_at_ns / 1e6, now, locale)}</p> : null}{detail && <div>{renderConnection(detail)}</div>}{index > 0 && <button className="text-xs text-muted-foreground hover:text-foreground" disabled={pending || !editable || Boolean(draft)} onClick={() => void act(async () => { await cancelTask(member.id); })}>{label("remove_schedule")}</button>}</div>;diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentRoutineDetailSeat.test.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentRoutineDetailSeat.test.tsxindex 1fcbf48a51..6106b40c59 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentRoutineDetailSeat.test.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentRoutineDetailSeat.test.tsx@@ -59,7 +59,8 @@ test("the pinned seat is shown and can follow the agent again", async () => {const { fetcher } = setup();await waitFor(() => expect((screen.getByLabelText("Name") as HTMLInputElement).disabled).toBe(false));// The pin is visible without any catalog fetch.- expect(screen.getByText("claude-api · opus")).toBeTruthy();+ // The pinned model reads as a name, not as "provider · model-id".+ expect(screen.getByText("Opus")).toBeTruthy();expect(fetcher.mock.calls.some(([url]) => String(url).includes("agent-chat"))).toBe(false);// The explicit control clears the pin without depending on catalog readiness.fireEvent.click(screen.getByText("Change"));diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.test.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.test.tsxindex 46525deaff..059c211ce0 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.test.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.test.tsx@@ -122,6 +122,9 @@ describe("AgentRoutinesList", () => {fireEvent.click(await screen.findByTestId("agent-routines-add"));fireEvent.change(screen.getByPlaceholderText("Title"), { target: { value: "X marketing" } });fireEvent.change(screen.getByPlaceholderText("What to do"), { target: { value: "Draft the post." } });+ // The schedule in plain words; the sentence it became shows before saving.+ fireEvent.change(screen.getByTestId("agent-routines-when"), { target: { value: "every 5 hours" } });+ expect(screen.getByTestId("agent-routines-when-preview").textContent).toBe("Every 5 hours");fireEvent.click(screen.getByText("Add"));await waitFor(() => {@@ -132,7 +135,7 @@ describe("AgentRoutinesList", () => {const body = JSON.parse(String(post?.[1]?.body));expect(body.title).toBe("X marketing");expect(body.prompt).toBe("Draft the post.");- expect(body.schedule.type).toBe("every");+ expect(body.schedule).toEqual({ type: "every", interval_seconds: 18_000 });});await waitFor(() => expect(screen.getByTestId("agent-routines").textContent).toContain("X marketing"));@@ -142,8 +145,9 @@ describe("AgentRoutinesList", () => {fireEvent.click(await screen.findByTestId("agent-routines-add"));fireEvent.change(screen.getByPlaceholderText("Title"), { target: { value: "Customer event" } });fireEvent.change(screen.getByPlaceholderText("What to do"), { target: { value: "Summarize the new customer." } });+ fireEvent.click(screen.getByTestId("agent-routines-more"));fireEvent.click(screen.getByTestId("routine-trigger-group"));- fireEvent.click(await screen.findByRole("option", { name: "API" }));+ fireEvent.click(await screen.findByRole("option", { name: "From another app" }));fireEvent.change(screen.getByLabelText("Payload filters (JSON field equality)"), { target: { value: '{"customer.vip":true}' } });fireEvent.click(screen.getByText("Add"));await waitFor(() => {diff --git a/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.tsx b/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.tsxindex 61393eeb9d..b1d5d0f121 100644--- a/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/AgentRoutinesList.tsx@@ -19,6 +19,8 @@ import { AwaySetting } from "./routines/AwaySetting";import { markRoutinesSeen, useRoutineActivity, useRoutineRefresh } from "./routines/routinesApi";import { seedAgentComposer } from "./routines/editThroughChat";import { useNow } from "./routines/useNow";+import { humanSchedule } from "./routines/humanSchedule";+import { parseScheduleText } from "./routines/scheduleText";export interface AgentRoutinesListProps { agentId: string; sampleRoutines?: AgentRoutine[]; variant?: "rail" | "sheet"; className?: string; onDetailOpenChange?: (open: boolean) => void; }export function AgentRoutinesList({ agentId, sampleRoutines, variant = "rail", className, onDetailOpenChange }: AgentRoutinesListProps) {@@ -32,7 +34,12 @@ export function AgentRoutinesList({ agentId, sampleRoutines, variant = "rail", cconst { agent } = useSocietyAgent(agentId);const now = useNow();const [open, setOpen] = useState(false); const [title, setTitle] = useState("");- const [prompt, setPrompt] = useState(""); const [schedule, setSchedule] = useState<Record<string, unknown> | null>(null);+ const [prompt, setPrompt] = useState(""); const [built, setBuilt] = useState<Record<string, unknown> | null>(null);+ // The schedule in plain words ("every weekday at 7"); the detailed editor waits under "More options".+ const [when, setWhen] = useState(""); const [more, setMore] = useState(false);+ const typed = useMemo(() => (when.trim() ? parseScheduleText(when) : null), [when]);+ // The detailed editor replaces the words while it is open; closing it brings them back.+ const schedule: Record<string, unknown> | null = more ? built : typed;const [saving, setSaving] = useState(false); const [error, setError] = useState("");const [selected, setSelected] = useState<string | null>(null);const sample = useMemo(() => (sampleRoutines ?? []).map((row) => ({ id: row.id, title: row.label, state: "scheduled", trigger: null, schedule: row.schedule, dueMs: row.nextFire ? Date.parse(row.nextFire) : null, lastRunMs: null })), [sampleRoutines]);@@ -51,7 +58,7 @@ export function AgentRoutinesList({ agentId, sampleRoutines, variant = "rail", cconst submit = async () => {if (!title.trim() || !prompt.trim() || !schedule) return;setSaving(true); setError("");- try { await create(agentId, { title: title.trim(), prompt: prompt.trim(), schedule }); setTitle(""); setPrompt(""); setOpen(false); }+ try { await create(agentId, { title: title.trim(), prompt: prompt.trim(), schedule }); setTitle(""); setPrompt(""); setWhen(""); setMore(false); setOpen(false); }catch (err) { setError(err instanceof Error ? err.message : String(err)); }finally { setSaving(false); }};@@ -72,7 +79,18 @@ export function AgentRoutinesList({ agentId, sampleRoutines, variant = "rail", c{open && <form className="mb-3 space-y-2 rounded-xl border border-border bg-card p-2.5 shadow-[0_1px_2px_rgb(var(--scrim-rgb)/0.05),0_4px_12px_-6px_rgb(var(--scrim-rgb)/0.12)]" data-testid="agent-routines-composer" onSubmit={(e) => { e.preventDefault(); void submit(); }}><input className={field} aria-label={t("society.card.routines_title")} placeholder={t("society.card.routines_title")} value={title} onChange={(e) => setTitle(e.target.value)} /><textarea className={cn(field, "resize-y leading-snug")} aria-label={t("society.card.routines_prompt")} placeholder={t("society.card.routines_prompt")} value={prompt} onChange={(e) => setPrompt(e.target.value)} rows={3} />- <TriggerBuilder onChange={setSchedule} />+ {!more && <label className="block space-y-1 text-[12px] text-muted-foreground">+ <span>{own("when_label")}</span>+ <input className={field} aria-label={own("when_label")} placeholder={own("when_placeholder")} value={when}+ onChange={(e) => setWhen(e.target.value)} data-testid="agent-routines-when" />+ </label>}+ {!more && when.trim() ? <p aria-live="polite" data-testid="agent-routines-when-preview"+ className={cn("text-[12px] leading-snug", typed ? "text-foreground-secondary" : "text-muted-foreground")}>+ {typed ? humanSchedule(typed, { t, locale }) : own("when_unclear")}+ </p> : null}+ <button type="button" className="text-[12px] text-muted-foreground underline-offset-2 hover:text-foreground hover:underline" aria-expanded={more}+ onClick={() => setMore((v) => !v)} data-testid="agent-routines-more">{own(more ? "fewer_options" : "more_options")}</button>+ {more ? <TriggerBuilder onChange={setBuilt} /> : null}<div className="flex items-center justify-between gap-2 pt-0.5">{!isSample ? <button type="button" className="text-[12px] text-muted-foreground underline-offset-2 hover:text-foreground hover:underline" onClick={() => { setOpen(false); setUpInChat(); }}>{own("or_chat")}</button> : <span />}<button type="submit" disabled={saving || !title.trim() || !prompt.trim() || !schedule} className="rounded-full bg-foreground px-3.5 py-1.5 text-[13px] font-medium text-background transition-colors hover:bg-foreground/90 disabled:opacity-40">{t(saving ? "society.card.saving" : "society.card.routines_save")}</button>diff --git a/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.test.tsx b/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.test.tsxindex 2401165634..96a54e15cd 100644--- a/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.test.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.test.tsx@@ -122,7 +122,7 @@ describe("OptionsRail (agent pane)", () => {if (path.includes("/review-queue")) return json({ items: [], total: 0, counts: { proposal: 0, memory_share: 0, memory: 0 } });if (path.includes("/knowledge")) {return json({ files: [{ path: "memory/USER.md", name: "USER.md", kind: "memory", updated_ms: 1, size: 10 }],- learned_instructions: ["Sign off with the user's first name."], reviews: { pending: 0, done: 1 }, last_review: null });+ learned_instructions: ["Sign off with the user's first name."], applied_rules: ["Answer in English."], reviews: { pending: 0, done: 1 }, last_review: null });}if (path.includes("/skills")) return json({ skills: [{ slug: "triage", name: "Inbox triage", when_to_use: "A full inbox." }] });if (path.includes("/capabilities")) {@@ -218,6 +218,15 @@ describe("OptionsRail (agent pane)", () => {expect(screen.getByTestId("agent-pane-tab-tasks").getAttribute("data-state")).toBe("active");});+ test("a plain click selects a tab, as element.click() and assistive tech send it", async () => {+ mount(agent());+ // No pointer-down first: only the click event a keyboard or a script sends.+ screen.getByTestId("agent-pane-tab-memory").click();+ await waitFor(() => expect(screen.getByTestId("agent-pane-tab-memory").getAttribute("data-state")).toBe("active"));+ screen.getByTestId("agent-pane-tab-tasks").click();+ await waitFor(() => expect(screen.getByTestId("agent-routines").textContent).toContain("Inbox sweep"));+ });+test("folding the pane keeps routine and chat drafts", async () => {window.localStorage.setItem("society.agentPane.tab", "tasks");window.localStorage.setItem("society.shell.layout.v2", JSON.stringify({ paneOpen: true }));@@ -274,8 +283,12 @@ describe("OptionsRail (agent pane)", () => {window.localStorage.setItem("society.agentPane.tab", "memory");writeComposerDraft(useSocietyChatStore, "society:gamil-agent", { text: "", choices: [] });mount(agent());- await screen.findByTestId("agent-pane-review-proposal:p1");+ const proposal = await screen.findByTestId("agent-pane-review-proposal:p1");+ // The proposal is said once: the diff line repeating the headline is not drawn again.+ expect(proposal.textContent?.split("Reply within a day.").length).toBe(2);expect(screen.getByTestId("agent-pane-review-memory:7").textContent).toContain("The user prefers short replies.");+ // An applied standing rule shows among the learned working instructions.+ await waitFor(() => expect(screen.getByTestId("agent-pane-memory").textContent).toContain("Answer in English."));fireEvent.click(screen.getByTestId("agent-pane-review-approve-proposal:p1"));await waitFor(() => {diff --git a/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.tsx b/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.tsxindex 8f0334bb43..fdd13f5181 100644--- a/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/OptionsRail.tsx@@ -120,7 +120,9 @@ export function OptionsRail({ agent, onRetired, sample = false, width, onModelSa<Tabs.Root value={tab} onValueChange={(value) => choose(value as PaneTab)} className="flex min-h-0 flex-1 flex-col"><Tabs.List className="ap-tabs" aria-label={t("society.agent_pane.tabs")}>{PRIMARY_TABS.map((id) => (- <Tabs.Trigger key={id} value={id} className="ap-tab" data-testid={`agent-pane-tab-${id}`}>+ // Radix selects on pointer-down; a plain click (keyboard activation, element.click()) selects too.+ <Tabs.Trigger key={id} value={id} className="ap-tab" data-testid={`agent-pane-tab-${id}`}+ onClick={() => { if (id !== tab) choose(id); }}>{tabLabel(id)}{id === "memory" && pending > 0 ? <span className="ap-tab-badge" aria-hidden /> : null}</Tabs.Trigger>diff --git a/dodaios/ui/web/frontend/src/components/society/card/RoutineSeatPicker.tsx b/dodaios/ui/web/frontend/src/components/society/card/RoutineSeatPicker.tsxindex 3ea41f10d3..4369edf6ae 100644--- a/dodaios/ui/web/frontend/src/components/society/card/RoutineSeatPicker.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/RoutineSeatPicker.tsx@@ -15,6 +15,32 @@ export interface RoutineSeat {export const EMPTY_SEAT: RoutineSeat = { provider: "", model: "", effort: "", account_id: "" };+const UPPER_WORDS = new Set(["gpt", "glm", "ai", "api", "llm", "oss"]);++/** A model id as a name, when the catalog has none: "claude-sonnet-5-5" -> "Claude Sonnet 5.5". */+export function prettyModelId(id: string): string {+ const tail = id.split("/").pop() ?? id;+ const parts: string[] = [];+ for (const token of tail.split(/[-_\s]+/).filter(Boolean)) {+ const last = parts[parts.length - 1];+ if (/^\d{1,2}$/.test(token) && last && /^\d{1,2}(?:\.\d{1,2})*$/.test(last)) parts[parts.length - 1] = `${last}.${token}`;+ else parts.push(UPPER_WORDS.has(token.toLowerCase()) ? token.toUpperCase() : /^\d/.test(token) ? token : token.charAt(0).toUpperCase() + token.slice(1));+ }+ return parts.join(" ") || id;+}++/** The seat as a person names it: the model's catalog name (else a tidy id), then its effort. */+export function useSeatLabel(seat: RoutineSeat): string {+ const catalog = useAgentChat((state) => state.catalog);+ if (!seat.provider) return "";+ const providers = Array.isArray(catalog?.providers) ? catalog.providers : [];+ const provider = providers.find((row) => row.id === seat.provider);+ const model = seat.model+ ? provider?.curated_models?.find((row) => row.id === seat.model)?.label || prettyModelId(seat.model)+ : provider?.label || prettyModelId(seat.provider);+ return seat.effort ? `${model} · ${seat.effort}` : model;+}+const field = "w-full rounded-lg border border-border bg-background px-3 py-2 text-[12px] text-foreground";const miniLabel = "block space-y-1 text-xs text-muted-foreground";diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/MemoryTab.tsx b/dodaios/ui/web/frontend/src/components/society/card/pane/MemoryTab.tsxindex 4eea3f95c2..27ec3e5f5b 100644--- a/dodaios/ui/web/frontend/src/components/society/card/pane/MemoryTab.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/MemoryTab.tsx@@ -6,7 +6,7 @@* the agent can walk the person through the list in conversation instead.*/import { useState } from "react";-import { Check, MessageSquare, X } from "lucide-react";+import { Check, X } from "lucide-react";import { useRunLocale } from "@/components/runs/format";import { useLocaleChunk, useT } from "@/i18n";@@ -19,8 +19,19 @@ import { useDecideReviewItem, type ReviewItem, type ReviewQueue } from "./reviewimport { seedAgentComposer } from "./seedComposer";import { AnatomyRow, PaneHint, PaneSection } from "./ui";-/** Preview lines shown before the item is opened. */-const PREVIEW_LINES = 3;+/** A diff line's words, without its "+ " / "- " mark. */+function lineText(line: string): string {+ return line.replace(/^[+-]\s?/, "").trim();+}++/** The diff lines that add something the headline does not already say. */+function newLines(preview: readonly string[], headline: string): string[] {+ const said = headline.toLowerCase();+ return preview.filter((line) => {+ const text = lineText(line).toLowerCase();+ return text && !(said && said.includes(text));+ });+}export function MemoryTab({agent,@@ -42,7 +53,8 @@ export function MemoryTab({const [seeded, setSeeded] = useState(false);const items = queue?.items ?? [];const files = knowledge.data?.files ?? [];- const rules = knowledge.data?.learned_instructions ?? [];+ // Rules it learned on its own, then standing rules the person applied from a proposal.+ const rules = [...new Set([...(knowledge.data?.learned_instructions ?? []), ...(knowledge.data?.applied_rules ?? [])])];const reviewInChat = () => {setSeeded(seedAgentComposer(agent, t("society.agent_pane.review_chat_seed")));@@ -56,14 +68,6 @@ export function MemoryTab({? t("society.agent_pane.review_title_count").replace("{0}", String(queue?.total ?? items.length)): t("society.agent_pane.review_title")}- action={- items.length ? (- <button type="button" className="ap-link" onClick={reviewInChat} data-testid="agent-pane-review-in-chat">- <MessageSquare className="h-3 w-3" aria-hidden />- {t("society.agent_pane.review_in_chat")}- </button>- ) : null- }testId="agent-pane-review">{seeded ? <PaneHint>{t("society.agent_pane.review_seeded")}</PaneHint> : null}@@ -78,6 +82,10 @@ export function MemoryTab({{items.map((item) => (<ReviewRow key={item.id} agentId={agent.agentId} item={item} />))}+ {/* Under the cards, not beside the heading: the count in the heading always fits. */}+ <button type="button" className="ap-link self-start" onClick={reviewInChat} data-testid="agent-pane-review-in-chat">+ {t("society.agent_pane.review_in_chat")}+ </button></div>)}</PaneSection>@@ -166,7 +174,10 @@ function ReviewRow({ agentId, item }: { agentId: string; item: ReviewItem }) {item.kind === "proposal" ? t("society.agent_pane.apply") : item.kind === "memory_share" ? t("society.agent_pane.share") : t("society.agent_pane.keep");const rejectLabel =item.kind === "proposal" ? t("society.agent_pane.reject") : item.kind === "memory_share" ? t("society.agent_pane.keep_private") : t("society.agent_pane.forget");- const lines = open ? item.preview : item.preview.slice(0, PREVIEW_LINES);+ // The proposal is said once: its headline, then only what the diff adds, one line until opened.+ const headline = item.kind === "proposal" ? item.summary : "";+ const extra = newLines(item.preview, headline);+ const lines = open ? extra : extra.slice(0, 1);const run = async (approve: boolean) => {setBusy(true);@@ -189,23 +200,19 @@ function ReviewRow({ agentId, item }: { agentId: string; item: ReviewItem }) {</time>) : null}</div>- {item.kind === "proposal" ? <p className="ap-review-text">{item.summary}</p> : null}+ {headline ? <p className="ap-review-text">{headline}</p> : null}{lines.length ? (- <button- type="button"- className="ap-diff text-left"- data-open={open ? "true" : undefined}- aria-expanded={item.preview.length > PREVIEW_LINES ? open : undefined}- onClick={() => setOpen((v) => !v)}- >+ <div className="ap-review-lines">{lines.map((line, i) => (- <span key={i} data-op={line.startsWith("+") ? "+" : line.startsWith("-") ? "-" : " "}>- {line}- </span>+ <p key={i} className="ap-review-line" data-op={line.startsWith("+") ? "+" : line.startsWith("-") ? "-" : " "}>+ {lineText(line)}+ </p>))}- {!open && item.preview.length > PREVIEW_LINES ? (- <span>{t("society.agent_pane.more_lines").replace("{0}", String(item.preview.length - PREVIEW_LINES))}</span>- ) : null}+ </div>+ ) : null}+ {extra.length > 1 ? (+ <button type="button" className="ap-link self-start" aria-expanded={open} onClick={() => setOpen((v) => !v)}>+ {open ? t("society.agent_pane.show_less") : t("society.agent_pane.more_lines").replace("{0}", String(extra.length - 1))}</button>) : null}{item.reason ? <p className="ap-hint">{item.reason}</p> : null}diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/OverviewTab.tsx b/dodaios/ui/web/frontend/src/components/society/card/pane/OverviewTab.tsxindex d60934c7a8..2d30d8c509 100644--- a/dodaios/ui/web/frontend/src/components/society/card/pane/OverviewTab.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/OverviewTab.tsx@@ -13,6 +13,7 @@ import { useRunLocale } from "@/components/runs/format";import { Switch } from "@/components/ui/switch";import { useLocaleChunk, useT } from "@/i18n";import { setTaskEnabled } from "@/lib/tasksApi";+import { stripInlineMarks } from "@/lib/plainMarks";import { resolveToolBrand } from "@/lib/toolBrand";import { useAgentChatStore } from "@/store/agentChat";@@ -26,6 +27,19 @@ import { useDismissedSuggestions, type PanePage, type PaneTab } from "./paneStatimport type { ReviewQueue } from "./reviewQueue";import { AnatomyRow, PaneHint, PaneSection } from "./ui";+/**+ * The instructions as lines a person reads: a Markdown heading ("## How you+ * work") reads as its words in bold, inline marks drop, blank lines keep+ * their space.+ */+function instructionLines(text: string): { text: string; heading: boolean }[] {+ return text.replace(/\r\n?/g, "\n").split("\n").map((raw) => {+ const heading = /^\s{0,3}#{1,6}\s+/.test(raw);+ const words = stripInlineMarks(raw.replace(/^\s{0,3}#{1,6}\s+/, "").replace(/\s+#+\s*$/, ""));+ return { text: words, heading: heading && Boolean(words.trim()) };+ });+}+/** More lines than this and the instructions preview fades into "open to read all". */const PREVIEW_LINES = 5;const MAX_SUGGESTIONS = 3;@@ -156,11 +170,14 @@ export function OverviewTab({ agent, sample, queue, onTab, onPage, onModelSavingtype="button"className="ap-instructions text-left"data-long={long && !expanded ? "true" : undefined}- style={expanded ? { maxHeight: "none" } : undefined}onClick={() => setExpanded((v) => !v)}aria-expanded={expanded}>- {agent.description}+ <span className="ap-instructions-text">+ {instructionLines(agent.description).map((line, i) => (+ <span key={i} className="ap-instructions-line" data-heading={line.heading || undefined}>{line.text}</span>+ ))}+ </span></button>) : (<PaneHint>{t("society.agent_pane.instructions_empty")}</PaneHint>diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/agentPane.css b/dodaios/ui/web/frontend/src/components/society/card/pane/agentPane.cssindex bb67aa4401..26441bba51 100644--- a/dodaios/ui/web/frontend/src/components/society/card/pane/agentPane.css+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/agentPane.css@@ -265,6 +265,10 @@padding: 0 4px;}.ap-section-title {+ min-width: 0;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;font-size: 13px;font-weight: 500;color: hsl(var(--muted-foreground));@@ -280,6 +284,8 @@.ap-link {display: inline-flex;+ flex-shrink: 0;+ white-space: nowrap;align-items: center;gap: 4px;border-radius: 999px;@@ -374,25 +380,28 @@ button.ap-line:disabled { opacity: 0.55; }.ap-inline-empty { color: hsl(var(--muted-foreground)); }.ap-instructions {- position: relative;- max-height: 7.4em;- overflow: hidden;+ display: block;+ width: 100%;border-radius: var(--ap-radius-lg);background: hsl(var(--card));box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.55);padding: 12px 14px;- white-space: pre-line;font-size: 14px;line-height: 1.5;color: hsl(var(--foreground));}-.ap-instructions[data-long="true"]::after {- content: "";- position: absolute;- inset: auto 0 0 0;- height: 2.4em;- background: linear-gradient(to bottom, transparent, hsl(var(--card)));+/* Whole lines only: the box holds exactly five, and the last one fades out instead of being cut. */+.ap-instructions-text {+ display: block;+ overflow: hidden;}+.ap-instructions[data-long="true"] .ap-instructions-text {+ max-height: 7.5em;+ -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.6em), transparent);+ mask-image: linear-gradient(to bottom, #000 calc(100% - 1.6em), transparent);+}+.ap-instructions-line { display: block; min-height: 1.5em; overflow-wrap: anywhere; }+.ap-instructions-line[data-heading="true"] { font-weight: 600; }/* ------------------------------------------------------------- text rows */@@ -782,6 +791,19 @@ textarea.ap-input { height: auto; border-radius: 16px; padding: 10px 14px; line-line-height: 1.4;color: hsl(var(--foreground));}+/* What a proposal adds, in reading type: one wrapped line, marked by a soft tint. */+.ap-review-lines { display: flex; flex-direction: column; gap: 2px; }+.ap-review-line {+ margin: 0;+ border-radius: var(--ap-radius-sm);+ padding: 3px 8px;+ font-size: 13px;+ line-height: 1.45;+ overflow-wrap: anywhere;+ color: hsl(var(--foreground-secondary, var(--muted-foreground)));+}+.ap-review-line[data-op="+"] { background: hsl(var(--diff-add-bg) / 0.14); color: hsl(var(--diff-add)); }+.ap-review-line[data-op="-"] { background: hsl(var(--diff-del-bg) / 0.14); color: hsl(var(--diff-del)); text-decoration: line-through; }.ap-diff {display: flex;flex-direction: column;diff --git a/dodaios/ui/web/frontend/src/components/society/card/pane/reviewQueue.ts b/dodaios/ui/web/frontend/src/components/society/card/pane/reviewQueue.tsindex 3ff6b3f2ef..848b669b8b 100644--- a/dodaios/ui/web/frontend/src/components/society/card/pane/reviewQueue.ts+++ b/dodaios/ui/web/frontend/src/components/society/card/pane/reviewQueue.ts@@ -6,6 +6,7 @@import { useCallback } from "react";import { useQuery, useQueryClient } from "@tanstack/react-query";+import { markAnswered } from "../../attention/attentionStore";import { requestError } from "../../data";export type ReviewItemKind = "proposal" | "memory_share" | "memory";@@ -77,6 +78,10 @@ export function useDecideReviewItem(agentId: string) {if (!res.ok) {throw requestError((await res.json().catch(() => null)) as { detail?: unknown } | null, `HTTP ${res.status}`);}+ // The roster and the chat header stop asking for it at once.+ markAnswered(item.id);+ // The roster names a proposal by its bare id ("proposal:p1" -> "p1").+ markAnswered(item.id.replace(/^[a-z_]+:/, ""));return (await res.json()) as ReviewOutcome;} catch (err) {if (before) client.setQueryData(key, before);diff --git a/dodaios/ui/web/frontend/src/components/society/card/routines/RoutineRow.tsx b/dodaios/ui/web/frontend/src/components/society/card/routines/RoutineRow.tsxindex 7b3fbe7b56..654b0cad10 100644--- a/dodaios/ui/web/frontend/src/components/society/card/routines/RoutineRow.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/routines/RoutineRow.tsx@@ -55,7 +55,8 @@ export function RoutineRow({ routine, lastRun, parked, locale, now, onOpen, onCh} catch (err) { setProblem(err instanceof Error ? err.message : String(err)); }finally { setBusy(null); onChanged(); }};- const cost = formatCost(lastRun?.cost_usd, locale);+ // A subscription run bills nothing: no dollar figure beside "$0.00 spent".+ const cost = lastRun?.billed_via_key === false ? "" : formatCost(lastRun?.cost_usd, locale);const lastAt = lastRun?.finished_ms ?? lastRun?.started_ms ?? null;const tool = "rounded-full p-1.5 text-muted-foreground transition-colors duration-150 hover:bg-background hover:text-foreground focus-visible:outline focus-visible:outline-1 focus-visible:outline-ring disabled:opacity-40";return <li className="group relative">diff --git a/dodaios/ui/web/frontend/src/components/society/card/routines/RunHistory.tsx b/dodaios/ui/web/frontend/src/components/society/card/routines/RunHistory.tsxindex e88bf9337a..89d70e612c 100644--- a/dodaios/ui/web/frontend/src/components/society/card/routines/RunHistory.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/routines/RunHistory.tsx@@ -59,29 +59,23 @@ export function RunHistory({ runs, ready, locale, onOpen }: {const reason = runReason(t, run);const elapsed = run.status === "running" && run.startedMs ? Math.max(0, now - run.startedMs) : undefined;const duration = formatDuration(elapsed ?? run.durationMs);- const cost = formatCost(run.costUsd, locale);+ // A subscription run bills nothing: no dollar figure beside "$0.00 spent".+ const cost = run.billedViaKey === false ? "" : formatCost(run.costUsd, locale);const at = new Date(run.timestamp);+ const meta = [run.origin === "manual" ? own("manual") : "", duration, cost].filter(Boolean);return <li key={run.id}><button type="button" data-testid={`routine-run-${run.id}`}aria-label={`${label("open_chat")} · ${at.toLocaleString(locale)} · ${state}`}onClick={() => onOpen(run)}- className="group flex w-full cursor-pointer items-start gap-2.5 px-3 py-2 text-left transition-colors duration-150 hover:bg-secondary/60 focus-visible:bg-secondary/60 focus-visible:outline-none">- <RunStatusIcon status={run.status} label={state} className="mt-[1px]" />- <span className="min-w-0 flex-1">- <span className="flex items-baseline gap-2">- <time dateTime={at.toISOString()} title={at.toLocaleString(locale)} className="text-[12px] font-medium text-foreground">{shortDateTime(run.timestamp, now, locale)}</time>- {run.origin === "manual" && <span className="rounded-full border border-border px-1.5 text-xs leading-4 text-muted-foreground">{own("manual")}</span>}- <span className="ml-auto flex shrink-0 items-baseline gap-1.5 text-xs tabular-nums text-muted-foreground">- {duration && <span>{duration}</span>}- {duration && cost && <span aria-hidden className="text-faint-foreground">·</span>}- {cost && <span title={run.billedViaKey === false ? own("included") : undefined}>{cost}</span>}- </span>- </span>- {reason && <span data-testid={run.status === "skipped" ? "routine-run-skip-reason" : undefined}- className={cn("mt-0.5 block truncate text-xs leading-snug", run.status === "failed" ? "text-destructive/90" : "text-muted-foreground")}- title={reason}>{reason}</span>}- </span>- <ChevronRight size={14} aria-hidden className="mt-0.5 shrink-0 text-faint-foreground opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100" />+ className="group flex w-full min-w-0 cursor-pointer items-center gap-2.5 px-3 py-2 text-left transition-colors duration-150 hover:bg-secondary/60 focus-visible:bg-secondary/60 focus-visible:outline-none">+ <RunStatusIcon status={run.status} label={state} />+ {/* One line: when, what it said, then how it started, how long and what it cost. */}+ <time dateTime={at.toISOString()} title={at.toLocaleString(locale)} className="shrink-0 whitespace-nowrap text-[13px] font-medium tabular-nums text-foreground">{shortDateTime(run.timestamp, now, locale)}</time>+ <span data-testid={run.status === "skipped" ? "routine-run-skip-reason" : undefined}+ className={cn("min-w-0 flex-1 truncate text-[13px] leading-snug", run.status === "failed" ? "text-destructive/90" : "text-muted-foreground")}+ title={reason || undefined}>{reason}</span>+ {meta.length > 0 && <span className="shrink-0 whitespace-nowrap text-[12px] tabular-nums text-muted-foreground" data-testid="routine-run-meta">{meta.join(" · ")}</span>}+ <ChevronRight size={14} aria-hidden className="shrink-0 text-faint-foreground opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100" /></button></li>;})}diff --git a/dodaios/ui/web/frontend/src/components/society/card/routines/format.ts b/dodaios/ui/web/frontend/src/components/society/card/routines/format.tsindex 9175785c12..024fc8aa52 100644--- a/dodaios/ui/web/frontend/src/components/society/card/routines/format.ts+++ b/dodaios/ui/web/frontend/src/components/society/card/routines/format.ts@@ -32,6 +32,16 @@ export function shortDateTime(atMs: number, nowMs: number, locale: string): strireturn `${day}, ${time}`;}+/** "in 5 days · Mon, Nov 2, 07:00": when, in words, then the local day and time. */+export function calmMoment(atMs: number, nowMs: number, locale: string): string {+ const at = new Date(atMs);+ const day = Math.abs(atMs - nowMs) < 6 * 86_400_000+ ? at.toLocaleDateString(locale, { weekday: "long" })+ : at.toLocaleDateString(locale, { weekday: "short", day: "numeric", month: "short" });+ const time = at.toLocaleTimeString(locale, { hour: "2-digit", minute: "2-digit" });+ return `${relativeTime(atMs, nowMs, locale)} · ${day}, ${time}`;+}+/** "850 ms", "42 s", "3 min 5 s", "1 h 4 min". */export function formatDuration(ms: number | null | undefined): string {if (ms === null || ms === undefined || !Number.isFinite(ms) || ms < 0) return "";diff --git a/dodaios/ui/web/frontend/src/components/society/card/routines/routines.test.tsx b/dodaios/ui/web/frontend/src/components/society/card/routines/routines.test.tsxindex 22510cbad5..2cfba8e3f7 100644--- a/dodaios/ui/web/frontend/src/components/society/card/routines/routines.test.tsx+++ b/dodaios/ui/web/frontend/src/components/society/card/routines/routines.test.tsx@@ -64,7 +64,7 @@ describe("routine list", () => {}test("rows read as sentences with the last result and its cost, and looking is recorded", async () => {- mountList({ last_runs: { r1: runRow({}), r2: runRow({ id: "r2:9", task_id: "r2", status: "failed", error: "RuntimeError: seat offline", cost_usd: null }) }, parking: null });+ mountList({ last_runs: { r1: runRow({ billed_via_key: true }), r2: runRow({ id: "r2:9", task_id: "r2", status: "failed", error: "RuntimeError: seat offline", cost_usd: null }) }, parking: null });const row = (await screen.findByRole("button", { name: "Inbox digest" })).closest("li")!;expect(row.textContent).toMatch(/Weekdays at 07:30( AM)?/);await waitFor(() => expect(row.textContent).toContain("$0.042"));@@ -76,6 +76,13 @@ describe("routine list", () => {expect(fetchMock.mock.calls.some(([url, init]) => String(url).endsWith("/routines-seen") && init?.method === "POST")).toBe(true);});+ test("a run on a subscription shows no price: the plan already covers it", async () => {+ mountList({ last_runs: { r1: runRow({ billed_via_key: false }) }, parking: null });+ const row = (await screen.findByRole("button", { name: "Inbox digest" })).closest("li")!;+ await waitFor(() => expect(row.textContent).toMatch(/next_run: in 3 hours/));+ expect(row.textContent).not.toContain("$");+ });+test("a parked agent shows the note once, and Resume answers it", async () => {mountList({ last_runs: {}, parking: { enabled: true, days: 7, banner: true, parked_ids: ["r2"], parked_ms: 1, parked_days: 7, unread: 5, never_ask: false } });const banner = await screen.findByTestId("routine-parking-banner");diff --git a/dodaios/ui/web/frontend/src/components/society/card/routines/scheduleText.test.ts b/dodaios/ui/web/frontend/src/components/society/card/routines/scheduleText.test.tsnew file mode 100644index 0000000000..19f9006b60--- /dev/null+++ b/dodaios/ui/web/frontend/src/components/society/card/routines/scheduleText.test.ts@@ -0,0 +1,38 @@+import { describe, expect, it } from "vitest";+import { parseScheduleText } from "./scheduleText";++const ZONE = "Europe/Berlin";+const parse = (text: string) => parseScheduleText(text, ZONE);++describe("a schedule typed in plain words", () => {+ it("reads weekdays, single days and every day at a clock time", () => {+ expect(parse("every weekday at 7")).toEqual({ type: "calendar", local_time: "07:00", timezone: ZONE, weekdays: [0, 1, 2, 3, 4] });+ expect(parse("Every Monday at 9am")).toEqual({ type: "calendar", local_time: "09:00", timezone: ZONE, weekdays: [0] });+ expect(parse("tuesdays and thursdays 18:30")).toEqual({ type: "calendar", local_time: "18:30", timezone: ZONE, weekdays: [1, 3] });+ expect(parse("daily at 8:15")).toEqual({ type: "calendar", local_time: "08:15", timezone: ZONE });+ expect(parse("at 7 in the evening")).toEqual({ type: "calendar", local_time: "19:00", timezone: ZONE });+ expect(parse("weekends at noon")).toEqual({ type: "calendar", local_time: "12:00", timezone: ZONE, weekdays: [5, 6] });+ });++ it("reads intervals", () => {+ expect(parse("every 2 hours")).toEqual({ type: "every", interval_seconds: 7_200 });+ expect(parse("every 30 minutes")).toEqual({ type: "every", interval_seconds: 1_800 });+ expect(parse("hourly")).toEqual({ type: "every", interval_seconds: 3_600 });+ });++ it("reads the other UI languages' common shapes", () => {+ expect(parse("jeden Werktag um 7")).toEqual({ type: "calendar", local_time: "07:00", timezone: ZONE, weekdays: [0, 1, 2, 3, 4] }); // i18n-allow: input vocabulary+ expect(parse("alle 3 Stunden")).toEqual({ type: "every", interval_seconds: 10_800 }); // i18n-allow: input vocabulary+ expect(parse("cada lunes a las 9")).toEqual({ type: "calendar", local_time: "09:00", timezone: ZONE, weekdays: [0] }); // i18n-allow: input vocabulary+ expect(parse("am Montag um 7 abends")).toEqual({ type: "calendar", local_time: "19:00", timezone: ZONE, weekdays: [0] }); // i18n-allow: input vocabulary+ });++ it("does not guess when the words name no clear time", () => {+ expect(parse("")).toBeNull();+ expect(parse("every Monday")).toBeNull();+ expect(parse("when the inbox is full")).toBeNull();+ expect(parse("at 25:00")).toBeNull();+ // Past what the scheduler takes (one year).+ expect(parse("every 400 days")).toBeNull();+ });+});diff --git a/dodaios/ui/web/frontend/src/components/society/card/routines/scheduleText.ts b/dodaios/ui/web/frontend/src/components/society/card/routines/scheduleText.tsnew file mode 100644index 0000000000..65b1ad507d--- /dev/null+++ b/dodaios/ui/web/frontend/src/components/society/card/routines/scheduleText.ts@@ -0,0 +1,87 @@+/**+ * A schedule typed in plain words ("every weekday at 7", "every 2 hours",+ * "jeden Montag um 9") as the trigger the scheduler stores+ * (`dodaios/tasks/schema.py`): `calendar` with a local time, the reader's+ * zone and optional weekdays (0 = Monday), or `every` with an interval.+ * Returns null when the words do not name a schedule clearly; the form then+ * offers the detailed editor or the chat instead of guessing.+ *+ * The vocabulary covers the UI languages (English, German, Spanish,+ * Portuguese) for the common shapes only; anything else goes to the chat.+ */++export type ScheduleTrigger =+ | { type: "calendar"; local_time: string; timezone: string; weekdays?: number[] }+ | { type: "every"; interval_seconds: number };++const DAY_WORDS: [RegExp, number][] = [+ [/\b(?:mon(?:day)?s?|montags?|lunes|segunda(?:s|-feira)?)\b/, 0], // i18n-allow: input vocabulary+ [/\b(?:tue(?:s(?:day)?)?s?|dienstags?|martes|terças?(?:-feira)?|tercas?)\b/, 1], // i18n-allow: input vocabulary+ [/\b(?:wed(?:nesday)?s?|mittwochs?|miércoles|miercoles|quartas?(?:-feira)?)\b/, 2], // i18n-allow: input vocabulary+ [/\b(?:thu(?:rs(?:day)?)?s?|donnerstags?|jueves|quintas?(?:-feira)?)\b/, 3], // i18n-allow: input vocabulary+ [/\b(?:fri(?:day)?s?|freitags?|viernes|sextas?(?:-feira)?)\b/, 4], // i18n-allow: input vocabulary+ [/\b(?:sat(?:urday)?s?|samstags?|sábados?|sabados?)\b/, 5], // i18n-allow: input vocabulary+ [/\b(?:sun(?:day)?s?|sonntags?|domingos?)\b/, 6], // i18n-allow: input vocabulary+];++const WEEKDAYS = /\b(?:week ?days?|workdays?|werktags?|werktagen|wochentags?|wochentagen|(?:días|dias) (?:laborables|úteis|uteis)|entre semana|mon(?:day)?\s*(?:-|to|through|bis)\s*fri(?:day)?|montag\s*(?:-|bis)\s*freitag)\b/; // i18n-allow: input vocabulary+const WEEKENDS = /\b(?:weekends?|wochenendes?|fin(?:es)? de semana|fim de semana|fins de semana)\b/; // i18n-allow: input vocabulary+const DAILY = /\b(?:every ?day|daily|each day|täglich|taeglich|jeden tag|todos los días|todos los dias|cada día|cada dia|todos os dias|diariamente)\b/; // i18n-allow: input vocabulary+const HOURLY = /\b(?:every hour|hourly|each hour|stündlich|stuendlich|jede stunde|cada hora|de hora a hora)\b/; // i18n-allow: input vocabulary+const INTERVAL = /\b(?:every|each|alle|cada)\s+(\d{1,3})\s*(m|mins?|minutes?|minuten|minutos|h|hrs?|hours?|stunden|horas|d|days?|tage|tagen|días|dias)\b/; // i18n-allow: input vocabulary+const NOON = /\b(?:noon|midday|mittags?|mediodía|mediodia|meio-dia)\b/; // i18n-allow: input vocabulary+const EVENING = /\b(?:evening|night|tonight|pm|abends?|nachts?|tarde|noche|noite)\b/; // i18n-allow: input vocabulary+/** No bare "am": in German it means "on" ("am Montag"); "7am" is read by the clock itself. */+const MORNING = /\b(?:morning|morgens|früh|frueh|mañana|manana|manhã|manha)\b/; // i18n-allow: input vocabulary+/** A clock time: "7", "7:30", "07.30", "7h30", "19 uhr", "7am", "at 7". */+const CLOCK = /(?:^|\s|at\s|um\s|a las\s|às\s|as\s|@)(\d{1,2})(?:[:.h](\d{2}))?\s*(am|pm|a\.m\.|p\.m\.|uhr|h)?(?=$|[\s,.;!?])/; // i18n-allow: input vocabulary++function unitSeconds(unit: string): number {+ if (/^(?:m|mins?|minutes?|minuten|minutos)$/.test(unit)) return 60; // i18n-allow: input vocabulary+ if (/^(?:h|hrs?|hours?|stunden|horas)$/.test(unit)) return 3_600; // i18n-allow: input vocabulary+ return 86_400;+}++function clockOf(text: string): string | null {+ if (NOON.test(text)) return "12:00";+ const match = CLOCK.exec(text);+ if (!match) return null;+ let hours = Number(match[1]);+ const minutes = match[2] ? Number(match[2]) : 0;+ const suffix = (match[3] ?? "").replace(/\./g, "");+ if (hours > 23 || minutes > 59) return null;+ if (suffix === "pm" && hours < 12) hours += 12;+ else if (suffix === "am" && hours === 12) hours = 0;+ else if (!suffix && hours < 12 && EVENING.test(text) && !MORNING.test(text)) hours += 12;+ return `${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;+}++function viewerZone(): string {+ try { return Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC"; } catch { return "UTC"; }+}++/** The trigger for `text`, or null when it does not name a schedule clearly. */+export function parseScheduleText(text: string, timezone: string = viewerZone()): ScheduleTrigger | null {+ const clean = ` ${text.toLowerCase().replace(/\s+/g, " ").trim()} `;+ if (!clean.trim()) return null;+ const interval = INTERVAL.exec(clean);+ if (interval) {+ const seconds = Number(interval[1]) * unitSeconds(interval[2]);+ // The scheduler takes a gap of one minute up to a year.+ return seconds >= 60 && seconds <= 366 * 86_400 ? { type: "every", interval_seconds: seconds } : null;+ }+ if (HOURLY.test(clean)) return { type: "every", interval_seconds: 3_600 };+ // Words that name days are taken out before the clock is read, so "Monday 9" is 9 o'clock.+ let days: number[] = [];+ if (WEEKDAYS.test(clean)) days = [0, 1, 2, 3, 4];+ else if (WEEKENDS.test(clean)) days = [5, 6];+ else {+ for (const [pattern, day] of DAY_WORDS) if (pattern.test(clean)) days.push(day);+ }+ const time = clockOf(clean.replace(INTERVAL, " "));+ if (!time) return null;+ const daily = DAILY.test(clean) || days.length === 0 || days.length === 7;+ return daily+ ? { type: "calendar", local_time: time, timezone }+ : { type: "calendar", local_time: time, timezone, weekdays: [...new Set(days)].sort((a, b) => a - b) };+}diff --git a/dodaios/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsx b/dodaios/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsxindex 6ab0d15c85..09ab79d921 100644--- a/dodaios/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsx+++ b/dodaios/ui/web/frontend/src/components/society/chat/AgentChatPanel.tsx@@ -104,6 +104,7 @@ import { CatchUpPill, RunAnnouncer, SettleBox, TranscriptStamp, useFarFromEnd, uimport { WorkInspector } from "@/components/agentchat/inspector/WorkInspector";import { inspectorDocked, readInspectorWidth, writeInspectorWidth } from "@/components/agentchat/inspector/inspectorWidth";import { useInspectedTurn } from "@/components/agentchat/inspector/inspectedTurn";+import { markAnswered } from "../attention/attentionStore";/** Who spoke an item, for time stamps that never split one speaker's run. */function stampEntry(item: TimelineItem): StampEntry {@@ -1019,6 +1020,7 @@ function ProposalCard({ item }: { item: NoticeItem }) {setError("");try {await resolve(proposalId, approve, kind === "team" && approve ? chosen.join(", ") : "");+ markAnswered(proposalId);} catch (err) {setError(err instanceof Error ? err.message : String(err));} finally {diff --git a/dodaios/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsx b/dodaios/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsxindex b58b2e6b87..3a1967790a 100644--- a/dodaios/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsx+++ b/dodaios/ui/web/frontend/src/components/society/create/CreateAgentDialog.tsx@@ -302,7 +302,7 @@ function CreateAgentDialog() {<span className="cs-label">{t("society.create_agent.companion_label")}</span><div className="-mx-4"><Suspense fallback={null}>- <CompanionEditor value={companion} onChange={setCompanion} disabled={saving} />+ <CompanionEditor value={companion} onChange={setCompanion} disabled={saving} preview3d={false} /></Suspense></div></div>diff --git a/dodaios/ui/web/frontend/src/components/society/roster/RosterHoverCard.tsx b/dodaios/ui/web/frontend/src/components/society/roster/RosterHoverCard.tsxindex 049d680c0c..730b6f5610 100644--- a/dodaios/ui/web/frontend/src/components/society/roster/RosterHoverCard.tsx+++ b/dodaios/ui/web/frontend/src/components/society/roster/RosterHoverCard.tsx@@ -11,7 +11,7 @@ import { useT } from "@/i18n";import { AgentSwatch } from "../AgentSwatch";import { agentTint } from "../agentTint";import type { SocietyAgent } from "../data";-import { previewText, type RosterStatus, type WaitingReason } from "./rosterPreview";+import { previewText, readableWaiting, type RosterStatus, type WaitingReason } from "./rosterPreview";import { StatusMark, statusLabel } from "./RosterRow";export interface HoverCardData {@@ -64,7 +64,7 @@ export function RosterHoverCard({ data }: { data: HoverCardData }) {</div><p className={data.status === "needs-you" ? "mt-3 text-xs font-medium text-warning" : "mt-3 text-xs text-muted-foreground"}>{data.status === "needs-you" && data.reason?.summary- ? `${t("society.shell.preview_needs_you")} · ${previewText(data.reason.summary)}`+ ? `${t("society.shell.preview_needs_you")} · ${readableWaiting(previewText(data.reason.summary), t)}`: statusLabel(data.status, t)}{data.timeLabel ? <span className="text-muted-foreground"> · {data.timeLabel}</span> : null}</p>diff --git a/dodaios/ui/web/frontend/src/components/society/roster/RosterRail.tsx b/dodaios/ui/web/frontend/src/components/society/roster/RosterRail.tsxindex 8f629162e6..a09180b5d1 100644--- a/dodaios/ui/web/frontend/src/components/society/roster/RosterRail.tsx+++ b/dodaios/ui/web/frontend/src/components/society/roster/RosterRail.tsx@@ -43,6 +43,7 @@ import { useRosterUnreadState } from "./useRosterUnread";import { ChatGroupDialog } from "../chat/ChatGroupDialog";import { RosterRow, StatusMark } from "./RosterRow";import { RosterHoverCard, type HoverCardData } from "./RosterHoverCard";+import { useAttentionStore } from "../attention/attentionStore";import { formatRelative, needsYou, rosterPreview, rosterStatus, waitingReasonOf } from "./rosterPreview";import { HIDDEN_AGENTS_KEY, MAX_PINNED, ORDER_KEY, PINNED_KEY, togglePin, usePersistedIds, writeIdList } from "./rosterPrefs";import type { RosterActivityMap } from "./useRosterActivity";@@ -207,6 +208,8 @@ export function RosterRail({setGroupMenu({ groupId, x: event.clientX, y: event.clientY });};+ // A card answered here stops the row saying "needs you" before the next roster read.+ const answered = useAttentionStore((state) => state.answered);const lead = useMemo(() => agents.find((a) => a.tier === "lead") ?? null, [agents]);const groupedIds = useMemo(() => new Set(groups.flatMap((group) => group.members)), [groups]);// A group may hold the lead, who wears the assistant's chosen name everywhere.@@ -221,6 +224,7 @@ export function RosterRail({const visibleGroups = groups.filter((group) => `${group.name} ${group.members.map(memberName).join(" ")}`.toLowerCase().includes(q));const { heroLead, pinned, attention, leadRow, rows } = useMemo(() => {+ void answered; // The waiting reasons below read the answered cards.const isHidden = (a: SocietyAgent) => !showHidden && hiddenIds.includes(a.agentId);const matches = (a: SocietyAgent) => !q || `${a.name} ${display(a)} ${a.title}`.toLowerCase().includes(q);const shown = (a: SocietyAgent) => !isHidden(a) && matches(a);@@ -259,7 +263,7 @@ export function RosterRail({return rank[a.tier] - rank[b.tier];});return { heroLead: hero, pinned: pinnedRows, attention: waiting, leadRow: leadShown, rows: rest };- }, [agents, browsing, display, groupedIds, hiddenIds, lead, orderIds, pinIds, q, showHidden, teamsPending]);+ }, [agents, answered, browsing, display, groupedIds, hiddenIds, lead, orderIds, pinIds, q, showHidden, teamsPending]);// While searching or filtering, the list is an excerpt — dragging there// would file agents by where they happen to sit in it, so rows stay put.diff --git a/dodaios/ui/web/frontend/src/components/society/roster/RosterRow.tsx b/dodaios/ui/web/frontend/src/components/society/roster/RosterRow.tsxindex ba122b44e8..66092f3ac1 100644--- a/dodaios/ui/web/frontend/src/components/society/roster/RosterRow.tsx+++ b/dodaios/ui/web/frontend/src/components/society/roster/RosterRow.tsx@@ -17,7 +17,7 @@ import { cn } from "@/lib/utils";import { AgentSwatch } from "../AgentSwatch";import { agentTint } from "../agentTint";import type { SocietyAgent } from "../data";-import type { RosterPreview, RosterStatus } from "./rosterPreview";+import { readableWaiting, type RosterPreview, type RosterStatus } from "./rosterPreview";export function StatusMark({ status, className }: { status: RosterStatus; className?: string }) {const t = useT();@@ -55,7 +55,7 @@ export function PreviewLine({ preview, className }: { preview: RosterPreview; clreturn (<span className={cn("as-row-preview", className)} data-kind="waiting" data-testid="roster-preview"><span className="as-preview-tag">{t("society.shell.preview_needs_you")}</span>- {preview.text ? <> · {preview.text}</> : null}+ {preview.text ? <> · {readableWaiting(preview.text, t)}</> : null}</span>);}diff --git a/dodaios/ui/web/frontend/src/components/society/roster/rosterPreview.test.ts b/dodaios/ui/web/frontend/src/components/society/roster/rosterPreview.test.tsindex 78d7fa87fc..72057fa751 100644--- a/dodaios/ui/web/frontend/src/components/society/roster/rosterPreview.test.ts+++ b/dodaios/ui/web/frontend/src/components/society/roster/rosterPreview.test.ts@@ -1,7 +1,9 @@import { describe, expect, it } from "vitest";import type { SocietyAgent } from "../data";-import { formatRelative, needsYou, previewText, relativeStamp, rosterPreview, rosterStatus, waitingReasonOf } from "./rosterPreview";+import en from "@/i18n/locales/en.json";+import { markAnswered, resetAttentionStore } from "../attention/attentionStore";+import { formatRelative, needsYou, previewText, readableWaiting, relativeStamp, rosterPreview, rosterStatus, waitingReasonOf } from "./rosterPreview";function agent(over: Partial<SocietyAgent> & Record<string, unknown> = {}): SocietyAgent {return {@@ -92,3 +94,37 @@ describe("relative times", () => {expect(formatRelative(now - 40 * 86_400_000, now, "en", "now")).toMatch(/Sep/);});});++describe("what the person already answered", () => {+ const t = (key: string): string => {+ let at: unknown = en;+ for (const part of key.split(".")) at = (at as Record<string, unknown>)?.[part];+ return typeof at === "string" ? at : key;+ };++ it("reads a bare tool id as what the tool does", () => {+ expect(readableWaiting("mcp__dodaios__society-create-routine", t)).toBe("Create a routine");+ expect(readableWaiting("mcp__linear__create_issue", t)).toBe("Create issue");+ expect(readableWaiting("Write hello into a file", t)).toBe("Write hello into a file");+ });++ it("stops saying needs you once the card was answered here", () => {+ resetAttentionStore();+ const waiting = agent({ state: "waiting", waiting_reason: { kind: "approval", summary: "x", session_id: "s1", ref_id: "ap1" } });+ expect(rosterStatus(waiting, false)).toBe("needs-you");+ markAnswered("ap1");+ expect(needsYou(waiting)).toBe(false);+ expect(waitingReasonOf(waiting)).toBeNull();+ expect(rosterStatus(waiting, false)).toBe("working");+ resetAttentionStore();+ });++ it("does not call an agent working after a decided proposal: nothing resumes", () => {+ resetAttentionStore();+ const proposing = agent({ state: "waiting", waiting_reason: { kind: "proposal", summary: "Add a rule", ref_id: "p1" } });+ expect(rosterStatus(proposing, false)).toBe("needs-you");+ markAnswered("p1");+ expect(rosterStatus(proposing, false)).toBe("idle");+ resetAttentionStore();+ });+});diff --git a/dodaios/ui/web/frontend/src/components/society/roster/rosterPreview.ts b/dodaios/ui/web/frontend/src/components/society/roster/rosterPreview.tsindex d6c64871ea..487a1bcec8 100644--- a/dodaios/ui/web/frontend/src/components/society/roster/rosterPreview.ts+++ b/dodaios/ui/web/frontend/src/components/society/roster/rosterPreview.ts@@ -14,8 +14,10 @@* in the chat header, so the preview keeps saying what was last said.*/import { hideAskBlocks } from "@/components/agentchat/askFence";+import { friendlyToolName, isRawToolId } from "@/components/agentchat/traceEntries";import { stripInlineMarks } from "@/lib/plainMarks";+import { wasAnswered } from "../attention/attentionStore";import type { SocietyAgent } from "../data";export type WaitingKind = "question" | "approval" | "credential" | "proposal";@@ -51,17 +53,40 @@ function coerceReason(value: unknown): WaitingReason | null {*/export function waitingReasonOf(agent: SocietyAgent): WaitingReason | null {const loose = agent as SocietyAgent & { waitingReason?: unknown; waiting_reason?: unknown };- return coerceReason(loose.waitingReason ?? loose.waiting_reason);+ const reason = coerceReason(loose.waitingReason ?? loose.waiting_reason);+ // Answered here: the card is settled even before the next roster read says so.+ return reason && wasAnswered(reason.refId) ? null : reason;+}++/** The waiting reason the roster still holds although the person already answered it here. */+function answeredReason(agent: SocietyAgent): WaitingReason | null {+ const loose = agent as SocietyAgent & { waitingReason?: unknown; waiting_reason?: unknown };+ const reason = coerceReason(loose.waitingReason ?? loose.waiting_reason);+ return reason && wasAnswered(reason.refId) ? reason : null;+}++function answeredHere(agent: SocietyAgent): boolean {+ return answeredReason(agent) !== null;}export function needsYou(agent: SocietyAgent): boolean {+ if (answeredHere(agent)) return false;return agent.state === "waiting" || waitingReasonOf(agent) !== null;}+/** A waiting reason in words: a bare tool id reads as what the tool does. */+export function readableWaiting(text: string, t: (key: string) => string): string {+ return text && isRawToolId(text) ? friendlyToolName(text, t) : text;+}+export type RosterStatus = "needs-you" | "working" | "unread" | "paused" | "idle";export function rosterStatus(agent: SocietyAgent, unread: boolean): RosterStatus {- if (needsYou(agent)) return "needs-you";+ // An answered approval, question or sign-in lets the paused run go on; a+ // decided proposal starts nothing, so the agent reads as it otherwise would.+ const answered = answeredReason(agent);+ if (answered && answered.kind !== "proposal") return "working";+ if (!answered && needsYou(agent)) return "needs-you";if (agent.state === "working") return "working";if (unread) return "unread";if (agent.state === "paused") return "paused";diff --git a/dodaios/ui/web/frontend/src/i18n/locales/de.json b/dodaios/ui/web/frontend/src/i18n/locales/de.jsonindex 5cd3abdf65..2470db8830 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/de.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/de.json@@ -5620,7 +5620,7 @@"job_hint": "Wird der Anfang seiner Anweisungen. Du kannst sie jederzeit in seinem Chat verfeinern."},"runtime_note": {- "jarvis": "Unsere eigene Agentenschleife: jedes Werkzeug und jeder verbundene Anbieter. Der Typ steht fest, sobald der Agent existiert; das Modell kannst du jederzeit wechseln.",+ "jarvis": "Der Typ steht fest, sobald der Agent existiert; das Modell kannst du jederzeit wechseln.","hermes": "Läuft in der Hermes-Laufzeit; die Einrichtung übernehmen wir. Der Typ steht fest, sobald der Agent existiert; das Modell kannst du jederzeit wechseln.","openclaw": "Läuft in der OpenClaw-Laufzeit; die Einrichtung übernehmen wir. Der Typ steht fest, sobald der Agent existiert; das Modell kannst du jederzeit wechseln."},@@ -6983,7 +6983,7 @@"delegate_line": "Hand this to the agent '{0}' (id {1}) with delegate-to-agent and report back here when it is done.","proposal_title": "{0} schlägt eine Änderung vor","proposal_reason": "Warum",- "proposal_confirm": "Bestätigen",+ "proposal_confirm": "Übernehmen","proposal_reject": "Ablehnen","proposal_pending": "Wartet auf deine Entscheidung","proposal_applied": "Übernommen",@@ -7867,6 +7867,31 @@"mcp_admin": "einen MCP-Server verwaltet","settings": "die Einstellungen gelesen","verify": "eine Prüfung ausgeführt"+ },+ "tool": {+ "create_routine": "Routine anlegen",+ "routines": "Routinen ansehen",+ "update_routine": "Routine ändern",+ "invoke_routine": "Routine ausführen",+ "propose_change": "Änderung vorschlagen",+ "message_agent": "Anderem Agenten schreiben",+ "status": "Nach den Agenten sehen",+ "review": "Arbeit prüfen",+ "create_agent": "Agenten anlegen",+ "update_agent": "Agenten ändern",+ "archive_agent": "Agenten archivieren",+ "switch_model": "Modell eines Agenten wechseln",+ "team": "Team koordinieren",+ "wiki_note": "Notiz speichern",+ "memory_recall": "Im Gedächtnis suchen",+ "conversation_recall": "Frühere Chats durchsuchen",+ "run_skill": "Skill ausführen",+ "browser": "Browser benutzen",+ "shell": "Befehl ausführen",+ "sandbox": "Sandbox benutzen",+ "request_credential": "Nach einer Anmeldung fragen",+ "catalog": "Nachsehen, was verfügbar ist",+ "context": "Kontext lesen"}},"chat_media": {@@ -10707,7 +10732,8 @@"no_answer": "Keine Antwort","truncated": "{count} weitere Zeilen nicht angezeigt","empty_output": "Es kam nichts zurück.",- "took": "Dauerte {duration}"+ "took": "Dauerte {duration}",+ "included": "In deinem Abo enthalten"},"row": {"prompt": "Deine Nachricht",@@ -10782,7 +10808,8 @@"connector": "{app} verwenden?","connector_verb": "{app} für „{verb}“ verwenden?","tool": "{tool} ausführen?",- "tool_plain": "Dieses Werkzeug ausführen?"+ "tool_plain": "Dieses Werkzeug ausführen?",+ "action": "{action}?"},"field": {"in": "In {where}",@@ -10858,7 +10885,8 @@"reach_everything": "Alles in diesem Chat","reach_tool_plain": "Das ganze Werkzeug","cancel": "Abbrechen"- }+ },+ "raw": "Rohdaten"},"games": {"title": "Spieleinstellungen",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/en.json b/dodaios/ui/web/frontend/src/i18n/locales/en.jsonindex 0b47089629..2ae9304d31 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/en.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/en.json@@ -5620,7 +5620,7 @@"job_hint": "Becomes the start of its instructions. Refine them any time in its chat."},"runtime_note": {- "jarvis": "Our own agent loop: every tool and any connected provider. The type is fixed once the agent exists; the model can change any time.",+ "jarvis": "The type is fixed once the agent exists; the model can change any time.","hermes": "Runs in the Hermes runtime; setup is handled for you. The type is fixed once the agent exists; the model can change any time.","openclaw": "Runs in the OpenClaw runtime; setup is handled for you. The type is fixed once the agent exists; the model can change any time."},@@ -6983,7 +6983,7 @@"delegate_line": "Hand this to the agent '{0}' (id {1}) with delegate-to-agent and report back here when it is done.","proposal_title": "{0} proposes a change","proposal_reason": "Why",- "proposal_confirm": "Confirm",+ "proposal_confirm": "Apply","proposal_reject": "Reject","proposal_pending": "Waiting for your decision","proposal_applied": "Applied",@@ -7867,6 +7867,31 @@"mcp_admin": "managed an MCP server","settings": "read the settings","verify": "ran a check"+ },+ "tool": {+ "create_routine": "Create a routine",+ "routines": "Check routines",+ "update_routine": "Change a routine",+ "invoke_routine": "Run a routine",+ "propose_change": "Propose a change",+ "message_agent": "Message another agent",+ "status": "Check on the agents",+ "review": "Review work",+ "create_agent": "Create an agent",+ "update_agent": "Change an agent",+ "archive_agent": "Archive an agent",+ "switch_model": "Switch an agent's model",+ "team": "Coordinate the team",+ "wiki_note": "Save a note",+ "memory_recall": "Search its memory",+ "conversation_recall": "Search past chats",+ "run_skill": "Run a skill",+ "browser": "Use the browser",+ "shell": "Run a command",+ "sandbox": "Use the sandbox",+ "request_credential": "Ask for a sign-in",+ "catalog": "Look up what is available",+ "context": "Read its context"}},"chat_media": {@@ -10707,7 +10732,8 @@"no_answer": "No answer","truncated": "{count} more lines not shown","empty_output": "It returned nothing.",- "took": "Took {duration}"+ "took": "Took {duration}",+ "included": "Included in your plan"},"row": {"prompt": "Your message",@@ -10782,7 +10808,8 @@"connector": "Use {app}?","connector_verb": "Use {app} to {verb}?","tool": "Run {tool}?",- "tool_plain": "Run this tool?"+ "tool_plain": "Run this tool?",+ "action": "{action}?"},"field": {"in": "In {where}",@@ -10858,7 +10885,8 @@"reach_everything": "Everything in this chat","reach_tool_plain": "This whole tool","cancel": "Cancel"- }+ },+ "raw": "Raw"},"games": {"title": "Game settings",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/es.json b/dodaios/ui/web/frontend/src/i18n/locales/es.jsonindex bde1b56255..94bb50f229 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/es.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/es.json@@ -5620,7 +5620,7 @@"job_hint": "Será el inicio de sus instrucciones. Puedes afinarlas cuando quieras en su chat."},"runtime_note": {- "jarvis": "Nuestro propio bucle de agente: todas las herramientas y cualquier proveedor conectado. El tipo queda fijo al crear el agente; el modelo se puede cambiar cuando quieras.",+ "jarvis": "El tipo queda fijo al crear el agente; el modelo se puede cambiar cuando quieras.","hermes": "Funciona en el entorno Hermes; la configuración corre de nuestra cuenta. El tipo queda fijo al crear el agente; el modelo se puede cambiar cuando quieras.","openclaw": "Funciona en el entorno OpenClaw; la configuración corre de nuestra cuenta. El tipo queda fijo al crear el agente; el modelo se puede cambiar cuando quieras."},@@ -6983,7 +6983,7 @@"delegate_line": "Hand this to the agent '{0}' (id {1}) with delegate-to-agent and report back here when it is done.","proposal_title": "{0} propone un cambio","proposal_reason": "Por qué",- "proposal_confirm": "Confirmar",+ "proposal_confirm": "Aplicar","proposal_reject": "Rechazar","proposal_pending": "Esperando tu decisión","proposal_applied": "Aplicado",@@ -7867,6 +7867,31 @@"mcp_admin": "gestionó un servidor MCP","settings": "leyó la configuración","verify": "hizo una comprobación"+ },+ "tool": {+ "create_routine": "Crear una rutina",+ "routines": "Ver rutinas",+ "update_routine": "Cambiar una rutina",+ "invoke_routine": "Ejecutar una rutina",+ "propose_change": "Proponer un cambio",+ "message_agent": "Escribir a otro agente",+ "status": "Ver cómo van los agentes",+ "review": "Revisar el trabajo",+ "create_agent": "Crear un agente",+ "update_agent": "Cambiar un agente",+ "archive_agent": "Archivar un agente",+ "switch_model": "Cambiar el modelo de un agente",+ "team": "Coordinar el equipo",+ "wiki_note": "Guardar una nota",+ "memory_recall": "Buscar en su memoria",+ "conversation_recall": "Buscar en chats anteriores",+ "run_skill": "Ejecutar una habilidad",+ "browser": "Usar el navegador",+ "shell": "Ejecutar un comando",+ "sandbox": "Usar el entorno aislado",+ "request_credential": "Pedir un inicio de sesión",+ "catalog": "Ver lo que hay disponible",+ "context": "Leer su contexto"}},"chat_media": {@@ -10707,7 +10732,8 @@"no_answer": "Sin respuesta","truncated": "{count} líneas más sin mostrar","empty_output": "No devolvió nada.",- "took": "Tardó {duration}"+ "took": "Tardó {duration}",+ "included": "Incluido en tu plan"},"row": {"prompt": "Tu mensaje",@@ -10782,7 +10808,8 @@"connector": "¿Usar {app}?","connector_verb": "¿Usar {app} para «{verb}»?","tool": "¿Ejecutar {tool}?",- "tool_plain": "¿Ejecutar esta herramienta?"+ "tool_plain": "¿Ejecutar esta herramienta?",+ "action": "¿{action}?"},"field": {"in": "En {where}",@@ -10858,7 +10885,8 @@"reach_everything": "Todo en este chat","reach_tool_plain": "Toda la herramienta","cancel": "Cancelar"- }+ },+ "raw": "Datos sin formato"},"games": {"title": "Ajustes de juegos",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/pt.json b/dodaios/ui/web/frontend/src/i18n/locales/pt.jsonindex 337f63b800..3eb6f7329c 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/pt.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/pt.json@@ -5620,7 +5620,7 @@"job_hint": "Vira o início das instruções. Você pode refiná-las a qualquer momento no chat dele."},"runtime_note": {- "jarvis": "Nosso próprio ciclo de agente: todas as ferramentas e qualquer provedor conectado. O tipo fica fixo quando o agente é criado; o modelo pode mudar a qualquer momento.",+ "jarvis": "O tipo fica fixo quando o agente é criado; o modelo pode mudar a qualquer momento.","hermes": "Roda no ambiente Hermes; a configuração fica por nossa conta. O tipo fica fixo quando o agente é criado; o modelo pode mudar a qualquer momento.","openclaw": "Roda no ambiente OpenClaw; a configuração fica por nossa conta. O tipo fica fixo quando o agente é criado; o modelo pode mudar a qualquer momento."},@@ -6983,7 +6983,7 @@"delegate_line": "Entrega isto ao agente '{0}' (id {1}) com delegate-to-agent e informa aqui quando estiver concluído.","proposal_title": "{0} propõe uma alteração","proposal_reason": "Porquê",- "proposal_confirm": "Confirmar",+ "proposal_confirm": "Aplicar","proposal_reject": "Rejeitar","proposal_pending": "À espera da tua decisão","proposal_applied": "Aplicada",@@ -7867,6 +7867,31 @@"mcp_admin": "geriu um servidor MCP","settings": "leu as definições","verify": "executou uma verificação"+ },+ "tool": {+ "create_routine": "Criar uma rotina",+ "routines": "Ver rotinas",+ "update_routine": "Alterar uma rotina",+ "invoke_routine": "Executar uma rotina",+ "propose_change": "Propor uma alteração",+ "message_agent": "Escrever a outro agente",+ "status": "Ver como estão os agentes",+ "review": "Rever o trabalho",+ "create_agent": "Criar um agente",+ "update_agent": "Alterar um agente",+ "archive_agent": "Arquivar um agente",+ "switch_model": "Mudar o modelo de um agente",+ "team": "Coordenar a equipa",+ "wiki_note": "Guardar uma nota",+ "memory_recall": "Procurar na memória",+ "conversation_recall": "Procurar em conversas anteriores",+ "run_skill": "Executar uma competência",+ "browser": "Usar o navegador",+ "shell": "Executar um comando",+ "sandbox": "Usar a sandbox",+ "request_credential": "Pedir um início de sessão",+ "catalog": "Ver o que está disponível",+ "context": "Ler o contexto"}},"chat_media": {@@ -10707,7 +10732,8 @@"no_answer": "Sem resposta","truncated": "Mais {count} linhas não exibidas","empty_output": "Não retornou nada.",- "took": "Levou {duration}"+ "took": "Levou {duration}",+ "included": "Incluído no seu plano"},"row": {"prompt": "Sua mensagem",@@ -10782,7 +10808,8 @@"connector": "Usar {app}?","connector_verb": "Usar {app} para “{verb}”?","tool": "Executar {tool}?",- "tool_plain": "Executar esta ferramenta?"+ "tool_plain": "Executar esta ferramenta?",+ "action": "{action}?"},"field": {"in": "Em {where}",@@ -10858,7 +10885,8 @@"reach_everything": "Tudo neste chat","reach_tool_plain": "A ferramenta toda","cancel": "Cancelar"- }+ },+ "raw": "Dados em bruto"},"games": {"title": "Configurações de jogos",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/de.json b/dodaios/ui/web/frontend/src/i18n/locales/society/de.jsonindex 69c0030430..ab7a4240eb 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/de.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/de.json@@ -673,8 +673,8 @@"loading": "Agenten werden geladen…"},"triggers": {- "group": "Trigger-Gruppe",- "kind": "Auslöser",+ "group": "Was es startet",+ "kind": "Wie","all_sources": "Alle Trigger","amount": "Alle","minutes": "Minuten",@@ -682,7 +682,7 @@"days": "Tage","time": "Uhrzeit","timezone": "Zeitzone",- "expression": "Cron-Ausdruck",+ "expression": "Zeitregel (Cron)","date": "Lokales Datum und Uhrzeit","endpoint": "Endpunkt","topic": "Topic / Queue / Stream",@@ -718,25 +718,25 @@"provider_saved": "Anbieter-Verifizierung eingerichtet.","use_input": "Die konfigurierte Trigger-Eingabe verwenden.","groups": {- "human": "Mensch",- "time": "Zeit",- "api": "API",- "external": "Externe Ereignisse",- "stream": "Streams und Nachrichten",- "system": "System",- "internal": "Interne Workflows"+ "human": "Wenn du es startest",+ "time": "Nach Zeitplan",+ "api": "Aus einer anderen App",+ "external": "Wenn in einem Dienst etwas passiert",+ "stream": "Aus einem laufenden Datenstrom",+ "system": "Wenn sich auf diesem Computer etwas ändert",+ "internal": "Nach einer anderen Routine oder einem Workflow"},"kinds": {- "manual": "Manuell",- "chat": "Chat",- "form": "Formular",+ "manual": "Nur wenn du es startest",+ "chat": "Aus dem Chat",+ "form": "Über ein Formular","mcp": "MCP",- "every": "Intervall",- "calendar": "Kalender-Zeitplan",- "cron": "Cron",- "after_delay": "Nach einer Wartezeit",- "at_time": "Zu Datum/Uhrzeit",- "webhook": "Webhook",+ "every": "Alle paar Minuten, Stunden oder Tage",+ "calendar": "Zu festen Zeiten",+ "cron": "Erweiterte Zeitregel",+ "after_delay": "Einmal, nach einer Wartezeit",+ "at_time": "Einmal, zu Datum und Uhrzeit",+ "webhook": "Wenn eine Webadresse aufgerufen wird","github": "GitHub","linear": "Linear","gmail": "Gmail",@@ -747,12 +747,12 @@"rabbitmq": "RabbitMQ","mqtt": "MQTT","redis": "Redis Streams",- "file": "Datei geändert",- "on_event": "Systemereignis",- "workflow": "Workflow → workflow",- "event_hook": "Benanntes Ereignis",- "workflow_activated": "Workflow aktiviert",- "workflow_failed": "Workflow fehlgeschlagen"+ "file": "Wenn sich eine Datei ändert",+ "on_event": "Wenn die App ein Ereignis meldet",+ "workflow": "Nach einer anderen Routine oder einem Workflow",+ "event_hook": "Wenn ein benanntes Ereignis eintritt",+ "workflow_activated": "Wenn ein Workflow eingeschaltet wird",+ "workflow_failed": "Wenn ein Workflow fehlschlägt"},"when": {"succeeded": "Nach Erfolg",@@ -2077,7 +2077,12 @@"setup_in_chat": "Im Chat einrichten","setup_prompt": "Leg mir eine Routine an: ","or_chat": "Oder im Chat beschreiben",- "empty_body": "Aufgaben, die dieser Agent von selbst erledigt, etwa eine Morgenübersicht oder ein Wochencheck."+ "empty_body": "Aufgaben, die dieser Agent von selbst erledigt, etwa eine Morgenübersicht oder ein Wochencheck.",+ "when_label": "Wann",+ "when_placeholder": "Zum Beispiel: jeden Werktag um 7",+ "when_unclear": "Nicht klar, wann das sein soll. Versuch es mit „jeden Montag um 9“ oder „alle 2 Stunden“.",+ "more_options": "Mehr Optionen",+ "fewer_options": "Weniger Optionen"},"parking": {"title": "Pausiert: Ergebnisse blieben ungelesen",diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/en.json b/dodaios/ui/web/frontend/src/i18n/locales/society/en.jsonindex 4d3e3834c1..22b93bfaf4 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/en.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/en.json@@ -673,8 +673,8 @@"loading": "Loading agents…"},"triggers": {- "group": "Trigger group",- "kind": "Trigger",+ "group": "What starts it",+ "kind": "How","all_sources": "All triggers","amount": "Every","minutes": "Minutes",@@ -682,7 +682,7 @@"days": "Days","time": "Time","timezone": "Timezone",- "expression": "Cron expression",+ "expression": "Timing rule (cron)","date": "Local date and time","endpoint": "Endpoint","topic": "Topic / queue / stream",@@ -718,25 +718,25 @@"provider_saved": "Provider verification configured.","use_input": "Use the configured trigger input.","groups": {- "human": "Human",- "time": "Time",- "api": "API",- "external": "External events",- "stream": "Streams and messages",- "system": "System",- "internal": "Internal workflows"+ "human": "When you start it",+ "time": "On a schedule",+ "api": "From another app",+ "external": "When something happens in a service",+ "stream": "From a live data feed",+ "system": "When something changes on this computer",+ "internal": "After another routine or workflow"},"kinds": {- "manual": "Manual",- "chat": "Chat",- "form": "Form",+ "manual": "Only when you start it",+ "chat": "From the chat",+ "form": "From a form","mcp": "MCP",- "every": "Interval",- "calendar": "Calendar schedule",- "cron": "Cron",- "after_delay": "After a delay",- "at_time": "At a date/time",- "webhook": "Webhook",+ "every": "Every few minutes, hours or days",+ "calendar": "At set times",+ "cron": "Advanced timing rule",+ "after_delay": "Once, after a wait",+ "at_time": "Once, at a date and time",+ "webhook": "When a web address is called","github": "GitHub","linear": "Linear","gmail": "Gmail",@@ -747,12 +747,12 @@"rabbitmq": "RabbitMQ","mqtt": "MQTT","redis": "Redis Streams",- "file": "File changed",- "on_event": "System event",- "workflow": "Workflow → workflow",- "event_hook": "Named event",- "workflow_activated": "Workflow activated",- "workflow_failed": "Workflow failed"+ "file": "When a file changes",+ "on_event": "When the app reports an event",+ "workflow": "After another routine or workflow",+ "event_hook": "When a named event happens",+ "workflow_activated": "When a workflow is switched on",+ "workflow_failed": "When a workflow fails"},"when": {"succeeded": "After success",@@ -2077,7 +2077,12 @@"setup_in_chat": "Set one up in chat","setup_prompt": "Create a routine for me: ","or_chat": "Or describe it in chat",- "empty_body": "Jobs this agent runs on its own, like a morning digest or a weekly check."+ "empty_body": "Jobs this agent runs on its own, like a morning digest or a weekly check.",+ "when_label": "When",+ "when_placeholder": "For example: every weekday at 7",+ "when_unclear": "Not sure when that is. Try “every Monday at 9” or “every 2 hours”.",+ "more_options": "More options",+ "fewer_options": "Fewer options"},"parking": {"title": "Paused: results went unread",@@ -2111,7 +2116,7 @@"runs": {"empty": "No runs yet. Use Test run to try it now.","manual": "Manual",- "included": "Included in your subscription",+ "included": "Included in your plan","skip_away": "Skipped: nobody opened the results for a while, so the routine was paused.","show_all": "Show all {n}","show_less": "Show fewer"diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/es.json b/dodaios/ui/web/frontend/src/i18n/locales/society/es.jsonindex 0314496aff..0b62b22026 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/es.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/es.json@@ -673,8 +673,8 @@"loading": "Cargando agentes…"},"triggers": {- "group": "Grupo de activación",- "kind": "Activador",+ "group": "Qué la inicia",+ "kind": "Cómo","all_sources": "Todos los activadores","amount": "Cada","minutes": "Minutos",@@ -682,7 +682,7 @@"days": "Días","time": "Hora","timezone": "Zona horaria",- "expression": "Expresión cron",+ "expression": "Regla de horario (cron)","date": "Fecha y hora local","endpoint": "Dirección","topic": "Tema / cola / flujo",@@ -718,25 +718,25 @@"provider_saved": "Verificación del proveedor configurada.","use_input": "Usa la entrada configurada del activador.","groups": {- "human": "Humano",- "time": "Tiempo",- "api": "API",- "external": "Eventos externos",- "stream": "Flujos y mensajes",- "system": "Sistema",- "internal": "Flujos internos"+ "human": "Cuando tú la inicias",+ "time": "Con un horario",+ "api": "Desde otra app",+ "external": "Cuando pasa algo en un servicio",+ "stream": "Desde un flujo de datos en vivo",+ "system": "Cuando algo cambia en este ordenador",+ "internal": "Después de otra rutina o flujo"},"kinds": {- "manual": "Manual",- "chat": "Chat",- "form": "Formulario",+ "manual": "Solo cuando tú la inicias",+ "chat": "Desde el chat",+ "form": "Desde un formulario","mcp": "MCP",- "every": "Intervalo",- "calendar": "Calendario",- "cron": "Cron",- "after_delay": "Después de una espera",- "at_time": "En una fecha/hora",- "webhook": "Webhook",+ "every": "Cada cierto número de minutos, horas o días",+ "calendar": "A horas fijas",+ "cron": "Regla de horario avanzada",+ "after_delay": "Una vez, tras una espera",+ "at_time": "Una vez, en una fecha y hora",+ "webhook": "Cuando se llama a una dirección web","github": "GitHub","linear": "Linear","gmail": "Gmail",@@ -747,12 +747,12 @@"rabbitmq": "RabbitMQ","mqtt": "MQTT","redis": "Redis Streams",- "file": "Archivo modificado",- "on_event": "Evento del sistema",- "workflow": "Workflow → workflow",- "event_hook": "Evento con nombre",- "workflow_activated": "Flujo activado",- "workflow_failed": "Flujo fallido"+ "file": "Cuando cambia un archivo",+ "on_event": "Cuando la app informa de un evento",+ "workflow": "Después de otra rutina o flujo",+ "event_hook": "Cuando ocurre un evento con nombre",+ "workflow_activated": "Cuando se activa un flujo",+ "workflow_failed": "Cuando falla un flujo"},"when": {"succeeded": "Tras completarse",@@ -2077,7 +2077,12 @@"setup_in_chat": "Configurar en el chat","setup_prompt": "Créame una rutina: ","or_chat": "O descríbela en el chat",- "empty_body": "Tareas que este agente hace por su cuenta, como un resumen matutino o una revisión semanal."+ "empty_body": "Tareas que este agente hace por su cuenta, como un resumen matutino o una revisión semanal.",+ "when_label": "Cuándo",+ "when_placeholder": "Por ejemplo: cada día laborable a las 7",+ "when_unclear": "No queda claro cuándo es. Prueba con «cada lunes a las 9» o «cada 2 horas».",+ "more_options": "Más opciones",+ "fewer_options": "Menos opciones"},"parking": {"title": "En pausa: resultados sin leer",@@ -2111,7 +2116,7 @@"runs": {"empty": "Aún no hay ejecuciones. Usa Prueba para probarla ya.","manual": "Manual",- "included": "Incluido en tu suscripción",+ "included": "Incluido en tu plan","skip_away": "Omitida: nadie abrió los resultados durante un tiempo, así que la rutina se pausó.","show_all": "Ver las {n}","show_less": "Ver menos"diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/pt.json b/dodaios/ui/web/frontend/src/i18n/locales/society/pt.jsonindex 4997d0bb98..fb0d2e5bb7 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/pt.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/pt.json@@ -673,8 +673,8 @@"loading": "A carregar agentes…"},"triggers": {- "group": "Grupo de gatilhos",- "kind": "Gatilho",+ "group": "O que a inicia",+ "kind": "Como","all_sources": "Todos os gatilhos","amount": "A cada","minutes": "Minutos",@@ -682,7 +682,7 @@"days": "Dias","time": "Hora","timezone": "Fuso horário",- "expression": "Expressão cron",+ "expression": "Regra de horário (cron)","date": "Data e hora locais","endpoint": "Endpoint","topic": "Tópico / fila / stream",@@ -718,25 +718,25 @@"provider_saved": "Verificação do fornecedor configurada.","use_input": "Usar a entrada do gatilho configurada.","groups": {- "human": "Humano",- "time": "Tempo",- "api": "API",- "external": "Eventos externos",- "stream": "Streams e mensagens",- "system": "Sistema",- "internal": "Fluxos de trabalho internos"+ "human": "Quando você a inicia",+ "time": "Num horário",+ "api": "A partir de outra app",+ "external": "Quando algo acontece num serviço",+ "stream": "A partir de um fluxo de dados ao vivo",+ "system": "Quando algo muda neste computador",+ "internal": "Depois de outra rotina ou fluxo"},"kinds": {- "manual": "Manual",- "chat": "Chat",- "form": "Formulário",+ "manual": "Só quando você a inicia",+ "chat": "A partir do chat",+ "form": "A partir de um formulário","mcp": "MCP",- "every": "Intervalo",- "calendar": "Agenda do calendário",- "cron": "Cron",- "after_delay": "Após um atraso",- "at_time": "Numa data/hora",- "webhook": "Webhook",+ "every": "A cada tantos minutos, horas ou dias",+ "calendar": "Em horários fixos",+ "cron": "Regra de horário avançada",+ "after_delay": "Uma vez, depois de uma espera",+ "at_time": "Uma vez, numa data e hora",+ "webhook": "Quando um endereço web é chamado","github": "GitHub","linear": "Linear","gmail": "Gmail",@@ -747,12 +747,12 @@"rabbitmq": "RabbitMQ","mqtt": "MQTT","redis": "Redis Streams",- "file": "Ficheiro alterado",- "on_event": "Evento do sistema",- "workflow": "Fluxo de trabalho → fluxo de trabalho",- "event_hook": "Evento com nome",- "workflow_activated": "Fluxo de trabalho ativado",- "workflow_failed": "Fluxo de trabalho falhou"+ "file": "Quando um ficheiro muda",+ "on_event": "Quando a app comunica um evento",+ "workflow": "Depois de outra rotina ou fluxo",+ "event_hook": "Quando ocorre um evento com nome",+ "workflow_activated": "Quando um fluxo é ativado",+ "workflow_failed": "Quando um fluxo falha"},"when": {"succeeded": "Após sucesso",@@ -2077,7 +2077,12 @@"setup_in_chat": "Configurar no chat","setup_prompt": "Cria-me uma rotina: ","or_chat": "Ou descreva-a no chat",- "empty_body": "Tarefas que este agente faz sozinho, como um resumo da manhã ou uma verificação semanal."+ "empty_body": "Tarefas que este agente faz sozinho, como um resumo da manhã ou uma verificação semanal.",+ "when_label": "Quando",+ "when_placeholder": "Por exemplo: todos os dias úteis às 7",+ "when_unclear": "Não ficou claro quando é. Experimente «todas as segundas às 9» ou «a cada 2 horas».",+ "more_options": "Mais opções",+ "fewer_options": "Menos opções"},"parking": {"title": "Em pausa: resultados não lidos",@@ -2111,7 +2116,7 @@"runs": {"empty": "Ainda sem execuções. Use Execução de teste para experimentar já.","manual": "Manual",- "included": "Incluído na sua subscrição",+ "included": "Incluído no seu plano","skip_away": "Ignorada: ninguém abriu os resultados durante algum tempo, por isso a rotina foi pausada.","show_all": "Mostrar todas as {n}","show_less": "Mostrar menos"diff --git a/dodaios/ui/web/frontend/src/i18n/locales/society/zh.json b/dodaios/ui/web/frontend/src/i18n/locales/society/zh.jsonindex dde6d99f25..85e811fe1c 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/society/zh.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/society/zh.json@@ -673,8 +673,8 @@"loading": "正在加载智能体…"},"triggers": {- "group": "触发器分组",- "kind": "触发器",+ "group": "由什么启动",+ "kind": "方式","all_sources": "所有触发器","amount": "每","minutes": "分钟",@@ -682,7 +682,7 @@"days": "天","time": "时间","timezone": "时区",- "expression": "Cron 表达式",+ "expression": "时间规则(cron)","date": "本地日期和时间","endpoint": "端点","topic": "主题 / 队列 / 流",@@ -718,25 +718,25 @@"provider_saved": "服务商验证已配置。","use_input": "使用已配置的触发器输入。","groups": {- "human": "人工",- "time": "时间",- "api": "API",- "external": "外部事件",- "stream": "流和消息",- "system": "系统",- "internal": "内部工作流"+ "human": "由你启动",+ "time": "按时间",+ "api": "来自其他应用",+ "external": "当某个服务中发生事情时",+ "stream": "来自实时数据流",+ "system": "当这台电脑上有变化时",+ "internal": "在另一个例行任务或工作流之后"},"kinds": {- "manual": "手动",- "chat": "对话",- "form": "表单",+ "manual": "仅在你启动时",+ "chat": "从对话中",+ "form": "通过表单","mcp": "MCP",- "every": "间隔",- "calendar": "日历计划",- "cron": "Cron",- "after_delay": "延迟后",- "at_time": "在指定日期/时间",- "webhook": "Webhook",+ "every": "每隔几分钟、几小时或几天",+ "calendar": "在固定时间",+ "cron": "高级时间规则",+ "after_delay": "等待后运行一次",+ "at_time": "在指定日期和时间运行一次",+ "webhook": "当某个网址被调用时","github": "GitHub","linear": "Linear","gmail": "Gmail",@@ -747,12 +747,12 @@"rabbitmq": "RabbitMQ","mqtt": "MQTT","redis": "Redis Streams",- "file": "文件已更改",- "on_event": "系统事件",- "workflow": "工作流 → 工作流",- "event_hook": "命名事件",- "workflow_activated": "工作流已启用",- "workflow_failed": "工作流失败"+ "file": "当文件变化时",+ "on_event": "当应用报告事件时",+ "workflow": "在另一个例行任务或工作流之后",+ "event_hook": "当命名事件发生时",+ "workflow_activated": "当工作流被开启时",+ "workflow_failed": "当工作流失败时"},"when": {"succeeded": "成功后",@@ -2077,7 +2077,12 @@"setup_in_chat": "在聊天中设置","setup_prompt": "帮我创建一个例行任务:","or_chat": "或在聊天中描述",- "empty_body": "这个智能体自行完成的工作,例如早间摘要或每周检查。"+ "empty_body": "这个智能体自行完成的工作,例如早间摘要或每周检查。",+ "when_label": "何时",+ "when_placeholder": "例如:每个工作日 7 点",+ "when_unclear": "没看懂具体时间。试试“每周一 9 点”或“每 2 小时”。",+ "more_options": "更多选项",+ "fewer_options": "收起选项"},"parking": {"title": "已暂停:结果无人查看",@@ -2111,7 +2116,7 @@"runs": {"empty": "还没有运行记录。点击“测试运行”立即试试。","manual": "手动",- "included": "包含在你的订阅中",+ "included": "包含在你的套餐中","skip_away": "已跳过:结果一段时间无人打开,因此例行任务已暂停。","show_all": "显示全部 {n} 条","show_less": "收起"diff --git a/dodaios/ui/web/frontend/src/i18n/locales/zh.json b/dodaios/ui/web/frontend/src/i18n/locales/zh.jsonindex 12f45db2d5..7066b437b0 100644--- a/dodaios/ui/web/frontend/src/i18n/locales/zh.json+++ b/dodaios/ui/web/frontend/src/i18n/locales/zh.json@@ -5620,7 +5620,7 @@"job_hint": "会成为它指令的开头。之后随时可以在它的聊天中完善。"},"runtime_note": {- "jarvis": "我们自己的智能体循环:所有工具,任意已连接的提供商。智能体创建后类型固定;模型随时可以更换。",+ "jarvis": "智能体创建后类型固定;模型随时可以更换。","hermes": "运行在 Hermes 运行时中,配置工作由我们完成。智能体创建后类型固定;模型随时可以更换。","openclaw": "运行在 OpenClaw 运行时中,配置工作由我们完成。智能体创建后类型固定;模型随时可以更换。"},@@ -6983,7 +6983,7 @@"delegate_line": "用 delegate-to-agent 把这件事交给智能体“{0}”(id {1}),完成后回到这里汇报。","proposal_title": "{0} 提议一项更改","proposal_reason": "原因",- "proposal_confirm": "确认",+ "proposal_confirm": "应用","proposal_reject": "拒绝","proposal_pending": "等待你的决定","proposal_applied": "已应用",@@ -7867,6 +7867,31 @@"mcp_admin": "管理了一个 MCP 服务器","settings": "读取了设置","verify": "运行了一项检查"+ },+ "tool": {+ "create_routine": "创建例行任务",+ "routines": "查看例行任务",+ "update_routine": "修改例行任务",+ "invoke_routine": "运行例行任务",+ "propose_change": "提议更改",+ "message_agent": "给其他智能体发消息",+ "status": "查看智能体状态",+ "review": "审阅工作",+ "create_agent": "创建智能体",+ "update_agent": "修改智能体",+ "archive_agent": "归档智能体",+ "switch_model": "切换智能体的模型",+ "team": "协调团队",+ "wiki_note": "保存笔记",+ "memory_recall": "搜索记忆",+ "conversation_recall": "搜索以往对话",+ "run_skill": "运行技能",+ "browser": "使用浏览器",+ "shell": "运行命令",+ "sandbox": "使用沙盒",+ "request_credential": "请求登录信息",+ "catalog": "查看可用内容",+ "context": "读取上下文"}},"chat_media": {@@ -10707,7 +10732,8 @@"no_answer": "没有回答","truncated": "还有 {count} 行未显示","empty_output": "没有返回任何内容。",- "took": "耗时 {duration}"+ "took": "耗时 {duration}",+ "included": "包含在你的套餐中"},"row": {"prompt": "你的消息",@@ -10782,7 +10808,8 @@"connector": "使用 {app}?","connector_verb": "用 {app} 执行“{verb}”?","tool": "运行 {tool}?",- "tool_plain": "运行这个工具?"+ "tool_plain": "运行这个工具?",+ "action": "{action}?"},"field": {"in": "位置:{where}",@@ -10858,7 +10885,8 @@"reach_everything": "此聊天中的一切","reach_tool_plain": "整个工具","cancel": "取消"- }+ },+ "raw": "原始数据"},"games": {"title": "游戏设置",diff --git a/dodaios/ui/web/frontend/src/store/agentChat.ts b/dodaios/ui/web/frontend/src/store/agentChat.tsindex bf3dd768ae..0bcc2c85ea 100644--- a/dodaios/ui/web/frontend/src/store/agentChat.ts+++ b/dodaios/ui/web/frontend/src/store/agentChat.ts@@ -44,7 +44,8 @@ import {type PatchSessionInput,type ProviderHealth,} from "@/lib/agentChatApi";-import { EMPTY_TIMELINE, noteApprovalRule, reduceEvent, reduceEvents, settleApproval, type Timeline } from "@/components/agentchat/reduce";+import { EMPTY_TIMELINE, markApprovalAnswering, noteApprovalRule, reduceEvent, reduceEvents, settleApproval, type Timeline } from "@/components/agentchat/reduce";+import { markAnswered } from "@/components/society/attention/attentionStore";import { openQuestionOf } from "@/components/agentchat/questions/questionModel";import { jitteredDelay, requestConnect } from "../lib/connectBudget";import { reuseHistoryRows } from "@/lib/historyRequests";@@ -915,15 +916,22 @@ export function createAgentChatStore(surface: AgentChatSurface, draftNamespace =const sid = get().activeSessionId;if (!sid) return;let outcome: string = decision;+ // The person has answered: "needs your OK" leaves the live line and+ // the roster now, not when the backend's confirmation arrives.+ set({ timeline: markApprovalAnswering(get().timeline, approvalId, true) });try {if (rule) await resolveAgentChatApproval(sid, approvalId, decision, rule);else await resolveAgentChatApproval(sid, approvalId, decision);+ markAnswered(approvalId);} catch (err) {// 410: the card outlived what it asked for (an app restart) and is// closed now; 404: the backend never knew it. Either way nothing// waits on it, and the next card the agent opened takes its place.const gone = err instanceof AgentChatApiError && (err.status === 404 || err.status === 410);- if (!gone) throw err;+ if (!gone) {+ if (get().activeSessionId === sid) set({ timeline: markApprovalAnswering(get().timeline, approvalId, false) });+ throw err;+ }outcome = "expired";}if (get().activeSessionId === sid) {diff --git a/dodaios/ui/web/society_routes.py b/dodaios/ui/web/society_routes.pyindex 492f23073b..a5d39ea6a4 100644--- a/dodaios/ui/web/society_routes.py+++ b/dodaios/ui/web/society_routes.py@@ -1374,6 +1374,35 @@ async def switch_agent_model(agent_id: str, body: ModelBody, request: Request) -# ------------------------------------------------------------------ skills+async def _applied_rules(rt: Any, agent: Any) -> list[str]:+ """Standing rules the person applied from a proposal that the instructions still hold.++ An applied ``rule`` proposal lands in the agent's instructions, not in its+ notebooks, so the learned-rules list would never show it. A rule edited+ away by hand since then is left out.+ """+ from dodaios.society.events import ApprovalState+ from dodaios.society.proposals import kind_of++ description = str(getattr(agent, "description", "") or "")+ try:+ approved = await rt.approvals.items(state=ApprovalState.APPROVED, agent_id=agent.agent_id)+ except Exception: # noqa: BLE001 — the list is a convenience; the page still loads without it+ log.warning("society: applied rules unavailable for %s", agent.agent_id, exc_info=True)+ return []+ out: list[str] = []+ for item in approved:+ if kind_of(item.capability) != "rule":+ continue+ payload = (item.action or {}).get("payload") or {}+ if not isinstance(payload, dict) or str(payload.get("operation") or "add") == "remove":+ continue+ text = str(payload.get("text") or "").strip()+ if text and text in description and text not in out:+ out.append(text)+ return out++@router.get("/agents/{agent_id}/knowledge")async def agent_knowledge(agent_id: str, request: Request) -> dict[str, Any]:"""List this agent's current memory, learned skills, working rules and review status."""@@ -1393,6 +1422,7 @@ async def agent_knowledge(agent_id: str, request: Request) -> dict[str, Any]:return {"files": files,"learned_instructions": [e.text[len(PREFIX) :] for e in rules(entries)],+ "applied_rules": await _applied_rules(rt, agent),"reviews": rt.conversations.review_counts(agent.agent_id),"last_review": json.loads(last) if last else None,}diff --git a/tests/unit/society/test_learning_guidance.py b/tests/unit/society/test_learning_guidance.pyindex 9385bb91d4..1c5f47f2e2 100644--- a/tests/unit/society/test_learning_guidance.py+++ b/tests/unit/society/test_learning_guidance.py@@ -394,3 +394,24 @@ async def test_correction_at_start_of_large_memory_keeps_its_visible_diff(rt):assert notices[-1]["before"] == notices[-1]["after"] # Both bounded snapshots carry the tail.assert "-Use paragraphs." in notices[-1]["markdown_diff"]assert "+Use bullet lists." in notices[-1]["markdown_diff"]+++async def test_inventory_lists_applied_standing_rules_still_in_the_instructions(rt):+ agent = await rt.roster.get("scout")++ async def proposal(text: str, *, approve: bool) -> None:+ item = await rt.approvals.enqueue(+ agent_id=agent.agent_id, trace_id="t", capability="core:config:rule",+ action={"kind": "rule", "payload": {"operation": "add", "text": text}},+ summary=f"Add a standing rule: {text}",+ )+ await rt.approvals.resolve(item.id, approve=approve)++ await proposal("Always answer in English.", approve=True)+ await proposal("Keep every answer under three sentences.", approve=False)+ await proposal("Cite every source.", approve=True)+ await rt.roster.update(agent.agent_id, {"description": agent.description + "\n\nAlways answer in English."})+ request = SimpleNamespace(app=SimpleNamespace(state=SimpleNamespace(society=rt)))+ inventory = await agent_knowledge("scout", request)+ # Rejected and edited-away rules stay out; the applied one shows beside the learned ones.+ assert inventory["applied_rules"] == ["Always answer in English."]