feat(hub): add ServerChan task notifications (#515)

* fix(hub): 修复发送后状态显示延迟

* feat(hub): 接入Server酱任务通知

* fix(hub): 仅在会话结束时发送完成通知

* fix(hub): avoid reviving inactive queued sessions

* fix(hub): address notification review feedback

* fix(hub): expire queued thinking on hub clock

* fix(hub): 修复任务通知 review 反馈
This commit is contained in:
xiaobaifly7
2026-04-25 22:01:02 +08:00
committed by GitHub
parent 7f82df87c8
commit 4ec9537e4a
30 changed files with 1208 additions and 20 deletions
+3 -1
View File
@@ -67,6 +67,8 @@ export const TerminalErrorPayloadSchema = z.object({
})
export type TerminalErrorPayload = z.infer<typeof TerminalErrorPayloadSchema>
export const SessionEndReasonSchema = z.enum(['completed', 'terminated', 'error'])
export type SessionEndReason = z.infer<typeof SessionEndReasonSchema>
export const UpdateNewMessageBodySchema = z.object({
t: z.literal('new-message'),
@@ -144,7 +146,7 @@ export interface ClientToServerEvents {
effort?: string | null
collaborationMode?: CodexCollaborationMode
}) => void
'session-end': (data: { sid: string; time: number }) => void
'session-end': (data: { sid: string; time: number; reason?: SessionEndReason }) => void
'messages-consumed': (data: { sid: string; localIds: string[] }) => void
'update-metadata': (data: { sid: string; expectedVersion: number; metadata: unknown }, cb: (answer: {
result: 'error'