mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:50:43 +00:00
refactor: trim secret contract type imports
This commit is contained in:
@@ -3,7 +3,6 @@ import {
|
||||
getChannelSurface,
|
||||
type ResolverContext,
|
||||
type SecretDefaults,
|
||||
type SecretTargetRegistryEntry,
|
||||
} from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
||||
|
||||
export const secretTargetRegistryEntries = [
|
||||
@@ -29,7 +28,7 @@ export const secretTargetRegistryEntries = [
|
||||
includeInConfigure: true,
|
||||
includeInAudit: true,
|
||||
},
|
||||
] satisfies SecretTargetRegistryEntry[];
|
||||
] satisfies import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[];
|
||||
|
||||
export function collectRuntimeConfigAssignments(params: {
|
||||
config: { channels?: Record<string, unknown> };
|
||||
|
||||
@@ -8,7 +8,6 @@ import type {
|
||||
import { createTestPluginApi } from "openclaw/plugin-sdk/plugin-test-api";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { OpenClawPluginApi } from "./api.js";
|
||||
import type { PendingPairingRequest } from "./notify.ts";
|
||||
|
||||
const pluginApiMocks = vi.hoisted(() => ({
|
||||
clearDeviceBootstrapTokens: vi.fn(async () => ({ removed: 2 })),
|
||||
@@ -713,7 +712,7 @@ describe("device-pair notify pending formatting", () => {
|
||||
it("includes role and scopes for pending requests", async () => {
|
||||
const { formatPendingRequests } =
|
||||
await vi.importActual<typeof import("./notify.ts")>("./notify.ts");
|
||||
const pending: PendingPairingRequest[] = [
|
||||
const pending: Parameters<typeof formatPendingRequests>[0] = [
|
||||
{
|
||||
requestId: "req-1",
|
||||
deviceId: "device-1",
|
||||
@@ -737,7 +736,7 @@ describe("device-pair notify pending formatting", () => {
|
||||
it("falls back to roles list and no scopes when role/scopes are absent", async () => {
|
||||
const { formatPendingRequests } =
|
||||
await vi.importActual<typeof import("./notify.ts")>("./notify.ts");
|
||||
const pending: PendingPairingRequest[] = [
|
||||
const pending: Parameters<typeof formatPendingRequests>[0] = [
|
||||
{
|
||||
requestId: "req-2",
|
||||
deviceId: "device-2",
|
||||
|
||||
@@ -22,7 +22,7 @@ type NotifyStateFile = {
|
||||
notifiedRequestIds: Record<string, number>;
|
||||
};
|
||||
|
||||
export type PendingPairingRequest = {
|
||||
type PendingPairingRequest = {
|
||||
requestId: string;
|
||||
deviceId: string;
|
||||
displayName?: string;
|
||||
|
||||
@@ -7,7 +7,6 @@ import {
|
||||
resolveChannelAccountSurface,
|
||||
type ResolverContext,
|
||||
type SecretDefaults,
|
||||
type SecretTargetRegistryEntry,
|
||||
} from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
||||
import { coerceSecretRef } from "openclaw/plugin-sdk/secret-ref-runtime";
|
||||
|
||||
@@ -44,7 +43,7 @@ export const secretTargetRegistryEntries = [
|
||||
includeInConfigure: true,
|
||||
includeInAudit: true,
|
||||
},
|
||||
] satisfies SecretTargetRegistryEntry[];
|
||||
] satisfies import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[];
|
||||
|
||||
function resolveSecretInputRef(params: {
|
||||
value: unknown;
|
||||
|
||||
@@ -7,7 +7,6 @@ import {
|
||||
isRecord,
|
||||
type ResolverContext,
|
||||
type SecretDefaults,
|
||||
type SecretTargetRegistryEntry,
|
||||
} from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
||||
|
||||
export const secretTargetRegistryEntries = [
|
||||
@@ -55,7 +54,7 @@ export const secretTargetRegistryEntries = [
|
||||
includeInConfigure: true,
|
||||
includeInAudit: true,
|
||||
},
|
||||
] satisfies SecretTargetRegistryEntry[];
|
||||
] satisfies import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[];
|
||||
|
||||
export function collectRuntimeConfigAssignments(params: {
|
||||
config: { channels?: Record<string, unknown> };
|
||||
|
||||
@@ -5,7 +5,6 @@ import {
|
||||
type ChannelAccountEntry,
|
||||
type ResolverContext,
|
||||
type SecretDefaults,
|
||||
type SecretTargetRegistryEntry,
|
||||
} from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
||||
|
||||
export const secretTargetRegistryEntries = [
|
||||
@@ -53,7 +52,7 @@ export const secretTargetRegistryEntries = [
|
||||
includeInConfigure: true,
|
||||
includeInAudit: true,
|
||||
},
|
||||
] satisfies SecretTargetRegistryEntry[];
|
||||
] satisfies import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[];
|
||||
|
||||
export function collectRuntimeConfigAssignments(params: {
|
||||
config: { channels?: Record<string, unknown> };
|
||||
|
||||
Reference in New Issue
Block a user