From 5c685eee9cc2a30628e016377e473c1042c4712e Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sat, 4 Apr 2026 16:14:38 +0900 Subject: [PATCH] fix(config): remove lingering channel streamMode leaks (#60733) --- docs/.generated/config-baseline.channel.json | 78 +++++++++------- docs/.generated/config-baseline.json | 92 ++++++++++++------- docs/.generated/config-baseline.plugin.json | 14 +++ extensions/discord/src/config-ui-hints.ts | 4 - extensions/slack/src/config-ui-hints.ts | 4 - ...ndled-channel-config-metadata.generated.ts | 42 +++++---- src/config/zod-schema.providers-core.ts | 1 - 7 files changed, 142 insertions(+), 93 deletions(-) diff --git a/docs/.generated/config-baseline.channel.json b/docs/.generated/config-baseline.channel.json index 5f69d0cdbff..eb8dedac6a1 100644 --- a/docs/.generated/config-baseline.channel.json +++ b/docs/.generated/config-baseline.channel.json @@ -8820,22 +8820,6 @@ "tags": [], "hasChildren": false }, - { - "path": "channels.googlechat.accounts.*.streamMode", - "kind": "channel", - "type": "string", - "required": true, - "enumValues": [ - "replace", - "status_final", - "append" - ], - "defaultValue": "replace", - "deprecated": false, - "sensitive": false, - "tags": [], - "hasChildren": false - }, { "path": "channels.googlechat.accounts.*.textChunkLimit", "kind": "channel", @@ -9491,22 +9475,6 @@ "tags": [], "hasChildren": false }, - { - "path": "channels.googlechat.streamMode", - "kind": "channel", - "type": "string", - "required": true, - "enumValues": [ - "replace", - "status_final", - "append" - ], - "defaultValue": "replace", - "deprecated": false, - "sensitive": false, - "tags": [], - "hasChildren": false - }, { "path": "channels.googlechat.textChunkLimit", "kind": "channel", @@ -25708,6 +25676,26 @@ "tags": [], "hasChildren": false }, + { + "path": "channels.telegram.accounts.*.trustedLocalFileRoots", + "kind": "channel", + "type": "array", + "required": false, + "deprecated": false, + "sensitive": false, + "tags": [], + "hasChildren": true + }, + { + "path": "channels.telegram.accounts.*.trustedLocalFileRoots.*", + "kind": "channel", + "type": "string", + "required": false, + "deprecated": false, + "sensitive": false, + "tags": [], + "hasChildren": false + }, { "path": "channels.telegram.accounts.*.webhookCertPath", "kind": "channel", @@ -28029,6 +28017,32 @@ "tags": [], "hasChildren": false }, + { + "path": "channels.telegram.trustedLocalFileRoots", + "kind": "channel", + "type": "array", + "required": false, + "deprecated": false, + "sensitive": false, + "tags": [ + "channels", + "network", + "storage" + ], + "label": "Telegram Trusted Local File Roots", + "help": "Trusted local filesystem roots for self-hosted Telegram Bot API absolute file_path values. Only absolute paths inside these roots are read directly; all other absolute paths are rejected.", + "hasChildren": true + }, + { + "path": "channels.telegram.trustedLocalFileRoots.*", + "kind": "channel", + "type": "string", + "required": false, + "deprecated": false, + "sensitive": false, + "tags": [], + "hasChildren": false + }, { "path": "channels.telegram.webhookCertPath", "kind": "channel", diff --git a/docs/.generated/config-baseline.json b/docs/.generated/config-baseline.json index 68056f2895d..193890e6da1 100644 --- a/docs/.generated/config-baseline.json +++ b/docs/.generated/config-baseline.json @@ -36860,22 +36860,6 @@ "tags": [], "hasChildren": false }, - { - "path": "channels.googlechat.accounts.*.streamMode", - "kind": "channel", - "type": "string", - "required": true, - "enumValues": [ - "replace", - "status_final", - "append" - ], - "defaultValue": "replace", - "deprecated": false, - "sensitive": false, - "tags": [], - "hasChildren": false - }, { "path": "channels.googlechat.accounts.*.textChunkLimit", "kind": "channel", @@ -37531,22 +37515,6 @@ "tags": [], "hasChildren": false }, - { - "path": "channels.googlechat.streamMode", - "kind": "channel", - "type": "string", - "required": true, - "enumValues": [ - "replace", - "status_final", - "append" - ], - "defaultValue": "replace", - "deprecated": false, - "sensitive": false, - "tags": [], - "hasChildren": false - }, { "path": "channels.googlechat.textChunkLimit", "kind": "channel", @@ -53748,6 +53716,26 @@ "tags": [], "hasChildren": false }, + { + "path": "channels.telegram.accounts.*.trustedLocalFileRoots", + "kind": "channel", + "type": "array", + "required": false, + "deprecated": false, + "sensitive": false, + "tags": [], + "hasChildren": true + }, + { + "path": "channels.telegram.accounts.*.trustedLocalFileRoots.*", + "kind": "channel", + "type": "string", + "required": false, + "deprecated": false, + "sensitive": false, + "tags": [], + "hasChildren": false + }, { "path": "channels.telegram.accounts.*.webhookCertPath", "kind": "channel", @@ -56069,6 +56057,32 @@ "tags": [], "hasChildren": false }, + { + "path": "channels.telegram.trustedLocalFileRoots", + "kind": "channel", + "type": "array", + "required": false, + "deprecated": false, + "sensitive": false, + "tags": [ + "channels", + "network", + "storage" + ], + "label": "Telegram Trusted Local File Roots", + "help": "Trusted local filesystem roots for self-hosted Telegram Bot API absolute file_path values. Only absolute paths inside these roots are read directly; all other absolute paths are rejected.", + "hasChildren": true + }, + { + "path": "channels.telegram.trustedLocalFileRoots.*", + "kind": "channel", + "type": "string", + "required": false, + "deprecated": false, + "sensitive": false, + "tags": [], + "hasChildren": false + }, { "path": "channels.telegram.webhookCertPath", "kind": "channel", @@ -65388,6 +65402,20 @@ "tags": [], "hasChildren": true }, + { + "path": "plugins.entries.memory-core.config.dreaming.cron", + "kind": "plugin", + "type": "string", + "required": false, + "deprecated": false, + "sensitive": false, + "tags": [ + "automation" + ], + "label": "Dreaming Cron", + "help": "Optional cron cadence override for managed dreaming runs.", + "hasChildren": false + }, { "path": "plugins.entries.memory-core.config.dreaming.frequency", "kind": "plugin", diff --git a/docs/.generated/config-baseline.plugin.json b/docs/.generated/config-baseline.plugin.json index 898f06fad47..af5c737cf80 100644 --- a/docs/.generated/config-baseline.plugin.json +++ b/docs/.generated/config-baseline.plugin.json @@ -5743,6 +5743,20 @@ "tags": [], "hasChildren": true }, + { + "path": "plugins.entries.memory-core.config.dreaming.cron", + "kind": "plugin", + "type": "string", + "required": false, + "deprecated": false, + "sensitive": false, + "tags": [ + "automation" + ], + "label": "Dreaming Cron", + "help": "Optional cron cadence override for managed dreaming runs.", + "hasChildren": false + }, { "path": "plugins.entries.memory-core.config.dreaming.frequency", "kind": "plugin", diff --git a/extensions/discord/src/config-ui-hints.ts b/extensions/discord/src/config-ui-hints.ts index f65df865bd7..f7831b2292e 100644 --- a/extensions/discord/src/config-ui-hints.ts +++ b/extensions/discord/src/config-ui-hints.ts @@ -33,10 +33,6 @@ export const discordChannelConfigUiHints = { label: "Discord Streaming Mode", help: 'Unified Discord stream preview mode: "off" | "partial" | "block" | "progress". "progress" maps to "partial" on Discord. Legacy boolean/streamMode keys are auto-mapped.', }, - streamMode: { - label: "Discord Stream Mode (Legacy)", - help: "Legacy Discord preview mode alias (off | partial | block); auto-migrated to channels.discord.streaming.", - }, "draftChunk.minChars": { label: "Discord Draft Chunk Min Chars", help: 'Minimum chars before emitting a Discord stream preview update when channels.discord.streaming="block" (default: 200).', diff --git a/extensions/slack/src/config-ui-hints.ts b/extensions/slack/src/config-ui-hints.ts index e4f50bdab32..0c3011981ea 100644 --- a/extensions/slack/src/config-ui-hints.ts +++ b/extensions/slack/src/config-ui-hints.ts @@ -81,10 +81,6 @@ export const slackChannelConfigUiHints = { label: "Slack Native Streaming", help: "Enable native Slack text streaming (chat.startStream/chat.appendStream/chat.stopStream) when channels.slack.streaming is partial (default: true).", }, - streamMode: { - label: "Slack Stream Mode (Legacy)", - help: "Legacy Slack preview mode alias (replace | status_final | append); auto-migrated to channels.slack.streaming.", - }, "thread.historyScope": { label: "Slack Thread History Scope", help: 'Scope for Slack thread history context ("thread" isolates per thread; "channel" reuses channel history).', diff --git a/src/config/bundled-channel-config-metadata.generated.ts b/src/config/bundled-channel-config-metadata.generated.ts index 44592809d9b..cdb91a566ff 100644 --- a/src/config/bundled-channel-config-metadata.generated.ts +++ b/src/config/bundled-channel-config-metadata.generated.ts @@ -2899,10 +2899,6 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [ label: "Discord Streaming Mode", help: 'Unified Discord stream preview mode: "off" | "partial" | "block" | "progress". "progress" maps to "partial" on Discord. Legacy boolean/streamMode keys are auto-mapped.', }, - streamMode: { - label: "Discord Stream Mode (Legacy)", - help: "Legacy Discord preview mode alias (off | partial | block); auto-migrated to channels.discord.streaming.", - }, "draftChunk.minChars": { label: "Discord Draft Chunk Min Chars", help: 'Minimum chars before emitting a Discord stream preview update when channels.discord.streaming="block" (default: 200).', @@ -4477,11 +4473,6 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [ }, additionalProperties: false, }, - streamMode: { - default: "replace", - type: "string", - enum: ["replace", "status_final", "append"], - }, mediaMaxMb: { type: "number", exclusiveMinimum: 0, @@ -4856,11 +4847,6 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [ }, additionalProperties: false, }, - streamMode: { - default: "replace", - type: "string", - enum: ["replace", "status_final", "append"], - }, mediaMaxMb: { type: "number", exclusiveMinimum: 0, @@ -4935,7 +4921,7 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [ type: "string", }, }, - required: ["groupPolicy", "streamMode"], + required: ["groupPolicy"], additionalProperties: false, }, }, @@ -4943,7 +4929,7 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [ type: "string", }, }, - required: ["groupPolicy", "streamMode"], + required: ["groupPolicy"], additionalProperties: false, }, }, @@ -11691,10 +11677,6 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [ label: "Slack Native Streaming", help: "Enable native Slack text streaming (chat.startStream/chat.appendStream/chat.stopStream) when channels.slack.streaming is partial (default: true).", }, - streamMode: { - label: "Slack Stream Mode (Legacy)", - help: "Legacy Slack preview mode alias (replace | status_final | append); auto-migrated to channels.slack.streaming.", - }, "thread.historyScope": { label: "Slack Thread History Scope", help: 'Scope for Slack thread history context ("thread" isolates per thread; "channel" reuses channel history).', @@ -12713,6 +12695,14 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [ type: "string", format: "uri", }, + trustedLocalFileRoots: { + description: + "Trusted local filesystem roots for self-hosted Telegram Bot API absolute file_path values. Only absolute paths under these roots are read directly; all other absolute paths are rejected.", + type: "array", + items: { + type: "string", + }, + }, autoTopicLabel: { anyOf: [ { @@ -13716,6 +13706,14 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [ type: "string", format: "uri", }, + trustedLocalFileRoots: { + description: + "Trusted local filesystem roots for self-hosted Telegram Bot API absolute file_path values. Only absolute paths under these roots are read directly; all other absolute paths are rejected.", + type: "array", + items: { + type: "string", + }, + }, autoTopicLabel: { anyOf: [ { @@ -13816,6 +13814,10 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [ label: "Telegram API Root URL", help: "Custom Telegram Bot API root URL. Use for self-hosted Bot API servers (https://github.com/tdlib/telegram-bot-api) or reverse proxies in regions where api.telegram.org is blocked.", }, + trustedLocalFileRoots: { + label: "Telegram Trusted Local File Roots", + help: "Trusted local filesystem roots for self-hosted Telegram Bot API absolute file_path values. Only absolute paths inside these roots are read directly; all other absolute paths are rejected.", + }, autoTopicLabel: { label: "Telegram Auto Topic Label", help: "Auto-rename DM forum topics on first message using LLM. Default: true. Set to false to disable, or use object form { enabled: true, prompt: '...' } for custom prompt.", diff --git a/src/config/zod-schema.providers-core.ts b/src/config/zod-schema.providers-core.ts index 2c6111a92e6..9279cfd4567 100644 --- a/src/config/zod-schema.providers-core.ts +++ b/src/config/zod-schema.providers-core.ts @@ -800,7 +800,6 @@ export const GoogleChatAccountSchema = z chunkMode: z.enum(["length", "newline"]).optional(), blockStreaming: z.boolean().optional(), blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(), - streamMode: z.enum(["replace", "status_final", "append"]).optional().default("replace"), mediaMaxMb: z.number().positive().optional(), replyToMode: ReplyToModeSchema.optional(), actions: z