@ouro.bot/cli 0.1.0-alpha.1015 → 0.1.0-alpha.1016

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.1016",
6
+ "changes": [
7
+ "An agent with a Copilot account pool writes its fleet gist file only when it changed, at most every 30 minutes and at least every 5 hours, to stay inside GitHub's shared gist write budget."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.1015",
6
12
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1015",
2
+ "runtimeVersion": "0.1.0-alpha.1016",
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.1015</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1016</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -270,6 +270,7 @@ class AccountPool {
270
270
  requests = [];
271
271
  lastRefresh = -Infinity;
272
272
  lastPublish = -Infinity;
273
+ lastPublished = "";
273
274
  loadedReadings = false;
274
275
  refreshing = null;
275
276
  options;
@@ -371,26 +372,36 @@ class AccountPool {
371
372
  this.publishIfDue();
372
373
  }
373
374
  /**
374
- * Rewrite this agent's file in the fleet gist every few minutes while it runs, once readings have loaded
375
- * (so a process that just started never blanks the agent's published readings).
375
+ * Rewrite this agent's file in the fleet gist when it has changed, at most every 30 minutes (GitHub allows
376
+ * 100 gist writes an hour per user, shared by the whole fleet), and at least every 5 hours so the balancer,
377
+ * which trusts a reading for 6 hours, keeps it. Never before readings have loaded, so a process that just
378
+ * started never blanks the agent's published readings. Switching accounts never waits on this.
376
379
  */
377
380
  publishIfDue() {
378
381
  const now = this.now();
379
382
  const publish = this.options.publishBurn;
380
383
  const loaded = this.loadedReadings || !this.options.loadReadings;
381
- if (!publish || !loaded || now - this.lastPublish < (this.options.publishMs ?? 5 * 60 * 1000))
384
+ if (!publish || !loaded || now - this.lastPublish < (this.options.publishMs ?? 30 * 60 * 1000))
382
385
  return;
383
- this.lastPublish = now;
384
- void publish({
385
- agent: this.options.agent,
386
- machine: this.options.machine ?? os.hostname().split(".")[0].toLowerCase().replace(/\./g, "-"),
387
- at: new Date(now).toISOString(),
386
+ const content = {
388
387
  current: this.currentKey,
389
388
  requestsPerH: this.agentBurnPerH(now),
390
389
  readings: this.accounts.map(exports.accountKey).flatMap((key) => {
391
390
  const found = this.readings.find((reading) => reading.key === key);
392
391
  return found ? [found] : [];
393
392
  }),
393
+ };
394
+ const signature = JSON.stringify(content);
395
+ const stale = now - this.lastPublish >= (this.options.republishMs ?? 5 * 60 * 60 * 1000);
396
+ if (signature === this.lastPublished && !stale)
397
+ return;
398
+ this.lastPublish = now;
399
+ this.lastPublished = signature;
400
+ void publish({
401
+ agent: this.options.agent,
402
+ machine: this.options.machine ?? os.hostname().split(".")[0].toLowerCase().replace(/\./g, "-"),
403
+ at: new Date(now).toISOString(),
404
+ ...content,
394
405
  });
395
406
  }
396
407
  /** Share this process's last-hour request times with the agent's other processes. */
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1015",
3
+ "version": "0.1.0-alpha.1016",
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.1015",
9
+ "version": "0.1.0-alpha.1016",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.78.0",
12
12
  "@bitwarden/cli": "2026.9.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1015",
3
+ "version": "0.1.0-alpha.1016",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },