/** * Times an MCP call names, read so the approval page and prompt can show * them in the reader's zone. A call gives a time either as an instant with * an offset (`2026-10-22T14:00:00-07:00`) or as a wall time with an IANA * zone beside it (`start` plus `startTimeZone`); a wall time with no zone * is ambiguous and stays as written. */ /** A point in time a call names, and the zone the call gave for it. */ export interface McpApprovalTime { at: number; /** An IANA zone, `UTC`, or a fixed offset such as `-07:00`. */ zone: string; } export declare function isTimeZone(zone: unknown): zone is string; /** Minutes ahead of UTC that `zone` is at `at`. */ export declare function zoneOffsetMinutes(at: number, zone: string): number; /** * The instant `value` names, when it is an ISO date-time that carries an * offset or comes with `zone`. `zone` wins as the label when both are given: * it is the zone the event lives in, the offset only pins the instant. */ export declare function readApprovalTime(value: string, zone: string | undefined): McpApprovalTime | undefined; /** * The wall-clock time `value` names when it is an ISO date-time with no * offset, as milliseconds read as if it were UTC. Which instant it means is * up to the action, so it is shown as written and never converted. */ export declare function readWallTime(value: string): number | undefined; /** A wall time from `readWallTime`, with no zone named. */ export declare function formatWallTime(wall: number, locale: string): string; /** A zone from `isTimeZone` by its name in `locale`, such as "Pacific Time". */ export declare function formatTimeZoneName(zone: string, locale: string, at?: number): string; /** * `at` as the reader sees it in `zone`, with the zone named: briefly, or by * its full name with `"name"`. `time` is a time of day; `date-time` adds the * day; `date` is the day alone. */ export declare function formatApprovalTime(at: number, zone: string, locale: string, style: "time" | "date-time" | "date", zoneLabel?: "short" | "name"): string; /** * `at` as the call wrote it in `zone`, to show beside the reader's time, or * undefined when the reader's zone reads the same. Two zones can share an * offset on the day and still be different zones (London and Lagos in * October), so a zone with another name is shown too, by that name. */ export declare function formatRequestedTime(at: number, zone: string, readerZone: string, locale: string, style: "time" | "date-time" | "date"): string | undefined;