Validate providers and retain complete run debugging context

This commit is contained in:
2026-10-09 23:21:01 +01:00
parent f3d829bea5
commit 08b8647d5b
51 changed files with 1036 additions and 159 deletions
+3 -3
View File
@@ -96,7 +96,7 @@ func (c *Connection) Call(ctx context.Context, method, path string, body any) ([
}
created, err := c.Native(ctx, "post", "/session", payload)
if err != nil {
return nil, err
return created, err
}
var session struct {
ID string `json:"id"`
@@ -163,7 +163,7 @@ func (c *Connection) Call(ctx context.Context, method, path string, body any) ([
}
response, err := c.Native(ctx, "post", "/session/"+id+"/message", payload)
if err != nil {
return nil, err
return response, err
}
c.responses[id] = response
if parts[1] == "prompt" {
@@ -171,7 +171,7 @@ func (c *Connection) Call(ctx context.Context, method, path string, body any) ([
}
result, err := messageText(response)
if err != nil {
return nil, err
return response, err
}
return json.Marshal(map[string]any{"data": map[string]string{"text": result}})
case "wait":