Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 0914306e21e16ade24f78657e02d85cc55c97566
parent eeba5f63da8a3f2ff10d448072635710df72ff58
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sun, 25 Oct 2026 22:17:04 -0400

Docs: COMMANDS.md regenerated (corpus grep, get x-session); OPERATING.md and the changelog say what changed

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
MCOMMANDS.md | 12++++++++++++
MOPERATING.md | 8++++++++
Meditor/CHANGELOG.md | 3+++
3 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/COMMANDS.md b/COMMANDS.md @@ -76,6 +76,7 @@ Run from the repo root (in the container: `docker compose exec editor pnpm archi | `archilyzer verify transcripts` | `--channel <slug>` | list duplicate and missing transcripts *(passthrough)* | | `archilyzer migrate channel-priority` | `[--dry-run]` | the one-shot channel-priority migration (plans/channel-priority.md, S5) *(passthrough)* | | `archilyzer storage report` | `[<slug>…] [--json]` | each channel's media (tierable), text and clip bytes and where its media is — off the reports, no drive touched; totals per place (the corpus disk's is what a move would free) | +| `archilyzer corpus grep` | `--regex <re> [--channels a,b] [--since YYYY-MM-DD] [--until YYYY-MM-DD] [--window 30] [--limit N] [--case-sensitive] [--json]` | search the LIVE corpus's transcripts off disk, no index and no editor: each held video's cues (transcript.cues.json, else its best caption track, en-orig before en, rolling repeats collapsed), dated by metadata.info.json upload\_date; prints date, channel, id, start second, title and the window's text (case-insensitive unless --case-sensitive), then the videos in range with no transcript yet; a channel whose text is unreadable is skipped and named; default every channel that is not social; TRANSCRIPTS\_DIR picks the corpus; writes nothing | | `archilyzer storage migrate-tier` | `<slug>…\|--all [--order smallest] [--include-large] [--dry-run] [--reclaim]` | bring a channel off the retired whole-directory layout onto the media tier, its text home to the corpus disk (editor stopped; --all stops before the three big-text channels) *(passthrough)* | | `archilyzer brand media` | `[--out <dir>] [--video-kit]` | render the Archilyzer Media channel's assets *(passthrough)* | | `archilyzer mcp` | `[--local <dir>\|--remote <url>\|--hub <url>]` | start the MCP server on stdio (as `pnpm --filter yt-dlp-transcript-mcp exec tsx src/index.ts`) *(passthrough)* | @@ -205,6 +206,7 @@ Usage: pnpm ops <action> [--json '<body>' | --file <path>] [--wait] pnpm ops get storage | sites | workers | auto-queue | scheduler pnpm ops get saved-alternates [<slug>] pnpm ops get services + pnpm ops get x-session [<slug>] pnpm ops get cleanup <slug> pnpm ops get remote-listing <slug> [--wait-timeout <seconds>] pnpm ops get transcript <videoId> [--slug <slug>] @@ -254,6 +256,16 @@ get services is the dashboard's cookie refresh alerts: each service (rumble, youtube, odysee, archive.today, a forum host) whose cookies look stale, or are OK again with the jobs the alert stopped; "pending" lists a first Rumble embed 403 waiting for a second video. +get x-session [<slug>] is the X login an X job would use and whether one + would start NOW, from the same check that refuses a stale-cookie X job: + source ("profile": the exported jar under transcripts/.x-session; + "browser": cookiesFromBrowser, whose age cannot be read), hasCookies, + looksAuthenticated, cookiesUpdatedAt, ageMinutes, maxAgeMinutes + (social.x.maxCookieAgeMinutes; 0 = off), the X cookie alert if it is up, + allowed, and reason (the refusal an X job would get). <slug> names a + channel whose own cookiesFromBrowser may decide the source. Nothing is + asked of X: a refresh is Refresh cookies / Connect X account on + /settings. Ask it before queueing fetch-posts or capture-posts on X. get cleanup <slug> is one channel's /cleanup row: what each sweep would reclaim (they overlap — never add them), what holds the rest, and the failed-transcriptions count. measured: false means unknown, not zero. diff --git a/OPERATING.md b/OPERATING.md @@ -280,6 +280,9 @@ pnpm ops capture-posts --json '{"slug":"example-x","ids":["<postId>"]}' --wait press Refresh cookies (or Connect X account) on /settings, then fetch again.` Refreshing is a click on /settings — it loads x.com — so the editor never refreshes on its own. With the browser login the age cannot be read; the job logs that and proceeds. + `pnpm ops get x-session` answers the same check before anything is queued: the login source, the jar's + age in minutes, the limit, `allowed`, and the refusal an X job would get (`reason`). An agent asks it + first and, when `allowed` is false, asks the operator for a refresh instead of queueing. - `capture-posts` saves a screenshot and the attached media of named posts (and a linked X Article). - A **forum thread** keeps two positions (`posts-state.json` `forum`): **Fetch posts** catches up from the last page to the newest held post, then continues the history from where it stopped, down to page 1 — `"pages": N` caps @@ -658,4 +661,9 @@ pnpm archilyzer publish build example-site --out /srv/example-private notes: `notes` (with `UMTOOL_URL`). Settings, storage and deletes stay `pnpm ops`. - `generation_policy` and `generate` route a generation task by the policy ("Generate and iterate" above); `/gen` wraps them. +- The MCP reads a PUBLISHED archive. For the live corpus — a video downloaded an hour ago, a channel no site + carries — `pnpm archilyzer corpus grep --regex '<re>' --channels a,b --since YYYY-MM-DD` searches the + transcripts on disk (no index, no editor; `--json`, `--window`, `--until`, `--limit`), and ends with the + videos in range that have no transcript yet. From a worktree, set `TRANSCRIPTS_DIR` to the primary + checkout's `transcripts/`. - Tools and their arguments: [mcp/README.md](mcp/README.md). diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog ## [Unreleased] +- **A download filter's `^` and `$` now anchor to the video's title.** A filter pattern was only ever matched against the title and the description joined together, where `$` means the end of the description, so a pattern that names exact titles (`^ROOSTER(123|456)$`) could never match: the h3-podcast-audio-feed channel's filter selected nothing for two days. Include and exclude now match when the pattern matches the title alone or the title and description together, as before. A pattern with no `$` at its end behaves exactly as it did. The channel's Playlist stage, the download lane, Download missing and `pnpm ops keep-videos` all use the same rule, and the Configure form's hints say so. Needs a restart of the editor. +- **`pnpm archilyzer corpus grep` searches the live corpus's transcripts from a terminal, with no editor and no index.** `--regex '<pattern>'` with `--channels a,b`, `--since YYYY-MM-DD`, `--until`, `--window 30`, `--limit N`, `--case-sensitive` and `--json`. It reads each held video's transcript the way the video page does (the cues file, else the best English caption track, en-orig before en), dates it by the video's upload date, and prints each hit's date, channel, id, start second, title and 30 seconds of text, then the videos in range that have no transcript yet. A channel whose drive is not answering is skipped and named. The MCP and the sites read only what was last published; this reads what is on disk now. It writes nothing. +- **`pnpm ops get x-session` says whether an X job would start now, and why not.** It answers the X login in use (the connected profile's cookie jar, or the browser's cookies), when the jar was last refreshed and its age in minutes, the limit (`social.x.maxCookieAgeMinutes`), whether X's cookie alert is up, `allowed`, and the refusal an X job would get. It is the same check that refuses a stale-cookie X job, so an assistant can ask before it queues an X fetch instead of finding out from a refusal. Needs a restart of the editor. - **A tall post screenshot in the posts feed grows into the room the column has, instead of shrinking to a thumbnail.** A screenshot was capped at the height of a card of words and drawn smaller to fit it, so a post with a picture (the Huck video's "Hucks home!!!!!! God Is Good!!!") came out a narrow strip beside empty space. Now a picture cut by that cap grows, up to its own full-width height, into the room left in the column beside the card under it — that card stays on screen; only cards further down scroll out as before. A post that fits, and a card of words, are drawn as they were. Needs a restart of umtool and a rebuild of the video. - **Every wait before the archive asks a site now varies a little, and only ever upward.** A job every 20.0 s, a page every 3.0 s or a sync at the same minute each day is a machine's beat, so each such wait is now stretched by up to a quarter of itself at random, and never shortened: every pacing number stays a minimum (Rumble's 120 s, X's 5 min, the sleep between downloads). It covers the gap between two downloads and between two jobs on one platform, yt-dlp's `--sleep-requests` and `--sleep-subtitles` (drawn once per yt-dlp run, and shown in its logged command line), the archive.org, Wayback and web-fetch gaps, the rate-limit cooldowns and the platform hold's probe, the download lane's metadata-scan batches (60 to 75 titles) and its rests, Save Page Now's and the Kick recorder's polls, and each channel's sync interval (later by at most 30 minutes, the same on every tick until it syncs, and shown so on /operations/sync). The share is **Jitter on every wait before a request** on /settings (`pacing.jitter`, default 25 %; 0 turns it off). Three waits that already varied could come out SHORTER than their minimum and no longer do: the platform cooldown (±10 %), archive.org's back-off (±20 %) and a forum's page pause (as little as 0.85 of it, under its own 5 s floor). It now lands between the pause and 1.8 times it. Four loops that asked a site with no gap at all now wait between requests: a Bluesky feed's pages (3–6 s), a Nitter timeline's pages (4 s and up), the availability check's per-video probes (3 s and up) and umtool's network clip fetches in a build with no editor (one at a time per platform, 30 s apart, Rumble 120 s). Needs a restart of the editor and of umtool. - **The download lane's metadata scan reads 60 titles at a time and lets the downloads run in between.** A filtered channel's scan holds its platform's download queue while it runs, and the lane used to scan the whole backlog in one go: on 2026-10-25 the scan of h3-podcast's 1,163 unread titles, which started the moment the channel's download pause was lifted, held YouTube from 03:20 to 06:36 and nothing downloaded. The lane now scans 60 titles (about 10 minutes on YouTube), gives that platform 20 minutes of downloads, then scans the next 60, and its log says so: "1103 listed videos left to scan for h3-podcast; the next batch after 20 minutes of downloads." A scan that a platform stopped (a soft block, a rate limit) is still not retried until the next restart. **Run** on the metadata-scan operation still scans the whole backlog. Needs a restart of the editor.