merge: integrate master into session-log-v4

This commit is contained in:
Tianyi Cui committed 2026-09-17 00:12:27 +08:00
commit 0a1e2691ab
705 files changed
+19081 -8726

No files matched your search

+4 -1
View File
@@ -58,7 +58,7 @@ export class ApiSessionPresetConflict extends Error {
}
/** Failures produced while resolving one ordinary Session identity to its live Agent. */
export type ApiSessionAgentError = RemoteError<'session/not-found' | 'session/agent-busy' | 'gateway/internal'>
export type ApiSessionAgentError = RemoteError<'session/not-found' | 'session/agent-busy' | 'session/writer-held' | 'gateway/internal'>
/** Result of resolving one ordinary Session identity to its live Agent. */
export type ApiSessionAgentResult =
@@ -215,6 +215,9 @@ export class ApiSessionAgentController {
if (racedSession !== undefined && hasApiSessionSubagentOwner(this.ctx, racedSession, undefined)) {
return { error: apiSessionSubagentOwnershipError(sessionId) }
}
if (error instanceof Error && error.name === 'SessionAlreadyOwnedError') {
return { error: new RemoteError('session/writer-held', error.message, { sessionId }) }
}
return {
error: new RemoteError(
'gateway/internal',
@@ -194,6 +194,7 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
readonly existingCwd?: string
}
'session/projections-unavailable': Record<string, never>
'session/writer-held': { readonly sessionId: SessionId }
'session/agent-busy': { readonly reason: string }
'session/invalid-time-zone': { readonly value: string }
'session/workspace-attach-failed': { readonly sessionId: SessionId; readonly workspaceId: string }