Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Webhook and app-event automations: option to keep one conversation
AdityaUmale0a9d843a6e49
diff --git a/server/app-trigger-host.ts b/server/app-trigger-host.tsindex 64509cfd04..9ca346a9a2 100644--- a/server/app-trigger-host.ts+++ b/server/app-trigger-host.ts@@ -133,6 +133,7 @@ export function createAppTriggerHost(deps: AppTriggerHostDeps) {...(body.filter && typeof body.filter === "object" ? { filter: body.filter as never } : {}),...(body.config && typeof body.config === "object" ? { config: body.config as Record<string, unknown> } : {}),...(body.runOn === "cloud" ? { runOn: "cloud" as const } : {}),+ ...(body.sameConversation === true ? { sameConversation: true } : {}),});return json(res, 201, { trigger });}@@ -152,6 +153,7 @@ export function createAppTriggerHost(deps: AppTriggerHostDeps) {...(body.filter === null || (body.filter && typeof body.filter === "object") ? { filter: body.filter as never } : {}),...(body.config && typeof body.config === "object" ? { config: body.config as Record<string, unknown> } : {}),...(typeof body.enabled === "boolean" ? { enabled: body.enabled } : {}),+ ...(typeof body.sameConversation === "boolean" ? { sameConversation: body.sameConversation } : {}),};const trigger = await manager.update(id, patch);return trigger ? json(res, 200, { trigger }) : json(res, 404, { error: "no such automation" });diff --git a/server/app-trigger-requests.ts b/server/app-trigger-requests.tsindex f05dd4c3f3..708ed9b673 100644--- a/server/app-trigger-requests.ts+++ b/server/app-trigger-requests.ts@@ -46,8 +46,9 @@ const definitionSchema = z.object({filter: filterSchema.optional(),config: z.record(z.string(), z.unknown()).optional(),runOn: z.enum(["maus", "cloud"]).optional(),+ sameConversation: z.boolean().optional(),}).strict();-const changesSchema = definitionSchema.pick({ name: true, instructions: true, filter: true, config: true, runOn: true }).partial().strict()+const changesSchema = definitionSchema.pick({ name: true, instructions: true, filter: true, config: true, runOn: true, sameConversation: true }).partial().strict().refine((changes) => Object.keys(changes).length > 0, "The update action needs at least one field in changes");const idSchema = z.string().trim().min(1).max(200);const targetSchema = z.object({ botId: z.string(), name: z.string() }).optional();@@ -162,7 +163,8 @@ export class AppTriggerRequestService {name: redactSecretsInText(subject.name),...(after && operation.action !== "run_now" ? { appliedUpdatedAt: after.updatedAt } : {}),...(before && (operation.action === "update" || operation.action === "delete")- ? { before: { name: before.name, prompt: before.prompt, runOn: before.runOn, enabled: before.enabled, config: before.config, ...(before.filter ? { filter: before.filter } : {}) } }+ ? { before: { name: before.name, prompt: before.prompt, runOn: before.runOn, enabled: before.enabled, config: before.config, ...(before.filter ? { filter: before.filter } : {}),+ ...(before.sameConversation ? { sameConversation: true } : {}) } }: {}),},};@@ -213,7 +215,8 @@ export class AppTriggerRequestService {const before = payload.undo?.before;if (!mine || mine.updatedAt !== payload.undo?.appliedUpdatedAt) return stale;const patch = operation.action === "update"- ? before ? { name: before.name, prompt: before.prompt, runOn: before.runOn, enabled: before.enabled, filter: before.filter ?? null, restoreConfig: before.config } : undefined+ ? before ? { name: before.name, prompt: before.prompt, runOn: before.runOn, enabled: before.enabled, filter: before.filter ?? null, restoreConfig: before.config,+ sameConversation: before.sameConversation === true } : undefined: { enabled: operation.action === "pause" };if (!patch || !await triggers.update(triggerId, patch)) return stale;break;diff --git a/server/app-triggers.test.ts b/server/app-triggers.test.tsindex 66494142bf..d924389307 100644--- a/server/app-triggers.test.ts+++ b/server/app-triggers.test.ts@@ -404,3 +404,22 @@ describe("automations made before the owner kept the managed service out", () =>}});});++describe("app-event automation that keeps one conversation", () => {+ it("saves the option, hands it to each run, and turns it off again", async () => {+ const triggers = manager();+ const trigger = await triggers.create({ botId: "bot-1", name: "Order replies", prompt: "Draft a reply.", app: "gmail", event: "GMAIL_NEW_GMAIL_MESSAGE", sameConversation: true });+ expect(trigger.sameConversation).toBe(true);+ await broker.deliver(trigger.remote.triggerId!, { subject: "Order #1" }, "msg_same_1");+ await drain(triggers);+ expect(runsOf(trigger.id)[0]).toMatchObject({ eventSource: "app", sameConversation: true });+ expect(manager().get(trigger.id)?.sameConversation).toBe(true);++ expect(await triggers.update(trigger.id, { sameConversation: false })).not.toHaveProperty("sameConversation");+ routines.cancelQueuedWebhook(trigger.id, "test");+ await broker.deliver(trigger.remote.triggerId!, { subject: "Order #2" }, "msg_same_2");+ await drain(triggers);+ expect(runsOf(trigger.id)[0]).toMatchObject({ deliveryId: "msg_same_2", status: "queued" });+ expect(runsOf(trigger.id)[0]).not.toHaveProperty("sameConversation");+ });+});diff --git a/server/app-triggers.ts b/server/app-triggers.tsindex f353797f39..db8750f317 100644--- a/server/app-triggers.ts+++ b/server/app-triggers.ts@@ -59,7 +59,7 @@ export interface AppTriggerManagerOptions {connectedApps: () => Promise<ConnectedApps>;botState: (botId: string) => "ready" | "busy" | "missing";runs: {- enqueue(input: { webhookId: string; webhookName: string; prompt: string; botId: string; runOn: RoutineRunOn; deliveryId: string; receivedAt: number; eventSource: "app" }): { id: string };+ enqueue(input: { webhookId: string; webhookName: string; prompt: string; botId: string; runOn: RoutineRunOn; deliveryId: string; receivedAt: number; eventSource: "app"; sameConversation?: boolean }): { id: string };merge(triggerId: string, eventId: string, merge: (prompt: string) => string | null): { id: string } | null;receipt(triggerId: string, eventId: string): { id: string } | null;pending(triggerId: string): number;@@ -100,6 +100,7 @@ const storedSchema = z.object({z.object({ kind: z.literal("error"), text: z.string(), at: z.number() }),]).optional().catch(undefined),sourceThreadId: z.string().optional(),+ sameConversation: z.boolean().optional().catch(undefined),received: z.number().int().nonnegative(),filtered: z.number().int().nonnegative(),skipped: skippedSchema.optional().catch(undefined),@@ -142,6 +143,7 @@ export interface AppTriggerInput {runOn?: RoutineRunOn;enabled?: boolean;sourceThreadId?: string;+ sameConversation?: boolean;/** Another server's automation, made here under its own id. */id?: string;}@@ -153,6 +155,7 @@ export interface AppTriggerPatch {filter?: AppTriggerFilter | null;config?: Record<string, unknown>;enabled?: boolean;+ sameConversation?: boolean;/** Undo: the config exactly as it was saved, filter already folded in. */restoreConfig?: Record<string, unknown>;}@@ -279,6 +282,7 @@ export class AppTriggerManager {app, appName: appLabel(app), event: type.slug, eventName: type.name || type.slug, delivery: type.type === "poll" ? "poll" : "instant",accountId: account.id, ...(account.alias ? { accountLabel: account.alias } : {}), config, ...(filter ? { filter } : {}),remote: { state: "pending" }, ...(input.sourceThreadId ? { sourceThreadId: input.sourceThreadId } : {}),+ ...(input.sameConversation ? { sameConversation: true } : {}),received: 0, filtered: 0, createdAt: now, updatedAt: now,};await this.exclusive(async () => {@@ -303,10 +307,12 @@ export class AppTriggerManager {async adopt(record: AppTrigger): Promise<AppTrigger> {const config = Object.fromEntries(Object.entries(record.config).filter(([key, value]) => value !== undefined && !(record.app === GMAIL_APP && key === "query")));if (this.triggers.some((candidate) => candidate.id === record.id)) {- return (await this.update(record.id, { name: record.name, prompt: record.prompt, runOn: record.runOn, filter: record.filter ?? null, config }))!;+ return (await this.update(record.id, { name: record.name, prompt: record.prompt, runOn: record.runOn, filter: record.filter ?? null, config,+ sameConversation: record.sameConversation === true }))!;}return this.create({ id: record.id, botId: record.botId, name: record.name, prompt: record.prompt, app: record.app, event: record.event, account: record.accountId,- ...(record.filter ? { filter: record.filter } : {}), config, runOn: record.runOn, enabled: false, ...(record.sourceThreadId ? { sourceThreadId: record.sourceThreadId } : {}) });+ ...(record.filter ? { filter: record.filter } : {}), config, runOn: record.runOn, enabled: false, ...(record.sourceThreadId ? { sourceThreadId: record.sourceThreadId } : {}),+ ...(record.sameConversation ? { sameConversation: true } : {}) });}async update(id: string, patch: AppTriggerPatch): Promise<AppTrigger | null> {@@ -339,6 +345,8 @@ export class AppTriggerManager {});if (filter) trigger.filter = filter;else delete trigger.filter;+ if (patch.sameConversation === true) trigger.sameConversation = true;+ else if (patch.sameConversation === false) delete trigger.sameConversation;if (patch.enabled === false) this.options.runs.cancelQueued(trigger.id, "The automation was paused before this event's run started");try {if (reconfigure && (!previous || JSON.stringify(config) !== previousConfig)) {@@ -415,7 +423,7 @@ export class AppTriggerManager {const eventId = `test_${randomUUID()}`;const run = this.options.runs.enqueue({webhookId: trigger.id, webhookName: trigger.name, botId: trigger.botId, runOn: trigger.runOn, deliveryId: eventId, receivedAt: this.now(),- eventSource: "app", prompt: eventPrompt(trigger.prompt, eventBlock(trigger, { id: eventId, receivedAt: this.now(), test: true, data })),+ eventSource: "app", sameConversation: trigger.sameConversation, prompt: eventPrompt(trigger.prompt, eventBlock(trigger, { id: eventId, receivedAt: this.now(), test: true, data })),});return { via: "here", runId: run.id };}@@ -516,6 +524,7 @@ export class AppTriggerManager {runId = this.options.runs.enqueue({webhookId: trigger.id, webhookName: trigger.name, prompt: eventPrompt(trigger.prompt, block), botId: trigger.botId,runOn: trigger.runOn, deliveryId: event.id, receivedAt: event.receivedAt, eventSource: "app",+ sameConversation: trigger.sameConversation,}).id;}trigger.received += 1;diff --git a/server/cloud-send-kinds.ts b/server/cloud-send-kinds.tsindex 22d7fbf6fc..abd32b3b60 100644--- a/server/cloud-send-kinds.ts+++ b/server/cloud-send-kinds.ts@@ -39,8 +39,8 @@ const KIND_BODY_MAX = 8 * 1024 * 1024;const ROUTINE_FIELDS = ["name", "prompt", "target", "botId", "groupId", "runOn", "schedule", "durationMinutes", "timeoutMinutes", "attachments", "continuity", "modelSelection","overlap", "runOnStartup", "sourceThreadId", "resultsThreadId", "createdAt", "checks", "access", "deliver"] as const;const CALL_FIELDS = ["name", "description", "botIds", "schedule", "durationMinutes", "attachments", "roomId", "createdAt"] as const;-const WEBHOOK_FIELDS = ["name", "prompt", "botId", "runOn", "delivery", "groupId", "eventTypes", "maxPendingRuns", "resultsThreadId", "createdAt"] as const;-const APP_EVENT_FIELDS = ["name", "prompt", "botId", "runOn", "app", "event", "accountId", "config", "filter", "sourceThreadId"] as const;+const WEBHOOK_FIELDS = ["name", "prompt", "botId", "runOn", "delivery", "groupId", "eventTypes", "maxPendingRuns", "sameConversation", "resultsThreadId", "createdAt"] as const;+const APP_EVENT_FIELDS = ["name", "prompt", "botId", "runOn", "app", "event", "accountId", "config", "filter", "sourceThreadId", "sameConversation"] as const;/** Prose that may name this computer's data folder. */const TEXTS = ["prompt", "description", "output", "error"] as const;export const MOVE_BOT_FIELDS: readonly string[] = Object.values(MOVE_BOT_PARTS).flat();diff --git a/server/drivers/agents-call-triggers.test.ts b/server/drivers/agents-call-triggers.test.tsindex 5dd9a43efa..566bf3712a 100644--- a/server/drivers/agents-call-triggers.test.ts+++ b/server/drivers/agents-call-triggers.test.ts@@ -124,3 +124,20 @@ describe("delete_trigger", () => {expect(calls).toEqual([{ path: "/api/internal/trigger-requests", body: { fromBotId: "scout", fromThreadId: "thread-1", action: "delete", triggerId: "t-1", forBotId: "helper" } }]);});});++describe("same_conversation in the trigger tool", () => {+ it("sends it for an app event, webhook or update, and refuses it elsewhere before anything is sent", async () => {+ const { calls, context: ctx } = context();+ await callTool("trigger", { action: "create", when: "app_event", name: "Acme", instructions: "Draft.", app: "gmail", event: "GMAIL_NEW_GMAIL_MESSAGE", same_conversation: true }, ctx);+ expect(calls[0]!.body).toMatchObject({ action: "create", kind: "app", trigger: { sameConversation: true } });+ await callTool("trigger", { action: "update", trigger_id: "t-1", same_conversation: false }, ctx);+ expect(calls[1]!.body).toMatchObject({ action: "update", triggerId: "t-1", changes: { sameConversation: false } });+ const refused = context();+ const text = async (args: Record<string, unknown>) => (await callTool("trigger", args, refused.context)).text;+ expect(await text({ action: "create", when: "schedule", name: "A", instructions: "B", schedule: { type: "daily", time: "09:00" }, same_conversation: true }))+ .toBe("same_conversation applies only to when=app_event or when=webhook.");+ expect(await text({ action: "create", when: "app_event", name: "A", instructions: "B", app: "gmail", event: "X", same_conversation: "yes" }))+ .toBe("same_conversation must be true or false.");+ expect(refused.calls).toEqual([]);+ });+});diff --git a/server/drivers/agents-call-triggers.ts b/server/drivers/agents-call-triggers.tsindex e71da4d51a..dbba24a86e 100644--- a/server/drivers/agents-call-triggers.ts+++ b/server/drivers/agents-call-triggers.ts@@ -14,6 +14,7 @@ export const TRIGGER_TOOL_NAMES: ReadonlySet<string> = new Set(["trigger_info",const LIST_ROUTE = "/api/internal/triggers";const EVENTS_ROUTE = "/api/internal/trigger-events";const APP_ONLY = ["app", "event", "account"] as const;+const SAME_CONVERSATION_ONLY = "same_conversation applies only to when=app_event or when=webhook.";const REQUEST_ROUTE = "/api/internal/trigger-requests";const SCHEDULE_ONLY = ["schedule", "timeout_minutes", "timeoutMinutes", "clear_timeout", "continuity", "overlap", "run_on_startup", "runOnStartup"] as const;@@ -304,6 +305,10 @@ function triggerFields(args: Json): { fields: Json; error?: string } {}fields.eventTypes = eventTypes.map((value) => String(value).trim()).filter(Boolean);}+ if (args.same_conversation !== undefined && args.same_conversation !== null) {+ if (typeof args.same_conversation !== "boolean") return { fields, error: "same_conversation must be true or false." };+ fields.sameConversation = args.same_conversation;+ }return { fields };}@@ -437,6 +442,7 @@ async function createTrigger(args: Json, forBotId: string | undefined, context:const appOnly = [...APP_ONLY, "filter", "event_config"].find((key) => args[key] !== undefined && args[key] !== null);if (appOnly) return { text: `${appOnly} applies only to when=app_event.`, isError: true };}+ if (fields.sameConversation !== undefined && when !== "app_event" && when !== "webhook") return { text: SAME_CONVERSATION_ONLY, isError: true };if (when === "app_event") {const misplaced = [...SCHEDULE_ONLY, "webhook_event_types"].find((key) => args[key] !== undefined && args[key] !== null);if (misplaced) return { text: `An app-event trigger fires when the app's event happens, so it takes no ${misplaced}.`, isError: true };@@ -447,6 +453,7 @@ async function createTrigger(args: Json, forBotId: string | undefined, context:name: fields.name, instructions: fields.instructions, app, event,...(typeof args.account === "string" && args.account.trim() ? { account: args.account.trim() } : {}),...(fields.filter ? { filter: fields.filter } : {}), ...(fields.config ? { config: fields.config } : {}), ...(fields.runOn ? { runOn: fields.runOn } : {}),+ ...(fields.sameConversation !== undefined ? { sameConversation: fields.sameConversation } : {}),};return request({ action: "create", kind: "app", trigger, ...(forBotId ? { forBotId } : {}) }, context, `Created the app-event trigger “${String(fields.name)}”`);}@@ -468,6 +475,7 @@ async function createTrigger(args: Json, forBotId: string | undefined, context:}const misplaced = SCHEDULE_ONLY.find((key) => args[key] !== undefined && args[key] !== null);if (misplaced) return { text: `A webhook trigger fires when its link is called, so it takes no ${misplaced}.`, isError: true };- const webhook = { name: fields.name, instructions: fields.instructions, ...(fields.runOn ? { runOn: fields.runOn } : {}), ...(fields.eventTypes ? { eventTypes: fields.eventTypes } : {}) };+ const webhook = { name: fields.name, instructions: fields.instructions, ...(fields.runOn ? { runOn: fields.runOn } : {}), ...(fields.eventTypes ? { eventTypes: fields.eventTypes } : {}),+ ...(fields.sameConversation !== undefined ? { sameConversation: fields.sameConversation } : {}) };return request({ action: "create", kind: "webhook", webhook, ...(forBotId ? { forBotId } : {}) }, context, `Created ${label}`);}diff --git a/server/drivers/agents-catalog-goldens/full.tools-list.json b/server/drivers/agents-catalog-goldens/full.tools-list.jsonindex eb36d153b6..a4c29d1884 100644--- a/server/drivers/agents-catalog-goldens/full.tools-list.json+++ b/server/drivers/agents-catalog-goldens/full.tools-list.json@@ -1637,6 +1637,10 @@"type": "boolean","description": "Only for updates: set true to remove an existing safety limit. Do not combine with timeout_minutes."},+ "same_conversation": {+ "type": "boolean",+ "description": "app_event and webhook only: each run continues the previous run's conversation, so it sees earlier runs. Default false."+ },"continuity": {"type": "boolean","description": "Schedules only: give each run the last completed run's report, for work that builds on last time (QA passes, monitoring, follow-ups). Default false; false in an update starts fresh."diff --git a/server/drivers/agents-catalog-goldens/profiles.json b/server/drivers/agents-catalog-goldens/profiles.jsonindex 7041a1ae30..305faf6f14 100644--- a/server/drivers/agents-catalog-goldens/profiles.json+++ b/server/drivers/agents-catalog-goldens/profiles.json@@ -1,7 +1,7 @@{"default": {- "bytes": 61454,- "sha256": "045010d682155ec9e4c132bead9c0dac8146b1295d04f2df406f975a151c9bd4",+ "bytes": 61629,+ "sha256": "f1bddbcb60b02800a484be8dfc481d4088e52998170cad4da0b27485f21b8a22","tools": ["tool_result_read","list_room_targets",@@ -53,8 +53,8 @@]},"voice": {- "bytes": 62235,- "sha256": "74e9c935f3543d99a6ec65ee5c8b1d7c86a7f844eb96732267f7f68609837ee8",+ "bytes": 62410,+ "sha256": "a4517f15266316a107f64c9cd80878d4bcf3022cd50c6339e7526e881b90176a","tools": ["tool_result_read","list_room_targets",@@ -107,8 +107,8 @@]},"shared": {- "bytes": 63719,- "sha256": "d7bdfd779165ff35fd6eef4a2ded16e74f9f1b676738c0e479460bda6106d5b6",+ "bytes": 63894,+ "sha256": "336c788ef99348e7296c95c65a0733d45f77e6cd05eee88bc2139220c43c7a70","tools": ["tool_result_read","list_shared_computers",@@ -162,8 +162,8 @@]},"shared+voice": {- "bytes": 64500,- "sha256": "40c70836b16bfca159cce9cc3893763ff5dd59b747086e34369dc3eeab4091c7",+ "bytes": 64675,+ "sha256": "6296f627b12d0d4664eb2e9b0dbd128336d1136bc818f947c68660d96d6856bb","tools": ["tool_result_read","list_shared_computers",@@ -218,8 +218,8 @@]},"skills": {- "bytes": 64530,- "sha256": "9ee67f915766577488c0e7a0c7339cb7815e332f0e2928287e1bac7e779bb5f5",+ "bytes": 64705,+ "sha256": "c156cb1c4d19e4d4d46d6fe622264863e60d56059e44f70e684380c8b2830e83","tools": ["tool_result_read","list_room_targets",@@ -273,8 +273,8 @@]},"skills+voice": {- "bytes": 65311,- "sha256": "dfb4f3917aaa8dbdd1d51e1d3211bf79079d6b9c92efb8f2f3dc8a4734845f42",+ "bytes": 65486,+ "sha256": "d5f65ade508d7bd1c592fbe3bcc5cfc3b7d5ec041dcf33076888a3dceeab7d6e","tools": ["tool_result_read","list_room_targets",@@ -329,8 +329,8 @@]},"skills+shared": {- "bytes": 66795,- "sha256": "3f8176fdfc857a1a9cc79f581637ebaa3236ea3a0e80feb17e4dac748814df0d",+ "bytes": 66970,+ "sha256": "0331fdf7745f3c77646d9745c75c30540605d09729d506b799bd0db2c9c87019","tools": ["tool_result_read","list_shared_computers",@@ -386,8 +386,8 @@]},"skills+shared+voice": {- "bytes": 67576,- "sha256": "92e3ae1e88d08549088321caad443b8215aa84b2a10232cf52198b92710492fa",+ "bytes": 67751,+ "sha256": "589ce0b89cfea9d3fe7f7d856f5a77511e82a41a1fd7bf870d22d1129fe819fd","tools": ["tool_result_read","list_shared_computers",@@ -444,8 +444,8 @@]},"non-chief": {- "bytes": 52238,- "sha256": "f8f0c48fdd62f3d95dfe56b054bb9f419a698f5c3b48ab1d11c3897258f2fa0e",+ "bytes": 52413,+ "sha256": "443e45efb117474a856892c2be4f5debd41e8d99c030c7936817f838fd451a24","tools": ["tool_result_read","list_room_targets",@@ -490,8 +490,8 @@]},"voice+non-chief": {- "bytes": 53019,- "sha256": "0d1c0815f52a79e4b202e0b2bd55831cc9c8391c56b23e057284688aede9d059",+ "bytes": 53194,+ "sha256": "31599135ba4b906a3134a7beccbb8bcd6e33365845cc1b96795c32d038d8c8c4","tools": ["tool_result_read","list_room_targets",@@ -537,8 +537,8 @@]},"shared+non-chief": {- "bytes": 54503,- "sha256": "9e74655cb39ba31e030396af1011bcb25b6c20e33ae0bde640545a167b3de7fd",+ "bytes": 54678,+ "sha256": "ca6c01ef228fb83fa901f986fb7032f34e96c144cb5e9ed02cdf5a9772b0bb34","tools": ["tool_result_read","list_shared_computers",@@ -585,8 +585,8 @@]},"shared+voice+non-chief": {- "bytes": 55284,- "sha256": "3a780a33bc11d3650a8606ea962ae45916785e8a95b3d7f75e0e5fdaed8bcfa5",+ "bytes": 55459,+ "sha256": "536e359b1c11ed1efbdee11a9549e382fd3b090b82db4a9d1a6e4cd047076215","tools": ["tool_result_read","list_shared_computers",@@ -634,8 +634,8 @@]},"skills+non-chief": {- "bytes": 55314,- "sha256": "d1adc1c55d90fa38ee892b7159c65241f483f0dd01d885b5b1a8590baf4e1529",+ "bytes": 55489,+ "sha256": "90c9831f30d8f47483bc935be8bdbd117ff02b85aed035338b7f874fb8ab6058","tools": ["tool_result_read","list_room_targets",@@ -682,8 +682,8 @@]},"skills+voice+non-chief": {- "bytes": 56095,- "sha256": "a66573240e9c9a4c88a61cf8cd115d312b61a4ac63265097c4997f7a20feb96d",+ "bytes": 56270,+ "sha256": "88eee7e17dfb5d361063dc2887980705dc1aa2acac3f3c0518c49603aad158e7","tools": ["tool_result_read","list_room_targets",@@ -731,8 +731,8 @@]},"skills+shared+non-chief": {- "bytes": 57579,- "sha256": "2df0585949ff5d9618c3cf282783a3f1c8809dca383c4698fba5d58358193140",+ "bytes": 57754,+ "sha256": "27a6d1206c8f28a82ffb5778fde9e880cc6e4ea50801ca9aa2a668aaa27e1218","tools": ["tool_result_read","list_shared_computers",@@ -781,8 +781,8 @@]},"skills+shared+voice+non-chief": {- "bytes": 58360,- "sha256": "ad0be49ad5857321171e51fbab173d4501bed6c17f007180d3aef30263427618",+ "bytes": 58535,+ "sha256": "5c6af8f3314fc7b571f6692330621519c33a7a933b18cca4d356fadb452ab99b","tools": ["tool_result_read","list_shared_computers",@@ -832,8 +832,8 @@]},"skills+shared+voice+cloud-home": {- "bytes": 67342,- "sha256": "b77188d584a585d08b121d95328d0e680292085d026498c9194688916ee01f11",+ "bytes": 67517,+ "sha256": "a5318269623f0f92992b4c2204643401ac55b8b9e74ce09dc3a00cd1926442f8","tools": ["tool_result_read","list_shared_computers",@@ -890,8 +890,8 @@]},"skills+shared+voice+non-chief+cloud-home": {- "bytes": 58126,- "sha256": "5dcf29daaa4486360050bd987cc9dfa9acf5e60e573ab5018ed19b5f13b0ff1a",+ "bytes": 58301,+ "sha256": "05e69617ea6cb70bf8aea0dcc981624dc19039a51ddbbf0c13305b58192febcf","tools": ["tool_result_read","list_shared_computers",@@ -941,8 +941,8 @@]},"skills+shared+voice+x": {- "bytes": 71415,- "sha256": "859309309fea2c38eda576a677319398b8f75651e21eadb394014eb989a14f43",+ "bytes": 71590,+ "sha256": "53362f2ae7f9555875492e1e088cee68929b626b78cf80bd8e5c05267544c6b5","tools": ["tool_result_read","list_shared_computers",@@ -1003,8 +1003,8 @@]},"skills+shared+voice+x+team": {- "bytes": 71415,- "sha256": "859309309fea2c38eda576a677319398b8f75651e21eadb394014eb989a14f43",+ "bytes": 71590,+ "sha256": "53362f2ae7f9555875492e1e088cee68929b626b78cf80bd8e5c05267544c6b5","tools": ["tool_result_read","list_shared_computers",@@ -1065,8 +1065,8 @@]},"skills+shared+voice+x+team+images": {- "bytes": 72188,- "sha256": "67886d40d01f465a7be8503aa914b7cd1ebd50f40759bfb1b608274f10d45f04",+ "bytes": 72363,+ "sha256": "5c65b874d5062b28e57b41f6dc2919e2599e37e738e47215fc42ada25bf152b6","tools": ["tool_result_read","list_shared_computers",@@ -1128,8 +1128,8 @@]},"default+legacy-switches": {- "bytes": 61454,- "sha256": "045010d682155ec9e4c132bead9c0dac8146b1295d04f2df406f975a151c9bd4",+ "bytes": 61629,+ "sha256": "f1bddbcb60b02800a484be8dfc481d4088e52998170cad4da0b27485f21b8a22","tools": ["tool_result_read","list_room_targets",@@ -1181,8 +1181,8 @@]},"default+mausbot": {- "bytes": 62105,- "sha256": "6ed238881df8e394e1fbc6696bd58e2619a6d6325ffd9c04e965a0e23ff6980d",+ "bytes": 62280,+ "sha256": "451980bd0ac81759b335f6936e4c07d511d35e4c5c972e98c2b97f506b61f734","tools": ["tool_result_read","list_room_targets",@@ -1236,8 +1236,8 @@]},"skills+shared+voice+mausbot": {- "bytes": 68227,- "sha256": "c6ab39a67adbd922de5471f38e4d9924e608c6d8d1e847a8e8e7173af567fbfd",+ "bytes": 68402,+ "sha256": "94193355356b03f67cbfbb7e6dc5ecc9b04061b720dfaf2675b6aba2b304a852","tools": ["tool_result_read","list_shared_computers",@@ -1296,8 +1296,8 @@]},"default+no-computer-pick": {- "bytes": 60242,- "sha256": "262bb5d78739882ee797c124f6e4e0bcd9cb34bf3f2237710c50fb940e1318e9",+ "bytes": 60417,+ "sha256": "8c0af8150dde68b39711a0198a5f1cd426a7cb8f7b7a489d6333eef54a07b3c1","tools": ["tool_result_read","list_room_targets",@@ -1348,8 +1348,8 @@]},"default+room": {- "bytes": 57744,- "sha256": "fa22da9a89af25905589aac685f2c2cc3d027f5078a335df842331675466da61",+ "bytes": 57919,+ "sha256": "889637ce9584a7bacc56bf8fb24861087672f6ae8f5ea02b9328835781ccf29b","tools": ["tool_result_read","list_room_targets",@@ -1396,8 +1396,8 @@]},"non-chief+room": {- "bytes": 48528,- "sha256": "c3450eb0bd278e845fa1b813d9eb9fd5d9f2d996e3e7a1fa6214ff5451f1836e",+ "bytes": 48703,+ "sha256": "c1782fbf5ffb1cd70245ef422493d99ca10e5aed87a327d81dd8c7f4b31f3f80","tools": ["tool_result_read","list_room_targets",@@ -1437,8 +1437,8 @@]},"default+images": {- "bytes": 62227,- "sha256": "48864c5e6d02b4a97e46eafff5cdda0e98ffbf7de7eead845e8d76d2931267e6",+ "bytes": 62402,+ "sha256": "c9d1f7f6f4460be0155cb7a6ca98cda8ab6e7d59b44d2ffcd3b753389c257bc9","tools": ["tool_result_read","list_room_targets",@@ -1491,8 +1491,8 @@]},"skills+shared+voice+x+team+images+hosting": {- "bytes": 74051,- "sha256": "6948e69c1fe1d59ae5904708079d8015482c7c938bba6a2984a4ca53d28b8096",+ "bytes": 74226,+ "sha256": "ace46749fc2a4484946f7cead5e5fdd46b06e461b5bc29097cbd4e248afa5e44","tools": ["tool_result_read","list_shared_computers",@@ -1556,8 +1556,8 @@]},"default+hosting": {- "bytes": 63317,- "sha256": "f388ab6116f0904fb2f55d30a8a333cb8054da154990e95dd3ac0b03ecb285eb",+ "bytes": 63492,+ "sha256": "098cc02b951d784c0444c05cdf047165ec9da23dae6fd5519e89592496305f90","tools": ["tool_result_read","list_room_targets",diff --git a/server/drivers/agents-catalog-wire.test.ts b/server/drivers/agents-catalog-wire.test.tsindex 1edfe23752..5cc1dbcc5d 100644--- a/server/drivers/agents-catalog-wire.test.ts+++ b/server/drivers/agents-catalog-wire.test.ts@@ -93,16 +93,16 @@ const BUDGET_BASELINE: Record<string, number> = {"skills+voice": 64308,"skills+shared": 65792,"skills+shared+voice": 66573,- "non-chief": 51235,- "voice+non-chief": 52016,- "shared+non-chief": 53500,- "shared+voice+non-chief": 54281,- "skills+non-chief": 54311,- "skills+voice+non-chief": 55092,- "skills+shared+non-chief": 56576,- "skills+shared+voice+non-chief": 57357,+ "non-chief": 52413,+ "voice+non-chief": 53194,+ "shared+non-chief": 54678,+ "shared+voice+non-chief": 55459,+ "skills+non-chief": 55489,+ "skills+voice+non-chief": 56270,+ "skills+shared+non-chief": 57754,+ "skills+shared+voice+non-chief": 58535,"skills+shared+voice+cloud-home": 66339,- "skills+shared+voice+non-chief+cloud-home": 57123,+ "skills+shared+voice+non-chief+cloud-home": 58301,"default+legacy-switches": 60451,"default+mausbot": 61102,"skills+shared+voice+mausbot": 67224,diff --git a/server/drivers/agents-catalog.ts b/server/drivers/agents-catalog.tsindex c030009ce0..0e6344a0b9 100644--- a/server/drivers/agents-catalog.ts+++ b/server/drivers/agents-catalog.ts@@ -150,6 +150,10 @@ const TRIGGER_FIELDS_SCHEMA = {type: "boolean",description: "Only for updates: set true to remove an existing safety limit. Do not combine with timeout_minutes.",},+ same_conversation: {+ type: "boolean",+ description: "app_event and webhook only: each run continues the previous run's conversation, so it sees earlier runs. Default false.",+ },continuity: {type: "boolean",description: "Schedules only: give each run the last completed run's report, for work that builds on last time (QA passes, monitoring, follow-ups). Default false; false in an update starts fresh.",diff --git a/server/index.ts b/server/index.tsindex f8906fd387..1f803fe7c0 100644--- a/server/index.ts+++ b/server/index.ts@@ -479,7 +479,7 @@ import { listenWebhookIngress, type WebhookIngress } from "./webhook-ingress.ts"import { addressFor } from "./webhook-address.ts";import { assertModelVariantSupported, memberTurnSelection } from "./member-turn.ts";import { WebhookManager } from "./webhooks.ts";-import { tieAutomationsToBots } from "./bot-automations.ts"; import { WaitManager } from "./waits.ts"; import { cancelWaitFromCard, createWaitHost, waitRunChat } from "./wait-host.ts"; import { createWaitRoutes, findWaitPeer, hostWaitRefusal, waitSourceRefusal, type WaitRouteContext } from "./routes/waits.ts";+import { tieAutomationsToBots } from "./bot-automations.ts"; import { WaitManager } from "./waits.ts"; import { cancelWaitFromCard, createWaitHost, waitRunChat } from "./wait-host.ts"; import { continuedConversation } from "./routine-same-conversation.ts"; import { createWaitRoutes, findWaitPeer, hostWaitRefusal, waitSourceRefusal, type WaitRouteContext } from "./routes/waits.ts";import type { WebhookTrigger } from "../shared/webhooks.ts";import { AGENTS_NODE_FLAG, SPAWNED_PROXIES } from "./proxy-paths.ts";import { agentsProxyLaunch, agentsToolBridgeEnv, applyAgentsBridge, bridgedToolTitle, turnEngine } from "./agents-bridge-switch.ts"; import { agentsServerEnv, botDrivenConversation, COMPUTER_OFF_REFUSAL, computerPickRefusal, directTurnKind, roomSkillsRefusal, type TurnKind } from "./agents-turn.ts";@@ -8681,8 +8681,7 @@ function syncRoutineRunToSource(run: RoutineRun): string | null {// Mark only the fresh execution: on its first running update, before dispatch adds any transcript.if (run.target === "bot" && run.threadId && run.threadId !== sourceThreadId) {const execution = store.taskByThread(run.botId, run.threadId);- const freshExecution = execution && run.status === "running" && !execution.routineRunId &&- store.messagesFor(run.threadId).length === 0;+ const freshExecution = execution && run.status === "running" && (run.sameConversation ? execution.routineRunId !== run.id /* takes the conversation over */ : !execution.routineRunId && store.messagesFor(run.threadId).length === 0);if (execution && freshExecution) {store.patchTask(run.botId, run.threadId, { routineRunId: run.id, unread: false });} else if (execution?.routineRunId === run.id && execution.unread) {@@ -8803,6 +8802,7 @@ routines = new RoutineManager({},joinConversation: (run) => {if (run.eventSource === "wait") return waitRunChat(run, directChatOf, Boolean(CLOUD_HOME));+ if (run.sameConversation) return continuedConversation(routines?.listRuns() ?? [], run, (threadId) => Boolean(store.taskByThread(run.botId, threadId)));const continues = routines?.listRoutines().some((routine) => routine.id === run.routineId && routine.schedule.type === "limit_reset");if (!continues || run.target !== "bot") return null;const source = routineSourceOwner(run);diff --git a/server/routine-same-conversation.ts b/server/routine-same-conversation.tsnew file mode 100644index 0000000000..ba65829750--- /dev/null+++ b/server/routine-same-conversation.ts@@ -0,0 +1,16 @@+// Webhook and app-event automations that keep one conversation (sameConversation): each run continues the conversation+// its trigger's run before worked in. Runs of such a trigger take turns in it (sameRoutineWorking in routines.ts).+import type { RoutineRun } from "./routines.ts";++/** The conversation the same trigger's latest earlier run for this bot worked in; null for its first run. `runs` newest first (listRuns). */+export function previousEventThread(runs: readonly RoutineRun[], run: Pick<RoutineRun, "id" | "webhookId" | "botId">): string | null {+ if (!run.webhookId) return null;+ return runs.find((other) => other.id !== run.id && other.webhookId === run.webhookId && other.botId === run.botId && other.threadId)?.threadId ?? null;+}++/** The conversation a run that keeps one conversation joins. Gone (deleted) or never there: null, so this run starts a+ * new conversation and the next run continues that one. */+export function continuedConversation(runs: readonly RoutineRun[], run: RoutineRun, exists: (threadId: string) => boolean): string | null {+ const previous = run.target === "bot" ? previousEventThread(runs, run) : null;+ return previous && exists(previous) ? previous : null;+}diff --git a/server/routines.test.ts b/server/routines.test.tsindex a2f008f50c..2e2e9141fb 100644--- a/server/routines.test.ts+++ b/server/routines.test.ts@@ -1,5 +1,6 @@import { mkdirSync, mkdtempSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";import { tmpdir } from "node:os";+import { previousEventThread } from "./routine-same-conversation.ts";import { join } from "node:path";import { afterEach, describe, expect, it, vi } from "vitest";@@ -4102,3 +4103,53 @@ describe("the scheduler wakes only when work is due", () => {}});});++describe("event automations that keep one conversation", () => {+ const event = (h: ReturnType<typeof harness>, deliveryId: string, sameConversation = true) => h.manager.enqueueWebhook({+ webhookId: "hook", webhookName: "New lead", prompt: "Handle it", botId: "maus-1", runOn: "maus", deliveryId, receivedAt: Date.now(),+ ...(sameConversation ? { sameConversation } : {}),+ });+ const done = (h: ReturnType<typeof harness>, threadId: string) => h.manager.handleRuntimeEvent({+ eventId: `done-${threadId}`, provider: "fake", threadId, createdAt: new Date().toISOString(), type: "turn.completed", ok: true,+ });+ const keepOne = (h: ReturnType<typeof harness>) => {+ h.options.joinConversation = (run) => run.sameConversation ? previousEventThread(h.manager.listRuns(), run) : null;+ };++ it("continues the previous run's conversation, one run at a time", async () => {+ const h = harness();+ keepOne(h);+ const first = event(h, "d1");+ const second = event(h, "d2");+ await h.manager.tick();+ expect(h.started.map((turn) => turn.threadId)).toEqual(["thread-1"]);+ expect(h.manager.listRuns().find((run) => run.id === second.id)?.status).toBe("queued");++ done(h, "thread-1");+ await h.manager.tick();+ expect(h.taskTitles).toHaveLength(1);+ expect(h.started.map((turn) => turn.threadId)).toEqual(["thread-1", "thread-1"]);+ expect(h.manager.listRuns().find((run) => run.id === first.id)).toMatchObject({ status: "completed", threadId: "thread-1" });+ expect(h.manager.listRuns().find((run) => run.id === second.id)).toMatchObject({ status: "running", threadId: "thread-1", sameConversation: true });+ expect(new RoutineManager(h.options).listRuns().find((run) => run.id === second.id)?.sameConversation).toBe(true);+ });++ it("finds no earlier conversation for the first run, a run of another trigger, or another bot", () => {+ const h = harness();+ const first = event(h, "d1");+ expect(previousEventThread(h.manager.listRuns(), first as never)).toBeNull();+ expect(previousEventThread(h.manager.listRuns(), { id: "x", botId: "maus-1" })).toBeNull();+ });++ it("starts a new conversation for every run when the option is off", async () => {+ const h = harness();+ keepOne(h);+ event(h, "d1", false);+ await h.manager.tick();+ done(h, "thread-1");+ event(h, "d2", false);+ await h.manager.tick();+ expect(h.started.map((turn) => turn.threadId)).toEqual(["thread-1", "thread-2"]);+ expect(h.manager.listRuns().every((run) => run.sameConversation === undefined)).toBe(true);+ });+});diff --git a/server/routines.ts b/server/routines.tsindex ec27249270..0c2035b451 100644--- a/server/routines.ts+++ b/server/routines.ts@@ -118,8 +118,8 @@ export interface RoutineRun extends RoutineLineCodes {/** Time spent waiting on the person's answers, which the run limit does not count. */waitedMs?: number;triggerSource?: RoutineRunTrigger;- /** "app": a connected-app event started it; "wait": a wait's follow-up did (its triggerSource stays "webhook", an outside event). */- eventSource?: "app" | "wait";+ /** "app": a connected-app event started it; "wait": a wait's follow-up did (its triggerSource stays "webhook", an outside event). sameConversation: its trigger keeps one conversation (routine-same-conversation.ts). */+ eventSource?: "app" | "wait"; sameConversation?: true;webhookId?: string;deliveryId?: string;sourceThreadId?: string;@@ -752,7 +752,7 @@ export class RoutineManager {enqueueWebhook(input: {webhookId: string; webhookName: string; prompt: string; botId: string; runOn: RoutineRunOn; deliveryId: string; receivedAt: number;- eventSource?: "app" | "wait";+ eventSource?: "app" | "wait"; sameConversation?: boolean;/** Where the run reports, instead of the event's own results chat. */resultsThreadId?: string;}): { id: string } {@@ -766,7 +766,7 @@ export class RoutineManager {id: randomUUID(), routineId: input.webhookId, routineName: input.webhookName, prompt: input.prompt, target: "bot",botId: input.botId, runOn: input.runOn, scheduledFor: input.receivedAt, status: "queued", manual: false,triggerSource: "webhook", webhookId: input.webhookId, deliveryId: input.deliveryId, attachments: [], createdAt: this.now(),- resultsThreadId: input.resultsThreadId ?? this.options.eventResultsThread?.(input), ...(input.eventSource ? { eventSource: input.eventSource } : {}),+ resultsThreadId: input.resultsThreadId ?? this.options.eventResultsThread?.(input), ...(input.eventSource ? { eventSource: input.eventSource } : {}), ...(input.sameConversation ? { sameConversation: true } : {}),};this.commitEvent(run, input.deliveryId, () => { this.runs.push(run); });return cloneRun(run);@@ -1106,7 +1106,7 @@ export class RoutineManager {this.runChecks(checked.id, checkHold(this.runs, checked.id, now, run.id), run.id).catch((error) => console.error(`routines: the checks of ${checked.id} failed`, error));continue;}- const sameRoutineWorking = triggerSource === "schedule" && this.runs.some(other =>+ const sameRoutineWorking = (triggerSource === "schedule" || run.sameConversation) && this.runs.some(other =>other.id !== run.id && other.routineId === run.routineId && ["running", "waiting"].includes(other.status));const state = sameRoutineWorking ? "busy" : this.targetState(run);if (state === "busy") {diff --git a/server/trigger-tools.test.ts b/server/trigger-tools.test.tsindex 1c47d7c815..7f8026cac7 100644--- a/server/trigger-tools.test.ts+++ b/server/trigger-tools.test.ts@@ -60,6 +60,10 @@ describe("parseTriggerRequest", () => {.toMatchObject({ ok: true, kind: "app", operation: { action: "create", trigger: { name: "x" } } });expect(parseTriggerRequest({ ...source, action: "update", triggerId: "a1", changes: { filter: { from: "acme" } } }, isSchedule)).toMatchObject({ ok: true, kind: "app", operation: { action: "update", triggerId: "a1", changes: { filter: { from: "acme" } } } });+ expect(parseTriggerRequest({ ...source, action: "update", triggerId: "a1", changes: { sameConversation: true } }, isSchedule))+ .toMatchObject({ ok: true, kind: "app", operation: { changes: { sameConversation: true } } });+ expect(parseTriggerRequest({ ...source, action: "update", triggerId: "w1", changes: { sameConversation: false } }, isSchedule))+ .toMatchObject({ ok: true, kind: "webhook", operation: { webhookId: "w1", changes: { sameConversation: false } } });});it("refuses a field the trigger's kind does not have, and unknown shapes", () => {@@ -69,6 +73,8 @@ describe("parseTriggerRequest", () => {.toMatchObject({ ok: false });expect(parseTriggerRequest({ ...source, action: "update", triggerId: "a1", changes: { event: "SLACK_X" } }, isSchedule)).toMatchObject({ ok: false, error: expect.stringContaining("delete it and create a new one") });+ expect(parseTriggerRequest({ ...source, action: "update", triggerId: "r1", changes: { sameConversation: true } }, isSchedule))+ .toMatchObject({ ok: false, error: "same_conversation applies only to app-event and webhook triggers" });expect(parseTriggerRequest({ ...source, action: "create", kind: "email", routine: {} }, isSchedule)).toMatchObject({ ok: false });expect(parseTriggerRequest({ ...source, action: "create", kind: "schedule", routine: {}, extra: 1 }, isSchedule)).toMatchObject({ ok: false });});diff --git a/server/trigger-tools.ts b/server/trigger-tools.tsindex 1873d695c8..483939443a 100644--- a/server/trigger-tools.ts+++ b/server/trigger-tools.ts@@ -177,8 +177,8 @@ const triggerRequestSchema = z.union([z.object({ ...source, action: z.enum(["pause", "resume", "run_now", "delete"]), triggerId: z.string().min(1).max(200) }).strict(),]);-const WEBHOOK_FIELDS = new Set(["name", "instructions", "runOn", "eventTypes"]);-const APP_FIELDS = new Set(["name", "instructions", "runOn", "filter", "config"]);+const WEBHOOK_FIELDS = new Set(["name", "instructions", "runOn", "eventTypes", "sameConversation"]);+const APP_FIELDS = new Set(["name", "instructions", "runOn", "filter", "config", "sameConversation"]);export type ParsedTriggerRequest =| { ok: false; error: string }@@ -201,16 +201,17 @@ export function parseTriggerRequest(body: unknown, kindOf: (id: string) => "scheconst kind = kindOf(request.triggerId);if (kind === "app") {const misplaced = changes && Object.keys(changes).find((key) => !APP_FIELDS.has(key));- if (misplaced) return { ok: false, error: `An app-event trigger has no ${misplaced} to change. Change name, instructions, run_on, filter or event_config; to watch another app, event or account, delete it and create a new one.` };+ if (misplaced) return { ok: false, error: `An app-event trigger has no ${misplaced} to change. Change name, instructions, run_on, filter, event_config or same_conversation; to watch another app, event or account, delete it and create a new one.` };return { ok: true, kind: "app", forBotId: request.forBotId, operation: { action: request.action, triggerId: request.triggerId, ...(changes ? { changes } : {}) } };}if (kind === "schedule") {if (changes && "eventTypes" in changes) return { ok: false, error: "webhook_event_types applies only to webhook triggers" };if (changes && ("filter" in changes || "config" in changes)) return { ok: false, error: "filter and event_config apply only to app-event triggers" };+ if (changes && "sameConversation" in changes) return { ok: false, error: "same_conversation applies only to app-event and webhook triggers" };return { ok: true, kind: "schedule", forBotId: request.forBotId, proposal: { action: request.action, routineId: request.triggerId, ...(changes ? { changes } : {}) } };}const misplaced = changes && Object.keys(changes).find((key) => !WEBHOOK_FIELDS.has(key));- if (misplaced) return { ok: false, error: `A webhook trigger has no ${misplaced}; it fires when its link is called. Change name, instructions, run_on or webhook_event_types.` };+ if (misplaced) return { ok: false, error: `A webhook trigger has no ${misplaced}; it fires when its link is called. Change name, instructions, run_on, webhook_event_types or same_conversation.` };return { ok: true, kind: "webhook", forBotId: request.forBotId, operation: { action: request.action, webhookId: request.triggerId, ...(changes ? { changes } : {}) } };}diff --git a/server/webhook-requests.ts b/server/webhook-requests.tsindex 4930a87e9b..47197e9f22 100644--- a/server/webhook-requests.ts+++ b/server/webhook-requests.ts@@ -46,6 +46,7 @@ const definitionSchema = z.object({instructions: z.string().trim().max(INSTRUCTIONS_MAX).default(""),runOn: z.enum(["maus", "cloud"]).default("maus"),eventTypes: z.array(z.string().trim().min(1).max(200)).max(20).optional(),+ sameConversation: z.boolean().optional(),}).strict();const changesSchema = definitionSchema.partial().strict().refine((changes) => Object.keys(changes).length > 0, "The update action needs at least one field in changes");@@ -81,6 +82,7 @@ function snapshot(webhook: WebhookTrigger): WebhookRequestSnapshot {runOn: webhook.runOn,enabled: webhook.enabled,...(webhook.eventTypes?.length ? { eventTypes: [...webhook.eventTypes] } : {}),+ ...(webhook.sameConversation ? { sameConversation: true } : {}),};}@@ -90,6 +92,7 @@ function managerInput(definition: Partial<WebhookRequestDefinition>) {...(definition.instructions !== undefined ? { prompt: definition.instructions } : {}),...(definition.runOn !== undefined ? { runOn: definition.runOn } : {}),...(definition.eventTypes !== undefined ? { eventTypes: definition.eventTypes } : {}),+ ...(definition.sameConversation !== undefined ? { sameConversation: definition.sameConversation } : {}),};}@@ -243,7 +246,7 @@ export class WebhookRequestService {const before = payload.undo?.before;if (!current || current.updatedAt !== payload.undo?.appliedUpdatedAt) return stale;const patch = operation.action === "update"- ? before ? { ...managerInput(before), eventTypes: before.eventTypes ?? [], enabled: before.enabled } : undefined+ ? before ? { ...managerInput(before), eventTypes: before.eventTypes ?? [], sameConversation: before.sameConversation === true, enabled: before.enabled } : undefined: { enabled: operation.action === "pause" };if (!patch || !webhooks.update(webhookId, patch)) return stale;break;diff --git a/server/webhooks.test.ts b/server/webhooks.test.tsindex 5c70a4096c..d5ffcc52fe 100644--- a/server/webhooks.test.ts+++ b/server/webhooks.test.ts@@ -737,3 +737,19 @@ describe("wrong-secret calls, counted", () => {]);});});++describe("webhook that keeps one conversation", () => {+ it("saves the option, hands it to each run, and turns it off again", () => {+ const h = harness();+ const { webhook, secret } = h.manager.create({ name: "Leads", prompt: "Handle it", botId: "maus-1", sameConversation: true });+ expect(webhook.sameConversation).toBe(true);+ h.manager.receive(webhook.endpointId, secret, { payload: {}, deliveryId: "one" });+ expect(h.queued.at(-1)).toMatchObject({ webhookId: webhook.id, sameConversation: true });+ expect(h.manager.update(webhook.id, { name: "Renamed" })?.sameConversation).toBe(true);+ expect(new WebhookManager(h.options).list().find((candidate) => candidate.id === webhook.id)?.sameConversation).toBe(true);++ expect(h.manager.update(webhook.id, { sameConversation: false })).not.toHaveProperty("sameConversation");+ h.manager.receive(webhook.endpointId, secret, { payload: {}, deliveryId: "two" });+ expect(h.queued.at(-1)?.sameConversation).toBeUndefined();+ });+});diff --git a/server/webhooks.ts b/server/webhooks.tsindex 74cc2d07a0..a181d915d8 100644--- a/server/webhooks.ts+++ b/server/webhooks.ts@@ -69,6 +69,7 @@ export interface WebhookManagerOptions {runOn: RoutineRunOn;deliveryId: string;receivedAt: number;+ sameConversation?: boolean;}) => { id: string };cancelQueued?: (webhookId: string, message: string) => void;pendingRuns?: (webhookId: string) => number;@@ -117,6 +118,7 @@ const triggerInputSchema = z.object({verificationPending: z.boolean().optional(),eventTypes: eventTypesSchema,maxPendingRuns: maxPendingRunsSchema.nullable().optional(),+ sameConversation: z.boolean().optional(),});const triggerPatchSchema = triggerInputSchema.partial();const verificationSampleSchema = z.object({@@ -147,6 +149,7 @@ const storedWebhookSchema = z.object({eventTypes: eventTypesSchema,// A hand-edited value out of range falls back to the default instead of making the file unreadable.maxPendingRuns: maxPendingRunsSchema.optional().catch(undefined),+ sameConversation: z.boolean().optional().catch(undefined),secretHash: z.string().regex(/^[a-f0-9]{64}$/),/** The current secret, sealed under WEBHOOK_KEY_FILE beside this file, so the person and the owning bot get the same* address back. Never in a public trigger or a workspace backup; absent for a webhook made before it was kept. */@@ -241,6 +244,7 @@ function cleanInput(input: WebhookTriggerInput): CleanWebhookInput {if (groupId && clean.delivery !== "post") fail(400, "a webhook room is only for delivery \"post\" webhooks");if (groupId) clean.groupId = groupId;if (typeof input.maxPendingRuns === "number") clean.maxPendingRuns = input.maxPendingRuns;+ if (input.sameConversation) clean.sameConversation = true;return clean;}@@ -439,13 +443,14 @@ export class WebhookManager {this.assertWritable();const held = this.webhooks.find((candidate) => candidate.id === record.id);const clean = cleanInput({ name: record.name, prompt: record.prompt, botId: record.botId, runOn: record.runOn, delivery: record.delivery,- groupId: record.groupId ?? null, enabled: held?.enabled ?? false, eventTypes: record.eventTypes, maxPendingRuns: record.maxPendingRuns ?? null });+ groupId: record.groupId ?? null, enabled: held?.enabled ?? false, eventTypes: record.eventTypes, maxPendingRuns: record.maxPendingRuns ?? null,+ sameConversation: record.sameConversation });if (this.options.botState(clean.botId) === "missing") fail(409, "Its bot is not on this server yet");if (clean.groupId) this.assertRoomMember(clean.botId, clean.groupId);const definition = { ...clean, ...(record.resultsThreadId ? { resultsThreadId: record.resultsThreadId } : {}) };let trigger: StoredWebhookTrigger;if (held) {- for (const key of ["delivery", "groupId", "eventTypes", "maxPendingRuns", "resultsThreadId"] as const) delete held[key];+ for (const key of ["delivery", "groupId", "eventTypes", "maxPendingRuns", "sameConversation", "resultsThreadId"] as const) delete held[key];trigger = Object.assign(held, definition, { verificationPending: held.verificationPending, updatedAt: this.now() });} else {const secret = newSecret();@@ -475,6 +480,7 @@ export class WebhookManager {verificationPending: patch.verificationPending ?? trigger.verificationPending,eventTypes: patch.eventTypes ?? trigger.eventTypes,maxPendingRuns: patch.maxPendingRuns === undefined ? trigger.maxPendingRuns : patch.maxPendingRuns,+ sameConversation: patch.sameConversation ?? trigger.sameConversation,});if (this.options.botState(clean.botId) === "missing") fail(400, "That MAUS no longer exists");if (clean.groupId) this.assertRoomMember(clean.botId, clean.groupId);@@ -482,6 +488,7 @@ export class WebhookManager {if (!clean.eventTypes?.length) delete trigger.eventTypes;if (!clean.groupId) delete trigger.groupId;if (clean.maxPendingRuns === undefined) delete trigger.maxPendingRuns;+ if (!clean.sameConversation) delete trigger.sameConversation;if (patch.enabled === false) {this.options.cancelQueued?.(trigger.id, "The webhook was paused before this delivery started");}@@ -773,6 +780,7 @@ export class WebhookManager {runOn: trigger.runOn,deliveryId,receivedAt: now,+ sameConversation: trigger.sameConversation,});this.deliveries.push({ key: `${trigger.endpointId}:${deliveryId}`, runId: run.id, at: now });if (this.deliveries.length > MAX_DELIVERIES) {diff --git a/shared/app-triggers.ts b/shared/app-triggers.tsindex edbc8273f9..d4fe680177 100644--- a/shared/app-triggers.ts+++ b/shared/app-triggers.ts@@ -54,6 +54,8 @@ export interface AppTrigger {remote: { triggerId?: string; state: "active" | "pending" | "error"; error?: string; syncedAt?: number };problem?: AppTriggerProblem;sourceThreadId?: string;+ /** Each run continues this automation's previous run conversation instead of starting a new one. */+ sameConversation?: boolean;/** Events that started a run or joined one. */received: number;filtered: number;@@ -120,9 +122,11 @@ export interface AppTriggerDefinition {filter?: AppTriggerFilter;config?: Record<string, unknown>;runOn?: RoutineRunOn;+ /** Each run continues the automation's previous run conversation. */+ sameConversation?: boolean;}-export type AppTriggerChange = Partial<Pick<AppTriggerDefinition, "name" | "instructions" | "filter" | "config" | "runOn">>;+export type AppTriggerChange = Partial<Pick<AppTriggerDefinition, "name" | "instructions" | "filter" | "config" | "runOn" | "sameConversation">>;export type AppTriggerRequestOperation =| { action: "create"; trigger: AppTriggerDefinition; forBot?: { botId: string; name: string } }@@ -142,7 +146,7 @@ export interface AppTriggerRequestCardData {name: string;/** The automation's revision right after the change; Undo refuses once it moved. */appliedUpdatedAt?: number;- before?: { name: string; prompt: string; runOn: RoutineRunOn; enabled: boolean; filter?: AppTriggerFilter; config: Record<string, unknown> };+ before?: { name: string; prompt: string; runOn: RoutineRunOn; enabled: boolean; filter?: AppTriggerFilter; config: Record<string, unknown>; sameConversation?: boolean };};}diff --git a/shared/webhook-request.ts b/shared/webhook-request.tsindex dfc2b4772b..4adfd1c4b4 100644--- a/shared/webhook-request.ts+++ b/shared/webhook-request.ts@@ -9,6 +9,8 @@ export interface WebhookRequestDefinition {instructions: string;runOn: "maus" | "cloud";eventTypes?: string[];+ /** Each run continues the webhook's previous run conversation. */+ sameConversation?: boolean;}export type WebhookRequestOperation =diff --git a/shared/webhooks.ts b/shared/webhooks.tsindex 55b08cd4bf..7c521da368 100644--- a/shared/webhooks.ts+++ b/shared/webhooks.ts@@ -33,6 +33,8 @@ export interface WebhookTrigger {/** Unfinished runs this webhook may hold before new deliveries get 429.* Absent means the default (3). */maxPendingRuns?: number;+ /** Each run continues this webhook's previous run conversation instead of starting a new one. */+ sameConversation?: boolean;}export interface WebhookTriggerInput {@@ -48,6 +50,7 @@ export interface WebhookTriggerInput {eventTypes?: string[];/** 1–50; `null` goes back to the default. */maxPendingRuns?: number | null;+ sameConversation?: boolean;}export interface WebhookVerificationSample {diff --git a/src/components/WebhookTrigger.tsx b/src/components/WebhookTrigger.tsxindex 1c93146ddf..8d1e32bb65 100644--- a/src/components/WebhookTrigger.tsx+++ b/src/components/WebhookTrigger.tsx@@ -1,6 +1,7 @@// The editor for an automation that runs when another app sends something: who does it and what it does, with the// rest under More. The words a person sees never say webhook, endpoint or payload.import { useRef, useState } from "react";+import { SameConversationOption } from "./automations/SameConversationOption";import { Cloud, Laptop, Loader2, X } from "lucide-react";import { BotAvatar } from "@/components/Avatar";@@ -28,6 +29,7 @@ export function WebhookEditor({ webhook, bots, initialBotId, onClose, onCredenticonst [runOn, setRunOn] = useState<RoutineRunOn>(webhook?.runOn ?? "maus");const [eventTypes, setEventTypes] = useState((webhook?.eventTypes ?? []).join(", "));const [maxPendingRuns, setMaxPendingRuns] = useState(webhook?.maxPendingRuns?.toString() ?? "");+ const [sameConversation, setSameConversation] = useState(webhook?.sameConversation ?? false);const [saving, setSaving] = useState(false);const [error, setError] = useState("");const dialogRef = useRef<HTMLDivElement>(null);@@ -41,7 +43,7 @@ export function WebhookEditor({ webhook, bots, initialBotId, onClose, onCredentisetError(t("automations.editor.app.limitError", { max: WEBHOOK_MAX_PENDING_RUNS_LIMIT }));return;}- const input: WebhookTriggerInput = { name: name.trim() || suggestedName(prompt, bot), prompt: prompt.trim(), botId, runOn, ...webhookActivationDefaults(webhook), eventTypes: eventTypes.split(",").map((value) => value.trim()).filter(Boolean), maxPendingRuns: pendingLimit };+ const input: WebhookTriggerInput = { name: name.trim() || suggestedName(prompt, bot), prompt: prompt.trim(), botId, runOn, ...webhookActivationDefaults(webhook), eventTypes: eventTypes.split(",").map((value) => value.trim()).filter(Boolean), maxPendingRuns: pendingLimit, sameConversation };setSaving(true);setError("");try {@@ -92,6 +94,7 @@ export function WebhookEditor({ webhook, bots, initialBotId, onClose, onCredenti</div><label className="block"><span className="mb-1.5 block text-[12px] font-medium text-ink-secondary">{t("automations.editor.app.events")}</span><input value={eventTypes} onChange={(event) => setEventTypes(event.target.value)} placeholder="push, workflow_run" className={FIELD} /><span className="mt-1.5 block text-[11px] text-ink-secondary">{t("automations.editor.app.eventsHelp")}</span></label><label className="block"><span className="mb-1.5 block text-[12px] font-medium text-ink-secondary">{t("automations.editor.app.limit")}</span><input type="number" inputMode="numeric" min={1} max={WEBHOOK_MAX_PENDING_RUNS_LIMIT} step={1} value={maxPendingRuns} onChange={(event) => setMaxPendingRuns(event.target.value)} placeholder={String(WEBHOOK_DEFAULT_MAX_PENDING_RUNS)} className={FIELD} /><span className="mt-1.5 block text-[11px] text-ink-secondary">{t("automations.editor.app.limitHelp", { count: WEBHOOK_DEFAULT_MAX_PENDING_RUNS })}</span></label>+ <SameConversationOption checked={sameConversation} onChange={setSameConversation} /></div></details>{error && <div className="rounded-xl border border-danger/30 bg-danger/10 px-3.5 py-3 text-[12px] text-danger">{error}</div>}diff --git a/src/components/automations/AppEventEditor.tsx b/src/components/automations/AppEventEditor.tsxindex e1b4dc9e4c..1a6a8a5394 100644--- a/src/components/automations/AppEventEditor.tsx+++ b/src/components/automations/AppEventEditor.tsx@@ -10,6 +10,7 @@ import { cn } from "@/lib/cn";import { t } from "@/lib/i18n";import { useStore, type Bot } from "@/state/store";import { Select } from "../Select";+import { SameConversationOption } from "./SameConversationOption";import { suggestedName } from "../WebhookTrigger";const FIELD = "w-full rounded-xl border border-hairline/60 bg-panel px-3.5 py-2.5 text-[13px] text-ink outline-none placeholder:text-ink-tertiary focus:border-accent/70";@@ -26,6 +27,7 @@ export function AppEventEditor({ trigger, bots, initialBotId, onClose, onSaved }const [config, setConfig] = useState<Record<string, string>>({});const [prompt, setPrompt] = useState(trigger?.prompt ?? "");const [name, setName] = useState(trigger?.name ?? "");+ const [sameConversation, setSameConversation] = useState(trigger?.sameConversation ?? false);const [saving, setSaving] = useState(false);const [error, setError] = useState("");const dialogRef = useRef<HTMLDivElement>(null);@@ -63,11 +65,11 @@ export function AppEventEditor({ trigger, bots, initialBotId, onClose, onSaved }setError("");try {const saved = trigger- ? await appTriggerApi.update(trigger.id, { name: name.trim() || trigger.name, prompt: prompt.trim(), filter: Object.keys(cleanFilter).length ? cleanFilter : null })+ ? await appTriggerApi.update(trigger.id, { name: name.trim() || trigger.name, prompt: prompt.trim(), filter: Object.keys(cleanFilter).length ? cleanFilter : null, sameConversation }): await appTriggerApi.create({botId, app, event: chosen?.event ?? event, prompt: prompt.trim(), name: name.trim() || suggestedName(prompt, bot),...(account ? { account } : {}), ...(Object.keys(cleanFilter).length ? { filter: cleanFilter } : {}),- ...(Object.keys(config).length ? { config } : {}),+ ...(Object.keys(config).length ? { config } : {}), sameConversation,});onSaved?.(saved);onClose();@@ -161,6 +163,7 @@ export function AppEventEditor({ trigger, bots, initialBotId, onClose, onSaved }<details className="rounded-xl border border-hairline/45 bg-inset/45 px-4 py-3"><summary className="cursor-pointer text-[13px] font-medium text-ink">{t("automations.more")}</summary><label className="mt-4 block"><span className={LABEL}>{t("automations.editor.app.name")}</span><input value={name} onChange={(input) => setName(input.target.value)} placeholder={suggestedName(prompt, bots.find((bot) => bot.id === botId))} className={FIELD} /></label>+ <div className="mt-3"><SameConversationOption checked={sameConversation} onChange={setSameConversation} /></div></details>)}{error && <div role="alert" className="rounded-xl border border-danger/30 bg-danger/10 px-3.5 py-3 text-[12px] text-danger">{error}</div>}diff --git a/src/components/automations/SameConversationOption.tsx b/src/components/automations/SameConversationOption.tsxnew file mode 100644index 0000000000..b0ae71f5fe--- /dev/null+++ b/src/components/automations/SameConversationOption.tsx@@ -0,0 +1,14 @@+import { t } from "@/lib/i18n";++/** Webhook and app-event automations: each run continues the previous run's conversation. */+export function SameConversationOption({ checked, onChange }: { checked: boolean; onChange: (checked: boolean) => void }) {+ return (+ <label className="flex items-start gap-3 rounded-xl border border-hairline/40 bg-inset/40 px-3.5 py-3">+ <input type="checkbox" aria-label={t("automations.sameConversationLabel")} checked={checked} onChange={(event) => onChange(event.target.checked)} className="mt-0.5 accent-accent" />+ <span>+ <span className="block text-[13px] font-medium text-ink">{t("automations.sameConversationLabel")}</span>+ <span className="mt-1 block text-[11px] leading-relaxed text-ink-secondary">{t("automations.sameConversationHelp")}</span>+ </span>+ </label>+ );+}diff --git a/src/lib/app-triggers.ts b/src/lib/app-triggers.tsindex f2b1d85b0b..c45559405a 100644--- a/src/lib/app-triggers.ts+++ b/src/lib/app-triggers.ts@@ -78,6 +78,7 @@ export interface AppTriggerDraft {account?: string;filter?: AppTriggerFilter;config?: Record<string, unknown>;+ sameConversation?: boolean;}const put = (trigger: AppTrigger) => applyAppTriggerFrame({ kind: "app-trigger", botId: trigger.botId, trigger });@@ -89,7 +90,7 @@ export const appTriggerApi = {put(trigger);return trigger;},- async update(id: string, patch: Partial<Pick<AppTrigger, "name" | "prompt" | "enabled" | "config">> & { filter?: AppTriggerFilter | null }) {+ async update(id: string, patch: Partial<Pick<AppTrigger, "name" | "prompt" | "enabled" | "config" | "sameConversation">> & { filter?: AppTriggerFilter | null }) {const { trigger } = await api<{ trigger: AppTrigger }>(`/api/app-triggers/${id}`, { method: "PATCH", body: JSON.stringify(patch) });put(trigger);return trigger;diff --git a/src/locales/de.json b/src/locales/de.jsonindex 2ccdf09135..bad5aa9f1e 100644--- a/src/locales/de.json+++ b/src/locales/de.json@@ -3936,5 +3936,7 @@"settings.simple.billing.included": "Inklusive Nutzung in diesem Monat","settings.simple.billing.summary": "{percent} % der inklusiven Nutzung in diesem Monat","settings.simple.billing.used": "genutzt",- "settings.skin.dressUp.title": "Meine Bots verkleiden"+ "settings.skin.dressUp.title": "Meine Bots verkleiden",+ "automations.sameConversationLabel": "Ein Gespräch fortführen",+ "automations.sameConversationHelp": "Jeder Lauf geht im Gespräch des vorherigen Laufs weiter, damit der Bot sieht, was er zuvor getan hat. Läufe kommen nacheinander dran."}diff --git a/src/locales/en.json b/src/locales/en.jsonindex bf963b7654..5072d5cc5a 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -5380,6 +5380,8 @@"automations.address.keepOpen": "Keep {app} open so it can receive.","automations.address.unavailable": "This computer can't receive right now.","automations.more": "More",+ "automations.sameConversationLabel": "Keep one conversation",+ "automations.sameConversationHelp": "Each run continues in the previous run's conversation, so the bot sees what it did before. Runs take turns.","automations.address.showSecret": "Show secret / settings","automations.address.secret": "Secret: {secret}","automations.address.secretUnknown": "The secret is shown once. Copy the address to make a new one.",diff --git a/src/locales/es.json b/src/locales/es.jsonindex 5f0623cac9..8c470a071c 100644--- a/src/locales/es.json+++ b/src/locales/es.json@@ -3982,6 +3982,8 @@"automations.address.keepOpen": "Mantén {app} abierto para que pueda recibir.","automations.address.unavailable": "Este equipo no puede recibir ahora mismo.","automations.more": "Más",+ "automations.sameConversationLabel": "Mantener una sola conversación",+ "automations.sameConversationHelp": "Cada ejecución continúa en la conversación de la anterior, así el bot ve lo que hizo antes. Las ejecuciones van por turnos.","automations.address.showSecret": "Mostrar secreto / ajustes","automations.address.secret": "Secreto: {secret}","automations.address.secretUnknown": "El secreto se muestra una vez. Copia la dirección para crear uno nuevo.",diff --git a/src/locales/fr.json b/src/locales/fr.jsonindex a2be4202bb..7ccf0bf51b 100644--- a/src/locales/fr.json+++ b/src/locales/fr.json@@ -3773,5 +3773,7 @@"settings.simple.billing.included": "Utilisation incluse ce mois-ci","settings.simple.billing.summary": "{percent} % de l'utilisation incluse ce mois-ci","settings.simple.billing.used": "utilisé",- "settings.skin.dressUp.title": "Déguiser mes bots"+ "settings.skin.dressUp.title": "Déguiser mes bots",+ "automations.sameConversationLabel": "Garder une seule conversation",+ "automations.sameConversationHelp": "Chaque exécution continue dans la conversation de la précédente, pour que le bot voie ce qu'il a déjà fait. Les exécutions se suivent."}diff --git a/src/locales/hi.json b/src/locales/hi.jsonindex 4bf4f1f854..c05a37263e 100644--- a/src/locales/hi.json+++ b/src/locales/hi.json@@ -3627,5 +3627,7 @@"settings.simple.billing.included": "इस महीने का शामिल इस्तेमाल","settings.simple.billing.summary": "इस महीने के शामिल इस्तेमाल का {percent}%","settings.simple.billing.used": "इस्तेमाल हुआ",- "settings.skin.dressUp.title": "मेरे बॉट्स को सजाएँ"+ "settings.skin.dressUp.title": "मेरे बॉट्स को सजाएँ",+ "automations.sameConversationLabel": "एक ही बातचीत रखें",+ "automations.sameConversationHelp": "हर रन पिछले रन की बातचीत में ही आगे बढ़ता है, ताकि बॉट देख सके कि उसने पहले क्या किया। रन एक-एक करके चलते हैं।"}diff --git a/src/locales/it.json b/src/locales/it.jsonindex 72a8fe8bf3..ea97af1c2b 100644--- a/src/locales/it.json+++ b/src/locales/it.json@@ -4238,6 +4238,8 @@"automations.address.keepOpen": "Tieni aperto {app}, così può ricevere.","automations.address.unavailable": "Questo computer non può ricevere in questo momento.","automations.more": "Altro",+ "automations.sameConversationLabel": "Mantieni una sola conversazione",+ "automations.sameConversationHelp": "Ogni esecuzione continua nella conversazione di quella precedente, così il bot vede cosa ha fatto prima. Le esecuzioni si alternano.","automations.address.showSecret": "Mostra segreto / impostazioni","automations.address.secret": "Segreto: {secret}","automations.address.secretUnknown": "Il segreto viene mostrato una sola volta. Copia l'indirizzo per crearne uno nuovo.",diff --git a/src/locales/ja.json b/src/locales/ja.jsonindex 29bac91d8b..b0952242ed 100644--- a/src/locales/ja.json+++ b/src/locales/ja.json@@ -4926,6 +4926,8 @@"automations.address.keepOpen": "受信できるよう、{app}を開いたままにしてください。","automations.address.unavailable": "このコンピューターは現在受信できません。","automations.more": "その他",+ "automations.sameConversationLabel": "1つの会話を続ける",+ "automations.sameConversationHelp": "各実行は前回の実行の会話で続くため、ボットは以前に何をしたかを確認できます。実行は順番に行われます。","automations.address.showSecret": "シークレット/設定を表示","automations.address.secret": "シークレット:{secret}","automations.address.secretUnknown": "シークレットは一度しか表示されません。新しく作成するには、アドレスをコピーしてください。",diff --git a/src/locales/ko.json b/src/locales/ko.jsonindex 5e8d32afa1..871b190c2a 100644--- a/src/locales/ko.json+++ b/src/locales/ko.json@@ -4721,6 +4721,8 @@"automations.address.keepOpen": "받을 수 있도록 {app}을 열어 두세요.","automations.address.unavailable": "지금은 이 컴퓨터에서 받을 수 없어요.","automations.more": "더 보기",+ "automations.sameConversationLabel": "하나의 대화 유지",+ "automations.sameConversationHelp": "실행할 때마다 이전 실행의 대화에서 이어가서, 봇이 전에 한 일을 알 수 있어요. 실행은 차례로 진행돼요.","automations.address.showSecret": "비밀 값 / 설정 보기","automations.address.secret": "비밀 값: {secret}","automations.address.secretUnknown": "비밀 값은 한 번만 표시돼요. 새로 만들려면 주소를 복사하세요.",diff --git a/src/locales/pl.json b/src/locales/pl.jsonindex 374882af57..50c1c7fd3a 100644--- a/src/locales/pl.json+++ b/src/locales/pl.json@@ -4319,6 +4319,8 @@"automations.address.keepOpen": "Pozostaw {app} otwarty, aby mógł odbierać.","automations.address.unavailable": "Ten komputer nie może teraz odbierać.","automations.more": "Więcej",+ "automations.sameConversationLabel": "Jedna rozmowa",+ "automations.sameConversationHelp": "Każde uruchomienie toczy się dalej w rozmowie poprzedniego, więc bot widzi, co zrobił wcześniej. Uruchomienia idą po kolei.","automations.address.showSecret": "Pokaż sekret / ustawienia","automations.address.secret": "Sekret: {secret}","automations.address.secretUnknown": "Sekret jest pokazywany tylko raz. Skopiuj adres, aby utworzyć nowy.",diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex c0b918a2a6..1532daa2a6 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -5066,6 +5066,8 @@"automations.address.keepOpen": "Mantenha o app {app} aberto para receber.","automations.address.unavailable": "Este computador não pode receber chamadas agora.","automations.more": "Mais",+ "automations.sameConversationLabel": "Manter uma só conversa",+ "automations.sameConversationHelp": "Cada execução continua na conversa da anterior, assim o bot vê o que fez antes. As execuções acontecem uma de cada vez.","automations.address.showSecret": "Mostrar segredo / configurações","automations.address.secret": "Segredo: {secret}","automations.address.secretUnknown": "O segredo é mostrado uma vez. Copie o endereço para criar um novo.",diff --git a/src/locales/ru.json b/src/locales/ru.jsonindex d9b38f1d5a..295a51c161 100644--- a/src/locales/ru.json+++ b/src/locales/ru.json@@ -4370,6 +4370,8 @@"automations.address.keepOpen": "Держите {app} открытым, чтобы он мог принимать.","automations.address.unavailable": "Сейчас этот компьютер не может принимать.","automations.more": "Ещё",+ "automations.sameConversationLabel": "Одна беседа",+ "automations.sameConversationHelp": "Каждый запуск продолжается в беседе предыдущего, поэтому бот видит, что делал раньше. Запуски идут по очереди.","automations.address.showSecret": "Показать секрет / настройки","automations.address.secret": "Секрет: {secret}","automations.address.secretUnknown": "Секрет показывается один раз. Скопируйте адрес, чтобы создать новый.",diff --git a/src/locales/tr.json b/src/locales/tr.jsonindex 0fd92ab2e4..33fdbcf55b 100644--- a/src/locales/tr.json+++ b/src/locales/tr.json@@ -5977,5 +5977,7 @@"settings.simple.billing.included": "Bu ayın dahil kullanımı","settings.simple.billing.summary": "Bu ayın dahil kullanımının %{percent} kadarı","settings.simple.billing.used": "kullanıldı",- "settings.skin.dressUp.title": "Botlarımı giydir"+ "settings.skin.dressUp.title": "Botlarımı giydir",+ "automations.sameConversationLabel": "Tek sohbeti sürdür",+ "automations.sameConversationHelp": "Her çalıştırma bir öncekinin sohbetinde devam eder, böylece bot daha önce ne yaptığını görür. Çalıştırmalar sırayla yapılır."}diff --git a/src/locales/uk.json b/src/locales/uk.jsonindex d4b28a96b9..d0186389b8 100644--- a/src/locales/uk.json+++ b/src/locales/uk.json@@ -4049,5 +4049,7 @@"settings.simple.billing.included": "Включене використання цього місяця","settings.simple.billing.summary": "{percent}% включеного використання цього місяця","settings.simple.billing.used": "використано",- "settings.skin.dressUp.title": "Перевдягнути моїх ботів"+ "settings.skin.dressUp.title": "Перевдягнути моїх ботів",+ "automations.sameConversationLabel": "Одна розмова",+ "automations.sameConversationHelp": "Кожен запуск продовжується в розмові попереднього, тож бот бачить, що робив раніше. Запуски йдуть по черзі."}diff --git a/src/locales/vi.json b/src/locales/vi.jsonindex c3b7ecc0ee..777db5fdf5 100644--- a/src/locales/vi.json+++ b/src/locales/vi.json@@ -5977,5 +5977,7 @@"settings.simple.billing.included": "Mức dùng kèm theo trong tháng này","settings.simple.billing.summary": "{percent}% mức dùng kèm theo trong tháng này","settings.simple.billing.used": "đã dùng",- "settings.skin.dressUp.title": "Hóa trang cho bot của tôi"+ "settings.skin.dressUp.title": "Hóa trang cho bot của tôi",+ "automations.sameConversationLabel": "Giữ một cuộc trò chuyện",+ "automations.sameConversationHelp": "Mỗi lần chạy tiếp tục trong cuộc trò chuyện của lần trước, để bot thấy những gì nó đã làm. Các lần chạy lần lượt diễn ra."}diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.jsonindex 0367326096..d61dbc0d9a 100644--- a/src/locales/zh-tw.json+++ b/src/locales/zh-tw.json@@ -5112,6 +5112,8 @@"automations.address.keepOpen": "保持 {app} 開啟,才能接收。","automations.address.unavailable": "這台電腦目前無法接收。","automations.more": "更多",+ "automations.sameConversationLabel": "保持同一個對話",+ "automations.sameConversationHelp": "每次執行都會在上一次執行的對話中繼續,機器人能看到之前做過的事。執行會依序進行。","automations.address.showSecret": "顯示密鑰/設定","automations.address.secret": "密鑰:{secret}","automations.address.secretUnknown": "密鑰只會顯示一次。複製網址即可產生新的密鑰。",diff --git a/src/locales/zh.json b/src/locales/zh.jsonindex 9e80b78145..8535078e8a 100644--- a/src/locales/zh.json+++ b/src/locales/zh.json@@ -4912,6 +4912,8 @@"automations.address.keepOpen": "让 {app} 保持打开,才能接收内容。","automations.address.unavailable": "这台电脑目前无法接收。","automations.more": "更多",+ "automations.sameConversationLabel": "保持同一个对话",+ "automations.sameConversationHelp": "每次运行都在上一次运行的对话中继续,机器人能看到之前做过的事。运行会依次进行。","automations.address.showSecret": "显示密钥 / 设置","automations.address.secret": "密钥:{secret}","automations.address.secretUnknown": "密钥只显示一次。复制地址即可生成新的密钥。",