Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Skill Burger: a small pill in chat, and every burger is for every chat (#7324)
Milind Sonib7af8df80de9
diff --git a/server/drivers/agents-workflow-tool.ts b/server/drivers/agents-workflow-tool.tsindex 59d8828288..0fbbcf4b92 100644--- a/server/drivers/agents-workflow-tool.ts+++ b/server/drivers/agents-workflow-tool.ts@@ -18,6 +18,9 @@ export function runText(envelope: Json): string {const error = envelope.error as Json | undefined;const defaults = Array.isArray(envelope.defaults) ? (envelope.defaults as Json[]).map((one) => `${String(one.name)} = ${JSON.stringify(one.value)}`) : [];const reused = defaults.length ? [`The request didn't give ${defaults.length > 1 ? "these inputs" : "this input"}, so the run used the saved ${defaults.length > 1 ? "values" : "value"}: ${defaults.join("; ")}. Tell the person.`, ""] : [];+ if (error?.type === "needs_connection") {+ return [String(error.message), "", "Offer the person a connection for it the usual way (your connected-apps tools show them a Connect card), then run the Skill Burger again once it's connected. Don't do its steps by hand meanwhile."].join("\n");+ }if (error) {const goOn = typeof error.resumeToken === "string" ? ` Once the cause is fixed, call run_workflow with resume ${JSON.stringify(error.resumeToken)} to go on from that step.` : "";return [...reused, `The Skill Burger stopped: ${String(error.message)}`, ...lines, "", `Nothing after that step ran, and no step is tried twice by itself. Tell the person what failed; don't redo the step by hand unless they ask.${goOn}`].join("\n");diff --git a/server/host/skills-library.ts b/server/host/skills-library.tsindex 13113694c9..aedd9e6601 100644--- a/server/host/skills-library.ts+++ b/server/host/skills-library.ts@@ -358,9 +358,9 @@ export function createSkillsLibraryHost(deps: SkillsLibraryHostDeps) {add(nativesFor(bot, threadId, instance, cwd).filter((skill) => !switched.has(skill.name) && isNativeSkillEnabled(bot.id, skill.name)));}if (files.size < mentioned.length) add(projectInUse(bot, threadId, cwd, instance, assigned).filter((skill) => !skill.modelOnly));- // A Skill Burger runs exactly with run_workflow, whether it is the bot's own or used in every chat.+ // A Skill Burger runs exactly with run_workflow, from any bot.const burgers = mentioned.flatMap((name) => { const found = findWorkflowSkill(bot.id, name); return found ? [{ name, found }] : []; });- for (const { name, found } of burgers) if (!files.has(name) && "everyChat" in found.place) files.set(name, librarySkillFilePath(name));+ for (const { name } of burgers) if (!files.has(name)) files.set(name, librarySkillFilePath(name));const expanded = skillCommandTurnText(text, files, typed, ownStart);return burgers.length ? `${expanded}\n\n${burgers.map(({ name, found }) => `/${name} is a saved Skill Burger: run it with the run_workflow tool (name "${name}"), filling its args from the request, rather than by hand.${burgerInputs(found.workflow)}`).join(" ")}` : expanded;},diff --git a/server/index.ts b/server/index.tsindex f87bb2e158..d3c8ec2b71 100644--- a/server/index.ts+++ b/server/index.ts@@ -318,7 +318,7 @@ import {import * as tts from "./tts/index.ts";import { voiceNoteFailure } from "./tts/errors.ts";import { createDecider, deciderReady, describeDecider } from "./decider/index.ts"; import { createExtractor, describeHelpers } from "./extractor/index.ts";-import { createStopLineRoutes } from "./routes/stop-line.ts"; import { createSkillBurgerRoutes } from "./skill-burger/routes.ts"; import { createSkillBurgerRuns } from "./skill-burger/runs.ts"; import { decideRoomResponder } from "./decider/room-routing.ts"; import { roomRoutingInput } from "./host/room-routing-input.ts";+import { createStopLineRoutes } from "./routes/stop-line.ts"; import { createSkillBurgerRoutes } from "./skill-burger/routes.ts"; import { migrateBotBurgers } from "./skill-burger/store.ts"; import { createSkillBurgerRuns } from "./skill-burger/runs.ts"; import { decideRoomResponder } from "./decider/room-routing.ts"; import { roomRoutingInput } from "./host/room-routing-input.ts";import { autoRoomDefault, roomTurnMembers } from "./room-routing-members.ts";import { liveHistoryFrom, LiveSessionError, type LiveBot, type LiveHistoryMessage } from "./live-call.ts";import { LiveCallController, LiveCallSignedOutError } from "./live-call-controller.ts"; import { liveSessionWiring } from "./live-session-wiring.ts";@@ -11937,7 +11937,7 @@ let restartRequested = false;const cloudMoveRoutes = createCloudMoveRoutes();// `workspaceAccess` is assigned at boot, after this line: read it per request.-ROUTES.push(createHostedSlackRoutes({ bot: (id) => store.bot(id), hostedReady: () => Boolean(workspaceAccess) && entitled("admin") })); ROUTES.push(createStopLineRoutes()); const skillBurgerRuns = createSkillBurgerRuns({ dataDir: DATA_DIR, host: { port: PORT, cwd: (botId, threadId) => store.taskByThread(botId, threadId)?.cwd || store.bot(botId)?.cwd || workspaceDir(botId), mint: (turn, kind) => mintInternalCapability({ ...(turn as unknown as InternalCapability), kind, depth: 0, skillAuthoring: false, createdBots: 0, openedThreads: 0 }), browser: async (turn) => { const bot = store.bot(turn.botId); return bot ? ((await browserIntegration(bot.id, bot.browserProfile, { threadId: turn.threadId, generation: turn.generation }))?.integration as { env?: Record<string, string | undefined> } | undefined) ?? null : null; }, publish: (threadId, event) => { const engine = runningTurnEngines.get(threadId); bus.publish({ ...event, provider: engine?.driverKind, providerInstanceId: engine?.instanceId } as unknown as RuntimeEvent); }, mayEditEveryChat: () => !CLOUD_TEAM } }); ROUTES.push(createSkillBurgerRoutes({ messages: (threadId) => store.activePath(threadId), botIds: () => store.bots.map((bot) => bot.id), owns: (botId, threadId) => store.bot(botId)?.threadId === threadId || Boolean(store.taskByThread(botId, threadId)), sees: (auth, threadId) => visibleTo(viewerFor(auth)).thread(threadId), summarize: (botId, prompt) => sideJobs.text("skill-burger", botId)?.generateText(prompt, { timeoutMs: 10_000 }) ?? Promise.resolve(null), levelOf, teammate: (idOrName) => { const bot = store.bot(idOrName) ?? store.bots.find((one) => one.name.toLowerCase() === idOrName.toLowerCase()); return bot ? { id: bot.id, name: bot.name, ...(bot.title ? { role: bot.title } : {}) } : undefined; }, history: skillBurgerRuns.history }));+ROUTES.push(createHostedSlackRoutes({ bot: (id) => store.bot(id), hostedReady: () => Boolean(workspaceAccess) && entitled("admin") })); ROUTES.push(createStopLineRoutes()); const skillBurgerRuns = createSkillBurgerRuns({ dataDir: DATA_DIR, host: { port: PORT, cwd: (botId, threadId) => store.taskByThread(botId, threadId)?.cwd || store.bot(botId)?.cwd || workspaceDir(botId), mint: (turn, kind) => mintInternalCapability({ ...(turn as unknown as InternalCapability), kind, depth: 0, skillAuthoring: false, createdBots: 0, openedThreads: 0 }), browser: async (turn) => { const bot = store.bot(turn.botId); return bot ? ((await browserIntegration(bot.id, bot.browserProfile, { threadId: turn.threadId, generation: turn.generation }))?.integration as { env?: Record<string, string | undefined> } | undefined) ?? null : null; }, publish: (threadId, event) => { const engine = runningTurnEngines.get(threadId); bus.publish({ ...event, provider: engine?.driverKind, providerInstanceId: engine?.instanceId } as unknown as RuntimeEvent); }, mayEditBurgers: () => !CLOUD_TEAM, connectedApps: async (turn) => { const bot = store.bot(turn.botId); if (!bot || bot.composio === false || !composio.configured(cfg)) return []; const actor = teamConnections.relayActor(turn as unknown as { threadId: string; generation: string; connectorsFor?: string }); return actor.refusal ? null : composio.connectedServiceSlugs(...teamConnections.via(actor.access)); } } }); try { const moved = migrateBotBurgers(store.bots.map((bot) => bot.id)); if (moved.length) console.log(`skill burgers: moved ${moved.length} saved by one bot into every chat`); } catch (error) { console.warn("skill burgers: could not move bots' own burgers into every chat", error); } ROUTES.push(createSkillBurgerRoutes({ messages: (threadId) => store.activePath(threadId), botIds: () => store.bots.map((bot) => bot.id), owns: (botId, threadId) => store.bot(botId)?.threadId === threadId || Boolean(store.taskByThread(botId, threadId)), sees: (auth, threadId) => visibleTo(viewerFor(auth)).thread(threadId), summarize: (botId, prompt) => sideJobs.text("skill-burger", botId)?.generateText(prompt, { timeoutMs: 10_000 }) ?? Promise.resolve(null), levelOf, actorOf: (auth) => (auth.kind === "session" ? actorKey(auth) : null), teammate: (idOrName) => { const bot = store.bot(idOrName) ?? store.bots.find((one) => one.name.toLowerCase() === idOrName.toLowerCase()); return bot ? { id: bot.id, name: bot.name, ...(bot.title ? { role: bot.title } : {}) } : undefined; }, history: skillBurgerRuns.history }));const orgInstallStatuses = () => orgLibrary?.installStatuses() ?? new Map();ROUTES.push(createBotPresetRoutes({ presets: presetStore, orgStatuses: orgInstallStatuses })); ROUTES.push(createBotHoldRoutes({ holds: botHolds, named: (kind, id) => (kind === "bot" ? store.bot(id)?.name ?? null : store.sections.includes(id.trim()) ? id.trim() : null), stop: async (botIds) => { let stopped = 0; for (const botId of botIds) { for (const { threadId } of store.tasks(botId)) if (threadBusy(botId, threadId) || coordinator.activeDirect(threadId)) { await stopThreadForPerson(botId, threadId); stopped++; } for (const group of store.groups) if (roomThreadIds(group).some((threadId) => groupSpeakers.get(threadId)?.botId === botId)) { await interruptHeldMember(group.id, botId); stopped++; } } return stopped; }, audit: (entry, auth, req) => { if (!DESKTOP_MANAGED && adminActivityRecording()) appendAdminAction(DATA_DIR, { category: "bot", action: `${entry.kind}.${entry.paused ? "pause" : "resume"}`, target: { kind: entry.kind, id: entry.id, name: entry.name }, actor: adminActorFor(auth, req) }); }, bots: () => store.bots.map((bot) => bot.id) })); const cliLogin = createCliLogin({ sessions, refusal: () => (HOSTED_WORKSPACE ? "Sign in through the workspace portal." : null), loopbackRefusal: () => (LOOPBACK.trust === "service" ? "on this shared server a program here may not ask to sign in: run openmausbot login on your own computer" : null), environment: () => environmentDescriptor({ environmentId: ENVIRONMENT_ID, ...TEAM_LABEL, desktopManaged: DESKTOP_MANAGED, emailSignIn: !CLOUD_HOME && emailSignIn.enabled(), sharedComputers: lendingEnabled(), cloudHome: Boolean(CLOUD_HOME), cloudTeam: CLOUD_TEAM !== null, ownHome: ownHome.takesMove() }), changed: () => broadcast({ kind: "cli-login" }, { adminOnly: true }), ...(CLOUD_TEAM ? { opened: (session) => teamHost.met(session) } : {}) }); ROUTES.push(cliLogin.routes); ROUTES.push(createWorkspaceBannerRoutes({ changed: () => broadcast({ kind: "config", ...configStatus() }) })); ROUTES.unshift(createUsageCapRoutes({ view: () => usageCapGate.view(), botExists: (botId) => Boolean(store.bot(botId)), save: (usageCaps) => { saveConfig({ usageCaps }); Object.assign(cfg, loadConfig()); } })); const starterAwakeRoutes = createStarterAwakeRoutes({ awake: starterAwake }); ROUTES.push(starterAwakeRoutes);ROUTES.push(createSharedComputerRoutes({ enabled: (auth) => lendingEnabled() || (ownerLends() && ownHome.owner(auth)), computers: sharedComputers, sessionLive: (id) => sessions.isLive(id), environmentId: ENVIRONMENT_ID,diff --git a/server/skill-burger/executors.test.ts b/server/skill-burger/executors.test.tsindex e2cb33029e..31d9ce3674 100644--- a/server/skill-burger/executors.test.ts+++ b/server/skill-burger/executors.test.ts@@ -17,6 +17,13 @@ describe("where a Skill Burger's steps run", () => {expect(appFrame("gmail.search_emails", { query: "invoice" }, undefined, 8).slug).toMatch(/^GMAIL_/);});+ it("opens a page with the browser's own open tool", async () => {+ const sent: unknown[] = [];+ const exec = createExecutors({ botId: "b", cwd: folder(), internal: async (kind, path, body) => { sent.push([kind, path, body]); return { ok: true, body: { result: { content: [{ type: "text", text: "Opened example.com" }] } } }; } });+ expect(await exec.browser({ url: "https://example.com/pricing", signal: signal() })).toEqual({ ok: true, output: "Opened example.com" });+ expect(sent).toEqual([["browser", "/api/internal/browser/mcp", expect.objectContaining({ method: "tools/call", params: { name: "agent_browser_open", arguments: { url: "https://example.com/pricing" } } })]]);+ });+it("writes a file only inside the conversation's folder", async () => {const cwd = folder();const exec = createExecutors({ botId: "b", cwd, internal: async () => ({ ok: false, body: {} }) });diff --git a/server/skill-burger/executors.ts b/server/skill-burger/executors.tsindex 5f8c1a835d..8118d15a7a 100644--- a/server/skill-burger/executors.ts+++ b/server/skill-burger/executors.ts@@ -20,6 +20,8 @@ export interface ExecutorContext {/** Posts a JSON body to one of the server's internal routes as this turn, with a capability of `kind`; with no body,* a GET. */internal(kind: "agents" | "connectors" | "computer" | "browser", path: string, body: unknown, signal: AbortSignal): Promise<{ ok: boolean; body: Record<string, unknown>; status?: number }>;+ /** The apps this bot is connected to, or null when that can't be told. */+ connected?: () => Promise<readonly string[] | null>;/** The shell a command runs in on this computer. */shell?: { command: string; args: (script: string) => string[] };}@@ -131,6 +133,7 @@ export function appFrame(tool: string, args: Record<string, unknown>, account: sexport function createExecutors(context: ExecutorContext): StepExecutors {return {+ ...(context.connected ? { connected: context.connected } : {}),// A delegate step's hand-offs go through coordinate_bots' own route, as this turn: the same reach, limits and receipts.async teammates(signal) {const answer = await context.internal("agents", `/api/internal/agents?self=${encodeURIComponent(context.botId)}`, undefined, signal);@@ -168,7 +171,7 @@ export function createExecutors(context: ExecutorContext): StepExecutors {}},async browser(input) {- const answer = await context.internal("browser", "/api/internal/browser/mcp", { jsonrpc: "2.0", id: rpcId(), method: "tools/call", params: { name: "browser_navigate", arguments: { url: input.url } } }, input.signal);+ const answer = await context.internal("browser", "/api/internal/browser/mcp", { jsonrpc: "2.0", id: rpcId(), method: "tools/call", params: { name: "agent_browser_open", arguments: { url: input.url } } }, input.signal);return answer.ok ? callText(answer.body) : { ok: false, error: String(answer.body.error ?? "the browser isn't available") };},async file(input) {diff --git a/server/skill-burger/routes.test.ts b/server/skill-burger/routes.test.tsindex 2c60e9ca37..79921bbf2f 100644--- a/server/skill-burger/routes.test.ts+++ b/server/skill-burger/routes.test.ts@@ -52,29 +52,27 @@ async function serve(extra: Partial<SkillBurgerRouteDeps> = {}, scopes: readonly}const send = (method: string, body: unknown): RequestInit => ({ method, headers: { "content-type": "application/json" }, body: JSON.stringify(body) });-const names = async (api: Awaited<ReturnType<typeof serve>>["api"]) => (await api("/api/skill-burgers")).body.skills.map((skill: { name: string; everyChat: boolean }) => [skill.name, skill.everyChat]);+const names = async (api: Awaited<ReturnType<typeof serve>>["api"]) => (await api("/api/skill-burgers")).body.skills.map((skill: { name: string }) => skill.name);-it("saves a run to its bot, shares it with every chat and back, renames, undoes and puts a removal back", async () => {+it("saves a run for every chat, renames, undoes and puts a removal back", async () => {const { api, bot } = await serve();const saved = await api("/api/skill-burgers", send("POST", { botId: bot, threadId: "t1", summary: "Send the invoice" }));expect(saved.status).toBe(201);- expect(saved.body.skill).toMatchObject({ name: "send-the-invoice", summary: "Send the invoice", everyChat: false, botId: bot, args: ["query", "recipient", "subject"] });- expect(await names(api)).toEqual([["send-the-invoice", false]]);- expect((await api(`/api/skill-burgers/send-the-invoice?botId=${bot}`)).body.text).toContain("tags: workflow");+ expect(saved.body.skill).toMatchObject({ name: "send-the-invoice", summary: "Send the invoice", botId: bot, args: ["query", "recipient", "subject"] });+ expect(saved.body.skill).not.toHaveProperty("everyChat");+ expect((await api("/api/skill-burgers")).body.skills.map((skill: { name: string; canChange: boolean }) => [skill.name, skill.canChange])).toEqual([["send-the-invoice", true]]);+ expect((await api("/api/skill-burgers/send-the-invoice")).body.text).toContain("tags: workflow");+ // The old switch for every chat is gone: every burger already is.+ expect((await api("/api/skill-burgers/send-the-invoice", send("PATCH", { everyChat: false }))).status).toBe(400);- const shared = await api("/api/skill-burgers/send-the-invoice", send("PATCH", { everyChat: true, botId: bot, sha256: saved.body.skill.sha256 }));- expect(shared.body.skill).toMatchObject({ everyChat: true, botId: bot });- expect(await names(api)).toEqual([["send-the-invoice", true]]);- expect((await api("/api/skill-burgers/send-the-invoice", send("PATCH", { everyChat: false }))).body.skill).toMatchObject({ everyChat: false });-- const renamed = await api("/api/skill-burgers/send-the-invoice", send("PATCH", { rename: "invoice-to-priya", botId: bot }));+ const renamed = await api("/api/skill-burgers/send-the-invoice", send("PATCH", { rename: "invoice-to-priya" }));expect(renamed.body.skill).toMatchObject({ name: "invoice-to-priya" });- const read = await api(`/api/skill-burgers/invoice-to-priya?botId=${bot}`);- expect((await api(`/api/skill-burgers/invoice-to-priya?botId=${bot}&sha256=${"0".repeat(64)}`, { method: "DELETE" })).status).toBe(409);- expect((await api(`/api/skill-burgers/invoice-to-priya?botId=${bot}&sha256=${renamed.body.skill.sha256}`, { method: "DELETE" })).body).toEqual({ removed: true });+ const read = await api("/api/skill-burgers/invoice-to-priya");+ expect((await api(`/api/skill-burgers/invoice-to-priya?sha256=${"0".repeat(64)}`, { method: "DELETE" })).status).toBe(409);+ expect((await api(`/api/skill-burgers/invoice-to-priya?sha256=${renamed.body.skill.sha256}`, { method: "DELETE" })).body).toEqual({ removed: true });expect(await names(api)).toEqual([]);expect((await api("/api/skill-burgers", send("POST", { name: "invoice-to-priya", workflow: read.body.workflow, botId: bot }))).status).toBe(201);- expect(await names(api)).toEqual([["invoice-to-priya", false]]);+ expect(await names(api)).toEqual(["invoice-to-priya"]);});it("refuses a conversation the person can't see or that isn't the bot's, and a run with nothing to save", async () => {@@ -84,7 +82,7 @@ it("refuses a conversation the person can't see or that isn't the bot's, and a rexpect((await api("/api/skill-burgers", send("POST", { botId: bot, threadId: "t3" }))).status).toBe(404);expect((await api("/api/skill-burgers", send("POST", { botId: bot, threadId: "t4" }))).status).toBe(422);expect((await api("/api/skill-burgers", send("POST", { name: "x", workflow: { version: 1 }, botId: bot }))).status).toBe(422);- expect((await api("/api/skill-burgers", send("POST", { name: "x", workflow: {}, botId: "gone" }))).status).toBe(404);+ expect((await api("/api/skill-burgers", send("POST", { name: "x", workflow: {}, botId: "gone" }))).status).toBe(422);});it("names a finished run with the bot's small text model, and says nothing when there is none", async () => {@@ -97,22 +95,21 @@ it("names a finished run with the bot's small text model, and says nothing when});-it("lets a Team member save and remove a burger on a bot they can edit, and keeps every chat an admin's", async () => {- let access: "none" | "view" | "chat" | "edit" = "edit";- const { api, bot } = await serve({ levelOf: () => access }, ["client"]);+it("lets a Team member who can chat with the bot add a burger for everyone, and only them or an admin change it", async () => {+ let access: "none" | "view" | "chat" | "edit" = "chat";+ let person = "[email protected]";+ const { api, bot } = await serve({ levelOf: () => access, actorOf: () => person }, ["client"]);const saved = await api("/api/skill-burgers", send("POST", { botId: bot, threadId: "t1", summary: "Send the invoice" }));expect(saved.status).toBe(201);const name = saved.body.skill.name as string;- const shared = await api(`/api/skill-burgers/${name}`, send("PATCH", { everyChat: true, botId: bot }));- expect(shared.status).toBe(403);- expect(shared.body.error).toMatch(/Only an admin/);- access = "chat";- expect((await api("/api/skill-burgers", send("POST", { botId: bot, threadId: "t1" }))).status).toBe(403);- expect((await api(`/api/skill-burgers/${name}?botId=${bot}`, { method: "DELETE" })).status).toBe(403);- expect((await names(api)).map(([found]: [string]) => found)).toContain(name);+ // Everyone on the Cloud sees it, even someone who can't reach that bot; only Ada may change it.+ person = "[email protected]";access = "none";- expect(await names(api)).toEqual([]);- expect((await api(`/api/skill-burgers/${name}?botId=${bot}`)).status).toBe(404);- access = "edit";- expect((await api(`/api/skill-burgers/${name}?botId=${bot}`, { method: "DELETE" })).status).toBe(200);+ expect((await api("/api/skill-burgers")).body.skills.map((skill: { name: string; canChange: boolean }) => [skill.name, skill.canChange])).toEqual([[name, false]]);+ expect((await api(`/api/skill-burgers/${name}`, send("PATCH", { rename: "mine-now" }))).status).toBe(403);+ expect((await api(`/api/skill-burgers/${name}`, { method: "DELETE" })).status).toBe(403);+ expect((await api("/api/skill-burgers", send("POST", { botId: bot, threadId: "t1" }))).status).toBe(403);+ person = "[email protected]";+ expect((await api("/api/skill-burgers")).body.skills[0].canChange).toBe(true);+ expect((await api(`/api/skill-burgers/${name}`, { method: "DELETE" })).status).toBe(200);});diff --git a/server/skill-burger/routes.ts b/server/skill-burger/routes.tsindex bf3009b93d..a9e4775a65 100644--- a/server/skill-burger/routes.ts+++ b/server/skill-burger/routes.ts@@ -1,7 +1,7 @@-// Skill Burger over HTTP. POST /api/skill-burgers saves the run in a conversation as that bot's workflow skill, built-// here from the stored messages (their full inputs and outputs, already scrubbed of held secrets); GET lists every saved-// one; PATCH turns "Use in every chat" on or off or renames one; DELETE with the sha256 it was saved with is its Undo.-// A query or body `botId` names a bot's own burger; without it the name is one used in every chat.+// Skill Burger over HTTP. POST /api/skill-burgers saves the run in a conversation as a workflow skill for every chat and+// every bot, built here from the stored messages (their full inputs and outputs, already scrubbed of held secrets); GET+// lists every saved one; PATCH renames one or undoes a change to its steps; DELETE with the sha256 it was saved with is its+// Undo. Whoever can chat with the bot that made a run may add it; only whoever saved it, or an admin, changes it.import { z } from "zod";import { draftFromLayers, draftWorkflow } from "../../shared/skill-burger/draft.ts";@@ -14,7 +14,7 @@ import { applyEdit, editUndo, insertFix } from "./edit.ts";import type { RunHistory } from "./history.ts";import type { RequestAuth } from "../request-auth.ts";import { PASS, type RouteHandler } from "../routes/table.ts";-import { findWorkflowSkill, listWorkflowSkills, readWorkflowSkill, removeWorkflowSkill, renameWorkflowSkill, replaceWorkflowSkill, saveWorkflowSkill, setWorkflowEveryChat, type BurgerPlace } from "./store.ts";+import { findWorkflowSkill, listWorkflowSkills, readWorkflowSkill, removeWorkflowSkill, renameWorkflowSkill, replaceWorkflowSkill, saveWorkflowSkill, saverOf } from "./store.ts";export const SKILL_BURGERS_PATH = "/api/skill-burgers";export const SKILL_BURGER_SUMMARY_PATH = "/api/skill-burger-summary";@@ -32,6 +32,8 @@ export interface SkillBurgerRouteDeps {summarize?(botId: string, prompt: string): Promise<string | null | undefined>;/** What this person may do with a bot: a Team Cloud member edits a bot's own burgers only where they can edit the bot. */levelOf?(auth: RequestAuth, botId: string): "none" | "view" | "chat" | "edit";+ /** The person making the request (a Team Cloud member's key), or null for this computer's own owner. */+ actorOf?(auth: RequestAuth): string | null;/** A teammate a run handed work to, by the id or name it used: its name and role now. */teammate?(idOrName: string): { id?: string; name: string; role?: string } | undefined;/** Each burger's recent runs. */@@ -39,9 +41,8 @@ export interface SkillBurgerRouteDeps {root?: string;}-/** A burger used in every chat belongs to the whole place: only an admin turns that on, renames or removes one. */-export const EVERY_CHAT_ADMIN_ONLY = "Only an admin of this installation can change this.";-const NOT_YOURS = "Only people who can edit this bot can change its Skill Burgers.";+const NOT_YOURS = "Only the person who saved this Skill Burger, or an admin, can change it.";+const CANT_ADD = "Only people who can chat with this bot can add its Skill Burgers.";const id = z.string().min(1).max(100);const summaryBody = z.object({ botId: id, threadId: z.string().min(1).max(200) }).strict();@@ -53,18 +54,17 @@ const choices = {const saveBody = z.union([z.object({ botId: id, threadId: z.string().min(1).max(200), summary: z.string().max(160).optional(), name: z.string().max(64).optional(), ...choices }).strict(),// Undo of a removal: the workflow the list read before removing it, put back where it was under its name.- z.object({ workflow: z.unknown(), name: z.string().max(64), botId: id.optional(), everyChat: z.boolean().optional() }).strict(),+ z.object({ workflow: z.unknown(), name: z.string().max(64), botId: id.optional() }).strict(),]);const patchBody = z.union([- z.object({ everyChat: z.boolean(), botId: id.optional(), sha256: z.string().max(64).optional() }).strict(),- z.object({ rename: z.string().min(1).max(64), botId: id.optional(), sha256: z.string().max(64).optional() }).strict(),+ z.object({ rename: z.string().min(1).max(64), sha256: z.string().max(64).optional() }).strict(),// Undo of a change to the steps: the id that change returned.- z.object({ undo: z.string().min(1).max(64), botId: id.optional() }).strict(),+ z.object({ undo: z.string().min(1).max(64) }).strict(),]);/** "Update the burger with this fix": what the bot did to get past a failed step goes in just before that step. */-const fixBody = z.object({ botId: id.optional(), runBotId: id, threadId: z.string().min(1).max(200), run: z.string().min(1).max(64), step: z.string().min(1).max(48) }).strict();+const fixBody = z.object({ runBotId: id, threadId: z.string().min(1).max(200), run: z.string().min(1).max(64), step: z.string().min(1).max(48) }).strict();/** One tap's "Add the path": the steps the bot did by judgement for a case nobody had saved, after the run handed it over. */-const pathBody = z.object({ botId: id.optional(), runBotId: id, threadId: z.string().min(1).max(200), run: z.string().min(1).max(64), decide: z.string().min(1).max(40), case: caseName }).strict();+const pathBody = z.object({ runBotId: id, threadId: z.string().min(1).max(200), run: z.string().min(1).max(64), decide: z.string().min(1).max(40), case: caseName }).strict();/** The tool rows of the bot's own steps between the run handing over `run` and the run going on: what it did by judgement. */export function judgementLayers(messages: readonly RunMessage[], run: string) {@@ -114,12 +114,16 @@ function createDecisionCache(limit = 200) {export function createSkillBurgerRoutes(deps: SkillBurgerRouteDeps): RouteHandler {const decisionsFor = createDecisionCache();- const placeOf = (botId: string | null | undefined): BurgerPlace => (botId ? { botId } : { everyChat: true });const admin = (auth: RequestAuth) => auth.scopes.includes("admin");const level = (auth: RequestAuth, botId: string) => (admin(auth) ? "edit" : deps.levelOf?.(auth, botId) ?? "none");- /** Null when this person may change the burger at `botId` (a bot's own) or in every chat (no botId); else the refusal. */- const refusal = (auth: RequestAuth, botId: string | null | undefined): string | null =>- botId ? (level(auth, botId) === "edit" ? null : NOT_YOURS) : admin(auth) ? null : EVERY_CHAT_ADMIN_ONLY;+ /** Whoever can chat with the bot that made a run may add it for everyone. */+ const mayAdd = (auth: RequestAuth, botId: string) => level(auth, botId) === "chat" || level(auth, botId) === "edit";+ /** Only whoever saved a burger, or an admin, renames it, removes it or changes its steps. */+ const mayChange = (auth: RequestAuth, name: string) => {+ if (admin(auth)) return true;+ const actor = deps.actorOf?.(auth);+ return Boolean(actor && saverOf(name, deps.root) === actor);+ };const drafted = (messages: readonly RunMessage[], summary?: string) => draftWorkflow(messages, { ...(summary ? { summary } : {}), ...(deps.teammate ? { teammate: deps.teammate } : {}) });return async ({ req, res, url, path, method, auth, json, readBody }) => {if (path === SKILL_BURGER_DRAFT_PATH) {@@ -156,30 +160,26 @@ export function createSkillBurgerRoutes(deps: SkillBurgerRouteDeps): RouteHandleif (path !== SKILL_BURGERS_PATH && !path.startsWith(`${SKILL_BURGERS_PATH}/`)) return PASS;const botIds = deps.botIds();if (path === SKILL_BURGERS_PATH) {- if (method === "GET") {- const visible = admin(auth) ? botIds : botIds.filter((botId) => level(auth, botId) !== "none");- return json(res, 200, { skills: listWorkflowSkills(visible, deps.root) });- }+ if (method === "GET") return json(res, 200, { skills: listWorkflowSkills(deps.root).map((skill) => ({ ...skill, canChange: mayChange(auth, skill.name) })) });if (method !== "POST") return json(res, 405, { error: "Use GET or POST." });const body = saveBody.safeParse(await readBody(req));if (!body.success) return json(res, 400, { error: "Send botId and threadId." });let saved;+ const savedBy = deps.actorOf?.(auth) ?? null;if ("workflow" in body.data) {- const { workflow, name, botId, everyChat } = body.data;- if (!everyChat && (!botId || !botIds.includes(botId))) return json(res, 404, { error: "No such bot." });- const refused = refusal(auth, everyChat ? null : botId);- if (refused) return json(res, 403, { error: refused });- saved = saveWorkflowSkill({ workflow, name, place: everyChat ? { everyChat: true } : { botId: botId! }, origin: botId, botIds, root: deps.root });+ // Undo of a removal: whoever removed it may put it back.+ const { workflow, name, botId } = body.data;+ if (!admin(auth) && !(botId && mayAdd(auth, botId))) return json(res, 403, { error: NOT_YOURS });+ saved = saveWorkflowSkill({ workflow, name, origin: botId, savedBy, botIds, root: deps.root });} else {const { botId, threadId, summary, name, skip, inputs } = body.data;if (!deps.owns(botId, threadId) || !deps.sees(auth, threadId)) return json(res, 404, { error: "No such conversation." });- const refused = refusal(auth, botId);- if (refused) return json(res, 403, { error: refused });+ if (!mayAdd(auth, botId)) return json(res, 403, { error: CANT_ADD });const draft = drafted(deps.messages(threadId), summary);if (!draft) return json(res, 422, { error: "This run has nothing to save yet." });const chosen = applyChoices(applyDecisions(draft.workflow, decisionsFor.find(threadId, draft.workflow)), { ...(skip ? { skip } : {}), ...(inputs ? { inputs } : {}) });if ("error" in chosen) return json(res, 422, { error: chosen.error });- saved = saveWorkflowSkill({ workflow: chosen, name, place: { botId }, botIds, root: deps.root });+ saved = saveWorkflowSkill({ workflow: chosen, name, origin: botId, savedBy, botIds, root: deps.root });}if ("error" in saved) return json(res, saved.taken ? 409 : 422, { error: saved.error });return json(res, 201, { skill: saved });@@ -189,20 +189,19 @@ export function createSkillBurgerRoutes(deps: SkillBurgerRouteDeps): RouteHandleif (method === "POST" && name.endsWith("/fix")) {const body = fixBody.safeParse(await readBody(req));if (!body.success) return json(res, 400, { error: "Send the run and the step it fixed." });- const { botId, runBotId, threadId, run, step } = body.data;+ const { runBotId, threadId, run, step } = body.data;const burger = name.slice(0, -"/fix".length);if (!deps.owns(runBotId, threadId) || !deps.sees(auth, threadId)) return json(res, 404, { error: "No such conversation." });- const refused = refusal(auth, botId);- if (refused) return json(res, 403, { error: refused });- const found = readWorkflowSkill(placeOf(botId), burger, deps.root);- const sha256 = listWorkflowSkills(botId ? [botId] : [], deps.root).find((skill) => skill.name === burger && skill.everyChat === !botId)?.sha256;+ if (!mayChange(auth, burger)) return json(res, 403, { error: NOT_YOURS });+ const found = readWorkflowSkill(burger, deps.root);+ const sha256 = listWorkflowSkills(deps.root).find((skill) => skill.name === burger)?.sha256;if (!found || !sha256) return json(res, 404, { error: "No such skill." });const layers = fixLayers(deps.messages(threadId), run);if (!layers.length) return json(res, 422, { error: "The bot did nothing to fix it that could be saved." });const fix = draftFromLayers(layers, askOf(deps.messages(threadId)) ?? "", found.workflow.summary, deps.teammate ? { teammate: deps.teammate } : {}).steps;const next = insertFix(found.workflow, step, fix);if ("error" in next) return json(res, 422, next);- const saved = replaceWorkflowSkill({ place: placeOf(botId), name: burger, workflow: next, sha256, root: deps.root });+ const saved = replaceWorkflowSkill({ name: burger, workflow: next, sha256, root: deps.root });if ("stale" in saved) return stale();if ("error" in saved) return json(res, 422, saved);return json(res, 200, { skill: saved, undo: editUndo.keep(burger, found.workflow, saved.sha256) });@@ -210,20 +209,19 @@ export function createSkillBurgerRoutes(deps: SkillBurgerRouteDeps): RouteHandleif (method === "POST" && name.endsWith("/paths")) {const body = pathBody.safeParse(await readBody(req));if (!body.success) return json(res, 400, { error: "Send the run, its decide step and the case." });- const { botId, runBotId, threadId, run, decide, case: chosen } = body.data;+ const { runBotId, threadId, run, decide, case: chosen } = body.data;const burger = name.slice(0, -"/paths".length);if (!deps.owns(runBotId, threadId) || !deps.sees(auth, threadId)) return json(res, 404, { error: "No such conversation." });- const refused = refusal(auth, botId);- if (refused) return json(res, 403, { error: refused });- const found = readWorkflowSkill(placeOf(botId), burger, deps.root);- const sha256 = listWorkflowSkills(botId ? [botId] : [], deps.root).find((skill) => skill.name === burger && skill.everyChat === !botId)?.sha256;+ if (!mayChange(auth, burger)) return json(res, 403, { error: NOT_YOURS });+ const found = readWorkflowSkill(burger, deps.root);+ const sha256 = listWorkflowSkills(deps.root).find((skill) => skill.name === burger)?.sha256;if (!found || !sha256) return json(res, 404, { error: "No such skill." });const layers = judgementLayers(deps.messages(threadId), run);if (!layers.length) return json(res, 422, { error: "The bot did nothing for this case that could be saved." });const steps = draftFromLayers(layers, askOf(deps.messages(threadId)) ?? "", found.workflow.summary).steps;const next = applyEdit(found.workflow, { action: "add_case", decide: { id: decide }, case: chosen, steps });if ("error" in next) return json(res, 422, next);- const saved = replaceWorkflowSkill({ place: placeOf(botId), name: burger, workflow: next, sha256, root: deps.root });+ const saved = replaceWorkflowSkill({ name: burger, workflow: next, sha256, root: deps.root });if ("stale" in saved) return stale();if ("error" in saved) return json(res, 422, saved);return json(res, 200, { skill: saved, undo: editUndo.keep(burger, found.workflow, saved.sha256) });@@ -239,37 +237,30 @@ export function createSkillBurgerRoutes(deps: SkillBurgerRouteDeps): RouteHandleif (runner) {if (level(auth, runner) === "none") return json(res, 404, { error: "No such skill." });const found = findWorkflowSkill(runner, name, deps.root);- return found ? json(res, 200, { workflow: found.workflow, everyChat: "everyChat" in found.place }) : json(res, 404, { error: "No such skill." });+ return found ? json(res, 200, { workflow: found.workflow }) : json(res, 404, { error: "No such skill." });}- const at = url.searchParams.get("botId");- if (at && level(auth, at) === "none") return json(res, 404, { error: "No such skill." });- const found = readWorkflowSkill(placeOf(at), name, deps.root);+ const found = readWorkflowSkill(name, deps.root);return found ? json(res, 200, found) : json(res, 404, { error: "No such skill." });}if (method === "PATCH") {const body = patchBody.safeParse(await readBody(req));- if (!body.success) return json(res, 400, { error: "Send everyChat or rename." });- // Moving a burger in or out of every chat, or renaming one there, is the place's call; renaming a bot's own is its editor's.- const refused = "everyChat" in body.data ? (admin(auth) ? null : EVERY_CHAT_ADMIN_ONLY) : refusal(auth, body.data.botId);- if (refused) return json(res, 403, { error: refused });+ if (!body.success) return json(res, 400, { error: "Send rename or undo." });+ if (!mayChange(auth, name)) return json(res, 403, { error: NOT_YOURS });if ("undo" in body.data) {const kept = editUndo.take(body.data.undo);if (!kept || kept.name !== name) return json(res, 404, { error: "There is nothing to undo." });- const restored = replaceWorkflowSkill({ place: placeOf(body.data.botId), name, workflow: kept.previous, sha256: kept.sha256, root: deps.root });+ const restored = replaceWorkflowSkill({ name, workflow: kept.previous, sha256: kept.sha256, root: deps.root });if ("stale" in restored) return stale();return "error" in restored ? json(res, 422, { error: restored.error }) : json(res, 200, { skill: restored });}- const result = "everyChat" in body.data- ? setWorkflowEveryChat({ name, everyChat: body.data.everyChat, botId: body.data.botId, sha256: body.data.sha256, root: deps.root })- : renameWorkflowSkill({ place: placeOf(body.data.botId), name, to: body.data.rename, botIds, sha256: body.data.sha256, root: deps.root });+ const result = renameWorkflowSkill({ name, to: body.data.rename, botIds, sha256: body.data.sha256, root: deps.root });if ("stale" in result) return stale();if ("error" in result) return json(res, result.taken ? 409 : 422, { error: result.error });return json(res, 200, { skill: result });}if (method === "DELETE") {- const refused = refusal(auth, url.searchParams.get("botId"));- if (refused) return json(res, 403, { error: refused });- const removed = removeWorkflowSkill(placeOf(url.searchParams.get("botId")), name, url.searchParams.get("sha256") ?? undefined, deps.root);+ if (!mayChange(auth, name)) return json(res, 403, { error: NOT_YOURS });+ const removed = removeWorkflowSkill(name, url.searchParams.get("sha256") ?? undefined, deps.root);if ("stale" in removed) return stale();if ("error" in removed) return json(res, 500, { error: removed.error });return json(res, 200, { removed: true });diff --git a/server/skill-burger/runner.test.ts b/server/skill-burger/runner.test.tsindex d3f4e8c11b..d35813d60b 100644--- a/server/skill-burger/runner.test.ts+++ b/server/skill-burger/runner.test.ts@@ -112,6 +112,24 @@ describe("running a Skill Burger", () => {});});+describe("connections", () => {+ it("asks for an app the bot isn't connected to before any step runs", async () => {+ const h = harness();+ h.deps.exec.connected = async () => ["slack"];+ const workflow = wf([{ id: "s1", kind: "shell", label: "Stage", run: "git add a.md" }, app("s2", "GMAIL_SEND_EMAIL", { to: "[email protected]" }), app("s3", "SLACK_SEND_MESSAGE", { text: "hi" })]);+ const result = await h.start(workflow);+ expect(result).toMatchObject({ ok: false, error: { type: "needs_connection", apps: ["gmail"] } });+ expect(result.error!.message).toContain("Gmail");+ expect(h.calls).toEqual([]);+ expect(h.events).toEqual([]);+ // Connected, or not known: it runs.+ h.deps.exec.connected = async () => ["gmail", "slack"];+ expect((await h.start(workflow)).status).toBe("ok");+ h.deps.exec.connected = async () => null;+ expect((await h.start(workflow)).status).toBe("ok");+ });+});+describe("cases", () => {const forked = (rules = true) => wf([app("s1", "GMAIL_FETCH_EMAILS", {}),diff --git a/server/skill-burger/runner.ts b/server/skill-burger/runner.tsindex 13baf12ea7..d29e8f7825 100644--- a/server/skill-burger/runner.ts+++ b/server/skill-burger/runner.ts@@ -8,6 +8,7 @@ import { randomUUID } from "node:crypto";import { caseOf, teammateNames, type Workflow, type WorkflowRef, type WorkflowStep } from "../../shared/skill-burger/format.ts";import { redactSecretsInText } from "../../shared/redact.ts";+import { appMeta } from "../../shared/skill-burger/apps.ts";import { collect, matchTeammates, missingPrompt, readReassignment, readReview, repliesText, reviewPrompt, sendRound, type DelegateExecutors, type DelegationState } from "./delegate-step.ts";export const STEP_TIMEOUT_MS = 60_000;@@ -78,7 +79,8 @@ export interface RunEnvelope {cases?: string[];resumeToken: string;};- error?: { type: "step_failed" | "timeout" | "output_too_large" | "runtime_error"; message: string; step?: string; resumeToken?: string };+ /** `needs_connection`: a step needs an app this bot isn't connected to; nothing ran, and `apps` names them. */+ error?: { type: "step_failed" | "timeout" | "output_too_large" | "runtime_error" | "needs_connection"; message: string; step?: string; resumeToken?: string; apps?: string[] };}export type ExecResult = { ok: true; output: unknown } | { ok: false; error: string; tooLarge?: true };@@ -88,6 +90,8 @@ export interface StepExecutors extends Partial<DelegateExecutors> {app(input: { app: string; tool: string; args: Record<string, unknown>; account?: string; signal: AbortSignal; maxBytes: number }): Promise<ExecResult>;browser(input: { url: string; signal: AbortSignal }): Promise<ExecResult>;file(input: { path: string; content: string; signal: AbortSignal }): Promise<ExecResult>;+ /** The apps this bot is connected to (their slugs), or null when that can't be told. */+ connected?(): Promise<readonly string[] | null>;}/** Each step's start and end, as the chat shows any tool call: the card reads these to cook and stack the run's layers. */@@ -326,7 +330,25 @@ async function execute(step: WorkflowStep, args: Record<string, unknown>, result/** A new run of `workflow`, from its first step. The envelope names the inputs the request didn't give, so the bot can* say which saved values it used instead of reusing them silently. */+const squash = (slug: string) => slug.toLowerCase().replace(/[^a-z0-9]/g, "");++/** The apps the steps every run takes need and this bot isn't connected to: asked for before anything runs, so a run+ * never stops halfway for a connection. A case's steps are checked by the connectors gate when the run gets there. */+export async function missingApps(workflow: Workflow, exec: StepExecutors): Promise<string[]> {+ const needed = [...new Set(workflow.steps.flatMap((step) => (step.kind === "app" && !step.when ? [step.app] : [])))];+ if (!needed.length || !exec.connected) return [];+ const connected = await exec.connected().catch(() => null);+ if (!connected) return [];+ const have = new Set(connected.map(squash));+ return needed.filter((app) => !have.has(squash(app)));+}+export async function startRun(input: { name: string; botId: string; threadId: string; sha256: string; workflow: Workflow; args?: Record<string, unknown> }, deps: RunDeps): Promise<RunEnvelope> {+ const missing = await missingApps(input.workflow, deps.exec);+ if (missing.length) {+ const names = missing.map((app) => appMeta(app).label);+ return { protocolVersion: 1, ok: false, run: randomUUID(), steps: [], error: { type: "needs_connection", apps: missing, message: `Nothing ran: this Skill Burger needs ${names.join(", ")}, which ${names.length > 1 ? "aren't" : "isn't"} connected for this bot.` } };+ }const given = input.args ?? {};const defaults = Object.entries(input.workflow.args).filter(([name, arg]) => !Object.hasOwn(given, name) && arg.default !== undefined).map(([name, arg]) => ({ name, value: arg.default }));const envelope = await runFrom({ id: randomUUID(), name: input.name, botId: input.botId, threadId: input.threadId, sha256: input.sha256, workflow: input.workflow, args: runArgs(input.workflow, input.args), results: {}, from: 0 }, deps);diff --git a/server/skill-burger/runs.test.ts b/server/skill-burger/runs.test.tsindex 5b00f6e5f0..3e876b8795 100644--- a/server/skill-burger/runs.test.ts+++ b/server/skill-burger/runs.test.ts@@ -32,7 +32,7 @@ async function serve() {{ id: "s3", kind: "app", app: "gmail", tool: "GMAIL_SEND_EMAIL", label: "Send email", args: { to: { $arg: "to" }, body: { $step: "s2" } } },],});- saveWorkflowSkill({ workflow, place: { botId: bot }, botIds: [bot], root });+ saveWorkflowSkill({ workflow, origin: bot, botIds: [bot], root });const runs = createSkillBurgerRuns({dataDir: root, root,executors: () => ({@@ -40,7 +40,8 @@ async function serve() {shell: async () => ({ ok: true, output: "" }), browser: async () => ({ ok: true, output: "" }), file: async () => ({ ok: true, output: "" }),}),});- const turnFor = (botId: string): BurgerTurn => ({ botId, threadId: "t1", cwd: root, mayEditEveryChat: false, internal: async () => ({ ok: false, body: {} }), publish: (event) => events.push(event) });+ let mayEdit = true;+ const turnFor = (botId: string): BurgerTurn => ({ botId, threadId: "t1", cwd: root, mayEditBurgers: mayEdit, internal: async () => ({ ok: false, body: {} }), publish: (event) => events.push(event) });let as = bot;const server = createServer(async (req, res) => {const url = new URL(req.url ?? "/", "http://localhost");@@ -50,7 +51,7 @@ async function serve() {await new Promise<void>((ready) => server.listen(0, "127.0.0.1", ready));const base = `http://127.0.0.1:${(server.address() as AddressInfo).port}`;const post = async (path: string, body: unknown) => (await fetch(`${base}${path}`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(body) })).json() as Promise<Record<string, any>>;- return { post, events, calls, bot, actAs: (id: string) => { as = id; } };+ return { post, events, calls, bot, actAs: (id: string) => { as = id; }, teamCloud: () => { mayEdit = false; } };}it("runs a bot's Skill Burger, hands its AI step back, and goes on once the bot resumes it", async () => {@@ -82,3 +83,13 @@ it("changes the steps when asked, with an undo, and refuses a burger that isn'texpect(await h.post("/api/internal/skill-burgers/undo", { undo: changed.undo })).toHaveProperty("error");expect(await h.post("/api/internal/skill-burgers/run", { name: "nope" })).toHaveProperty("error");});++it("runs a burger saved from one bot from any other bot, and on a Team Cloud a bot can't change one", async () => {+ const h = await serve();+ h.actAs("a-different-bot");+ const paused = await h.post("/api/internal/skill-burgers/run", { name: "email-the-sheet" });+ expect(paused).toMatchObject({ ok: true, status: "needs_input", requiresInput: { type: "ai_step", step: "s2" } });+ expect(await h.post("/api/internal/skill-burgers/resume", { run: paused.run, response: "Fine." })).toMatchObject({ ok: true, status: "ok" });+ h.teamCloud();+ expect((await h.post("/api/internal/skill-burgers/edit", { name: "email-the-sheet", action: "set_when", step: "s3", when: { $step: "s1", op: "exists" } })).error).toMatch(/whoever saved it/);+});diff --git a/server/skill-burger/runs.ts b/server/skill-burger/runs.tsindex 1f0e5e7818..cac20a0603 100644--- a/server/skill-burger/runs.ts+++ b/server/skill-burger/runs.ts@@ -30,15 +30,17 @@ export interface StepEvent {output?: string;}-export interface BurgerTurn extends Pick<ExecutorContext, "internal"> {+export interface BurgerTurn extends Pick<ExecutorContext, "internal" | "connected"> {botId: string;threadId: string;cwd: string;publish(event: StepEvent): void;- /** A burger used in every chat belongs to the whole place: whether this turn may change one. */- mayEditEveryChat: boolean;+ /** Saved burgers are everyone's: whether a bot's own turn may change one (not on a Team Cloud, where only whoever saved+ * it, or an admin, does). */+ mayEditBurgers: boolean;}+const CANT_EDIT = "On a Team Cloud a bot can't change a saved Skill Burger: whoever saved it, or an admin, can.";const runBody = z.object({ name: z.string().min(1).max(64), args: z.record(z.string(), z.unknown()).optional() }).strict();const resumeBody = z.object({ run: z.string().min(1).max(64), response: z.string().max(20_000) }).strict();const undoBody = z.object({ undo: z.string().min(1).max(64) }).strict();@@ -78,7 +80,7 @@ export function createSkillBurgerRuns(deps: { dataDir: string; root?: string; hoconst history = createRunHistory(join(deps.dataDir, "skill-burger-runs"));const open = new Map<string, Set<string>>();const runDeps = (turn: BurgerTurn): RunDeps => ({- exec: deps.executors?.(turn) ?? createExecutors({ botId: turn.botId, cwd: turn.cwd, internal: turn.internal }),+ exec: deps.executors?.(turn) ?? createExecutors({ botId: turn.botId, cwd: turn.cwd, internal: turn.internal, ...(turn.connected ? { connected: turn.connected } : {}) }),events: stepEvents(turn, open),save: (state) => states.save(state),});@@ -112,8 +114,8 @@ export function createSkillBurgerRuns(deps: { dataDir: string; root?: string; hoif (!kept) return json(res, 404, { error: "There is nothing to undo with that id." });const found = findWorkflowSkill(turn.botId, kept.name, deps.root);if (!found) return json(res, 404, { error: "That Skill Burger is gone." });- if ("everyChat" in found.place && !turn.mayEditEveryChat) return json(res, 403, { error: "Only an admin of this installation can change a Skill Burger used in every chat." });- const restored = replaceWorkflowSkill({ place: found.place, name: kept.name, workflow: kept.previous, sha256: kept.sha256, root: deps.root });+ if (!turn.mayEditBurgers) return json(res, 403, { error: CANT_EDIT });+ const restored = replaceWorkflowSkill({ name: kept.name, workflow: kept.previous, sha256: kept.sha256, root: deps.root });if ("stale" in restored) return json(res, 409, { error: "The Skill Burger changed since; undo isn't safe now." });return "error" in restored ? json(res, 422, restored) : json(res, 200, { skill: restored });}@@ -124,10 +126,10 @@ export function createSkillBurgerRuns(deps: { dataDir: string; root?: string; hoif (!name || !edit.success) return json(res, 400, { error: `workflow_edit needs name and a change: ${edit.success ? "name" : edit.error.issues[0]?.message ?? ""}` });const found = findWorkflowSkill(turn.botId, name, deps.root);if (!found) return json(res, 404, { error: `No Skill Burger named "${name}" here.` });- if ("everyChat" in found.place && !turn.mayEditEveryChat) return json(res, 403, { error: "Only an admin of this installation can change a Skill Burger used in every chat." });+ if (!turn.mayEditBurgers) return json(res, 403, { error: CANT_EDIT });const next = applyEdit(found.workflow, edit.data);if ("error" in next) return json(res, 422, next);- const saved = replaceWorkflowSkill({ place: found.place, name, workflow: next, sha256: found.sha256, root: deps.root });+ const saved = replaceWorkflowSkill({ name, workflow: next, sha256: found.sha256, root: deps.root });if ("stale" in saved) return json(res, 409, { error: "The Skill Burger changed meanwhile; read it again and retry." });if ("error" in saved) return json(res, 422, saved);return json(res, 200, { skill: saved, undo: editUndo.keep(name, found.workflow, saved.sha256) });diff --git a/server/skill-burger/store.test.ts b/server/skill-burger/store.test.tsindex 55caa1a678..b6e5d34787 100644--- a/server/skill-burger/store.test.ts+++ b/server/skill-burger/store.test.ts@@ -3,10 +3,11 @@ import { tmpdir } from "node:os";import { join } from "node:path";import { describe, expect, it } from "vitest";-import { WORKFLOW_FILE, type Workflow } from "../../shared/skill-burger/format.ts";+import { renderWorkflowSkillMd, WORKFLOW_FILE, type Workflow } from "../../shared/skill-burger/format.ts";+import { burgerSource } from "../../shared/skill-burger/saved.ts";import { librarySkillDirectory, readSkillLibraryIndex } from "../skill-library.ts";-import { listSkills, skillsSystemPrompt } from "../skills.ts";-import { listWorkflowSkills, readWorkflowSkill, removeWorkflowSkill, renameWorkflowSkill, saveWorkflowSkill, setWorkflowEveryChat, workflowSkillsPrompt } from "./store.ts";+import { installSkill, listSkills, setSkillEnabled } from "../skills.ts";+import { findWorkflowSkill, listWorkflowSkills, migrateBotBurgers, readWorkflowSkill, removeWorkflowSkill, renameWorkflowSkill, saveWorkflowSkill, saverOf, workflowSkillsPrompt } from "./store.ts";const workflow: Workflow = {version: 1,@@ -25,71 +26,92 @@ const fixture = () => {return { root, bot, botIds: [bot] };};+/** A burger the way one bot kept it as its own skill, before burgers were for every chat. */+function oldBotBurger(bot: string, name: string, saved: Workflow = workflow) {+ installSkill(bot, burgerSource(bot), [{ path: "SKILL.md", content: renderWorkflowSkillMd(name, saved) }, { path: WORKFLOW_FILE, content: JSON.stringify(saved) }]);+ setSkillEnabled(bot, name, true);+}+describe("saved burgers", () => {- it("saves a run to the bot that made it, as that bot's own skill with its steps beside it", () => {+ it("saves a run for every chat and every bot, remembering the bot it was made with and who saved it", () => {const { root, bot, botIds } = fixture();- const saved = saveWorkflowSkill({ workflow, place: { botId: bot }, botIds, root });+ const saved = saveWorkflowSkill({ workflow, origin: bot, savedBy: "[email protected]", botIds, root });if ("error" in saved) throw new Error(saved.error);- expect(saved).toMatchObject({ name: "email-the-weekly-sales-sheet-to", everyChat: false, botId: bot, args: ["recipient"] });+ expect(saved).toMatchObject({ name: "email-the-weekly-sales-sheet-to", botId: bot, args: ["recipient"] });expect(saved.layers.map((layer) => [layer.kind, layer.app])).toEqual([["app", "googlesheets"], ["ai", undefined], ["app", "gmail"]]);- expect(listSkills(bot)).toEqual([expect.objectContaining({ name: saved.name, enabled: true, source: `skill-burger:${bot}` })]);- expect(readSkillLibraryIndex(root)).toEqual({});- expect(readWorkflowSkill({ botId: bot }, saved.name, root)).toMatchObject({ workflow });- expect(skillsSystemPrompt(bot)).toContain(`- ${saved.name}: ${workflow.summary}`);- expect(workflowSkillsPrompt(bot, root)).toBe("");- expect(listWorkflowSkills(botIds, root).map((skill) => [skill.name, skill.everyChat])).toEqual([[saved.name, false]]);- });-- it("turns Use in every chat on and off: into the library for every bot, then back to the bot it came from", () => {- const { root, bot, botIds } = fixture();- const saved = saveWorkflowSkill({ workflow, place: { botId: bot }, botIds, root });- if ("error" in saved) throw new Error(saved.error);- const shared = setWorkflowEveryChat({ name: saved.name, everyChat: true, botId: bot, sha256: saved.sha256, root });- expect(shared).toMatchObject({ name: saved.name, everyChat: true, botId: bot });expect(readSkillLibraryIndex(root)[saved.name]).toMatchObject({ everyBot: true, reviewState: "approved", tags: ["workflow"], source: `skill-burger:${bot}`, files: [WORKFLOW_FILE] });expect(JSON.parse(readFileSync(join(librarySkillDirectory(root, saved.name), WORKFLOW_FILE), "utf8"))).toEqual(workflow);expect(listSkills(bot)).toEqual([]);+ expect(saverOf(saved.name, root)).toBe("[email protected]");+ expect(readWorkflowSkill(saved.name, root)).toMatchObject({ workflow });expect(workflowSkillsPrompt("any-other-bot", root)).toContain(`- ${saved.name}: ${workflow.summary} Read`);-- const back = setWorkflowEveryChat({ name: saved.name, everyChat: false, root });- expect(back).toMatchObject({ name: saved.name, everyChat: false, botId: bot });- expect(readSkillLibraryIndex(root)).toEqual({});- expect(listSkills(bot).map((skill) => skill.name)).toEqual([saved.name]);+ // Any bot finds it to run.+ expect(findWorkflowSkill("any-other-bot", saved.name, root)).toMatchObject({ workflow });+ expect(listWorkflowSkills(root).map((skill) => skill.name)).toEqual([saved.name]);});it("refuses a taken or malformed name and a workflow that isn't one", () => {const { root, bot, botIds } = fixture();- saveWorkflowSkill({ workflow, name: "sales-email", place: { botId: bot }, botIds, root });- expect(saveWorkflowSkill({ workflow, name: "sales-email", place: { everyChat: true }, botIds, root })).toMatchObject({ taken: true });- expect(saveWorkflowSkill({ workflow, name: "Sales Email", place: { botId: bot }, botIds, root })).toHaveProperty("error");- expect(saveWorkflowSkill({ workflow: { ...workflow, steps: [] }, place: { botId: bot }, botIds, root })).toHaveProperty("error");- expect(saveWorkflowSkill({ workflow, place: { botId: bot }, botIds, root })).toMatchObject({ name: "sales-email" });+ saveWorkflowSkill({ workflow, name: "sales-email", origin: bot, botIds, root });+ expect(saveWorkflowSkill({ workflow, name: "sales-email", origin: bot, botIds, root })).toMatchObject({ taken: true });+ expect(saveWorkflowSkill({ workflow, name: "Sales Email", origin: bot, botIds, root })).toHaveProperty("error");+ expect(saveWorkflowSkill({ workflow: { ...workflow, steps: [] }, origin: bot, botIds, root })).toHaveProperty("error");+ expect(saveWorkflowSkill({ workflow, origin: bot, botIds, root })).toMatchObject({ name: "sales-email" });});- it("renames in place, and undoes a save, but never a copy that changed since", () => {+ it("renames in place, keeping who saved it, and undoes a save, but never a copy that changed since", () => {const { root, bot, botIds } = fixture();- const saved = saveWorkflowSkill({ workflow, place: { botId: bot }, botIds, root });+ const saved = saveWorkflowSkill({ workflow, origin: bot, savedBy: "[email protected]", botIds, root });if ("error" in saved) throw new Error(saved.error);- const renamed = renameWorkflowSkill({ place: { botId: bot }, name: saved.name, to: "weekly-sales", botIds, root });+ const renamed = renameWorkflowSkill({ name: saved.name, to: "weekly-sales", botIds, root });if ("error" in renamed || "stale" in renamed) throw new Error("rename failed");- expect(readWorkflowSkill({ botId: bot }, "weekly-sales", root)?.text).toContain("name: weekly-sales");- expect(removeWorkflowSkill({ botId: bot }, "weekly-sales", "0".repeat(64), root)).toEqual({ stale: true });- expect(removeWorkflowSkill({ botId: bot }, "weekly-sales", renamed.sha256, root)).toEqual({ removed: true });- expect(listWorkflowSkills(botIds, root)).toEqual([]);+ expect(readWorkflowSkill("weekly-sales", root)?.text).toContain("name: weekly-sales");+ expect(saverOf("weekly-sales", root)).toBe("[email protected]");+ expect(saverOf(saved.name, root)).toBeUndefined();+ expect(removeWorkflowSkill("weekly-sales", "0".repeat(64), root)).toEqual({ stale: true });+ expect(removeWorkflowSkill("weekly-sales", renamed.sha256, root)).toEqual({ removed: true });+ expect(listWorkflowSkills(root)).toEqual([]);- const again = saveWorkflowSkill({ workflow, place: { everyChat: true }, origin: bot, botIds, root });+ const again = saveWorkflowSkill({ workflow, origin: bot, botIds, root });if ("error" in again) throw new Error(again.error);writeFileSync(join(librarySkillDirectory(root, again.name), WORKFLOW_FILE), "{}");- expect(listWorkflowSkills(botIds, root)).toEqual([]);- expect(removeWorkflowSkill({ everyChat: true }, again.name, again.sha256, root)).toEqual({ stale: true });+ expect(listWorkflowSkills(root)).toEqual([]);+ expect(removeWorkflowSkill(again.name, again.sha256, root)).toEqual({ stale: true });+ });++ it("moves each bot's own burgers into every chat once, keeping both on a name clash and overwriting nothing", () => {+ const { root, bot } = fixture();+ const other = `${bot}-b`;+ const changed: Workflow = { ...workflow, summary: "Email the sales sheet to Sam" };+ // One already used in every chat holds the name the first bot's burger has.+ const there = saveWorkflowSkill({ workflow: changed, name: "sales-email", origin: other, botIds: [], root });+ if ("error" in there) throw new Error(there.error);+ oldBotBurger(bot, "sales-email");+ oldBotBurger(other, "weekly-numbers", changed);+ expect(findWorkflowSkill(bot, "sales-email", root)).toMatchObject({ workflow: changed });++ const moved = migrateBotBurgers([bot, other], root);+ expect(moved).toEqual([{ botId: bot, from: "sales-email", to: "sales-email-2" }, { botId: other, from: "weekly-numbers", to: "weekly-numbers" }]);+ expect(listSkills(bot)).toEqual([]);+ expect(listSkills(other)).toEqual([]);+ expect(readWorkflowSkill("sales-email", root)?.workflow).toEqual(changed);+ expect(readWorkflowSkill("sales-email-2", root)?.workflow).toEqual(workflow);+ expect(listWorkflowSkills(root).map((skill) => [skill.name, skill.botId]).sort()).toEqual([["sales-email", other], ["sales-email-2", bot], ["weekly-numbers", other]]);+ // Again: nothing left to move, nothing written twice.+ expect(migrateBotBurgers([bot, other], root)).toEqual([]);+ expect(listWorkflowSkills(root)).toHaveLength(3);+ // A move cut off after writing (the bot's copy still there) only takes the bot's copy away on the next start.+ oldBotBurger(bot, "sales-email-2");+ expect(migrateBotBurgers([bot], root)).toEqual([{ botId: bot, from: "sales-email-2", to: "sales-email-2" }]);+ expect(listWorkflowSkills(root)).toHaveLength(3);});});it("saving the same run again from the same bot gives back the burger it already saved", () => {const root = mkdtempSync(join(tmpdir(), "burger-"));const bot = `burger-bot-${Math.random().toString(36).slice(2, 10)}`;- const first = saveWorkflowSkill({ workflow, place: { botId: bot }, botIds: [bot], root });- const again = saveWorkflowSkill({ workflow, place: { botId: bot }, botIds: [bot], root });+ const first = saveWorkflowSkill({ workflow, origin: bot, botIds: [bot], root });+ const again = saveWorkflowSkill({ workflow, origin: bot, botIds: [bot], root });expect(again).toEqual(first);- expect(listWorkflowSkills([bot], root)).toHaveLength(1);+ expect(listWorkflowSkills(root)).toHaveLength(1);});diff --git a/server/skill-burger/store.ts b/server/skill-burger/store.tsindex 9d54c039a9..33aa5d3ef3 100644--- a/server/skill-burger/store.ts+++ b/server/skill-burger/store.ts@@ -1,8 +1,8 @@-// Saved burgers are ordinary skill folders (SKILL.md + workflow.json). One belongs to the bot it was made with, as that-// bot's own skill, until someone turns on "Use in every chat": then it moves into the shared skills library, tagged-// "workflow" and on for every bot, and turning it off moves it back. Library ones are listed to every bot whether or not+// Saved burgers are ordinary skill folders (SKILL.md + workflow.json) in the shared skills library, tagged "workflow" and+// on for every bot: whoever saves one, every chat and every bot can use it. They are listed to every bot whether or not// the library is switched on. Undo, rename and remove act on the exact copy they saw and refuse one that changed since.-import { readFileSync } from "node:fs";+// Burgers once kept as one bot's own skills move into the library once (migrateBotBurgers).+import { mkdirSync, readFileSync, writeFileSync } from "node:fs";import { join } from "node:path";import { burgerBotOf, burgerSource, isBurgerSource, type SavedWorkflow } from "../../shared/skill-burger/saved.ts";@@ -12,15 +12,15 @@ import {installLibrarySkill, librarySkillDirectory, librarySkillFilePath, librarySkillOptOuts, listLibrarySkills, readSkillLibraryIndex,retireLibrarySkill, setLibrarySkillEveryBot, skillsLibraryRoot,} from "../skill-library.ts";-import { installSkill, listSkills, readManifest, removeSkill, setSkillEnabled, skillDirectory } from "../skills.ts";+import { listSkills, readManifest, removeSkill, skillDirectory } from "../skills.ts";export type { SavedWorkflow };const PROMPT_MAX_SKILLS = 20;const PROMPT_MAX_BYTES = 2_000;-/** Where a saved burger is: one bot's own skills, or the shared library. */-export type BurgerPlace = { botId: string } | { everyChat: true };+/** Where a saved burger is: the shared library, or (saved before burgers were for every chat, until moved) one bot's own. */+type BurgerPlace = { botId: string } | { everyChat: true };type Failure = { error: string; taken?: true };function parsed(path: string | null): Workflow | null {@@ -52,36 +52,51 @@ function readAt(place: BurgerPlace, name: string, root: string): { workflow: Worreturn workflow && entry ? { workflow, sha256: entry.sha256, botId: place.botId } : null;}-const listed = (name: string, workflow: Workflow, sha256: string, savedAt: string, everyChat: boolean, botId: string | undefined): SavedWorkflow => ({- name, summary: workflow.summary, sha256, savedAt, everyChat, ...(botId ? { botId } : {}),+const listed = (name: string, workflow: Workflow, sha256: string, savedAt: string, botId: string | undefined): SavedWorkflow => ({+ name, summary: workflow.summary, sha256, savedAt, ...(botId ? { botId } : {}),layers: workflow.steps.map((step) => { const on = caseOf(step); return { id: step.id, kind: step.kind, label: step.label, ...(step.kind === "app" ? { app: step.app } : {}), ...(step.kind === "decide" ? { cases: step.cases } : {}), ...(on ? { on } : {}) }; }),args: Object.keys(workflow.args),});-/** Every saved burger whose files are as saved: the library's, then each of `botIds`' own; newest first. */-export function listWorkflowSkills(botIds: readonly string[], root: string = skillsLibraryRoot()): SavedWorkflow[] {+const GLOBAL = { everyChat: true } as const;+const SAVERS_FILE = "skill-burger-savers.json";++/** Who saved each burger (a person's key), so only they or an admin rename or remove it. One moved from a bot has none. */+function savers(root: string): Record<string, string> {+ try {+ const value: unknown = JSON.parse(readFileSync(join(root, SAVERS_FILE), "utf8"));+ return value && typeof value === "object" && !Array.isArray(value) ? value as Record<string, string> : {};+ } catch {+ return {};+ }+}+function setSaver(root: string, name: string, saver: string | null | undefined, from?: string): void {+ const all = savers(root);+ if (from !== undefined) delete all[from];+ if (saver) all[name] = saver;+ else delete all[name];+ mkdirSync(root, { recursive: true });+ writeFileSync(join(root, SAVERS_FILE), `${JSON.stringify(all, null, 2)}\n`);+}+export const saverOf = (name: string, root: string = skillsLibraryRoot()): string | undefined => savers(root)[name];++/** Every saved burger whose files are as saved; newest first. They are all used in every chat, by every bot. */+export function listWorkflowSkills(root: string = skillsLibraryRoot()): SavedWorkflow[] {const index = readSkillLibraryIndex(root);- const shared = listLibrarySkills(root)+ return listLibrarySkills(root).filter((skill) => skill.enabled && skill.tags?.includes(WORKFLOW_TAG)).flatMap((skill) => {- const found = readAt({ everyChat: true }, skill.name, root);- return found ? [listed(skill.name, found.workflow, found.sha256, index[skill.name]!.importedAt, true, found.botId)] : [];- });- const own = botIds.flatMap((botId) => listSkills(botId)- .filter((skill) => skill.enabled && isBurgerSource(skill.source))- .flatMap((skill) => {- const found = readAt({ botId }, skill.name, root);- return found ? [listed(skill.name, found.workflow, found.sha256, skill.importedAt, false, botId)] : [];- }));- return [...shared, ...own].sort((a, b) => b.savedAt.localeCompare(a.savedAt));+ const found = readAt(GLOBAL, skill.name, root);+ return found ? [listed(skill.name, found.workflow, found.sha256, index[skill.name]!.importedAt, found.botId)] : [];+ })+ .sort((a, b) => b.savedAt.localeCompare(a.savedAt));}-export function readWorkflowSkill(place: BurgerPlace, name: string, root: string = skillsLibraryRoot()): { text: string; workflow: Workflow } | null {- const found = readAt(place, name, root);+export function readWorkflowSkill(name: string, root: string = skillsLibraryRoot()): { text: string; workflow: Workflow } | null {+ const found = readAt(GLOBAL, name, root);if (!found) return null;try {- const file = "everyChat" in place ? librarySkillFilePath(name, root) : join(botFolder(place.botId, name)!, "SKILL.md");- return { text: readFileSync(file, "utf8"), workflow: found.workflow };+ return { text: readFileSync(librarySkillFilePath(name, root), "utf8"), workflow: found.workflow };} catch {return null;}@@ -91,51 +106,39 @@ function taken(botIds: readonly string[], root: string): Set<string> {return new Set([...Object.keys(readSkillLibraryIndex(root)), ...botIds.flatMap((botId) => Object.keys(readManifest(botId)))]);}-/** Writes a checked workflow to `place` under `name`; the caller has made sure the name is free there. */-function write(place: BurgerPlace, name: string, workflow: Workflow, origin: string | undefined, root: string): SavedWorkflow | Failure {+/** Writes a checked workflow under `name` for every chat; the caller has made sure the name is free. `origin`: the bot+ * it was made with. */+function write(name: string, workflow: Workflow, origin: string | undefined, root: string): SavedWorkflow | Failure {const body = `${JSON.stringify(workflow, null, 2)}\n`;if (Buffer.byteLength(body, "utf8") > WORKFLOW_MAX_BYTES) return { error: "This run is too large to save as a skill." };- const files = [{ path: "SKILL.md", content: renderWorkflowSkillMd(name, workflow) }, { path: WORKFLOW_FILE, content: body }];- const botId = "botId" in place ? place.botId : origin;- const source = botId ? burgerSource(botId) : "skill-burger";- if ("everyChat" in place) {- const installed = installLibrarySkill({ name, instructions: files[0]!.content, source, tags: [WORKFLOW_TAG], reviewState: "approved", files: [files[1]!], root });- if ("error" in installed) return { error: installed.error };- const everyBot = setLibrarySkillEveryBot(name, true, root);- if ("error" in everyBot) return { error: everyBot.error };- } else {- const installed = installSkill(place.botId, source, files);- if ("error" in installed) return { error: installed.error };- const enabled = setSkillEnabled(place.botId, name, true);- if ("error" in enabled) return { error: enabled.error };- }- const stored = listWorkflowSkills("botId" in place ? [place.botId] : [], root).find((skill) => skill.name === name && skill.everyChat === ("everyChat" in place));- return stored ?? { error: "The skill was saved but can't be read back." };+ const installed = installLibrarySkill({+ name, instructions: renderWorkflowSkillMd(name, workflow), source: origin ? burgerSource(origin) : "skill-burger", tags: [WORKFLOW_TAG],+ reviewState: "approved", files: [{ path: WORKFLOW_FILE, content: body }], root,+ });+ if ("error" in installed) return { error: installed.error };+ const everyBot = setLibrarySkillEveryBot(name, true, root);+ if ("error" in everyBot) return { error: everyBot.error };+ return listWorkflowSkills(root).find((skill) => skill.name === name) ?? { error: "The skill was saved but can't be read back." };}-/** Takes away the copy at `place` with this hash. */-function erase(place: BurgerPlace, name: string, sha256: string, root: string): { removed: true } | { stale: true } | { error: string } {- const found = readAt(place, name, root);+/** Takes away the copy with this hash. */+function erase(name: string, sha256: string, root: string): { removed: true } | { stale: true } | { error: string } {+ const found = readAt(GLOBAL, name, root);if (!found || found.sha256 !== sha256) return { stale: true };- if ("everyChat" in place) {- const result = retireLibrarySkill(name, sha256, root);- return "retired" in result ? { removed: true } : result;- }- const result = removeSkill(place.botId, name);- return "removed" in result ? { removed: true } : result;+ const result = retireLibrarySkill(name, sha256, root);+ return "retired" in result ? { removed: true } : result;}-/** Saves a run to `place` (the bot that made it, unless it is put back where it was). `name` is the person's own, or one- * made from the summary; it is free across the library and `botIds`, so turning it on for every chat never collides. */-export function saveWorkflowSkill(input: { workflow: unknown; place: BurgerPlace; botIds: readonly string[]; name?: string; origin?: string; root?: string }): SavedWorkflow | Failure {+/** Saves a run for every chat and every bot. `name` is the person's own, or one made from the summary, free across the+ * library and every bot's own skills; the same run saved again from the same bot is the copy already there. */+export function saveWorkflowSkill(input: { workflow: unknown; botIds: readonly string[]; name?: string; origin?: string; savedBy?: string | null; root?: string }): SavedWorkflow | Failure {const root = input.root ?? skillsLibraryRoot();const checked = workflowSchema.safeParse(input.workflow);if (!checked.success) return { error: "This run can't be saved as a skill." };const asked = input.name?.trim();- const origin = "botId" in input.place ? input.place.botId : input.origin;const same = JSON.stringify(checked.data);if (!asked) {- const already = listWorkflowSkills(input.botIds, root).find((skill) => skill.botId === origin && JSON.stringify(readAt(skill.everyChat ? { everyChat: true } : { botId: skill.botId! }, skill.name, root)?.workflow) === same);+ const already = listWorkflowSkills(root).find((skill) => skill.botId === input.origin && JSON.stringify(readAt(GLOBAL, skill.name, root)?.workflow) === same);if (already) return already;}const names = taken(input.botIds, root);@@ -143,83 +146,92 @@ export function saveWorkflowSkill(input: { workflow: unknown; place: BurgerPlaceif (!isSkillName(asked)) return { error: "Use lowercase letters, numbers and hyphens for the name." };if (names.has(asked)) return { error: "That name is taken. Try another.", taken: true };}- return write(input.place, asked || workflowSkillName(checked.data.summary, names), checked.data, input.origin, root);+ const saved = write(asked || workflowSkillName(checked.data.summary, names), checked.data, input.origin, root);+ if (!("error" in saved)) setSaver(root, saved.name, input.savedBy);+ return saved;}/** Undo or remove: takes away the copy with this hash, so it never removes one someone changed since. */-export function removeWorkflowSkill(place: BurgerPlace, name: string, sha256: string | undefined, root: string = skillsLibraryRoot()) {- const found = readAt(place, name, root);+export function removeWorkflowSkill(name: string, sha256: string | undefined, root: string = skillsLibraryRoot()) {+ const found = readAt(GLOBAL, name, root);if (!found) return { stale: true } as const;- return erase(place, name, sha256 ?? found.sha256, root);+ const gone = erase(name, sha256 ?? found.sha256, root);+ if ("removed" in gone) setSaver(root, name, null);+ return gone;}-/** "Use in every chat": on moves a bot's burger into the shared library, off moves it back to the bot it came from. */-export function setWorkflowEveryChat(input: { name: string; everyChat: boolean; botId?: string; sha256?: string; root?: string }): SavedWorkflow | Failure | { stale: true } {- const root = input.root ?? skillsLibraryRoot();- const from: BurgerPlace = input.everyChat ? { botId: input.botId ?? "" } : { everyChat: true };- const found = readAt(from, input.name, root);- if (!found || (input.sha256 && found.sha256 !== input.sha256)) return { stale: true };- const to: BurgerPlace = input.everyChat ? { everyChat: true } : { botId: found.botId ?? "" };- if ("botId" in to && !to.botId) return { error: "The bot this Skill Burger came from is gone." };- if ("everyChat" in to ? readSkillLibraryIndex(root)[input.name] : readManifest(to.botId)[input.name]) return { error: "That name is taken. Try another.", taken: true };- const moved = write(to, input.name, found.workflow, found.botId, root);- if ("error" in moved) return moved;- const gone = erase(from, input.name, found.sha256, root);- if (!("removed" in gone)) {- erase(to, input.name, moved.sha256, root);- return "error" in gone ? gone : { stale: true };- }- return moved;-}--/** The burger a bot runs by this name: its own first, then one used in every chat. */-export function findWorkflowSkill(botId: string, name: string, root: string = skillsLibraryRoot()): { place: BurgerPlace; workflow: Workflow; sha256: string } | null {- for (const place of [{ botId }, { everyChat: true as const }] satisfies BurgerPlace[]) {- const found = readAt(place, name, root);- if (found) return { place, workflow: found.workflow, sha256: found.sha256 };- }- return null;+/** The burger a bot runs by this name: the one every chat uses, else (not moved yet) one of the bot's own. */+export function findWorkflowSkill(botId: string, name: string, root: string = skillsLibraryRoot()): { workflow: Workflow; sha256: string } | null {+ const found = readAt(GLOBAL, name, root) ?? readAt({ botId }, name, root);+ return found ? { workflow: found.workflow, sha256: found.sha256 } : null;}/** Puts a changed workflow in place of the copy with `sha256`, under the same name; the old copy comes back if the new* one can't be written. */-export function replaceWorkflowSkill(input: { place: BurgerPlace; name: string; workflow: unknown; sha256: string; root?: string }): SavedWorkflow | Failure | { stale: true } {+export function replaceWorkflowSkill(input: { name: string; workflow: unknown; sha256: string; root?: string }): SavedWorkflow | Failure | { stale: true } {const root = input.root ?? skillsLibraryRoot();const checked = workflowSchema.safeParse(input.workflow);if (!checked.success) return { error: checked.error.issues.map((issue) => issue.message).join("; ").slice(0, 300) };- const found = readAt(input.place, input.name, root);+ const found = readAt(GLOBAL, input.name, root);if (!found || found.sha256 !== input.sha256) return { stale: true };- const gone = erase(input.place, input.name, found.sha256, root);+ const gone = erase(input.name, found.sha256, root);if (!("removed" in gone)) return "error" in gone ? gone : { stale: true };- const written = write(input.place, input.name, checked.data, found.botId, root);- if ("error" in written) write(input.place, input.name, found.workflow, found.botId, root);+ const written = write(input.name, checked.data, found.botId, root);+ if ("error" in written) write(input.name, found.workflow, found.botId, root);return written;}-/** Rename: the same burger under a new name in the same place, with its SKILL.md written for that name. */-export function renameWorkflowSkill(input: { place: BurgerPlace; name: string; to: string; botIds: readonly string[]; sha256?: string; root?: string }): SavedWorkflow | Failure | { stale: true } {+/** Rename: the same burger under a new name, with its SKILL.md written for that name. */+export function renameWorkflowSkill(input: { name: string; to: string; botIds: readonly string[]; sha256?: string; root?: string }): SavedWorkflow | Failure | { stale: true } {const root = input.root ?? skillsLibraryRoot();- const found = readAt(input.place, input.name, root);+ const found = readAt(GLOBAL, input.name, root);if (!found || (input.sha256 && found.sha256 !== input.sha256)) return { stale: true };if (!isSkillName(input.to)) return { error: "Use lowercase letters, numbers and hyphens for the name." };if (taken(input.botIds, root).has(input.to)) return { error: "That name is taken. Try another.", taken: true };- const renamed = write(input.place, input.to, found.workflow, found.botId, root);+ const renamed = write(input.to, found.workflow, found.botId, root);if ("error" in renamed) return renamed;- const gone = erase(input.place, input.name, found.sha256, root);+ const gone = erase(input.name, found.sha256, root);if (!("removed" in gone)) {- erase(input.place, input.to, renamed.sha256, root);+ erase(input.to, renamed.sha256, root);return "error" in gone ? gone : { stale: true };}+ setSaver(root, input.to, saverOf(input.name, root), input.name);return renamed;}+/** Moves every bot's own burgers (saved before burgers were for every chat) into every chat, once. A name already used+ * there keeps both, the moved one with a number after it; nothing is overwritten. Safe to run again: a bot's copy whose+ * workflow is already there from that bot is only taken away. */+export function migrateBotBurgers(botIds: readonly string[], root: string = skillsLibraryRoot()): Array<{ botId: string; from: string; to: string }> {+ const moved: Array<{ botId: string; from: string; to: string }> = [];+ for (const botId of botIds) {+ for (const skill of listSkills(botId).filter((one) => isBurgerSource(one.source))) {+ const found = readAt({ botId }, skill.name, root);+ if (!found) continue;+ const same = JSON.stringify(found.workflow);+ const there = listWorkflowSkills(root).find((one) => one.botId === botId && (one.name === skill.name || one.name.startsWith(`${skill.name}-`)) && JSON.stringify(readAt(GLOBAL, one.name, root)?.workflow) === same);+ let to = there?.name;+ if (!to) {+ const names = taken([], root);+ to = skill.name;+ for (let n = 2; names.has(to); n += 1) to = `${skill.name}-${n}`;+ const written = write(to, found.workflow, botId, root);+ if ("error" in written) continue;+ }+ const gone = removeSkill(botId, skill.name);+ if ("removed" in gone) moved.push({ botId, from: skill.name, to });+ }+ }+ return moved;+}+/** The turn's list of burgers used in every chat, for a bot that doesn't already see them through the skills library.* A bot's own burgers are its own skills and listed with them. */export function workflowSkillsPrompt(botId: string, root: string = skillsLibraryRoot()): string {const optedOut = librarySkillOptOuts(botId);const lines: string[] = [];let bytes = 0;- for (const saved of listWorkflowSkills([], root)) {+ for (const saved of listWorkflowSkills(root)) {if (optedOut.has(saved.name) || lines.length >= PROMPT_MAX_SKILLS) continue;const line = `- ${saved.name}: ${saved.summary} Read ${JSON.stringify(librarySkillFilePath(saved.name, root))}.`;if (bytes + line.length > PROMPT_MAX_BYTES) break;diff --git a/server/skill-burger/turn-host.ts b/server/skill-burger/turn-host.tsindex db7dd23f46..b8fe7cde84 100644--- a/server/skill-burger/turn-host.ts+++ b/server/skill-burger/turn-host.ts@@ -17,7 +17,9 @@ export interface BurgerHostDeps {browser(turn: CallingTurn): Promise<{ env?: Record<string, string | undefined> } | null>;/** The chat's event bus, with the engine of the turn that is running in the thread. */publish(threadId: string, event: Record<string, unknown>): void;- mayEditEveryChat(): boolean;+ mayEditBurgers(): boolean;+ /** The apps this turn's bot is connected to, or null when that can't be told. */+ connectedApps?(turn: CallingTurn): Promise<readonly string[] | null>;}/** The run's view of the calling turn: `authorization` is the agents bearer the tool call came with. */@@ -37,7 +39,8 @@ export function burgerTurn(host: BurgerHostDeps, turn: CallingTurn, authorizatiobotId: turn.botId,threadId: turn.threadId,cwd: host.cwd(turn.botId, turn.threadId),- mayEditEveryChat: host.mayEditEveryChat(),+ mayEditBurgers: host.mayEditBurgers(),+ ...(host.connectedApps ? { connected: () => host.connectedApps!(turn) } : {}),publish: (event: StepEvent) => host.publish(turn.threadId, { eventId: randomUUID(), createdAt: new Date().toISOString(), threadId: turn.threadId, itemType: "tool", ...event }),async internal(kind, path, body, signal) {if (kind === "agents") {diff --git a/server/testing/fake-claude-cli.ts b/server/testing/fake-claude-cli.tsindex 164ec277f1..7cea7f8a4f 100755--- a/server/testing/fake-claude-cli.ts+++ b/server/testing/fake-claude-cli.ts@@ -43,11 +43,12 @@// FAKE_CLAUDE_CHECK fail | hang: how the connection check answers (default OK)// FAKE_CLAUDE_REPLIES JSON array of replies (string, or string[] for several items) used in order// FAKE_CLAUDE_REPLY_STATE counter file keeping FAKE_CLAUDE_REPLIES in order across processes+// FAKE_CLAUDE_MARKERS_LATEST 1: reply and tool-call markers match only the prompt after its history block// FAKE_CLAUDE_TOOL_CALLS JSON [{name, input?, ok?, hold?}] each turn calls before its reply (unset: one Bash call). A call// with `hold` keeps running until FAKE_CLAUDE_RELEASE exists, sending a tool_progress every FAKE_CLAUDE_TOOL_PROGRESS_MS// (default 30000) as 2.1.306 does; hold "busy" | "idle" | "network" also keeps a stand-in child process that burns CPU,// sleeps, or holds a loopback TCP connection, as the call's command would-// FAKE_CLAUDE_TOOL_CALLS_FILE path of the same JSON, read again each turn (a warm process's turns differ); missing: none+// FAKE_CLAUDE_TOOL_CALLS_FILE path of the same JSON, read again each turn (a warm process's turns differ); missing: none, or {"marker": [calls]} picked by the prompt// FAKE_STREAM_SCRIPT, FAKE_STREAM_CADENCE a scripted reply chosen by a marker in the prompt (stream-script.ts)// FAKE_CLAUDE_STREAM_CADENCE "chars:ms" (happy mode): stream each scripted reply as// text_delta chunks of `chars` chars every `ms` ms before its assistant message@@ -203,10 +204,20 @@ const parseToolCalls = (raw: string | undefined): ScriptedToolCall[] | null => {}};const scriptedToolCallsAtStart = parseToolCalls(process.env.FAKE_CLAUDE_TOOL_CALLS);-const turnToolCalls = (): ScriptedToolCall[] | null => {+/** The file may also hold {"marker": [calls], …}: the first marker the turn's prompt contains picks its calls, so bots+ * sharing one fake engine each play their own part; a prompt with none of them calls nothing. */+const turnToolCalls = (prompt?: string): ScriptedToolCall[] | null => {const file = process.env.FAKE_CLAUDE_TOOL_CALLS_FILE;if (!file) return scriptedToolCallsAtStart;- try { return parseToolCalls(readFileSync(file, "utf8")) ?? []; } catch { return []; }+ try {+ const raw = readFileSync(file, "utf8");+ const parsed: unknown = JSON.parse(raw);+ if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {+ const hit = Object.entries(parsed as Record<string, unknown>).find(([marker]) => marker !== "" && (prompt ?? "").includes(marker));+ return hit ? parseToolCalls(JSON.stringify(hit[1])) ?? [] : [];+ }+ return parseToolCalls(raw) ?? [];+ } catch { return []; }};let toolUseCount = 0;let scriptedReplyIndex = 0;@@ -245,9 +256,18 @@ const markerReplies = (() => {return null;}})();+/** With FAKE_CLAUDE_MARKERS_LATEST=1, markers match only the newest message of a prompt that carries history or notes+ * ahead of it, so an earlier turn's words never pick this turn's script. */+const markerText = (text: string): string => {+ if (process.env.FAKE_CLAUDE_MARKERS_LATEST !== "1") return text;+ const at = text.lastIndexOf("[Now reply to the user's latest message:]");+ if (at >= 0) return text.slice(at);+ const sent = text.lastIndexOf("Current time when this message was sent:");+ return sent < 0 ? text : text.slice(sent);+};const replyForPrompt = (prompt: JsonValue): string[] | null => {if (!markerReplies) return null;- const text = steeredText(prompt);+ const text = markerText(steeredText(prompt));const hit = markerReplies.find(([marker]) => marker !== "" && text.includes(marker));return hit ? [hit[1]] : null;};@@ -1267,7 +1287,7 @@ const playTurn = (prompt: JsonValue, late = false) => {emitPart(0);return;}- const scriptedToolCalls = turnToolCalls();+ const scriptedToolCalls = turnToolCalls(markerText(steeredText(prompt)));if (scriptedToolCalls?.some((call) => call.hold)) {playHeldCalls(scriptedToolCalls, usage, () => {for (const text of replyParts) out({ type: "assistant", message: { content: [{ type: "text", text }], usage } });diff --git a/shared/skill-burger/saved.ts b/shared/skill-burger/saved.tsindex 4440e5a18b..7a7d719dbe 100644--- a/shared/skill-burger/saved.ts+++ b/shared/skill-burger/saved.ts@@ -1,6 +1,5 @@-// A saved burger as lists show it: its name, the summary on its top bun, one entry per layer, its args, and where it is-// used. A burger belongs to the bot it was made with until someone turns on "Use in every chat"; then it is in the shared-// library and on for every bot, and `botId` still names the bot it came from.+// A saved burger as lists show it: its name, the summary on its top bun, one entry per layer and its args. Every saved+// burger is used in every chat by every bot; `botId` names the bot it was made with.import type { LayerKind } from "./layers.ts";export interface SavedWorkflowLayer {@@ -20,9 +19,10 @@ export interface SavedWorkflow {savedAt: string;layers: SavedWorkflowLayer[];args: string[];- everyChat: boolean;/** The bot it was made with; unknown for one whose bot is gone. */botId?: string;+ /** Whether the person reading the list may rename or remove it: whoever saved it, or an admin. */+ canChange?: boolean;}/** The source a saved burger records: the bot it was made with. */diff --git a/src/components/skill-burger/BurgerPill.tsx b/src/components/skill-burger/BurgerPill.tsxnew file mode 100644index 0000000000..e21672a80f--- /dev/null+++ b/src/components/skill-burger/BurgerPill.tsx@@ -0,0 +1,114 @@+import { useLayoutEffect, useRef, useState, type CSSProperties, type ReactNode } from "react";++import type { LayerKind } from "../../../shared/skill-burger/layers";+import { cn } from "@/lib/cn";+import { LayerIcon } from "./SkillBurger";++/** At most this many app marks: a long run never turns the pill into a bar. */+export const PILL_ICONS = 4;++export interface PillMark { kind: LayerKind; app?: string }++/** The marks a pill shows: each app or kind of step once, the most recent last, at most PILL_ICONS. */+export function pillMarks(steps: readonly PillMark[]): PillMark[] {+ const seen = new Map<string, PillMark>();+ for (const step of steps) {+ const key = step.kind === "app" && step.app ? `app:${step.app}` : step.kind;+ seen.delete(key);+ seen.set(key, step);+ }+ return [...seen.values()].slice(-PILL_ICONS);+}++const markKey = (mark: PillMark) => (mark.kind === "app" && mark.app ? `app:${mark.app}` : mark.kind);++/** "{count} steps" with the number as its own element, so it can tick over in place. */+export function WithCount({ template, count }: { template: string; count: number }) {+ const [before, after = ""] = template.split("{count}");+ return (+ <>+ {before}+ <span key={count} className="burger-tick inline-block tabular-nums">{count}</span>+ {after}+ </>+ );+}++const SHEEN_PERIOD_MS = 2000;++/** Words that cook: the same slow sheen as a bot's working phrase, none with reduced motion. */+export function Sheen({ children, text }: { children: ReactNode; text: string }) {+ const [delay] = useState(() => `-${Date.now() % SHEEN_PERIOD_MS}ms`);+ return (+ <span className="thinking-shimmer min-w-0 truncate" style={{ "--sheen-period": `${SHEEN_PERIOD_MS}ms`, "--sheen-delay": delay } as CSSProperties}>+ {children}+ <span aria-hidden="true" className="thinking-sheen"><span data-text={text} /></span>+ </span>+ );+}++/** The Skill Burger in the chat: a small pill with the run's app marks, its count and one action. Its steps open above it+ * only when someone taps it, never on their own; the pill grows a little as marks are added, smoothly. */+export function BurgerPill({ marks, label, tone = "normal", open, controls, toggleLabel, onToggle, action }: {+ marks: readonly PillMark[];+ label: ReactNode;+ tone?: "normal" | "danger";+ open: boolean;+ controls: string;+ toggleLabel: string;+ onToggle: () => void;+ action?: ReactNode;+}) {+ const inner = useRef<HTMLDivElement>(null);+ const [width, setWidth] = useState<number | undefined>(undefined);+ useLayoutEffect(() => {+ const node = inner.current;+ if (!node) return;+ const measure = () => setWidth(Math.ceil(node.scrollWidth));+ measure();+ const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);+ observer?.observe(node);+ return () => observer?.disconnect();+ });+ const newest = marks.length ? markKey(marks[marks.length - 1]!) : "";+ return (+ <div+ data-burger-pill=""+ className="burger-pill h-9 max-w-full overflow-hidden rounded-full bg-raised shadow-sm transition-[width] duration-200 ease-out motion-reduce:transition-none"+ style={width === undefined ? undefined : { width }}+ >+ <div ref={inner} className="flex h-9 w-max items-center gap-1 pe-1">+ <button+ type="button"+ aria-expanded={open}+ aria-controls={controls}+ aria-label={toggleLabel}+ title={toggleLabel}+ onClick={onToggle}+ className="flex h-9 min-w-0 items-center gap-2 rounded-full ps-2.5 pe-2 text-[13px] outline-none transition-colors hover:bg-ink/[0.04] focus-visible:ring-2 focus-visible:ring-accent/60 motion-reduce:transition-none"+ >+ <span aria-hidden="true" className="flex shrink-0 items-center">+ {marks.map((mark, index) => (+ <span+ key={markKey(mark)}+ className={cn(+ "flex size-6 items-center justify-center rounded-full bg-card ring-2 ring-[var(--color-raised)]",+ index > 0 && "-ms-2",+ markKey(mark) === newest && "burger-mark-in",+ )}+ >+ <span className="flex scale-[0.8] items-center justify-center"><LayerIcon kind={mark.kind} app={mark.app} /></span>+ </span>+ ))}+ </span>+ <span className={cn("min-w-0 whitespace-pre", tone === "danger" ? "text-danger" : "text-ink")}>{label}</span>+ </button>+ {action}+ </div>+ </div>+ );+}++/** The pill's one action: Add, Add the path, or Undo. */+export const PILL_ACTION =+ "flex h-7 shrink-0 items-center gap-1 rounded-full bg-ink/[0.06] px-3 text-[12px] font-medium text-accent-text outline-none transition-colors hover:bg-ink/[0.1] focus-visible:ring-2 focus-visible:ring-accent/60 disabled:cursor-default disabled:bg-transparent disabled:text-ink-tertiary motion-reduce:transition-none";diff --git a/src/components/skill-burger/DraftSteps.tsx b/src/components/skill-burger/DraftSteps.tsxindex 5648a6691e..06a384f427 100644--- a/src/components/skill-burger/DraftSteps.tsx+++ b/src/components/skill-burger/DraftSteps.tsx@@ -122,7 +122,7 @@ export function DraftSteps({ steps, skipped, onSkip, disabled }: {const judged = !step.exact || steps.some((other) => other.id === `${step.id}_write` && !other.exact);return (<li key={step.id} data-burger-layer={step.kind} data-kept={kept ? "true" : "false"}- className={cn("burger-layer burger-open flex min-w-0 flex-col rounded-[8px] bg-card px-2 py-1.5 text-[13px] shadow-sm", !kept && "opacity-50")}>+ className={cn("burger-layer burger-open flex min-w-0 shrink-0 flex-col rounded-[8px] bg-card px-2 py-1.5 text-[13px] shadow-sm", !kept && "opacity-50")}><span className="flex min-h-7 min-w-0 items-center gap-2"><label className="flex shrink-0 cursor-pointer items-center" title={t("skillBurger.draft.keep", { step: line })}><input type="checkbox" className="peer sr-only" checked={kept} disabled={disabled} onChange={() => toggle(step)} aria-label={t("skillBurger.draft.keep", { step: line })} />diff --git a/src/components/skill-burger/EveryChatToggle.tsx b/src/components/skill-burger/EveryChatToggle.tsxdeleted file mode 100644index 811decd23b..0000000000--- a/src/components/skill-burger/EveryChatToggle.tsx+++ /dev/null@@ -1,49 +0,0 @@-import { useState } from "react";--import { cn } from "@/lib/cn";-import { t } from "@/lib/i18n";-import { setBurgerEveryChat, type SavedWorkflow } from "@/lib/skill-burger";-import { useOwnerOrAdmin } from "@/lib/use-owner-or-admin";-import { Switch } from "../SettingsPrimitives";--/** A Skill Burger's one choice: this bot only, or every chat. Changing what every bot uses is an admin's, as the shared- * skills library is; anyone else sees the switch with the reason it is off. */-export function EveryChatToggle({ skill, onMoved, compact = false, className }: {- skill: SavedWorkflow;- onMoved?: (skill: SavedWorkflow) => void;- compact?: boolean;- className?: string;-}) {- const admin = useOwnerOrAdmin() !== false;- const [busy, setBusy] = useState(false);- const [problem, setProblem] = useState("");- const flip = async () => {- if (busy) return;- setBusy(true);- setProblem("");- try {- onMoved?.(await setBurgerEveryChat(skill, !skill.everyChat));- } catch (cause) {- setProblem(cause instanceof Error && cause.message ? cause.message : t("skillBurger.everyChatFailed"));- } finally {- setBusy(false);- }- };- return (- <div className={cn("flex min-w-0 flex-col", className)}>- <label className={cn("flex min-w-0 items-center gap-2 text-ink-secondary", compact ? "text-[12px]" : "text-[13px]")} title={admin ? undefined : t("settings.adminOnly.change")}>- <Switch- compact={compact}- checked={skill.everyChat}- disabled={!admin || busy}- aria-label={t("skillBurger.everyChat")}- onClick={() => void flip()}- data-every-chat={skill.everyChat ? "on" : "off"}- />- <span className="min-w-0 truncate">{t("skillBurger.everyChat")}</span>- </label>- {!admin && !compact && <span className="mt-0.5 text-[12px] text-ink-tertiary">{t("settings.adminOnly.change")}</span>}- {problem && <span role="alert" className="mt-0.5 text-[12px] text-danger">{problem}</span>}- </div>- );-}diff --git a/src/components/skill-burger/RunBurger.dom.test.ts b/src/components/skill-burger/RunBurger.dom.test.tsindex ade5f2416c..d0b4dc5cd1 100644--- a/src/components/skill-burger/RunBurger.dom.test.ts+++ b/src/components/skill-burger/RunBurger.dom.test.ts@@ -40,11 +40,11 @@ const render = async (messages: RunMessage[], busy = false) => {};const card = () => host.querySelector<HTMLElement>("[data-skill-burger]");const rows = () => [...host.querySelectorAll("[data-burger-layer]")].map((row) => `${row.getAttribute("data-status")} ${row.textContent?.replace(/\s+/g, " ").trim()}`);-const button = (text: string) => [...host.querySelectorAll("button")].find((node) => node.textContent?.includes(text));+const button = (text: string) => [...host.querySelectorAll("button")].find((node) => node.textContent?.includes(text) || node.title.includes(text));beforeEach(() => {fixture.api.mockReset();- fixture.api.mockImplementation(async (path: string) => (path.includes("?runner=") ? { workflow, everyChat: false } : {}));+ fixture.api.mockImplementation(async (path: string) => (path.includes("?runner=") ? { workflow } : {}));host = document.createElement("div");document.body.append(host);root = createRoot(host);@@ -78,6 +78,19 @@ it("cooks the running step, greys the case not taken and a skipped step, and endexpect(button("Add the")).toBeUndefined();});+it("keeps the run a closed pill while it runs, after it ends and when it fails, until someone taps it", async () => {+ const folded = () => host.querySelector(".burger-fold")?.getAttribute("data-folded");+ await render([ask, step("s1", "done"), step("d1")], true);+ expect(folded()).toBe("true");+ expect(host.querySelector("[data-burger-pill]")?.textContent).toContain("Running… 1");+ await render([ask, step("s1", "done"), step("d1", "done", { case: "support" }), step("c1", "failed", { error: "nope" })]);+ expect(card()?.dataset.skillBurger).toBe("failed");+ expect(folded()).toBe("true");+ expect(host.querySelector("[data-burger-pill] .text-danger")?.textContent).toContain("Stopped");+ await act(async () => host.querySelector<HTMLButtonElement>("[data-burger-pill] button[aria-controls]")!.click());+ expect(folded()).toBe("false");+});+it("offers to keep what the bot did for a case nobody saved, once it's done, with an Undo", async () => {const handed: RunMessage = { id: "call-1", role: "bot", kind: "activity", tool: { name: "mcp__agents__run_workflow", ok: true, input: "{}", output: 'resume "run-1"' } };const messages = [ask, step("s1", "done"), step("d1", "done", { case: "spam" }), handed];@@ -85,17 +98,17 @@ it("offers to keep what the bot did for a case nobody saved, once it's done, witexpect(button("Add the")).toBeUndefined();await render(messages);fixture.api.mockImplementation(async (path: string) => {- if (path.includes("?runner=")) return { workflow, everyChat: false };+ if (path.includes("?runner=")) return { workflow };if (path.endsWith("/paths")) return { skill: {}, undo: "u-1" };return {};});await act(async () => button("Add the “spam” path")!.click());expect(fixture.api).toHaveBeenCalledWith("/api/skill-burgers/files-new-support-email/paths", {- method: "POST", body: JSON.stringify({ runBotId: "scout", threadId: "t1", run: "run-1", decide: "d1", case: "spam", botId: "scout" }),+ method: "POST", body: JSON.stringify({ runBotId: "scout", threadId: "t1", run: "run-1", decide: "d1", case: "spam" }),});expect(host.textContent).toContain("“spam” path added");await act(async () => button("Undo")!.click());- expect(fixture.api).toHaveBeenCalledWith("/api/skill-burgers/files-new-support-email", { method: "PATCH", body: JSON.stringify({ undo: "u-1", botId: "scout" }) });+ expect(fixture.api).toHaveBeenCalledWith("/api/skill-burgers/files-new-support-email", { method: "PATCH", body: JSON.stringify({ undo: "u-1" }) });expect(host.textContent).toContain("Path removed");});@@ -104,7 +117,7 @@ it("shows a burger the turn changed, with that change's Undo", async () => {await render([{ id: "u2", role: "user", kind: "text", text: "if it's sales, make a deal" }, edit]);expect(card()?.dataset.skillBurger).toBe("edited");await act(async () => button("Undo")!.click());- expect(fixture.api).toHaveBeenCalledWith("/api/skill-burgers/files-new-support-email", { method: "PATCH", body: JSON.stringify({ undo: "0f0e0d0c-0b0a-4908-8706-050403020100", botId: "scout" }) });+ expect(fixture.api).toHaveBeenCalledWith("/api/skill-burgers/files-new-support-email", { method: "PATCH", body: JSON.stringify({ undo: "0f0e0d0c-0b0a-4908-8706-050403020100" }) });expect(host.textContent).toContain("Change undone");});@@ -112,7 +125,7 @@ it("asks for a burger's inputs in one form, filled with the saved values, and ruconst { RunWithInputs } = await import("./RunInputs");const ran: Array<Record<string, string>> = [];fixture.api.mockImplementation(async () => ({ workflow: { version: 1, summary: "QA", args: { site: { default: "https://mausbot.com" } }, steps: [] } }));- const skill = { name: "qa", summary: "QA a site", sha256: "x", savedAt: "", layers: [], args: ["site"], everyChat: false, botId: "lead" };+ const skill = { name: "qa", summary: "QA a site", sha256: "x", savedAt: "", layers: [], args: ["site"], botId: "lead" };await act(async () => root.render(createElement(RunWithInputs, { skill, onRun: (inputs: Record<string, string>) => ran.push(inputs), className: "", panelAction: "run-skill-burger:qa" })));const run = host.querySelector<HTMLButtonElement>('button[data-panel-action="run-skill-burger:qa"]')!;await act(async () => run.click());diff --git a/src/components/skill-burger/RunBurger.tsx b/src/components/skill-burger/RunBurger.tsxindex 3a651550c5..f97402f3fa 100644--- a/src/components/skill-burger/RunBurger.tsx+++ b/src/components/skill-burger/RunBurger.tsx@@ -1,10 +1,11 @@-import { Check, ChevronDown, ChevronUp, Plus, X, XCircle } from "lucide-react";-import { useEffect, useState, type CSSProperties } from "react";+import { Check, Plus, X, XCircle } from "lucide-react";+import { useEffect, useId, useState, type CSSProperties } from "react";import type { RunRow, RunView } from "../../../shared/skill-burger/run-view";import { cn } from "@/lib/cn";import { t } from "@/lib/i18n";import { addBurgerPath, undoBurgerEdit } from "@/lib/skill-burger";+import { BurgerPill, PILL_ACTION, pillMarks, Sheen, WithCount } from "./BurgerPill";import { RowExtra, RunHistory } from "./RunExtras";import { LayerIcon } from "./SkillBurger";@@ -35,7 +36,7 @@ function Row({ row }: { row: RunRow }) {data-burger-layer={row.kind}data-status={row.state}className={cn(- "burger-layer flex min-h-9 min-w-0 flex-col justify-center rounded-[8px] bg-card px-3 py-1.5 text-[13px] shadow-sm",+ "burger-layer flex min-h-9 min-w-0 shrink-0 flex-col justify-center rounded-[8px] bg-card px-3 py-1.5 text-[13px] shadow-sm",row.detail && "burger-open",row.depth === 1 && "ms-5",passed && "opacity-50",@@ -73,10 +74,9 @@ type Offer = { state: "idle" } | { state: "adding" } | { state: "added"; undo: s/** The burger card while a saved Skill Burger runs: its steps cook and stack as the run goes, and a case nobody saved steps* for ends with a quiet one-tap offer to keep what the bot did. */-export function RunBurger({ view, summary, everyChat, botId, threadId, busy, onDismiss, edited }: {+export function RunBurger({ view, summary, botId, threadId, busy, onDismiss, edited }: {view: RunView;summary: string;- everyChat: boolean;botId: string;threadId: string;busy: boolean;@@ -84,7 +84,9 @@ export function RunBurger({ view, summary, everyChat, botId, threadId, busy, onD/** Set when the turn changed the burger's steps: its Undo. */edited?: { undo: string };}) {- const [folded, setFolded] = useState(false);+ // Closed until someone taps the pill: never opened by a run going, finishing or failing.+ const [folded, setFolded] = useState(true);+ const panelId = useId();const [offer, setOffer] = useState<Offer>({ state: "idle" });const [editUndone, setEditUndone] = useState(false);const live = view.rows.some((row) => row.state === "running");@@ -100,7 +102,7 @@ export function RunBurger({ view, summary, everyChat, botId, threadId, busy, onDif (!missing || offer.state === "adding") return;setOffer({ state: "adding" });try {- const { undo } = await addBurgerPath({ name: view.name, everyChat, runBotId: botId, threadId, run: view.run, decide: missing.decide, case: missing.case });+ const { undo } = await addBurgerPath({ name: view.name, runBotId: botId, threadId, run: view.run, decide: missing.decide, case: missing.case });setOffer({ state: "added", undo });} catch (cause) {fail(cause);@@ -108,7 +110,7 @@ export function RunBurger({ view, summary, everyChat, botId, threadId, busy, onD};const undo = async (id: string, after: () => void) => {try {- await undoBurgerEdit({ name: view.name, everyChat, botId, undo: id });+ await undoBurgerEdit({ name: view.name, undo: id });after();} catch (cause) {fail(cause);@@ -120,46 +122,44 @@ export function RunBurger({ view, summary, everyChat, botId, threadId, busy, onD: failed ? t("skillBurger.run.stopped"): view.run ? t("skillBurger.run.finished"): "";+ const ran = view.rows.filter((row) => row.state === "done").length;+ const added = offer.state === "added";+ const pillLabel = edited ? (editUndone ? t("skillBurger.run.editUndone") : t("skillBurger.run.updated"))+ : live ? <Sheen text={t("skillBurger.pill.running", { count: ran })}><WithCount template={t("skillBurger.pill.running")} count={ran} /></Sheen>+ : failed ? t("skillBurger.pill.stopped")+ : <WithCount template={t("skillBurger.layersMany")} count={ran} />;+ const pillAction = edited+ ? (editUndone ? undefined : <button type="button" onClick={() => void undo(edited.undo, () => setEditUndone(true))} className={PILL_ACTION}>{t("common.undo")}</button>)+ : missing && !busy && !live && !added && offer.state !== "undone"+ ? <button type="button" onClick={() => void addPath()} disabled={offer.state === "adding"} title={t("skillBurger.run.addPath", { case: missing.case })} className={PILL_ACTION}><Plus size={12} aria-hidden="true" />{t("skillBurger.pill.addPath")}</button>+ : !live && !failed && view.run ? <span className="flex size-7 shrink-0 items-center justify-center text-success"><Check size={14} aria-label={t("skillBurger.run.done")} /></span> : undefined;return (<sectionaria-label={t("skillBurger.aria")}data-skill-burger={live ? "running" : failed ? "failed" : edited ? "edited" : "ran"}- className="skill-burger pointer-events-auto flex w-[21rem] max-w-full flex-col gap-[3px] text-ink"+ className="skill-burger pointer-events-auto flex max-w-full flex-col items-end gap-1.5 text-ink">+ <div id={panelId} className="burger-fold w-[21rem] max-w-full" data-folded={folded ? "true" : "false"} inert={folded} aria-hidden={folded || undefined}>+ <div className="flex min-h-0 flex-col gap-[3px]"><div className="burger-bun burger-bun-top relative flex items-start gap-1.5 rounded-t-[18px] rounded-b-[8px] bg-raised px-3 pb-2 pt-3.5 shadow-sm"><span aria-hidden="true" className="burger-sesame" /><div className="flex min-w-0 flex-1 flex-col"><span dir="auto" className="min-w-0 truncate text-[13px] font-medium" title={summary}>{summary}</span>- <span role="status" aria-live="polite" aria-atomic="true" className="truncate text-[12px] text-ink-secondary">{status}</span>+ <span className="truncate text-[12px] text-ink-secondary">{status}</span></div>- <button type="button" onClick={() => setFolded((value) => !value)} aria-expanded={!folded} aria-label={toggleLabel} title={toggleLabel} className={ICON_BUTTON}>- {folded ? <ChevronDown size={14} aria-hidden="true" /> : <ChevronUp size={14} aria-hidden="true" />}- </button><button type="button" onClick={onDismiss} aria-label={t("skillBurger.dismiss")} title={t("skillBurger.dismiss")} className={ICON_BUTTON}><X size={14} aria-hidden="true" /></button></div>- <div className="burger-fold" data-folded={folded ? "true" : "false"} inert={folded} aria-hidden={folded || undefined}><ol aria-label={t("skillBurger.layers")} className="burger-layers flex max-h-72 min-h-0 flex-col gap-[3px] overflow-y-auto">{view.rows.map((row) => <Row key={row.id} row={row} />)}</ol>- {view.name && !live && <div className="mt-[3px]"><RunHistory name={view.name} everyChat={everyChat} botId={botId} threadId={threadId} refreshKey={`${view.run}:${failed}:${busy}`} /></div>}- </div>+ {view.name && !live && <div className="mt-[3px]"><RunHistory name={view.name} botId={botId} threadId={threadId} refreshKey={`${view.run}:${failed}:${busy}`} /></div>}- {(edited || (missing && !busy && !live)) && (+ {(offer.state === "added" || offer.state === "undone") && (<div className="burger-bun burger-bun-bottom flex min-h-10 items-center rounded-b-[18px] rounded-t-[8px] bg-raised shadow-sm">- {edited ? (- <div className="flex w-full items-center gap-2 px-3 text-[13px]">- <Check size={14} aria-hidden="true" className="shrink-0 text-success" />- <span className="min-w-0 flex-1 truncate">{editUndone ? t("skillBurger.run.editUndone") : t("skillBurger.run.updated")}</span>- {!editUndone && (- <button type="button" onClick={() => void undo(edited.undo, () => setEditUndone(true))} className="shrink-0 rounded-md px-1.5 py-0.5 font-medium text-accent-text outline-none hover:bg-ink/[0.06] focus-visible:ring-2 focus-visible:ring-accent/60">- {t("common.undo")}- </button>- )}- </div>- ) : offer.state === "added" ? (+ {offer.state === "added" ? (<div className="flex w-full items-center gap-2 px-3 text-[13px]"><Check size={14} aria-hidden="true" className="shrink-0 text-success" /><span className="min-w-0 flex-1 truncate">{t("skillBurger.run.pathAdded", { case: missing!.case })}</span>@@ -167,21 +167,22 @@ export function RunBurger({ view, summary, everyChat, botId, threadId, busy, onD{t("common.undo")}</button></div>- ) : offer.state === "undone" ? (- <span className="px-3 text-[13px] text-ink-secondary">{t("skillBurger.run.pathUndone")}</span>- ) : (- <button- type="button"- onClick={() => void addPath()}- disabled={offer.state === "adding"}- className="flex h-10 w-full items-center justify-center gap-1.5 rounded-b-[18px] rounded-t-[8px] text-[13px] font-medium text-accent-text outline-none transition-colors hover:bg-ink/[0.05] focus-visible:ring-2 focus-visible:ring-accent/60 disabled:cursor-default disabled:text-ink-tertiary motion-reduce:transition-none"- >- <Plus size={14} aria-hidden="true" />{t("skillBurger.run.addPath", { case: missing!.case })}- </button>- )}+ ) : <span className="px-3 text-[13px] text-ink-secondary">{t("skillBurger.run.pathUndone")}</span>}</div>)}+ </div>+ </div>{offer.state === "error" && <p role="alert" className="px-3 text-[12px] text-danger">{offer.message}</p>}+ <BurgerPill+ marks={pillMarks(view.rows.filter((row) => row.kind !== "decide"))}+ label={<span role="status" aria-live="polite" aria-atomic="true">{pillLabel}</span>}+ tone={failed ? "danger" : "normal"}+ open={!folded}+ controls={panelId}+ toggleLabel={toggleLabel}+ onToggle={() => setFolded((value) => !value)}+ action={pillAction}+ /></section>);}diff --git a/src/components/skill-burger/RunExtras.tsx b/src/components/skill-burger/RunExtras.tsxindex 1d148010b9..65cee4d982 100644--- a/src/components/skill-burger/RunExtras.tsx+++ b/src/components/skill-burger/RunExtras.tsx@@ -50,7 +50,7 @@ const ago = (at: number) => {/** The burger's last runs (newest first), and "Update the burger with this fix" when the newest one in this chat went on* from a failed step after the bot fixed it. */-export function RunHistory({ name, everyChat, botId, threadId, refreshKey }: { name: string; everyChat: boolean; botId: string; threadId: string; refreshKey: string }) {+export function RunHistory({ name, botId, threadId, refreshKey }: { name: string; botId: string; threadId: string; refreshKey: string }) {const [runs, setRuns] = useState<BurgerRunRecord[] | null>(null);const [kept, setKept] = useState<"idle" | "saving" | "done" | "error">("idle");useEffect(() => {@@ -64,7 +64,7 @@ export function RunHistory({ name, everyChat, botId, threadId, refreshKey }: { nif (!fixed?.fixedBy || kept === "saving") return;setKept("saving");try {- await keepBurgerFix({ name, everyChat, runBotId: botId, threadId, run: fixed.run, step: fixed.fixedBy });+ await keepBurgerFix({ name, runBotId: botId, threadId, run: fixed.run, step: fixed.fixedBy });setKept("done");} catch {setKept("error");diff --git a/src/components/skill-burger/SavedWorkflowsCard.tsx b/src/components/skill-burger/SavedWorkflowsCard.tsxindex a69092ddc9..460ba63828 100644--- a/src/components/skill-burger/SavedWorkflowsCard.tsx+++ b/src/components/skill-burger/SavedWorkflowsCard.tsx@@ -6,14 +6,10 @@ import type { LocaleKey } from "@/locales";import { readBurgerWorkflow, removeBurger, restoreBurger, runBurgerIn, useSavedBurgers, type SavedWorkflow } from "@/lib/skill-burger";import { useStoreDispatch } from "@/state/store-select";import { Card, NoteRow, TrashButton } from "../bot-panel/rows";-import { EveryChatToggle } from "./EveryChatToggle";import { MiniBurger } from "./MiniBurger";import { RunWithInputs } from "./RunInputs";import { LayerIcon } from "./SkillBurger";-/** A burger this bot uses: its own, and every one used in every chat. */-export const usedBy = (botId: string) => (skill: SavedWorkflow) => skill.everyChat || skill.botId === botId;-/** Takes a burger away, keeping what it takes to put it back. */export function useBurgerRemoval() {const [removed, setRemoved] = useState<{ skill: SavedWorkflow; workflow: unknown } | null>(null);@@ -41,13 +37,13 @@ export function useBurgerRemoval() {return { removed, problem, remove, undo };}-/** The bot panel's Skill Burgers: the ones this bot uses. Open one to see its steps; switch it to every chat; remove it with- * an Undo. */+/** The bot panel's Skill Burgers: every saved one, which every bot uses. Open one to see its steps; remove one (whoever+ * saved it, or an admin) with an Undo. */export function SavedWorkflowsCard({ botId, threadId }: { botId: string; threadId: string }) {const { skills: all, error } = useSavedBurgers();const dispatch = useStoreDispatch();const advanced = useAdvancedMode();- const skills = all?.filter(usedBy(botId)) ?? null;+ const skills = all;const [open, setOpen] = useState<string | null>(null);const { removed, problem, remove, undo } = useBurgerRemoval();@@ -58,9 +54,9 @@ export function SavedWorkflowsCard({ botId, threadId }: { botId: string; threadI) : skills.length === 0 && !removed ? (<NoteRow>{t("skillBurger.list.empty")}</NoteRow>) : skills.map((skill) => {- const key = `${skill.everyChat ? "every" : skill.botId}:${skill.name}`;+ const key = skill.name;const expanded = open === key;- const listId = `skill-burger-${skill.everyChat ? "every" : "bot"}-${skill.name}`;+ const listId = `skill-burger-${skill.name}`;return (<div key={key} data-panel-row={`skill-burger:${skill.name}`}><div className="flex min-h-[46px] flex-wrap items-start gap-3 px-3.5 py-[10px]">@@ -76,11 +72,10 @@ export function SavedWorkflowsCard({ botId, threadId }: { botId: string; threadI<span dir="auto" className="line-clamp-2 text-[14px] font-medium leading-[18px] text-ink">{skill.summary}</span>{advanced && <span className="mt-px block truncate font-mono text-[11px] text-ink-tertiary">{skill.name}</span>}</button>- <EveryChatToggle compact skill={skill} /></div><RunWithInputs skill={skill} iconOnly panelAction={`run-skill-burger:${skill.name}`} onRun={(inputs) => runBurgerIn(dispatch, { id: botId, threadId }, skill.name, inputs)}className="flex size-7 shrink-0 items-center justify-center rounded-lg text-ink-secondary hover:bg-ink/[0.05] hover:text-ink" />- <TrashButton data-panel-action={`remove-skill-burger:${skill.name}`} label={t("skillBurger.list.remove", { name: skill.name })} onClick={() => void remove(skill)} />+ {skill.canChange !== false && <TrashButton data-panel-action={`remove-skill-burger:${skill.name}`} label={t("skillBurger.list.remove", { name: skill.name })} onClick={() => void remove(skill)} />}</div><ol id={listId} hidden={!expanded} aria-label={t("skillBurger.layers")} className="flex flex-col gap-1 px-3.5 pb-3">{skill.layers.map((layer, index) => (diff --git a/src/components/skill-burger/SkillBurger.dom.test.ts b/src/components/skill-burger/SkillBurger.dom.test.tsindex 76dd03d4f6..ec61c17716 100644--- a/src/components/skill-burger/SkillBurger.dom.test.ts+++ b/src/components/skill-burger/SkillBurger.dom.test.ts@@ -27,7 +27,7 @@ const render = async (messages: RunMessage[], live: string[] = [], busy = false)})));};const burger = () => host.querySelector<HTMLElement>("[data-skill-burger]");-const button = (text: string) => [...host.querySelectorAll("button")].find((node) => node.textContent?.includes(text));+const button = (text: string) => [...host.querySelectorAll("button")].find((node) => node.textContent?.includes(text) || node.title === text || node.getAttribute("aria-label") === text);beforeEach(() => {fixture.api.mockReset();@@ -84,11 +84,35 @@ it("edits the summary in place: Escape puts it back, Enter keeps it", async () =expect(button("Weekly sales email")).toBeDefined();});-it("folds and closes from the top bun", async () => {- await render([ask, app("m1", "GOOGLESHEETS_BATCH_GET"), app("m2", "GMAIL_SEND_EMAIL")]);- await act(async () => host.querySelector<HTMLButtonElement>('button[aria-label="Hide steps"]')!.click());- expect(host.querySelector(".burger-fold")?.getAttribute("data-folded")).toBe("true");- expect(host.querySelector(".burger-fold")?.hasAttribute("inert")).toBe(true);+it("stays a closed pill while it cooks, finishes or fails, opens only on a tap, and closes from its panel", async () => {+ const fold = () => host.querySelector(".burger-fold");+ const pill = () => host.querySelector<HTMLButtonElement>("[data-burger-pill] button[aria-controls]")!;+ const shell = (id: string, command: string, extra: Partial<NonNullable<RunMessage["tool"]>> = {}): RunMessage => ({ id, role: "bot", kind: "activity", tool: { name: "Bash", ok: true, input: JSON.stringify({ command }), ...extra } });+ // One step in, still working: the pill cooks, closed.+ await render([ask, app("m1", "GOOGLESHEETS_BATCH_GET")], [], true);+ expect(fold()?.getAttribute("data-folded")).toBe("true");+ expect(host.querySelector("[data-burger-pill]")?.textContent).toContain("Cooking… 1");+ // Eight steps across six apps: still closed, the count ticks over, at most four marks.+ const many = [ask, app("m1", "GOOGLESHEETS_BATCH_GET"), app("m2", "GMAIL_SEND_EMAIL"), app("m3", "SLACK_SEND_MESSAGE"), app("m4", "NOTION_CREATE_PAGE"), app("m5", "LINEAR_CREATE_ISSUE"), app("m6", "GITHUB_CREATE_ISSUE"), shell("m7", "git push"), app("m8", "GMAIL_SEND_EMAIL")];+ await render(many, [], true);+ expect(fold()?.getAttribute("data-folded")).toBe("true");+ expect(host.querySelector("[data-burger-pill]")?.textContent).toContain("Cooking… 8");+ expect(host.querySelectorAll("[data-burger-pill] .rounded-full.bg-card").length).toBe(4);+ // Finished, and then with a failed step: never opens by itself; a failure tints the count.+ await render(many);+ expect(fold()?.getAttribute("data-folded")).toBe("true");+ expect(host.querySelector("[data-burger-pill]")?.textContent).toContain("8 steps");+ await render([...many, shell("m9", "pnpm deploy", { ok: false })]);+ expect(fold()?.getAttribute("data-folded")).toBe("true");+ expect(host.querySelector("[data-burger-pill] .text-danger")).not.toBeNull();+ // A tap opens it; another closes it; Close in the panel dismisses it.+ await act(async () => pill().click());+ expect(fold()?.getAttribute("data-folded")).toBe("false");+ expect(pill().getAttribute("aria-expanded")).toBe("true");+ await act(async () => pill().click());+ expect(fold()?.getAttribute("data-folded")).toBe("true");+ expect(fold()?.hasAttribute("inert")).toBe(true);+ await act(async () => pill().click());await act(async () => host.querySelector<HTMLButtonElement>('button[aria-label="Close"]')!.click());expect(burger()).toBeNull();});@@ -134,7 +158,7 @@ it("explains a finished delegation run and saves only what the person kept, undeexpect(rows[0]!.textContent).toContain("Ask Kiwi and Rio");expect(rows[0]!.textContent).toContain("Kiwi · Accessibility tester");expect(rows[0]!.textContent).toContain("2 rounds");- expect(host.querySelector("[role=status]")?.textContent).toContain("1 exact, 1 by judgement");+ expect(host.querySelector(".burger-bun-top")?.textContent).toContain("1 exact, 1 by judgement");// Open the delegation: what each was asked, what came back, what done meant.await act(async () => rows[0]!.querySelector<HTMLButtonElement>("button[aria-expanded]")!.click());const detail = rows[0]!.querySelector("[data-burger-detail]")!.textContent!;diff --git a/src/components/skill-burger/SkillBurger.tsx b/src/components/skill-burger/SkillBurger.tsxindex 7a3630970d..bc25bf0c57 100644--- a/src/components/skill-burger/SkillBurger.tsx+++ b/src/components/skill-burger/SkillBurger.tsx@@ -1,15 +1,15 @@-import { Check, ChevronDown, ChevronUp, FileText, Globe, Monitor, Plus, Signpost, Sparkles, Terminal, Users, X, XCircle } from "lucide-react";-import { useEffect, useRef, useState, type CSSProperties, type FocusEvent, type KeyboardEvent } from "react";+import { Check, FileText, Globe, Monitor, Signpost, Sparkles, Terminal, Users, X, XCircle } from "lucide-react";+import { useEffect, useId, useRef, useState, type CSSProperties, type FocusEvent, type KeyboardEvent } from "react";import { appMeta, BARE_READ } from "../../../shared/skill-burger/apps";import type { BurgerLayer } from "../../../shared/skill-burger/layers";import { cn } from "@/lib/cn";import { t } from "@/lib/i18n";import { useAdvancedMode } from "@/lib/interface-mode";-import { burgerStartsFolded, rememberSavedRun, removeBurger, saveBurger, savedRun, type DraftView, type SavedWorkflow } from "@/lib/skill-burger";+import { rememberSavedRun, removeBurger, saveBurger, savedRun, type DraftView, type SavedWorkflow } from "@/lib/skill-burger";import { ServiceIcon } from "../ServiceIcon";import { DraftInputs, DraftSteps, replayLine, type InputChoices } from "./DraftSteps";-import { EveryChatToggle } from "./EveryChatToggle";+import { BurgerPill, PILL_ACTION, pillMarks, Sheen, WithCount } from "./BurgerPill";/** One layer's icon: the app's own mark, or a plain icon for a command, a file, a page or the AI. */export function LayerIcon({ kind, app }: { kind: BurgerLayer["kind"]; app?: string }) {@@ -56,9 +56,11 @@ const FIELD = "w-full min-w-0 rounded-md border border-hairline/60 bg-card px-1.type Saving = { state: "idle" } | { state: "saving" } | { state: "saved"; skill: SavedWorkflow } | { state: "undone" } | { state: "error"; message: string };-export function SkillBurger({ run, layers, draft, summary: initialSummary, canSave, botId, threadId, onDismiss }: {+export function SkillBurger({ run, layers, draft, summary: initialSummary, canSave, busy = false, botId, threadId, onDismiss }: {/** The run this card is for, so a save is remembered when the card comes back. */run: string;+ /** The bot is still working: the pill cooks. */+ busy?: boolean;layers: BurgerLayer[];/** The finished run as it would be saved: shown in place of the live layers once it arrives. */draft?: DraftView | null;@@ -69,7 +71,9 @@ export function SkillBurger({ run, layers, draft, summary: initialSummary, canSathreadId: string;onDismiss: () => void;}) {- const [folded, setFolded] = useState(burgerStartsFolded);+ // Closed until someone taps the pill; nothing opens it on its own, not a finished or a failed run.+ const [folded, setFolded] = useState(true);+ const panelId = useId();/** The person's own words, once they changed them; until then the summary follows the ask. */const [own, setOwn] = useState<{ summary: string | null; name: string }>({ summary: null, name: "" });const [field, setField] = useState<{ summary: string; name: string } | null>(null);@@ -134,12 +138,19 @@ export function SkillBurger({ run, layers, draft, summary: initialSummary, canSaconst toggleLabel = folded ? t("skillBurger.expand") : t("skillBurger.collapse");const stepCount = draft ? draft.steps.filter((step) => !step.id.endsWith("_write") || !draft.steps.some((other) => `${other.id}_write` === step.id)).length : layers.length;const count = [stepCount === 1 ? t("skillBurger.layersOne") : t("skillBurger.layersMany", { count: stepCount }), draft && !saved ? replayLine(draft.steps, skipped) : ""].filter(Boolean).join(" · ");+ const cooking = busy || live;+ const failed = !cooking && layers.some((layer) => layer.status === "failed");+ const pillLabel = cooking+ ? <Sheen text={t("skillBurger.pill.cooking", { count: stepCount })}><WithCount template={t("skillBurger.pill.cooking")} count={stepCount} /></Sheen>+ : stepCount === 1 ? t("skillBurger.layersOne") : <WithCount template={t("skillBurger.layersMany")} count={stepCount} />;return (<sectionaria-label={t("skillBurger.aria")}- data-skill-burger={saved ? "saved" : live ? "live" : "done"}- className={cn("skill-burger pointer-events-auto flex w-[21rem] max-w-full flex-col gap-[3px] text-ink", saved && "burger-stacked")}+ data-skill-burger={saved ? "saved" : cooking ? "live" : "done"}+ className="skill-burger pointer-events-auto flex max-w-full flex-col items-end gap-1.5 text-ink">+ <div id={panelId} className="burger-fold w-[21rem] max-w-full" data-folded={folded ? "true" : "false"} inert={folded} aria-hidden={folded || undefined}>+ <div className={cn("flex min-h-0 flex-col gap-[3px]", saved && "burger-stacked")}><div className="burger-bun burger-bun-top relative flex items-start gap-1.5 rounded-t-[18px] rounded-b-[8px] bg-raised px-3 pb-2 pt-3.5 shadow-sm"><span aria-hidden="true" className="burger-sesame" /><div className="flex min-w-0 flex-1 flex-col">@@ -180,19 +191,14 @@ export function SkillBurger({ run, layers, draft, summary: initialSummary, canSa{summary}</button>)}- <span role="status" aria-live="polite" aria-atomic="true" className="truncate text-[12px] text-ink-secondary">{count}</span>- {saved && <EveryChatToggle compact skill={saved} onMoved={(skill) => setSaving({ state: "saved", skill })} className="mt-1" />}+ <span className="truncate text-[12px] text-ink-secondary">{count}</span></div>- <button type="button" onClick={() => setFolded((value) => !value)} aria-expanded={!folded} aria-label={toggleLabel} title={toggleLabel} className={ICON_BUTTON}>- {folded ? <ChevronDown size={14} aria-hidden="true" /> : <ChevronUp size={14} aria-hidden="true" />}- </button><button type="button" onClick={onDismiss} aria-label={t("skillBurger.dismiss")} title={t("skillBurger.dismiss")} className={ICON_BUTTON}><X size={14} aria-hidden="true" /></button></div>- <div className="burger-fold" data-folded={folded ? "true" : "false"} inert={folded} aria-hidden={folded || undefined}>- {draft && !live ? (+ {draft && !cooking ? (<div className="flex min-w-0 flex-col gap-[3px]"><DraftInputs inputs={draft.inputs} choices={inputs} disabled={Boolean(saved)} onChange={(name, choice) => setInputs((current) => ({ ...current, [name]: choice }))} /><DraftSteps steps={draft.steps} skipped={skipped} onSkip={setSkipped} disabled={Boolean(saved)} />@@ -213,7 +219,7 @@ export function SkillBurger({ run, layers, draft, summary: initialSummary, canSadata-burger-layer={layer.kind}data-status={layer.status}className={cn(- "burger-layer flex min-h-9 min-w-0 items-center gap-2.5 rounded-[8px] bg-card px-3 text-[13px] shadow-sm",+ "burger-layer flex min-h-9 min-w-0 shrink-0 items-center gap-2.5 rounded-[8px] bg-card px-3 text-[13px] shadow-sm",layer.status === "failed" && "text-danger",)}>@@ -228,10 +234,9 @@ export function SkillBurger({ run, layers, draft, summary: initialSummary, canSa})}</ol>)}- </div>- <div className="burger-bun burger-bun-bottom flex min-h-10 items-center rounded-b-[18px] rounded-t-[8px] bg-raised shadow-sm">- {saved ? (+ {saved && (+ <div className="burger-bun burger-bun-bottom flex min-h-10 items-center rounded-b-[18px] rounded-t-[8px] bg-raised shadow-sm"><div className="flex w-full items-center gap-2 px-3 text-[13px]"><Check size={14} aria-hidden="true" className="shrink-0 text-success" /><span className="min-w-0 flex-1 truncate">{t("skillBurger.saved")}</span>@@ -239,23 +244,27 @@ export function SkillBurger({ run, layers, draft, summary: initialSummary, canSa{t("common.undo")}</button></div>- ) : (- <button- type="button"- onClick={() => void save()}- disabled={!canSave || live || saving.state === "saving"}- title={live ? t("skillBurger.waitForRun") : undefined}- className="flex h-10 w-full items-center justify-center gap-1.5 rounded-b-[18px] rounded-t-[8px] text-[13px] font-medium text-accent-text outline-none transition-colors hover:bg-ink/[0.05] focus-visible:ring-2 focus-visible:ring-accent/60 disabled:cursor-default disabled:text-ink-tertiary disabled:hover:bg-transparent motion-reduce:transition-none"- >- {saving.state === "saving" ? t("skillBurger.saving") : <><Plus size={14} aria-hidden="true" />{t("skillBurger.add")}</>}- </button>- )}+ </div>+ )}+ </div></div>{(saving.state === "error" || saving.state === "undone") && (<p role={saving.state === "error" ? "alert" : "status"} className={cn("px-3 text-[12px]", saving.state === "error" ? "text-danger" : "text-ink-secondary")}>{saving.state === "error" ? saving.message : t("skillBurger.undone")}</p>)}+ <BurgerPill+ marks={pillMarks(layers)}+ label={<span role="status" aria-live="polite" aria-atomic="true">{pillLabel}</span>}+ tone={failed ? "danger" : "normal"}+ open={!folded}+ controls={panelId}+ toggleLabel={toggleLabel}+ onToggle={() => setFolded((value) => !value)}+ action={saved+ ? <span className="flex size-7 shrink-0 items-center justify-center text-success" title={t("skillBurger.saved")}><Check size={14} aria-label={t("skillBurger.saved")} /></span>+ : <button type="button" onClick={() => void save()} disabled={!canSave || cooking || saving.state === "saving"} aria-label={t("skillBurger.add")} title={cooking ? t("skillBurger.waitForRun") : t("skillBurger.add")} className={PILL_ACTION}>{t("skillBurger.pill.add")}</button>}+ /></section>);}diff --git a/src/components/skill-burger/SkillBurgerSlot.tsx b/src/components/skill-burger/SkillBurgerSlot.tsxindex 17d8b300d7..5ef84eed44 100644--- a/src/components/skill-burger/SkillBurgerSlot.tsx+++ b/src/components/skill-burger/SkillBurgerSlot.tsx@@ -68,12 +68,13 @@ export function SkillBurgerSlot({ botId, threadId, busy, canWrite, messages, livconst view = runView(runnable.workflow, seen, seen?.name ?? edit!.name);return (<div className="flex justify-end px-4 pb-2">- <RunBurger key={key} view={view} summary={runnable.workflow.summary} everyChat={runnable.everyChat} botId={botId} threadId={threadId} busy={busy}+ <RunBurger key={key} view={view} summary={runnable.workflow.summary} botId={botId} threadId={threadId} busy={busy}onDismiss={close(key)} {...(edit ? { edited: { undo: edit.undo } } : {})} /></div>);}- if (!run || !burgerWorthy(layers) || closed.get(transcriptKey) === run) return null;+ // The pill shows from the first step while the bot works; a run that ends with too little to keep goes.+ if (!run || !(burgerWorthy(layers) || (busy && layers.length > 0)) || closed.get(transcriptKey) === run) return null;const summary = named.get(runKey) ?? askOf(messages) ?? layers.map(layerLine).join(", ");return (<div className="flex justify-end px-4 pb-2">@@ -84,6 +85,7 @@ export function SkillBurgerSlot({ botId, threadId, busy, canWrite, messages, livdraft={finished ? drafts.get(runKey) ?? null : null}summary={summary.slice(0, 160)}canSave={canWrite && !busy}+ busy={busy}botId={botId}threadId={threadId}onDismiss={close(run)}diff --git a/src/components/skill-burger/SkillBurgersPage.tsx b/src/components/skill-burger/SkillBurgersPage.tsxindex 5b25019550..575665e1a8 100644--- a/src/components/skill-burger/SkillBurgersPage.tsx+++ b/src/components/skill-burger/SkillBurgersPage.tsx@@ -5,7 +5,6 @@ import { t } from "@/lib/i18n";import { useAdvancedMode } from "@/lib/interface-mode";import { renameBurger, runBurgerIn, useSavedBurgers, type SavedWorkflow } from "@/lib/skill-burger";import { useStoreDispatch, useStoreSelector } from "@/state/store-select";-import { BotAvatar } from "../Avatar";import { SidebarPopoverMenu } from "../SidebarPopoverMenu";import { TOOL_PAGE_TITLE, ToolPage, ToolPageHeader } from "../ToolPageShell";import { MiniBurger } from "./MiniBurger";@@ -38,7 +37,7 @@ function BurgerCard({ skill, onRemove }: { skill: SavedWorkflow; onRemove: () =>if (event.key === "Escape") { event.preventDefault(); setRenaming(null); }};return (- <li data-skill-burger-card={skill.name} data-every-chat={skill.everyChat ? "on" : "off"} className="flex min-w-0 gap-3.5 rounded-2xl border border-hairline/40 bg-card p-3.5">+ <li data-skill-burger-card={skill.name} className="flex min-w-0 gap-3.5 rounded-2xl border border-hairline/40 bg-card p-3.5"><MiniBurger skill={skill} /><div className="flex min-w-0 flex-1 flex-col gap-2"><div className="flex min-w-0 items-start gap-1">@@ -72,20 +71,14 @@ function BurgerCard({ skill, onRemove }: { skill: SavedWorkflow; onRemove: () =></span>)}items={[- ...(advanced ? [{ key: "rename", label: t("skillBurger.menu.rename"), icon: <Pencil size={16} />, onSelect: () => setRenaming(skill.name) }] : []),- { key: "delete", label: t("common.delete"), icon: <Trash2 size={16} />, onSelect: onRemove },+ ...(advanced && skill.canChange !== false ? [{ key: "rename", label: t("skillBurger.menu.rename"), icon: <Pencil size={16} />, onSelect: () => setRenaming(skill.name) }] : []),+ ...(skill.canChange !== false ? [{ key: "delete", label: t("common.delete"), icon: <Trash2 size={16} />, onSelect: onRemove }] : []),]}/></div><p className="flex min-w-0 items-center gap-1.5 text-[12px] text-ink-secondary">- {skill.everyChat || !bot ? <span>{t("skillBurger.card.everyChat")}</span> : (- <>- <BotAvatar bot={bot} size={16} />- <span dir="auto" className="min-w-0 truncate">{bot.name}</span>- </>- )}- <span aria-hidden="true">·</span><span className="shrink-0">{skill.layers.length === 1 ? t("skillBurger.layersOne") : t("skillBurger.layersMany", { count: skill.layers.length })}</span>+ {advanced && bot && <><span aria-hidden="true">·</span><span dir="auto" className="min-w-0 truncate">{t("skillBurger.card.madeBy", { name: bot.name })}</span></>}</p>{runner && (<RunWithInputs skill={skill} onRun={(inputs) => runBurgerIn(dispatch, runner, skill.name, inputs)} className="ui-button ui-button-md self-start" />@@ -96,7 +89,7 @@ function BurgerCard({ skill, onRemove }: { skill: SavedWorkflow; onRemove: () =>);}-/** Every Skill Burger the person's bots made: each bot's own, and the ones used in every chat. */+/** Every saved Skill Burger: each one is used in every chat by every bot. */export function SkillBurgersPage() {const dispatch = useStoreDispatch();const { skills, error, refresh } = useSavedBurgers();@@ -131,7 +124,7 @@ export function SkillBurgersPage() {</section>) : skills ? (<ul aria-label={t("skillBurger.list.title")} className="grid grid-cols-[repeat(auto-fill,minmax(min(320px,100%),1fr))] gap-4">- {skills.map((skill) => <BurgerCard key={`${skill.everyChat ? "every" : skill.botId}:${skill.name}`} skill={skill} onRemove={() => void remove(skill)} />)}+ {skills.map((skill) => <BurgerCard key={skill.name} skill={skill} onRemove={() => void remove(skill)} />)}</ul>) : null}</div>diff --git a/src/lib/skill-burger.ts b/src/lib/skill-burger.tsindex 043109e62f..8ac824c5a5 100644--- a/src/lib/skill-burger.ts+++ b/src/lib/skill-burger.ts@@ -31,31 +31,17 @@ export async function saveBurger(input: { botId: string; threadId: string; summareturn skill;}-/** Where a saved burger is, as the API takes it: a bot's own burger by its bot, one used in every chat by name alone. */-const placeQuery = (skill: Pick<SavedWorkflow, "everyChat" | "botId">) => (skill.everyChat || !skill.botId ? "" : `botId=${encodeURIComponent(skill.botId)}`);-const path = (skill: Pick<SavedWorkflow, "name" | "everyChat" | "botId">, extra = "") => {- const query = [placeQuery(skill), extra].filter(Boolean).join("&");- return `/api/skill-burgers/${encodeURIComponent(skill.name)}${query ? `?${query}` : ""}`;-};+const path = (name: string, query = "") => `/api/skill-burgers/${encodeURIComponent(name)}${query ? `?${query}` : ""}`;/** Undo or remove: takes away the copy with this hash; one that changed since is refused. */-export async function removeBurger(skill: Pick<SavedWorkflow, "name" | "sha256" | "everyChat" | "botId">): Promise<void> {- await api(path(skill, `sha256=${encodeURIComponent(skill.sha256)}`), { method: "DELETE" });- changed();-}--/** "Use in every chat": on moves the burger into the shared library for every bot, off moves it back to its bot. */-export async function setBurgerEveryChat(skill: Pick<SavedWorkflow, "name" | "sha256" | "everyChat" | "botId">, everyChat: boolean): Promise<SavedWorkflow> {- const { skill: moved } = await api<{ skill: SavedWorkflow }>(`/api/skill-burgers/${encodeURIComponent(skill.name)}`, {- method: "PATCH", body: JSON.stringify({ everyChat, sha256: skill.sha256, ...(skill.everyChat || !skill.botId ? {} : { botId: skill.botId }) }),- });+export async function removeBurger(skill: Pick<SavedWorkflow, "name" | "sha256">): Promise<void> {+ await api(path(skill.name, `sha256=${encodeURIComponent(skill.sha256)}`), { method: "DELETE" });changed();- return moved;}-export async function renameBurger(skill: Pick<SavedWorkflow, "name" | "sha256" | "everyChat" | "botId">, to: string): Promise<SavedWorkflow> {- const { skill: renamed } = await api<{ skill: SavedWorkflow }>(`/api/skill-burgers/${encodeURIComponent(skill.name)}`, {- method: "PATCH", body: JSON.stringify({ rename: to, sha256: skill.sha256, ...(skill.everyChat || !skill.botId ? {} : { botId: skill.botId }) }),+export async function renameBurger(skill: Pick<SavedWorkflow, "name" | "sha256">, to: string): Promise<SavedWorkflow> {+ const { skill: renamed } = await api<{ skill: SavedWorkflow }>(path(skill.name), {+ method: "PATCH", body: JSON.stringify({ rename: to, sha256: skill.sha256 }),});changed();return renamed;@@ -78,15 +64,15 @@ export function useSavedBurgers(): { skills: SavedWorkflow[] | null; error: bool}/** The saved workflow itself, read before a removal so its Undo can put it back. */-export async function readBurgerWorkflow(skill: Pick<SavedWorkflow, "name" | "everyChat" | "botId">): Promise<unknown> {- const { workflow } = await api<{ workflow: unknown }>(path(skill));+export async function readBurgerWorkflow(skill: Pick<SavedWorkflow, "name">): Promise<unknown> {+ const { workflow } = await api<{ workflow: unknown }>(path(skill.name));return workflow;}/** Puts a removed burger back where it was. */-export async function restoreBurger(skill: Pick<SavedWorkflow, "name" | "everyChat" | "botId">, workflow: unknown): Promise<SavedWorkflow> {+export async function restoreBurger(skill: Pick<SavedWorkflow, "name" | "botId">, workflow: unknown): Promise<SavedWorkflow> {const { skill: restored } = await api<{ skill: SavedWorkflow }>("/api/skill-burgers", {- method: "POST", body: JSON.stringify({ name: skill.name, workflow, ...(skill.botId ? { botId: skill.botId } : {}), ...(skill.everyChat ? { everyChat: true } : {}) }),+ method: "POST", body: JSON.stringify({ name: skill.name, workflow, ...(skill.botId ? { botId: skill.botId } : {}) }),});changed();return restored;@@ -135,10 +121,10 @@ export async function fetchBurgerRuns(name: string): Promise<BurgerRunRecord[]>}/** "Update the burger with this fix": the steps the bot took to get past a failed step replace that step. */-export async function keepBurgerFix(input: { name: string; everyChat: boolean; runBotId: string; threadId: string; run: string; step: string }): Promise<{ skill: SavedWorkflow; undo: string }> {- const { name, everyChat, ...rest } = input;+export async function keepBurgerFix(input: { name: string; runBotId: string; threadId: string; run: string; step: string }): Promise<{ skill: SavedWorkflow; undo: string }> {+ const { name, ...rest } = input;const result = await api<{ skill: SavedWorkflow; undo: string }>(`/api/skill-burgers/${encodeURIComponent(name)}/fix`, {- method: "POST", body: JSON.stringify({ ...rest, ...(everyChat ? {} : { botId: input.runBotId }) }),+ method: "POST", body: JSON.stringify(rest),});changed();return result;@@ -152,10 +138,10 @@ export function rememberSavedRun(run: string, skill: SavedWorkflow | null): voidelse savedRuns.delete(run);}-/** A Skill Burger as `botId` would run it by name: its own first, then one used in every chat. */-export async function fetchRunnable(name: string, botId: string): Promise<{ workflow: Workflow; everyChat: boolean } | null> {+/** A Skill Burger as `botId` would run it by name. */+export async function fetchRunnable(name: string, botId: string): Promise<{ workflow: Workflow } | null> {try {- return await api<{ workflow: Workflow; everyChat: boolean }>(`/api/skill-burgers/${encodeURIComponent(name)}?runner=${encodeURIComponent(botId)}`);+ return await api<{ workflow: Workflow }>(path(name, `runner=${encodeURIComponent(botId)}`));} catch {return null;}@@ -169,24 +155,24 @@ export const runCommand = (name: string, inputs: Record<string, string> = {}) =>};/** One tap's "Add the path": the steps the bot did by judgement for a case nobody had saved become that case's steps. */-export async function addBurgerPath(input: { name: string; everyChat: boolean; runBotId: string; threadId: string; run: string; decide: string; case: string }): Promise<{ skill: SavedWorkflow; undo: string }> {- const { name, everyChat, ...rest } = input;+export async function addBurgerPath(input: { name: string; runBotId: string; threadId: string; run: string; decide: string; case: string }): Promise<{ skill: SavedWorkflow; undo: string }> {+ const { name, ...rest } = input;const result = await api<{ skill: SavedWorkflow; undo: string }>(`/api/skill-burgers/${encodeURIComponent(name)}/paths`, {- method: "POST", body: JSON.stringify({ ...rest, ...(everyChat ? {} : { botId: input.runBotId }) }),+ method: "POST", body: JSON.stringify(rest),});changed();return result;}/** Undo of a change to a burger's steps. */-export async function undoBurgerEdit(input: { name: string; everyChat: boolean; botId: string; undo: string }): Promise<void> {- await api(`/api/skill-burgers/${encodeURIComponent(input.name)}`, { method: "PATCH", body: JSON.stringify({ undo: input.undo, ...(input.everyChat ? {} : { botId: input.botId }) }) });+export async function undoBurgerEdit(input: { name: string; undo: string }): Promise<void> {+ await api(path(input.name), { method: "PATCH", body: JSON.stringify({ undo: input.undo }) });changed();}/** The burger `botId` runs by `name`, read again whenever a burger changes. */-export function useRunnable(name: string | null, botId: string): { workflow: Workflow; everyChat: boolean } | null {- const [found, setFound] = useState<{ key: string; value: { workflow: Workflow; everyChat: boolean } | null } | null>(null);+export function useRunnable(name: string | null, botId: string): { workflow: Workflow } | null {+ const [found, setFound] = useState<{ key: string; value: { workflow: Workflow } | null } | null>(null);const key = name ? `${botId}:${name}` : "";useEffect(() => {if (!name) return;diff --git a/src/locales/de.json b/src/locales/de.jsonindex f99033b068..aba1a1d70d 100644--- a/src/locales/de.json+++ b/src/locales/de.json@@ -4325,12 +4325,9 @@"skillBurger.list.removed": "{name} entfernt.","skillBurger.list.removeFailed": "Dieser Skill konnte nicht entfernt werden. Versuch es noch einmal.","skillBurger.list.loadFailed": "Gespeicherte Skills konnten nicht geladen werden.",- "skillBurger.everyChat": "In jedem Chat verwenden",- "skillBurger.everyChatFailed": "Konnte nicht ändern, wo dieser Skill Burger verwendet wird. Versuch es noch einmal.","skillBurger.renameFailed": "Dieser Skill Burger konnte nicht umbenannt werden. Versuch es noch einmal.","skillBurger.menu.aria": "Mehr zu {name}","skillBurger.menu.rename": "Umbenennen…",- "skillBurger.card.everyChat": "Jeder Chat","skillBurger.page.empty": "Skill Burger deiner Bots erscheinen hier.","chat.notice.savedToThread": "In diesem Thread gespeichert","memoryPage.thisThread": "Dieser Thread",@@ -4353,5 +4350,11 @@"skillBurger.run.pathUndone": "Weg entfernt","skillBurger.run.addPathFailed": "Das hat nicht geklappt. Versuch es noch einmal.","activity.tool.team.runWorkflow": "Skill Burger ausführen",- "activity.tool.team.workflowEdit": "Skill Burger ändern"+ "activity.tool.team.workflowEdit": "Skill Burger ändern",+ "skillBurger.pill.cooking": "Wird gekocht… {count}",+ "skillBurger.pill.add": "Hinzufügen",+ "skillBurger.pill.running": "Läuft… {count}",+ "skillBurger.pill.stopped": "Angehalten",+ "skillBurger.pill.addPath": "Weg hinzufügen",+ "skillBurger.card.madeBy": "Erstellt von {name}"}diff --git a/src/locales/en.json b/src/locales/en.jsonindex 15f1a9eed9..aae8866917 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -11809,12 +11809,9 @@"skillBurger.list.removed": "Removed {name}.","skillBurger.list.removeFailed": "Couldn't remove this skill. Try again.","skillBurger.list.loadFailed": "Couldn't load saved skills.",- "skillBurger.everyChat": "Use in every chat",- "skillBurger.everyChatFailed": "Couldn’t change where this Skill Burger is used. Try again.","skillBurger.renameFailed": "Couldn’t rename this Skill Burger. Try again.","skillBurger.menu.aria": "More for {name}","skillBurger.menu.rename": "Rename…",- "skillBurger.card.everyChat": "Every chat","skillBurger.page.empty": "Skill Burgers your bots make show up here.","skillBurger.run.button": "Run","skillBurger.runName": "Run {name}",@@ -11868,5 +11865,11 @@"skillBurger.run.keepFix": "Update the burger with this fix","skillBurger.run.fixKept": "Burger updated with the fix","skillBurger.run.inputs": "Run with",- "skillBurger.run.go": "Run now"+ "skillBurger.run.go": "Run now",+ "skillBurger.pill.cooking": "Cooking… {count}",+ "skillBurger.pill.add": "Add",+ "skillBurger.pill.running": "Running… {count}",+ "skillBurger.pill.stopped": "Stopped",+ "skillBurger.pill.addPath": "Add path",+ "skillBurger.card.madeBy": "Made by {name}"}diff --git a/src/locales/es.json b/src/locales/es.jsonindex e4845d575f..9744a85ba7 100644--- a/src/locales/es.json+++ b/src/locales/es.json@@ -6577,12 +6577,9 @@"skillBurger.list.removed": "{name} quitada.","skillBurger.list.removeFailed": "No se pudo quitar esta habilidad. Inténtalo de nuevo.","skillBurger.list.loadFailed": "No se pudieron cargar las habilidades guardadas.",- "skillBurger.everyChat": "Usar en todos los chats",- "skillBurger.everyChatFailed": "No se pudo cambiar dónde se usa este Skill Burger. Inténtalo de nuevo.","skillBurger.renameFailed": "No se pudo cambiar el nombre de este Skill Burger. Inténtalo de nuevo.","skillBurger.menu.aria": "Más de {name}","skillBurger.menu.rename": "Cambiar nombre…",- "skillBurger.card.everyChat": "Todos los chats","skillBurger.page.empty": "Aquí aparecen los Skill Burgers que hacen tus bots.","chat.notice.savedToThread": "Guardado en este hilo","memoryPage.thisThread": "Este hilo",@@ -6623,5 +6620,11 @@"chat.botExchange.gone": "Este intercambio no se puede detener desde aquí.","chat.botExchange.stopFailed": "No se pudo detener. Comprueba tu conexión e inténtalo de nuevo.","chat.botExchange.waiting": "{helper} aún no ha empezado con esto. Está esperando su turno.",- "chat.botExchange.unknown": "No está claro qué mensajes de la conversación de {helper} pertenecen a este intercambio, así que no se muestra ninguno."+ "chat.botExchange.unknown": "No está claro qué mensajes de la conversación de {helper} pertenecen a este intercambio, así que no se muestra ninguno.",+ "skillBurger.pill.cooking": "Cocinando… {count}",+ "skillBurger.pill.add": "Añadir",+ "skillBurger.pill.running": "Ejecutando… {count}",+ "skillBurger.pill.stopped": "Detenido",+ "skillBurger.pill.addPath": "Añadir camino",+ "skillBurger.card.madeBy": "Hecho por {name}"}diff --git a/src/locales/fr.json b/src/locales/fr.jsonindex a1d7165cae..6c1c3f74a7 100644--- a/src/locales/fr.json+++ b/src/locales/fr.json@@ -3982,12 +3982,9 @@"skillBurger.list.removed": "{name} retirée.","skillBurger.list.removeFailed": "Impossible de retirer cette compétence. Réessayez.","skillBurger.list.loadFailed": "Impossible de charger les compétences enregistrées.",- "skillBurger.everyChat": "Utiliser dans chaque chat",- "skillBurger.everyChatFailed": "Impossible de changer où ce Skill Burger est utilisé. Réessayez.","skillBurger.renameFailed": "Impossible de renommer ce Skill Burger. Réessayez.","skillBurger.menu.aria": "Plus pour {name}","skillBurger.menu.rename": "Renommer…",- "skillBurger.card.everyChat": "Chaque chat","skillBurger.page.empty": "Les Skill Burgers de vos bots apparaissent ici.","chat.notice.savedToThread": "Enregistré dans ce fil","memoryPage.thisThread": "Ce fil",@@ -4028,5 +4025,11 @@"chat.botExchange.gone": "Cet échange ne peut pas être arrêté d’ici.","chat.botExchange.stopFailed": "Impossible d’arrêter. Vérifiez votre connexion et réessayez.","chat.botExchange.waiting": "{helper} n’a pas encore commencé. Il attend son tour.",- "chat.botExchange.unknown": "Impossible de savoir quels messages de la conversation de {helper} appartiennent à cet échange : aucun n’est affiché."+ "chat.botExchange.unknown": "Impossible de savoir quels messages de la conversation de {helper} appartiennent à cet échange : aucun n’est affiché.",+ "skillBurger.pill.cooking": "En cuisine… {count}",+ "skillBurger.pill.add": "Ajouter",+ "skillBurger.pill.running": "En cours… {count}",+ "skillBurger.pill.stopped": "Arrêté",+ "skillBurger.pill.addPath": "Ajouter le chemin",+ "skillBurger.card.madeBy": "Créé par {name}"}diff --git a/src/locales/hi.json b/src/locales/hi.jsonindex 33ee7a9ab3..89a1c1fef2 100644--- a/src/locales/hi.json+++ b/src/locales/hi.json@@ -3834,12 +3834,9 @@"skillBurger.list.removed": "{name} हटाया गया।","skillBurger.list.removeFailed": "यह स्किल हटाई नहीं जा सकी। फिर कोशिश करें।","skillBurger.list.loadFailed": "सहेजी गई स्किल्स लोड नहीं हो सकीं।",- "skillBurger.everyChat": "हर चैट में इस्तेमाल करें",- "skillBurger.everyChatFailed": "यह Skill Burger कहाँ इस्तेमाल हो, यह बदला नहीं जा सका। फिर कोशिश करें।","skillBurger.renameFailed": "इस Skill Burger का नाम नहीं बदला जा सका। फिर कोशिश करें।","skillBurger.menu.aria": "{name} के लिए और","skillBurger.menu.rename": "नाम बदलें…",- "skillBurger.card.everyChat": "हर चैट","skillBurger.page.empty": "आपके बॉट जो Skill Burgers बनाते हैं, वे यहाँ दिखते हैं।","chat.notice.savedToThread": "इस थ्रेड में सहेजा गया","memoryPage.thisThread": "यह थ्रेड",@@ -3880,5 +3877,11 @@"chat.botExchange.gone": "इस बातचीत को यहाँ से रोका नहीं जा सकता।","chat.botExchange.stopFailed": "रोका नहीं जा सका। अपना कनेक्शन जाँचें और फिर से कोशिश करें।","chat.botExchange.waiting": "{helper} ने अभी यह शुरू नहीं किया है। अपनी बारी का इंतज़ार कर रहा है।",- "chat.botExchange.unknown": "यह साफ़ नहीं है कि {helper} की बातचीत के कौन-से संदेश इस आदान-प्रदान के हैं, इसलिए कोई नहीं दिखाया गया।"+ "chat.botExchange.unknown": "यह साफ़ नहीं है कि {helper} की बातचीत के कौन-से संदेश इस आदान-प्रदान के हैं, इसलिए कोई नहीं दिखाया गया।",+ "skillBurger.pill.cooking": "बन रहा है… {count}",+ "skillBurger.pill.add": "जोड़ें",+ "skillBurger.pill.running": "चल रहा है… {count}",+ "skillBurger.pill.stopped": "रुका",+ "skillBurger.pill.addPath": "रास्ता जोड़ें",+ "skillBurger.card.madeBy": "{name} ने बनाया"}diff --git a/src/locales/it.json b/src/locales/it.jsonindex e9ebe19665..a403b814d9 100644--- a/src/locales/it.json+++ b/src/locales/it.json@@ -11753,12 +11753,9 @@"skillBurger.list.removed": "{name} rimosso.","skillBurger.list.removeFailed": "Impossibile rimuovere questa abilità. Riprova.","skillBurger.list.loadFailed": "Impossibile caricare le abilità salvate.",- "skillBurger.everyChat": "Usa in tutte le chat",- "skillBurger.everyChatFailed": "Impossibile modificare dove viene utilizzato questo Skill Burger. Riprova.","skillBurger.renameFailed": "Impossibile rinominare questo Skill Burger. Riprova.","skillBurger.menu.aria": "Altro per {name}","skillBurger.menu.rename": "Rinomina…",- "skillBurger.card.everyChat": "Tutte le chat","skillBurger.page.empty": "Gli Skill Burger creati dai tuoi bot appariranno qui.","skillBurger.run.button": "Esegui","skillBurger.runName": "Esegui {name}",@@ -11795,5 +11792,11 @@"chat.botExchange.gone": "Questo scambio non si può fermare da qui.","chat.botExchange.stopFailed": "Impossibile fermarlo. Controlla la connessione e riprova.","chat.botExchange.waiting": "{helper} non ha ancora iniziato. Sta aspettando il suo turno.",- "chat.botExchange.unknown": "Non è chiaro quali messaggi della conversazione di {helper} appartengano a questo scambio, quindi non ne viene mostrato nessuno."+ "chat.botExchange.unknown": "Non è chiaro quali messaggi della conversazione di {helper} appartengano a questo scambio, quindi non ne viene mostrato nessuno.",+ "skillBurger.pill.cooking": "In cottura… {count}",+ "skillBurger.pill.add": "Aggiungi",+ "skillBurger.pill.running": "In esecuzione… {count}",+ "skillBurger.pill.stopped": "Fermato",+ "skillBurger.pill.addPath": "Aggiungi percorso",+ "skillBurger.card.madeBy": "Creato da {name}"}diff --git a/src/locales/ja.json b/src/locales/ja.jsonindex 16251437e7..dacf20a4ae 100644--- a/src/locales/ja.json+++ b/src/locales/ja.json@@ -8114,12 +8114,9 @@"skillBurger.list.removed": "{name} を削除しました。","skillBurger.list.removeFailed": "このスキルを削除できませんでした。もう一度お試しください。","skillBurger.list.loadFailed": "保存したスキルを読み込めませんでした。",- "skillBurger.everyChat": "すべてのチャットで使う",- "skillBurger.everyChatFailed": "この Skill Burger を使う場所を変更できませんでした。もう一度お試しください。","skillBurger.renameFailed": "この Skill Burger の名前を変更できませんでした。もう一度お試しください。","skillBurger.menu.aria": "{name} のその他の操作","skillBurger.menu.rename": "名前を変更…",- "skillBurger.card.everyChat": "すべてのチャット","skillBurger.page.empty": "ボットが作った Skill Burger はここに表示されます。","chat.notice.savedToThread": "このスレッドに保存しました","skillBurger.run.button": "実行",@@ -8157,5 +8154,11 @@"chat.botExchange.gone": "このやり取りはここからは停止できません。","chat.botExchange.stopFailed": "停止できませんでした。接続を確認してもう一度お試しください。","chat.botExchange.waiting": "{helper} はまだ着手していません。順番を待っています。",- "chat.botExchange.unknown": "{helper} の会話のどのメッセージがこのやり取りのものか判別できないため、表示していません。"+ "chat.botExchange.unknown": "{helper} の会話のどのメッセージがこのやり取りのものか判別できないため、表示していません。",+ "skillBurger.pill.cooking": "調理中… {count}",+ "skillBurger.pill.add": "追加",+ "skillBurger.pill.running": "実行中… {count}",+ "skillBurger.pill.stopped": "停止",+ "skillBurger.pill.addPath": "手順を追加",+ "skillBurger.card.madeBy": "{name} が作成"}diff --git a/src/locales/ko.json b/src/locales/ko.jsonindex 73eecccd1a..2008bc3c68 100644--- a/src/locales/ko.json+++ b/src/locales/ko.json@@ -7804,12 +7804,9 @@"skillBurger.list.removed": "{name}을(를) 제거했습니다.","skillBurger.list.removeFailed": "이 스킬을 제거하지 못했습니다. 다시 시도하세요.","skillBurger.list.loadFailed": "저장된 스킬을 불러오지 못했습니다.",- "skillBurger.everyChat": "모든 채팅에서 사용",- "skillBurger.everyChatFailed": "이 Skill Burger를 사용하는 곳을 바꾸지 못했습니다. 다시 시도하세요.","skillBurger.renameFailed": "이 Skill Burger의 이름을 바꾸지 못했습니다. 다시 시도하세요.","skillBurger.menu.aria": "{name} 더 보기","skillBurger.menu.rename": "이름 바꾸기…",- "skillBurger.card.everyChat": "모든 채팅","skillBurger.page.empty": "봇이 만든 Skill Burger가 여기에 표시됩니다.","chat.notice.savedToThread": "이 스레드에 저장했어요","skillBurger.run.button": "실행",@@ -7847,5 +7844,11 @@"chat.botExchange.gone": "이 대화는 여기서 중지할 수 없어요.","chat.botExchange.stopFailed": "중지하지 못했어요. 연결을 확인하고 다시 시도하세요.","chat.botExchange.waiting": "{helper}이(가) 아직 시작하지 않았어요. 차례를 기다리는 중이에요.",- "chat.botExchange.unknown": "{helper}의 대화 중 어떤 메시지가 이 교환에 속하는지 알 수 없어 아무것도 표시하지 않아요."+ "chat.botExchange.unknown": "{helper}의 대화 중 어떤 메시지가 이 교환에 속하는지 알 수 없어 아무것도 표시하지 않아요.",+ "skillBurger.pill.cooking": "요리 중… {count}",+ "skillBurger.pill.add": "추가",+ "skillBurger.pill.running": "실행 중… {count}",+ "skillBurger.pill.stopped": "멈춤",+ "skillBurger.pill.addPath": "경로 추가",+ "skillBurger.card.madeBy": "{name}이(가) 만듦"}diff --git a/src/locales/pl.json b/src/locales/pl.jsonindex 1931c38d52..584076461e 100644--- a/src/locales/pl.json+++ b/src/locales/pl.json@@ -7276,12 +7276,9 @@"skillBurger.list.removed": "Usunięto {name}.","skillBurger.list.removeFailed": "Nie udało się usunąć tej umiejętności. Spróbuj ponownie.","skillBurger.list.loadFailed": "Nie udało się wczytać zapisanych umiejętności.",- "skillBurger.everyChat": "Używaj w każdym czacie",- "skillBurger.everyChatFailed": "Nie udało się zmienić, gdzie używany jest ten Skill Burger. Spróbuj ponownie.","skillBurger.renameFailed": "Nie udało się zmienić nazwy tego Skill Burger. Spróbuj ponownie.","skillBurger.menu.aria": "Więcej dla {name}","skillBurger.menu.rename": "Zmień nazwę…",- "skillBurger.card.everyChat": "Każdy czat","skillBurger.page.empty": "Tu pojawiają się Skill Burgery Twoich botów.","chat.notice.savedToThread": "Zapisano w tym wątku","skillBurger.run.button": "Uruchom",@@ -7319,5 +7316,11 @@"chat.botExchange.gone": "Tej wymiany nie można zatrzymać stąd.","chat.botExchange.stopFailed": "Nie udało się zatrzymać. Sprawdź połączenie i spróbuj ponownie.","chat.botExchange.waiting": "{helper} jeszcze nie zaczął. Czeka na swoją kolej.",- "chat.botExchange.unknown": "Nie wiadomo, które wiadomości z rozmowy z {helper} należą do tej wymiany, więc żadna nie jest pokazana."+ "chat.botExchange.unknown": "Nie wiadomo, które wiadomości z rozmowy z {helper} należą do tej wymiany, więc żadna nie jest pokazana.",+ "skillBurger.pill.cooking": "Gotuje się… {count}",+ "skillBurger.pill.add": "Dodaj",+ "skillBurger.pill.running": "Trwa… {count}",+ "skillBurger.pill.stopped": "Zatrzymano",+ "skillBurger.pill.addPath": "Dodaj ścieżkę",+ "skillBurger.card.madeBy": "Utworzone przez {name}"}diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex e217a57fa5..c71100e779 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -11809,12 +11809,9 @@"skillBurger.list.removed": "{name} removida.","skillBurger.list.removeFailed": "Não foi possível remover esta habilidade. Tente de novo.","skillBurger.list.loadFailed": "Não foi possível carregar as habilidades salvas.",- "skillBurger.everyChat": "Usar em todos os chats",- "skillBurger.everyChatFailed": "Não foi possível mudar onde este Skill Burger é usado. Tente de novo.","skillBurger.renameFailed": "Não foi possível renomear este Skill Burger. Tente de novo.","skillBurger.menu.aria": "Mais de {name}","skillBurger.menu.rename": "Renomear…",- "skillBurger.card.everyChat": "Todos os chats","skillBurger.page.empty": "Os Skill Burgers dos seus bots aparecem aqui.","skillBurger.run.button": "Executar","skillBurger.runName": "Executar {name}",@@ -11868,5 +11865,11 @@"skillBurger.run.keepFix": "Atualizar o burger com esta correção","skillBurger.run.fixKept": "Burger atualizado com a correção","skillBurger.run.inputs": "Executar com",- "skillBurger.run.go": "Executar agora"+ "skillBurger.run.go": "Executar agora",+ "skillBurger.pill.cooking": "Cozinhando… {count}",+ "skillBurger.pill.add": "Adicionar",+ "skillBurger.pill.running": "Executando… {count}",+ "skillBurger.pill.stopped": "Parado",+ "skillBurger.pill.addPath": "Adicionar caminho",+ "skillBurger.card.madeBy": "Feito por {name}"}diff --git a/src/locales/ru.json b/src/locales/ru.jsonindex ed00cef5d6..080cedc266 100644--- a/src/locales/ru.json+++ b/src/locales/ru.json@@ -7330,12 +7330,9 @@"skillBurger.list.removed": "{name} удалён.","skillBurger.list.removeFailed": "Не удалось удалить навык. Попробуйте ещё раз.","skillBurger.list.loadFailed": "Не удалось загрузить сохранённые навыки.",- "skillBurger.everyChat": "Использовать в каждом чате",- "skillBurger.everyChatFailed": "Не удалось изменить, где используется этот Skill Burger. Попробуйте ещё раз.","skillBurger.renameFailed": "Не удалось переименовать этот Skill Burger. Попробуйте ещё раз.","skillBurger.menu.aria": "Ещё для {name}","skillBurger.menu.rename": "Переименовать…",- "skillBurger.card.everyChat": "Каждый чат","skillBurger.page.empty": "Здесь появляются Skill Burger ваших ботов.","chat.notice.savedToThread": "Сохранено в этой ветке","skillBurger.run.button": "Запустить",@@ -7373,5 +7370,11 @@"chat.botExchange.gone": "Этот обмен нельзя остановить отсюда.","chat.botExchange.stopFailed": "Не удалось остановить. Проверьте подключение и попробуйте снова.","chat.botExchange.waiting": "{helper} ещё не начал. Ждёт своей очереди.",- "chat.botExchange.unknown": "Непонятно, какие сообщения из разговора с {helper} относятся к этому обмену, поэтому ни одно не показано."+ "chat.botExchange.unknown": "Непонятно, какие сообщения из разговора с {helper} относятся к этому обмену, поэтому ни одно не показано.",+ "skillBurger.pill.cooking": "Готовится… {count}",+ "skillBurger.pill.add": "Добавить",+ "skillBurger.pill.running": "Выполняется… {count}",+ "skillBurger.pill.stopped": "Остановлено",+ "skillBurger.pill.addPath": "Добавить путь",+ "skillBurger.card.madeBy": "Создано: {name}"}diff --git a/src/locales/source-hashes.json b/src/locales/source-hashes.jsonindex 8164332af4..334d3a04c3 100644--- a/src/locales/source-hashes.json+++ b/src/locales/source-hashes.json@@ -4274,12 +4274,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",@@ -10854,12 +10851,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",@@ -14837,12 +14831,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",@@ -18672,12 +18663,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",@@ -26784,12 +26772,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",@@ -38528,12 +38513,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",@@ -48863,12 +48845,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",@@ -59251,12 +59230,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",@@ -63506,12 +63482,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",@@ -69579,12 +69552,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",@@ -75652,12 +75622,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",@@ -82926,12 +82893,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",@@ -90254,12 +90218,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",@@ -101720,12 +101681,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",@@ -109522,12 +109480,9 @@"skillBurger.list.removed": "a1a2461156e4b83d78d6616d10f71ef9e3d805dc96b8195dbc44c696b948e279","skillBurger.list.removeFailed": "03292cf87efee70cdd2f6dc2f2b756fb7bb63e8b925a17f0debb93db5116be26","skillBurger.list.loadFailed": "ce5dca91e3fe3e32f3b080ad56b3e4dcfa4fbb4046c3f3367d3d29ef23df812c",- "skillBurger.everyChat": "8109316d38ebfaa198e8fd3df25b96c90ddc3faf483c704229288b3836c41bbc",- "skillBurger.everyChatFailed": "d3975a2631cb5ad7c2bdbf3d040f89c24a0285c8318cc335bf67211379727932","skillBurger.renameFailed": "1bb9bc1f02d5c2d3915ecf9974c990a81f1d967290900d90ca1dc780586c09dd","skillBurger.menu.aria": "f608d3348f5f91d57ab2cce10e8532510658d5773ef01d01cad83396e652c1b3","skillBurger.menu.rename": "6fa62b3dba2f02f2fe92df35669ff8ef242051be54b1d3aaadfd798e07abbce9",- "skillBurger.card.everyChat": "bf7316f06d071bbaecf615f0765a0656b508d4a33387064a0f36d5475f703450","skillBurger.page.empty": "791d7d255294881aeddec8d476cdd4cede45560565d353dff2ac906e3c5688dc","skillBurger.run.button": "00d60e31a4e6b8344d4201f25a6a7dee770713107f6d097abb01559d32b17f26","skillBurger.runName": "7e8d49b80b7db8ae0f9f855dcea020d9a124fca1f7bf1ecb15a63ed0a88afb11",diff --git a/src/locales/tr.json b/src/locales/tr.jsonindex 8e6f202130..10416bf7f7 100644--- a/src/locales/tr.json+++ b/src/locales/tr.json@@ -6072,12 +6072,9 @@"skillBurger.list.removed": "{name} kaldırıldı.","skillBurger.list.removeFailed": "Bu beceri kaldırılamadı. Tekrar deneyin.","skillBurger.list.loadFailed": "Kaydedilen beceriler yüklenemedi.",- "skillBurger.everyChat": "Her sohbette kullan",- "skillBurger.everyChatFailed": "Bu Skill Burger'ın kullanıldığı yer değiştirilemedi. Tekrar deneyin.","skillBurger.renameFailed": "Bu Skill Burger yeniden adlandırılamadı. Tekrar deneyin.","skillBurger.menu.aria": "{name} için daha fazla","skillBurger.menu.rename": "Yeniden adlandır…",- "skillBurger.card.everyChat": "Her sohbet","skillBurger.page.empty": "Botlarınızın yaptığı Skill Burger'lar burada görünür.","chat.notice.savedToThread": "Bu konuşmaya kaydedildi","memoryPage.thisThread": "Bu konuşma",@@ -6118,5 +6115,11 @@"chat.botExchange.gone": "Bu konuşma buradan durdurulamaz.","chat.botExchange.stopFailed": "Durdurulamadı. Bağlantını kontrol edip tekrar dene.","chat.botExchange.waiting": "{helper} buna henüz başlamadı. Sırasını bekliyor.",- "chat.botExchange.unknown": "{helper} ile konuşmadaki hangi mesajların bu alışverişe ait olduğu belli değil, bu yüzden hiçbiri gösterilmiyor."+ "chat.botExchange.unknown": "{helper} ile konuşmadaki hangi mesajların bu alışverişe ait olduğu belli değil, bu yüzden hiçbiri gösterilmiyor.",+ "skillBurger.pill.cooking": "Pişiyor… {count}",+ "skillBurger.pill.add": "Ekle",+ "skillBurger.pill.running": "Çalışıyor… {count}",+ "skillBurger.pill.stopped": "Durdu",+ "skillBurger.pill.addPath": "Yol ekle",+ "skillBurger.card.madeBy": "{name} tarafından yapıldı"}diff --git a/src/locales/uk.json b/src/locales/uk.jsonindex 998817f1a8..ed12565050 100644--- a/src/locales/uk.json+++ b/src/locales/uk.json@@ -4254,12 +4254,9 @@"skillBurger.list.removed": "{name} вилучено.","skillBurger.list.removeFailed": "Не вдалося вилучити навичку. Спробуйте ще раз.","skillBurger.list.loadFailed": "Не вдалося завантажити збережені навички.",- "skillBurger.everyChat": "Використовувати в кожному чаті",- "skillBurger.everyChatFailed": "Не вдалося змінити, де використовується цей Skill Burger. Спробуйте ще раз.","skillBurger.renameFailed": "Не вдалося перейменувати цей Skill Burger. Спробуйте ще раз.","skillBurger.menu.aria": "Більше для {name}","skillBurger.menu.rename": "Перейменувати…",- "skillBurger.card.everyChat": "Кожен чат","skillBurger.page.empty": "Тут з’являються Skill Burger ваших ботів.","chat.notice.savedToThread": "Збережено в цій гілці","memoryPage.thisThread": "Ця гілка",@@ -4300,5 +4297,11 @@"chat.botExchange.gone": "Цей обмін не можна зупинити звідси.","chat.botExchange.stopFailed": "Не вдалося зупинити. Перевірте з’єднання і спробуйте ще раз.","chat.botExchange.waiting": "{helper} ще не почав. Чекає своєї черги.",- "chat.botExchange.unknown": "Незрозуміло, які повідомлення з розмови з {helper} належать до цього обміну, тому жодне не показано."+ "chat.botExchange.unknown": "Незрозуміло, які повідомлення з розмови з {helper} належать до цього обміну, тому жодне не показано.",+ "skillBurger.pill.cooking": "Готується… {count}",+ "skillBurger.pill.add": "Додати",+ "skillBurger.pill.running": "Виконується… {count}",+ "skillBurger.pill.stopped": "Зупинено",+ "skillBurger.pill.addPath": "Додати шлях",+ "skillBurger.card.madeBy": "Створено: {name}"}diff --git a/src/locales/vi.json b/src/locales/vi.jsonindex ad92fdb727..34f65c4e20 100644--- a/src/locales/vi.json+++ b/src/locales/vi.json@@ -6072,12 +6072,9 @@"skillBurger.list.removed": "Đã xóa {name}.","skillBurger.list.removeFailed": "Không thể xóa kỹ năng này. Hãy thử lại.","skillBurger.list.loadFailed": "Không thể tải các kỹ năng đã lưu.",- "skillBurger.everyChat": "Dùng trong mọi cuộc trò chuyện",- "skillBurger.everyChatFailed": "Không thể đổi nơi dùng Skill Burger này. Hãy thử lại.","skillBurger.renameFailed": "Không thể đổi tên Skill Burger này. Hãy thử lại.","skillBurger.menu.aria": "Thêm cho {name}","skillBurger.menu.rename": "Đổi tên…",- "skillBurger.card.everyChat": "Mọi cuộc trò chuyện","skillBurger.page.empty": "Skill Burger do bot của bạn tạo sẽ hiện ở đây.","chat.notice.savedToThread": "Đã lưu vào luồng này","memoryPage.thisThread": "Luồng này",@@ -6118,5 +6115,11 @@"chat.botExchange.gone": "Không thể dừng cuộc trao đổi này từ đây.","chat.botExchange.stopFailed": "Không thể dừng. Hãy kiểm tra kết nối rồi thử lại.","chat.botExchange.waiting": "{helper} chưa bắt đầu việc này. Đang chờ đến lượt.",- "chat.botExchange.unknown": "Không rõ tin nhắn nào trong cuộc trò chuyện của {helper} thuộc lần trao đổi này, nên không hiển thị tin nào."+ "chat.botExchange.unknown": "Không rõ tin nhắn nào trong cuộc trò chuyện của {helper} thuộc lần trao đổi này, nên không hiển thị tin nào.",+ "skillBurger.pill.cooking": "Đang nấu… {count}",+ "skillBurger.pill.add": "Thêm",+ "skillBurger.pill.running": "Đang chạy… {count}",+ "skillBurger.pill.stopped": "Đã dừng",+ "skillBurger.pill.addPath": "Thêm nhánh",+ "skillBurger.card.madeBy": "Do {name} tạo"}diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.jsonindex 9295544976..88228bae2d 100644--- a/src/locales/zh-tw.json+++ b/src/locales/zh-tw.json@@ -10394,12 +10394,9 @@"skillBurger.list.removed": "已移除 {name}。","skillBurger.list.removeFailed": "無法移除這個技能,請再試一次。","skillBurger.list.loadFailed": "無法載入已儲存的技能。",- "skillBurger.everyChat": "在每個聊天中使用",- "skillBurger.everyChatFailed": "無法變更這個 Skill Burger 的使用範圍,請再試一次。","skillBurger.renameFailed": "無法重新命名這個 Skill Burger,請再試一次。","skillBurger.menu.aria": "{name} 的更多操作","skillBurger.menu.rename": "重新命名…",- "skillBurger.card.everyChat": "每個聊天","skillBurger.page.empty": "機器人製作的 Skill Burger 會顯示在這裡。","skillBurger.run.button": "執行","skillBurger.runName": "執行 {name}",@@ -10436,5 +10433,11 @@"chat.botExchange.gone": "無法在這裡停止此交流。","chat.botExchange.stopFailed": "無法停止。請檢查網路連線後再試一次。","chat.botExchange.waiting": "{helper} 還沒開始,正在排隊等候。",- "chat.botExchange.unknown": "無法確定與 {helper} 的對話中哪些訊息屬於這次交流,因此不顯示。"+ "chat.botExchange.unknown": "無法確定與 {helper} 的對話中哪些訊息屬於這次交流,因此不顯示。",+ "skillBurger.pill.cooking": "烹調中… {count}",+ "skillBurger.pill.add": "加入",+ "skillBurger.pill.running": "執行中… {count}",+ "skillBurger.pill.stopped": "已停止",+ "skillBurger.pill.addPath": "加入路徑",+ "skillBurger.card.madeBy": "由 {name} 建立"}diff --git a/src/locales/zh.json b/src/locales/zh.jsonindex 9e32f0a4e1..80a940d3ae 100644--- a/src/locales/zh.json+++ b/src/locales/zh.json@@ -10307,12 +10307,9 @@"skillBurger.list.removed": "已移除 {name}。","skillBurger.list.removeFailed": "无法移除这个技能,请重试。","skillBurger.list.loadFailed": "无法加载已保存的技能。",- "skillBurger.everyChat": "在每个聊天中使用",- "skillBurger.everyChatFailed": "无法更改这个 Skill Burger 的使用范围,请重试。","skillBurger.renameFailed": "无法重命名这个 Skill Burger,请重试。","skillBurger.menu.aria": "{name} 的更多操作","skillBurger.menu.rename": "重命名…",- "skillBurger.card.everyChat": "每个聊天","skillBurger.page.empty": "机器人制作的 Skill Burger 会显示在这里。","skillBurger.run.button": "运行","skillBurger.runName": "运行 {name}",@@ -10349,5 +10346,11 @@"chat.botExchange.gone": "无法在这里停止此交流。","chat.botExchange.stopFailed": "无法停止。请检查网络连接后重试。","chat.botExchange.waiting": "{helper} 还没开始,正在排队等候。",- "chat.botExchange.unknown": "无法确定与 {helper} 的对话中哪些消息属于这次交流,因此不显示。"+ "chat.botExchange.unknown": "无法确定与 {helper} 的对话中哪些消息属于这次交流,因此不显示。",+ "skillBurger.pill.cooking": "烹饪中… {count}",+ "skillBurger.pill.add": "添加",+ "skillBurger.pill.running": "运行中… {count}",+ "skillBurger.pill.stopped": "已停止",+ "skillBurger.pill.addPath": "添加路径",+ "skillBurger.card.madeBy": "由 {name} 创建"}diff --git a/src/styles.css b/src/styles.cssindex 343c3e7935..5a52b55bee 100644--- a/src/styles.css+++ b/src/styles.css@@ -3871,7 +3871,7 @@ button:disabled.bg-danger {@keyframes burger-drop {0% { opacity: 0; min-height: 0; max-height: 0; transform: translateY(-12px) scale(0.96); filter: blur(4px); }45% { opacity: 1; min-height: 2.25rem; max-height: 3rem; filter: blur(0); }- 100% { opacity: 1; min-height: 2.25rem; max-height: 3rem; transform: none; filter: none; }+ 100% { opacity: 1; min-height: 2.25rem; max-height: none; transform: none; filter: none; }}@keyframes burger-land {from { background-color: color-mix(in srgb, var(--color-accent) 14%, var(--color-card)); }@@ -3892,6 +3892,13 @@ button:disabled.bg-danger {}:root[data-reduced-motion="true"] :is(.burger-layer, .burger-stacked .burger-bun-bottom, .burger-stacked .burger-bun-bottom > *) { animation: none; }:root[data-reduced-motion="true"] .skill-burger .thinking-sheen { display: none; }+/* The pill's count ticks over in place, and a new app's mark slides in at its end. */+@keyframes burger-tick { from { opacity: 0; transform: translateY(45%); } }+.burger-tick { animation: burger-tick 180ms cubic-bezier(0.22, 1, 0.36, 1) both; }+@keyframes burger-mark-in { from { opacity: 0; transform: translateX(-6px) scale(0.96); } }+.burger-mark-in { animation: burger-mark-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both; }+@media (prefers-reduced-motion: reduce) { .burger-tick, .burger-mark-in { animation: none; } }+:root[data-reduced-motion="true"] :is(.burger-tick, .burger-mark-in) { animation: none; }/* Folding the layers: the list's row collapses to nothing and fades, so the bun below glides up rather than jumping. */.burger-fold { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease-out; }.burger-fold[data-folded="true"] { grid-template-rows: 0fr; opacity: 0; }