mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-02 20:40:21 +00:00
refactor(plugin-sdk): use scoped core imports for bundled channels
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
import { Separator, TextDisplay } from "@buape/carbon";
|
||||
import {
|
||||
buildAgentSessionKey,
|
||||
resolveThreadSessionKeys,
|
||||
type RoutePeer,
|
||||
} from "openclaw/plugin-sdk";
|
||||
import { createScopedChannelConfigBase } from "openclaw/plugin-sdk/compat";
|
||||
import {
|
||||
buildAccountScopedAllowlistConfigEditor,
|
||||
@@ -13,6 +8,11 @@ import {
|
||||
createScopedAccountConfigAccessors,
|
||||
formatAllowFromLowercase,
|
||||
} from "openclaw/plugin-sdk/compat";
|
||||
import {
|
||||
buildAgentSessionKey,
|
||||
resolveThreadSessionKeys,
|
||||
type RoutePeer,
|
||||
} from "openclaw/plugin-sdk/core";
|
||||
import {
|
||||
buildComputedAccountStatusSnapshot,
|
||||
buildChannelConfigSchema,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { buildAgentSessionKey, type RoutePeer } from "openclaw/plugin-sdk";
|
||||
import {
|
||||
buildAccountScopedAllowlistConfigEditor,
|
||||
buildAccountScopedDmSecurityPolicy,
|
||||
collectAllowlistProviderRestrictSendersWarnings,
|
||||
} from "openclaw/plugin-sdk/compat";
|
||||
import { buildAgentSessionKey, type RoutePeer } from "openclaw/plugin-sdk/core";
|
||||
import {
|
||||
buildChannelConfigSchema,
|
||||
collectStatusIssuesFromLastError,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { buildAgentSessionKey, type RoutePeer } from "openclaw/plugin-sdk";
|
||||
import {
|
||||
buildAccountScopedAllowlistConfigEditor,
|
||||
buildAccountScopedDmSecurityPolicy,
|
||||
createScopedAccountConfigAccessors,
|
||||
collectAllowlistProviderRestrictSendersWarnings,
|
||||
} from "openclaw/plugin-sdk/compat";
|
||||
import { buildAgentSessionKey, type RoutePeer } from "openclaw/plugin-sdk/core";
|
||||
import {
|
||||
buildBaseAccountStatusSnapshot,
|
||||
buildBaseChannelStatusSummary,
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
import {
|
||||
buildAgentSessionKey,
|
||||
resolveThreadSessionKeys,
|
||||
type RoutePeer,
|
||||
} from "openclaw/plugin-sdk";
|
||||
import { createScopedChannelConfigBase } from "openclaw/plugin-sdk/compat";
|
||||
import {
|
||||
buildAccountScopedAllowlistConfigEditor,
|
||||
@@ -12,6 +7,11 @@ import {
|
||||
createScopedAccountConfigAccessors,
|
||||
formatAllowFromLowercase,
|
||||
} from "openclaw/plugin-sdk/compat";
|
||||
import {
|
||||
buildAgentSessionKey,
|
||||
resolveThreadSessionKeys,
|
||||
type RoutePeer,
|
||||
} from "openclaw/plugin-sdk/core";
|
||||
import {
|
||||
buildComputedAccountStatusSnapshot,
|
||||
buildChannelConfigSchema,
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
import {
|
||||
buildAgentSessionKey,
|
||||
resolveThreadSessionKeys,
|
||||
type RoutePeer,
|
||||
} from "openclaw/plugin-sdk";
|
||||
import { createScopedChannelConfigBase } from "openclaw/plugin-sdk/compat";
|
||||
import {
|
||||
buildAccountScopedAllowlistConfigEditor,
|
||||
@@ -12,6 +7,11 @@ import {
|
||||
createScopedDmSecurityResolver,
|
||||
formatAllowFromLowercase,
|
||||
} from "openclaw/plugin-sdk/compat";
|
||||
import {
|
||||
buildAgentSessionKey,
|
||||
resolveThreadSessionKeys,
|
||||
type RoutePeer,
|
||||
} from "openclaw/plugin-sdk/core";
|
||||
import {
|
||||
buildChannelConfigSchema,
|
||||
buildTokenChannelStatusSummary,
|
||||
|
||||
@@ -138,3 +138,9 @@ export type {
|
||||
TailscaleStatusCommandResult,
|
||||
TailscaleStatusCommandRunner,
|
||||
} from "../shared/tailscale-status.js";
|
||||
export {
|
||||
buildAgentSessionKey,
|
||||
type RoutePeer,
|
||||
type RoutePeerKind,
|
||||
} from "../routing/resolve-route.js";
|
||||
export { resolveThreadSessionKeys } from "../routing/session-key.js";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import * as extensionApi from "openclaw/extension-api";
|
||||
import * as compatSdk from "openclaw/plugin-sdk/compat";
|
||||
import * as coreSdk from "openclaw/plugin-sdk/core";
|
||||
import * as discordSdk from "openclaw/plugin-sdk/discord";
|
||||
import * as imessageSdk from "openclaw/plugin-sdk/imessage";
|
||||
import * as lineSdk from "openclaw/plugin-sdk/line";
|
||||
@@ -25,6 +26,11 @@ describe("plugin-sdk subpath exports", () => {
|
||||
expect(typeof compatSdk.resolveControlCommandGate).toBe("function");
|
||||
});
|
||||
|
||||
it("exports core routing helpers", () => {
|
||||
expect(typeof coreSdk.buildAgentSessionKey).toBe("function");
|
||||
expect(typeof coreSdk.resolveThreadSessionKeys).toBe("function");
|
||||
});
|
||||
|
||||
it("exports Discord helpers", () => {
|
||||
expect(typeof discordSdk.resolveDiscordAccount).toBe("function");
|
||||
expect(typeof discordSdk.inspectDiscordAccount).toBe("function");
|
||||
|
||||
Reference in New Issue
Block a user