@openclaw/bluebubbles 2026.3.8-beta.1 → 2026.3.11
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/package.json +1 -1
- package/src/channel.ts +7 -3
- package/src/config-schema.ts +7 -5
- package/src/onboarding.ts +9 -28
package/package.json
CHANGED
package/src/channel.ts
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
buildAccountScopedDmSecurityPolicy,
|
|
23
23
|
collectOpenGroupPolicyRestrictSendersWarnings,
|
|
24
|
+
createAccountStatusSink,
|
|
24
25
|
formatNormalizedAllowFromEntries,
|
|
25
26
|
mapAllowFromEntries,
|
|
26
27
|
} from "openclaw/plugin-sdk/compat";
|
|
@@ -369,8 +370,11 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
|
|
|
369
370
|
startAccount: async (ctx) => {
|
|
370
371
|
const account = ctx.account;
|
|
371
372
|
const webhookPath = resolveWebhookPathFromConfig(account.config);
|
|
372
|
-
|
|
373
|
-
accountId:
|
|
373
|
+
const statusSink = createAccountStatusSink({
|
|
374
|
+
accountId: ctx.accountId,
|
|
375
|
+
setStatus: ctx.setStatus,
|
|
376
|
+
});
|
|
377
|
+
statusSink({
|
|
374
378
|
baseUrl: account.baseUrl,
|
|
375
379
|
});
|
|
376
380
|
ctx.log?.info(`[${account.accountId}] starting provider (webhook=${webhookPath})`);
|
|
@@ -379,7 +383,7 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
|
|
|
379
383
|
config: ctx.cfg,
|
|
380
384
|
runtime: ctx.runtime,
|
|
381
385
|
abortSignal: ctx.abortSignal,
|
|
382
|
-
statusSink
|
|
386
|
+
statusSink,
|
|
383
387
|
webhookPath,
|
|
384
388
|
});
|
|
385
389
|
},
|
package/src/config-schema.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { MarkdownConfigSchema, ToolPolicySchema } from "openclaw/plugin-sdk/bluebubbles";
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
AllowFromListSchema,
|
|
4
4
|
buildCatchallMultiAccountChannelSchema,
|
|
5
|
+
DmPolicySchema,
|
|
6
|
+
GroupPolicySchema,
|
|
5
7
|
} from "openclaw/plugin-sdk/compat";
|
|
6
8
|
import { z } from "zod";
|
|
7
9
|
import { buildSecretInputSchema, hasConfiguredSecretInput } from "./secret-input.js";
|
|
@@ -35,10 +37,10 @@ const bluebubblesAccountSchema = z
|
|
|
35
37
|
serverUrl: z.string().optional(),
|
|
36
38
|
password: buildSecretInputSchema().optional(),
|
|
37
39
|
webhookPath: z.string().optional(),
|
|
38
|
-
dmPolicy:
|
|
39
|
-
allowFrom:
|
|
40
|
-
groupAllowFrom:
|
|
41
|
-
groupPolicy:
|
|
40
|
+
dmPolicy: DmPolicySchema.optional(),
|
|
41
|
+
allowFrom: AllowFromListSchema,
|
|
42
|
+
groupAllowFrom: AllowFromListSchema,
|
|
43
|
+
groupPolicy: GroupPolicySchema.optional(),
|
|
42
44
|
historyLimit: z.number().int().min(0).optional(),
|
|
43
45
|
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
44
46
|
textChunkLimit: z.number().int().positive().optional(),
|
package/src/onboarding.ts
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
formatDocsLink,
|
|
11
11
|
mergeAllowFromEntries,
|
|
12
12
|
normalizeAccountId,
|
|
13
|
+
patchScopedAccountConfig,
|
|
13
14
|
resolveAccountIdForConfigure,
|
|
14
15
|
setTopLevelChannelDmPolicyWithAllowFrom,
|
|
15
16
|
} from "openclaw/plugin-sdk/bluebubbles";
|
|
@@ -38,34 +39,14 @@ function setBlueBubblesAllowFrom(
|
|
|
38
39
|
accountId: string,
|
|
39
40
|
allowFrom: string[],
|
|
40
41
|
): OpenClawConfig {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
...cfg,
|
|
55
|
-
channels: {
|
|
56
|
-
...cfg.channels,
|
|
57
|
-
bluebubbles: {
|
|
58
|
-
...cfg.channels?.bluebubbles,
|
|
59
|
-
accounts: {
|
|
60
|
-
...cfg.channels?.bluebubbles?.accounts,
|
|
61
|
-
[accountId]: {
|
|
62
|
-
...cfg.channels?.bluebubbles?.accounts?.[accountId],
|
|
63
|
-
allowFrom,
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
};
|
|
42
|
+
return patchScopedAccountConfig({
|
|
43
|
+
cfg,
|
|
44
|
+
channelKey: channel,
|
|
45
|
+
accountId,
|
|
46
|
+
patch: { allowFrom },
|
|
47
|
+
ensureChannelEnabled: false,
|
|
48
|
+
ensureAccountEnabled: false,
|
|
49
|
+
});
|
|
69
50
|
}
|
|
70
51
|
|
|
71
52
|
function parseBlueBubblesAllowFromInput(raw: string): string[] {
|