From a71c61122d41a86bb16aa62780ec30bfed611c7c Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 16 Mar 2026 20:17:45 -0700 Subject: [PATCH] refactor: add plugin sdk setup entrypoint --- src/plugin-sdk/setup.ts | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/plugin-sdk/setup.ts diff --git a/src/plugin-sdk/setup.ts b/src/plugin-sdk/setup.ts new file mode 100644 index 00000000000..e77af2904c3 --- /dev/null +++ b/src/plugin-sdk/setup.ts @@ -0,0 +1,37 @@ +// Shared setup wizard/types/helpers for extension setup surfaces and adapters. + +export type { OpenClawConfig } from "../config/config.js"; +export type { DmPolicy, GroupPolicy } from "../config/types.js"; +export type { SecretInput } from "../config/types.secrets.js"; +export type { WizardPrompter } from "../wizard/prompts.js"; +export type { ChannelSetupAdapter } from "../channels/plugins/types.adapters.js"; +export type { ChannelSetupInput } from "../channels/plugins/types.core.js"; +export type { ChannelSetupDmPolicy } from "../channels/plugins/setup-wizard-types.js"; +export type { ChannelSetupWizard } from "../channels/plugins/setup-wizard.js"; + +export { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../routing/session-key.js"; +export { formatDocsLink } from "../terminal/links.js"; +export { hasConfiguredSecretInput, normalizeSecretInputString } from "../config/types.secrets.js"; + +export { + applyAccountNameToChannelSection, + applySetupAccountConfigPatch, + migrateBaseNameToDefaultAccount, + patchScopedAccountConfig, +} from "../channels/plugins/setup-helpers.js"; +export { + addWildcardAllowFrom, + buildSingleChannelSecretPromptState, + mergeAllowFromEntries, + patchChannelConfigForAccount, + promptSingleChannelSecretInput, + resolveSetupAccountId, + runSingleChannelSecretStep, + setSetupChannelEnabled, + setTopLevelChannelAllowFrom, + setTopLevelChannelDmPolicyWithAllowFrom, + setTopLevelChannelGroupPolicy, + splitSetupEntries, +} from "../channels/plugins/setup-wizard-helpers.js"; + +export { formatResolvedUnresolvedNote } from "./resolution-notes.js";