@acedatacloud/skills 2026.726.1 → 2026.726.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acedatacloud/skills",
3
- "version": "2026.726.1",
3
+ "version": "2026.726.2",
4
4
  "description": "Agent Skills for AceDataCloud AI services — music, image, video generation, LLM chat, web search. Compatible with Claude Code, GitHub Copilot, Gemini CLI, OpenAI Codex, and 30+ AI coding agents.",
5
5
  "keywords": [
6
6
  "agent-skills",
@@ -65,10 +65,15 @@ R="${SKILL_DIR:-}/scripts/reddit.py"; [ -f "$R" ] || R=$(find /tmp -maxdepth 8 -
65
65
  [ -f "$R" ] || { echo "reddit script not found (SKILL_DIR=$SKILL_DIR)" >&2; exit 1; }
66
66
 
67
67
  python3 "$R" search --query "suno api" --time week --limit 10
68
- python3 "$R" search --query "image generation api" --subreddit SideProject --sort new
68
+ python3 "$R" search --query "image generation api" --subreddit SideProject
69
69
  python3 "$R" subreddit-info --subreddit SideProject
70
70
  ```
71
71
 
72
+ `--sort` defaults to `relevance`. **Reddit's `new` sort ignores keyword relevance**
73
+ — it returns recent posts that often do not contain the query terms at all. Use
74
+ `--sort new` only to scan a specific subreddit's recent activity, never to find
75
+ threads by keyword.
76
+
72
77
  ## Reply to a thread — GATED
73
78
 
74
79
  `--parent` accepts a fullname (`t3_…` post, `t1_…` comment) or a reddit.com
@@ -474,7 +474,7 @@ class RedditClient:
474
474
  return {"ok": True, "posted": True, "id": post.get("id"), "name": post.get("name"), "url": post_url}
475
475
 
476
476
 
477
- def search(self, *, query: str, subreddit: str = "", sort: str = "new", limit: int = 10, time_filter: str = "week") -> list[dict]:
477
+ def search(self, *, query: str, subreddit: str = "", sort: str = "relevance", limit: int = 10, time_filter: str = "month") -> list[dict]:
478
478
  suffix = ".json" if self.mode == "cookie" else ""
479
479
  path = f"/r/{subreddit}/search{suffix}" if subreddit else f"/search{suffix}"
480
480
  params = {"q": query, "sort": sort, "limit": limit, "t": time_filter, "raw_json": 1, "type": "link"}
@@ -677,8 +677,8 @@ def build_parser() -> argparse.ArgumentParser:
677
677
  search = commands.add_parser("search", help="search public posts to find threads worth replying to")
678
678
  search.add_argument("--query", "-q", required=True)
679
679
  search.add_argument("--subreddit", "-r", default="")
680
- search.add_argument("--sort", choices=["new", "relevance", "top", "comments"], default="new")
681
- search.add_argument("--time", dest="time_filter", choices=["hour", "day", "week", "month", "year", "all"], default="week")
680
+ search.add_argument("--sort", choices=["relevance", "new", "top", "comments"], default="relevance")
681
+ search.add_argument("--time", dest="time_filter", choices=["hour", "day", "week", "month", "year", "all"], default="month")
682
682
  search.add_argument("--limit", type=positive_limit, default=10)
683
683
 
684
684
  about = commands.add_parser("subreddit-info", help="read a subreddit's rules and posting requirements")
@@ -512,6 +512,20 @@ class RedditSkillTests(unittest.TestCase):
512
512
  self.assertEqual("https://www.reddit.com/r/SunoAI/comments/p1/looking/", formatted["url"])
513
513
  self.assertEqual(500, len(formatted["selftext_excerpt"]))
514
514
 
515
+ def test_search_defaults_to_relevance_because_new_ignores_keywords(self):
516
+ """Reddit's `new` sort returns recent posts that need not match the query."""
517
+ client = reddit.RedditClient("cookie", cookies=reddit.parse_cookie_jar(COOKIE_JAR))
518
+ with patch.object(client, "request", return_value={"data": {"children": []}}) as request:
519
+ client.search(query="suno api")
520
+ self.assertEqual("relevance", request.call_args.kwargs["query"]["sort"])
521
+
522
+ stream = io.StringIO()
523
+ with patch.dict(os.environ, {"REDDIT_COOKIES": COOKIE_JAR}, clear=True), patch.object(
524
+ reddit.RedditClient, "search", return_value=[]
525
+ ) as search, redirect_stdout(stream):
526
+ reddit.main(["search", "--query", "suno api"])
527
+ self.assertEqual("relevance", search.call_args.kwargs["sort"])
528
+
515
529
  def test_search_is_a_read_and_rejects_malformed_shape(self):
516
530
  client = reddit.RedditClient("cookie", cookies=reddit.parse_cookie_jar(COOKIE_JAR))
517
531
  stream = io.StringIO()