Skip to content

Commit e26357f

Browse files
committed
refactor: prune stale extension types
1 parent 4eec284 commit e26357f

10 files changed

Lines changed: 0 additions & 156 deletions

File tree

extensions/bluebubbles/src/types.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,6 @@ export type BlueBubblesAccountConfig = {
126126
coalesceSameSenderDms?: boolean;
127127
};
128128

129-
export type BlueBubblesConfig = Omit<BlueBubblesAccountConfig, "actions"> & {
130-
/** Optional per-account BlueBubbles configuration (multi-account). */
131-
accounts?: Record<string, BlueBubblesAccountConfig>;
132-
/** Optional default account id when multiple accounts are configured. */
133-
defaultAccount?: string;
134-
/** Per-action tool gating (default: true for all). */
135-
actions?: BlueBubblesActionConfig;
136-
};
137-
138129
export type BlueBubblesSendTarget =
139130
| { kind: "chat_id"; chatId: number }
140131
| { kind: "chat_guid"; chatGuid: string }

extensions/codex/src/app-server/protocol.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@ import type {
22
ClientRequest as GeneratedClientRequest,
33
InitializeParams as GeneratedInitializeParams,
44
InitializeResponse as GeneratedInitializeResponse,
5-
ServerNotification as GeneratedServerNotification,
6-
ServerRequest as GeneratedServerRequest,
75
ServiceTier as GeneratedServiceTier,
86
v2,
97
} from "./protocol-generated/typescript/index.js";
108
import type { JsonValue as GeneratedJsonValue } from "./protocol-generated/typescript/serde_json/JsonValue.js";
119

12-
export type JsonPrimitive = null | boolean | number | string;
1310
export type JsonValue = GeneratedJsonValue;
1411
export type JsonObject = { [key: string]: JsonValue };
1512
export type CodexServiceTier = GeneratedServiceTier;
@@ -65,29 +62,17 @@ export type CodexTurnStartParams = v2.TurnStartParams;
6562

6663
export type CodexSandboxPolicy = v2.SandboxPolicy;
6764

68-
export type CodexTurnSteerParams = v2.TurnSteerParams;
69-
70-
export type CodexTurnInterruptParams = {
71-
threadId: string;
72-
turnId: string;
73-
};
74-
7565
export type CodexTurnStartResponse = v2.TurnStartResponse;
7666

77-
export type CodexThread = v2.Thread;
78-
7967
export type CodexTurn = v2.Turn;
8068

8169
export type CodexThreadItem = v2.ThreadItem;
8270

83-
export type CodexKnownServerNotification = GeneratedServerNotification;
8471
export type CodexServerNotification = {
8572
method: string;
8673
params?: JsonValue;
8774
};
8875

89-
export type CodexKnownServerRequest = GeneratedServerRequest;
90-
9176
export type CodexDynamicToolCallParams = v2.DynamicToolCallParams;
9277

9378
export type CodexDynamicToolCallResponse = v2.DynamicToolCallResponse;
@@ -123,10 +108,3 @@ export function isJsonObject(value: JsonValue | undefined): value is JsonObject
123108
export function isRpcResponse(message: RpcMessage): message is RpcResponse {
124109
return "id" in message && !("method" in message);
125110
}
126-
127-
export function coerceJsonObject(value: unknown): JsonObject | undefined {
128-
if (!value || typeof value !== "object" || Array.isArray(value)) {
129-
return undefined;
130-
}
131-
return value as JsonObject;
132-
}

extensions/diffs/src/config.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
type DiffLayout,
1616
type DiffMode,
1717
type DiffOutputFormat,
18-
type DiffPresentationDefaults,
1918
type DiffTheme,
2019
type DiffToolDefaults,
2120
} from "./types.js";
@@ -314,31 +313,6 @@ export function resolveDiffsPluginViewerBaseUrl(config: unknown): string | undef
314313
return normalized ? normalizeViewerBaseUrl(normalized) : undefined;
315314
}
316315

