@ouro.bot/cli 0.1.0-alpha.994 → 0.1.0-alpha.995

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,14 @@
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.995",
6
+ "changes": [
7
+ "The release gate removes the files its own run created before sync resumes, so test residue never reaches the agent's repo.",
8
+ "A reply that says the library has it without naming a title is backed when this turn's lookup found something on the shelf; no false \"haven't checked\" note goes in front of it.",
9
+ "A2A turns keep their info-level log, so a peer turn's sync timing is on record."
10
+ ]
11
+ },
4
12
  {
5
13
  "version": "0.1.0-alpha.994",
6
14
  "changes": [
@@ -589,7 +589,7 @@ export const CASES = [
589
589
  const deflections = findHedges(text, TORRENT_DEFLECTIONS)
590
590
  return [
591
591
  check("he searched or requested it (media_search or media_request)", callsNamed(trace, /^media_(search|request)$/).length > 0, `${trace.length} tool calls`),
592
- check("the reply names the Chef Show", /chef show/i.test(text)),
592
+ check("the reply names the Chef Show or the season asked for", /chef show|\bseason (1|one)\b|\bs0?1\b/i.test(text)),
593
593
  check("the reply states an outcome (on the shelf, requested, grabbing, downloading, queued, ready, in the library or on Jellyfin)", MEDIA_OUTCOME.test(text), text.slice(0, 120)),
594
594
  check("the reply carries no lecture, refusal or hedge", hedges.length === 0, hedges.join(" | ")),
595
595
  check("the reply doesn't refuse or deflect the torrent the owner named", deflections.length === 0, deflections.join(" | ")),
@@ -1045,6 +1045,12 @@ export async function closeSyncBracket(sync, head, { touched, planted, snapshotE
1045
1045
  return { id: "no-sync-residue", status: checks.every((entry) => entry.ok) ? "pass" : "fail", checks }
1046
1046
  }
1047
1047
 
1048
+ /** The untracked paths that did not exist before the run: the gate made them, so they go before sync can commit them. */
1049
+ export function newDuringRun(before, after) {
1050
+ if (!before.ok || !after.ok) return []
1051
+ return Object.keys(after.files).filter((file) => !(file in before.files)).sort()
1052
+ }
1053
+
1048
1054
  /** The path of each `git status --porcelain` line (the new name of a rename), unquoted. */
1049
1055
  export function porcelainPaths(status) {
1050
1056
  return String(status ?? "").split("\n").filter((line) => line.length > 3).map((line) => {
@@ -1129,6 +1135,7 @@ export async function syncLatencyResult(host) {
1129
1135
  */
1130
1136
  export async function runSuite(host, options = {}) {
1131
1137
  const sync = host.sync
1138
+ const log = options.log ?? console.error
1132
1139
  if (!sync) return runCases(host, options)
1133
1140
  validateCases(options)
1134
1141
  await host.waitReady?.()
@@ -1145,6 +1152,13 @@ export async function runSuite(host, options = {}) {
1145
1152
  suite = await runCases(host, { ...options, ready: true })
1146
1153
  // Read while sync is still paused, so nothing the run created has been committed yet.
1147
1154
  untrackedAfter = untrackedSnapshot(sync)
1155
+ // A replay friend's record is restored, not removed; every other new file is the run's, and sync must never commit it.
1156
+ const replayFriendFiles = [host.friends?.principal, host.friends?.stranger, host.friends?.escalation].filter(Boolean).map((id) => `friends/${id}.json`)
1157
+ const made = newDuringRun(bracket.untracked, untrackedAfter).filter((file) => !replayFriendFiles.includes(file))
1158
+ if (made.length) {
1159
+ sync.removeUntracked(made)
1160
+ log(`removed ${made.length} ${made.length === 1 ? "file" : "files"} the run created before sync resumed: ${made.join(", ")}`)
1161
+ }
1148
1162
  }
1149
1163
  } finally {
1150
1164
  // The pause never outlives the run. A crash that skips this leaves a marker that expires on its own.
@@ -1619,6 +1633,15 @@ export function makeSyncHost({ bundle, backupDir = DEFAULT_BACKUP_DIR, exec = sh
1619
1633
  writeFileAsRoot(state, "sync-paused", `${JSON.stringify({ startedAt: startedAt.toISOString(), expiresAt: new Date(startedAt.getTime() + ms).toISOString() })}\n`, 0o644, { uid: owner.uid, gid: owner.gid }, "state")
1620
1634
  },
1621
1635
  resume() { rmSync(marker, { force: true }) },
1636
+ /** Removes files git reports as untracked, each a plain relative path inside the bundle; a link is removed, never followed. */
1637
+ removeUntracked(paths) {
1638
+ for (const file of paths) {
1639
+ if (path.isAbsolute(file) || file.split("/").includes("..")) throw new Error(`refusing to remove ${file}: not a path inside the bundle`)
1640
+ const target = path.join(bundle, file)
1641
+ const stat = lstatOrNull(target)
1642
+ if (stat && !stat.isDirectory()) rmSync(target, { force: true })
1643
+ }
1644
+ },
1622
1645
  /** Waits until no live process holds sync's lock. A lock whose holder is dead is stale, as `src/heart/sync-lock.ts` judges it. */
1623
1646
  async waitLockFree(waitMs) {
1624
1647
  const lock = path.join(bundle, ".git", "ouro-sync.lock")
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.994",
2
+ "runtimeVersion": "0.1.0-alpha.995",
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.994</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.995</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -52,13 +52,14 @@ function defaultLoggingForProcess(processName) {
52
52
  sinks: ["ndjson"],
53
53
  };
54
54
  }
55
- if (processName === "telegram" || processName === "teams") {
55
+ // A2A turns are first-class conversations (peers, the release gate): their info-level record, sync timing included, is kept.
56
+ if (processName === "telegram" || processName === "teams" || processName === "a2a") {
56
57
  return {
57
58
  level: "info",
58
59
  sinks: ["terminal", "ndjson"],
59
60
  };
60
61
  }
61
- if (processName === "bluebubbles" || processName === "mail" || processName === "voice" || processName === "a2a" || processName === "shepherd") {
62
+ if (processName === "bluebubbles" || processName === "mail" || processName === "voice" || processName === "shepherd") {
62
63
  return {
63
64
  level: "warn",
64
65
  sinks: ["terminal", "ndjson"],
@@ -57,7 +57,11 @@ function unbackedClaim(answer, tools) {
57
57
  const said = normalize(clauses.filter((clause) => !SHELF_CLAIM.test(clause) || !denied(clause)).join(" "));
58
58
  const { onShelf, offShelf } = titlesFrom(tools);
59
59
  const missing = offShelf.filter((title) => said.includes(title.key)).map((title) => title.name);
60
- return onShelf.some((title) => said.includes(title.key)) && missing.length === 0 ? null : { missing };
60
+ if (missing.length > 0)
61
+ return { missing };
62
+ // "It's in the library" names no title: it is backed when this turn's lookup found something on the shelf.
63
+ const namesAny = [...onShelf, ...offShelf].some((title) => said.includes(title.key));
64
+ return onShelf.some((title) => said.includes(title.key)) || (!namesAny && onShelf.length > 0) ? null : { missing };
61
65
  }
62
66
  /** The correction for a reply that says something is on the shelf without this turn's lookup finding it there, or null. */
63
67
  function shelfClaimError(answer, tools) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.994",
3
+ "version": "0.1.0-alpha.995",
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.994",
9
+ "version": "0.1.0-alpha.995",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.78.0",
12
12
  "@azure/identity": "^4.13.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.994",
3
+ "version": "0.1.0-alpha.995",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },