@ouro.bot/cli 0.1.0-alpha.1413 → 0.1.0-alpha.1414

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/changelog.json CHANGED
@@ -2,9 +2,10 @@
2
2
  "_note": "Each pull request writes its own change note under changes/; the release job on main gives each landed change its version and adds the notes here (scripts/release-version.cjs). On main this file stops at the last version set by hand; the published package has every release. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
4
  {
5
- "version": "0.1.0-alpha.1413",
5
+ "version": "0.1.0-alpha.1414",
6
6
  "changes": [
7
- "The Butler's household profile (version 8) gets the media tools: a friend can find media and make it available. Applying a quality or release profile, removing blocklist entries, owner-worded stalled cleanups and retrying blocklisted releases stay family-only. Of MCP, a friend gets only the Butler's own media server."
7
+ "The Butler's household profile (version 8) gets the media tools: a friend can find media and make it available. Applying a quality or release profile, removing blocklist entries, owner-worded stalled cleanups and retrying blocklisted releases stay family-only. Of MCP, a friend gets only the Butler's own media server.",
8
+ "The Butler's media tools say what happened or what the tool does, instead of giving the agent rules (\"never\", \"do not\"). A test checks every string in the media server and the MCP write guard for those words."
8
9
  ]
9
10
  },
10
11
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1413",
2
+ "runtimeVersion": "0.1.0-alpha.1414",
3
3
  "bundleSchemaVersion": 3,
4
4
  "lastUpdated": "2026-09-03T00:00:00.000Z"
5
5
  }
@@ -757,7 +757,7 @@ export function diagnose({ shelf, result, chain, entity, kind }) {
757
757
  percent_complete: result.download.percent_complete,
758
758
  detail: items,
759
759
  ...(neverStarted.length ? { never_started: { likely_fix: "blocklist_and_research", items: neverStarted } } : {}),
760
- summary: `${facts.join(". ")}. Ask the owner whether to keep waiting, find another release, or give up; do not remove it on your own, because removing a partial download loses its progress.${neverStarted.length ? ` Separately, ${neverStarted.length} download(s) never started (${neverStarted.map((i) => i.title ?? "a release").join("; ")}); those can be blocklisted and searched again (blocklist_and_research) without asking.` : ""} media_fill_missing can look for a seeded alternative without deleting the partial first; it removes the partial only after a seeded replacement is grabbed.` }
760
+ summary: `${facts.join(". ")}. Whether to keep waiting, find another release, or give up is the owner's choice: removing a partial download loses its progress, so this leaves it in place.${neverStarted.length ? ` Separately, ${neverStarted.length} download(s) didn't start (${neverStarted.map((i) => i.title ?? "a release").join("; ")}); those can be blocklisted and searched again (blocklist_and_research) without asking.` : ""} media_fill_missing can look for a seeded alternative without deleting the partial first; it removes the partial only after a seeded replacement is grabbed.` }
761
761
  }
762
762
  const oldest = Math.max(...items.map((i) => i.age_hours))
763
763
  return { stuck_stage: "download", stuck_reason: "stalled_no_progress",
@@ -779,7 +779,7 @@ export function diagnose({ shelf, result, chain, entity, kind }) {
779
779
  return { stuck_stage: null, stuck_reason: null, likely_fix: null, human_action_required: false,
780
780
  percent_complete: pct,
781
781
  ...(suspected.length ? { stall_suspected: true, detail: suspected } : {}),
782
- summary: `Downloading now — ${what}${pct === null ? "" : `, ${pct}% done`}, about ${gb} GB to go.${slow.length ? ` Slow but still moving: ${slow.map((i) => `${i.title ?? "a release"} is ${i.percent_complete}% done after ${i.age_hours} hours with an ETA of ${i.timeleft}`).join("; ")}.` : ""}${suspected.length ? ` It reports no ETA after ${Math.max(...suspected.map((i) => i.age_hours))} hours, so it may be stalled; the next check 30 minutes or more later confirms it. Do not promise an ETA.` : ""}` }
782
+ summary: `Downloading now — ${what}${pct === null ? "" : `, ${pct}% done`}, about ${gb} GB to go.${slow.length ? ` Slow but still moving: ${slow.map((i) => `${i.title ?? "a release"} is ${i.percent_complete}% done after ${i.age_hours} hours with an ETA of ${i.timeleft}`).join("; ")}.` : ""}${suspected.length ? ` It reports no ETA after ${Math.max(...suspected.map((i) => i.age_hours))} hours, so it may be stalled; the next check 30 minutes or more later confirms it. There is no ETA to give yet.` : ""}` }
783
783
  }
