fix(config): validate slack stream mode schema

This commit is contained in:
Peter Steinberger
2026-02-17 03:14:24 +01:00
parent bb8df6ab8d
commit 80883cd316
3 changed files with 14 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ Docs: https://docs.openclaw.ai
- Scripts/UI/Windows: fix `pnpm ui:*` spawn `EINVAL` failures by restoring shell-backed launch for `.cmd`/`.bat` runners, narrowing shell usage to launcher types that require it, and rejecting unsafe forwarded shell metacharacters in UI script args. (#18594)
- Hooks/Session-memory: recover `/new` conversation summaries when session pointers are reset-path or missing `sessionFile`, and consistently prefer the newest `.jsonl.reset.*` transcript candidate for fallback extraction. (#18088)
- Slack: restrict forwarded-attachment ingestion to explicit shared-message attachments and skip non-Slack forwarded `image_url` fetches, preventing non-forward attachment unfurls from polluting inbound agent context while preserving forwarded message handling.
- Slack: validate `channels.slack.streamMode` for the new Slack streaming mode options (`replace|status_final|append`) in provider schema and default to `replace`.
- Agents/Sessions: align session lock watchdog hold windows with run and compaction timeout budgets (plus grace), preventing valid long-running turns from being force-unlocked mid-run while still recovering hung lock owners. (#18060)
- Cron/Heartbeat: canonicalize session-scoped reminder `sessionKey` routing and preserve explicit flat `sessionKey` cron tool inputs, preventing enqueue/wake namespace drift for session-targeted reminders. (#18637) Thanks @vignesh07.
- OpenClawKit/iOS ChatUI: accept canonical session-key completion events for local pending runs and preserve message IDs across history refreshes, preventing stuck "thinking" state and message flicker after gateway replies. (#18165) Thanks @mbelinky.

View File

@@ -36,4 +36,16 @@ describe("config schema regressions", () => {
expect(res.ok).toBe(true);
});
it("accepts channels.slack.streamMode", () => {
const res = validateConfigObject({
channels: {
slack: {
streamMode: "append",
},
},
});
expect(res.ok).toBe(true);
});
});

View File

@@ -460,7 +460,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
@@ -578,6 +577,7 @@ export const SlackAccountSchema = z
// inheritance in multi-account setups (shallow merge works; nested dm object doesn't).
dmPolicy: DmPolicySchema.optional(),
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
streamMode: z.enum(["replace", "status_final", "append"]).optional().default("replace"),
dm: SlackDmSchema.optional(),
channels: z.record(z.string(), SlackChannelSchema.optional()).optional(),
heartbeat: ChannelHeartbeatVisibilitySchema,