@ouro.bot/cli 0.1.0-alpha.1026 → 0.1.0-alpha.1029
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.1029",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Account pool: the fleet burn file is named by this Mac's LocalHostName (else the host name), so two Macs with a generic host name such as \"Mac\" never write the same file."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.1026",
|
|
6
12
|
"changes": [
|
|
@@ -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.
|
|
4
|
+
<Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1029</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.AccountPool = exports.accountKey = void 0;
|
|
37
|
+
exports.defaultMachineName = defaultMachineName;
|
|
37
38
|
exports.apiBaseForHost = apiBaseForHost;
|
|
38
39
|
exports.isWorkAccount = isWorkAccount;
|
|
39
40
|
exports.globMatch = globMatch;
|
|
@@ -59,6 +60,21 @@ const tranche_1 = require("../quota/tranche");
|
|
|
59
60
|
const fleet_readings_1 = require("../quota/fleet-readings");
|
|
60
61
|
const accountKey = (account) => `${account.login}@${account.host}`;
|
|
61
62
|
exports.accountKey = accountKey;
|
|
63
|
+
/**
|
|
64
|
+
* This Mac's name for the fleet gist: macOS's LocalHostName (unique on the network, and what the fleet tooling
|
|
65
|
+
* keys Macs by), else the host name, lowercased with no dots. Generic host names such as "Mac" would make two
|
|
66
|
+
* machines write one file.
|
|
67
|
+
*/
|
|
68
|
+
function defaultMachineName(deps = {}) {
|
|
69
|
+
let name = "";
|
|
70
|
+
if ((deps.platform ?? process.platform) === "darwin") {
|
|
71
|
+
const result = spawnOf(deps)("/usr/sbin/scutil", ["--get", "LocalHostName"], { encoding: "utf8", timeout: 3000 });
|
|
72
|
+
name = result.status === 0 ? String(result.stdout ?? "").trim() : "";
|
|
73
|
+
}
|
|
74
|
+
if (!name)
|
|
75
|
+
name = (deps.hostname ?? os.hostname)().split(".")[0];
|
|
76
|
+
return name.toLowerCase().replace(/[^a-z0-9-]+/g, "-");
|
|
77
|
+
}
|
|
62
78
|
function apiBaseForHost(host) {
|
|
63
79
|
return host === "github.com" ? "https://api.github.com" : `https://api.${host}`;
|
|
64
80
|
}
|
|
@@ -272,6 +288,7 @@ class AccountPool {
|
|
|
272
288
|
lastPublish = -Infinity;
|
|
273
289
|
lastPublished = "";
|
|
274
290
|
loadedReadings = false;
|
|
291
|
+
machineName = null;
|
|
275
292
|
refreshing = null;
|
|
276
293
|
options;
|
|
277
294
|
constructor(accounts, options) {
|
|
@@ -441,7 +458,7 @@ class AccountPool {
|
|
|
441
458
|
this.lastPublished = signature;
|
|
442
459
|
void publish({
|
|
443
460
|
agent: this.options.agent,
|
|
444
|
-
machine: this.options.machine ??
|
|
461
|
+
machine: this.options.machine ?? (this.machineName ??= (this.options.machineName ?? defaultMachineName)()),
|
|
445
462
|
at: new Date(now).toISOString(),
|
|
446
463
|
...content,
|
|
447
464
|
});
|
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.1029",
|
|
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.1029",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
12
12
|
"@ouro.bot/friends": "0.1.0-alpha.17",
|