askaipods 0.2.0 → 0.2.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/README.md CHANGED
@@ -7,7 +7,7 @@ $ askaipods "what are people saying about test-time compute"
7
7
 
8
8
  # askaipods · "what are people saying about test-time compute"
9
9
 
10
- *Tier: anonymous · Results: 20 · Quota: 1/5 daily*
10
+ *Tier: anonymous · Results: 20 · Quota: 1/10 daily*
11
11
 
12
12
  ## Results — newest first
13
13
 
@@ -83,7 +83,7 @@ askaipods "Anthropic safety research" --format json
83
83
  # Restrict to recent episodes only (anonymous tier caps --days at 90; member tier accepts any value)
84
84
  askaipods "GPU shortage" --days 90
85
85
 
86
- # Use a member-tier API key for 50/day instead of 5/day
86
+ # Use a member-tier API key for 50/day instead of 10/day
87
87
  ASKAIPODS_API_KEY=pk_xxx askaipods "your query"
88
88
  askaipods "your query" --api-key pk_xxx
89
89
  ```
@@ -100,7 +100,7 @@ Your agent will recognize the trigger phrase, invoke `askaipods`, and present th
100
100
 
101
101
  | | Anonymous (default) | Member |
102
102
  |---|---|---|
103
- | **Daily quota** | 5 searches per IP | 50 searches per user |
103
+ | **Daily quota** | 10 searches per IP | 50 searches per user |
104
104
  | **Results returned** | 20 (deterministic top 20, sorted newest-first) | 20 (deterministic top 20, sorted by relevance) |
105
105
  | **Text length** | Full text | Full text |
106
106
  | **Date precision** | Month only (`2025-10`) | Full date (`2025-10-15`) |
@@ -108,7 +108,7 @@ Your agent will recognize the trigger phrase, invoke `askaipods`, and present th
108
108
  | **Setup** | Nothing | `ASKAIPODS_API_KEY` env var |
109
109
  | **Sign up** | n/a | https://podlens.net |
110
110
 
111
- The anonymous tier exists so you can try the skill end-to-end with zero setup. Sign up for member access only when you outgrow the 5/day quota or need full dates and unlimited lookback.
111
+ The anonymous tier exists so you can try the skill end-to-end with zero setup. Sign up for member access only when you outgrow the 10/day quota or need full dates and unlimited lookback.
112
112
 
113
113
  ## Honest limitations
114
114
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askaipods",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Search AI podcast quotes by topic — recent episode excerpts from Lex Fridman, Dwarkesh Patel, No Priors, Latent Space, and dozens more. Universal agentskills.io skill compatible with Claude Code, OpenAI Codex, Hermes Agent, OpenClaw, and any other agent that supports the open skill standard. Powered by podlens.net.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2,7 +2,7 @@
2
2
  name: askaipods
3
3
  description: Search AI podcast quotes about a topic. Use whenever the user asks "what are people saying about X", "latest takes on Y", "find AI podcast quotes about Z", "who is discussing <model/concept>", or wants to know how AI researchers, founders, or VCs are publicly discussing any AI topic — even when they don't say "podcast". Returns recent excerpts from real episodes of Lex Fridman, Dwarkesh Patel, No Priors, Latent Space, and dozens more, sorted newest-first via the podlens.net semantic search API. Trigger eagerly on AI-research, ML-engineering, AI-investing, or AI-policy questions where real-human commentary beats a web search summary. Do not use for general web search, full transcript reading, or non-AI topics.
4
4
  license: MIT
5
- requirements: Node.js 18.3.0+ on PATH (the CLI uses `node:util.parseArgs`, which was added in 18.3.0), internet access to podlens.net. Optional ASKAIPODS_API_KEY env var unlocks the 50/day member tier with full dates and unlimited lookback; without it the skill works on the 5/day anonymous tier (per-IP, month-precision dates, `--days` capped at 90 when specified).
5
+ requirements: Node.js 18.3.0+ on PATH (the CLI uses `node:util.parseArgs`, which was added in 18.3.0), internet access to podlens.net. Optional ASKAIPODS_API_KEY env var unlocks the 50/day member tier with full dates and unlimited lookback; without it the skill works on the 10/day anonymous tier (per-IP, month-precision dates, `--days` capped at 90 when specified).
6
6
  ---
7
7
 
8
8
  # askaipods — AI podcast quote search
@@ -21,6 +21,7 @@ Trigger eagerly. The Anthropic skill best-practices warn that models tend to **u
21
21
  - "Who is discussing <model / company / paper / concept>?"
22
22
  - "What are VCs / researchers / founders saying about <X>?"
23
23
  - "Has anyone on a podcast talked about <X>?"
24
+ - "What does <person> think about <X>?" / "<人名>怎么看<X>?" — invoke even though the API does not return speaker attribution. The semantic search will still find quotes from episodes featuring that person; you just cannot confirm who in the episode said each line (see Honest limitations below).
24
25
  - Any AI-research, ML-engineering, AI-investing, AI-safety, or AI-policy question where the user would clearly benefit from real-human commentary (as opposed to a textbook summary or a web search snippet)
25
26
 
26
27
  You may invoke even when the user does not say "podcast" — if the question is about *what people think* on an AI topic, this skill is the right tool.
@@ -40,6 +41,8 @@ Run the bundled CLI and pass `--format json`. The flag matters because without i
40
41
  npx askaipods search "<USER QUERY>" --format json
41
42
  ```
