@ouro.bot/cli 0.1.0-alpha.770 → 0.1.0-alpha.771

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,12 @@
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.771",
6
+ "changes": [
7
+ "Accept and durably attest the exact Unraid 7.2.3 API-key create response before key rotation proceeds."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.770",
6
12
  "changes": [
@@ -149,6 +149,31 @@ function runUnraid(args) {
149
149
  return object(JSON.parse(result.stdout), "Unraid API response")
150
150
  }
151
151
 
152
+ function createUnraidKey(name, requested, dependencies = { runUnraid, inventoryRecords, persistRecovery }) {
153
+ const before = dependencies.inventoryRecords()
154
+ const beforeIds = new Set(before.map((record) => record.id))
155
+ try {
156
+ const created = object(dependencies.runUnraid(["apikey", "--name", name, "--create", "--permissions", requested.join(","), "--json"]), "created Unraid key")
157
+ exactKeys(created, ["id", "key", "name"], "created Unraid key")
158
+ const id = text(created.id, "created key id", KEY_ID)
159
+ const key = text(created.key, "created key descriptor")
160
+ if (created.name !== name || beforeIds.has(id)) throw new Error("created key identity is invalid")
161
+ const matches = dependencies.inventoryRecords().filter((record) => record.id === id)
162
+ if (matches.length !== 1 || matches[0].name !== name || matches[0].key !== key
163
+ || JSON.stringify(flattened(matches[0])) !== JSON.stringify(requested) || matches[0].roles.length !== 0) {
164
+ throw new Error("created key record does not match the exact CLI result")
165
+ }
166
+ return matches[0]
167
+ } catch (error) {
168
+ const recoveredIds = new Set()
169
+ for (const record of dependencies.inventoryRecords().filter((candidate) => !beforeIds.has(candidate.id))) {
170
+ if (!recoveredIds.has(record.id)) dependencies.persistRecovery(record)
171
+ recoveredIds.add(record.id)
172
+ }
173
+ throw error
174
+ }
175
+ }
176
+
152
177
  function autostartFileExact() {
153
178
  const fd = openSync(AUTOSTART_FILE, constants.O_RDONLY | constants.O_NOFOLLOW)
154
179
  let content
@@ -1531,18 +1556,7 @@ async function dispatch(request, dependencies = {
1531
1556
  if (payload.targetServerId !== TARGET_SERVER) throw new Error("target server is invalid")
1532
1557
  const name = text(payload.name, "key name", KEY_NAME)
1533
1558
  const requested = permissions(payload.permissions)
1534
- const created = runUnraid(["apikey", "--name", name, "--create", "--permissions", requested.join(","), "--json"])
1535
- const id = text(created.id, "created key id", KEY_ID)
1536
- const key = text(created.key, "created key descriptor")
1537
- const actualPermissions = permissions(created.permissions)
1538
- if (created.name !== name || JSON.stringify(actualPermissions) !== JSON.stringify(requested)
1539
- || !Array.isArray(created.roles) || created.roles.length !== 0) throw new Error("created key identity is invalid")
1540
- const matches = inventoryRecords().filter((record) => record.id === id)
1541
- if (matches.length !== 1 || matches[0].name !== name || matches[0].key !== key
1542
- || JSON.stringify(flattened(matches[0])) !== JSON.stringify(requested) || matches[0].roles.length !== 0) {
1543
- throw new Error("created key record does not match the exact CLI result")
1544
- }
1545
- return matches[0]
1559
+ return createUnraidKey(name, requested)
1546
1560
  }
1547
1561
  if (operation === "revoke_key") {
1548
1562
  exactKeys(payload, ["operation", "targetServerId", "keyId"], operation)
@@ -1775,6 +1789,7 @@ export {
1775
1789
  createBrokerServer,
1776
1790
  createHealthProbeOperationCoordinator,
1777
1791
  createOwnerMutationCoordinator,
1792
+ createUnraidKey,
1778
1793
  createInteractiveRestartDriver,
1779
1794
  dispatch,
1780
1795
  denialTargetSnapshot,
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.770",
2
+ "runtimeVersion": "0.1.0-alpha.771",
3
3
  "bundleSchemaVersion": 3,
4
4
  "lastUpdated": "2026-08-30T00:00:00.000Z"
5
5
  }
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0"?>
2
2
  <Container version="2">
3
3
  <Name>Mendelow Cloud Butler</Name>
4
- <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.770</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.771</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.770",
3
+ "version": "0.1.0-alpha.771",
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.770",
9
+ "version": "0.1.0-alpha.771",
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.770",
3
+ "version": "0.1.0-alpha.771",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },