refactor: prune stale extension types

This commit is contained in:
Peter Steinberger
2026-05-01 10:34:04 +01:00
parent 4eec2843cd
commit e26357fee8
10 changed files with 0 additions and 156 deletions

View File

@@ -126,15 +126,6 @@ export type BlueBubblesAccountConfig = {
coalesceSameSenderDms?: boolean;
};
export type BlueBubblesConfig = Omit<BlueBubblesAccountConfig, "actions"> & {
/** Optional per-account BlueBubbles configuration (multi-account). */
accounts?: Record<string, BlueBubblesAccountConfig>;
/** Optional default account id when multiple accounts are configured. */
defaultAccount?: string;
/** Per-action tool gating (default: true for all). */
actions?: BlueBubblesActionConfig;
};
export type BlueBubblesSendTarget =
| { kind: "chat_id"; chatId: number }
| { kind: "chat_guid"; chatGuid: string }

View File

@@ -2,14 +2,11 @@ import type {
ClientRequest as GeneratedClientRequest,
InitializeParams as GeneratedInitializeParams,
InitializeResponse as GeneratedInitializeResponse,
ServerNotification as GeneratedServerNotification,
ServerRequest as GeneratedServerRequest,
ServiceTier as GeneratedServiceTier,
v2,
} from "./protocol-generated/typescript/index.js";
import type { JsonValue as GeneratedJsonValue } from "./protocol-generated/typescript/serde_json/JsonValue.js";
export type JsonPrimitive = null | boolean | number | string;
export type JsonValue = GeneratedJsonValue;
export type JsonObject = { [key: string]: JsonValue };
export type CodexServiceTier = GeneratedServiceTier;
@@ -65,29 +62,17 @@ export type CodexTurnStartParams = v2.TurnStartParams;
export type CodexSandboxPolicy = v2.SandboxPolicy;
export type CodexTurnSteerParams = v2.TurnSteerParams;
export type CodexTurnInterruptParams = {
threadId: string;
turnId: string;
};
export type CodexTurnStartResponse = v2.TurnStartResponse;
export type CodexThread = v2.Thread;
export type CodexTurn = v2.Turn;
export type CodexThreadItem = v2.ThreadItem;
export type CodexKnownServerNotification = GeneratedServerNotification;
export type CodexServerNotification = {
method: string;
params?: JsonValue;
};
export type CodexKnownServerRequest = GeneratedServerRequest;
export type CodexDynamicToolCallParams = v2.DynamicToolCallParams;
export type CodexDynamicToolCallResponse = v2.DynamicToolCallResponse;
@@ -123,10 +108,3 @@ export function isJsonObject(value: JsonValue | undefined): value is JsonObject
export function isRpcResponse(message: RpcMessage): message is RpcResponse {
return "id" in message && !("method" in message);
}
export function coerceJsonObject(value: unknown): JsonObject | undefined {
if (!value || typeof value !== "object" || Array.isArray(value)) {
return undefined;
}
return value as JsonObject;
}

View File

