diff --git a/CHANGELOG.md b/CHANGELOG.md index f56b41e7318..44041c62b13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- Channels/streaming: expose `streaming.progress.label`, `labels`, `maxLines`, and `toolProgress` in bundled channel config metadata so progress draft settings appear in config, docs, and control surfaces. Thanks @vincentkoc. - Channels/streaming: normalize whitespace and case for `streaming.progress.label: "auto"` so progress draft labels keep using the built-in label pool instead of rendering a literal `auto` title. Thanks @vincentkoc. - Gateway/install: prefer supported system Node over nvm/fnm/volta/asdf/mise when regenerating managed gateway services, so `gateway install --force` no longer recreates service definitions that doctor immediately flags as version-manager-backed. Fixes #76339. Thanks @brokemac79. - Gateway/usage: serve `usage.cost` and `sessions.usage` from a durable transcript aggregate cache with lock-safe background refreshes and localized stale-cache status, so large usage views avoid repeated full scans. (#76650) Thanks @Marvinthebored. diff --git a/docs/.generated/config-baseline.sha256 b/docs/.generated/config-baseline.sha256 index b7f68687da2..8ecf61c265f 100644 --- a/docs/.generated/config-baseline.sha256 +++ b/docs/.generated/config-baseline.sha256 @@ -1,4 +1,4 @@ -c165172059698df0d806ee9861b9ba1433c2055935bbf81497437897bfcc4e6f config-baseline.json +b4cce06ca8c16774e277551ba027591289762ed9cf2490c993fec2051ac19c61 config-baseline.json bfb7ade43e58c630d0480eaa215ef22bf0d5030136c3e24cdd2c2a4c73d1b663 config-baseline.core.json -f0e77e90432c987c27143194f70df649bac7595e78613b3708366ff32401369f config-baseline.channel.json +7b207901b595ad527026b1f357f63a5cd33123a72eeb66bdac24a8f2e8bb1ac8 config-baseline.channel.json 055fae0d0067a751dc10125af7421da45633f73519c94c982d02b0c4eb2bdf67 config-baseline.plugin.json diff --git a/extensions/discord/src/config-ui-hints.ts b/extensions/discord/src/config-ui-hints.ts index b54f4aebbc0..dba5bdee945 100644 --- a/extensions/discord/src/config-ui-hints.ts +++ b/extensions/discord/src/config-ui-hints.ts @@ -65,6 +65,22 @@ export const discordChannelConfigUiHints = { label: "Discord Draft Tool Progress", help: "Show tool/progress activity in the live draft preview message (default: true). Set false to keep tool updates as separate messages.", }, + "streaming.progress.label": { + label: "Discord Progress Label", + help: 'Initial progress draft title. Use "auto" for built-in single-word labels, a custom string, or false to hide the title.', + }, + "streaming.progress.labels": { + label: "Discord Progress Label Pool", + help: 'Candidate labels for streaming.progress.label="auto". Leave unset to use OpenClaw built-in progress labels.', + }, + "streaming.progress.maxLines": { + label: "Discord Progress Max Lines", + help: "Maximum number of compact progress lines to keep below the draft label (default: 8).", + }, + "streaming.progress.toolProgress": { + label: "Discord Progress Tool Lines", + help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery.", + }, "retry.attempts": { label: "Discord Retry Attempts", help: "Max retry attempts for outbound Discord API calls (default: 3).", diff --git a/extensions/matrix/src/channel.setup.ts b/extensions/matrix/src/channel.setup.ts index 745dd3c47b8..29164c96995 100644 --- a/extensions/matrix/src/channel.setup.ts +++ b/extensions/matrix/src/channel.setup.ts @@ -1,8 +1,7 @@ import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers"; -import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-primitives"; import type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; import { matrixConfigAdapter } from "./config-adapter.js"; -import { MatrixConfigSchema } from "./config-schema.js"; +import { MatrixChannelConfigSchema } from "./config-schema.js"; import { resolveMatrixAccount, type ResolvedMatrixAccount } from "./matrix/accounts.js"; import { createMatrixSetupWizardProxy, matrixSetupAdapter } from "./setup-core.js"; @@ -32,7 +31,7 @@ export const matrixSetupPlugin: ChannelPlugin = { media: true, }, reload: { configPrefixes: ["channels.matrix"] }, - configSchema: buildChannelConfigSchema(MatrixConfigSchema), + configSchema: MatrixChannelConfigSchema, config: { ...matrixConfigAdapter, isConfigured: (account) => account.configured, diff --git a/extensions/matrix/src/channel.ts b/extensions/matrix/src/channel.ts index 9a0cf4fd5b7..218bc26d06d 100644 --- a/extensions/matrix/src/channel.ts +++ b/extensions/matrix/src/channel.ts @@ -3,7 +3,6 @@ import { adaptScopedAccountAccessor, createScopedDmSecurityResolver, } from "openclaw/plugin-sdk/channel-config-helpers"; -import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-primitives"; import type { ChannelDoctorAdapter } from "openclaw/plugin-sdk/channel-contract"; import { createChatChannelPlugin, type ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; import { @@ -33,7 +32,7 @@ import { matrixMessageActions } from "./actions.js"; import { matrixApprovalCapability } from "./approval-native.js"; import { createMatrixPairingText, createMatrixProbeAccount } from "./channel-account-paths.js"; import { DEFAULT_ACCOUNT_ID, matrixConfigAdapter } from "./config-adapter.js"; -import { MatrixConfigSchema } from "./config-schema.js"; +import { MatrixChannelConfigSchema } from "./config-schema.js"; import { legacyConfigRules as MATRIX_LEGACY_CONFIG_RULES, normalizeCompatibilityConfig as normalizeMatrixCompatibilityConfig, @@ -341,7 +340,7 @@ export const matrixPlugin: ChannelPlugin = }, }, reload: { configPrefixes: ["channels.matrix"] }, - configSchema: buildChannelConfigSchema(MatrixConfigSchema), + configSchema: MatrixChannelConfigSchema, config: { ...matrixConfigAdapter, isConfigured: (account) => account.configured, diff --git a/extensions/matrix/src/config-schema.ts b/extensions/matrix/src/config-schema.ts index 95ce8e43c69..4d6bd697371 100644 --- a/extensions/matrix/src/config-schema.ts +++ b/extensions/matrix/src/config-schema.ts @@ -1,3 +1,4 @@ +import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-primitives"; import { AllowFromListSchema, buildNestedDmConfigSchema, @@ -8,6 +9,7 @@ import { } from "openclaw/plugin-sdk/channel-config-schema"; import { buildSecretInputSchema } from "openclaw/plugin-sdk/secret-input"; import { z } from "openclaw/plugin-sdk/zod"; +import { matrixChannelConfigUiHints } from "./config-ui-hints.js"; const matrixActionSchema = z .object({ @@ -137,3 +139,7 @@ export const MatrixConfigSchema = z.object({ rooms: z.object({}).catchall(matrixRoomSchema).optional(), actions: matrixActionSchema, }); + +export const MatrixChannelConfigSchema = buildChannelConfigSchema(MatrixConfigSchema, { + uiHints: matrixChannelConfigUiHints, +}); diff --git a/extensions/matrix/src/config-ui-hints.ts b/extensions/matrix/src/config-ui-hints.ts new file mode 100644 index 00000000000..45a30544969 --- /dev/null +++ b/extensions/matrix/src/config-ui-hints.ts @@ -0,0 +1,20 @@ +import type { ChannelConfigUiHint } from "openclaw/plugin-sdk/channel-core"; + +export const matrixChannelConfigUiHints = { + "streaming.progress.label": { + label: "Matrix Progress Label", + help: 'Initial progress draft title. Use "auto" for built-in single-word labels, a custom string, or false to hide the title.', + }, + "streaming.progress.labels": { + label: "Matrix Progress Label Pool", + help: 'Candidate labels for streaming.progress.label="auto". Leave unset to use OpenClaw built-in progress labels.', + }, + "streaming.progress.maxLines": { + label: "Matrix Progress Max Lines", + help: "Maximum number of compact progress lines to keep below the draft label (default: 8).", + }, + "streaming.progress.toolProgress": { + label: "Matrix Progress Tool Lines", + help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery.", + }, +} satisfies Record; diff --git a/extensions/msteams/src/config-ui-hints.ts b/extensions/msteams/src/config-ui-hints.ts index 44dcd61af11..4c481e1c7aa 100644 --- a/extensions/msteams/src/config-ui-hints.ts +++ b/extensions/msteams/src/config-ui-hints.ts @@ -17,4 +17,16 @@ export const msTeamsChannelConfigUiHints = { label: "MS Teams Progress Label", help: 'Initial progress title. Use "auto" for built-in single-word labels, a custom string, or false to hide the title.', }, + "streaming.progress.labels": { + label: "MS Teams Progress Label Pool", + help: 'Candidate labels for streaming.progress.label="auto". Leave unset to use OpenClaw built-in progress labels.', + }, + "streaming.progress.maxLines": { + label: "MS Teams Progress Max Lines", + help: "Maximum number of compact progress lines to keep below the progress title (default: 8).", + }, + "streaming.progress.toolProgress": { + label: "MS Teams Progress Tool Lines", + help: "Show compact tool/progress lines in progress mode (default: true). Set false to keep only the title until final delivery.", + }, } satisfies Record; diff --git a/extensions/slack/src/config-ui-hints.ts b/extensions/slack/src/config-ui-hints.ts index 4476e9c0b0c..a9320d491de 100644 --- a/extensions/slack/src/config-ui-hints.ts +++ b/extensions/slack/src/config-ui-hints.ts @@ -117,6 +117,22 @@ export const slackChannelConfigUiHints = { label: "Slack Draft Tool Progress", help: "Show tool/progress activity in the live draft preview message (default: true). Set false to keep tool updates as separate messages.", }, + "streaming.progress.label": { + label: "Slack Progress Label", + help: 'Initial progress draft title. Use "auto" for built-in single-word labels, a custom string, or false to hide the title.', + }, + "streaming.progress.labels": { + label: "Slack Progress Label Pool", + help: 'Candidate labels for streaming.progress.label="auto". Leave unset to use OpenClaw built-in progress labels.', + }, + "streaming.progress.maxLines": { + label: "Slack Progress Max Lines", + help: "Maximum number of compact progress lines to keep below the draft label (default: 8).", + }, + "streaming.progress.toolProgress": { + label: "Slack Progress Tool Lines", + help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery.", + }, "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/extensions/telegram/src/config-ui-hints.ts b/extensions/telegram/src/config-ui-hints.ts index 9557cf989f4..64f29510c27 100644 --- a/extensions/telegram/src/config-ui-hints.ts +++ b/extensions/telegram/src/config-ui-hints.ts @@ -73,6 +73,22 @@ export const telegramChannelConfigUiHints = { label: "Telegram Draft Tool Progress", help: "Show tool/progress activity in the live draft preview message (default: true when preview streaming is active). Set false to keep tool updates out of the edited Telegram preview.", }, + "streaming.progress.label": { + label: "Telegram Progress Label", + help: 'Initial progress draft title. Use "auto" for built-in single-word labels, a custom string, or false to hide the title.', + }, + "streaming.progress.labels": { + label: "Telegram Progress Label Pool", + help: 'Candidate labels for streaming.progress.label="auto". Leave unset to use OpenClaw built-in progress labels.', + }, + "streaming.progress.maxLines": { + label: "Telegram Progress Max Lines", + help: "Maximum number of compact progress lines to keep below the draft label (default: 8).", + }, + "streaming.progress.toolProgress": { + label: "Telegram Progress Tool Lines", + help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery.", + }, "retry.attempts": { label: "Telegram Retry Attempts", help: "Max retry attempts for outbound Telegram API calls (default: 3).", diff --git a/src/config/bundled-channel-config-metadata.generated.ts b/src/config/bundled-channel-config-metadata.generated.ts index 54a511b9eee..6430ec6fa45 100644 --- a/src/config/bundled-channel-config-metadata.generated.ts +++ b/src/config/bundled-channel-config-metadata.generated.ts @@ -3613,6 +3613,22 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [ label: "Discord Draft Tool Progress", help: "Show tool/progress activity in the live draft preview message (default: true). Set false to keep tool updates as separate messages.", }, + "streaming.progress.label": { + label: "Discord Progress Label", + help: 'Initial progress draft title. Use "auto" for built-in single-word labels, a custom string, or false to hide the title.', + }, + "streaming.progress.labels": { + label: "Discord Progress Label Pool", + help: 'Candidate labels for streaming.progress.label="auto". Leave unset to use OpenClaw built-in progress labels.', + }, + "streaming.progress.maxLines": { + label: "Discord Progress Max Lines", + help: "Maximum number of compact progress lines to keep below the draft label (default: 8).", + }, + "streaming.progress.toolProgress": { + label: "Discord Progress Tool Lines", + help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery.", + }, "retry.attempts": { label: "Discord Retry Attempts", help: "Max retry attempts for outbound Discord API calls (default: 3).", @@ -7999,6 +8015,24 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [ }, additionalProperties: false, }, + uiHints: { + "streaming.progress.label": { + label: "Matrix Progress Label", + help: 'Initial progress draft title. Use "auto" for built-in single-word labels, a custom string, or false to hide the title.', + }, + "streaming.progress.labels": { + label: "Matrix Progress Label Pool", + help: 'Candidate labels for streaming.progress.label="auto". Leave unset to use OpenClaw built-in progress labels.', + }, + "streaming.progress.maxLines": { + label: "Matrix Progress Max Lines", + help: "Maximum number of compact progress lines to keep below the draft label (default: 8).", + }, + "streaming.progress.toolProgress": { + label: "Matrix Progress Tool Lines", + help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery.", + }, + }, }, { pluginId: "mattermost", @@ -9232,6 +9266,18 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [ label: "MS Teams Progress Label", help: 'Initial progress title. Use "auto" for built-in single-word labels, a custom string, or false to hide the title.', }, + "streaming.progress.labels": { + label: "MS Teams Progress Label Pool", + help: 'Candidate labels for streaming.progress.label="auto". Leave unset to use OpenClaw built-in progress labels.', + }, + "streaming.progress.maxLines": { + label: "MS Teams Progress Max Lines", + help: "Maximum number of compact progress lines to keep below the progress title (default: 8).", + }, + "streaming.progress.toolProgress": { + label: "MS Teams Progress Tool Lines", + help: "Show compact tool/progress lines in progress mode (default: true). Set false to keep only the title until final delivery.", + }, }, }, { @@ -13604,6 +13650,22 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [ label: "Slack Draft Tool Progress", help: "Show tool/progress activity in the live draft preview message (default: true). Set false to keep tool updates as separate messages.", }, + "streaming.progress.label": { + label: "Slack Progress Label", + help: 'Initial progress draft title. Use "auto" for built-in single-word labels, a custom string, or false to hide the title.', + }, + "streaming.progress.labels": { + label: "Slack Progress Label Pool", + help: 'Candidate labels for streaming.progress.label="auto". Leave unset to use OpenClaw built-in progress labels.', + }, + "streaming.progress.maxLines": { + label: "Slack Progress Max Lines", + help: "Maximum number of compact progress lines to keep below the draft label (default: 8).", + }, + "streaming.progress.toolProgress": { + label: "Slack Progress Tool Lines", + help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery.", + }, "thread.historyScope": { label: "Slack Thread History Scope", help: 'Scope for Slack thread history context ("thread" isolates per thread; "channel" reuses channel history).', @@ -15927,6 +15989,22 @@ export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [ label: "Telegram Draft Tool Progress", help: "Show tool/progress activity in the live draft preview message (default: true when preview streaming is active). Set false to keep tool updates out of the edited Telegram preview.", }, + "streaming.progress.label": { + label: "Telegram Progress Label", + help: 'Initial progress draft title. Use "auto" for built-in single-word labels, a custom string, or false to hide the title.', + }, + "streaming.progress.labels": { + label: "Telegram Progress Label Pool", + help: 'Candidate labels for streaming.progress.label="auto". Leave unset to use OpenClaw built-in progress labels.', + }, + "streaming.progress.maxLines": { + label: "Telegram Progress Max Lines", + help: "Maximum number of compact progress lines to keep below the draft label (default: 8).", + }, + "streaming.progress.toolProgress": { + label: "Telegram Progress Tool Lines", + help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery.", + }, "retry.attempts": { label: "Telegram Retry Attempts", help: "Max retry attempts for outbound Telegram API calls (default: 3).", diff --git a/src/config/schema.test.ts b/src/config/schema.test.ts index bdfd9557ae5..1bce4d03ab3 100644 --- a/src/config/schema.test.ts +++ b/src/config/schema.test.ts @@ -177,6 +177,12 @@ describe("config schema", () => { expect(channelProps?.accessToken).toBeTruthy(); expect(res.uiHints["channels.matrix"]?.label).toBe("Matrix"); expect(res.uiHints["channels.matrix.accessToken"]?.sensitive).toBe(true); + expect(res.uiHints["channels.matrix.streaming.progress.label"]?.label).toBe( + "Matrix Progress Label", + ); + expect(res.uiHints["channels.discord.streaming.progress.toolProgress"]?.label).toBe( + "Discord Progress Tool Lines", + ); }); it("omits a single oversized plugin schema from the full schema response", () => {