784
784
  if (result.download.errors.length) {
785
785
  return { stuck_stage: "download", stuck_reason: "download_client_error", likely_fix: "retry_or_replace_release",
@@ -808,7 +808,7 @@ export function diagnose({ shelf, result, chain, entity, kind }) {
808
808
  }
809
809
  return { stuck_stage: "import", stuck_reason: "grabbed_but_not_imported", likely_fix: "force_import_scan",
810
810
  human_action_required: false,
811
- summary: `It was grabbed (${result.search.last_grab_title ?? "unknown release"}) but never landed on the shelf.` }
811
+ summary: `It was grabbed (${result.search.last_grab_title ?? "unknown release"}) but didn't land on the shelf.` }
812
812
  }
813
813
 
814
814
  // -------------------------------------------------- tool: diagnose_and_fix
@@ -816,7 +816,7 @@ export function diagnose({ shelf, result, chain, entity, kind }) {
816
816
  async function mediaDiagnoseAndFix(a) {
817
817
  const before = await mediaRequestStatus({ request_id: a.request_id, tmdb_id: a.tmdb_id, title: a.title })
818
818
  if (!before.found) return { result: "no_such_request", before, after: null, human_action_required: true,
819
- human_action_reason: "Nothing to fix — it was never requested." }
819
+ human_action_reason: "Nothing to fix — nobody requested it." }
820
820
  const action = a.action ?? (before.diagnosis?.likely_fix ?? "rescan")
821
821
 
822
822
  if (before.diagnosis?.stuck_reason === "acquisition_chain_down" && action !== "report_only") {
@@ -1092,7 +1092,7 @@ export async function mediaQueue(a) {
1092
1092
  ...(fakes.failed.length ? { fakes_not_cleared: fakes.failed } : {}),
1093
1093
  summary: !total ? "Nothing for this is in the Sonarr/Radarr queue."
1094
1094
  : `${total} queue row${total === 1 ? "" : "s"}${total > shown.length ? ` (showing ${shown.length})` : ""}; ${shown.filter((r) => r.stalled).length} stalled${shown.some((r) => r.stall?.state === "suspected") ? `, ${shown.filter((r) => r.stall?.state === "suspected").length} suspected (no ETA, to be confirmed by a check 30 minutes later)` : ""}.`,
1095
- note: "Sonarr/Radarr do not report seeders or peers. A row stuck at the same percent with no timeleft is the stall signal; for a release's seeder count use media_indexer_search.",
1095
+ note: "Sonarr/Radarr don't report seeders or peers. A row stuck at the same percent with no timeleft is the stall signal; for a release's seeder count use media_indexer_search.",
1096
1096
  }
1097
1097
  }
1098
1098
 
@@ -1991,7 +1991,7 @@ async function fillPass(a, seriesId, seriesTitle, { nowMs = Date.now(), deadline
1991
1991
  const summary = [
1992
1992
  `${have.length} of ${base.on_shelf.of} aired episodes are on the shelf; ${wanted.length} monitored ${wanted.length === 1 ? "episode is" : "episodes are"} missing.`,
1993
1993
  grabs ? `Grabbed ${grabs} release${grabs === 1 ? "" : "s"} now.` : "",
1994
- unseeded.length ? `${unseeded.map((x) => x.title).join("; ")} ${unseeded.length === 1 ? "has no seeders: it waits" : "have no seeders: they wait"} for peers and may never finish.` : "",
1994
+ unseeded.length ? `${unseeded.map((x) => x.title).join("; ")} ${unseeded.length === 1 ? "has no seeders: it waits" : "have no seeders: they wait"} for peers and may not finish.` : "",
1995
1995
  moving ? `${moving} download(s) in progress.` : "",
1996
1996
  stuck.length ? `${stuck.length} download(s) stalled with no peers and no other usable release (${stuck.map((s) => `${s.title} at ${s.percent}%`).join("; ")}).` : "",
1997
1997
  notFound.length ? `No usable release found for ${notFound.map((e) => e.code).join(", ")}.` : "",
@@ -2006,7 +2006,7 @@ async function fillPass(a, seriesId, seriesTitle, { nowMs = Date.now(), deadline
2006
2006
  : stuck.length || notFound.length
2007
2007
  ? "Everything findable is requested; what is still missing is listed with why. Calling media_fill_missing later retries those."
2008
2008
  : unseeded.length
2009
- ? "Everything findable is requested; the unseeded grab waits for peers and may never finish. An await_condition watch can bring this back to media_fill_missing later."
2009
+ ? "Everything findable is requested; the unseeded grab waits for peers and may not finish. An await_condition watch can bring this back to media_fill_missing later."
2010
2010
  : "Work is in progress: everything findable is requested and downloading. Calling media_fill_missing later imports and confirms it."
2011
2011
  const blockedHint = !blockedReport.length ? ""
2012
2012
  : ownerRetry ? " The owner's retry could not take the blocklisted release back (see errors and blocklisted_matches)."
@@ -2061,7 +2061,7 @@ const OWNER_WORDS_NOTE_AUDIT = "claimed by the caller; not verified"
2061
2061
  const OWNER_WORDS_REQUIRED = { result: "owner_words_required", message: "Pass owner_words with the owner's own words asking for this change (a verbatim quote), or leave dry_run true. Nothing was changed." }
2062
2062
 
2063
2063
  const itemView = (item) => ({ service_id: item.id, title: item.title ?? null, quality_profile_id: item.qualityProfileId ?? null })
2064
- const UPGRADE_NEXT_STEP = "The profile now allows the upgrade. Call media_search_now (or media_release_search) for the item so Radarr/Sonarr looks for a better release; do not ask the owner to open a settings page."
2064
+ const UPGRADE_NEXT_STEP = "The profile now allows the upgrade. Call media_search_now (or media_release_search) for the item so Radarr/Sonarr looks for a better release; there is no settings page left for the owner to open."
2065
2065
 
2066
2066
  // Release profiles are the apps' own rules for which releases to take: a release whose title holds an ignored term is never
2067
2067
  // grabbed, and one missing a required term is skipped. Writes follow media_quality_profile: dry run first, owner_words to apply.
@@ -2195,21 +2195,21 @@ const TOOL_LIST = [
2195
2195
  {
2196
2196
  name: "media_search",
2197
2197
  annotations: { readOnlyHint: true },
2198
- description: "Search or browse the household media catalogue. Use `query` for a title lookup: partial and misspelled titles are matched against the library first (Sonarr, Radarr, Jellyfin) and returned as `library_matches` with their kind and service id, and when nothing in the library matches, `lookup_candidates` (TVDB/TMDB) cover titles not in the library. Whether a title is on the shelf, or does not exist, comes only from a lookup made this turn, never from memory or an earlier reply; never say a title does not exist without reading both. Use `genres`/`keywords`/`year_range` to browse by mood (e.g. keywords ['autumn','thanksgiving'] for cozy fall films). `on_shelf: true` restricts to what is already downloaded, `false` to what is not, omit for both. Every item says whether it is on the shelf and carries its tmdb_id so a follow-up media_request needs no second lookup.",
2198
+ description: "Search or browse the household media catalogue. Use `query` for a title lookup: partial and misspelled titles are matched against the library first (Sonarr, Radarr, Jellyfin) and returned as `library_matches` with their kind and service id, and when nothing in the library matches, `lookup_candidates` (TVDB/TMDB) cover titles not in the library. Whether a title is on the shelf, or exists at all, comes from a lookup made this turn, not from memory or an earlier reply; a title is missing only when both library_matches and lookup_candidates are empty. Use `genres`/`keywords`/`year_range` to browse by mood (e.g. keywords ['autumn','thanksgiving'] for cozy fall films). `on_shelf: true` restricts to what is already downloaded, `false` to what is not, omit for both. Every item says whether it is on the shelf and carries its tmdb_id so a follow-up media_request needs no second lookup.",
2199
2199
  inputSchema: { type: "object", properties: {
2200
2200
  query: { type: "string", description: "Title or free text. Omit to browse by filters." },
2201
2201
  kind: { type: "string", enum: ["movie", "series", "any"], description: "Default any." },
2202
2202
  year_range: { type: "array", items: { type: "number" }, minItems: 2, maxItems: 2, description: "[minYear, maxYear]" },
2203
2203
  genres: { type: "array", items: { type: "string" }, description: "TMDB genre names, e.g. ['Romance','Drama']." },
2204
2204
  keywords: { type: "array", items: { type: "string" }, description: "TMDB keywords, e.g. ['autumn','small town']. Best lever for mood/vibe requests." },
2205
- on_shelf: { type: "boolean", description: "true = only what we already have; false = only what we do not; omit = both." },
2205
+ on_shelf: { type: "boolean", description: "true = only what we already have; false = only what we don't; omit = both." },
2206
2206
  limit: { type: "number", description: "1-20, default 12." },
2207
2207
  sort: { type: "string", enum: ["relevance", "release_year"] },
2208
2208
  } },
2209
2209
  },
2210
2210
  {
2211
2211
  name: "media_request",
2212
- description: "Request a film or series so it gets downloaded. Give tmdb_id when known (from media_search), otherwise title plus optional year. Idempotent: if it was already requested you get approval_state 'already_requested' and duplicate_of, never a duplicate. Returns the downstream sonarr_id/radarr_id so media_request_status needs no re-resolution. Someone asking is the request: call this and say what happened. Never send anyone to Jellyseerr or another screen to ask for it themselves.",
2212
+ description: "Request a film or series so it gets downloaded. Give tmdb_id when known (from media_search), otherwise title plus optional year. Idempotent: if it was already requested you get approval_state 'already_requested' and duplicate_of instead of a second request. Returns the downstream sonarr_id/radarr_id so media_request_status needs no re-resolution. Someone asking is the request: this call makes it, and the reply says what happened, so nobody needs Jellyseerr or another screen to ask for it themselves.",
2213
2213
  inputSchema: { type: "object", properties: {
2214
2214
  tmdb_id: { type: "number" },
2215
2215
  title: { type: "string" },
@@ -2221,7 +2221,7 @@ const TOOL_LIST = [
2221
2221
  {
2222
2222
  name: "media_request_status",
2223
2223
  annotations: { readOnlyHint: true },
2224
- description: "One call, every stage: request, indexer search, download, file on disk, plus acquisition-chain health and a deterministic `diagnosis` block naming what is stuck, why, and the fix. Use this for any 'is it here yet?' or 'why hasn't X downloaded?' question. A queue row is not proof of progress: a release sitting at zero bytes comes back as stalled, not as downloading. Never infer the cause yourself — read diagnosis.summary.",
2224
+ description: "One call, every stage: request, indexer search, download, file on disk, plus acquisition-chain health and a deterministic `diagnosis` block naming what is stuck, why, and the fix. Use this for any 'is it here yet?' or 'why hasn't X downloaded?' question. A queue row is not proof of progress: a release sitting at zero bytes comes back as stalled, not as downloading. diagnosis.summary names the cause from what each stage reports.",
2225
2225
  inputSchema: { type: "object", properties: {
2226
2226
  request_id: { type: "string", description: "e.g. jellyseerr:42" },
2227
2227
  tmdb_id: { type: "number" },
@@ -2285,7 +2285,7 @@ const TOOL_LIST = [
2285
2285
  {
2286
2286
  name: "media_fill_missing",
2287
2287
  _meta: { [TIMEOUT_META_KEY]: 240_000 },
2288
- description: "Gets a series' missing episodes in one call: it re-reads Sonarr, searches the indexers, grabs the best seeded release for each monitored aired episode (matched by episode title and air year as well as Sonarr's numbering), imports finished downloads, and replaces a stalled download it keeps by itself once a seeded alternative exists, over up to 3 passes in 3 minutes. It never grabs what is already in flight. Returns on_shelf, in_flight, not_found, actions, indexer_evidence, summary and next_step; goal_met is true when nothing is left to get, and blocklisted_matches lists episodes whose only release is blocklisted.",
2288
+ description: "Gets a series' missing episodes in one call: it re-reads Sonarr, searches the indexers, grabs the best seeded release for each monitored aired episode (matched by episode title and air year as well as Sonarr's numbering), imports finished downloads, and replaces a stalled download it keeps by itself once a seeded alternative exists, over up to 3 passes in 3 minutes. It leaves what is already in flight alone. Returns on_shelf, in_flight, not_found, actions, indexer_evidence, summary and next_step; goal_met is true when nothing is left to get, and blocklisted_matches lists episodes whose only release is blocklisted.",
2289
2289
  inputSchema: { type: "object", properties: {
2290
2290
  series: { type: "string", description: "Series title as the owner said it." },
2291
2291
  service_id: { type: "number", description: "Sonarr series id, when known." },
@@ -2373,7 +2373,7 @@ const TOOL_LIST = [
2373
2373
  },
2374
2374
  {
2375
2375
  name: "media_quality_profile",
2376
- description: "Read and change the Radarr/Sonarr quality profiles that decide whether a better release may replace a file ('Quality Profile does not allow upgrades'). This is a normal API, never a settings screen the owner has to click through. action read (default) lists the profiles for the kind with their cutoff, upgrade flag and ordered qualities, or one profile with profile_id; add service_id to also see which profile a movie or series is on. action set_upgrade changes upgrade_allowed and/or the cutoff (a quality id from the profile, or cutoff_name) of profile_id. action assign puts the movie or series service_id on profile_id. Both writes are a dry run that shows before and after and changes nothing until dry_run is false; a change to a shared profile affects every title on it, so prefer assign to move one title when the owner asked about one title. When the owner's words ask for the change, apply it, then report the before and after in one line. Applying takes owner_words, the owner's words asking for the change. After an applied change, call media_search_now so the upgrade is searched for.",
2376
+ description: "Read and change the Radarr/Sonarr quality profiles that decide whether a better release may replace a file ('Quality Profile does not allow upgrades'). It works through the apps' API, with no settings screen for the owner to click through. action read (default) lists the profiles for the kind with their cutoff, upgrade flag and ordered qualities, or one profile with profile_id; add service_id to also see which profile a movie or series is on. action set_upgrade changes upgrade_allowed and/or the cutoff (a quality id from the profile, or cutoff_name) of profile_id. action assign puts the movie or series service_id on profile_id. Both writes are a dry run that shows before and after and changes nothing until dry_run is false; a change to a shared profile affects every title on it, so prefer assign to move one title when the owner asked about one title. When the owner's words ask for the change, apply it, then report the before and after in one line. Applying takes owner_words, the owner's words asking for the change. After an applied change, call media_search_now so the upgrade is searched for.",
2377
2377
  inputSchema: { type: "object", properties: {
2378
2378
  kind: { type: "string", enum: ["movie", "series"], description: "movie = Radarr, series = Sonarr." },
2379
2379
  action: { type: "string", enum: ["read", "set_upgrade", "assign"], description: "Default read." },
@@ -2389,7 +2389,7 @@ const TOOL_LIST = [
2389
2389
  },
2390
2390
  {
2391
2391
  name: "media_release_profile",
2392
- description: "Read and set the Radarr/Sonarr release profiles: the apps' own standing rules for which releases to take. A release whose title holds an ignored term is never grabbed; one missing a required term is skipped. Use it for household rules such as never taking fake releases that are programs (ignored: a regex like /\\.(exe|scr|bat|msi)$/i, end-anchored so titles like Scream or Batman stay fine). action read (default) lists them. action set creates or changes the profile called name; ignored and required replace that list when given. A set is a dry run showing before and after until dry_run is false; applying takes owner_words, the owner's words asking for it. The fake-release rule in media_queue runs regardless; this keeps such releases from being grabbed at all.",
2392
+ description: "Read and set the Radarr/Sonarr release profiles: the apps' own standing rules for which releases to take. A release whose title holds an ignored term isn't grabbed; one missing a required term is skipped. Use it for household rules such as turning down fake releases that are programs (ignored: a regex like /\\.(exe|scr|bat|msi)$/i, end-anchored so titles like Scream or Batman stay fine). action read (default) lists them. action set creates or changes the profile called name; ignored and required replace that list when given. A set is a dry run showing before and after until dry_run is false; applying takes owner_words, the owner's words asking for it. The fake-release rule in media_queue runs regardless; this keeps such releases from being grabbed at all.",
2393
2393
  inputSchema: { type: "object", properties: {
2394
2394
  kind: { type: "string", enum: ["movie", "series"], description: "movie = Radarr, series = Sonarr." },
2395
2395
  action: { type: "string", enum: ["read", "set"], description: "Default read." },
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0"?>
2
2
  <Container version="2">
3
3
  <Name>ouro-butler</Name>
4
- <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1413</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1414</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1413",
3
+ "version": "0.1.0-alpha.1414",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@ouro.bot/cli",
9
- "version": "0.1.0-alpha.1413",
9
+ "version": "0.1.0-alpha.1414",
10
10
  "bundleDependencies": [
11
11
  "@ouro.bot/friends"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1413",
3
+ "version": "0.1.0-alpha.1414",
4
4
  "description": "Ouroboros, the agent harness: agents with durable memory that live where you talk (terminal, Teams, iMessage, mail, voice) and use real tools. Start with npx ouro.bot@latest.",
5
5
  "homepage": "https://ouroboros.bot/",
6
6
  "engines": {