docs(types): mark legacy hook surfaces deprecated

This commit is contained in:
Vincent Koc
2026-04-28 23:28:25 -07:00
parent 71473e7448
commit 1b25dcf57a
12 changed files with 29 additions and 6 deletions

View File

@@ -96,10 +96,13 @@ const DiffsToolSchema = Type.Object(
maximum: 2400,
}),
),
/** @deprecated Use fileQuality. */
imageQuality: Type.Optional(
stringEnum(DIFF_IMAGE_QUALITY_PRESETS, "Deprecated alias for fileQuality."),
),
/** @deprecated Use fileFormat. */
imageFormat: Type.Optional(stringEnum(DIFF_OUTPUT_FORMATS, "Deprecated alias for fileFormat.")),
/** @deprecated Use fileScale. */
imageScale: Type.Optional(
Type.Number({
description: "Deprecated alias for fileScale.",
@@ -107,6 +110,7 @@ const DiffsToolSchema = Type.Object(
maximum: 4,
}),
),
/** @deprecated Use fileMaxWidth. */
imageMaxWidth: Type.Optional(
Type.Number({
description: "Deprecated alias for fileMaxWidth.",

View File

@@ -193,7 +193,7 @@ export type MatrixConfig = {
execApprovals?: MatrixExecApprovalConfig;
/** Room config allowlist keyed by room ID or alias (names resolved to IDs when possible). */
groups?: Record<string, MatrixRoomConfig>;
/** Room config allowlist keyed by room ID or alias. Legacy; use groups. */
/** @deprecated Use groups. */
rooms?: Record<string, MatrixRoomConfig>;
/** Per-action tool gating (default: true for all). */
actions?: MatrixActionConfig;

View File

@@ -32,7 +32,7 @@ const QQBotStreamingSchema = z
.object({
/** "partial" (default) enables block streaming; "off" disables it. */
mode: z.enum(["off", "partial"]).default("partial"),
/** Use QQ C2C official stream_messages API; legacy, prefer `streaming: true`. */
/** @deprecated Prefer `streaming: true`. */
c2cStreamApi: z.boolean().optional(),
})
.passthrough(),

View File

@@ -412,6 +412,8 @@ export class ChunkedMediaApi {
// ============ Legacy functional facade ============
/**
* @deprecated The chunked uploader is always implemented.
*
* Legacy feature flag. The chunked uploader is fully implemented, so this
* returns `true`. Retained so that older call sites can be converted
* progressively.

View File

@@ -113,6 +113,7 @@ export interface QQBotAccountConfig {
| boolean
| {
mode?: "off" | "partial";
/** @deprecated Prefer `streaming: true`. */
c2cStreamApi?: boolean;
};
}

View File

@@ -351,7 +351,7 @@ export const VoiceCallConfigSchema = z
/** Webhook server configuration */
serve: VoiceCallServeConfigSchema,
/** Tailscale exposure configuration (legacy, prefer tunnel config) */
/** @deprecated Prefer tunnel config. */
tailscale: VoiceCallTailscaleConfigSchema,
/** Tunnel configuration (unified ngrok/tailscale) */

View File

@@ -16,7 +16,11 @@ export type ReplyPayload = {
presentation?: MessagePresentation;
/** Channel-agnostic delivery preferences, e.g. pin the sent message when supported. */
delivery?: ReplyPayloadDelivery;
/** Internal legacy representation used by existing approval/reply helpers during migration. */
/**
* @deprecated Use presentation.
*
* Internal legacy representation used by existing approval/reply helpers during migration.
*/
interactive?: InteractiveReply;
btw?: {
question: string;

View File

@@ -537,6 +537,8 @@ export type ChannelMessagingAdapter = {
parentConversationCandidates?: string[];
} | null;
/**
* @deprecated Return parentConversationCandidates from resolveSessionConversation.
*
* Legacy compatibility hook for parent fallbacks when a plugin does not need
* to customize `id` or `threadId`. Core only uses this when
* `resolveSessionConversation(...)` does not return

View File

@@ -472,7 +472,8 @@ export function splitMediaFromOutput(
): {
text: string;
mediaUrls?: string[];
mediaUrl?: string; // legacy first item for backward compatibility
/** @deprecated Use mediaUrls[0]. */
mediaUrl?: string;
audioAsVoice?: boolean; // true if [[audio_as_voice]] tag was found
segments?: ParsedMediaOutputSegment[];
} {

View File

@@ -58,7 +58,11 @@ type AssertAllPluginPromptMutationResultFieldsListed =
const assertAllPluginPromptMutationResultFieldsListed: AssertAllPluginPromptMutationResultFieldsListed = true;
void assertAllPluginPromptMutationResultFieldsListed;
// before_agent_start hook (legacy compatibility: combines both phases)
/**
* @deprecated Use before_model_resolve and before_prompt_build.
*
* Legacy compatibility hook that combines both phases.
*/
export type PluginHookBeforeAgentStartEvent = {
prompt: string;
runId?: string;
@@ -66,9 +70,11 @@ export type PluginHookBeforeAgentStartEvent = {
messages?: unknown[];
};
/** @deprecated Use before_model_resolve and before_prompt_build result types. */
export type PluginHookBeforeAgentStartResult = PluginHookBeforePromptBuildResult &
PluginHookBeforeModelResolveResult;
/** @deprecated Use before_model_resolve override result types. */
export type PluginHookBeforeAgentStartOverrideResult = Omit<
PluginHookBeforeAgentStartResult,
keyof PluginHookBeforePromptBuildResult

View File

@@ -800,6 +800,7 @@ export type PluginHookHandlerMap = {
event: PluginHookBeforePromptBuildEvent,
ctx: PluginHookAgentContext,
) => Promise<PluginHookBeforePromptBuildResult | void> | PluginHookBeforePromptBuildResult | void;
/** @deprecated Use before_model_resolve and before_prompt_build. */
before_agent_start: (
event: PluginHookBeforeAgentStartEvent,
ctx: PluginHookAgentContext,

View File

@@ -723,6 +723,8 @@ export function createHookRunner(
}
/**
* @deprecated Use runBeforeModelResolve and runBeforePromptBuild.
*
* Run before_agent_start hook.
* Legacy compatibility hook that combines model resolve + prompt build phases.
*/