@ouro.bot/cli 0.1.0-alpha.1397 → 0.1.0-alpha.1398
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 +6 -0
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/dist/senses/bluebubbles/client.js +8 -1
- package/dist/senses/bluebubbles/host-account-verifier.js +13 -5
- package/dist/senses/bluebubbles/index.js +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
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.1398",
|
|
6
|
+
"changes": [
|
|
7
|
+
"iMessage sends go through BlueBubbles' Private API helper whenever the server reports it connected, instead of AppleScript into Messages, which macOS can refuse (-1743) and which held Slugger's sends for minutes on 2026-11-23. Each send start says which method it used."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.1397",
|
|
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.1398</Repository>
|
|
5
5
|
<Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
|
|
6
6
|
<Network>host</Network>
|
|
7
7
|
<Shell>sh</Shell>
|
|
@@ -290,7 +290,7 @@ function createBlueBubblesClient(config = (0, config_1.getBlueBubblesConfig)(),
|
|
|
290
290
|
if (!trimmedText) {
|
|
291
291
|
throw new Error("BlueBubbles send requires non-empty text.");
|
|
292
292
|
}
|
|
293
|
-
await assertHostAccount({ fresh: true });
|
|
293
|
+
const server = await assertHostAccount({ fresh: true });
|
|
294
294
|
const resolvedChatGuid = await resolveChatGuid(params.chat, config, channelConfig);
|
|
295
295
|
if (!resolvedChatGuid) {
|
|
296
296
|
// Nothing reached the server, so a caller may safely send again once the chat exists.
|
|
@@ -305,6 +305,12 @@ function createBlueBubblesClient(config = (0, config_1.getBlueBubblesConfig)(),
|
|
|
305
305
|
tempGuid: params.tempGuid?.trim() || (0, node_crypto_1.randomUUID)(),
|
|
306
306
|
message: trimmedText,
|
|
307
307
|
};
|
|
308
|
+
// Left to itself, BlueBubbles sends through AppleScript into Messages, which macOS can refuse ("Not authorized to
|
|
309
|
+
// send Apple events to Messages", -1743) until Messages restarts, holding the send for minutes. The Private API
|
|
310
|
+
// helper sends from inside Messages without Apple events, so every send uses it while the server reports it
|
|
311
|
+
// connected (the fresh server info above).
|
|
312
|
+
if (server?.privateApiReady === true)
|
|
313
|
+
body.method = "private-api";
|
|
308
314
|
if (params.replyToMessageGuid?.trim()) {
|
|
309
315
|
body.method = "private-api";
|
|
310
316
|
body.selectedMessageGuid = params.replyToMessageGuid.trim();
|
|
@@ -317,6 +323,7 @@ function createBlueBubblesClient(config = (0, config_1.getBlueBubblesConfig)(),
|
|
|
317
323
|
meta: {
|
|
318
324
|
chatGuid: resolvedChatGuid,
|
|
319
325
|
hasReplyTarget: Boolean(params.replyToMessageGuid?.trim()),
|
|
326
|
+
method: body.method === "private-api" ? "private-api" : "server-default",
|
|
320
327
|
},
|
|
321
328
|
});
|
|
322
329
|
const requestTimeoutSignal = AbortSignal.timeout(channelConfig.requestTimeoutMs);
|
|
@@ -42,7 +42,7 @@ function serverInfoUrl(serverUrl, password) {
|
|
|
42
42
|
url.searchParams.set("password", password);
|
|
43
43
|
return url.toString();
|
|
44
44
|
}
|
|
45
|
-
async function
|
|
45
|
+
async function readServerInfo(input) {
|
|
46
46
|
try {
|
|
47
47
|
const response = await (input.fetchImpl ?? fetch)(serverInfoUrl(input.serverUrl, input.password), {
|
|
48
48
|
method: "GET",
|
|
@@ -56,12 +56,18 @@ async function readServerUsername(input) {
|
|
|
56
56
|
return null;
|
|
57
57
|
const at = computerId.indexOf("@");
|
|
58
58
|
const username = at > 0 ? computerId.slice(0, at) : "";
|
|
59
|
-
|
|
59
|
+
if (!username)
|
|
60
|
+
return null;
|
|
61
|
+
return { username, facts: { privateApiReady: body.data?.private_api === true && body.data?.helper_connected === true } };
|
|
60
62
|
}
|
|
61
63
|
catch {
|
|
62
64
|
return null;
|
|
63
65
|
}
|
|
64
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Confirms the server runs under the agent's host account, and returns what that server info call said about its
|
|
69
|
+
* Private API helper. A recent confirmation reused without a call returns nothing.
|
|
70
|
+
*/
|
|
65
71
|
async function verifyBlueBubblesServerAccount(input) {
|
|
66
72
|
const { agent, hostUsername, serverUrl } = input;
|
|
67
73
|
if (hostUsername === undefined) {
|
|
@@ -72,12 +78,13 @@ async function verifyBlueBubblesServerAccount(input) {
|
|
|
72
78
|
const key = `${serverUrl}\u0000${hostUsername}`;
|
|
73
79
|
const cached = verifiedAt.get(key);
|
|
74
80
|
if (!input.fresh && cached !== undefined && now - cached < VERIFIED_TTL_MS)
|
|
75
|
-
return;
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
81
|
+
return undefined;
|
|
82
|
+
const info = await readServerInfo(input);
|
|
83
|
+
if (info === null) {
|
|
78
84
|
verifiedAt.delete(key);
|
|
79
85
|
refuse(`BlueBubbles refused for agent "${agent}": could not confirm which macOS account the BlueBubbles server at ${serverUrl} runs under. Not acting.`, { agent, reason: "unconfirmed", hostUsername });
|
|
80
86
|
}
|
|
87
|
+
const serverUsername = info.username;
|
|
81
88
|
if (serverUsername !== hostUsername) {
|
|
82
89
|
verifiedAt.delete(key);
|
|
83
90
|
refuse(`BlueBubbles refused for agent "${agent}": the BlueBubbles server at ${serverUrl} runs under macOS account "${serverUsername}", `
|
|
@@ -85,4 +92,5 @@ async function verifyBlueBubblesServerAccount(input) {
|
|
|
85
92
|
+ `Fix: run BlueBubbles under "${hostUsername}" and point bluebubbles.serverUrl at it. Changing senses.bluebubbles.hostUsername is a human decision, because it chooses whose Apple ID the agent speaks as.`, { agent, reason: "mismatch", hostUsername, serverUsername });
|
|
86
93
|
}
|
|
87
94
|
verifiedAt.set(key, now);
|
|
95
|
+
return info.facts;
|
|
88
96
|
}
|
|
@@ -426,7 +426,7 @@ const defaultDeps = {
|
|
|
426
426
|
password: (0, config_1.getBlueBubblesConfig)().password,
|
|
427
427
|
requestTimeoutMs: (0, config_1.getBlueBubblesChannelConfig)().requestTimeoutMs,
|
|
428
428
|
fresh: true,
|
|
429
|
-
}),
|
|
429
|
+
}).then(() => undefined),
|
|
430
430
|
};
|
|
431
431
|
const BLUEBUBBLES_RUNTIME_SYNC_INTERVAL_MS = 30_000;
|
|
432
432
|
/** After a failed sync, the next one comes sooner than the interval: 5 s, then 10 s, then 20 s. */
|
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.1398",
|
|
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.1398",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"@ouro.bot/friends"
|
|
12
12
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ouro.bot/cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.1398",
|
|
4
4
|
"description": "Ouroboros, the agent harness: agents with durable memory that live where you talk (terminal, Teams, iMessage, mail, voice) and use real tools. Start with npx ouro.bot@latest.",
|
|
5
5
|
"homepage": "https://ouroboros.bot/",
|
|
6
6
|
"engines": {
|