* Introduce project_personas table with foreign keys to projects and agent_personas * Add project_skills table with foreign key to projects and agent_skills * Include override boolean field in agent_persona_skills and project_skills * Update schema and migration files to reflect new tables and fields * Enhance CORS handling to reflect request origin
This commit is contained in:
@@ -259,8 +259,9 @@ func (t *SkillsTool) GetGuardrail(ctx context.Context, _ *mcp.CallToolRequest, i
|
||||
// add_project_skill
|
||||
|
||||
type AddProjectSkillInput struct {
|
||||
Project string `json:"project,omitempty" jsonschema:"project name or id (uses active project if omitted)"`
|
||||
SkillID int64 `json:"skill_id" jsonschema:"skill id to link"`
|
||||
Project string `json:"project,omitempty" jsonschema:"project name or id (uses active project if omitted)"`
|
||||
SkillID int64 `json:"skill_id" jsonschema:"skill id to link"`
|
||||
Override bool `json:"override,omitempty" jsonschema:"replace a lower-precedence skill with the same name during world-model assembly"`
|
||||
}
|
||||
|
||||
type AddProjectSkillOutput struct {
|
||||
@@ -273,7 +274,7 @@ func (t *SkillsTool) AddProjectSkill(ctx context.Context, req *mcp.CallToolReque
|
||||
if err != nil {
|
||||
return nil, AddProjectSkillOutput{}, err
|
||||
}
|
||||
if err := t.store.AddProjectSkill(ctx, project.NumericID, in.SkillID); err != nil {
|
||||
if err := t.store.AddProjectSkill(ctx, project.NumericID, in.SkillID, in.Override); err != nil {
|
||||
return nil, AddProjectSkillOutput{}, err
|
||||
}
|
||||
return nil, AddProjectSkillOutput{ProjectID: project.NumericID, SkillID: in.SkillID}, nil
|
||||
|
||||
Reference in New Issue
Block a user