1+ import { createAccountListHelpers } from "openclaw/plugin-sdk/account-helpers" ;
12import { DEFAULT_ACCOUNT_ID , normalizeAccountId } from "openclaw/plugin-sdk/account-id" ;
23import { resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution" ;
3- import { createAccountListHelpers , type OpenClawConfig } from "../runtime-api.js" ;
44import { normalizeResolvedSecretInputString , normalizeSecretInputString } from "../secret-input.js" ;
55import type {
66 MattermostAccountConfig ,
@@ -9,6 +9,7 @@ import type {
99 MattermostReplyToMode ,
1010} from "../types.js" ;
1111import { normalizeMattermostBaseUrl } from "./client.js" ;
12+ import type { OpenClawConfig } from "./runtime-api.js" ;
1213
1314export type MattermostTokenSource = "env" | "config" | "none" ;
1415export type MattermostBaseUrlSource = "env" | "config" | "none" ;
@@ -30,11 +31,15 @@ export type ResolvedMattermostAccount = {
3031 blockStreamingCoalesce ?: MattermostAccountConfig [ "blockStreamingCoalesce" ] ;
3132} ;
3233
33- const {
34- listAccountIds : listMattermostAccountIds ,
35- resolveDefaultAccountId : resolveDefaultMattermostAccountId ,
36- } = createAccountListHelpers ( "mattermost" ) ;
37- export { listMattermostAccountIds , resolveDefaultMattermostAccountId } ;
34+ const mattermostAccountHelpers = createAccountListHelpers ( "mattermost" ) ;
35+
36+ export function listMattermostAccountIds ( cfg : OpenClawConfig ) : string [ ] {
37+ return mattermostAccountHelpers . listAccountIds ( cfg ) ;
38+ }
39+
40+ export function resolveDefaultMattermostAccountId ( cfg : OpenClawConfig ) : string {
41+ return mattermostAccountHelpers . resolveDefaultAccountId ( cfg ) ;
42+ }
3843
3944function mergeMattermostAccountConfig (
4045 cfg : OpenClawConfig ,
0 commit comments