fix: add plugin id conflict checker (#78)

This commit is contained in:
junwen-lee
2025-07-28 14:07:03 +08:00
committed by GitHub
parent f0c339d231
commit 376e563e4f
5 changed files with 127 additions and 12 deletions

View File

@@ -38,6 +38,8 @@ const (
ErrPluginToolsCheckFailed = 109000011
ErrPluginParseToolRespFailed = 109000012
ErrPluginOAuthFailed = 109000013
ErrPluginIDExist = 109000014
ErrToolIDExist = 109000015
)
const (
@@ -45,6 +47,17 @@ const (
)
func init() {
code.Register(
ErrPluginIDExist,
"Plugin ID already exists : {plugin_id}",
code.WithAffectStability(false),
)
code.Register(
ErrToolIDExist,
"Tool ID already exists : {tool_id}",
code.WithAffectStability(false),
)
code.Register(
ErrPluginPermissionCode,
fmt.Sprintf("unauthorized access : {%s}", PluginMsgKey),