@ouro.bot/cli 0.1.0-alpha.1171 → 0.1.0-alpha.1173

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
@@ -1,6 +1,18 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.1173",
6
+ "changes": [
7
+ "New `ouro mail sweep-orphans [--agent <name>] [--live]` runs the hosted encrypted-raw orphan sweep (dry run unless --live, counts only). The edge benchmark ratchet allows +20% on the turn's peak memory (a 100 ms sample of a tree that briefly holds a second process, ~16 MiB between identical builds) and +5% on other Linux memory."
8
+ ]
9
+ },
10
+ {
11
+ "version": "0.1.0-alpha.1172",
12
+ "changes": [
13
+ "Mailroom: AzureBlobMailroomStore.sweepOrphanedEncryptedRaw deletes encrypted raw objects no committed message references (24h grace, fail-closed, dry-run), paying the raw-orphan debt."
14
+ ]
15
+ },
4
16
  {
5
17
  "version": "0.1.0-alpha.1171",
6
18
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1171",
2
+ "runtimeVersion": "0.1.0-alpha.1173",
3
3
  "bundleSchemaVersion": 3,
4
4
  "lastUpdated": "2026-09-03T00:00:00.000Z"
5
5
  }
@@ -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.1171</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1173</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -571,6 +571,7 @@ function agentResolutionFailureMode(command) {
571
571
  case "account.ensure":
572
572
  case "mail.import-mbox":
573
573
  case "mail.sync-cache":
574
+ case "mail.sweep-orphans":
574
575
  case "auth.run":
575
576
  case "auth.verify":
576
577
  case "auth.switch":
@@ -7185,6 +7186,12 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
7185
7186
  if (command.kind === "mail.backfill-indexes") {
7186
7187
  return executeMailBackfillIndexes(command, deps);
7187
7188
  }
7189
+ if (command.kind === "mail.sweep-orphans") {
7190
+ const { runHostedRawSweep } = await Promise.resolve().then(() => __importStar(require("../../mailroom/sweep-orphans-cli")));
7191
+ const text = await runHostedRawSweep(command.agent, command.live === true);
7192
+ deps.writeStdout(text);
7193
+ return text;
7194
+ }
7188
7195
  if (command.kind === "mail.sync-cache") {
7189
7196
  const { runHostedMailCacheSync } = await Promise.resolve().then(() => __importStar(require("../../mailroom/cache-sync-cli")));
7190
7197
  const text = await runHostedMailCacheSync(command.agent, deps.writeStdout);
@@ -23,7 +23,7 @@ exports.PARSER_FLAGS = [
23
23
  "--generate-unlock-secret", "--github-token", "--habit", "--help", "--home", "--host", "--host-stall-observed",
24
24
  "--human", "--id", "--identity-file", "--idle-silence-ms", "--ids", "--init", "--initiative", "--input-file", "--into",
25
25
  "--item", "--json", "--keep-versions", "--key", "--keys-dir", "--lane", "--last", "--latest", "--legacy",
26
- "--legacy-root", "--level", "--limit", "--manifest", "--max-duration-ms", "--max-old-space-size", "--message-guid",
26
+ "--legacy-root", "--level", "--limit", "--live", "--manifest", "--max-duration-ms", "--max-old-space-size", "--message-guid",
27
27
  "--migration-path", "--min-mem-available-mb", "--mode", "--model", "--name", "--native", "--no-chat",
28
28
  "--no-delegated-source", "--no-repair", "--no-send", "--no-wake", "--note", "--notify-session", "--oauth-token",
29
29
  "--observe-only", "--occasion", "--oom-score-adj", "--operation-id", "--output", "--output-file", "--owner-alone",
@@ -322,9 +322,9 @@ exports.COMMAND_REGISTRY = {
322
322
  mail: {
323
323
  category: "Auth",
324
324
  description: "Import delegated mail and repair hosted Mailroom indexes or local search cache",
325
- usage: "ouro mail <import-mbox|backfill-indexes|sync-cache> [--agent <name>]",
325
+ usage: "ouro mail <import-mbox|backfill-indexes|sync-cache|sweep-orphans> [--agent <name>]",
326
326
  example: "ouro mail import-mbox --discover --owner-email you@example.com --source hey --agent <agent>",
327
- subcommands: ["import-mbox", "backfill-indexes", "sync-cache"],
327
+ subcommands: ["import-mbox", "backfill-indexes", "sync-cache", "sweep-orphans"],
328
328
  },
329
329
  use: {
330
330
  category: "Auth",
@@ -628,6 +628,11 @@ const SUBCOMMAND_HELP = {
628
628
  usage: "ouro mail sync-cache [--agent <name>]",
629
629
  example: "ouro mail sync-cache --agent <agent>",
630
630
  },
631
+ "mail sweep-orphans": {
632
+ description: "Delete encrypted raw mail objects in the hosted Mailroom that no committed message references. Reports counts only and deletes nothing unless --live is given; objects younger than 24 hours and anything still referenced are always kept.",
633
+ usage: "ouro mail sweep-orphans [--agent <name>] [--live]",
634
+ example: "ouro mail sweep-orphans --agent <agent>",
635
+ },
631
636
  "provider refresh": {
632
637
  description: "Reload this agent's provider credentials from its vault into the running daemon",
633
638
  usage: "ouro provider refresh [--agent <name>]",
@@ -42,6 +42,7 @@ exports.CLI_COMMANDS = [
42
42
  { name: "link", effect: PRIVATE, summary: "Link an agent to a friend's external account." },
43
43
  { name: "logs", effect: PRIVATE, readOnly: true, summary: "Show the daemon's recent logs." },
44
44
  { name: "mail backfill-indexes", effect: PRIVATE, summary: "Rebuild the mail indexes for an agent." },
45
+ { name: "mail sweep-orphans", effect: PRIVATE, summary: "Delete unreferenced encrypted raw mail (dry run unless --live)." },
45
46
  { name: "mail import-mbox", effect: PRIVATE, summary: "Import an MBOX export into the agent's mail." },
46
47
  { name: "mailbox", effect: PRIVATE, readOnly: true, summary: "Show the agent's mailbox." },
47
48
  { name: "mcp call", effect: PRIVATE, summary: "Call a tool on an MCP server." },
@@ -360,6 +360,7 @@ function usage() {
360
360
  " ouro connect [providers|perplexity|embeddings|teams|bluebubbles|mail|voice|a2a|telegram|workbench] [--agent <name>] [--owner-email <email> --source <label>|--no-delegated-source] [--rotate-missing-mail-keys]",
361
361
  " ouro mail import-mbox --file <path> [--owner-email <email>] [--source <label>] [--agent <name>] [--foreground]",
362
362
  " ouro mail backfill-indexes [--agent <name>] [--foreground]",
363
+ " ouro mail sweep-orphans [--agent <name>] [--live]",
363
364
  " ouro auth verify [--agent <name>] [--provider <provider>]",
364
365
  " ouro vault create [--agent <name>] --email <email> [--server <url>] [--store <store>]",
365
366
  " ouro vault replace [--agent <name>] [--email <email>] [--server <url>] [--store <store>]",
@@ -1495,7 +1496,13 @@ function parseConnectCommand(args) {
1495
1496
  }
1496
1497
  function parseMailCommand(args) {
1497
1498
  const [sub, ...subArgs] = args;
1498
- const usageText = "Usage: ouro mail import-mbox (--file <path>|--discover) [--owner-email <email>] [--source <label>] [--agent <name>] [--foreground]\n ouro mail backfill-indexes [--agent <name>] [--foreground]\n ouro mail sync-cache [--agent <name>]";
1499
+ const usageText = "Usage: ouro mail import-mbox (--file <path>|--discover) [--owner-email <email>] [--source <label>] [--agent <name>] [--foreground]\n ouro mail backfill-indexes [--agent <name>] [--foreground]\n ouro mail sync-cache [--agent <name>]\n ouro mail sweep-orphans [--agent <name>] [--live]";
1500
+ if (sub === "sweep-orphans") {
1501
+ const { agent, rest } = extractAgentFlag(subArgs);
1502
+ if (rest.some((token) => token !== "--live"))
1503
+ throw new Error(usageText);
1504
+ return { kind: "mail.sweep-orphans", ...(agent ? { agent } : {}), ...(rest.length > 0 ? { live: true } : {}) };
1505
+ }
1499
1506
  if (sub === "sync-cache") {
1500
1507
  const agentFlagCount = subArgs.filter((token) => token === "--agent").length;
1501
1508
  const { agent, rest } = extractAgentFlag(subArgs);