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

Function generateRpcPackageInfo

java/scripts/codegen/java.ts:2214–2255  ·  view source on GitHub ↗
(packageDir: string)

Source from the content-addressed store, hash-verified

2212}
2213
2214async function generateRpcPackageInfo(packageDir: string): Promise<void> {
2215 const lines: string[] = [];
2216 lines.push(COPYRIGHT);
2217 lines.push("");
2218 lines.push(AUTO_GENERATED_HEADER);
2219 lines.push(GENERATED_FROM_API);
2220 lines.push("");
2221 lines.push(`/**`);
2222 lines.push(` * Auto-generated RPC parameter and result types for the GitHub Copilot SDK.`);
2223 lines.push(` *`);
2224 lines.push(` * <p>`);
2225 lines.push(` * This package contains Java records and classes generated from the Copilot`);
2226 lines.push(` * CLI's {@code api.schema.json}. These types represent the request parameters`);
2227 lines.push(` * and response payloads for all JSON-RPC methods exposed by the CLI.`);
2228 lines.push(` *`);
2229 lines.push(` * <h2>Key Classes</h2>`);
2230 lines.push(` * <ul>`);
2231 lines.push(` * <li>{@link com.github.copilot.generated.rpc.RpcCaller} - Functional interface`);
2232 lines.push(` * for invoking JSON-RPC methods with typed responses.</li>`);
2233 lines.push(` * <li>{@link com.github.copilot.generated.rpc.ServerRpc} - Typed client for`);
2234 lines.push(` * server-level RPC methods (session management, model listing, etc.).</li>`);
2235 lines.push(` * <li>{@link com.github.copilot.generated.rpc.SessionRpc} - Typed client for`);
2236 lines.push(` * session-scoped RPC methods (send messages, manage tools, etc.). Automatically`);
2237 lines.push(` * injects the {@code sessionId} into every call.</li>`);
2238 lines.push(` * </ul>`);
2239 lines.push(` *`);
2240 lines.push(` * <h2>Related Packages</h2>`);
2241 lines.push(` * <ul>`);
2242 lines.push(` * <li>{@link com.github.copilot} - Core SDK classes</li>`);
2243 lines.push(` * <li>{@link com.github.copilot.generated} - Auto-generated session event`);
2244 lines.push(` * types</li>`);
2245 lines.push(` * </ul>`);
2246 lines.push(` *`);
2247 lines.push(` * @see com.github.copilot.CopilotClient`);
2248 lines.push(` * @see com.github.copilot.generated.rpc.ServerRpc`);
2249 lines.push(` * @see com.github.copilot.generated.rpc.SessionRpc`);
2250 lines.push(` */`);
2251 lines.push(`package com.github.copilot.generated.rpc;`);
2252 lines.push("");
2253
2254 await writeGeneratedFile(`${packageDir}/package-info.java`, lines.join("\n"));
2255}
2256
2257// ── Main entry point ──────────────────────────────────────────────────────────
2258

Callers 1

mainFunction · 0.85

Calls 3

joinMethod · 0.80
writeGeneratedFileFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…