refactor: trim zalouser helper exports

This commit is contained in:
Peter Steinberger
2026-05-01 19:12:58 +01:00
parent f8ffc3ec4f
commit c25fb9a6e8
8 changed files with 9 additions and 11 deletions

View File

@@ -217,5 +217,3 @@ export const zalouserPlugin: ChannelPlugin<ResolvedZalouserAccount, ZalouserProb
},
outbound: zalouserOutboundAdapter,
});
export type { ResolvedZalouserAccount };

View File

@@ -9,7 +9,7 @@ function asObjectRecord(value: unknown): Record<string, unknown> | null {
: null;
}
export const collectZalouserMutableAllowlistWarnings =
const collectZalouserMutableAllowlistWarnings =
createDangerousNameMatchingMutableAllowlistWarningCollector({
channel: "zalouser",
detector: isZalouserMutableGroupEntry,

View File

@@ -10,8 +10,8 @@ import {
} from "./zalo-js.js";
import { TextStyle } from "./zca-constants.js";
export type ZalouserSendOptions = ZaloSendOptions;
export type ZalouserSendResult = ZaloSendResult;
type ZalouserSendOptions = ZaloSendOptions;
type ZalouserSendResult = ZaloSendResult;
const ZALO_TEXT_LIMIT = 2000;
const DEFAULT_TEXT_CHUNK_MODE = "length";

View File

@@ -7,7 +7,7 @@ import {
normalizeOptionalLowercaseString,
} from "openclaw/plugin-sdk/text-runtime";
export function stripZalouserTargetPrefix(raw: string): string {
function stripZalouserTargetPrefix(raw: string): string {
return raw
.trim()
.replace(/^(zalouser|zlu):/i, "")

View File

@@ -15,7 +15,7 @@ import { buildChannelConfigSchema, formatAllowFromLowercase } from "./channel-ap
import { ZalouserConfigSchema } from "./config-schema.js";
import { zalouserDoctor } from "./doctor.js";
export const zalouserMeta = {
const zalouserMeta: ChannelPlugin<ResolvedZalouserAccount>["meta"] = {
id: "zalouser",
label: "Zalo Personal",
selectionLabel: "Zalo (Personal Account)",
@@ -25,7 +25,7 @@ export const zalouserMeta = {
aliases: ["zlu"],
order: 85,
quickstartAllowFrom: false,
} satisfies ChannelPlugin<ResolvedZalouserAccount>["meta"];
};
const zalouserConfigAdapter = createScopedChannelConfigAdapter<ResolvedZalouserAccount>({
sectionKey: "zalouser",

View File

@@ -28,7 +28,7 @@ function stringEnum<T extends readonly string[]>(
});
}
export const ZalouserToolSchema = Type.Object(
const ZalouserToolSchema = Type.Object(
{
action: stringEnum(ACTIONS, { description: `Action to perform: ${ACTIONS.join(", ")}` }),
threadId: Type.Optional(Type.String({ description: "Thread ID for messaging" })),

View File

@@ -85,7 +85,7 @@ export type ZaloAuthStatus = {
message: string;
};
export type ZalouserToolConfig = { allow?: string[]; deny?: string[] };
type ZalouserToolConfig = { allow?: string[]; deny?: string[] };
export type ZalouserGroupConfig = {
enabled?: boolean;

View File

@@ -1025,7 +1025,7 @@ function toInboundMessage(message: Message, ownUserId?: string): ZaloInboundMess
};
}
export function zalouserSessionExists(profileInput?: string | null): boolean {
function zalouserSessionExists(profileInput?: string | null): boolean {
const profile = normalizeProfile(profileInput);
return readCredentials(profile) !== null;
}