mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-26 16:06:16 +00:00
Docs: prototype generated plugin SDK reference (#51877)
* Chore: unblock synced main checks * Docs: add plugin SDK docs implementation plan * Docs: scaffold plugin SDK reference phase 1 * Docs: mark plugin SDK reference surfaces unstable * Docs: prototype generated plugin SDK reference * docs(plugin-sdk): replace generated reference with api baseline * docs(plugin-sdk): drop generated reference plan * docs(plugin-sdk): align api baseline flow with config docs --------- Co-authored-by: Onur <2453968+osolmaz@users.noreply.github.com> Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
This commit is contained in:
87
scripts/lib/plugin-sdk-doc-metadata.ts
Normal file
87
scripts/lib/plugin-sdk-doc-metadata.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
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",
|
||||
},
|
||||
"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}`;
|
||||
}
|
||||
Reference in New Issue
Block a user