@ouro.bot/cli 0.1.0-alpha.762 → 0.1.0-alpha.764
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 +12 -0
- package/deploy/unraid/sanctuary-unit16-host-broker.mjs +23 -17
- package/deploy/unraid/sanctuary-unit16-run.sh +1 -1
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
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.764",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Allow the Sanctuary Telegram bootstrap acceptance command to persist merged runtime credentials while preserving read-only containment for every other acceptance path."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.1.0-alpha.763",
|
|
12
|
+
"changes": [
|
|
13
|
+
"Keep the Unit 16 host broker response channel open until asynchronous operations return a bounded success or failure envelope."
|
|
14
|
+
]
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"version": "0.1.0-alpha.762",
|
|
6
18
|
"changes": [
|
|
@@ -1707,21 +1707,9 @@ function writeClosedInventory(file) {
|
|
|
1707
1707
|
chownSync(file, 0, 0)
|
|
1708
1708
|
}
|
|
1709
1709
|
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
const
|
|
1713
|
-
if (!profileName || !targetContainerId || !socket || !closedInventory || !expectedImage || !initialSnapshot || process.argv.length !== 8) throw new Error("usage: broker <staging|final> <target-container-id> <socket> <closed-inventory> <expected-image-id> <initial-snapshot>")
|
|
1714
|
-
activeProfile = targetProfile(profileName)
|
|
1715
|
-
activeContainer = activeProfile.containerName
|
|
1716
|
-
activeContainerId = text(targetContainerId, "attested target container id", SHA256)
|
|
1717
|
-
expectedImageId = text(expectedImage, "expected image id", IMAGE_ID)
|
|
1718
|
-
rmSync(socket, { force: true })
|
|
1719
|
-
writeClosedInventory(closedInventory)
|
|
1720
|
-
const snapshot = await containerSnapshot(expectedImageId)
|
|
1721
|
-
const snapshotFd = openSync(initialSnapshot, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL, 0o600)
|
|
1722
|
-
try { writeFileSync(snapshotFd, `${JSON.stringify(snapshot)}\n`); fsyncSync(snapshotFd) } finally { closeSync(snapshotFd) }
|
|
1723
|
-
chownSync(initialSnapshot, 0, 0)
|
|
1724
|
-
const server = createServer((connection) => {
|
|
1710
|
+
function createBrokerServer(dispatchRequest = dispatch) {
|
|
1711
|
+
const dispatchDrain = createDispatchDrain()
|
|
1712
|
+
const server = createServer({ allowHalfOpen: true }, (connection) => {
|
|
1725
1713
|
let input = ""
|
|
1726
1714
|
connection.setEncoding("utf8")
|
|
1727
1715
|
connection.on("data", (chunk) => {
|
|
@@ -1730,14 +1718,31 @@ async function main() {
|
|
|
1730
1718
|
})
|
|
1731
1719
|
connection.on("end", async () => {
|
|
1732
1720
|
try {
|
|
1733
|
-
const result = await dispatchDrain.run(() =>
|
|
1721
|
+
const result = await dispatchDrain.run(() => dispatchRequest(JSON.parse(input)))
|
|
1734
1722
|
const scenario = result?.[ASYNC_RESTART_SCENARIO]
|
|
1735
1723
|
const completed = scenario ? armRestartAfterResponseClosed(connection, scenario) : undefined
|
|
1736
1724
|
connection.end(`${JSON.stringify({ ok: true, result })}\n`, completed)
|
|
1737
1725
|
} catch { connection.end(`${JSON.stringify({ ok: false, error: "host operation failed" })}\n`) }
|
|
1738
1726
|
})
|
|
1739
1727
|
})
|
|
1740
|
-
|
|
1728
|
+
return { server, dispatchDrain }
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
async function main() {
|
|
1732
|
+
if (process.getuid?.() !== 0) throw new Error("host broker must run as root")
|
|
1733
|
+
const [profileName, targetContainerId, socket, closedInventory, expectedImage, initialSnapshot] = process.argv.slice(2)
|
|
1734
|
+
if (!profileName || !targetContainerId || !socket || !closedInventory || !expectedImage || !initialSnapshot || process.argv.length !== 8) throw new Error("usage: broker <staging|final> <target-container-id> <socket> <closed-inventory> <expected-image-id> <initial-snapshot>")
|
|
1735
|
+
activeProfile = targetProfile(profileName)
|
|
1736
|
+
activeContainer = activeProfile.containerName
|
|
1737
|
+
activeContainerId = text(targetContainerId, "attested target container id", SHA256)
|
|
1738
|
+
expectedImageId = text(expectedImage, "expected image id", IMAGE_ID)
|
|
1739
|
+
rmSync(socket, { force: true })
|
|
1740
|
+
writeClosedInventory(closedInventory)
|
|
1741
|
+
const snapshot = await containerSnapshot(expectedImageId)
|
|
1742
|
+
const snapshotFd = openSync(initialSnapshot, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL, 0o600)
|
|
1743
|
+
try { writeFileSync(snapshotFd, `${JSON.stringify(snapshot)}\n`); fsyncSync(snapshotFd) } finally { closeSync(snapshotFd) }
|
|
1744
|
+
chownSync(initialSnapshot, 0, 0)
|
|
1745
|
+
const { server, dispatchDrain } = createBrokerServer()
|
|
1741
1746
|
server.listen(socket, () => {
|
|
1742
1747
|
chownSync(socket, 0, 10001)
|
|
1743
1748
|
chmodSync(socket, 0o660)
|
|
@@ -1769,6 +1774,7 @@ export {
|
|
|
1769
1774
|
armRestartAfterResponseClosed,
|
|
1770
1775
|
completeHealthProbeFromReceipt,
|
|
1771
1776
|
createDispatchDrain,
|
|
1777
|
+
createBrokerServer,
|
|
1772
1778
|
createHealthProbeOperationCoordinator,
|
|
1773
1779
|
createOwnerMutationCoordinator,
|
|
1774
1780
|
createInteractiveRestartDriver,
|
|
@@ -411,7 +411,7 @@ run_harness() {
|
|
|
411
411
|
--user 10001:10001 --read-only --cap-drop ALL --security-opt no-new-privileges \
|
|
412
412
|
--mount "type=bind,src=$CONFIG_PATH,dst=/run/ouro-acceptance/config.json,readonly" \
|
|
413
413
|
--mount "type=bind,src=$EVIDENCE_ROOT,dst=/evidence" \
|
|
414
|
-
--mount "type=bind,src=$RUNTIME_ROOT,dst=/home/ouro/.ouro-cli
|
|
414
|
+
--mount "type=bind,src=$RUNTIME_ROOT,dst=/home/ouro/.ouro-cli" \
|
|
415
415
|
--mount "type=bind,src=$BUNDLE_ROOT,dst=/home/ouro/AgentBundles/sanctuary.ouro$BUNDLE_SUFFIX" \
|
|
416
416
|
--mount "type=bind,src=$POLLER_FACT,dst=/run/ouro-acceptance/telegram-poller-count.json,readonly" \
|
|
417
417
|
--mount "type=bind,src=$IMAGE_FACT,dst=/run/ouro-acceptance/image-digest,readonly" \
|
|
@@ -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.
|
|
4
|
+
<Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.764</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ouro.bot/cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.764",
|
|
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.
|
|
9
|
+
"version": "0.1.0-alpha.764",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
12
12
|
"@azure/identity": "^4.13.0",
|