Skip to content

Commit

Permalink
🐛 fix: 修正 sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Aug 24, 2023
1 parent 9469db8 commit f5bec3b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
24 changes: 12 additions & 12 deletions src/manifest.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { z } from 'zod';

export const pluginManifestSchema = z.object({
export const pluginApiSchema = z.object({
description: z.string(),
name: z.string(),
schema: z.object({
description: z.string(),
name: z.string(),

parameters: z.object({
properties: z.object({}),
type: z.enum(['object']),
}),
parameters: z.object({
properties: z.object({}),
type: z.enum(['object']),
}),
url: z.string().url(),
});

export const pluginManifestSchema = z.object({
api: z.array(pluginApiSchema),
identifier: z.string(),
openapi: z.string().optional(),

server: z.object({
url: z.string(),
}),
ui: z
.object({
url: z.string().optional(),
Expand Down
5 changes: 3 additions & 2 deletions src/market.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { z } from 'zod';

export const pluginMetaSchema = z.object({
author: z.string(),
createAt: z.string(),
homepage: z.string(),
identifier: z.string(),
manifest: z.string(),
meta: z.object({
avatar: z.string().optional(),
tags: z.array(z.string()).optional(),
}),
name: z.string(),
schemaVersion: z.enum(['v1']),
schemaVersion: z.number(),
});

export const marketIndexSchema = z.object({
Expand Down
1 change: 1 addition & 0 deletions src/types/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export interface LobeChatPluginManifest {
* @descCN 插件的名称,需要和提交到 LobeChat Plugins 仓库的插件名称一致
*/
identifier: string;
openapi?: string;
/**
* plugin ui on user side
* @desc The type of rendering for the plugin
Expand Down

0 comments on commit f5bec3b

Please sign in to comment.