@ouro.bot/cli 0.1.0-alpha.774 → 0.1.0-alpha.775
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.775",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Let routine Sanctuary updates validate the exact healthy live Telegram control socket, safely tighten known private permission drift, and surface redacted readiness failures."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.774",
|
|
6
12
|
"changes": [
|
package/deploy/unraid/README.txt
CHANGED
|
@@ -355,11 +355,24 @@ Effective-spec audit helper:
|
|
|
355
355
|
(
|
|
356
356
|
VALIDATE_RUNTIME_ROOT=$1
|
|
357
357
|
VALIDATE_AGENT_ROOT=$2
|
|
358
|
+
VALIDATE_CONTEXT=${3:-strict}
|
|
359
|
+
case "$VALIDATE_CONTEXT" in strict|live-precutover) ;; *) return 1 ;; esac
|
|
358
360
|
test -d "$VALIDATE_RUNTIME_ROOT" || return $?
|
|
359
361
|
test -d "$VALIDATE_AGENT_ROOT" || return $?
|
|
360
|
-
|
|
362
|
+
VALIDATE_CONTROL_SOCKET=$VALIDATE_AGENT_ROOT/state/acceptance/telegram-control.sock
|
|
363
|
+
if test "$VALIDATE_CONTEXT" = live-precutover; then
|
|
364
|
+
test ! -L "$VALIDATE_CONTROL_SOCKET" || return 1
|
|
365
|
+
test -S "$VALIDATE_CONTROL_SOCKET" || return 1
|
|
366
|
+
test "$(stat -c '%u:%g:%a' "$VALIDATE_CONTROL_SOCKET")" = 10001:10001:755 || return $?
|
|
367
|
+
VALIDATE_BAD_SHAPE=$(find "$VALIDATE_RUNTIME_ROOT" "$VALIDATE_AGENT_ROOT" -xdev \( -type l -o \( ! -type d -a ! -type f -a ! \( -type s -a -path "$VALIDATE_CONTROL_SOCKET" \) \) \) -print -quit) || return $?
|
|
368
|
+
VALIDATE_UNEXPECTED_SOCKET=$(find "$VALIDATE_RUNTIME_ROOT" "$VALIDATE_AGENT_ROOT" -xdev -type s ! -path "$VALIDATE_CONTROL_SOCKET" -print -quit) || return $?
|
|
369
|
+
else
|
|
370
|
+
test ! -S "$VALIDATE_AGENT_ROOT/state/acceptance/telegram-control.sock" || return $?
|
|
371
|
+
test ! -e "$VALIDATE_CONTROL_SOCKET" || return $?
|
|
372
|
+
VALIDATE_BAD_SHAPE=$(find "$VALIDATE_RUNTIME_ROOT" "$VALIDATE_AGENT_ROOT" -xdev \( -type l -o \( ! -type d -a ! -type f \) \) -print -quit) || return $?
|
|
373
|
+
VALIDATE_UNEXPECTED_SOCKET=$(find "$VALIDATE_RUNTIME_ROOT" "$VALIDATE_AGENT_ROOT" -xdev -type s -print -quit) || return $?
|
|
374
|
+
fi
|
|
361
375
|
test -z "$VALIDATE_BAD_SHAPE" || return $?
|
|
362
|
-
VALIDATE_UNEXPECTED_SOCKET=$(find "$VALIDATE_RUNTIME_ROOT" "$VALIDATE_AGENT_ROOT" -xdev -type s -print -quit) || return $?
|
|
363
376
|
test -z "$VALIDATE_UNEXPECTED_SOCKET" || return $?
|
|
364
377
|
for VALIDATE_REQUIRED_FILE in \
|
|
365
378
|
agent.json bundle-meta.json provider-readiness.json tool-profiles.json \
|
|
@@ -371,7 +384,6 @@ Effective-spec audit helper:
|
|
|
371
384
|
test "$(printf '%s\n' "$VALIDATE_UNLOCK_FILES" | awk 'NF { count++ } END { print count + 0 }')" = 1 || return $?
|
|
372
385
|
test ! -e "$VALIDATE_RUNTIME_ROOT/container-credentials.json" || return $?
|
|
373
386
|
test ! -e "$VALIDATE_RUNTIME_ROOT/container-credentials.json.consuming" || return $?
|
|
374
|
-
test ! -S "$VALIDATE_AGENT_ROOT/state/acceptance/telegram-control.sock" || return $?
|
|
375
387
|
VALIDATE_WRONG_OWNER=$(find "$VALIDATE_RUNTIME_ROOT" "$VALIDATE_AGENT_ROOT" -xdev \( ! -user 10001 -o ! -group 10001 \) -print -quit) || return $?
|
|
376
388
|
test -z "$VALIDATE_WRONG_OWNER" || return $?
|
|
377
389
|
VALIDATE_WRONG_RUNTIME_DIR_MODE=$(find "$VALIDATE_RUNTIME_ROOT" -xdev -type d ! -perm 0700 \
|
|
@@ -425,6 +437,44 @@ Effective-spec audit helper:
|
|
|
425
437
|
test -z "$VALIDATE_WRONG_AGENT_FILE_MODE" || return $?
|
|
426
438
|
)
|
|
427
439
|
}
|
|
440
|
+
normalize_sanctuary_private_permissions() {
|
|
441
|
+
(
|
|
442
|
+
NORMALIZE_RUNTIME_ROOT=$1
|
|
443
|
+
NORMALIZE_AGENT_ROOT=$2
|
|
444
|
+
NORMALIZE_IMAGE_ID=$3
|
|
445
|
+
test -d "$NORMALIZE_RUNTIME_ROOT" || return $?
|
|
446
|
+
test -d "$NORMALIZE_AGENT_ROOT" || return $?
|
|
447
|
+
validate_exact_image_id "$NORMALIZE_IMAGE_ID" || return $?
|
|
448
|
+
docker run --rm --pull=never --network none --user 10001:10001 \
|
|
449
|
+
--read-only --cap-drop ALL --security-opt no-new-privileges \
|
|
450
|
+
--mount "type=bind,src=$NORMALIZE_RUNTIME_ROOT,dst=/normalize/runtime" \
|
|
451
|
+
--mount "type=bind,src=$NORMALIZE_AGENT_ROOT,dst=/normalize/agent" \
|
|
452
|
+
--entrypoint /bin/sh "$NORMALIZE_IMAGE_ID" -eu -c '
|
|
453
|
+
find /normalize/runtime /normalize/agent -xdev -type d -user 10001 -group 10001 -perm 0755 \
|
|
454
|
+
! -path "/normalize/runtime/scheduler" ! -path "/normalize/runtime/scheduler/*" \
|
|
455
|
+
! -path "/normalize/runtime/daemon/logs" ! -path "/normalize/runtime/daemon/logs/*" \
|
|
456
|
+
! -path "/normalize/runtime/daemon/external-events" ! -path "/normalize/runtime/daemon/external-events/*" \
|
|
457
|
+
! -path "/normalize/agent/arc/flight-recorder" ! -path "/normalize/agent/arc/flight-recorder/*" \
|
|
458
|
+
! -path "/normalize/agent/state/health" ! -path "/normalize/agent/state/health/*" \
|
|
459
|
+
! -path "/normalize/agent/state/logs" ! -path "/normalize/agent/state/logs/*" \
|
|
460
|
+
! -path "/normalize/agent/state/habits" ! -path "/normalize/agent/state/habits/*" \
|
|
461
|
+
-exec chmod 0700 {} +
|
|
462
|
+
find /normalize/runtime /normalize/agent -xdev -type f -links 1 -user 10001 -group 10001 -perm 0644 \
|
|
463
|
+
! -path "/normalize/runtime/daemon/logs/*" \
|
|
464
|
+
! -path "/normalize/runtime/scheduler/*" \
|
|
465
|
+
! -path "/normalize/runtime/pulse.json" \
|
|
466
|
+
! -path "/normalize/runtime/pulse-delivered.json" \
|
|
467
|
+
! -path "/normalize/runtime/daemon.pids" \
|
|
468
|
+
! -path "/normalize/runtime/daemon-health.json" \
|
|
469
|
+
! -path "/normalize/agent/arc/flight-recorder/*" \
|
|
470
|
+
! -path "/normalize/agent/state/health/*" \
|
|
471
|
+
! -path "/normalize/agent/state/logs/*" \
|
|
472
|
+
! -path "/normalize/agent/state/habits/*" \
|
|
473
|
+
! -path "/normalize/agent/state/arc/context-loss-sentinel-watermark.json" \
|
|
474
|
+
-exec chmod 0600 {} +
|
|
475
|
+
' || return $?
|
|
476
|
+
)
|
|
477
|
+
}
|
|
428
478
|
verify_sanctuary_snapshot_provenance() {
|
|
429
479
|
(
|
|
430
480
|
SNAPSHOT_ROOT=$1
|
|
@@ -1344,7 +1394,8 @@ NODE
|
|
|
1344
1394
|
--entrypoint /opt/ouro/deploy/unraid/sanctuary-acceptance-adapter.sh \
|
|
1345
1395
|
"$TELEGRAM_READINESS_IMAGE_ID" telegram-readiness >/dev/null || return $?
|
|
1346
1396
|
! docker container inspect ouro-butler-telegram-readiness >/dev/null 2>&1 || return 1
|
|
1347
|
-
|
|
1397
|
+
normalize_sanctuary_private_permissions "$TELEGRAM_READINESS_RUNTIME_ROOT" "$TELEGRAM_READINESS_AGENT_ROOT" "$TELEGRAM_READINESS_IMAGE_ID" || return $?
|
|
1398
|
+
validate_sanctuary_roots "$TELEGRAM_READINESS_RUNTIME_ROOT" "$TELEGRAM_READINESS_AGENT_ROOT" live-precutover || return $?
|
|
1348
1399
|
}
|
|
1349
1400
|
run_sanctuary_docker() {
|
|
1350
1401
|
/usr/bin/timeout -s KILL 20 /usr/bin/docker "$@"
|
|
@@ -6,7 +6,7 @@ VAULT_ENTRY='import("/opt/ouro/dist/heart/daemon/sanctuary-acceptance-adapter.js
|
|
|
6
6
|
REVOKED_ENTRY='import fs from "node:fs"; import("/opt/ouro/dist/heart/daemon/sanctuary-acceptance-adapter.js").then(async (module) => { const result = await module.executeSanctuaryAcceptanceRevokedProbe(process.argv[1], process.argv[2], fs.readFileSync(3, "utf8")); process.stdout.write(JSON.stringify(result)); }).catch(() => { process.exitCode = 1; });'
|
|
7
7
|
CALLBACK_ENTRY='import fs from "node:fs"; import("/opt/ouro/dist/heart/daemon/sanctuary-acceptance-adapter.js").then(async (module) => { const result = await module.executeSanctuaryAcceptanceCallbackProbe(JSON.parse(fs.readFileSync(0, "utf8")), process.argv[1] === "replay"); process.stdout.write(JSON.stringify(result)); }).catch(() => { process.exitCode = 1; });'
|
|
8
8
|
MATERIALIZE_ENTRY='import("/opt/ouro/dist/heart/daemon/sanctuary-acceptance-adapter.js").then(async (module) => { const payload = { operation: "materialize_config", command: process.argv[1] }; if (process.argv[2]) payload.phase = process.argv[2]; const result = await module.executeSanctuaryAcceptanceAdapter(payload); process.stdout.write(JSON.stringify(result)); }).catch(() => { process.exitCode = 1; });'
|
|
9
|
-
TELEGRAM_READINESS_ENTRY='import("/opt/ouro/dist/heart/daemon/sanctuary-acceptance-adapter.js").then(async (module) => { const result = await module.executeSanctuaryAcceptanceAdapter({ operation: "telegram_readiness" }); process.stdout.write(JSON.stringify(result)); }).catch(() => { process.exitCode = 1; });'
|
|
9
|
+
TELEGRAM_READINESS_ENTRY='import("/opt/ouro/dist/heart/daemon/sanctuary-acceptance-adapter.js").then(async (module) => { const result = await module.executeSanctuaryAcceptanceAdapter({ operation: "telegram_readiness" }); process.stdout.write(JSON.stringify(result)); }).catch((error) => { const categories = new Set(["Telegram runtime credentials are unavailable; actor: human-required; unlock or repair vault runtime/config", "Telegram runtime credentials are invalid; actor: human-required; repair vault runtime/config", "Telegram client initialization failed; actor: agent-runnable; retry Telegram readiness", "Telegram getMe failed; actor: agent-runnable; retry Telegram readiness", "Telegram client cleanup failed; actor: agent-runnable; retry Telegram readiness", "Telegram bot identity mismatch; actor: human-required; repair vault runtime/config"]); const message = String(error?.message ?? ""); const category = categories.has(message) ? message : "Telegram readiness failed; actor: agent-runnable; inspect packaged readiness"; process.stderr.write(`${category}\n`); process.exitCode = 1; });'
|
|
10
10
|
|
|
11
11
|
if test "${1:-}" = vault-probe; then
|
|
12
12
|
test "$#" -eq 3 || exit 2
|
|
@@ -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.775</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.775",
|
|
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.775",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
12
12
|
"@azure/identity": "^4.13.0",
|