@ouro.bot/cli 0.1.0-alpha.753 → 0.1.0-alpha.755
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 +13 -0
- package/deploy/unraid/README.txt +16 -1
- package/deploy/unraid/ouro-events/usenet-health.sh +5 -7
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/dist/heart/autonomy-budget.js +2 -1
- package/dist/senses/telegram.js +4 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/changelog.json
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
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.755",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Preserve canonical Telegram owner identity across restarts.",
|
|
8
|
+
"Validate and accept SAB array or object server stats without failing open on malformed or unsafe counts."
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"version": "0.1.0-alpha.754",
|
|
13
|
+
"changes": [
|
|
14
|
+
"Write autonomy budget receipts privately and preserve exact legacy receipt compatibility during strict Sanctuary backup and restore validation."
|
|
15
|
+
]
|
|
16
|
+
},
|
|
4
17
|
{
|
|
5
18
|
"version": "0.1.0-alpha.753",
|
|
6
19
|
"changes": [
|
package/deploy/unraid/README.txt
CHANGED
|
@@ -399,13 +399,28 @@ Effective-spec audit helper:
|
|
|
399
399
|
-path "$VALIDATE_RUNTIME_ROOT/daemon-health.json" \
|
|
400
400
|
\) \) -print -quit) || return $?
|
|
401
401
|
test -z "$VALIDATE_WRONG_RUNTIME_FILE_MODE" || return $?
|
|
402
|
+
# Alpha.753 and earlier wrote content-free autonomy receipts as 0644 below a 0700 tree.
|
|
403
|
+
# Preserve those audit records; current writers create and normalize this exact format to 0600.
|
|
402
404
|
VALIDATE_WRONG_AGENT_FILE_MODE=$(find "$VALIDATE_AGENT_ROOT" -xdev -type f ! -perm 0600 \
|
|
403
405
|
! \( -perm 0644 \( \
|
|
404
406
|
-path "$VALIDATE_AGENT_ROOT/arc/flight-recorder/*" -o \
|
|
405
407
|
-path "$VALIDATE_AGENT_ROOT/state/health/*" -o \
|
|
406
408
|
-path "$VALIDATE_AGENT_ROOT/state/logs/*" -o \
|
|
407
409
|
-path "$VALIDATE_AGENT_ROOT/state/habits/*" -o \
|
|
408
|
-
-path "$VALIDATE_AGENT_ROOT/state/arc/context-loss-sentinel-watermark.json" \
|
|
410
|
+
-path "$VALIDATE_AGENT_ROOT/state/arc/context-loss-sentinel-watermark.json" -o \
|
|
411
|
+
-exec /bin/sh -c '
|
|
412
|
+
VALIDATE_AUTONOMY_RECEIPT=$1
|
|
413
|
+
VALIDATE_AUTONOMY_RECEIPTS_ROOT=$2
|
|
414
|
+
test "${VALIDATE_AUTONOMY_RECEIPT%/*}" = "$VALIDATE_AUTONOMY_RECEIPTS_ROOT" || exit 1
|
|
415
|
+
VALIDATE_AUTONOMY_RECEIPT_NAME=${VALIDATE_AUTONOMY_RECEIPT##*/}
|
|
416
|
+
case "$VALIDATE_AUTONOMY_RECEIPT_NAME" in
|
|
417
|
+
autr_????????????????????????????????.json) ;;
|
|
418
|
+
*) exit 1 ;;
|
|
419
|
+
esac
|
|
420
|
+
VALIDATE_AUTONOMY_RECEIPT_ID=${VALIDATE_AUTONOMY_RECEIPT_NAME#autr_}
|
|
421
|
+
VALIDATE_AUTONOMY_RECEIPT_ID=${VALIDATE_AUTONOMY_RECEIPT_ID%.json}
|
|
422
|
+
case "$VALIDATE_AUTONOMY_RECEIPT_ID" in *[!0-9a-f]*) exit 1 ;; esac
|
|
423
|
+
' sanctuary-autonomy-receipt-validator {} "$VALIDATE_AGENT_ROOT/state/autonomy/receipts" \; \
|
|
409
424
|
\) \) -print -quit) || return $?
|
|
410
425
|
test -z "$VALIDATE_WRONG_AGENT_FILE_MODE" || return $?
|
|
411
426
|
)
|
|
@@ -88,13 +88,11 @@ if [ "$Q_STATUS" = "Idle" ] && [ "${Q_SLOTS:-0}" -gt 0 ]; then STALLED=1; fi
|
|
|
88
88
|
MIN_ARTICLES=50000
|
|
89
89
|
MIN_RATE=30
|
|
90
90
|
TODAY=$(date +%Y-%m-%d)
|
|
91
|
-
fetch_sab_json STATS 20 "http://localhost:8090/api?mode=server_stats&output=json" '(.servers | type) == "array"' "server-stats" || exit 1
|
|
92
|
-
TRIED
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
case "$OKAY" in ''|*[!0-9]*) OKAY=0 ;; esac
|
|
97
|
-
case "$BYTES" in ''|*[!0-9]*) BYTES=0 ;; esac
|
|
91
|
+
fetch_sab_json STATS 20 "http://localhost:8090/api?mode=server_stats&output=json" 'def valid_count: ((type == "number" and . >= 0 and . <= 9007199254740991 and floor == .) or (type == "string" and test("^[0-9]+$") and (tonumber <= 9007199254740991))); ((.servers | type) == "array" or (.servers | type) == "object") and (.servers | length) > 0 and all(.servers[]; (type == "object") and (.articles_tried | type) == "object" and (.articles_success | type) == "object" and (.daily | type) == "object" and all(.articles_tried[]; valid_count) and all(.articles_success[]; valid_count) and all(.daily[]; valid_count))' "server-stats" || exit 1
|
|
92
|
+
if ! IFS=$'\t' read -r TRIED OKAY BYTES < <(printf '%s' "$STATS" | jq -er --arg d "$TODAY" 'def count: if type == "number" and . >= 0 and . <= 9007199254740991 and floor == . then . elif type == "string" and test("^[0-9]+$") and (tonumber <= 9007199254740991) then tonumber else error("invalid server count") end; def total($field): ([.servers[] | (.[$field][$d] // 0) | count] | add) as $total | if $total >= 0 and $total <= 9007199254740991 and ($total | floor) == $total then $total else error("invalid aggregate server count") end; [total("articles_tried"), total("articles_success"), total("daily")] | @tsv' 2>/dev/null); then
|
|
93
|
+
emit_blind_observation "server-stats-response"
|
|
94
|
+
exit 1
|
|
95
|
+
fi
|
|
98
96
|
GB=$(( ${BYTES:-0} / 1000000000 ))
|
|
99
97
|
|
|
100
98
|
BASE_DAY=""
|
|
@@ -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.755</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -204,7 +204,8 @@ function writeReceipt(agentRoot, decision) {
|
|
|
204
204
|
};
|
|
205
205
|
const filePath = path.join(autonomyReceiptsDir(agentRoot), `${receiptId}.json`);
|
|
206
206
|
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
207
|
-
fs.writeFileSync(filePath, `${JSON.stringify(receipt, null, 2)}\n`, "utf-8");
|
|
207
|
+
fs.writeFileSync(filePath, `${JSON.stringify(receipt, null, 2)}\n`, { encoding: "utf-8", mode: 0o600 });
|
|
208
|
+
fs.chmodSync(filePath, 0o600);
|
|
208
209
|
return receipt;
|
|
209
210
|
}
|
|
210
211
|
function duplicateTtlMs(triggerType, policy) {
|
package/dist/senses/telegram.js
CHANGED
|
@@ -924,12 +924,14 @@ function createTelegramSenseApp(options) {
|
|
|
924
924
|
acceptanceAuditBarrier();
|
|
925
925
|
migrateTelegramSessionIdentity(agentRoot, legacySubject, legacySubject, subject);
|
|
926
926
|
acceptanceAuditBarrier();
|
|
927
|
-
|
|
927
|
+
if (!options.admission)
|
|
928
|
+
await migrateTelegramFriendIdentity(agentRoot, legacySubject, subject);
|
|
928
929
|
}
|
|
929
930
|
acceptanceAuditBarrier();
|
|
930
931
|
migrateTelegramSessionIdentity(agentRoot, authorizedUserId, authorizedChatId, subject);
|
|
931
932
|
acceptanceAuditBarrier();
|
|
932
|
-
|
|
933
|
+
if (!options.admission)
|
|
934
|
+
await migrateTelegramFriendIdentity(agentRoot, authorizedUserId, subject);
|
|
933
935
|
acceptanceAuditBarrier();
|
|
934
936
|
approvalRuntime?.migrateIdentity?.(migrationSubjects);
|
|
935
937
|
acceptanceAuditBarrier();
|
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.755",
|
|
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.755",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
12
12
|
"@azure/identity": "^4.13.0",
|