MCPcopy Index your code
hub / github.com/github/copilot-sdk / handleHooksInvoke

Method handleHooksInvoke

nodejs/src/client.ts:2723–2743  ·  view source on GitHub ↗
(params: {
        sessionId: string;
        hookType: string;
        input: unknown;
    })

Source from the content-addressed store, hash-verified

2721 }
2722
2723 private async handleHooksInvoke(params: {
2724 sessionId: string;
2725 hookType: string;
2726 input: unknown;
2727 }): Promise<{ output?: unknown }> {
2728 if (
2729 !params ||
2730 typeof params.sessionId !== "string" ||
2731 typeof params.hookType !== "string"
2732 ) {
2733 throw new Error("Invalid hooks invoke payload");
2734 }
2735
2736 const session = this.sessions.get(params.sessionId);
2737 if (!session) {
2738 throw new Error(`Session not found: ${params.sessionId}`);
2739 }
2740
2741 const output = await session._handleHooksInvoke(params.hookType, params.input);
2742 return { output };
2743 }
2744
2745 private async handleSystemMessageTransform(params: {
2746 sessionId: string;

Callers 2

client.test.tsFile · 0.45

Calls 2

_handleHooksInvokeMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected