feat: harden growth report orchestration

This commit is contained in:
2026-08-21 00:43:33 +03:30
parent dd0ae15a95
commit d00700ffb8
5 changed files with 54 additions and 14 deletions

View File

@@ -276,7 +276,13 @@ func growthTools() []map[string]any {
names := []string{"get_growth_context", "get_event_evidence", "get_peer_context", "get_campaign_playbook"}
tools := make([]map[string]any, 0, len(names))
for _, name := range names {
tools = append(tools, map[string]any{"type": "function", "name": name, "description": "Return approved sanitized deterministic evidence for this authenticated report scope.", "strict": true, "parameters": map[string]any{"type": "object", "properties": map[string]any{"evidenceId": map[string]any{"type": "string"}}, "required": []string{"evidenceId"}, "additionalProperties": false}})
properties := map[string]any{}
required := []string{}
if name == "get_event_evidence" || name == "get_campaign_playbook" {
properties["evidenceId"] = map[string]any{"type": "string", "minLength": 1, "maxLength": 128}
required = []string{"evidenceId"}
}
tools = append(tools, map[string]any{"type": "function", "name": name, "description": "Return approved sanitized deterministic evidence for this authenticated report scope.", "strict": true, "parameters": map[string]any{"type": "object", "properties": properties, "required": required, "additionalProperties": false}})
}
return tools
}