317-
export function toPresentationDefaults(defaults: DiffToolDefaults): DiffPresentationDefaults {
318-
const {
319-
fontFamily,
320-
fontSize,
321-
lineSpacing,
322-
layout,
323-
showLineNumbers,
324-
diffIndicators,
325-
wordWrap,
326-
background,
327-
theme,
328-
} = defaults;
329-
return {
330-
fontFamily,
331-
fontSize,
332-
lineSpacing,
333-
layout,
334-
showLineNumbers,
335-
diffIndicators,
336-
wordWrap,
337-
background,
338-
theme,
339-
};
340-
}
341-
342316
function normalizeFontFamily(fontFamily?: string): string {
343317
const normalized = fontFamily?.trim();
344318
return normalized || DEFAULT_DIFFS_TOOL_DEFAULTS.fontFamily;

extensions/discord/src/actions/runtime.messaging.shared.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { AgentToolResult } from "@mariozechner/pi-agent-core";
21
import { resolveDefaultDiscordAccountId } from "../accounts.js";
32
import { createDiscordRuntimeAccountContext } from "../client.js";
43
import {
@@ -33,10 +32,6 @@ export type DiscordMessagingActionContext = {
3332
normalizeMessage: (message: unknown) => unknown;
3433
};
3534

36-
export type DiscordMessagingActionHandler = (
37-
ctx: DiscordMessagingActionContext,
38-
) => Promise<AgentToolResult<unknown> | undefined>;
39-
4035
export function createDiscordMessagingActionContext(params: {
4136
action: string;
4237
input: Record<string, unknown>;
Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1 @@
1-
type PathEnvKey = "PATH" | "Path" | "PATHEXT" | "Pathext";
2-
31
export { createWindowsCmdShimFixture } from "openclaw/plugin-sdk/test-env";
4-
const PATH_ENV_KEYS = ["PATH", "Path", "PATHEXT", "Pathext"] as const;
5-
6-
export type PlatformPathEnvSnapshot = {
7-
platformDescriptor: PropertyDescriptor | undefined;
8-
env: Record<PathEnvKey, string | undefined>;
9-
};
10-
11-
export function setProcessPlatform(platform: NodeJS.Platform): void {
12-
Object.defineProperty(process, "platform", {
13-
value: platform,
14-
configurable: true,
15-
});
16-
}
17-
18-
export function snapshotPlatformPathEnv(): PlatformPathEnvSnapshot {
19-
return {
20-
platformDescriptor: Object.getOwnPropertyDescriptor(process, "platform"),
21-
env: {
22-
PATH: process.env.PATH,
23-
Path: process.env.Path,
24-
PATHEXT: process.env.PATHEXT,
25-
Pathext: process.env.Pathext,
26-
},
27-
};
28-
}
29-
30-
export function restorePlatformPathEnv(snapshot: PlatformPathEnvSnapshot): void {
31-
if (snapshot.platformDescriptor) {
32-
Object.defineProperty(process, "platform", snapshot.platformDescriptor);
33-
}
34-
35-
for (const key of PATH_ENV_KEYS) {
36-
const value = snapshot.env[key];
37-
if (value === undefined) {
38-
delete process.env[key];
39-
continue;
40-
}
41-
process.env[key] = value;
42-
}
43-
}

extensions/nostr/src/config-schema.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {
22
AllowFromListSchema,
3-
buildChannelConfigSchema,
43
DmPolicySchema,
54
MarkdownConfigSchema,
65
} from "openclaw/plugin-sdk/channel-config-primitives";
@@ -97,10 +96,3 @@ export const NostrConfigSchema = z.object({
9796
/** Profile metadata (NIP-01 kind:0 content) */
9897
profile: NostrProfileSchema.optional(),
9998
});
100-
101-
export type NostrConfig = z.infer<typeof NostrConfigSchema>;
102-
103-
/**
104-
* JSON Schema for Control UI (converted from Zod)
105-
*/
106-
export const nostrChannelConfigSchema = buildChannelConfigSchema(NostrConfigSchema);

extensions/qa-lab/src/qa-credentials-admin.runtime.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ const listCredentialsResponseSchema = z.object({
6161

6262
export type QaCredentialAdminListStatus = z.infer<typeof listStatusSchema>;
6363
export type QaCredentialRecord = z.infer<typeof credentialRecordSchema>;
64-
export type QaCredentialListResponse = z.infer<typeof listCredentialsResponseSchema>;
6564

6665
export class QaCredentialAdminError extends Error {
6766
code: string;

extensions/twitch/src/types.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,6 @@ export interface TwitchAccountConfig {
6565
obtainmentTimestamp?: number;
6666
}
6767

68-
/**
69-
* Message target for Twitch
70-
*/
71-
export interface TwitchTarget {
72-
/** Account ID */
73-
accountId: string;
74-
/** Channel name (defaults to account's channel) */
75-
channel?: string;
76-
}
77-
7868
/**
7969
* Twitch message from chat
8070
*/
@@ -132,10 +122,5 @@ export type {
132122
OutboundDeliveryResult,
133123
};
134124

135-
import type { z } from "openclaw/plugin-sdk/zod";
136-
// Import and re-export the schema type
137-
import type { TwitchConfigSchema } from "./config-schema.js";
138-
export type TwitchConfig = z.infer<typeof TwitchConfigSchema>;
139-
140125
export type { OpenClawConfig };
141126
export type { RuntimeEnv };

extensions/voice-call/src/config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export const E164Schema = z
3939
* - "open": Accept all inbound calls (dangerous!)
4040
*/
4141
export const InboundPolicySchema = z.enum(["disabled", "allowlist", "pairing", "open"]);
42-
export type InboundPolicy = z.infer<typeof InboundPolicySchema>;
4342

4443
// -----------------------------------------------------------------------------
4544
// Provider-Specific Configuration

extensions/voice-call/src/types.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -290,30 +290,3 @@ export type OutboundCallOptions = {
290290
/** DTMF digits to send after the call is connected */
291291
dtmfSequence?: string;
292292
};
293-
294-
// -----------------------------------------------------------------------------
295-
// Tool Result Types
296-
// -----------------------------------------------------------------------------
297-
298-
export type InitiateCallToolResult = {
299-
success: boolean;
300-
callId?: string;
301-
status?: "initiated" | "queued" | "no-answer" | "busy" | "failed";
302-
error?: string;
303-
};
304-
305-
export type ContinueCallToolResult = {
306-
success: boolean;
307-
transcript?: string;
308-
error?: string;
309-
};
310-
311-
export type SpeakToUserToolResult = {
312-
success: boolean;
313-
error?: string;
314-
};
315-
316-
export type EndCallToolResult = {
317-
success: boolean;
318-
error?: string;
319-
};

0 commit comments

Comments
 (0)