@@ -15,7 +15,6 @@ import {
type DiffLayout,
type DiffMode,
type DiffOutputFormat,
type DiffPresentationDefaults,
type DiffTheme,
type DiffToolDefaults,
} from "./types.js";
@@ -314,31 +313,6 @@ export function resolveDiffsPluginViewerBaseUrl(config: unknown): string | undef
return normalized ? normalizeViewerBaseUrl(normalized) : undefined;
}
export function toPresentationDefaults(defaults: DiffToolDefaults): DiffPresentationDefaults {
const {
fontFamily,
fontSize,
lineSpacing,
layout,
showLineNumbers,
diffIndicators,
wordWrap,
background,
theme,
} = defaults;
return {
fontFamily,
fontSize,
lineSpacing,
layout,
showLineNumbers,
diffIndicators,
wordWrap,
background,
theme,
};
}
function normalizeFontFamily(fontFamily?: string): string {
const normalized = fontFamily?.trim();
return normalized || DEFAULT_DIFFS_TOOL_DEFAULTS.fontFamily;

View File

@@ -1,4 +1,3 @@
import type { AgentToolResult } from "@mariozechner/pi-agent-core";
import { resolveDefaultDiscordAccountId } from "../accounts.js";
import { createDiscordRuntimeAccountContext } from "../client.js";
import {
@@ -33,10 +32,6 @@ export type DiscordMessagingActionContext = {
normalizeMessage: (message: unknown) => unknown;
};
export type DiscordMessagingActionHandler = (
ctx: DiscordMessagingActionContext,
) => Promise<AgentToolResult<unknown> | undefined>;
export function createDiscordMessagingActionContext(params: {
action: string;
input: Record<string, unknown>;

View File

@@ -1,43 +1 @@
type PathEnvKey = "PATH" | "Path" | "PATHEXT" | "Pathext";
export { createWindowsCmdShimFixture } from "openclaw/plugin-sdk/test-env";
const PATH_ENV_KEYS = ["PATH", "Path", "PATHEXT", "Pathext"] as const;
export type PlatformPathEnvSnapshot = {
platformDescriptor: PropertyDescriptor | undefined;
env: Record<PathEnvKey, string | undefined>;
};
export function setProcessPlatform(platform: NodeJS.Platform): void {
Object.defineProperty(process, "platform", {
value: platform,
configurable: true,
});
}
export function snapshotPlatformPathEnv(): PlatformPathEnvSnapshot {
return {
platformDescriptor: Object.getOwnPropertyDescriptor(process, "platform"),
env: {
PATH: process.env.PATH,
Path: process.env.Path,
PATHEXT: process.env.PATHEXT,
Pathext: process.env.Pathext,
},
};
}
export function restorePlatformPathEnv(snapshot: PlatformPathEnvSnapshot): void {
if (snapshot.platformDescriptor) {
Object.defineProperty(process, "platform", snapshot.platformDescriptor);
}
for (const key of PATH_ENV_KEYS) {
const value = snapshot.env[key];
if (value === undefined) {
delete process.env[key];
continue;
}
process.env[key] = value;
}
}

View File

@@ -1,6 +1,5 @@
import {
AllowFromListSchema,
buildChannelConfigSchema,
DmPolicySchema,
MarkdownConfigSchema,
} from "openclaw/plugin-sdk/channel-config-primitives";
@@ -97,10 +96,3 @@ export const NostrConfigSchema = z.object({
/** Profile metadata (NIP-01 kind:0 content) */
profile: NostrProfileSchema.optional(),
});
export type NostrConfig = z.infer<typeof NostrConfigSchema>;
/**
* JSON Schema for Control UI (converted from Zod)
*/
export const nostrChannelConfigSchema = buildChannelConfigSchema(NostrConfigSchema);

View File

@@ -61,7 +61,6 @@ const listCredentialsResponseSchema = z.object({
export type QaCredentialAdminListStatus = z.infer<typeof listStatusSchema>;
export type QaCredentialRecord = z.infer<typeof credentialRecordSchema>;
export type QaCredentialListResponse = z.infer<typeof listCredentialsResponseSchema>;
export class QaCredentialAdminError extends Error {
code: string;

View File

@@ -65,16 +65,6 @@ export interface TwitchAccountConfig {
obtainmentTimestamp?: number;
}
/**
* Message target for Twitch
*/
export interface TwitchTarget {
/** Account ID */
accountId: string;
/** Channel name (defaults to account's channel) */
channel?: string;
}
/**
* Twitch message from chat
*/
@@ -132,10 +122,5 @@ export type {
OutboundDeliveryResult,
};
import type { z } from "openclaw/plugin-sdk/zod";
// Import and re-export the schema type
import type { TwitchConfigSchema } from "./config-schema.js";
export type TwitchConfig = z.infer<typeof TwitchConfigSchema>;
export type { OpenClawConfig };
export type { RuntimeEnv };

View File

@@ -39,7 +39,6 @@ export const E164Schema = z
* - "open": Accept all inbound calls (dangerous!)
*/
export const InboundPolicySchema = z.enum(["disabled", "allowlist", "pairing", "open"]);
export type InboundPolicy = z.infer<typeof InboundPolicySchema>;
// -----------------------------------------------------------------------------
// Provider-Specific Configuration

View File

@@ -290,30 +290,3 @@ export type OutboundCallOptions = {
/** DTMF digits to send after the call is connected */
dtmfSequence?: string;
};
// -----------------------------------------------------------------------------
// Tool Result Types
// -----------------------------------------------------------------------------
export type InitiateCallToolResult = {
success: boolean;
callId?: string;
status?: "initiated" | "queued" | "no-answer" | "busy" | "failed";
error?: string;
};
export type ContinueCallToolResult = {
success: boolean;
transcript?: string;
error?: string;
};
export type SpeakToUserToolResult = {
success: boolean;
error?: string;
};
export type EndCallToolResult = {
success: boolean;
error?: string;
};