Skip to content

Commit 1b25dcf

Browse files
committed
docs(types): mark legacy hook surfaces deprecated
1 parent 71473e7 commit 1b25dcf

12 files changed

Lines changed: 29 additions & 6 deletions

File tree

extensions/diffs/src/tool.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,21 @@ const DiffsToolSchema = Type.Object(
9696
maximum: 2400,
9797
}),
9898
),
99+
/** @deprecated Use fileQuality. */
99100
imageQuality: Type.Optional(
100101
stringEnum(DIFF_IMAGE_QUALITY_PRESETS, "Deprecated alias for fileQuality."),
101102
),
103+
/** @deprecated Use fileFormat. */
102104
imageFormat: Type.Optional(stringEnum(DIFF_OUTPUT_FORMATS, "Deprecated alias for fileFormat.")),
105+
/** @deprecated Use fileScale. */
103106
imageScale: Type.Optional(
104107
Type.Number({
105108
description: "Deprecated alias for fileScale.",
106109
minimum: 1,
107110
maximum: 4,
108111
}),
109112
),
113+
/** @deprecated Use fileMaxWidth. */
110114
imageMaxWidth: Type.Optional(
111115
Type.Number({
112116
description: "Deprecated alias for fileMaxWidth.",

extensions/matrix/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export type MatrixConfig = {
193193
execApprovals?: MatrixExecApprovalConfig;
194194
/** Room config allowlist keyed by room ID or alias (names resolved to IDs when possible). */
195195
groups?: Record<string, MatrixRoomConfig>;
196-
/** Room config allowlist keyed by room ID or alias. Legacy; use groups. */
196+
/** @deprecated Use groups. */
197197
rooms?: Record<string, MatrixRoomConfig>;
198198
/** Per-action tool gating (default: true for all). */
199199
actions?: MatrixActionConfig;

extensions/qqbot/src/config-schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const QQBotStreamingSchema = z
3232
.object({
3333
/** "partial" (default) enables block streaming; "off" disables it. */
3434
mode: z.enum(["off", "partial"]).default("partial"),
35-
/** Use QQ C2C official stream_messages API; legacy, prefer `streaming: true`. */
35+
/** @deprecated Prefer `streaming: true`. */
3636
c2cStreamApi: z.boolean().optional(),
3737
})
3838
.passthrough(),

extensions/qqbot/src/engine/api/media-chunked.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,8 @@ export class ChunkedMediaApi {
412412
// ============ Legacy functional facade ============
413413

414414
/**
415+
* @deprecated The chunked uploader is always implemented.
416+
*
415417
* Legacy feature flag. The chunked uploader is fully implemented, so this
416418
* returns `true`. Retained so that older call sites can be converted
417419
* progressively.

extensions/qqbot/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ export interface QQBotAccountConfig {
113113
| boolean
114114
| {
115115
mode?: "off" | "partial";
116+
/** @deprecated Prefer `streaming: true`. */
116117
c2cStreamApi?: boolean;
117118
};
118119
}

extensions/voice-call/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ export const VoiceCallConfigSchema = z
351351
/** Webhook server configuration */
352352
serve: VoiceCallServeConfigSchema,
353353

354-
/** Tailscale exposure configuration (legacy, prefer tunnel config) */
354+
/** @deprecated Prefer tunnel config. */
355355
tailscale: VoiceCallTailscaleConfigSchema,
356356

357357
/** Tunnel configuration (unified ngrok/tailscale) */

src/auto-reply/reply-payload.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ export type ReplyPayload = {
1616
presentation?: MessagePresentation;
1717
/** Channel-agnostic delivery preferences, e.g. pin the sent message when supported. */
1818
delivery?: ReplyPayloadDelivery;
19-
/** Internal legacy representation used by existing approval/reply helpers during migration. */
19+
/**
20+
* @deprecated Use presentation.
21+
*
22+
* Internal legacy representation used by existing approval/reply helpers during migration.
23+
*/
2024
interactive?: InteractiveReply;
2125
btw?: {
2226
question: string;

src/channels/plugins/types.core.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,8 @@ export type ChannelMessagingAdapter = {
537537
parentConversationCandidates?: string[];
538538
} | null;
539539
/**
540+
* @deprecated Return parentConversationCandidates from resolveSessionConversation.
541+
*
540542
* Legacy compatibility hook for parent fallbacks when a plugin does not need
541543
* to customize `id` or `threadId`. Core only uses this when
542544
* `resolveSessionConversation(...)` does not return

src/media/parse.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,8 @@ export function splitMediaFromOutput(
472472
): {
473473
text: string;
474474
mediaUrls?: string[];
475-
mediaUrl?: string; // legacy first item for backward compatibility
475+
/** @deprecated Use mediaUrls[0]. */
476+
mediaUrl?: string;
476477
audioAsVoice?: boolean; // true if [[audio_as_voice]] tag was found
477478
segments?: ParsedMediaOutputSegment[];
478479
} {

src/plugins/hook-before-agent-start.types.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,23 @@ type AssertAllPluginPromptMutationResultFieldsListed =
5858
const assertAllPluginPromptMutationResultFieldsListed: AssertAllPluginPromptMutationResultFieldsListed = true;
5959
void assertAllPluginPromptMutationResultFieldsListed;
6060

61-
// before_agent_start hook (legacy compatibility: combines both phases)
61+
/**
62+
* @deprecated Use before_model_resolve and before_prompt_build.
63+
*
64+
* Legacy compatibility hook that combines both phases.
65+
*/
6266
export type PluginHookBeforeAgentStartEvent = {
6367
prompt: string;
6468
runId?: string;
6569
/** Optional because legacy hook can run in pre-session phase. */
6670
messages?: unknown[];
6771
};
6872

73+
/** @deprecated Use before_model_resolve and before_prompt_build result types. */
6974
export type PluginHookBeforeAgentStartResult = PluginHookBeforePromptBuildResult &
7075
PluginHookBeforeModelResolveResult;
7176

77+
/** @deprecated Use before_model_resolve override result types. */
7278
export type PluginHookBeforeAgentStartOverrideResult = Omit<
7379
PluginHookBeforeAgentStartResult,
7480
keyof PluginHookBeforePromptBuildResult

0 commit comments

Comments
 (0)