feat: implement Spec method for tools and update tool resolution logic in the registry

This commit is contained in:
mlogclub
2026-04-14 09:56:37 +08:00
parent e42b2b0f4d
commit 200631cc0b
9 changed files with 53 additions and 2 deletions
@@ -17,6 +17,15 @@ type stubTool struct {
code string
}
func (t stubTool) Spec() toolx.ToolSpec {
return toolx.ToolSpec{
Code: t.code,
Name: t.name,
ServerCode: toolx.GraphCreateTicketConfirm.ServerCode,
SourceType: toolx.GraphCreateTicketConfirm.SourceType,
}
}
func (t stubTool) Name() string { return t.name }
func (t stubTool) Code() string { return t.code }
func (t stubTool) Enabled(registry.Context) bool {