mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-06 23:01:08 +00:00
106 lines
2.1 KiB
TypeScript
106 lines
2.1 KiB
TypeScript
export type PluginSdkDocCategory =
|
|
| "channel"
|
|
| "core"
|
|
| "legacy"
|
|
| "provider"
|
|
| "runtime"
|
|
| "utilities";
|
|
|
|
export type PluginSdkDocMetadata = {
|
|
category: PluginSdkDocCategory;
|
|
};
|
|
|
|
export const pluginSdkDocMetadata = {
|
|
index: {
|
|
category: "legacy",
|
|
},
|
|
"channel-runtime": {
|
|
category: "legacy",
|
|
},
|
|
core: {
|
|
category: "core",
|
|
},
|
|
"approval-runtime": {
|
|
category: "runtime",
|
|
},
|
|
"approval-auth-runtime": {
|
|
category: "runtime",
|
|
},
|
|
"approval-client-runtime": {
|
|
category: "runtime",
|
|
},
|
|
"approval-delivery-runtime": {
|
|
category: "runtime",
|
|
},
|
|
"approval-native-runtime": {
|
|
category: "runtime",
|
|
},
|
|
"approval-reply-runtime": {
|
|
category: "runtime",
|
|
},
|
|
"plugin-entry": {
|
|
category: "core",
|
|
},
|
|
"channel-actions": {
|
|
category: "channel",
|
|
},
|
|
"channel-config-schema": {
|
|
category: "channel",
|
|
},
|
|
"channel-contract": {
|
|
category: "channel",
|
|
},
|
|
"channel-pairing": {
|
|
category: "channel",
|
|
},
|
|
"channel-reply-pipeline": {
|
|
category: "channel",
|
|
},
|
|
"channel-setup": {
|
|
category: "channel",
|
|
},
|
|
"command-auth": {
|
|
category: "channel",
|
|
},
|
|
"secret-input": {
|
|
category: "channel",
|
|
},
|
|
"webhook-ingress": {
|
|
category: "channel",
|
|
},
|
|
"provider-onboard": {
|
|
category: "provider",
|
|
},
|
|
"runtime-store": {
|
|
category: "runtime",
|
|
},
|
|
"allow-from": {
|
|
category: "utilities",
|
|
},
|
|
"reply-payload": {
|
|
category: "utilities",
|
|
},
|
|
testing: {
|
|
category: "utilities",
|
|
},
|
|
} as const satisfies Record<string, PluginSdkDocMetadata>;
|
|
|
|
export type PluginSdkDocEntrypoint = keyof typeof pluginSdkDocMetadata;
|
|
|
|
export const pluginSdkDocCategories = [
|
|
"core",
|
|
"channel",
|
|
"provider",
|
|
"runtime",
|
|
"utilities",
|
|
"legacy",
|
|
] as const satisfies readonly PluginSdkDocCategory[];
|
|
|
|
export const pluginSdkDocEntrypoints = Object.keys(
|
|
pluginSdkDocMetadata,
|
|
) as PluginSdkDocEntrypoint[];
|
|
|
|
export function resolvePluginSdkDocImportSpecifier(entrypoint: PluginSdkDocEntrypoint): string {
|
|
return entrypoint === "index" ? "openclaw/plugin-sdk" : `openclaw/plugin-sdk/${entrypoint}`;
|
|
}
|