When designing or consuming client/server APIs, keep the contract explicit and prevent duplicate logic/types from drifting.
Apply this standard:
getClient() + thin wrappers, centralize into a shared utility/hook to keep calling semantics consistent.Example patterns:
export function getSessionDisplayName(session: Session): string {
return session.name || DEFAULT_CHAT_TITLE;
}
// Prefer relying on GooseClient.initialize(...) typing
// instead of maintaining GooseInitializeRequest that can diverge.
export interface GooseExtNotifications {
unstable_sessionUpdate?: (n: GooseSessionNotification_unstable) => Promise<void>;
}
Enter the URL of a public GitHub repository