Archilyzer · Source

archilyzer

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

commit 08a807581f0f501600b2d177f11c9871df1794aa
parent 850ffdc3378fc8d1b92dad1fcfd03341f59aba67
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue, 13 Oct 2026 22:26:17 -0400

docs: an auto research run continues by itself — OPERATING, the autonomy setting, research-approve's help (release 28 F1)

OPERATING.md's research section says what `auto` now does (the triggers, the
caps, channels in no build, the idle boot); generation.research.autonomy's
field doc and SETTINGS.md; research-approve's help names `autoContinue`, and
COMMANDS.md is regenerated.

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

Diffstat:
MCOMMANDS.md | 2+-
MOPERATING.md | 9++++++++-
MSETTINGS.md | 2+-
Mcommon/lib/generationSettings.ts | 2+-
Meditor/app/api/ops/research-approve/route.ts | 7++++---
Mscripts/archilyzer-ops.mjs | 6++++--
6 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/COMMANDS.md b/COMMANDS.md @@ -144,7 +144,7 @@ Drives a running editor over HTTP (`/api/ops/*`, the same actions its pages run) | `archive-item` | archive-item answers one archive.org item's files from its metadata: {"item"} -&gt; {item: {identifier, url, title?, date?, mediatype?, creator?, collections, restricted, mediaFiles, mediaBytes, files: \[{name, format?, source?, size?, seconds?, media, restricted, original?}\]}}. media marks the originals an import takes (one record each); restricted, what archive.org will not hand out. Read only; nothing is downloaded. | `pnpm ops archive-item --json '{"item":"example-item"}'` | | `import-post` | import-post imports ONE post by its URL into a posts channel of its platform: {"slug", "url"} — an X status (x.com/&lt;handle&gt;/status/&lt;id&gt;) or a Bluesky post (bsky.app/profile/&lt;handle&gt;/post/&lt;id&gt;, or its at:// URI). Read through the channel's own fetcher (gallery-dl for X, with the channel's login; the public AppView for Bluesky) as an import-post job on the platform's queue. Refused, before any job: a URL that is not a post, a channel that is not a posts channel of that platform or whose fetcher cannot read one post, a post the URL names as another account's, the platform held or cooling down. A post already archived is not read again; one the platform says is another account's is not written. The log ends with @@import-post {ok, slug, url, id, written, already?, post?, error?}. | `pnpm ops import-post --json '{"slug":"demo-x","url":"https://x.com/example/status/1700000000000000001"}' --wait` | | `report-draft` | report-draft runs a generation over an article's iteration as a report-draft job: {"task": "sweep" \| "revise-report" \| "revise-video" \| "narrate" \| "research", "article", ...} -&gt; {jobId, iteration, warnings?}. A sweep takes "question" and "channels" (and "from"/"to"): a new iteration; a revision takes "iteration" (the one it revises) and "feedback": a new iteration; a narration takes "iteration" (a done one; "cards"?, "force"?) and is a step on it. "copyOf" N runs iteration N again on "model". "extractorModel" is an API sweep's extractor (a Claude model id; default settings.generation.models.extractor). "model" defaults to settings.generation's route for the task (one routed to code needs a model named). A Claude model runs on draft:api, capped at "maxUsd" (default by task, never above caps.max), and is refused when the day's API total has reached caps.daily; a local model runs on draft:local, through the GPU arbiter, and is unloaded when it ends. The corpus is "source" (a handle), "build" (a composed build), or the newest build holding the channels. `job cancel <id>` stops it. The log ends with @@report-draft {article, iteration, task, status, summary, usd, minutes}; --wait prints it. A research run takes "question" ("channels"? "from"/"to"?) and "autonomy" (propose \| limits \| auto; default settings.generation.research): it searches the corpus, the web and archive.org and proposes acquisitions (archive.org imports, videos, new channels — always on no site —, posts, transcription, persisting), each with its reason and evidence, enqueuing what its autonomy and the settings' caps allow through the editor's own actions; the rest waits in the iteration's proposals.json. A sweep with "iteration" N CONTINUES research run N: its question, over its channels and every channel a done acquisition wrote into, the sweep's parent N; refused while N still waits, unless "force" (what is done so far). | `pnpm ops report-draft --json '{"task":"sweep","article":"demo-article","question":"What does she say about the shop?","channels":["demo-channel"]}' --wait`<br>`pnpm ops report-draft --json '{"task":"revise-report","article":"demo-article","iteration":1,"feedback":"Drop the second finding."}'`<br>`pnpm ops report-draft --json '{"task":"research","article":"demo-article","question":"Where did the shop story start?","autonomy":"propose"}' --wait`<br>`pnpm ops report-draft --json '{"task":"sweep","article":"demo-article","iteration":1}'` | -| `research-approve` | research-approve settles a research run's acquisitions: {"article", "iteration", "ids"?: \["p01", …\], "approve"?: true \| false, "note"?} -&gt; {outcomes: \[{id, status?, jobId?, note?, error?}\], research: {phase, autonomy, limits, spent, proposals, waitingOn: {approval, jobs}, continuedBy}}. It first refreshes every enqueued acquisition from its jobs (all done: done; one failed: failed, naming it). approve: true runs each proposal through the editor's own action (past the run's autonomy and caps, never past a standing rule); false rejects it, note saying why. No ids: the run's state now. The phase is wait (approvals or jobs pending), ready (nothing pending: continue with report-draft {"task": "sweep", "iteration": N}) or continued. Refused while the run's job is going. | `pnpm ops research-approve --json '{"article":"demo-article","iteration":1,"ids":["p01","p03"],"approve":true}'` | +| `research-approve` | research-approve settles a research run's acquisitions: {"article", "iteration", "ids"?: \["p01", …\], "approve"?: true \| false, "note"?} -&gt; {outcomes: \[{id, status?, jobId?, note?, error?}\], research: {phase, autonomy, limits, spent, proposals, waitingOn: {approval, jobs}, continuedBy, autoContinue?}}. It first refreshes every enqueued acquisition from its jobs (all done: done; one failed: failed, naming it). approve: true runs each proposal through the editor's own action (past the run's autonomy and caps, never past a standing rule); false rejects it, note saying why. No ids: the run's state now. The phase is wait (approvals or jobs pending), ready (nothing pending: continue with report-draft {"task": "sweep", "iteration": N}) or continued. An `auto` run is continued by the editor itself once ready; autoContinue says how (continued by, held for a build, refused by a cap, and why). Refused while the run's job is going. | `pnpm ops research-approve --json '{"article":"demo-article","iteration":1,"ids":["p01","p03"],"approve":true}'` | ### Usage, flags and environment diff --git a/OPERATING.md b/OPERATING.md @@ -247,7 +247,14 @@ pnpm ops report-draft --json '{"task":"sweep","article":"example-article","i - **Continue** (umtool's **Continue into a sweep**, shown once the run is done and nothing is pending) is a sweep with `"iteration"` naming the research run: its question, over its channels and every channel an acquisition wrote into. It is refused while the run waits, unless `"force": true`. A channel on no site - is in no build: put it on a site and build before continuing. Nothing continues on its own. + is in no build: put it on a site and build before continuing. +- **An `auto` run continues by itself** once its acquisitions settle (every job ended, nothing waiting for you): the + editor asks that same sweep, on the run's own model, at the job's end or on its heartbeat. The caps hold (the + sweep's per-job cap; past the daily cap it is refused, and tried again the next UTC day). A channel in no build is + left out, with the warning `not in any build yet: <slug> — rebuild the site and continue again` (a failed check on + the sweep); with nothing left to sweep it waits for a newer build. The queue says "continued automatically by iN", + or why not. `propose` and `limits` runs are continued by you. An idle boot (`ARCHILYZER_IDLE_BOOT`) continues + nothing. - **The standing rules hold in every mode**, and a proposal that breaks one is refused: a new channel is created on no site; an X channel never goes on a site; a Twitch VOD URL is refused (look for the stream on archive.org); every fetch goes through the editor's queues, holds and cooldowns (one stream, real gaps, backing off on a 429), never yt-dlp or gallery-dl by diff --git a/SETTINGS.md b/SETTINGS.md @@ -1006,7 +1006,7 @@ Report and video generation (release 27): where each task runs (`code` = Claude | Key | Default | Description | |---|---|---| -| `autonomy` | `"propose"` | `propose` (every acquisition waits for the operator's yes or no), `limits` (acquisitions into existing channels under the caps run on their own; the rest waits) or `auto` (everything runs on its own, through the editor; the approval flags are lifted, the caps are not). Every mode refuses the standing rules: a new channel on any site, an X channel on a site, a Twitch VOD. | +| `autonomy` | `"propose"` | `propose` (every acquisition waits for the operator's yes or no), `limits` (acquisitions into existing channels under the caps run on their own; the rest waits) or `auto` (everything runs on its own, through the editor; the approval flags are lifted, the caps are not; once its acquisitions settle the run continues into its sweep by itself, leaving out a channel in no build). Every mode refuses the standing rules: a new channel on any site, an X channel on a site, a Twitch VOD. | | `maxItemsPerRun` | `20` | The most items (videos, archive.org files, posts) one run may acquire without approval. Past it, an acquisition waits. | | `maxGbPerRun` | `5` | The most GB one run may download without approval. An acquisition of unknown size waits. | | `maxTranscribeHours` | `6` | The most hours of transcription one run may queue without approval. One of unknown length waits. | diff --git a/common/lib/generationSettings.ts b/common/lib/generationSettings.ts @@ -125,7 +125,7 @@ export const GENERATION_WEB_FIELD_DOCS: FieldDocs<GenerationWeb> = { export const GENERATION_RESEARCH_FIELD_DOCS: FieldDocs<GenerationResearch> = { autonomy: - "`propose` (every acquisition waits for the operator's yes or no), `limits` (acquisitions into existing channels under the caps run on their own; the rest waits) or `auto` (everything runs on its own, through the editor; the approval flags are lifted, the caps are not). Every mode refuses the standing rules: a new channel on any site, an X channel on a site, a Twitch VOD.", + "`propose` (every acquisition waits for the operator's yes or no), `limits` (acquisitions into existing channels under the caps run on their own; the rest waits) or `auto` (everything runs on its own, through the editor; the approval flags are lifted, the caps are not; once its acquisitions settle the run continues into its sweep by itself, leaving out a channel in no build). Every mode refuses the standing rules: a new channel on any site, an X channel on a site, a Twitch VOD.", maxItemsPerRun: "The most items (videos, archive.org files, posts) one run may acquire without approval. Past it, an acquisition waits.", maxGbPerRun: "The most GB one run may download without approval. An acquisition of unknown size waits.", maxTranscribeHours: "The most hours of transcription one run may queue without approval. One of unknown length waits.", diff --git a/editor/app/api/ops/research-approve/route.ts b/editor/app/api/ops/research-approve/route.ts @@ -19,9 +19,10 @@ export const dynamic = "force-dynamic"; // their doors and queues; `approve: false` rejects them (`note`: why); // - no `ids`: the run's state now (the umtool queue polls this). // `research` is {article, iteration, status, phase, autonomy, limits, spent, -// proposals, waitingOn: {approval, jobs}, continuedBy}. A run whose job is -// still going is refused. The CONTINUATION is report-draft {task: "sweep", -// iteration: <this run>}. +// proposals, waitingOn: {approval, jobs}, continuedBy, autoContinue?}. A run +// whose job is still going is refused. The CONTINUATION is report-draft +// {task: "sweep", iteration: <this run>}; an `auto` run's is asked by the +// editor itself (release 28 F1, controller/researchAutoContinue.ts). // // AN ADAPTER: the rules are the controller's (controller/researchRuns.ts). export async function POST(request: Request) { diff --git a/scripts/archilyzer-ops.mjs b/scripts/archilyzer-ops.mjs @@ -1221,13 +1221,15 @@ export function usage() { ' "iteration", "ids"?: ["p01", …], "approve"?: true | false, "note"?} ->', " {outcomes: [{id, status?, jobId?, note?, error?}], research: {phase,", " autonomy, limits, spent, proposals, waitingOn: {approval, jobs},", - " continuedBy}}. It first refreshes every enqueued acquisition from its", + " continuedBy, autoContinue?}}. It first refreshes every enqueued acquisition from its", " jobs (all done: done; one failed: failed, naming it). approve: true runs", " each proposal through the editor's own action (past the run's autonomy and", " caps, never past a standing rule); false rejects it, note saying why. No", " ids: the run's state now. The phase is wait (approvals or jobs pending),", ' ready (nothing pending: continue with report-draft {"task": "sweep",', - ' "iteration": N}) or continued. Refused while the run\'s job is going.', + ' "iteration": N}) or continued. An `auto` run is continued by the editor', + " itself once ready; autoContinue says how (continued by, held for a build,", + " refused by a cap, and why). Refused while the run's job is going.", "", "Env: ARCHILYZER_EDITOR_URL (default http://localhost:3001), WORKER_TOKEN,", " ARCHILYZER_AGENT (provenance of a tag write; default \"cli\").",