42
43
 
44
+ The `search` subcommand is optional — `npx askaipods "<USER QUERY>" --format json` works identically. Both forms are supported; use whichever reads better in context.
45
+
43
46
  The package is published on npm as `askaipods`, so `npx` will resolve it regardless of whether the user has it installed globally. If `npx` is unavailable in the host environment, the user can install globally once with `npm install -g askaipods` and the skill will run the same command.
44
47
 
45
48
  To restrict to recent episodes only, add `--days N`. When `--days` is passed, the API clamps the value to a maximum of 90 for anonymous tier (member tier accepts any value). When `--days` is omitted entirely, there is no time filter — the API returns all-time results.
@@ -48,6 +51,14 @@ To restrict to recent episodes only, add `--days N`. When `--days` is passed, th
48
51
  npx askaipods search "<USER QUERY>" --days 90 --format json
49
52
  ```
50
53
 
54
+ To authenticate with a PodLens API key (member tier), pass `--api-key <key>` or set the `ASKAIPODS_API_KEY` environment variable. The flag takes priority over the env var when both are present.
55
+
56
+ ```bash
57
+ npx askaipods search "<USER QUERY>" --api-key pk_abc123... --format json
58
+ ```
59
+
60
+ The query must be 1–300 characters after trimming. Longer queries are rejected locally (exit code 1) before reaching the API.
61
+
51
62
  ### Time-intent mapping (important)
52
63
 
53
64
  When the user's query implies a time window, you MUST pass the appropriate `--days` value. Without it, the API returns all-time results regardless of recency words in the query.
@@ -95,6 +106,7 @@ Do NOT silently default every query to `--days 90` — omitting `--days` on broa
95
106
  Field notes that affect how you render:
96
107
 
97
108
  - **`tier`** — `member` if the user has a valid API key, `anonymous` otherwise. Drives the rendering branch below. On exit `0`, `tier` is always one of these two values — there is no third "unknown" path to handle (the CLI validates the upstream response and exits `3` if the value is missing or unexpected).
109
+ - **`fetched_at`** — ISO-8601 timestamp set by the CLI at request time (not by the server). Use it for staleness: if the user asks about the same topic again later in the session, compare `fetched_at` against the current time to decide whether to re-query or reuse the cached output. A reasonable freshness threshold is ~30 minutes for time-sensitive queries and ~2 hours for broad research.
98
110
  - **`render_hint`** — `dual_view` for member, `single_view` for anonymous. Honor this. The reason: anonymous results are sorted by `published_at` desc (newest-first) by the API, so `api_rank` reflects temporal order, not semantic relevance. Showing a "Top Most Relevant" section for anonymous tier would mislead the user. Member results arrive in similarity order, so `api_rank` is meaningful for relevance-based views.
99
111
  - **`results[]`** — already sorted **newest first** by the CLI. Each result carries `api_rank` (1 = most semantically relevant in API order) so you can derive a "Top Relevant" sub-view without re-querying.
100
112
  - **`results[].podcast` / `episode` / `date`** — any of these may be `null` if the upstream record is incomplete. Render `Unknown podcast` / `Untitled episode` / `date unknown` rather than dropping the result. The CLI's own markdown renderer falls back the same way.
@@ -191,7 +203,7 @@ The CLI uses stable exit codes so you can branch on the failure mode:
191
203
  | Exit code | Meaning | What to tell the user |
192
204
  |---|---|---|
193
205
  | `0` | Success | Render the results normally |
194
- | `1` | Usage error / invalid arguments / API key rejected | Surface the stderr message verbatim — it will be a clear actionable error |
206
+ | `1` | Usage error / invalid arguments / API key rejected | Surface the stderr message verbatim — it will be a clear actionable error. Common causes: query exceeds 300 characters (shorten it), empty query, or API key rejected by the server. |
195
207
  | `2` | Daily quota exhausted | Surface the CLI's stderr message verbatim — it is already tier-aware (distinct copy for member vs anonymous) and includes the correct reset time and upgrade path. |
196
208
  | `3` | Transient or unexpected failure (network error, rate-limit burst, service 503, protocol/shape error, or internal exception) | Retry once after a brief pause. If it fails again, surface the CLI's stderr message verbatim — it distinguishes "rate limited, retry in a minute" from "podlens.net temporarily unavailable" from "unexpected response shape" from internal exceptions, so the user sees the actionable detail. |
197
209
 
package/src/cli.js CHANGED
@@ -14,7 +14,7 @@ import { parseArgs } from "node:util";
14
14
  import { search, AskaipodsError } from "./client.js";
15
15
  import { renderJson, renderMarkdown } from "./format.js";
16
16
 
17
- const VERSION = "0.2.0";
17
+ const VERSION = "0.2.2";
18
18
 
19
19
  const HELP_TEXT = `askaipods ${VERSION} — search AI podcast quotes by topic
