You've already forked agentic-coding-workflow
完善 MCP 工具
This commit is contained in:
@@ -219,11 +219,15 @@ type SSEEvent struct {
|
||||
}
|
||||
|
||||
// TemplateService — prompt_templates CRUD。
|
||||
//
|
||||
// 鉴权语义:user 模板仅 owner 可改/删;system 模板仅 admin 可改/删
|
||||
// (isAdmin 由调用方解析后传入;Create 的 system-scope admin 校验
|
||||
// 仍在 HTTP handler / MCP 工具层,与既有行为一致)。
|
||||
type TemplateService interface {
|
||||
List(ctx context.Context, userID uuid.UUID) ([]PromptTemplate, error)
|
||||
Create(ctx context.Context, userID uuid.UUID, name, content string, scope TemplateScope) (*PromptTemplate, error)
|
||||
Update(ctx context.Context, userID, id uuid.UUID, name, content string) error
|
||||
Delete(ctx context.Context, userID, id uuid.UUID) error
|
||||
Update(ctx context.Context, userID uuid.UUID, isAdmin bool, id uuid.UUID, name, content string) error
|
||||
Delete(ctx context.Context, userID uuid.UUID, isAdmin bool, id uuid.UUID) error
|
||||
}
|
||||
|
||||
// EndpointService — admin LLM endpoints / models CRUD(管理员守卫上层处理)。
|
||||
|
||||
Reference in New Issue
Block a user