refactor(plugins): localize internal helper types (#101922)

This commit is contained in:
Vincent Koc 2026-07-07 17:11:49 -07:00 committed by GitHub
parent 3bbc2732c0
commit cc083e5f4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 9 deletions

View file

@ -22,7 +22,7 @@ import type { ClickClackMessage, ClickClackMessageProvenance } from "./types.js"
const CLICKCLACK_COMMENTARY_FLUSH_MS = 700;
/** Item event payload shape delivered by `replyOptions.onItemEvent`. */
export type ClickClackItemEventPayload = {
type ClickClackItemEventPayload = {
itemId?: string;
toolCallId?: string;
kind?: string;
@ -36,7 +36,7 @@ export type ClickClackItemEventPayload = {
};
/** Destination for durable activity rows (channel or DM conversation). */
export type ClickClackActivityTarget = {
type ClickClackActivityTarget = {
channelId?: string;
conversationId?: string;
};

View file

@ -25,7 +25,7 @@ export type ClickClackAccountConfig = {
};
/** Root ClickClack channel config with optional named accounts. */
export type ClickClackConfig = ClickClackAccountConfig & {
type ClickClackConfig = ClickClackAccountConfig & {
accounts?: Record<string, Partial<ClickClackAccountConfig>>;
defaultAccount?: string;
};

View file

@ -11,7 +11,7 @@ const BATCH_MAX_GAP_MS = 2 * 60 * 1000;
/** Upper bound of images sent to the vision model per batch. */
export const MAX_FRAMES_PER_CALL = 16;
export type ParsedSegment = { startMs: number; endMs: number; text: string };
type ParsedSegment = { startMs: number; endMs: number; text: string };
/** Parses "HH:MM:SS" (or "H:MM", with optional am/pm) on a local day into epoch ms. */
export function clockToMs(day: string, clock: string): number | null {
@ -120,9 +120,7 @@ type RawCard = {
appSites?: unknown;
};
export type CardParseResult =
| { ok: true; drafts: LogbookCardDraft[] }
| { ok: false; error: string };
type CardParseResult = { ok: true; drafts: LogbookCardDraft[] } | { ok: false; error: string };
function normalizeCategory(value: unknown): string {
const category = typeof value === "string" ? value.trim().toLowerCase() : "";

View file

@ -16,7 +16,7 @@ type LogbookSnapshotParams = {
quality?: number;
};
export type LogbookSnapshotPayload = { format: "jpeg"; base64: string } | { error: string };
type LogbookSnapshotPayload = { format: "jpeg"; base64: string } | { error: string };
function readParams(value: unknown): LogbookSnapshotParams {
if (!value || typeof value !== "object") {

View file

@ -73,7 +73,7 @@ function unwrapInvokePayload(raw: unknown): SnapshotPayload | null {
/** Capture commands in preference order: app nodes first, headless node hosts second. */
const CAPTURE_COMMANDS = ["screen.snapshot", "logbook.snapshot"] as const;
export type LogbookStatus = {
type LogbookStatus = {
captureEnabled: boolean;
capturePaused: boolean;
captureIntervalSeconds: number;