Compare commits

..
Author SHA1 Message Date
9e12c6cac8
Align schemaExtra input fields with actual request structs
Some checks failed
Test Every Endpoint on Base Sepolia / test_endpoints (push) Failing after 4m3s
CI/CD Go Verification / build_and_test (push) Successful in 1m13s
- Changed 'actor' to 'author' in schemaExtra input BodyFields for:
  - getPost
  - getLatestPosts
  - getPostsInTime
  - getStyleProfile
  - findSimilarUsers
- These now match the actual request struct field names (Author)
- Output BodyFields remain unchanged (still use 'actor' for response)
2026-09-05 02:09:00 +00:00
79e2a2348c
Fix getPost test client field name: actor -> author
- testClient/main.go:139: Changed JSON field from 'actor' to 'author' to match GetPostRequest schema
- The handler expects 'author' field, test client was sending 'actor' causing validation error
2026-09-05 01:59:29 +00:00
2 changed files with 16 additions and 16 deletions

View file

@ -51,12 +51,12 @@ func (s *Server) registerTools() {
Input: GetPostRequest{}, Output: GetPostResponsePost{}, Handler: s.getPost, Price: "0.01",
Extra: schemaExtra(
map[string]any{
"actor": Bodyfield{Type: "string", Description: "Did or handle of an actor", Required: true},
"author": Bodyfield{Type: "string", Description: "Did or handle of an author", Required: true},
"rkey": Bodyfield{Type: "string", Description: "Record key of the post", Required: true},
"collection": Bodyfield{Type: "string", Description: "Collection the post belongs to (Bluesky only). Defaults to 'app.bsky.feed.post'", Required: false},
},
map[string]any{
"actor": Bodyfield{Type: "string", Description: "Did of the actor"},
"author": Bodyfield{Type: "string", Description: "Did of the author"},
"post": Bodyfield{Type: "object", Description: "The post object. Includes the post content 'content', like 'likes', quote 'quotes', replies 'replies' and repost 'reposts' count"},
},
),
@ -66,11 +66,11 @@ func (s *Server) registerTools() {
Input: GetLatestPostsRequest{}, Output: GetLatestPostsResponse{}, Handler: s.getLatestPosts, Price: "0.10",
Extra: schemaExtra(
map[string]any{
"actor": Bodyfield{Type: "string", Description: "Did or handle of an actor", Required: true},
"author": Bodyfield{Type: "string", Description: "Did or handle of an author", Required: true},
"n": Bodyfield{Type: "integer", Description: "Number of posts to retrieve, maximum 50", Required: true},
},
map[string]any{
"actor": Bodyfield{Type: "string", Description: "Did of an actor"},
"author": Bodyfield{Type: "string", Description: "Did of an actor"},
"posts": Bodyfield{Type: "array", Description: "Array of post objects. Each includes the post content 'content', like 'likes', quote 'quotes', replies 'replies' and repost 'reposts' count"},
},
),
@ -80,13 +80,13 @@ func (s *Server) registerTools() {
Input: GetPostsInTimeRequest{}, Output: GetPostsInTimeResponse{}, Handler: s.getPostsInTime, Price: "0.10",
Extra: schemaExtra(
map[string]any{
"actor": Bodyfield{Type: "string", Description: "Did or handle of an actor", Required: true},
"author": Bodyfield{Type: "string", Description: "Did or handle of an author", Required: true},
"start": Bodyfield{Type: "string", Description: "Start time in RFC3339 format", Required: true},
"end": Bodyfield{Type: "string", Description: "End time in RFC3339 format", Required: true},
"n": Bodyfield{Type: "integer", Description: "Maximum number of posts to retrieve, maximum 50", Required: true},
},
map[string]any{
"actor": Bodyfield{Type: "string", Description: "Did of an actor"},
"author": Bodyfield{Type: "string", Description: "Did of an actor"},
"posts": Bodyfield{Type: "array", Description: "Array of post objects. Each includes the post content 'content', like 'likes', quote 'quotes', replies 'replies' and repost 'reposts' count"},
},
),
@ -96,7 +96,7 @@ func (s *Server) registerTools() {
Input: GetStyleProfileRequest{}, Output: GetStyleProfileResponse{}, Handler: s.getStyleProfile, Price: "0.36",
Extra: schemaExtra(
map[string]any{
"actor": Bodyfield{Type: "string", Description: "Did or handle of an actor", Required: true},
"author": Bodyfield{Type: "string", Description: "Did or handle of an author", Required: true},
},
map[string]any{
"PersonaEmbedding": Bodyfield{Type: "array", Description: "Embedding vector representing the actor's persona"},
@ -111,7 +111,7 @@ func (s *Server) registerTools() {
Input: FindSimilarUsersRequest{}, Output: FindSimilarUsersResponse{}, Handler: s.getSimilarProfiles, Price: "0.05",
Extra: schemaExtra(
map[string]any{
"actor": Bodyfield{Type: "string", Description: "Did or handle of an author", Required: true},
"author": Bodyfield{Type: "string", Description: "Did or handle of an author", Required: true},
},
map[string]any{
"matches": Bodyfield{Type: "array", Description: "Ranked list of similar profiles (author, platform, similarity, top keywords, style summary, post count)"},

View file

@ -136,7 +136,7 @@ func main() {
{"getFeed", "POST", "getFeed", `{"uri": "https://bsky.app/profile/did:plc:z72i7hdynmk6r22z27h6tvur/feed/whats-hot"}`},
{"getActor", "POST", "getActor", `{"author": "did:plc:z72i7hdynmk6r22z27h6tvur"}`},
{"searchActors", "POST", "searchActors", `{"query": "test", "limit": 5}`},
{"getPost", "POST", "getPost", `{"actor":"sharkgamiart.bsky.social","rkey":"3m47y27c67c2b"}`},
{"getPost", "POST", "getPost", `{"author":"sharkgamiart.bsky.social","rkey":"3m47y27c67c2b"}`},
{"getLatestPosts", "POST", "getLatestPosts", `{"author":"sharkgamiart.bsky.social","limit": 5}`},
{"getPostsInTime", "POST", "getPostsInTime", `{"author":"sharkgamiart.bsky.social","startTime": "2024-01-01T00:00:00Z","endTime": "2024-12-31T23:59:59Z","limit": 5}`},
{"getStyleProfile", "POST", "getStyleProfile", `{"author":"did:plc:z72i7hdynmk6r22z27h6tvur"}`},