yt-briefing 0.13.0 → 0.13.1
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 +1 -1
- package/dist/yt-channel-pending.js +13 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -150,7 +150,7 @@ YT_BRIEFING_LLM_MODEL=gemini-2.5-flash
|
|
|
150
150
|
|
|
151
151
|
Want something else? Change those three lines for OpenRouter (`https://openrouter.ai/api/v1`),
|
|
152
152
|
OpenAI (`https://api.openai.com/v1`), Anthropic (`https://api.anthropic.com/v1/`,
|
|
153
|
-
e.g. `claude-sonnet-
|
|
153
|
+
e.g. `claude-sonnet-5`), or a local Ollama (`http://localhost:11434/v1`). Set
|
|
154
154
|
`YT_BRIEFING_LLM_BASE_URL`, `_API_KEY`, and `_MODEL` in your root `.env` (see [Setup](#setup)).
|
|
155
155
|
|
|
156
156
|
## Why an API, not the agent's native model
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Usage: bun src/yt-channel-pending.ts @HANDLE
|
|
4
4
|
*
|
|
5
|
-
* For one channel: reads state.md pointers
|
|
6
|
-
*
|
|
5
|
+
* For one channel: reads state.md pointers, fetches the channel's videos in-process via
|
|
6
|
+
* lib/yt-api.ts (--since a fixed lookback, NOT state.md's `updated` — that column is a
|
|
7
|
+
* write-timestamp, not the pointer video's publish date; using it as the fetch cutoff
|
|
8
|
+
* silently orphaned backlog videos on channels swept more than once per day, see
|
|
9
|
+
* CHANGELOG),
|
|
7
10
|
* filters to videos NEWER than each type's pointer (or baseline if pointer null),
|
|
8
11
|
* sorts ASC by publishedAt (process oldest first → state pointer advances monotonically),
|
|
9
12
|
* outputs JSON array: [{videoId, title, publishedAt, type, is_baseline}].
|
|
@@ -28,7 +31,14 @@ if (!row) {
|
|
|
28
31
|
console.error(`Channel ${handle} not found in state.md`);
|
|
29
32
|
process.exit(1);
|
|
30
33
|
}
|
|
31
|
-
|
|
34
|
+
// `row.updated` is when state.md was last WRITTEN (stamped to today on every bump),
|
|
35
|
+
// not when the pointer video was PUBLISHED — reusing it as the fetch cutoff shrinks the
|
|
36
|
+
// window to "today" after the first bump of the day, so a second same-day sweep can
|
|
37
|
+
// silently drop any not-yet-processed backlog between the pointer and today. A fixed
|
|
38
|
+
// lookback avoids that: the pointer-cutoff logic below still does the real filtering,
|
|
39
|
+
// this just has to be wide enough to always re-include the pointer video itself.
|
|
40
|
+
const LOOKBACK_DAYS = 45;
|
|
41
|
+
const since = new Date(Date.now() - LOOKBACK_DAYS * 24 * 60 * 60 * 1000).toISOString().slice(0, 10);
|
|
32
42
|
let videos;
|
|
33
43
|
try {
|
|
34
44
|
videos = await fetchChannelVideos(handle, { since });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yt-briefing",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "A self-learning YouTube briefing engine: it sweeps the channels you follow, filters noise in two stages (title, then transcript), summarizes the rest in your language, and adapts to your ratings — one video at a time.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|