@ouro.bot/cli 0.1.0-alpha.857 → 0.1.0-alpha.859

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.859",
6
+ "changes": [
7
+ "The Telegram sense no longer re-reads and re-parses every external-event record (hundreds of files, about 11 MB) each second for its system-failsafe sweep; it now reuses the stat-keyed record cache, cutting the Butler's idle Telegram CPU. The trade is memory: parsed records now stay cached in the sense process for its lifetime, so heap grows by roughly the size of the usenet records."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.857",
6
12
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.857",
2
+ "runtimeVersion": "0.1.0-alpha.859",
3
3
  "bundleSchemaVersion": 3,
4
4
  "lastUpdated": "2026-09-03T00:00:00.000Z"
5
5
  }
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0"?>
2
2
  <Container version="2">
3
3
  <Name>ouro-butler</Name>
4
- <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.857</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.859</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -599,11 +599,15 @@ async function reconcileTelegramSystemFailsafe(input) {
599
599
  return { sent: true, reason: "sent", artifactId: artifact.id };
600
600
  }
601
601
  async function sweepTelegramSystemFailsafes(input) {
602
- const records = (0, router_1.listExternalEventStatus)(input.eventRoot).filter((status) => !status.corrupt && status.agent === "sanctuary" && status.source === "sanctuary-usenet").slice(0, 32);
602
+ const scanned = (input.scanCache ?? new router_1.ExternalEventScanCache()).scan(input.eventRoot);
603
+ const records = scanned
604
+ .flatMap((entry) => entry.record && entry.record.agent === "sanctuary" && entry.record.source === "sanctuary-usenet" && !entry.record.privilegedFailsafe ? [entry.record] : [])
605
+ .sort((left, right) => left.eventId.localeCompare(right.eventId))
606
+ .slice(0, 32);
603
607
  let sent = 0;
604
- for (const status of records) {
608
+ for (const cached of records) {
605
609
  const result = await reconcileTelegramSystemFailsafe({
606
- record: (0, router_1.readExternalEventRecord)(status.recordPath),
610
+ record: cached,
607
611
  ...(input.now ? { now: input.now } : {}),
608
612
  target: input.target,
609
613
  verifyProtectiveState: input.verifyProtectiveState,
@@ -1176,6 +1176,7 @@ function createTelegramSenseApp(options) {
1176
1176
  },
1177
1177
  }),
1178
1178
  });
1179
+ const failsafeScanCache = new router_1.ExternalEventScanCache();
1179
1180
  reconcileSystemFailsafes = async () => {
1180
1181
  if (!options.privilegedFailsafe)
1181
1182
  return;
@@ -1185,6 +1186,7 @@ function createTelegramSenseApp(options) {
1185
1186
  eventRoot: options.privilegedFailsafe.eventRoot,
1186
1187
  target,
1187
1188
  verifyProtectiveState: options.privilegedFailsafe.verifyProtectiveState,
1189
+ scanCache: failsafeScanCache,
1188
1190
  execute: executeAuthorizedEffect,
1189
1191
  recordArtifact: async (artifact) => {
1190
1192
  await recordAcceptedEffects((0, shared_turn_1.getSenseSessionPath)(options.agentName, target.friendId, "telegram", target.sessionKey, agentRoot), [artifact]);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.857",
3
+ "version": "0.1.0-alpha.859",
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.857",
9
+ "version": "0.1.0-alpha.859",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.78.0",
12
12
  "@azure/identity": "^4.13.0",
@@ -6532,9 +6532,9 @@
6532
6532
  }
6533
6533
  },
6534
6534
  "node_modules/proxy-addr": {
6535
- "version": "2.0.7",
6536
- "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
6537
- "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
6535
+ "version": "2.0.8",
6536
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.8.tgz",
6537
+ "integrity": "sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==",
6538
6538
  "license": "MIT",
6539
6539
  "dependencies": {
6540
6540
  "forwarded": "0.2.0",
@@ -6542,6 +6542,10 @@
6542
6542
  },
6543
6543
  "engines": {
6544
6544
  "node": ">= 0.10"
6545
+ },
6546
+ "funding": {
6547
+ "type": "opencollective",
6548
+ "url": "https://opencollective.com/express"
6545
6549
  }
6546
6550
  },
6547
6551
  "node_modules/proxy-from-env": {
@@ -7155,9 +7159,9 @@
7155
7159
  }
7156
7160
  },
7157
7161
  "node_modules/source-map-js": {
7158
- "version": "1.2.1",
7159
- "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
7160
- "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
7162
+ "version": "1.2.2",
7163
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz",
7164
+ "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==",
7161
7165
  "dev": true,
7162
7166
  "license": "BSD-3-Clause",
7163
7167
  "engines": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.857",
3
+ "version": "0.1.0-alpha.859",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },