fix(time-context): validate durable zone authority

This commit is contained in:
pku-xht
2026-08-07 23:47:51 +08:00
committed by Tianyi Cui
parent 331b29d779
commit edb23439f6
10 changed files with 261 additions and 76 deletions

View File

@@ -12,6 +12,8 @@ export type ClientTimeZoneContext =
function clientTimeZone(message: UserMessage): string | undefined {
const source = message.source
return source.kind === 'user'
&& 'rpcId' in source
&& typeof source.rpcId === 'string'
&& 'clientTimeZone' in source
&& typeof source.clientTimeZone === 'string'
? source.clientTimeZone