Skip to content

Commit 1498add

Browse files
committed
Name the session subscribe handler type
1 parent a8751e8 commit 1498add

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/CodexAcpClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {type McpServer, RequestError} from "@agentclientprotocol/sdk";
55
import type {
66
CodexAppServerClient,
77
McpStartupResult,
8+
SessionHandler,
89
} from "./CodexAppServerClient";
910
import open from "open";
1011
import type {
@@ -387,7 +388,7 @@ export class CodexAcpClient {
387388
return turnCompleted;
388389
}
389390

390-
subscribeSession(sessionId: string, handler: Parameters<CodexAppServerClient["subscribeSession"]>[1]): void {
391+
subscribeSession(sessionId: string, handler: SessionHandler): void {
391392
this.codexClient.subscribeSession(sessionId, handler);
392393
}
393394

src/CodexAppServerClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import type {
4747
} from "./app-server/v2";
4848
import { logger } from "./Logger";
4949

50-
type SessionHandler = {
50+
export type SessionHandler = {
5151
handleNotification(notification: ServerNotification): Promise<void>;
5252
handleCommandExecution(params: CommandExecutionRequestApprovalParams): Promise<CommandExecutionRequestApprovalResponse>;
5353
handleFileChange(params: FileChangeRequestApprovalParams): Promise<FileChangeRequestApprovalResponse>;

0 commit comments

Comments
 (0)