mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-25 08:02:04 +00:00
Extensions: align approval plugin typing
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
||||
runBrowserProxyCommand,
|
||||
} from "./register.runtime.js";
|
||||
|
||||
export const browserPluginReload = { restartPrefixes: ["browser"] } as const;
|
||||
export const browserPluginReload = { restartPrefixes: ["browser"] };
|
||||
|
||||
export const browserPluginNodeHostCommands = [
|
||||
{
|
||||
@@ -20,7 +20,7 @@ export const browserPluginNodeHostCommands = [
|
||||
cap: "browser",
|
||||
handle: runBrowserProxyCommand,
|
||||
},
|
||||
] as const;
|
||||
];
|
||||
|
||||
export const browserSecurityAuditCollectors = [collectBrowserSecurityAuditFindings] as const;
|
||||
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
import { buildDmGroupAccountAllowlistAdapter } from "openclaw/plugin-sdk/allowlist-config-edit";
|
||||
import { splitChannelApprovalCapability } from "openclaw/plugin-sdk/approval-delivery-runtime";
|
||||
import { getChatChannelMeta, type ChannelPlugin } from "openclaw/plugin-sdk/core";
|
||||
import type { ResolvedTelegramAccount } from "./src/accounts.js";
|
||||
import { resolveTelegramAccount } from "./src/accounts.js";
|
||||
import { telegramApprovalCapability } from "./src/approval-native.js";
|
||||
import { telegramConfigAdapter } from "./src/shared.js";
|
||||
|
||||
const telegramNativeApprovalAdapter = splitChannelApprovalCapability(telegramApprovalCapability);
|
||||
|
||||
export const telegramCommandTestPlugin = {
|
||||
id: "telegram",
|
||||
meta: getChatChannelMeta("telegram"),
|
||||
@@ -21,7 +18,6 @@ export const telegramCommandTestPlugin = {
|
||||
blockStreaming: true,
|
||||
},
|
||||
config: telegramConfigAdapter,
|
||||
auth: telegramNativeApprovalAdapter.auth,
|
||||
approvalCapability: telegramApprovalCapability,
|
||||
pairing: {
|
||||
idLabel: "telegramUserId",
|
||||
@@ -38,12 +34,5 @@ export const telegramCommandTestPlugin = {
|
||||
}),
|
||||
} satisfies Pick<
|
||||
ChannelPlugin<ResolvedTelegramAccount>,
|
||||
| "id"
|
||||
| "meta"
|
||||
| "capabilities"
|
||||
| "config"
|
||||
| "auth"
|
||||
| "approvalCapability"
|
||||
| "pairing"
|
||||
| "allowlist"
|
||||
"id" | "meta" | "capabilities" | "config" | "approvalCapability" | "pairing" | "allowlist"
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user