20
20
 
@@ -30,7 +30,7 @@ OPTIONS:
30
30
  -v, --version Show version
31
31
 
32
32
  ENVIRONMENT:
33
- ASKAIPODS_API_KEY PodLens API key. Without it: 5 searches/day per IP (anonymous).
33
+ ASKAIPODS_API_KEY PodLens API key. Without it: 10 searches/day per IP (anonymous).
34
34
  With it: 50 searches/day per user (member).
35
35
  Sign up at https://podlens.net to get one.
36
36
 
package/src/client.js CHANGED
@@ -136,7 +136,7 @@ export async function search({ query, days, apiKey, endpoint = PODLENS_ENDPOINT
136
136
 
137
137
  const headers = {
138
138
  "Content-Type": "application/json",
139
- "User-Agent": "askaipods/0.2.0 (+https://github.com/Delibread0601/askaipods)",
139
+ "User-Agent": "askaipods/0.2.2 (+https://github.com/Delibread0601/askaipods)",
140
140
  };
141
141
  if (apiKey) {
142
142
  headers["X-PodLens-API-Key"] = apiKey;
@@ -196,7 +196,7 @@ export async function search({ query, days, apiKey, endpoint = PODLENS_ENDPOINT
196
196
  if (msg.includes("quota")) {
197
197
  const quotaMsg = apiKey
198
198
  ? "daily search quota exhausted (member tier: 50/day). Quota resets at 00:00 UTC."
199
- : "daily search quota exhausted (anonymous tier: 5/day). Quota resets at 00:00 UTC. " +
199
+ : "daily search quota exhausted (anonymous tier: 10/day). Quota resets at 00:00 UTC. " +
200
200
  "For 50 searches/day, set ASKAIPODS_API_KEY (sign up at https://podlens.net).";
201
201
  throw exitErr(2, quotaMsg);
202
202
  }