@spinabot/brigade 1.7.0 → 1.8.0
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/dist/agents/agent-loop.d.ts +13 -0
- package/dist/agents/agent-loop.d.ts.map +1 -1
- package/dist/agents/agent-loop.js +5 -0
- package/dist/agents/agent-loop.js.map +1 -1
- package/dist/agents/channels/access-control/group-tool-policy.d.ts +73 -0
- package/dist/agents/channels/access-control/group-tool-policy.d.ts.map +1 -0
- package/dist/agents/channels/access-control/group-tool-policy.js +193 -0
- package/dist/agents/channels/access-control/group-tool-policy.js.map +1 -0
- package/dist/agents/channels/access-control/index.d.ts +1 -0
- package/dist/agents/channels/access-control/index.d.ts.map +1 -1
- package/dist/agents/channels/access-control/index.js +1 -0
- package/dist/agents/channels/access-control/index.js.map +1 -1
- package/dist/agents/channels/bluebubbles/account-config.d.ts +253 -0
- package/dist/agents/channels/bluebubbles/account-config.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/account-config.js +486 -0
- package/dist/agents/channels/bluebubbles/account-config.js.map +1 -0
- package/dist/agents/channels/bluebubbles/account-registry.d.ts +33 -0
- package/dist/agents/channels/bluebubbles/account-registry.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/account-registry.js +46 -0
- package/dist/agents/channels/bluebubbles/account-registry.js.map +1 -0
- package/dist/agents/channels/bluebubbles/adapter.d.ts +45 -0
- package/dist/agents/channels/bluebubbles/adapter.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/adapter.js +366 -0
- package/dist/agents/channels/bluebubbles/adapter.js.map +1 -0
- package/dist/agents/channels/bluebubbles/catchup-cursor.d.ts +52 -0
- package/dist/agents/channels/bluebubbles/catchup-cursor.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/catchup-cursor.js +118 -0
- package/dist/agents/channels/bluebubbles/catchup-cursor.js.map +1 -0
- package/dist/agents/channels/bluebubbles/catchup.d.ts +114 -0
- package/dist/agents/channels/bluebubbles/catchup.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/catchup.js +220 -0
- package/dist/agents/channels/bluebubbles/catchup.js.map +1 -0
- package/dist/agents/channels/bluebubbles/chat.d.ts +75 -0
- package/dist/agents/channels/bluebubbles/chat.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/chat.js +182 -0
- package/dist/agents/channels/bluebubbles/chat.js.map +1 -0
- package/dist/agents/channels/bluebubbles/connection.d.ts +95 -0
- package/dist/agents/channels/bluebubbles/connection.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/connection.js +413 -0
- package/dist/agents/channels/bluebubbles/connection.js.map +1 -0
- package/dist/agents/channels/bluebubbles/contact-names.d.ts +79 -0
- package/dist/agents/channels/bluebubbles/contact-names.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/contact-names.js +188 -0
- package/dist/agents/channels/bluebubbles/contact-names.js.map +1 -0
- package/dist/agents/channels/bluebubbles/debounce.d.ts +78 -0
- package/dist/agents/channels/bluebubbles/debounce.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/debounce.js +173 -0
- package/dist/agents/channels/bluebubbles/debounce.js.map +1 -0
- package/dist/agents/channels/bluebubbles/dedupe.d.ts +25 -0
- package/dist/agents/channels/bluebubbles/dedupe.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/dedupe.js +35 -0
- package/dist/agents/channels/bluebubbles/dedupe.js.map +1 -0
- package/dist/agents/channels/bluebubbles/effects.d.ts +17 -0
- package/dist/agents/channels/bluebubbles/effects.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/effects.js +57 -0
- package/dist/agents/channels/bluebubbles/effects.js.map +1 -0
- package/dist/agents/channels/bluebubbles/history.d.ts +56 -0
- package/dist/agents/channels/bluebubbles/history.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/history.js +140 -0
- package/dist/agents/channels/bluebubbles/history.js.map +1 -0
- package/dist/agents/channels/bluebubbles/index.d.ts +18 -0
- package/dist/agents/channels/bluebubbles/index.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/index.js +18 -0
- package/dist/agents/channels/bluebubbles/index.js.map +1 -0
- package/dist/agents/channels/bluebubbles/media.d.ts +104 -0
- package/dist/agents/channels/bluebubbles/media.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/media.js +222 -0
- package/dist/agents/channels/bluebubbles/media.js.map +1 -0
- package/dist/agents/channels/bluebubbles/messaging.d.ts +13 -0
- package/dist/agents/channels/bluebubbles/messaging.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/messaging.js +36 -0
- package/dist/agents/channels/bluebubbles/messaging.js.map +1 -0
- package/dist/agents/channels/bluebubbles/module.d.ts +24 -0
- package/dist/agents/channels/bluebubbles/module.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/module.js +52 -0
- package/dist/agents/channels/bluebubbles/module.js.map +1 -0
- package/dist/agents/channels/bluebubbles/normalize.d.ts +111 -0
- package/dist/agents/channels/bluebubbles/normalize.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/normalize.js +239 -0
- package/dist/agents/channels/bluebubbles/normalize.js.map +1 -0
- package/dist/agents/channels/bluebubbles/plugin.d.ts +46 -0
- package/dist/agents/channels/bluebubbles/plugin.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/plugin.js +242 -0
- package/dist/agents/channels/bluebubbles/plugin.js.map +1 -0
- package/dist/agents/channels/bluebubbles/probe.d.ts +79 -0
- package/dist/agents/channels/bluebubbles/probe.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/probe.js +138 -0
- package/dist/agents/channels/bluebubbles/probe.js.map +1 -0
- package/dist/agents/channels/bluebubbles/reactions.d.ts +46 -0
- package/dist/agents/channels/bluebubbles/reactions.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/reactions.js +207 -0
- package/dist/agents/channels/bluebubbles/reactions.js.map +1 -0
- package/dist/agents/channels/bluebubbles/send.d.ts +132 -0
- package/dist/agents/channels/bluebubbles/send.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/send.js +327 -0
- package/dist/agents/channels/bluebubbles/send.js.map +1 -0
- package/dist/agents/channels/bluebubbles/status-issues.d.ts +57 -0
- package/dist/agents/channels/bluebubbles/status-issues.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/status-issues.js +93 -0
- package/dist/agents/channels/bluebubbles/status-issues.js.map +1 -0
- package/dist/agents/channels/bluebubbles/types.d.ts +69 -0
- package/dist/agents/channels/bluebubbles/types.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/types.js +118 -0
- package/dist/agents/channels/bluebubbles/types.js.map +1 -0
- package/dist/agents/channels/bluebubbles/webhook.d.ts +97 -0
- package/dist/agents/channels/bluebubbles/webhook.d.ts.map +1 -0
- package/dist/agents/channels/bluebubbles/webhook.js +249 -0
- package/dist/agents/channels/bluebubbles/webhook.js.map +1 -0
- package/dist/agents/channels/bundled-channel-metas.d.ts +13 -0
- package/dist/agents/channels/bundled-channel-metas.d.ts.map +1 -1
- package/dist/agents/channels/bundled-channel-metas.js +33 -0
- package/dist/agents/channels/bundled-channel-metas.js.map +1 -1
- package/dist/agents/channels/imessage/account-config.d.ts +178 -0
- package/dist/agents/channels/imessage/account-config.d.ts.map +1 -0
- package/dist/agents/channels/imessage/account-config.js +371 -0
- package/dist/agents/channels/imessage/account-config.js.map +1 -0
- package/dist/agents/channels/imessage/adapter.d.ts +36 -0
- package/dist/agents/channels/imessage/adapter.d.ts.map +1 -0
- package/dist/agents/channels/imessage/adapter.js +286 -0
- package/dist/agents/channels/imessage/adapter.js.map +1 -0
- package/dist/agents/channels/imessage/client.d.ts +99 -0
- package/dist/agents/channels/imessage/client.d.ts.map +1 -0
- package/dist/agents/channels/imessage/client.js +231 -0
- package/dist/agents/channels/imessage/client.js.map +1 -0
- package/dist/agents/channels/imessage/connection.d.ts +101 -0
- package/dist/agents/channels/imessage/connection.d.ts.map +1 -0
- package/dist/agents/channels/imessage/connection.js +367 -0
- package/dist/agents/channels/imessage/connection.js.map +1 -0
- package/dist/agents/channels/imessage/format.d.ts +45 -0
- package/dist/agents/channels/imessage/format.d.ts.map +1 -0
- package/dist/agents/channels/imessage/format.js +170 -0
- package/dist/agents/channels/imessage/format.js.map +1 -0
- package/dist/agents/channels/imessage/history.d.ts +49 -0
- package/dist/agents/channels/imessage/history.d.ts.map +1 -0
- package/dist/agents/channels/imessage/history.js +74 -0
- package/dist/agents/channels/imessage/history.js.map +1 -0
- package/dist/agents/channels/imessage/index.d.ts +25 -0
- package/dist/agents/channels/imessage/index.d.ts.map +1 -0
- package/dist/agents/channels/imessage/index.js +25 -0
- package/dist/agents/channels/imessage/index.js.map +1 -0
- package/dist/agents/channels/imessage/media.d.ts +92 -0
- package/dist/agents/channels/imessage/media.d.ts.map +1 -0
- package/dist/agents/channels/imessage/media.js +196 -0
- package/dist/agents/channels/imessage/media.js.map +1 -0
- package/dist/agents/channels/imessage/messaging.d.ts +14 -0
- package/dist/agents/channels/imessage/messaging.d.ts.map +1 -0
- package/dist/agents/channels/imessage/messaging.js +37 -0
- package/dist/agents/channels/imessage/messaging.js.map +1 -0
- package/dist/agents/channels/imessage/module.d.ts +16 -0
- package/dist/agents/channels/imessage/module.d.ts.map +1 -0
- package/dist/agents/channels/imessage/module.js +23 -0
- package/dist/agents/channels/imessage/module.js.map +1 -0
- package/dist/agents/channels/imessage/monitor.d.ts +207 -0
- package/dist/agents/channels/imessage/monitor.d.ts.map +1 -0
- package/dist/agents/channels/imessage/monitor.js +504 -0
- package/dist/agents/channels/imessage/monitor.js.map +1 -0
- package/dist/agents/channels/imessage/plugin.d.ts +53 -0
- package/dist/agents/channels/imessage/plugin.d.ts.map +1 -0
- package/dist/agents/channels/imessage/plugin.js +215 -0
- package/dist/agents/channels/imessage/plugin.js.map +1 -0
- package/dist/agents/channels/imessage/probe.d.ts +68 -0
- package/dist/agents/channels/imessage/probe.d.ts.map +1 -0
- package/dist/agents/channels/imessage/probe.js +134 -0
- package/dist/agents/channels/imessage/probe.js.map +1 -0
- package/dist/agents/channels/imessage/remote-attachments.d.ts +61 -0
- package/dist/agents/channels/imessage/remote-attachments.d.ts.map +1 -0
- package/dist/agents/channels/imessage/remote-attachments.js +131 -0
- package/dist/agents/channels/imessage/remote-attachments.js.map +1 -0
- package/dist/agents/channels/imessage/send.d.ts +61 -0
- package/dist/agents/channels/imessage/send.d.ts.map +1 -0
- package/dist/agents/channels/imessage/send.js +108 -0
- package/dist/agents/channels/imessage/send.js.map +1 -0
- package/dist/agents/channels/imessage/targets.d.ts +91 -0
- package/dist/agents/channels/imessage/targets.d.ts.map +1 -0
- package/dist/agents/channels/imessage/targets.js +245 -0
- package/dist/agents/channels/imessage/targets.js.map +1 -0
- package/dist/agents/channels/imessage/watch-error.d.ts +23 -0
- package/dist/agents/channels/imessage/watch-error.d.ts.map +1 -0
- package/dist/agents/channels/imessage/watch-error.js +69 -0
- package/dist/agents/channels/imessage/watch-error.js.map +1 -0
- package/dist/agents/channels/inbound-pipeline.d.ts +11 -0
- package/dist/agents/channels/inbound-pipeline.d.ts.map +1 -1
- package/dist/agents/channels/inbound-pipeline.js +20 -1
- package/dist/agents/channels/inbound-pipeline.js.map +1 -1
- package/dist/agents/channels/manager.d.ts +9 -0
- package/dist/agents/channels/manager.d.ts.map +1 -1
- package/dist/agents/channels/manager.js.map +1 -1
- package/dist/agents/channels/sdk.d.ts +4 -0
- package/dist/agents/channels/sdk.d.ts.map +1 -1
- package/dist/agents/channels/sdk.js +4 -0
- package/dist/agents/channels/sdk.js.map +1 -1
- package/dist/agents/extensions/modules/index.d.ts.map +1 -1
- package/dist/agents/extensions/modules/index.js +12 -0
- package/dist/agents/extensions/modules/index.js.map +1 -1
- package/dist/agents/session-wiring.d.ts +31 -0
- package/dist/agents/session-wiring.d.ts.map +1 -1
- package/dist/agents/session-wiring.js +45 -2
- package/dist/agents/session-wiring.js.map +1 -1
- package/dist/agents/tools/bluebubbles-action-tool.d.ts +66 -0
- package/dist/agents/tools/bluebubbles-action-tool.d.ts.map +1 -0
- package/dist/agents/tools/bluebubbles-action-tool.js +234 -0
- package/dist/agents/tools/bluebubbles-action-tool.js.map +1 -0
- package/dist/agents/tools/registry.d.ts.map +1 -1
- package/dist/agents/tools/registry.js +18 -0
- package/dist/agents/tools/registry.js.map +1 -1
- package/dist/buildstamp.json +1 -1
- package/dist/core/server.d.ts.map +1 -1
- package/dist/core/server.js +48 -2
- package/dist/core/server.js.map +1 -1
- package/dist/infra/net/fetch-guard.d.ts +24 -2
- package/dist/infra/net/fetch-guard.d.ts.map +1 -1
- package/dist/infra/net/fetch-guard.js +78 -31
- package/dist/infra/net/fetch-guard.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BlueBubbles config-shape helpers (multi-ACCOUNT aware; mirrors Slack's
|
|
3
|
+
* `account-config.ts`).
|
|
4
|
+
*
|
|
5
|
+
* BlueBubbles is a richer iMessage transport than the native `imessage` channel:
|
|
6
|
+
* instead of driving a local `imsg` CLI subprocess, it talks to a BlueBubbles
|
|
7
|
+
* macOS server over HTTP REST (outbound) and receives inbound updates via a
|
|
8
|
+
* webhook POST the server fires at a Brigade gateway HTTP route. So unlike
|
|
9
|
+
* `imessage` (which has no secret), BlueBubbles HAS a real secret — the server
|
|
10
|
+
* `password` — which is sealed into the encrypted credential store and embedded
|
|
11
|
+
* in the registered webhook URL query string (BlueBubbles webhooks can't carry
|
|
12
|
+
* custom headers).
|
|
13
|
+
*
|
|
14
|
+
* The knobs this module resolves per account:
|
|
15
|
+
*
|
|
16
|
+
* - `serverUrl` base URL of the BlueBubbles server (`http://192.168.1.5:1234`).
|
|
17
|
+
* - `password` the SECRET — REST auth (`?password=…`) + webhook auth. Sealed.
|
|
18
|
+
* - `webhookPath` the gateway inbound route path (default `/bluebubbles/webhook`).
|
|
19
|
+
* - `actions` per-rich-action toggles (`reactions`/`edit`/`unsend`/`effects`/`groupAdmin`).
|
|
20
|
+
* - `region` default phone-number region for E.164 normalisation (US).
|
|
21
|
+
* - `mediaMaxMb` cap on an outbound attachment's size (MB).
|
|
22
|
+
* - `probeTimeoutMs` HTTP round-trip timeout for the doctor/probe + REST calls.
|
|
23
|
+
*
|
|
24
|
+
* Two config shapes are recognised so the surface lines up with the other
|
|
25
|
+
* channels:
|
|
26
|
+
*
|
|
27
|
+
* Legacy (single-account):
|
|
28
|
+
* channels.bluebubbles = { enabled: true, serverUrl: "http://…", password: "${BB_PASSWORD}" }
|
|
29
|
+
*
|
|
30
|
+
* Multi-account:
|
|
31
|
+
* channels.bluebubbles = {
|
|
32
|
+
* enabled: true,
|
|
33
|
+
* accounts: [
|
|
34
|
+
* { id: "home", serverUrl: "http://192.168.1.5:1234", password: "${BB_HOME}" },
|
|
35
|
+
* { id: "work", serverUrl: "http://10.0.0.9:1234", password: "${BB_WORK}" },
|
|
36
|
+
* ],
|
|
37
|
+
* }
|
|
38
|
+
*
|
|
39
|
+
* A legacy config with no `accounts[]` reads as `[{ id: "default" }]`.
|
|
40
|
+
*/
|
|
41
|
+
import { readSealedChannelToken } from "../channel-secrets.js";
|
|
42
|
+
/** Canonical channel id + default account id. */
|
|
43
|
+
const CHANNEL_ID = "bluebubbles";
|
|
44
|
+
const DEFAULT_ACCOUNT_ID = "default";
|
|
45
|
+
/** Default inbound webhook route path (base; named accounts get a slug suffix). */
|
|
46
|
+
const DEFAULT_WEBHOOK_PATH = "/bluebubbles/webhook";
|
|
47
|
+
/** Default phone-number region used for E.164 normalisation. */
|
|
48
|
+
const DEFAULT_REGION = "US";
|
|
49
|
+
/** Default outbound media size cap (MB). */
|
|
50
|
+
const DEFAULT_MEDIA_MAX_MB = 100;
|
|
51
|
+
/** Default HTTP probe / request timeout (ms). */
|
|
52
|
+
export const DEFAULT_BLUEBUBBLES_PROBE_TIMEOUT_MS = 10_000;
|
|
53
|
+
/** Default rolling group-history context size (recent messages attached to an untagged group msg). */
|
|
54
|
+
export const DEFAULT_BLUEBUBBLES_HISTORY_LIMIT = 10;
|
|
55
|
+
/** Hard ceiling on the rolling-history fetch size. */
|
|
56
|
+
export const BLUEBUBBLES_MAX_HISTORY_LIMIT = 100;
|
|
57
|
+
/** Per-knob env var consulted as a last-resort fallback for the password. */
|
|
58
|
+
const PASSWORD_ENV_VAR = "BLUEBUBBLES_PASSWORD";
|
|
59
|
+
/** Per-knob env var consulted as a last-resort fallback for the server URL. */
|
|
60
|
+
const SERVER_URL_ENV_VAR = "BLUEBUBBLES_SERVER_URL";
|
|
61
|
+
/** `${VAR}` secret-ref form — identical to `config/io.ts`'s SECRET_REF_PATTERN. */
|
|
62
|
+
const SECRET_REF_PATTERN = /^\$\{([A-Z_][A-Z0-9_]*)\}$/;
|
|
63
|
+
/** Default rich-action toggles — everything on (Private API gates the rest at runtime). */
|
|
64
|
+
export const DEFAULT_BLUEBUBBLES_ACTIONS = {
|
|
65
|
+
reactions: true,
|
|
66
|
+
edit: true,
|
|
67
|
+
unsend: true,
|
|
68
|
+
effects: true,
|
|
69
|
+
groupAdmin: true,
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Resolve whether a FINE-GRAINED op is allowed, honouring an explicit per-op
|
|
73
|
+
* flag when set and otherwise inheriting the umbrella:
|
|
74
|
+
* - group-admin ops (rename/icon/add/remove/leave) ← `groupAdmin`;
|
|
75
|
+
* - `sendWithEffect` ← `effects`;
|
|
76
|
+
* - `reply` / `sendAttachment` ← always on (no coarse umbrella gates them).
|
|
77
|
+
*/
|
|
78
|
+
export function isBlueBubblesOpAllowed(actions, op) {
|
|
79
|
+
const explicit = actions[op];
|
|
80
|
+
if (typeof explicit === "boolean")
|
|
81
|
+
return explicit;
|
|
82
|
+
switch (op) {
|
|
83
|
+
case "sendWithEffect":
|
|
84
|
+
return actions.effects;
|
|
85
|
+
case "renameGroup":
|
|
86
|
+
case "setGroupIcon":
|
|
87
|
+
case "addParticipant":
|
|
88
|
+
case "removeParticipant":
|
|
89
|
+
case "leaveGroup":
|
|
90
|
+
return actions.groupAdmin;
|
|
91
|
+
case "reply":
|
|
92
|
+
case "sendAttachment":
|
|
93
|
+
return true;
|
|
94
|
+
default:
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/** Read `channels.bluebubbles` loosely (schema keeps it open). */
|
|
99
|
+
function bluebubblesChannelConfig(cfg) {
|
|
100
|
+
return cfg.channels?.[CHANNEL_ID];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Resolve a single string-ish config value: a `${VAR}` ref expands against
|
|
104
|
+
* `process.env`; any other non-empty string passes through verbatim; empty /
|
|
105
|
+
* missing returns "".
|
|
106
|
+
*/
|
|
107
|
+
function resolveStringRef(raw, env) {
|
|
108
|
+
if (typeof raw !== "string")
|
|
109
|
+
return "";
|
|
110
|
+
const trimmed = raw.trim();
|
|
111
|
+
if (!trimmed)
|
|
112
|
+
return "";
|
|
113
|
+
const m = SECRET_REF_PATTERN.exec(trimmed);
|
|
114
|
+
if (m && m[1])
|
|
115
|
+
return (env[m[1]] ?? "").trim();
|
|
116
|
+
return trimmed;
|
|
117
|
+
}
|
|
118
|
+
/** The fine-grained op flag names — picked up only when the operator set them. */
|
|
119
|
+
const FINE_ACTION_NAMES = [
|
|
120
|
+
"reply",
|
|
121
|
+
"sendWithEffect",
|
|
122
|
+
"renameGroup",
|
|
123
|
+
"setGroupIcon",
|
|
124
|
+
"addParticipant",
|
|
125
|
+
"removeParticipant",
|
|
126
|
+
"leaveGroup",
|
|
127
|
+
"sendAttachment",
|
|
128
|
+
];
|
|
129
|
+
/** Coerce a loose `actions` object to the typed flags (coarse default ON; fine flags only when set). */
|
|
130
|
+
function coerceActionFlags(entry, slot) {
|
|
131
|
+
const pick = (key) => {
|
|
132
|
+
if (entry && typeof entry[key] === "boolean")
|
|
133
|
+
return entry[key];
|
|
134
|
+
if (slot && typeof slot[key] === "boolean")
|
|
135
|
+
return slot[key];
|
|
136
|
+
return DEFAULT_BLUEBUBBLES_ACTIONS[key] ?? true;
|
|
137
|
+
};
|
|
138
|
+
const out = {
|
|
139
|
+
reactions: pick("reactions"),
|
|
140
|
+
edit: pick("edit"),
|
|
141
|
+
unsend: pick("unsend"),
|
|
142
|
+
effects: pick("effects"),
|
|
143
|
+
groupAdmin: pick("groupAdmin"),
|
|
144
|
+
};
|
|
145
|
+
// Carry a fine-grained override ONLY when the operator explicitly set it
|
|
146
|
+
// (entry wins over slot); otherwise leave it undefined so `isBlueBubblesOpAllowed`
|
|
147
|
+
// inherits the umbrella.
|
|
148
|
+
for (const name of FINE_ACTION_NAMES) {
|
|
149
|
+
const v = entry && typeof entry[name] === "boolean" ? entry[name] : slot && typeof slot[name] === "boolean" ? slot[name] : undefined;
|
|
150
|
+
if (typeof v === "boolean")
|
|
151
|
+
out[name] = v;
|
|
152
|
+
}
|
|
153
|
+
return out;
|
|
154
|
+
}
|
|
155
|
+
/** Is the BlueBubbles channel switched on at all (any shape)? */
|
|
156
|
+
export function bluebubblesChannelEnabled(cfg) {
|
|
157
|
+
return bluebubblesChannelConfig(cfg)?.enabled === true;
|
|
158
|
+
}
|
|
159
|
+
/** List configured account ids. Legacy single-account configs surface `["default"]`. */
|
|
160
|
+
export function listBlueBubblesAccountIds(cfg) {
|
|
161
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
162
|
+
if (!slot || slot.enabled !== true)
|
|
163
|
+
return [];
|
|
164
|
+
const accounts = Array.isArray(slot.accounts) ? slot.accounts : undefined;
|
|
165
|
+
if (!accounts || accounts.length === 0)
|
|
166
|
+
return [DEFAULT_ACCOUNT_ID];
|
|
167
|
+
const ids = [];
|
|
168
|
+
const seen = new Set();
|
|
169
|
+
for (const entry of accounts) {
|
|
170
|
+
const id = typeof entry?.id === "string" ? entry.id.trim() : "";
|
|
171
|
+
if (!id || seen.has(id))
|
|
172
|
+
continue;
|
|
173
|
+
seen.add(id);
|
|
174
|
+
ids.push(id);
|
|
175
|
+
}
|
|
176
|
+
// A half-typed `accounts:[]` still degrades to the default account so the
|
|
177
|
+
// channel isn't silently disabled.
|
|
178
|
+
return ids.length === 0 ? [DEFAULT_ACCOUNT_ID] : ids;
|
|
179
|
+
}
|
|
180
|
+
/** Look up the raw account entry from config (or null when missing). */
|
|
181
|
+
function findAccountEntry(cfg, accountId) {
|
|
182
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
183
|
+
if (!slot)
|
|
184
|
+
return null;
|
|
185
|
+
const accounts = Array.isArray(slot.accounts) ? slot.accounts : undefined;
|
|
186
|
+
if (!accounts)
|
|
187
|
+
return null;
|
|
188
|
+
for (const entry of accounts) {
|
|
189
|
+
const id = typeof entry?.id === "string" ? entry.id.trim() : "";
|
|
190
|
+
if (id === accountId)
|
|
191
|
+
return entry;
|
|
192
|
+
}
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Normalise a BlueBubbles server URL: trim, default the scheme to `http://`
|
|
197
|
+
* when absent (BlueBubbles is commonly a LAN HTTP host), and strip trailing
|
|
198
|
+
* slashes. Returns "" for an empty input (don't throw at config-read time).
|
|
199
|
+
*/
|
|
200
|
+
export function normalizeBlueBubblesServerUrl(raw) {
|
|
201
|
+
const trimmed = (raw ?? "").trim();
|
|
202
|
+
if (!trimmed)
|
|
203
|
+
return "";
|
|
204
|
+
const withScheme = /^https?:\/\//i.test(trimmed) ? trimmed : `http://${trimmed}`;
|
|
205
|
+
return withScheme.replace(/\/+$/, "");
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Resolve the BlueBubbles server URL for an account. Precedence: per-account
|
|
209
|
+
* config `${VAR}`/literal → top-level config → `BLUEBUBBLES_SERVER_URL` env → "".
|
|
210
|
+
*/
|
|
211
|
+
export function resolveBlueBubblesServerUrl(cfg, accountId, env = process.env) {
|
|
212
|
+
const id = accountId?.trim() || DEFAULT_ACCOUNT_ID;
|
|
213
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
214
|
+
const entry = findAccountEntry(cfg, id);
|
|
215
|
+
const perAccount = resolveStringRef(entry?.serverUrl, env);
|
|
216
|
+
if (perAccount)
|
|
217
|
+
return normalizeBlueBubblesServerUrl(perAccount);
|
|
218
|
+
const topLevel = resolveStringRef(slot?.serverUrl, env);
|
|
219
|
+
if (topLevel)
|
|
220
|
+
return normalizeBlueBubblesServerUrl(topLevel);
|
|
221
|
+
const fromEnv = (env[SERVER_URL_ENV_VAR] ?? "").trim();
|
|
222
|
+
if (fromEnv)
|
|
223
|
+
return normalizeBlueBubblesServerUrl(fromEnv);
|
|
224
|
+
return "";
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Resolve the server password (the SECRET) for an account. Precedence:
|
|
228
|
+
* per-account config `${VAR}`/literal → top-level config `${VAR}`/literal →
|
|
229
|
+
* durable sealed token (`channel:bluebubbles`) → `BLUEBUBBLES_PASSWORD` env → "".
|
|
230
|
+
*
|
|
231
|
+
* The sealed token is per-channel (NOT per-account today, like Slack's bot
|
|
232
|
+
* token), so multi-account installs that need distinct passwords should use
|
|
233
|
+
* `${VAR}` refs / env per account.
|
|
234
|
+
*/
|
|
235
|
+
export function resolveBlueBubblesPassword(cfg, accountId, env = process.env) {
|
|
236
|
+
const id = accountId?.trim() || DEFAULT_ACCOUNT_ID;
|
|
237
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
238
|
+
const entry = findAccountEntry(cfg, id);
|
|
239
|
+
const perAccount = resolveStringRef(entry?.password, env);
|
|
240
|
+
if (perAccount)
|
|
241
|
+
return perAccount;
|
|
242
|
+
const topLevel = resolveStringRef(slot?.password, env);
|
|
243
|
+
if (topLevel)
|
|
244
|
+
return topLevel;
|
|
245
|
+
const sealed = readSealedChannelToken(CHANNEL_ID);
|
|
246
|
+
if (sealed)
|
|
247
|
+
return sealed;
|
|
248
|
+
const fromEnv = (env[PASSWORD_ENV_VAR] ?? "").trim();
|
|
249
|
+
if (fromEnv)
|
|
250
|
+
return fromEnv;
|
|
251
|
+
return "";
|
|
252
|
+
}
|
|
253
|
+
/** Normalise a webhook path to a leading-slash, trailing-slash-free form. */
|
|
254
|
+
function normalizeWebhookPath(raw) {
|
|
255
|
+
const trimmed = (raw ?? "").trim();
|
|
256
|
+
if (!trimmed)
|
|
257
|
+
return DEFAULT_WEBHOOK_PATH;
|
|
258
|
+
const withSlash = trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
|
|
259
|
+
const stripped = withSlash.replace(/\/+$/, "");
|
|
260
|
+
return stripped || DEFAULT_WEBHOOK_PATH;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Resolve the inbound webhook route path for an account. The default account
|
|
264
|
+
* keeps the base path; a named account (only present when >1 account is
|
|
265
|
+
* configured) gets a distinct, collision-free path so two servers never share
|
|
266
|
+
* one route. An explicit per-account `webhookPath` overrides the derived slug.
|
|
267
|
+
*/
|
|
268
|
+
export function resolveBlueBubblesWebhookPath(cfg, accountId, env = process.env) {
|
|
269
|
+
const id = accountId?.trim() || DEFAULT_ACCOUNT_ID;
|
|
270
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
271
|
+
const basePath = normalizeWebhookPath(slot?.webhookPath);
|
|
272
|
+
if (id === DEFAULT_ACCOUNT_ID)
|
|
273
|
+
return basePath;
|
|
274
|
+
const entry = findAccountEntry(cfg, id);
|
|
275
|
+
const explicit = resolveStringRef(entry?.webhookPath, env);
|
|
276
|
+
if (explicit)
|
|
277
|
+
return normalizeWebhookPath(explicit);
|
|
278
|
+
const slug = id.replace(/[^A-Za-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "") || id;
|
|
279
|
+
return `${basePath}/${slug}`;
|
|
280
|
+
}
|
|
281
|
+
/** Resolve the HTTP probe / request timeout (ms) for an account. */
|
|
282
|
+
export function resolveBlueBubblesProbeTimeoutMs(cfg, accountId) {
|
|
283
|
+
const id = accountId?.trim() || DEFAULT_ACCOUNT_ID;
|
|
284
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
285
|
+
const entry = findAccountEntry(cfg, id);
|
|
286
|
+
const raw = typeof entry?.probeTimeoutMs === "number" ? entry.probeTimeoutMs : slot?.probeTimeoutMs;
|
|
287
|
+
return typeof raw === "number" && raw > 0 ? raw : DEFAULT_BLUEBUBBLES_PROBE_TIMEOUT_MS;
|
|
288
|
+
}
|
|
289
|
+
/** Resolve the per-rich-action toggles for an account. */
|
|
290
|
+
export function resolveBlueBubblesActions(cfg, accountId) {
|
|
291
|
+
const id = accountId?.trim() || DEFAULT_ACCOUNT_ID;
|
|
292
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
293
|
+
const entry = findAccountEntry(cfg, id);
|
|
294
|
+
return coerceActionFlags(entry?.actions, slot?.actions);
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Normalise a handle for self/mention matching: an email lower-cases; a phone
|
|
298
|
+
* keeps only its digits (so `+1 (555) 123-4567` and `15551234567` compare equal).
|
|
299
|
+
* Returns "" for an empty input.
|
|
300
|
+
*/
|
|
301
|
+
export function normalizeBlueBubblesSelfHandle(raw) {
|
|
302
|
+
const trimmed = (raw ?? "").trim();
|
|
303
|
+
if (!trimmed)
|
|
304
|
+
return "";
|
|
305
|
+
if (trimmed.includes("@"))
|
|
306
|
+
return trimmed.toLowerCase();
|
|
307
|
+
const digits = trimmed.replace(/[^0-9]/g, "");
|
|
308
|
+
return digits || trimmed.toLowerCase();
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Resolve the bot's own handle for an account (per-account `selfHandle` wins over
|
|
312
|
+
* the top-level slot), normalised. Empty when unset.
|
|
313
|
+
*/
|
|
314
|
+
export function resolveBlueBubblesSelfHandle(cfg, accountId, env = process.env) {
|
|
315
|
+
const id = accountId?.trim() || DEFAULT_ACCOUNT_ID;
|
|
316
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
317
|
+
const entry = findAccountEntry(cfg, id);
|
|
318
|
+
const raw = resolveStringRef(entry?.selfHandle, env) || resolveStringRef(slot?.selfHandle, env);
|
|
319
|
+
return normalizeBlueBubblesSelfHandle(raw);
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Resolve whether the SSRF guard should allow private/LAN/loopback hosts for an
|
|
323
|
+
* account. Per-account `network.allowPrivate` wins over the top-level slot;
|
|
324
|
+
* DEFAULTS TO TRUE (a BlueBubbles server is normally on the operator's LAN).
|
|
325
|
+
* Cloud-metadata stays blocked regardless of this flag.
|
|
326
|
+
*/
|
|
327
|
+
export function resolveBlueBubblesAllowPrivateNetwork(cfg, accountId) {
|
|
328
|
+
const id = accountId?.trim() || DEFAULT_ACCOUNT_ID;
|
|
329
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
330
|
+
const entry = findAccountEntry(cfg, id);
|
|
331
|
+
if (typeof entry?.network?.allowPrivate === "boolean")
|
|
332
|
+
return entry.network.allowPrivate;
|
|
333
|
+
if (typeof slot?.network?.allowPrivate === "boolean")
|
|
334
|
+
return slot.network.allowPrivate;
|
|
335
|
+
return true;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Resolve the on-(re)connect catch-up backfill config for an account
|
|
339
|
+
* (per-account overrides the top-level slot). Returns `undefined` when neither
|
|
340
|
+
* level configured it — the connection then uses catch-up's built-in defaults.
|
|
341
|
+
*/
|
|
342
|
+
export function resolveBlueBubblesCatchup(cfg, accountId) {
|
|
343
|
+
const id = accountId?.trim() || DEFAULT_ACCOUNT_ID;
|
|
344
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
345
|
+
const entry = findAccountEntry(cfg, id);
|
|
346
|
+
const raw = entry?.catchup ?? slot?.catchup;
|
|
347
|
+
if (!raw || typeof raw !== "object")
|
|
348
|
+
return undefined;
|
|
349
|
+
const out = {};
|
|
350
|
+
if (typeof raw.enabled === "boolean")
|
|
351
|
+
out.enabled = raw.enabled;
|
|
352
|
+
if (typeof raw.lookbackMs === "number" && raw.lookbackMs > 0)
|
|
353
|
+
out.lookbackMs = raw.lookbackMs;
|
|
354
|
+
if (typeof raw.limit === "number" && raw.limit > 0)
|
|
355
|
+
out.limit = raw.limit;
|
|
356
|
+
return Object.keys(out).length > 0 ? out : undefined;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Resolve the inbound coalescing window (ms) for an account (per-account wins
|
|
360
|
+
* over the top-level slot). 0 (default) disables coalescing.
|
|
361
|
+
*/
|
|
362
|
+
export function resolveBlueBubblesInboundDebounceMs(cfg, accountId) {
|
|
363
|
+
const id = accountId?.trim() || DEFAULT_ACCOUNT_ID;
|
|
364
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
365
|
+
const entry = findAccountEntry(cfg, id);
|
|
366
|
+
const raw = typeof entry?.inboundDebounceMs === "number" ? entry.inboundDebounceMs : slot?.inboundDebounceMs;
|
|
367
|
+
return typeof raw === "number" && Number.isFinite(raw) && raw > 0 ? Math.floor(raw) : 0;
|
|
368
|
+
}
|
|
369
|
+
/** Clamp a configured history limit into `[0, MAX]`. */
|
|
370
|
+
function clampHistoryLimit(raw, fallback) {
|
|
371
|
+
if (typeof raw !== "number" || !Number.isFinite(raw))
|
|
372
|
+
return fallback;
|
|
373
|
+
const n = Math.floor(raw);
|
|
374
|
+
if (n <= 0)
|
|
375
|
+
return 0;
|
|
376
|
+
return Math.min(n, BLUEBUBBLES_MAX_HISTORY_LIMIT);
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Resolve the rolling group-history context size for an account (per-account
|
|
380
|
+
* wins over the top-level slot). Defaults to {@link DEFAULT_BLUEBUBBLES_HISTORY_LIMIT};
|
|
381
|
+
* 0 disables.
|
|
382
|
+
*/
|
|
383
|
+
export function resolveBlueBubblesHistoryLimit(cfg, accountId) {
|
|
384
|
+
const id = accountId?.trim() || DEFAULT_ACCOUNT_ID;
|
|
385
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
386
|
+
const entry = findAccountEntry(cfg, id);
|
|
387
|
+
const raw = entry?.historyLimit ?? slot?.historyLimit;
|
|
388
|
+
return clampHistoryLimit(raw, DEFAULT_BLUEBUBBLES_HISTORY_LIMIT);
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Resolve the rolling DM-history context size for an account. Defaults to 0
|
|
392
|
+
* (a DM already carries its own thread context); 0 disables.
|
|
393
|
+
*/
|
|
394
|
+
export function resolveBlueBubblesDmHistoryLimit(cfg, accountId) {
|
|
395
|
+
const id = accountId?.trim() || DEFAULT_ACCOUNT_ID;
|
|
396
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
397
|
+
const entry = findAccountEntry(cfg, id);
|
|
398
|
+
const raw = entry?.dmHistoryLimit ?? slot?.dmHistoryLimit;
|
|
399
|
+
return clampHistoryLimit(raw, 0);
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Resolve the OUTBOUND-attachment local-root allow-list for an account
|
|
403
|
+
* (per-account entries merged with the top-level slot, de-duped). Empty when
|
|
404
|
+
* neither level configured it — the central media-path denylist still applies.
|
|
405
|
+
*/
|
|
406
|
+
export function resolveBlueBubblesMediaLocalRoots(cfg, accountId) {
|
|
407
|
+
const id = accountId?.trim() || DEFAULT_ACCOUNT_ID;
|
|
408
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
409
|
+
const entry = findAccountEntry(cfg, id);
|
|
410
|
+
const out = [];
|
|
411
|
+
const seen = new Set();
|
|
412
|
+
for (const list of [entry?.mediaLocalRoots, slot?.mediaLocalRoots]) {
|
|
413
|
+
if (!Array.isArray(list))
|
|
414
|
+
continue;
|
|
415
|
+
for (const raw of list) {
|
|
416
|
+
const v = typeof raw === "string" ? raw.trim() : "";
|
|
417
|
+
if (!v || seen.has(v))
|
|
418
|
+
continue;
|
|
419
|
+
seen.add(v);
|
|
420
|
+
out.push(v);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
return out;
|
|
424
|
+
}
|
|
425
|
+
/** Resolve a per-account view of the config (defaults filled in). */
|
|
426
|
+
export function resolveBlueBubblesAccount(cfg, accountId, env = process.env) {
|
|
427
|
+
const slot = bluebubblesChannelConfig(cfg);
|
|
428
|
+
const id = accountId?.trim() || DEFAULT_ACCOUNT_ID;
|
|
429
|
+
const entry = findAccountEntry(cfg, id);
|
|
430
|
+
const enabled = entry?.enabled !== false && slot?.enabled === true;
|
|
431
|
+
const region = (resolveStringRef(entry?.region, env) || resolveStringRef(slot?.region, env) || DEFAULT_REGION).trim();
|
|
432
|
+
const mediaMaxMb = typeof entry?.mediaMaxMb === "number" && entry.mediaMaxMb > 0
|
|
433
|
+
? entry.mediaMaxMb
|
|
434
|
+
: typeof slot?.mediaMaxMb === "number" && slot.mediaMaxMb > 0
|
|
435
|
+
? slot.mediaMaxMb
|
|
436
|
+
: DEFAULT_MEDIA_MAX_MB;
|
|
437
|
+
return {
|
|
438
|
+
accountId: id,
|
|
439
|
+
enabled,
|
|
440
|
+
serverUrl: resolveBlueBubblesServerUrl(cfg, id, env),
|
|
441
|
+
password: resolveBlueBubblesPassword(cfg, id, env),
|
|
442
|
+
webhookPath: resolveBlueBubblesWebhookPath(cfg, id, env),
|
|
443
|
+
region,
|
|
444
|
+
mediaMaxBytes: Math.round(mediaMaxMb * 1024 * 1024),
|
|
445
|
+
probeTimeoutMs: resolveBlueBubblesProbeTimeoutMs(cfg, id),
|
|
446
|
+
actions: resolveBlueBubblesActions(cfg, id),
|
|
447
|
+
allowPrivateNetwork: resolveBlueBubblesAllowPrivateNetwork(cfg, id),
|
|
448
|
+
selfHandle: resolveBlueBubblesSelfHandle(cfg, id, env),
|
|
449
|
+
inboundDebounceMs: resolveBlueBubblesInboundDebounceMs(cfg, id),
|
|
450
|
+
historyLimit: resolveBlueBubblesHistoryLimit(cfg, id),
|
|
451
|
+
dmHistoryLimit: resolveBlueBubblesDmHistoryLimit(cfg, id),
|
|
452
|
+
mediaLocalRoots: resolveBlueBubblesMediaLocalRoots(cfg, id),
|
|
453
|
+
...(() => {
|
|
454
|
+
const catchup = resolveBlueBubblesCatchup(cfg, id);
|
|
455
|
+
return catchup ? { catchup } : {};
|
|
456
|
+
})(),
|
|
457
|
+
verbose: slot?.verbose === true,
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Resolve the idle-thread-session TTL in ms, or `null` when unset / disabled.
|
|
462
|
+
* Accepts a number (ms) or a duration string (`"6h"`, `"30m"`, …). The cron
|
|
463
|
+
* session-reaper uses this to age out idle BlueBubbles group sessions.
|
|
464
|
+
*/
|
|
465
|
+
export function bluebubblesThreadIdleTtlMs(cfg) {
|
|
466
|
+
const raw = bluebubblesChannelConfig(cfg)?.threadIdleTtlMs;
|
|
467
|
+
if (typeof raw === "number")
|
|
468
|
+
return raw > 0 ? raw : null;
|
|
469
|
+
if (typeof raw !== "string")
|
|
470
|
+
return null;
|
|
471
|
+
const trimmed = raw.trim();
|
|
472
|
+
if (!trimmed)
|
|
473
|
+
return null;
|
|
474
|
+
const m = /^(\d+)\s*(s|m|h|d|w)?$/i.exec(trimmed);
|
|
475
|
+
if (!m)
|
|
476
|
+
return null;
|
|
477
|
+
const n = Number(m[1]);
|
|
478
|
+
if (!Number.isFinite(n) || n <= 0)
|
|
479
|
+
return null;
|
|
480
|
+
const unit = (m[2] ?? "ms").toLowerCase();
|
|
481
|
+
const mult = { s: 1_000, m: 60_000, h: 3_600_000, d: 86_400_000, w: 604_800_000, ms: 1 };
|
|
482
|
+
const factor = mult[unit] ?? 1;
|
|
483
|
+
return n * factor;
|
|
484
|
+
}
|
|
485
|
+
export { CHANNEL_ID as BLUEBUBBLES_CHANNEL_ID, DEFAULT_ACCOUNT_ID as BLUEBUBBLES_DEFAULT_ACCOUNT_ID, PASSWORD_ENV_VAR as BLUEBUBBLES_PASSWORD_ENV_VAR, SERVER_URL_ENV_VAR as BLUEBUBBLES_SERVER_URL_ENV_VAR, DEFAULT_WEBHOOK_PATH as BLUEBUBBLES_DEFAULT_WEBHOOK_PATH, };
|
|
486
|
+
//# sourceMappingURL=account-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-config.js","sourceRoot":"","sources":["../../../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EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;IACjH,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,OAAO,CAAC,GAAG,MAAM,CAAC;AACnB,CAAC;AAED,OAAO,EACN,UAAU,IAAI,sBAAsB,EACpC,kBAAkB,IAAI,8BAA8B,EACpD,gBAAgB,IAAI,4BAA4B,EAChD,kBAAkB,IAAI,8BAA8B,EACpD,oBAAoB,IAAI,gCAAgC,GACxD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-account BlueBubbles adapter registry — the cross-module bridge that lets
|
|
3
|
+
* the webhook routes (registered at module `register()` time in `module.ts`) find
|
|
4
|
+
* the per-account adapters that are STARTED later by `createBlueBubblesPlugin`
|
|
5
|
+
* (`plugin.ts`).
|
|
6
|
+
*
|
|
7
|
+
* Why this exists. In a multi-account install each account has its OWN inbound
|
|
8
|
+
* webhook path (`/bluebubbles/webhook/<accountId>`). The gateway only accepts
|
|
9
|
+
* `b.httpRoute(...)` during a module's `register()`, but the per-account adapters
|
|
10
|
+
* those routes must feed are owned by the plugin's `startAccount` lifecycle,
|
|
11
|
+
* which runs AFTER `register()`. So the module registers one route per configured
|
|
12
|
+
* account up front, each route resolving its account's started adapter through
|
|
13
|
+
* THIS registry at request time, and the plugin populates / clears the registry
|
|
14
|
+
* on start / stop. Same shape + rationale as Slack's `account-registry.ts`.
|
|
15
|
+
*
|
|
16
|
+
* Pinned via `resolveGlobalSingleton` so a hot reload / dual-build run shares one
|
|
17
|
+
* map.
|
|
18
|
+
*/
|
|
19
|
+
/** The minimal adapter surface a webhook route needs to feed inbound events. */
|
|
20
|
+
export interface BlueBubblesAccountSink {
|
|
21
|
+
feedWebhookEvent(eventType: string | undefined, payload: unknown): void;
|
|
22
|
+
}
|
|
23
|
+
/** Register a started per-account adapter so its webhook route can feed it. Idempotent. */
|
|
24
|
+
export declare function registerBlueBubblesAccountSink(accountId: string, sink: BlueBubblesAccountSink): void;
|
|
25
|
+
/** Drop a per-account adapter (called on `stopAccount`) so a dead adapter isn't fed. */
|
|
26
|
+
export declare function removeBlueBubblesAccountSink(accountId: string): void;
|
|
27
|
+
/** Look up a started per-account adapter (or undefined when not started). */
|
|
28
|
+
export declare function getBlueBubblesAccountSink(accountId: string): BlueBubblesAccountSink | undefined;
|
|
29
|
+
/** Diagnostic — the account ids with a live sink. */
|
|
30
|
+
export declare function listBlueBubblesAccountSinks(): string[];
|
|
31
|
+
/** Test-only — clear every registered sink. */
|
|
32
|
+
export declare function resetBlueBubblesAccountSinksForTests(): void;
|
|
33
|
+
//# sourceMappingURL=account-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-registry.d.ts","sourceRoot":"","sources":["../../../../src/agents/channels/bluebubbles/account-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,gFAAgF;AAChF,MAAM,WAAW,sBAAsB;IACtC,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CACxE;AAaD,2FAA2F;AAC3F,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,GAAG,IAAI,CAEpG;AAED,wFAAwF;AACxF,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAEpE;AAED,6EAA6E;AAC7E,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,sBAAsB,GAAG,SAAS,CAE/F;AAED,qDAAqD;AACrD,wBAAgB,2BAA2B,IAAI,MAAM,EAAE,CAEtD;AAED,+CAA+C;AAC/C,wBAAgB,oCAAoC,IAAI,IAAI,CAE3D"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-account BlueBubbles adapter registry — the cross-module bridge that lets
|
|
3
|
+
* the webhook routes (registered at module `register()` time in `module.ts`) find
|
|
4
|
+
* the per-account adapters that are STARTED later by `createBlueBubblesPlugin`
|
|
5
|
+
* (`plugin.ts`).
|
|
6
|
+
*
|
|
7
|
+
* Why this exists. In a multi-account install each account has its OWN inbound
|
|
8
|
+
* webhook path (`/bluebubbles/webhook/<accountId>`). The gateway only accepts
|
|
9
|
+
* `b.httpRoute(...)` during a module's `register()`, but the per-account adapters
|
|
10
|
+
* those routes must feed are owned by the plugin's `startAccount` lifecycle,
|
|
11
|
+
* which runs AFTER `register()`. So the module registers one route per configured
|
|
12
|
+
* account up front, each route resolving its account's started adapter through
|
|
13
|
+
* THIS registry at request time, and the plugin populates / clears the registry
|
|
14
|
+
* on start / stop. Same shape + rationale as Slack's `account-registry.ts`.
|
|
15
|
+
*
|
|
16
|
+
* Pinned via `resolveGlobalSingleton` so a hot reload / dual-build run shares one
|
|
17
|
+
* map.
|
|
18
|
+
*/
|
|
19
|
+
import { resolveGlobalSingleton } from "../../../shared/global-singleton.js";
|
|
20
|
+
import { BLUEBUBBLES_DEFAULT_ACCOUNT_ID } from "./account-config.js";
|
|
21
|
+
const BLUEBUBBLES_ACCOUNT_SINKS_KEY = Symbol.for("brigade.bluebubbles.accountSinks");
|
|
22
|
+
const sinks = resolveGlobalSingleton(BLUEBUBBLES_ACCOUNT_SINKS_KEY, () => new Map());
|
|
23
|
+
function normalizeAccountId(accountId) {
|
|
24
|
+
return accountId && accountId.trim() ? accountId.trim() : BLUEBUBBLES_DEFAULT_ACCOUNT_ID;
|
|
25
|
+
}
|
|
26
|
+
/** Register a started per-account adapter so its webhook route can feed it. Idempotent. */
|
|
27
|
+
export function registerBlueBubblesAccountSink(accountId, sink) {
|
|
28
|
+
sinks.set(normalizeAccountId(accountId), sink);
|
|
29
|
+
}
|
|
30
|
+
/** Drop a per-account adapter (called on `stopAccount`) so a dead adapter isn't fed. */
|
|
31
|
+
export function removeBlueBubblesAccountSink(accountId) {
|
|
32
|
+
sinks.delete(normalizeAccountId(accountId));
|
|
33
|
+
}
|
|
34
|
+
/** Look up a started per-account adapter (or undefined when not started). */
|
|
35
|
+
export function getBlueBubblesAccountSink(accountId) {
|
|
36
|
+
return sinks.get(normalizeAccountId(accountId));
|
|
37
|
+
}
|
|
38
|
+
/** Diagnostic — the account ids with a live sink. */
|
|
39
|
+
export function listBlueBubblesAccountSinks() {
|
|
40
|
+
return [...sinks.keys()];
|
|
41
|
+
}
|
|
42
|
+
/** Test-only — clear every registered sink. */
|
|
43
|
+
export function resetBlueBubblesAccountSinksForTests() {
|
|
44
|
+
sinks.clear();
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=account-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-registry.js","sourceRoot":"","sources":["../../../../src/agents/channels/bluebubbles/account-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AAOrE,MAAM,6BAA6B,GAAG,MAAM,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;AAErF,MAAM,KAAK,GAAG,sBAAsB,CACnC,6BAA6B,EAC7B,GAAG,EAAE,CAAC,IAAI,GAAG,EAAkC,CAC/C,CAAC;AAEF,SAAS,kBAAkB,CAAC,SAAoC;IAC/D,OAAO,SAAS,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,8BAA8B,CAAC;AAC1F,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,8BAA8B,CAAC,SAAiB,EAAE,IAA4B;IAC7F,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,4BAA4B,CAAC,SAAiB;IAC7D,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,yBAAyB,CAAC,SAAiB;IAC1D,OAAO,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC;AACjD,CAAC;AAED,qDAAqD;AACrD,MAAM,UAAU,2BAA2B;IAC1C,OAAO,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;AAC1B,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,oCAAoC;IACnD,KAAK,CAAC,KAAK,EAAE,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BlueBubbles channel adapter.
|
|
3
|
+
*
|
|
4
|
+
* Implements the Brigade `ChannelAdapter` contract on top of the BlueBubbles
|
|
5
|
+
* macOS server (REST-out, `connection.ts`) with inbound delivered via the gateway
|
|
6
|
+
* webhook route (`feedWebhookEvent` → the connection's normalize+dedupe path).
|
|
7
|
+
* BlueBubbles authenticates with a server password (sealed like Slack/Discord
|
|
8
|
+
* tokens); enablement is `channels.bluebubbles.enabled: true` plus a resolvable
|
|
9
|
+
* serverUrl + password.
|
|
10
|
+
*
|
|
11
|
+
* Unlike the native `imessage` channel, BlueBubbles supports REAL message actions
|
|
12
|
+
* via the server's Private API — reactions / edit / unsend — so this adapter
|
|
13
|
+
* advertises those capabilities (gated on `actions.*` config AND the live
|
|
14
|
+
* Private-API status from the probe) and implements `handleAction`.
|
|
15
|
+
*
|
|
16
|
+
* TEST SEAM: `connectImpl` overrides how the connection is built — production
|
|
17
|
+
* leaves it undefined and `connectBlueBubbles` is used with the real (injectable)
|
|
18
|
+
* fetch; a unit test injects a fake connection so send / action / inbound run
|
|
19
|
+
* with no live server.
|
|
20
|
+
*/
|
|
21
|
+
import { type ChannelAdapter } from "../sdk.js";
|
|
22
|
+
import { type BlueBubblesConnection, type ConnectBlueBubblesArgs } from "./connection.js";
|
|
23
|
+
import { probeBlueBubbles } from "./probe.js";
|
|
24
|
+
/**
|
|
25
|
+
* Synthesise the agent-facing note for an inbound tapback. A tapback carries no
|
|
26
|
+
* text of its own, so the note ("<emoji> tapback on message <id>") is what the
|
|
27
|
+
* central pipeline routes through dispatchTurn so the agent has context.
|
|
28
|
+
*/
|
|
29
|
+
export declare function buildBlueBubblesReactionNote(emoji: string, targetMessageId: string): string;
|
|
30
|
+
/** Adapter construction options — all optional for back-compat + testing. */
|
|
31
|
+
export interface CreateBlueBubblesAdapterOptions {
|
|
32
|
+
/** Per-account scope. Defaults to `"default"` (single-account). */
|
|
33
|
+
accountId?: string;
|
|
34
|
+
/** TEST SEAM: override how the connection is built. */
|
|
35
|
+
connectImpl?: (args: ConnectBlueBubblesArgs) => BlueBubblesConnection;
|
|
36
|
+
/** TEST SEAM: override the start-time probe (skips the real network round-trip). */
|
|
37
|
+
probeImpl?: typeof probeBlueBubbles;
|
|
38
|
+
}
|
|
39
|
+
/** The extended adapter surface the webhook route + plugin bridge drive. */
|
|
40
|
+
export interface BlueBubblesAdapter extends ChannelAdapter {
|
|
41
|
+
/** Feed a parsed BlueBubbles webhook event into the inbound path. */
|
|
42
|
+
feedWebhookEvent(eventType: string | undefined, payload: unknown): void;
|
|
43
|
+
}
|
|
44
|
+
export declare function createBlueBubblesAdapter(opts?: CreateBlueBubblesAdapterOptions): BlueBubblesAdapter;
|
|
45
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/agents/channels/bluebubbles/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAEN,KAAK,cAAc,EAOnB,MAAM,WAAW,CAAC;AAYnB,OAAO,EAEN,KAAK,qBAAqB,EAE1B,KAAK,sBAAsB,EAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAA0B,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAKtE;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAK3F;AAeD,6EAA6E;AAC7E,MAAM,WAAW,+BAA+B;IAC/C,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,sBAAsB,KAAK,qBAAqB,CAAC;IACtE,oFAAoF;IACpF,SAAS,CAAC,EAAE,OAAO,gBAAgB,CAAC;CACpC;AAED,4EAA4E;AAC5E,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACzD,qEAAqE;IACrE,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CACxE;AAMD,wBAAgB,wBAAwB,CAAC,IAAI,GAAE,+BAAoC,GAAG,kBAAkB,CAuTvG"}
|