import {
BlockStreamingCoalesceSchema,
DmPolicySchema,
GroupPolicySchema,
MarkdownConfigSchema,
requireOpenAllowFrom,
} from "openclaw/plugin-sdk/channel-config-primitives"; import { z } from "openclaw/plugin-sdk/zod"; import { buildSecretInputSchema } from "./secret-input.js";
const MattermostGroupSchema = z
.object({ /** Whether mentions are required to trigger the bot in this group. */
requireMention: z.boolean().optional(),
})
.strict();
const DmChannelRetrySchema = z
.object({ /** Maximum number of retry attempts for DM channel creation (default: 3) */
maxRetries: z.number().int().min(0).max(10).optional(), /** Initial delay in milliseconds before first retry (default: 1000) */
initialDelayMs: z.number().int().min(100).max(60000).optional(), /** Maximum delay in milliseconds between retries (default: 10000) */
maxDelayMs: z.number().int().min(1000).max(60000).optional(), /** Timeout for each individual DM channel creation request in milliseconds (default: 30000) */
timeoutMs: z.number().int().min(5000).max(120000).optional(),
})
.strict()
.refine(
(data) => { if (data.initialDelayMs !== undefined && data.maxDelayMs !== undefined) { return data.initialDelayMs <= data.maxDelayMs;
} returntrue;
},
{
message: "initialDelayMs must be less than or equal to maxDelayMs",
path: ["initialDelayMs"],
},
)
.optional();
const MattermostSlashCommandsSchema = z
.object({ /** Enable native slash commands. "auto" resolves to false (opt-in). */ native: z.union([z.boolean(), z.literal("auto")]).optional(), /** Also register skill-based commands. */
nativeSkills: z.union([z.boolean(), z.literal("auto")]).optional(), /** Path for the callback endpoint on the gateway HTTP server. */
callbackPath: z.string().optional(), /** Explicit callback URL (e.g. behind reverse proxy). */
callbackUrl: z.string().optional(),
})
.strict()
.optional();
const MattermostNetworkSchema = z
.object({ /** Dangerous opt-in for self-hosted Mattermost on trusted private/internal hosts. */
dangerouslyAllowPrivateNetwork: z.boolean().optional(),
})
.strict()
.optional();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.