-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopenclaw-plugin-sdk.d.ts
More file actions
64 lines (59 loc) · 2.19 KB
/
openclaw-plugin-sdk.d.ts
File metadata and controls
64 lines (59 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
declare module "openclaw/plugin-sdk" {
export type OpenClawPluginApi = any;
export type OpenClawConfig = any;
export type PluginRuntime = any;
export type ChannelPlugin<T = any> = any;
export type ChannelAccountSnapshot = any;
export type ChannelConfigSchema = any;
export type DmPolicy = "pairing" | "allowlist" | "open" | "disabled";
export type WizardPrompter = {
note(message: string, title?: string): Promise<void>;
text(opts: {
message: string;
placeholder?: string;
initialValue?: string;
validate?: (value: string | undefined) => string | undefined;
}): Promise<string>;
confirm(opts: { message: string; initialValue?: boolean }): Promise<boolean>;
select<T = string>(opts: {
message: string;
options: Array<{ value: T; label: string }>;
initialValue?: T;
}): Promise<T>;
};
export type ChannelOnboardingDmPolicy = {
label: string;
channel: string;
policyKey: string;
allowFromKey: string;
getCurrent: (cfg: any) => DmPolicy;
setPolicy: (cfg: any, policy: DmPolicy) => any;
promptAllowFrom: (params: { cfg: any; prompter: WizardPrompter }) => Promise<any>;
};
export type ChannelOnboardingAdapter = {
channel: string;
getStatus: (params: { cfg: any; runtime?: any }) => Promise<{
channel: string;
configured: boolean;
statusLines: string[];
selectionHint?: string;
quickstartScore?: number;
}>;
configure: (params: {
cfg: any;
prompter: WizardPrompter;
runtime?: any;
forceAllowFrom?: boolean;
}) => Promise<{ cfg: any; accountId: string }>;
dmPolicy?: ChannelOnboardingDmPolicy;
disable: (cfg: any) => any;
};
export function emptyPluginConfigSchema(): any;
export const DEFAULT_ACCOUNT_ID: string;
export function normalizeAccountId(id: string | null | undefined): string;
export function deleteAccountFromConfigSection(...args: any[]): void;
export function formatPairingApproveHint(...args: any[]): string;
export function setAccountEnabledInConfigSection(...args: any[]): void;
export function addWildcardAllowFrom(allowFrom?: any): any;
export function formatDocsLink(path: string, label: string): string;
}