fix(brain): pass type and domain fields to ingestion write endpoint
The write handler was building a hand-rolled map that dropped the type and domain fields from writeArgs. Pass the struct directly so all fields reach the ingestion server. Strengthen the test to assert the request body contains the type field. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -56,10 +56,7 @@ func (s *Skill) write(ctx context.Context, args json.RawMessage) (json.RawMessag
|
||||
if a.Content == "" {
|
||||
return nil, fmt.Errorf("content is required")
|
||||
}
|
||||
return s.post(ctx, "/write", map[string]string{
|
||||
"content": a.Content,
|
||||
"filename": a.Filename,
|
||||
})
|
||||
return s.post(ctx, "/write", a)
|
||||
}
|
||||
|
||||
func (s *Skill) post(ctx context.Context, path string, body any) (json.RawMessage, error) {
|
||||
|
||||
Reference in New Issue
Block a user