@ouro.bot/cli 0.1.0-alpha.1635 → 0.1.0-alpha.1637

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,15 +1,29 @@
1
1
  {
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
+ {
5
+ "version": "0.1.0-alpha.1637",
6
+ "changes": [
7
+ "The Butler's host tools now read the Butler's name from the image they start (the name after `--package-managed-agent` in its entrypoint, else `sanctuary`). They use that name for every path inside the container: the bundle mount, the psyche mount, the trust mount `/etc/ouro/trust/<name>`, the vault and token containers, the bw profile, the replay gate, the sync cutover and the DockerMan template's bundle and trust Targets. The folders on the host never move: the bundle stays at `/mnt/user/appdata/ouro-butler/agent/sanctuary.ouro` and trust stays at `trust/sanctuary`. Resident mounts now use `--mount`, so a missing host folder stops the start instead of mounting an empty one. Preflight also refuses a leftover credential handoff that names another Butler, and a DockerMan template that can't be moved to the image's name. Every image still says `sanctuary`, so nothing changes until a release renames it.",
8
+ "The Butler's media tools and its house rules no longer assume the bundle is mounted at `sanctuary.ouro`: the media server finds its credentials and state next to itself, and the instruction for house notes names `psyche/TACIT.md` in the bundle. Nothing changes for an install that is still called sanctuary.",
9
+ "When the daemon runs the Butler under one name and finds its saved external events under the other name, it moves that folder over at start and treats those events as the running Butler's. If both folders exist it leaves both and logs a warning. A rollback moves them back the same way.",
10
+ "The bundle migration takes `--butler-name <butler|sanctuary>`. When the bundle's own files (agent.json, the replay client's provision.json, recent attachments, skills and HOUSE.md) name the other Butler's container path, it points them at this one. The rollback record holds those files, so a rollback restores them exactly. Psyche, friends, sessions and logs are never touched."
11
+ ]
12
+ },
4
13
  {
5
14
  "version": "0.1.0-alpha.1635",
6
15
  "changes": [
7
- "Update the Ouro UI files to Ouro UI v1.3.589.",
8
16
  "The Butler's Telegram front door runs under either of the Butler's names. This covers the root gateway's transport, the owner's and household's privileges, the Butler tools, the privileged failsafe, and the SABnzbd key it reads to verify a protective pause.",
9
17
  "The privileged event spool keeps its events and replay manifest under the name of the Butler the daemon runs. An envelope from the host's emitter that still names the Butler by its other name is filed there too, so usenet alerts survive the rename.",
10
18
  "The vault handoff, root-host approvals and the health sweep's acceptance marker each follow the Butler's bundle name. The vault's machine id stays `sanctuary`."
11
19
  ]
12
20
  },
21
+ {
22
+ "version": "0.1.0-alpha.1634",
23
+ "changes": [
24
+ "Update the Ouro UI files to Ouro UI v1.3.589."
25
+ ]
26
+ },
13
27
  {
14
28
  "version": "0.1.0-alpha.1633",
15
29
  "changes": [
@@ -2,9 +2,13 @@
2
2
  import * as path from "node:path"
3
3
  import { pathToFileURL } from "node:url"
4
4
 
5
- const USAGE = "Usage: migrate-sanctuary-bundle.mjs --package-root <path> --agent-root <path> --operation <migrate|seed|rollback|finalize-rollback|commit|status|inspect> [--rollback-image-id <sha256:id> --target-image-id <sha256:id>]"
5
+ const USAGE = "Usage: migrate-sanctuary-bundle.mjs --package-root <path> --agent-root <path> --operation <migrate|seed|rollback|finalize-rollback|commit|status|inspect> [--rollback-image-id <sha256:id> --target-image-id <sha256:id> [--butler-name <butler|sanctuary>]]"
6
6
  const BASE_KEYS = ["--package-root", "--agent-root", "--operation"]
7
7
  const MIGRATE_KEYS = [...BASE_KEYS, "--rollback-image-id", "--target-image-id"]
8
+ // The Butler the image being installed runs. The host's bundle folder keeps its name, so the migrate is told which
9
+ // container path the bundle's own files should name; without it, the agent root's folder name says.
10
+ const BUTLER_NAME_KEY = "--butler-name"
11
+ const BUTLER_NAMES = ["butler", "sanctuary"]
8
12
 
9
13
  function parseArguments(args) {
10
14
  if (args.length % 2 !== 0) throw new Error(USAGE)
@@ -17,7 +21,8 @@ function parseArguments(args) {
17
21
  }
18
22
  const operation = values.get("--operation")
19
23
  if (!["migrate", "seed", "rollback", "finalize-rollback", "commit", "status", "inspect"].includes(operation)) throw new Error(USAGE)
20
- const expectedKeys = operation === "migrate" ? MIGRATE_KEYS : BASE_KEYS
24
+ const expectedKeys = operation === "migrate" ? (values.has(BUTLER_NAME_KEY) ? [...MIGRATE_KEYS, BUTLER_NAME_KEY] : MIGRATE_KEYS) : BASE_KEYS
25
+ if (values.has(BUTLER_NAME_KEY) && !BUTLER_NAMES.includes(values.get(BUTLER_NAME_KEY))) throw new Error(USAGE)
21
26
  if (values.size !== expectedKeys.length || expectedKeys.some((key) => !values.has(key)) || [...values.keys()].some((key) => !expectedKeys.includes(key))) throw new Error(USAGE)
22
27
  return values
23
28
  }
@@ -28,7 +33,7 @@ export function runSanctuaryBundleOperation(args, dependencies) {
28
33
  const agentRoot = values.get("--agent-root")
29
34
  const operation = values.get("--operation")
30
35
  const result = operation === "migrate"
31
- ? dependencies.migrate({ packageRoot, agentRoot, retainRollback: true, rollbackImageId: values.get("--rollback-image-id"), targetImageId: values.get("--target-image-id") })
36
+ ? dependencies.migrate({ packageRoot, agentRoot, retainRollback: true, rollbackImageId: values.get("--rollback-image-id"), targetImageId: values.get("--target-image-id"), butlerName: values.has(BUTLER_NAME_KEY) ? values.get(BUTLER_NAME_KEY) : null })
32
37
  // A fresh install has no earlier image to roll back to, so it writes the packaged files without a rollback record.
33
38
  : operation === "seed"
34
39
  ? dependencies.migrate({ packageRoot, agentRoot, retainRollback: false })