From 18417f80ad5254b0b4e18696219473e89f6ae816 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 1 May 2026 20:37:59 +0100 Subject: [PATCH] refactor: annotate secret target registries --- extensions/bluebubbles/src/secret-contract.ts | 49 ++--- extensions/googlechat/src/secret-contract.ts | 57 +++--- extensions/irc/src/secret-contract.ts | 93 ++++----- extensions/matrix/src/secret-contract.ts | 93 ++++----- extensions/msteams/src/secret-contract.ts | 27 +-- .../nextcloud-talk/src/secret-contract.ts | 93 ++++----- extensions/slack/src/secret-contract.ts | 181 +++++++++--------- extensions/telegram/src/secret-contract.ts | 93 ++++----- 8 files changed, 347 insertions(+), 339 deletions(-) diff --git a/extensions/bluebubbles/src/secret-contract.ts b/extensions/bluebubbles/src/secret-contract.ts index beec9de7a6b..c1d3ec26e4c 100644 --- a/extensions/bluebubbles/src/secret-contract.ts +++ b/extensions/bluebubbles/src/secret-contract.ts @@ -5,30 +5,31 @@ import { type SecretDefaults, } from "openclaw/plugin-sdk/channel-secret-basic-runtime"; -export const secretTargetRegistryEntries = [ - { - id: "channels.bluebubbles.accounts.*.password", - targetType: "channels.bluebubbles.accounts.*.password", - configFile: "openclaw.json", - pathPattern: "channels.bluebubbles.accounts.*.password", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.bluebubbles.password", - targetType: "channels.bluebubbles.password", - configFile: "openclaw.json", - pathPattern: "channels.bluebubbles.password", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, -] satisfies import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[]; +export const secretTargetRegistryEntries: import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[] = + [ + { + id: "channels.bluebubbles.accounts.*.password", + targetType: "channels.bluebubbles.accounts.*.password", + configFile: "openclaw.json", + pathPattern: "channels.bluebubbles.accounts.*.password", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.bluebubbles.password", + targetType: "channels.bluebubbles.password", + configFile: "openclaw.json", + pathPattern: "channels.bluebubbles.password", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + ]; export function collectRuntimeConfigAssignments(params: { config: { channels?: Record }; diff --git a/extensions/googlechat/src/secret-contract.ts b/extensions/googlechat/src/secret-contract.ts index 145aaf6fdcf..e59f761c76a 100644 --- a/extensions/googlechat/src/secret-contract.ts +++ b/extensions/googlechat/src/secret-contract.ts @@ -16,34 +16,35 @@ type GoogleChatAccountLike = { accounts?: Record; }; -export const secretTargetRegistryEntries = [ - { - id: "channels.googlechat.accounts.*.serviceAccount", - targetType: "channels.googlechat.serviceAccount", - targetTypeAliases: ["channels.googlechat.accounts.*.serviceAccount"], - configFile: "openclaw.json", - pathPattern: "channels.googlechat.accounts.*.serviceAccount", - refPathPattern: "channels.googlechat.accounts.*.serviceAccountRef", - secretShape: "sibling_ref", - expectedResolvedValue: "string-or-object", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - accountIdPathSegmentIndex: 3, - }, - { - id: "channels.googlechat.serviceAccount", - targetType: "channels.googlechat.serviceAccount", - configFile: "openclaw.json", - pathPattern: "channels.googlechat.serviceAccount", - refPathPattern: "channels.googlechat.serviceAccountRef", - secretShape: "sibling_ref", - expectedResolvedValue: "string-or-object", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, -] satisfies import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[]; +export const secretTargetRegistryEntries: import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[] = + [ + { + id: "channels.googlechat.accounts.*.serviceAccount", + targetType: "channels.googlechat.serviceAccount", + targetTypeAliases: ["channels.googlechat.accounts.*.serviceAccount"], + configFile: "openclaw.json", + pathPattern: "channels.googlechat.accounts.*.serviceAccount", + refPathPattern: "channels.googlechat.accounts.*.serviceAccountRef", + secretShape: "sibling_ref", + expectedResolvedValue: "string-or-object", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + accountIdPathSegmentIndex: 3, + }, + { + id: "channels.googlechat.serviceAccount", + targetType: "channels.googlechat.serviceAccount", + configFile: "openclaw.json", + pathPattern: "channels.googlechat.serviceAccount", + refPathPattern: "channels.googlechat.serviceAccountRef", + secretShape: "sibling_ref", + expectedResolvedValue: "string-or-object", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + ]; function resolveSecretInputRef(params: { value: unknown; diff --git a/extensions/irc/src/secret-contract.ts b/extensions/irc/src/secret-contract.ts index bd31b6ea044..80e1edf0386 100644 --- a/extensions/irc/src/secret-contract.ts +++ b/extensions/irc/src/secret-contract.ts @@ -9,52 +9,53 @@ import { type SecretDefaults, } from "openclaw/plugin-sdk/channel-secret-basic-runtime"; -export const secretTargetRegistryEntries = [ - { - id: "channels.irc.accounts.*.nickserv.password", - targetType: "channels.irc.accounts.*.nickserv.password", - configFile: "openclaw.json", - pathPattern: "channels.irc.accounts.*.nickserv.password", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.irc.accounts.*.password", - targetType: "channels.irc.accounts.*.password", - configFile: "openclaw.json", - pathPattern: "channels.irc.accounts.*.password", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.irc.nickserv.password", - targetType: "channels.irc.nickserv.password", - configFile: "openclaw.json", - pathPattern: "channels.irc.nickserv.password", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.irc.password", - targetType: "channels.irc.password", - configFile: "openclaw.json", - pathPattern: "channels.irc.password", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, -] satisfies import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[]; +export const secretTargetRegistryEntries: import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[] = + [ + { + id: "channels.irc.accounts.*.nickserv.password", + targetType: "channels.irc.accounts.*.nickserv.password", + configFile: "openclaw.json", + pathPattern: "channels.irc.accounts.*.nickserv.password", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.irc.accounts.*.password", + targetType: "channels.irc.accounts.*.password", + configFile: "openclaw.json", + pathPattern: "channels.irc.accounts.*.password", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.irc.nickserv.password", + targetType: "channels.irc.nickserv.password", + configFile: "openclaw.json", + pathPattern: "channels.irc.nickserv.password", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.irc.password", + targetType: "channels.irc.password", + configFile: "openclaw.json", + pathPattern: "channels.irc.password", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + ]; export function collectRuntimeConfigAssignments(params: { config: { channels?: Record }; diff --git a/extensions/matrix/src/secret-contract.ts b/extensions/matrix/src/secret-contract.ts index b2e3da3bdd8..b433ad7a4b6 100644 --- a/extensions/matrix/src/secret-contract.ts +++ b/extensions/matrix/src/secret-contract.ts @@ -10,52 +10,53 @@ import { } from "openclaw/plugin-sdk/channel-secret-basic-runtime"; import { getMatrixScopedEnvVarNames } from "./env-vars.js"; -export const secretTargetRegistryEntries = [ - { - id: "channels.matrix.accounts.*.accessToken", - targetType: "channels.matrix.accounts.*.accessToken", - configFile: "openclaw.json", - pathPattern: "channels.matrix.accounts.*.accessToken", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.matrix.accounts.*.password", - targetType: "channels.matrix.accounts.*.password", - configFile: "openclaw.json", - pathPattern: "channels.matrix.accounts.*.password", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.matrix.accessToken", - targetType: "channels.matrix.accessToken", - configFile: "openclaw.json", - pathPattern: "channels.matrix.accessToken", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.matrix.password", - targetType: "channels.matrix.password", - configFile: "openclaw.json", - pathPattern: "channels.matrix.password", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, -] satisfies import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[]; +export const secretTargetRegistryEntries: import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[] = + [ + { + id: "channels.matrix.accounts.*.accessToken", + targetType: "channels.matrix.accounts.*.accessToken", + configFile: "openclaw.json", + pathPattern: "channels.matrix.accounts.*.accessToken", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.matrix.accounts.*.password", + targetType: "channels.matrix.accounts.*.password", + configFile: "openclaw.json", + pathPattern: "channels.matrix.accounts.*.password", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.matrix.accessToken", + targetType: "channels.matrix.accessToken", + configFile: "openclaw.json", + pathPattern: "channels.matrix.accessToken", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.matrix.password", + targetType: "channels.matrix.password", + configFile: "openclaw.json", + pathPattern: "channels.matrix.password", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + ]; export function collectRuntimeConfigAssignments(params: { config: { channels?: Record }; diff --git a/extensions/msteams/src/secret-contract.ts b/extensions/msteams/src/secret-contract.ts index 9c64a709268..3a28367a8b6 100644 --- a/extensions/msteams/src/secret-contract.ts +++ b/extensions/msteams/src/secret-contract.ts @@ -5,19 +5,20 @@ import { type SecretDefaults, } from "openclaw/plugin-sdk/channel-secret-basic-runtime"; -export const secretTargetRegistryEntries = [ - { - id: "channels.msteams.appPassword", - targetType: "channels.msteams.appPassword", - configFile: "openclaw.json", - pathPattern: "channels.msteams.appPassword", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, -] satisfies import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[]; +export const secretTargetRegistryEntries: import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[] = + [ + { + id: "channels.msteams.appPassword", + targetType: "channels.msteams.appPassword", + configFile: "openclaw.json", + pathPattern: "channels.msteams.appPassword", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + ]; export function collectRuntimeConfigAssignments(params: { config: { channels?: Record }; diff --git a/extensions/nextcloud-talk/src/secret-contract.ts b/extensions/nextcloud-talk/src/secret-contract.ts index 4b80fd20bbe..ba34154f4ce 100644 --- a/extensions/nextcloud-talk/src/secret-contract.ts +++ b/extensions/nextcloud-talk/src/secret-contract.ts @@ -7,52 +7,53 @@ import { type SecretDefaults, } from "openclaw/plugin-sdk/channel-secret-basic-runtime"; -export const secretTargetRegistryEntries = [ - { - id: "channels.nextcloud-talk.accounts.*.apiPassword", - targetType: "channels.nextcloud-talk.accounts.*.apiPassword", - configFile: "openclaw.json", - pathPattern: "channels.nextcloud-talk.accounts.*.apiPassword", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.nextcloud-talk.accounts.*.botSecret", - targetType: "channels.nextcloud-talk.accounts.*.botSecret", - configFile: "openclaw.json", - pathPattern: "channels.nextcloud-talk.accounts.*.botSecret", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.nextcloud-talk.apiPassword", - targetType: "channels.nextcloud-talk.apiPassword", - configFile: "openclaw.json", - pathPattern: "channels.nextcloud-talk.apiPassword", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.nextcloud-talk.botSecret", - targetType: "channels.nextcloud-talk.botSecret", - configFile: "openclaw.json", - pathPattern: "channels.nextcloud-talk.botSecret", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, -] satisfies import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[]; +export const secretTargetRegistryEntries: import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[] = + [ + { + id: "channels.nextcloud-talk.accounts.*.apiPassword", + targetType: "channels.nextcloud-talk.accounts.*.apiPassword", + configFile: "openclaw.json", + pathPattern: "channels.nextcloud-talk.accounts.*.apiPassword", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.nextcloud-talk.accounts.*.botSecret", + targetType: "channels.nextcloud-talk.accounts.*.botSecret", + configFile: "openclaw.json", + pathPattern: "channels.nextcloud-talk.accounts.*.botSecret", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.nextcloud-talk.apiPassword", + targetType: "channels.nextcloud-talk.apiPassword", + configFile: "openclaw.json", + pathPattern: "channels.nextcloud-talk.apiPassword", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.nextcloud-talk.botSecret", + targetType: "channels.nextcloud-talk.botSecret", + configFile: "openclaw.json", + pathPattern: "channels.nextcloud-talk.botSecret", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + ]; export function collectRuntimeConfigAssignments(params: { config: { channels?: Record }; diff --git a/extensions/slack/src/secret-contract.ts b/extensions/slack/src/secret-contract.ts index effb205befa..471a1a582e4 100644 --- a/extensions/slack/src/secret-contract.ts +++ b/extensions/slack/src/secret-contract.ts @@ -7,96 +7,97 @@ import { type SecretDefaults, } from "openclaw/plugin-sdk/channel-secret-basic-runtime"; -export const secretTargetRegistryEntries = [ - { - id: "channels.slack.accounts.*.appToken", - targetType: "channels.slack.accounts.*.appToken", - configFile: "openclaw.json", - pathPattern: "channels.slack.accounts.*.appToken", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.slack.accounts.*.botToken", - targetType: "channels.slack.accounts.*.botToken", - configFile: "openclaw.json", - pathPattern: "channels.slack.accounts.*.botToken", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.slack.accounts.*.signingSecret", - targetType: "channels.slack.accounts.*.signingSecret", - configFile: "openclaw.json", - pathPattern: "channels.slack.accounts.*.signingSecret", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.slack.accounts.*.userToken", - targetType: "channels.slack.accounts.*.userToken", - configFile: "openclaw.json", - pathPattern: "channels.slack.accounts.*.userToken", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.slack.appToken", - targetType: "channels.slack.appToken", - configFile: "openclaw.json", - pathPattern: "channels.slack.appToken", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.slack.botToken", - targetType: "channels.slack.botToken", - configFile: "openclaw.json", - pathPattern: "channels.slack.botToken", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.slack.signingSecret", - targetType: "channels.slack.signingSecret", - configFile: "openclaw.json", - pathPattern: "channels.slack.signingSecret", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.slack.userToken", - targetType: "channels.slack.userToken", - configFile: "openclaw.json", - pathPattern: "channels.slack.userToken", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, -] satisfies import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[]; +export const secretTargetRegistryEntries: import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[] = + [ + { + id: "channels.slack.accounts.*.appToken", + targetType: "channels.slack.accounts.*.appToken", + configFile: "openclaw.json", + pathPattern: "channels.slack.accounts.*.appToken", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.slack.accounts.*.botToken", + targetType: "channels.slack.accounts.*.botToken", + configFile: "openclaw.json", + pathPattern: "channels.slack.accounts.*.botToken", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.slack.accounts.*.signingSecret", + targetType: "channels.slack.accounts.*.signingSecret", + configFile: "openclaw.json", + pathPattern: "channels.slack.accounts.*.signingSecret", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.slack.accounts.*.userToken", + targetType: "channels.slack.accounts.*.userToken", + configFile: "openclaw.json", + pathPattern: "channels.slack.accounts.*.userToken", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.slack.appToken", + targetType: "channels.slack.appToken", + configFile: "openclaw.json", + pathPattern: "channels.slack.appToken", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.slack.botToken", + targetType: "channels.slack.botToken", + configFile: "openclaw.json", + pathPattern: "channels.slack.botToken", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.slack.signingSecret", + targetType: "channels.slack.signingSecret", + configFile: "openclaw.json", + pathPattern: "channels.slack.signingSecret", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.slack.userToken", + targetType: "channels.slack.userToken", + configFile: "openclaw.json", + pathPattern: "channels.slack.userToken", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + ]; export function collectRuntimeConfigAssignments(params: { config: { channels?: Record }; diff --git a/extensions/telegram/src/secret-contract.ts b/extensions/telegram/src/secret-contract.ts index a7f3fab292b..9589be00b06 100644 --- a/extensions/telegram/src/secret-contract.ts +++ b/extensions/telegram/src/secret-contract.ts @@ -15,52 +15,53 @@ function normalizeOptionalString(value: unknown): string | undefined { return trimmed ? trimmed : undefined; } -export const secretTargetRegistryEntries = [ - { - id: "channels.telegram.accounts.*.botToken", - targetType: "channels.telegram.accounts.*.botToken", - configFile: "openclaw.json", - pathPattern: "channels.telegram.accounts.*.botToken", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.telegram.accounts.*.webhookSecret", - targetType: "channels.telegram.accounts.*.webhookSecret", - configFile: "openclaw.json", - pathPattern: "channels.telegram.accounts.*.webhookSecret", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.telegram.botToken", - targetType: "channels.telegram.botToken", - configFile: "openclaw.json", - pathPattern: "channels.telegram.botToken", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, - { - id: "channels.telegram.webhookSecret", - targetType: "channels.telegram.webhookSecret", - configFile: "openclaw.json", - pathPattern: "channels.telegram.webhookSecret", - secretShape: "secret_input", - expectedResolvedValue: "string", - includeInPlan: true, - includeInConfigure: true, - includeInAudit: true, - }, -] satisfies import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[]; +export const secretTargetRegistryEntries: import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[] = + [ + { + id: "channels.telegram.accounts.*.botToken", + targetType: "channels.telegram.accounts.*.botToken", + configFile: "openclaw.json", + pathPattern: "channels.telegram.accounts.*.botToken", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.telegram.accounts.*.webhookSecret", + targetType: "channels.telegram.accounts.*.webhookSecret", + configFile: "openclaw.json", + pathPattern: "channels.telegram.accounts.*.webhookSecret", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.telegram.botToken", + targetType: "channels.telegram.botToken", + configFile: "openclaw.json", + pathPattern: "channels.telegram.botToken", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + { + id: "channels.telegram.webhookSecret", + targetType: "channels.telegram.webhookSecret", + configFile: "openclaw.json", + pathPattern: "channels.telegram.webhookSecret", + secretShape: "secret_input", + expectedResolvedValue: "string", + includeInPlan: true, + includeInConfigure: true, + includeInAudit: true, + }, + ]; export function collectRuntimeConfigAssignments(params: { config: { channels?: Record };