([
+ "java.util.concurrent.CompletableFuture",
+ "javax.annotation.processing.Generated",
+ ]);
+ let needsMapper = false;
+
+ // Sub-namespace fields and init lines
+ const subFields: string[] = [];
+ const subInits: string[] = [];
+ for (const [nsKey, nsTree] of tree.subspaces) {
+ const nsClass = apiClassName(prefix, [nsKey]);
+ subFields.push(` /** API methods for the {@code ${nsKey}} namespace. */`);
+ subFields.push(` public final ${nsClass} ${nsKey};`);
+ if (isSession) {
+ subInits.push(` this.${nsKey} = new ${nsClass}(caller, sessionId);`);
+ } else {
+ subInits.push(` this.${nsKey} = new ${nsClass}(caller);`);
+ }
+ // Generate the namespace API class file (recursively)
+ await generateNamespaceApiFile(prefix, [nsKey], nsTree, isSession, packageName, packageDir);
+ }
+
+ // Collect result/param imports and generate top-level method bodies
+ const methodLines: string[] = [];
+ for (const [key, method] of tree.methods) {
+ const resultClass = wrapperResultClassName(method);
+ const paramsClass = wrapperParamsClassName(method);
+ if (resultClass !== "Void") allImports.add(`${packageName}.${resultClass}`);
+ if (paramsClass) allImports.add(`${packageName}.${paramsClass}`);
+
+ const { lines, needsMapper: nm } = generateApiMethod(key, method, isSession, sessionIdExpr);
+ methodLines.push(...lines);
+ if (nm) needsMapper = true;
+ }
+
+ // Build file content
+ classLines.push(COPYRIGHT);
+ classLines.push(``);
+ classLines.push(AUTO_GENERATED_HEADER);
+ classLines.push(GENERATED_FROM_API);
+ classLines.push(``);
+ classLines.push(`package ${packageName};`);
+ classLines.push(``);
+
+ const sortedImports = [...allImports].filter(imp => !imp.startsWith(packageName + ".")).sort();
+ for (const imp of sortedImports) {
+ classLines.push(`import ${imp};`);
+ }
+ classLines.push(``);
+
+ classLines.push(`/**`);
+ if (isSession) {
+ classLines.push(` * Typed client for session-scoped RPC methods.`);
+ classLines.push(` * `);
+ classLines.push(` * Provides strongly-typed access to all session-level API namespaces.`);
+ classLines.push(` * The {@code sessionId} is injected automatically into every call.`);
+ classLines.push(` *
`);
+ classLines.push(` * Obtain an instance by calling {@code new SessionRpc(caller, sessionId)}.`);
+ } else {
+ classLines.push(` * Typed client for server-level RPC methods.`);
+ classLines.push(` *
`);
+ classLines.push(` * Provides strongly-typed access to all server-level API namespaces.`);
+ classLines.push(` *
`);
+ classLines.push(` * Obtain an instance by calling {@code new ServerRpc(caller)}.`);
+ }
+ classLines.push(` *`);
+ classLines.push(` * @since 1.0.0`);
+ classLines.push(` */`);
+ classLines.push(GENERATED_ANNOTATION);
+ classLines.push(`public final class ${rootClassName} {`);
+ classLines.push(``);
+ if (needsMapper) {
+ classLines.push(` private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE;`);
+ classLines.push(``);
+ }
+ classLines.push(` private final RpcCaller caller;`);
+ if (isSession) {
+ classLines.push(` private final String sessionId;`);
+ }
+ if (subFields.length > 0) {
+ classLines.push(``);
+ classLines.push(...subFields);
+ }
+ classLines.push(``);
+
+ // Constructor
+ if (isSession) {
+ classLines.push(` /**`);
+ classLines.push(` * Creates a new session RPC client.`);
+ classLines.push(` *`);
+ classLines.push(` * @param caller the RPC transport function (e.g., {@code jsonRpcClient::invoke})`);
+ classLines.push(` * @param sessionId the session ID to inject into every request`);
+ classLines.push(` */`);
+ classLines.push(` public ${rootClassName}(RpcCaller caller, String sessionId) {`);
+ classLines.push(` this.caller = caller;`);
+ classLines.push(` this.sessionId = sessionId;`);
+ } else {
+ classLines.push(` /**`);
+ classLines.push(` * Creates a new server RPC client.`);
+ classLines.push(` *`);
+ classLines.push(` * @param caller the RPC transport function (e.g., {@code jsonRpcClient::invoke})`);
+ classLines.push(` */`);
+ classLines.push(` public ${rootClassName}(RpcCaller caller) {`);
+ classLines.push(` this.caller = caller;`);
+ }
+ for (const init of subInits) {
+ classLines.push(init);
+ }
+ classLines.push(` }`);
+ classLines.push(``);
+
+ // Top-level methods
+ classLines.push(...methodLines);
+
+ classLines.push(`}`);
+ classLines.push(``);
+
+ await writeGeneratedFile(`${packageDir}/${rootClassName}.java`, classLines.join("\n"));
+}
+
+/** Generate the RpcCaller functional interface */
+async function generateRpcCallerInterface(packageName: string, packageDir: string): Promise {
+ const lines: string[] = [];
+ lines.push(COPYRIGHT);
+ lines.push(``);
+ lines.push(AUTO_GENERATED_HEADER);
+ lines.push(GENERATED_FROM_API);
+ lines.push(``);
+ lines.push(`package ${packageName};`);
+ lines.push(``);
+ lines.push(`import java.util.concurrent.CompletableFuture;`);
+ lines.push(`import javax.annotation.processing.Generated;`);
+ lines.push(``);
+ lines.push(`/**`);
+ lines.push(` * Interface for invoking JSON-RPC methods with typed responses.`);
+ lines.push(` * `);
+ lines.push(` * Implementations delegate to the underlying transport layer`);
+ lines.push(` * (e.g., a {@code JsonRpcClient} instance). Use a method reference:`);
+ lines.push(` *
{@code`);
+ lines.push(` * RpcCaller caller = jsonRpcClient::invoke;`);
+ lines.push(` * }`);
+ lines.push(` * Note: because the {@code invoke} method has a type parameter, this interface cannot`);
+ lines.push(` * be implemented using a lambda expression — use a method reference or anonymous class.`);
+ lines.push(` *`);
+ lines.push(` * @since 1.0.0`);
+ lines.push(` */`);
+ lines.push(GENERATED_ANNOTATION);
+ lines.push(`public interface RpcCaller {`);
+ lines.push(``);
+ lines.push(` /**`);
+ lines.push(` * Invokes a JSON-RPC method and returns a future for the typed response.`);
+ lines.push(` *`);
+ lines.push(` * @param the expected response type`);
+ lines.push(` * @param method the JSON-RPC method name`);
+ lines.push(` * @param params the request parameters (may be a {@code Map}, DTO record, or {@code JsonNode})`);
+ lines.push(` * @param resultType the {@link Class} of the expected response type`);
+ lines.push(` * @return a {@link CompletableFuture} that completes with the deserialized result`);
+ lines.push(` */`);
+ lines.push(` CompletableFuture invoke(String method, Object params, Class resultType);`);
+ lines.push(`}`);
+ lines.push(``);
+
+ await writeGeneratedFile(`${packageDir}/RpcCaller.java`, lines.join("\n"));
+}
+
+/**
+ * Generate RpcMapper.java — a package-private holder for the shared ObjectMapper used
+ * when merging sessionId into session API call params. All session API classes that
+ * need an ObjectMapper reference this single instance instead of instantiating their own.
+ */
+async function generateRpcMapperClass(packageName: string, packageDir: string): Promise {
+ const lines: string[] = [];
+ lines.push(COPYRIGHT);
+ lines.push(``);
+ lines.push(AUTO_GENERATED_HEADER);
+ lines.push(GENERATED_FROM_API);
+ lines.push(``);
+ lines.push(`package ${packageName};`);
+ lines.push(``);
+ lines.push(`import javax.annotation.processing.Generated;`);
+ lines.push(``);
+ lines.push(`/**`);
+ lines.push(` * Package-private holder for the shared {@link com.fasterxml.jackson.databind.ObjectMapper}`);
+ lines.push(` * used by session API classes when merging {@code sessionId} into call parameters.`);
+ lines.push(` * `);
+ lines.push(` * {@link com.fasterxml.jackson.databind.ObjectMapper} is thread-safe and expensive to`);
+ lines.push(` * instantiate, so a single shared instance is used across all generated API classes.`);
+ lines.push(` *`);
+ lines.push(` * @since 1.0.0`);
+ lines.push(` */`);
+ lines.push(GENERATED_ANNOTATION);
+ lines.push(`final class RpcMapper {`);
+ lines.push(``);
+ lines.push(` static final com.fasterxml.jackson.databind.ObjectMapper INSTANCE =`);
+ lines.push(` new com.fasterxml.jackson.databind.ObjectMapper();`);
+ lines.push(``);
+ lines.push(` private RpcMapper() {}`);
+ lines.push(`}`);
+ lines.push(``);
+
+ await writeGeneratedFile(`${packageDir}/RpcMapper.java`, lines.join("\n"));
+}
+
+/** Main entry point for RPC wrapper generation */
+async function generateRpcWrappers(schemaPath: string): Promise {
+ console.log("\n🔧 Generating RPC wrapper classes...");
+
+ const schemaContent = await fs.readFile(schemaPath, "utf-8");
+ const schema = JSON.parse(schemaContent) as {
+ server?: Record;
+ session?: Record;
+ clientSession?: Record;
+ };
+
+ const packageName = "com.github.copilot.sdk.generated.rpc";
+ const packageDir = `src/generated/java/com/github/copilot/sdk/generated/rpc`;
+
+ // RpcCaller interface and shared ObjectMapper holder
+ await generateRpcCallerInterface(packageName, packageDir);
+ await generateRpcMapperClass(packageName, packageDir);
+
+ // Server-side wrappers
+ if (schema.server) {
+ const serverTree = buildNamespaceTree(schema.server);
+ await generateRpcRootFile("server", serverTree, false, packageName, packageDir);
+ }
+
+ // Session-side wrappers
+ if (schema.session) {
+ const sessionTree = buildNamespaceTree(schema.session);
+ await generateRpcRootFile("session", sessionTree, true, packageName, packageDir);
+ }
+
+ console.log(`✅ RPC wrapper classes generated`);
+}
+
+// ── Main entry point ──────────────────────────────────────────────────────────
+
+async function main(): Promise {
+ console.log("🚀 Java SDK code generator");
+ console.log("============================");
+
+ const sessionEventsSchemaPath = await getSessionEventsSchemaPath();
+ console.log(`📄 Session events schema: ${sessionEventsSchemaPath}`);
+ const apiSchemaPath = await getApiSchemaPath();
+ console.log(`📄 API schema: ${apiSchemaPath}`);
+
+ await generateSessionEvents(sessionEventsSchemaPath);
+ await generateRpcTypes(apiSchemaPath);
+ await generateRpcWrappers(apiSchemaPath);
+
+ console.log("\n✅ Java code generation complete!");
+}
+
+main().catch((err) => {
+ console.error("❌ Code generation failed:", err);
+ process.exit(1);
+});
diff --git a/scripts/codegen/package-lock.json b/scripts/codegen/package-lock.json
new file mode 100644
index 000000000..4a3705f36
--- /dev/null
+++ b/scripts/codegen/package-lock.json
@@ -0,0 +1,645 @@
+{
+ "name": "copilot-sdk-java-codegen",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "copilot-sdk-java-codegen",
+ "dependencies": {
+ "@github/copilot": "1.0.24",
+ "json-schema": "^0.4.0",
+ "tsx": "^4.20.6"
+ }
+ },
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz",
+ "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==",
+ "cpu": [
+ "ppc64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz",
+ "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz",
+ "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz",
+ "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz",
+ "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz",
+ "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz",
+ "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz",
+ "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz",
+ "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz",
+ "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz",
+ "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==",
+ "cpu": [
+ "ia32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz",
+ "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==",
+ "cpu": [
+ "loong64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz",
+ "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==",
+ "cpu": [
+ "mips64el"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz",
+ "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz",
+ "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==",
+ "cpu": [
+ "riscv64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz",
+ "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==",
+ "cpu": [
+ "s390x"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz",
+ "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz",
+ "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz",
+ "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz",
+ "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz",
+ "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz",
+ "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz",
+ "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz",
+ "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz",
+ "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==",
+ "cpu": [
+ "ia32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz",
+ "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@github/copilot": {
+ "version": "1.0.24",
+ "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.24.tgz",
+ "integrity": "sha512-/nZ2GwhaGq0HeI3W+6LE0JGw25/bipC6tYVa+oQ5tIvAafBazuNt10CXkeaor+u9oBWLZtPbdTyAzE2tjy9NpQ==",
+ "license": "SEE LICENSE IN LICENSE.md",
+ "bin": {
+ "copilot": "npm-loader.js"
+ },
+ "optionalDependencies": {
+ "@github/copilot-darwin-arm64": "1.0.24",
+ "@github/copilot-darwin-x64": "1.0.24",
+ "@github/copilot-linux-arm64": "1.0.24",
+ "@github/copilot-linux-x64": "1.0.24",
+ "@github/copilot-win32-arm64": "1.0.24",
+ "@github/copilot-win32-x64": "1.0.24"
+ }
+ },
+ "node_modules/@github/copilot-darwin-arm64": {
+ "version": "1.0.24",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.24.tgz",
+ "integrity": "sha512-lejn6KV+09rZEICX3nRx9a58DQFQ2kK3NJ3EICfVLngUCWIUmwn1BLezjeTQc9YNasHltA1hulvfsWqX+VjlMw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "SEE LICENSE IN LICENSE.md",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "bin": {
+ "copilot-darwin-arm64": "copilot"
+ }
+ },
+ "node_modules/@github/copilot-darwin-x64": {
+ "version": "1.0.24",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.24.tgz",
+ "integrity": "sha512-r2F3keTvr4Bunz3V+waRAvsHgqsVQGyIZFBebsNPWxBX1eh3IXgtBqxCR7vXTFyZonQ8VaiJH3YYEfAhyKsk9g==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "SEE LICENSE IN LICENSE.md",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "bin": {
+ "copilot-darwin-x64": "copilot"
+ }
+ },
+ "node_modules/@github/copilot-linux-arm64": {
+ "version": "1.0.24",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.24.tgz",
+ "integrity": "sha512-B3oANXKKKLhnKYozXa/W+DxfCQAHJCs0QKR5rBwNrwJbf656twNgALSxWTSJk+1rEP6MrHCswUAcwjwZL7Q+FQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "SEE LICENSE IN LICENSE.md",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "bin": {
+ "copilot-linux-arm64": "copilot"
+ }
+ },
+ "node_modules/@github/copilot-linux-x64": {
+ "version": "1.0.24",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.24.tgz",
+ "integrity": "sha512-NGTldizY54B+4Sfhu/GWoEQNMwqqUNgMwbSgBshFv+Hqy1EwuvNWKVov1Y0Vzhp4qAHc6ZxBk/OPIW8Ato9FUg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "SEE LICENSE IN LICENSE.md",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "bin": {
+ "copilot-linux-x64": "copilot"
+ }
+ },
+ "node_modules/@github/copilot-win32-arm64": {
+ "version": "1.0.24",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.24.tgz",
+ "integrity": "sha512-/pd/kgef7/HIIg1SQq4q8fext39pDSC44jHB10KkhfgG1WaDFhQbc/aSSMQfxeldkRbQh6VANp8WtGQdwtMCBA==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "SEE LICENSE IN LICENSE.md",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "bin": {
+ "copilot-win32-arm64": "copilot.exe"
+ }
+ },
+ "node_modules/@github/copilot-win32-x64": {
+ "version": "1.0.24",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.24.tgz",
+ "integrity": "sha512-RDvOiSvyEJwELqErwANJTrdRuMIHkwPE4QK7Le7WsmaSKxiuS4H1Pa8Yxnd2FWrMsCHEbase23GJlymbnGYLXQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "SEE LICENSE IN LICENSE.md",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "bin": {
+ "copilot-win32-x64": "copilot.exe"
+ }
+ },
+ "node_modules/esbuild": {
+ "version": "0.27.7",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz",
+ "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.27.7",
+ "@esbuild/android-arm": "0.27.7",
+ "@esbuild/android-arm64": "0.27.7",
+ "@esbuild/android-x64": "0.27.7",
+ "@esbuild/darwin-arm64": "0.27.7",
+ "@esbuild/darwin-x64": "0.27.7",
+ "@esbuild/freebsd-arm64": "0.27.7",
+ "@esbuild/freebsd-x64": "0.27.7",
+ "@esbuild/linux-arm": "0.27.7",
+ "@esbuild/linux-arm64": "0.27.7",
+ "@esbuild/linux-ia32": "0.27.7",
+ "@esbuild/linux-loong64": "0.27.7",
+ "@esbuild/linux-mips64el": "0.27.7",
+ "@esbuild/linux-ppc64": "0.27.7",
+ "@esbuild/linux-riscv64": "0.27.7",
+ "@esbuild/linux-s390x": "0.27.7",
+ "@esbuild/linux-x64": "0.27.7",
+ "@esbuild/netbsd-arm64": "0.27.7",
+ "@esbuild/netbsd-x64": "0.27.7",
+ "@esbuild/openbsd-arm64": "0.27.7",
+ "@esbuild/openbsd-x64": "0.27.7",
+ "@esbuild/openharmony-arm64": "0.27.7",
+ "@esbuild/sunos-x64": "0.27.7",
+ "@esbuild/win32-arm64": "0.27.7",
+ "@esbuild/win32-ia32": "0.27.7",
+ "@esbuild/win32-x64": "0.27.7"
+ }
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/get-tsconfig": {
+ "version": "4.13.7",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.7.tgz",
+ "integrity": "sha512-7tN6rFgBlMgpBML5j8typ92BKFi2sFQvIdpAqLA2beia5avZDrMs0FLZiM5etShWq5irVyGcGMEA1jcDaK7A/Q==",
+ "license": "MIT",
+ "dependencies": {
+ "resolve-pkg-maps": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
+ }
+ },
+ "node_modules/json-schema": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
+ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==",
+ "license": "(AFL-2.1 OR BSD-3-Clause)"
+ },
+ "node_modules/resolve-pkg-maps": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
+ }
+ },
+ "node_modules/tsx": {
+ "version": "4.21.0",
+ "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz",
+ "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==",
+ "license": "MIT",
+ "dependencies": {
+ "esbuild": "~0.27.0",
+ "get-tsconfig": "^4.7.5"
+ },
+ "bin": {
+ "tsx": "dist/cli.mjs"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ }
+ }
+ }
+}
diff --git a/scripts/codegen/package.json b/scripts/codegen/package.json
new file mode 100644
index 000000000..38dd5fc1f
--- /dev/null
+++ b/scripts/codegen/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "copilot-sdk-java-codegen",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "generate": "tsx java.ts",
+ "generate:java": "tsx java.ts"
+ },
+ "dependencies": {
+ "@github/copilot": "1.0.24",
+ "json-schema": "^0.4.0",
+ "tsx": "^4.20.6"
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/AbortEvent.java b/src/generated/java/com/github/copilot/sdk/generated/AbortEvent.java
new file mode 100644
index 000000000..d236f04f0
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/AbortEvent.java
@@ -0,0 +1,42 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code abort} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AbortEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "abort"; }
+
+ @JsonProperty("data")
+ private AbortEventData data;
+
+ public AbortEventData getData() { return data; }
+ public void setData(AbortEventData data) { this.data = data; }
+
+ /** Data payload for {@link AbortEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record AbortEventData(
+ /** Reason the current turn was aborted (e.g., "user initiated") */
+ @JsonProperty("reason") String reason
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/AssistantIntentEvent.java b/src/generated/java/com/github/copilot/sdk/generated/AssistantIntentEvent.java
new file mode 100644
index 000000000..a1c22edfb
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/AssistantIntentEvent.java
@@ -0,0 +1,42 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code assistant.intent} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AssistantIntentEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "assistant.intent"; }
+
+ @JsonProperty("data")
+ private AssistantIntentEventData data;
+
+ public AssistantIntentEventData getData() { return data; }
+ public void setData(AssistantIntentEventData data) { this.data = data; }
+
+ /** Data payload for {@link AssistantIntentEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record AssistantIntentEventData(
+ /** Short description of what the agent is currently doing or planning to do */
+ @JsonProperty("intent") String intent
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/AssistantMessageDeltaEvent.java b/src/generated/java/com/github/copilot/sdk/generated/AssistantMessageDeltaEvent.java
new file mode 100644
index 000000000..128608a1e
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/AssistantMessageDeltaEvent.java
@@ -0,0 +1,46 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code assistant.message_delta} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AssistantMessageDeltaEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "assistant.message_delta"; }
+
+ @JsonProperty("data")
+ private AssistantMessageDeltaEventData data;
+
+ public AssistantMessageDeltaEventData getData() { return data; }
+ public void setData(AssistantMessageDeltaEventData data) { this.data = data; }
+
+ /** Data payload for {@link AssistantMessageDeltaEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record AssistantMessageDeltaEventData(
+ /** Message ID this delta belongs to, matching the corresponding assistant.message event */
+ @JsonProperty("messageId") String messageId,
+ /** Incremental text chunk to append to the message content */
+ @JsonProperty("deltaContent") String deltaContent,
+ /** Tool call ID of the parent tool invocation when this event originates from a sub-agent */
+ @JsonProperty("parentToolCallId") String parentToolCallId
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/AssistantMessageEvent.java b/src/generated/java/com/github/copilot/sdk/generated/AssistantMessageEvent.java
new file mode 100644
index 000000000..78ccbf42f
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/AssistantMessageEvent.java
@@ -0,0 +1,104 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code assistant.message} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AssistantMessageEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "assistant.message"; }
+
+ @JsonProperty("data")
+ private AssistantMessageEventData data;
+
+ public AssistantMessageEventData getData() { return data; }
+ public void setData(AssistantMessageEventData data) { this.data = data; }
+
+ /** Data payload for {@link AssistantMessageEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record AssistantMessageEventData(
+ /** Unique identifier for this assistant message */
+ @JsonProperty("messageId") String messageId,
+ /** The assistant's text response content */
+ @JsonProperty("content") String content,
+ /** Tool invocations requested by the assistant in this message */
+ @JsonProperty("toolRequests") List toolRequests,
+ /** Opaque/encrypted extended thinking data from Anthropic models. Session-bound and stripped on resume. */
+ @JsonProperty("reasoningOpaque") String reasoningOpaque,
+ /** Readable reasoning text from the model's extended thinking */
+ @JsonProperty("reasoningText") String reasoningText,
+ /** Encrypted reasoning content from OpenAI models. Session-bound and stripped on resume. */
+ @JsonProperty("encryptedContent") String encryptedContent,
+ /** Generation phase for phased-output models (e.g., thinking vs. response phases) */
+ @JsonProperty("phase") String phase,
+ /** Actual output token count from the API response (completion_tokens), used for accurate token accounting */
+ @JsonProperty("outputTokens") Double outputTokens,
+ /** CAPI interaction ID for correlating this message with upstream telemetry */
+ @JsonProperty("interactionId") String interactionId,
+ /** GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs */
+ @JsonProperty("requestId") String requestId,
+ /** Tool call ID of the parent tool invocation when this event originates from a sub-agent */
+ @JsonProperty("parentToolCallId") String parentToolCallId
+ ) {
+
+ /** A tool invocation request from the assistant */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record AssistantMessageEventDataToolRequestsItem(
+ /** Unique identifier for this tool call */
+ @JsonProperty("toolCallId") String toolCallId,
+ /** Name of the tool being invoked */
+ @JsonProperty("name") String name,
+ /** Arguments to pass to the tool, format depends on the tool */
+ @JsonProperty("arguments") Object arguments,
+ /** Tool call type: "function" for standard tool calls, "custom" for grammar-based tool calls. Defaults to "function" when absent. */
+ @JsonProperty("type") AssistantMessageEventDataToolRequestsItemType type,
+ /** Human-readable display title for the tool */
+ @JsonProperty("toolTitle") String toolTitle,
+ /** Name of the MCP server hosting this tool, when the tool is an MCP tool */
+ @JsonProperty("mcpServerName") String mcpServerName,
+ /** Resolved intention summary describing what this specific call does */
+ @JsonProperty("intentionSummary") String intentionSummary
+ ) {
+
+ /** Tool call type: "function" for standard tool calls, "custom" for grammar-based tool calls. Defaults to "function" when absent. */
+ public enum AssistantMessageEventDataToolRequestsItemType {
+ /** The {@code function} variant. */
+ FUNCTION("function"),
+ /** The {@code custom} variant. */
+ CUSTOM("custom");
+
+ private final String value;
+ AssistantMessageEventDataToolRequestsItemType(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static AssistantMessageEventDataToolRequestsItemType fromValue(String value) {
+ for (AssistantMessageEventDataToolRequestsItemType v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown AssistantMessageEventDataToolRequestsItemType value: " + value);
+ }
+ }
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/AssistantReasoningDeltaEvent.java b/src/generated/java/com/github/copilot/sdk/generated/AssistantReasoningDeltaEvent.java
new file mode 100644
index 000000000..7c11ad59e
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/AssistantReasoningDeltaEvent.java
@@ -0,0 +1,44 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code assistant.reasoning_delta} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AssistantReasoningDeltaEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "assistant.reasoning_delta"; }
+
+ @JsonProperty("data")
+ private AssistantReasoningDeltaEventData data;
+
+ public AssistantReasoningDeltaEventData getData() { return data; }
+ public void setData(AssistantReasoningDeltaEventData data) { this.data = data; }
+
+ /** Data payload for {@link AssistantReasoningDeltaEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record AssistantReasoningDeltaEventData(
+ /** Reasoning block ID this delta belongs to, matching the corresponding assistant.reasoning event */
+ @JsonProperty("reasoningId") String reasoningId,
+ /** Incremental text chunk to append to the reasoning content */
+ @JsonProperty("deltaContent") String deltaContent
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/AssistantReasoningEvent.java b/src/generated/java/com/github/copilot/sdk/generated/AssistantReasoningEvent.java
new file mode 100644
index 000000000..292b191b1
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/AssistantReasoningEvent.java
@@ -0,0 +1,44 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code assistant.reasoning} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AssistantReasoningEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "assistant.reasoning"; }
+
+ @JsonProperty("data")
+ private AssistantReasoningEventData data;
+
+ public AssistantReasoningEventData getData() { return data; }
+ public void setData(AssistantReasoningEventData data) { this.data = data; }
+
+ /** Data payload for {@link AssistantReasoningEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record AssistantReasoningEventData(
+ /** Unique identifier for this reasoning block */
+ @JsonProperty("reasoningId") String reasoningId,
+ /** The complete extended thinking text from the model */
+ @JsonProperty("content") String content
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/AssistantStreamingDeltaEvent.java b/src/generated/java/com/github/copilot/sdk/generated/AssistantStreamingDeltaEvent.java
new file mode 100644
index 000000000..71ec8f488
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/AssistantStreamingDeltaEvent.java
@@ -0,0 +1,42 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code assistant.streaming_delta} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AssistantStreamingDeltaEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "assistant.streaming_delta"; }
+
+ @JsonProperty("data")
+ private AssistantStreamingDeltaEventData data;
+
+ public AssistantStreamingDeltaEventData getData() { return data; }
+ public void setData(AssistantStreamingDeltaEventData data) { this.data = data; }
+
+ /** Data payload for {@link AssistantStreamingDeltaEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record AssistantStreamingDeltaEventData(
+ /** Cumulative total bytes received from the streaming response so far */
+ @JsonProperty("totalResponseSizeBytes") Double totalResponseSizeBytes
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/AssistantTurnEndEvent.java b/src/generated/java/com/github/copilot/sdk/generated/AssistantTurnEndEvent.java
new file mode 100644
index 000000000..a8e0b1652
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/AssistantTurnEndEvent.java
@@ -0,0 +1,42 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code assistant.turn_end} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AssistantTurnEndEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "assistant.turn_end"; }
+
+ @JsonProperty("data")
+ private AssistantTurnEndEventData data;
+
+ public AssistantTurnEndEventData getData() { return data; }
+ public void setData(AssistantTurnEndEventData data) { this.data = data; }
+
+ /** Data payload for {@link AssistantTurnEndEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record AssistantTurnEndEventData(
+ /** Identifier of the turn that has ended, matching the corresponding assistant.turn_start event */
+ @JsonProperty("turnId") String turnId
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/AssistantTurnStartEvent.java b/src/generated/java/com/github/copilot/sdk/generated/AssistantTurnStartEvent.java
new file mode 100644
index 000000000..921623801
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/AssistantTurnStartEvent.java
@@ -0,0 +1,44 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code assistant.turn_start} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AssistantTurnStartEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "assistant.turn_start"; }
+
+ @JsonProperty("data")
+ private AssistantTurnStartEventData data;
+
+ public AssistantTurnStartEventData getData() { return data; }
+ public void setData(AssistantTurnStartEventData data) { this.data = data; }
+
+ /** Data payload for {@link AssistantTurnStartEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record AssistantTurnStartEventData(
+ /** Identifier for this turn within the agentic loop, typically a stringified turn number */
+ @JsonProperty("turnId") String turnId,
+ /** CAPI interaction ID for correlating this turn with upstream telemetry */
+ @JsonProperty("interactionId") String interactionId
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageEvent.java b/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageEvent.java
new file mode 100644
index 000000000..65f47bfad
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageEvent.java
@@ -0,0 +1,125 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code assistant.usage} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AssistantUsageEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "assistant.usage"; }
+
+ @JsonProperty("data")
+ private AssistantUsageEventData data;
+
+ public AssistantUsageEventData getData() { return data; }
+ public void setData(AssistantUsageEventData data) { this.data = data; }
+
+ /** Data payload for {@link AssistantUsageEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record AssistantUsageEventData(
+ /** Model identifier used for this API call */
+ @JsonProperty("model") String model,
+ /** Number of input tokens consumed */
+ @JsonProperty("inputTokens") Double inputTokens,
+ /** Number of output tokens produced */
+ @JsonProperty("outputTokens") Double outputTokens,
+ /** Number of tokens read from prompt cache */
+ @JsonProperty("cacheReadTokens") Double cacheReadTokens,
+ /** Number of tokens written to prompt cache */
+ @JsonProperty("cacheWriteTokens") Double cacheWriteTokens,
+ /** Number of output tokens used for reasoning (e.g., chain-of-thought) */
+ @JsonProperty("reasoningTokens") Double reasoningTokens,
+ /** Model multiplier cost for billing purposes */
+ @JsonProperty("cost") Double cost,
+ /** Duration of the API call in milliseconds */
+ @JsonProperty("duration") Double duration,
+ /** Time to first token in milliseconds. Only available for streaming requests */
+ @JsonProperty("ttftMs") Double ttftMs,
+ /** Average inter-token latency in milliseconds. Only available for streaming requests */
+ @JsonProperty("interTokenLatencyMs") Double interTokenLatencyMs,
+ /** What initiated this API call (e.g., "sub-agent", "mcp-sampling"); absent for user-initiated calls */
+ @JsonProperty("initiator") String initiator,
+ /** Completion ID from the model provider (e.g., chatcmpl-abc123) */
+ @JsonProperty("apiCallId") String apiCallId,
+ /** GitHub request tracing ID (x-github-request-id header) for server-side log correlation */
+ @JsonProperty("providerCallId") String providerCallId,
+ /** Parent tool call ID when this usage originates from a sub-agent */
+ @JsonProperty("parentToolCallId") String parentToolCallId,
+ /** Per-quota resource usage snapshots, keyed by quota identifier */
+ @JsonProperty("quotaSnapshots") Map quotaSnapshots,
+ /** Per-request cost and usage data from the CAPI copilot_usage response field */
+ @JsonProperty("copilotUsage") AssistantUsageEventDataCopilotUsage copilotUsage,
+ /** Reasoning effort level used for model calls, if applicable (e.g. "low", "medium", "high", "xhigh") */
+ @JsonProperty("reasoningEffort") String reasoningEffort
+ ) {
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record AssistantUsageEventDataQuotaSnapshotsValue(
+ /** Whether the user has an unlimited usage entitlement */
+ @JsonProperty("isUnlimitedEntitlement") Boolean isUnlimitedEntitlement,
+ /** Total requests allowed by the entitlement */
+ @JsonProperty("entitlementRequests") Double entitlementRequests,
+ /** Number of requests already consumed */
+ @JsonProperty("usedRequests") Double usedRequests,
+ /** Whether usage is still permitted after quota exhaustion */
+ @JsonProperty("usageAllowedWithExhaustedQuota") Boolean usageAllowedWithExhaustedQuota,
+ /** Number of requests over the entitlement limit */
+ @JsonProperty("overage") Double overage,
+ /** Whether overage is allowed when quota is exhausted */
+ @JsonProperty("overageAllowedWithExhaustedQuota") Boolean overageAllowedWithExhaustedQuota,
+ /** Percentage of quota remaining (0.0 to 1.0) */
+ @JsonProperty("remainingPercentage") Double remainingPercentage,
+ /** Date when the quota resets */
+ @JsonProperty("resetDate") OffsetDateTime resetDate
+ ) {
+ }
+
+ /** Per-request cost and usage data from the CAPI copilot_usage response field */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record AssistantUsageEventDataCopilotUsage(
+ /** Itemized token usage breakdown */
+ @JsonProperty("tokenDetails") List tokenDetails,
+ /** Total cost in nano-AIU (AI Units) for this request */
+ @JsonProperty("totalNanoAiu") Double totalNanoAiu
+ ) {
+
+ /** Token usage detail for a single billing category */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record AssistantUsageEventDataCopilotUsageTokenDetailsItem(
+ /** Number of tokens in this billing batch */
+ @JsonProperty("batchSize") Double batchSize,
+ /** Cost per batch of tokens */
+ @JsonProperty("costPerBatch") Double costPerBatch,
+ /** Total token count for this entry */
+ @JsonProperty("tokenCount") Double tokenCount,
+ /** Token category (e.g., "input", "output") */
+ @JsonProperty("tokenType") String tokenType
+ ) {
+ }
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/CapabilitiesChangedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/CapabilitiesChangedEvent.java
new file mode 100644
index 000000000..fbf14f8ec
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/CapabilitiesChangedEvent.java
@@ -0,0 +1,51 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code capabilities.changed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class CapabilitiesChangedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "capabilities.changed"; }
+
+ @JsonProperty("data")
+ private CapabilitiesChangedEventData data;
+
+ public CapabilitiesChangedEventData getData() { return data; }
+ public void setData(CapabilitiesChangedEventData data) { this.data = data; }
+
+ /** Data payload for {@link CapabilitiesChangedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record CapabilitiesChangedEventData(
+ /** UI capability changes */
+ @JsonProperty("ui") CapabilitiesChangedEventDataUi ui
+ ) {
+
+ /** UI capability changes */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record CapabilitiesChangedEventDataUi(
+ /** Whether elicitation is now supported */
+ @JsonProperty("elicitation") Boolean elicitation
+ ) {
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/CommandCompletedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/CommandCompletedEvent.java
new file mode 100644
index 000000000..d2075f09d
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/CommandCompletedEvent.java
@@ -0,0 +1,42 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code command.completed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class CommandCompletedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "command.completed"; }
+
+ @JsonProperty("data")
+ private CommandCompletedEventData data;
+
+ public CommandCompletedEventData getData() { return data; }
+ public void setData(CommandCompletedEventData data) { this.data = data; }
+
+ /** Data payload for {@link CommandCompletedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record CommandCompletedEventData(
+ /** Request ID of the resolved command request; clients should dismiss any UI for this request */
+ @JsonProperty("requestId") String requestId
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/CommandExecuteEvent.java b/src/generated/java/com/github/copilot/sdk/generated/CommandExecuteEvent.java
new file mode 100644
index 000000000..a9b0608db
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/CommandExecuteEvent.java
@@ -0,0 +1,48 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code command.execute} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class CommandExecuteEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "command.execute"; }
+
+ @JsonProperty("data")
+ private CommandExecuteEventData data;
+
+ public CommandExecuteEventData getData() { return data; }
+ public void setData(CommandExecuteEventData data) { this.data = data; }
+
+ /** Data payload for {@link CommandExecuteEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record CommandExecuteEventData(
+ /** Unique identifier; used to respond via session.commands.handlePendingCommand() */
+ @JsonProperty("requestId") String requestId,
+ /** The full command text (e.g., /deploy production) */
+ @JsonProperty("command") String command,
+ /** Command name without leading / */
+ @JsonProperty("commandName") String commandName,
+ /** Raw argument string after the command name */
+ @JsonProperty("args") String args
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/CommandQueuedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/CommandQueuedEvent.java
new file mode 100644
index 000000000..6599f4da6
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/CommandQueuedEvent.java
@@ -0,0 +1,44 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code command.queued} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class CommandQueuedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "command.queued"; }
+
+ @JsonProperty("data")
+ private CommandQueuedEventData data;
+
+ public CommandQueuedEventData getData() { return data; }
+ public void setData(CommandQueuedEventData data) { this.data = data; }
+
+ /** Data payload for {@link CommandQueuedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record CommandQueuedEventData(
+ /** Unique identifier for this request; used to respond via session.respondToQueuedCommand() */
+ @JsonProperty("requestId") String requestId,
+ /** The slash command text to be executed (e.g., /help, /clear) */
+ @JsonProperty("command") String command
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/CommandsChangedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/CommandsChangedEvent.java
new file mode 100644
index 000000000..a7704b6c8
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/CommandsChangedEvent.java
@@ -0,0 +1,51 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code commands.changed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class CommandsChangedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "commands.changed"; }
+
+ @JsonProperty("data")
+ private CommandsChangedEventData data;
+
+ public CommandsChangedEventData getData() { return data; }
+ public void setData(CommandsChangedEventData data) { this.data = data; }
+
+ /** Data payload for {@link CommandsChangedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record CommandsChangedEventData(
+ /** Current list of registered SDK commands */
+ @JsonProperty("commands") List commands
+ ) {
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record CommandsChangedEventDataCommandsItem(
+ @JsonProperty("name") String name,
+ @JsonProperty("description") String description
+ ) {
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/ElicitationCompletedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/ElicitationCompletedEvent.java
new file mode 100644
index 000000000..45cbf54c7
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/ElicitationCompletedEvent.java
@@ -0,0 +1,69 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code elicitation.completed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class ElicitationCompletedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "elicitation.completed"; }
+
+ @JsonProperty("data")
+ private ElicitationCompletedEventData data;
+
+ public ElicitationCompletedEventData getData() { return data; }
+ public void setData(ElicitationCompletedEventData data) { this.data = data; }
+
+ /** Data payload for {@link ElicitationCompletedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record ElicitationCompletedEventData(
+ /** Request ID of the resolved elicitation request; clients should dismiss any UI for this request */
+ @JsonProperty("requestId") String requestId,
+ /** The user action: "accept" (submitted form), "decline" (explicitly refused), or "cancel" (dismissed) */
+ @JsonProperty("action") ElicitationCompletedEventDataAction action,
+ /** The submitted form data when action is 'accept'; keys match the requested schema fields */
+ @JsonProperty("content") Map content
+ ) {
+
+ /** The user action: "accept" (submitted form), "decline" (explicitly refused), or "cancel" (dismissed) */
+ public enum ElicitationCompletedEventDataAction {
+ /** The {@code accept} variant. */
+ ACCEPT("accept"),
+ /** The {@code decline} variant. */
+ DECLINE("decline"),
+ /** The {@code cancel} variant. */
+ CANCEL("cancel");
+
+ private final String value;
+ ElicitationCompletedEventDataAction(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static ElicitationCompletedEventDataAction fromValue(String value) {
+ for (ElicitationCompletedEventDataAction v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown ElicitationCompletedEventDataAction value: " + value);
+ }
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/ElicitationRequestedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/ElicitationRequestedEvent.java
new file mode 100644
index 000000000..838afbc50
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/ElicitationRequestedEvent.java
@@ -0,0 +1,89 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code elicitation.requested} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class ElicitationRequestedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "elicitation.requested"; }
+
+ @JsonProperty("data")
+ private ElicitationRequestedEventData data;
+
+ public ElicitationRequestedEventData getData() { return data; }
+ public void setData(ElicitationRequestedEventData data) { this.data = data; }
+
+ /** Data payload for {@link ElicitationRequestedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record ElicitationRequestedEventData(
+ /** Unique identifier for this elicitation request; used to respond via session.respondToElicitation() */
+ @JsonProperty("requestId") String requestId,
+ /** Tool call ID from the LLM completion; used to correlate with CompletionChunk.toolCall.id for remote UIs */
+ @JsonProperty("toolCallId") String toolCallId,
+ /** The source that initiated the request (MCP server name, or absent for agent-initiated) */
+ @JsonProperty("elicitationSource") String elicitationSource,
+ /** Message describing what information is needed from the user */
+ @JsonProperty("message") String message,
+ /** Elicitation mode; "form" for structured input, "url" for browser-based. Defaults to "form" when absent. */
+ @JsonProperty("mode") ElicitationRequestedEventDataMode mode,
+ /** JSON Schema describing the form fields to present to the user (form mode only) */
+ @JsonProperty("requestedSchema") ElicitationRequestedEventDataRequestedSchema requestedSchema,
+ /** URL to open in the user's browser (url mode only) */
+ @JsonProperty("url") String url
+ ) {
+
+ /** Elicitation mode; "form" for structured input, "url" for browser-based. Defaults to "form" when absent. */
+ public enum ElicitationRequestedEventDataMode {
+ /** The {@code form} variant. */
+ FORM("form"),
+ /** The {@code url} variant. */
+ URL("url");
+
+ private final String value;
+ ElicitationRequestedEventDataMode(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static ElicitationRequestedEventDataMode fromValue(String value) {
+ for (ElicitationRequestedEventDataMode v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown ElicitationRequestedEventDataMode value: " + value);
+ }
+ }
+
+ /** JSON Schema describing the form fields to present to the user (form mode only) */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record ElicitationRequestedEventDataRequestedSchema(
+ /** Schema type indicator (always 'object') */
+ @JsonProperty("type") String type,
+ /** Form field definitions, keyed by field name */
+ @JsonProperty("properties") Map properties,
+ /** List of required field names */
+ @JsonProperty("required") List required
+ ) {
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/ExitPlanModeCompletedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/ExitPlanModeCompletedEvent.java
new file mode 100644
index 000000000..56c2c6681
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/ExitPlanModeCompletedEvent.java
@@ -0,0 +1,50 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code exit_plan_mode.completed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class ExitPlanModeCompletedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "exit_plan_mode.completed"; }
+
+ @JsonProperty("data")
+ private ExitPlanModeCompletedEventData data;
+
+ public ExitPlanModeCompletedEventData getData() { return data; }
+ public void setData(ExitPlanModeCompletedEventData data) { this.data = data; }
+
+ /** Data payload for {@link ExitPlanModeCompletedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record ExitPlanModeCompletedEventData(
+ /** Request ID of the resolved exit plan mode request; clients should dismiss any UI for this request */
+ @JsonProperty("requestId") String requestId,
+ /** Whether the plan was approved by the user */
+ @JsonProperty("approved") Boolean approved,
+ /** Which action the user selected (e.g. 'autopilot', 'interactive', 'exit_only') */
+ @JsonProperty("selectedAction") String selectedAction,
+ /** Whether edits should be auto-approved without confirmation */
+ @JsonProperty("autoApproveEdits") Boolean autoApproveEdits,
+ /** Free-form feedback from the user if they requested changes to the plan */
+ @JsonProperty("feedback") String feedback
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/ExitPlanModeRequestedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/ExitPlanModeRequestedEvent.java
new file mode 100644
index 000000000..de2bf45a8
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/ExitPlanModeRequestedEvent.java
@@ -0,0 +1,51 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code exit_plan_mode.requested} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class ExitPlanModeRequestedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "exit_plan_mode.requested"; }
+
+ @JsonProperty("data")
+ private ExitPlanModeRequestedEventData data;
+
+ public ExitPlanModeRequestedEventData getData() { return data; }
+ public void setData(ExitPlanModeRequestedEventData data) { this.data = data; }
+
+ /** Data payload for {@link ExitPlanModeRequestedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record ExitPlanModeRequestedEventData(
+ /** Unique identifier for this request; used to respond via session.respondToExitPlanMode() */
+ @JsonProperty("requestId") String requestId,
+ /** Summary of the plan that was created */
+ @JsonProperty("summary") String summary,
+ /** Full content of the plan file */
+ @JsonProperty("planContent") String planContent,
+ /** Available actions the user can take (e.g., approve, edit, reject) */
+ @JsonProperty("actions") List actions,
+ /** The recommended action for the user to take */
+ @JsonProperty("recommendedAction") String recommendedAction
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/ExternalToolCompletedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/ExternalToolCompletedEvent.java
new file mode 100644
index 000000000..e9526c6fa
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/ExternalToolCompletedEvent.java
@@ -0,0 +1,42 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code external_tool.completed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class ExternalToolCompletedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "external_tool.completed"; }
+
+ @JsonProperty("data")
+ private ExternalToolCompletedEventData data;
+
+ public ExternalToolCompletedEventData getData() { return data; }
+ public void setData(ExternalToolCompletedEventData data) { this.data = data; }
+
+ /** Data payload for {@link ExternalToolCompletedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record ExternalToolCompletedEventData(
+ /** Request ID of the resolved external tool request; clients should dismiss any UI for this request */
+ @JsonProperty("requestId") String requestId
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/ExternalToolRequestedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/ExternalToolRequestedEvent.java
new file mode 100644
index 000000000..8e646c1a5
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/ExternalToolRequestedEvent.java
@@ -0,0 +1,54 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code external_tool.requested} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class ExternalToolRequestedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "external_tool.requested"; }
+
+ @JsonProperty("data")
+ private ExternalToolRequestedEventData data;
+
+ public ExternalToolRequestedEventData getData() { return data; }
+ public void setData(ExternalToolRequestedEventData data) { this.data = data; }
+
+ /** Data payload for {@link ExternalToolRequestedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record ExternalToolRequestedEventData(
+ /** Unique identifier for this request; used to respond via session.respondToExternalTool() */
+ @JsonProperty("requestId") String requestId,
+ /** Session ID that this external tool request belongs to */
+ @JsonProperty("sessionId") String sessionId,
+ /** Tool call ID assigned to this external tool invocation */
+ @JsonProperty("toolCallId") String toolCallId,
+ /** Name of the external tool to invoke */
+ @JsonProperty("toolName") String toolName,
+ /** Arguments to pass to the external tool */
+ @JsonProperty("arguments") Object arguments,
+ /** W3C Trace Context traceparent header for the execute_tool span */
+ @JsonProperty("traceparent") String traceparent,
+ /** W3C Trace Context tracestate header for the execute_tool span */
+ @JsonProperty("tracestate") String tracestate
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/HookEndEvent.java b/src/generated/java/com/github/copilot/sdk/generated/HookEndEvent.java
new file mode 100644
index 000000000..51de160c1
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/HookEndEvent.java
@@ -0,0 +1,61 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code hook.end} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class HookEndEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "hook.end"; }
+
+ @JsonProperty("data")
+ private HookEndEventData data;
+
+ public HookEndEventData getData() { return data; }
+ public void setData(HookEndEventData data) { this.data = data; }
+
+ /** Data payload for {@link HookEndEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record HookEndEventData(
+ /** Identifier matching the corresponding hook.start event */
+ @JsonProperty("hookInvocationId") String hookInvocationId,
+ /** Type of hook that was invoked (e.g., "preToolUse", "postToolUse", "sessionStart") */
+ @JsonProperty("hookType") String hookType,
+ /** Output data produced by the hook */
+ @JsonProperty("output") Object output,
+ /** Whether the hook completed successfully */
+ @JsonProperty("success") Boolean success,
+ /** Error details when the hook failed */
+ @JsonProperty("error") HookEndEventDataError error
+ ) {
+
+ /** Error details when the hook failed */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record HookEndEventDataError(
+ /** Human-readable error message */
+ @JsonProperty("message") String message,
+ /** Error stack trace, when available */
+ @JsonProperty("stack") String stack
+ ) {
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/HookStartEvent.java b/src/generated/java/com/github/copilot/sdk/generated/HookStartEvent.java
new file mode 100644
index 000000000..ffca1dfe0
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/HookStartEvent.java
@@ -0,0 +1,46 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code hook.start} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class HookStartEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "hook.start"; }
+
+ @JsonProperty("data")
+ private HookStartEventData data;
+
+ public HookStartEventData getData() { return data; }
+ public void setData(HookStartEventData data) { this.data = data; }
+
+ /** Data payload for {@link HookStartEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record HookStartEventData(
+ /** Unique identifier for this hook invocation */
+ @JsonProperty("hookInvocationId") String hookInvocationId,
+ /** Type of hook being invoked (e.g., "preToolUse", "postToolUse", "sessionStart") */
+ @JsonProperty("hookType") String hookType,
+ /** Input data passed to the hook */
+ @JsonProperty("input") Object input
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/McpOauthCompletedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/McpOauthCompletedEvent.java
new file mode 100644
index 000000000..3d410bf2d
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/McpOauthCompletedEvent.java
@@ -0,0 +1,42 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code mcp.oauth_completed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class McpOauthCompletedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "mcp.oauth_completed"; }
+
+ @JsonProperty("data")
+ private McpOauthCompletedEventData data;
+
+ public McpOauthCompletedEventData getData() { return data; }
+ public void setData(McpOauthCompletedEventData data) { this.data = data; }
+
+ /** Data payload for {@link McpOauthCompletedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record McpOauthCompletedEventData(
+ /** Request ID of the resolved OAuth request */
+ @JsonProperty("requestId") String requestId
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/McpOauthRequiredEvent.java b/src/generated/java/com/github/copilot/sdk/generated/McpOauthRequiredEvent.java
new file mode 100644
index 000000000..748cdfc9b
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/McpOauthRequiredEvent.java
@@ -0,0 +1,59 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code mcp.oauth_required} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class McpOauthRequiredEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "mcp.oauth_required"; }
+
+ @JsonProperty("data")
+ private McpOauthRequiredEventData data;
+
+ public McpOauthRequiredEventData getData() { return data; }
+ public void setData(McpOauthRequiredEventData data) { this.data = data; }
+
+ /** Data payload for {@link McpOauthRequiredEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record McpOauthRequiredEventData(
+ /** Unique identifier for this OAuth request; used to respond via session.respondToMcpOAuth() */
+ @JsonProperty("requestId") String requestId,
+ /** Display name of the MCP server that requires OAuth */
+ @JsonProperty("serverName") String serverName,
+ /** URL of the MCP server that requires OAuth */
+ @JsonProperty("serverUrl") String serverUrl,
+ /** Static OAuth client configuration, if the server specifies one */
+ @JsonProperty("staticClientConfig") McpOauthRequiredEventDataStaticClientConfig staticClientConfig
+ ) {
+
+ /** Static OAuth client configuration, if the server specifies one */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record McpOauthRequiredEventDataStaticClientConfig(
+ /** OAuth client ID for the server */
+ @JsonProperty("clientId") String clientId,
+ /** Whether this is a public OAuth client */
+ @JsonProperty("publicClient") Boolean publicClient
+ ) {
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/PendingMessagesModifiedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/PendingMessagesModifiedEvent.java
new file mode 100644
index 000000000..56f8ed520
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/PendingMessagesModifiedEvent.java
@@ -0,0 +1,39 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code pending_messages.modified} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class PendingMessagesModifiedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "pending_messages.modified"; }
+
+ @JsonProperty("data")
+ private PendingMessagesModifiedEventData data;
+
+ public PendingMessagesModifiedEventData getData() { return data; }
+ public void setData(PendingMessagesModifiedEventData data) { this.data = data; }
+
+ /** Data payload for {@link PendingMessagesModifiedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record PendingMessagesModifiedEventData() {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/PermissionCompletedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/PermissionCompletedEvent.java
new file mode 100644
index 000000000..06300a5ae
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/PermissionCompletedEvent.java
@@ -0,0 +1,81 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code permission.completed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class PermissionCompletedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "permission.completed"; }
+
+ @JsonProperty("data")
+ private PermissionCompletedEventData data;
+
+ public PermissionCompletedEventData getData() { return data; }
+ public void setData(PermissionCompletedEventData data) { this.data = data; }
+
+ /** Data payload for {@link PermissionCompletedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record PermissionCompletedEventData(
+ /** Request ID of the resolved permission request; clients should dismiss any UI for this request */
+ @JsonProperty("requestId") String requestId,
+ /** The result of the permission request */
+ @JsonProperty("result") PermissionCompletedEventDataResult result
+ ) {
+
+ /** The result of the permission request */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record PermissionCompletedEventDataResult(
+ /** The outcome of the permission request */
+ @JsonProperty("kind") PermissionCompletedEventDataResultKind kind
+ ) {
+
+ /** The outcome of the permission request */
+ public enum PermissionCompletedEventDataResultKind {
+ /** The {@code approved} variant. */
+ APPROVED("approved"),
+ /** The {@code denied-by-rules} variant. */
+ DENIED_BY_RULES("denied-by-rules"),
+ /** The {@code denied-no-approval-rule-and-could-not-request-from-user} variant. */
+ DENIED_NO_APPROVAL_RULE_AND_COULD_NOT_REQUEST_FROM_USER("denied-no-approval-rule-and-could-not-request-from-user"),
+ /** The {@code denied-interactively-by-user} variant. */
+ DENIED_INTERACTIVELY_BY_USER("denied-interactively-by-user"),
+ /** The {@code denied-by-content-exclusion-policy} variant. */
+ DENIED_BY_CONTENT_EXCLUSION_POLICY("denied-by-content-exclusion-policy"),
+ /** The {@code denied-by-permission-request-hook} variant. */
+ DENIED_BY_PERMISSION_REQUEST_HOOK("denied-by-permission-request-hook");
+
+ private final String value;
+ PermissionCompletedEventDataResultKind(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static PermissionCompletedEventDataResultKind fromValue(String value) {
+ for (PermissionCompletedEventDataResultKind v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown PermissionCompletedEventDataResultKind value: " + value);
+ }
+ }
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/PermissionRequestedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/PermissionRequestedEvent.java
new file mode 100644
index 000000000..83a1967c7
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/PermissionRequestedEvent.java
@@ -0,0 +1,46 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code permission.requested} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class PermissionRequestedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "permission.requested"; }
+
+ @JsonProperty("data")
+ private PermissionRequestedEventData data;
+
+ public PermissionRequestedEventData getData() { return data; }
+ public void setData(PermissionRequestedEventData data) { this.data = data; }
+
+ /** Data payload for {@link PermissionRequestedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record PermissionRequestedEventData(
+ /** Unique identifier for this permission request; used to respond via session.respondToPermission() */
+ @JsonProperty("requestId") String requestId,
+ /** Details of the permission being requested */
+ @JsonProperty("permissionRequest") Object permissionRequest,
+ /** When true, this permission was already resolved by a permissionRequest hook and requires no client action */
+ @JsonProperty("resolvedByHook") Boolean resolvedByHook
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SamplingCompletedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SamplingCompletedEvent.java
new file mode 100644
index 000000000..ae2157509
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SamplingCompletedEvent.java
@@ -0,0 +1,42 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code sampling.completed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SamplingCompletedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "sampling.completed"; }
+
+ @JsonProperty("data")
+ private SamplingCompletedEventData data;
+
+ public SamplingCompletedEventData getData() { return data; }
+ public void setData(SamplingCompletedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SamplingCompletedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SamplingCompletedEventData(
+ /** Request ID of the resolved sampling request; clients should dismiss any UI for this request */
+ @JsonProperty("requestId") String requestId
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SamplingRequestedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SamplingRequestedEvent.java
new file mode 100644
index 000000000..7b92f5faf
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SamplingRequestedEvent.java
@@ -0,0 +1,46 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code sampling.requested} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SamplingRequestedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "sampling.requested"; }
+
+ @JsonProperty("data")
+ private SamplingRequestedEventData data;
+
+ public SamplingRequestedEventData getData() { return data; }
+ public void setData(SamplingRequestedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SamplingRequestedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SamplingRequestedEventData(
+ /** Unique identifier for this sampling request; used to respond via session.respondToSampling() */
+ @JsonProperty("requestId") String requestId,
+ /** Name of the MCP server that initiated the sampling request */
+ @JsonProperty("serverName") String serverName,
+ /** The JSON-RPC request ID from the MCP protocol */
+ @JsonProperty("mcpRequestId") Object mcpRequestId
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionBackgroundTasksChangedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionBackgroundTasksChangedEvent.java
new file mode 100644
index 000000000..fa996cf0e
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionBackgroundTasksChangedEvent.java
@@ -0,0 +1,39 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.background_tasks_changed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionBackgroundTasksChangedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.background_tasks_changed"; }
+
+ @JsonProperty("data")
+ private SessionBackgroundTasksChangedEventData data;
+
+ public SessionBackgroundTasksChangedEventData getData() { return data; }
+ public void setData(SessionBackgroundTasksChangedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionBackgroundTasksChangedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionBackgroundTasksChangedEventData() {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionCompactionCompleteEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionCompactionCompleteEvent.java
new file mode 100644
index 000000000..14728cf20
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionCompactionCompleteEvent.java
@@ -0,0 +1,83 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.compaction_complete} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionCompactionCompleteEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.compaction_complete"; }
+
+ @JsonProperty("data")
+ private SessionCompactionCompleteEventData data;
+
+ public SessionCompactionCompleteEventData getData() { return data; }
+ public void setData(SessionCompactionCompleteEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionCompactionCompleteEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionCompactionCompleteEventData(
+ /** Whether compaction completed successfully */
+ @JsonProperty("success") Boolean success,
+ /** Error message if compaction failed */
+ @JsonProperty("error") String error,
+ /** Total tokens in conversation before compaction */
+ @JsonProperty("preCompactionTokens") Double preCompactionTokens,
+ /** Total tokens in conversation after compaction */
+ @JsonProperty("postCompactionTokens") Double postCompactionTokens,
+ /** Number of messages before compaction */
+ @JsonProperty("preCompactionMessagesLength") Double preCompactionMessagesLength,
+ /** Number of messages removed during compaction */
+ @JsonProperty("messagesRemoved") Double messagesRemoved,
+ /** Number of tokens removed during compaction */
+ @JsonProperty("tokensRemoved") Double tokensRemoved,
+ /** LLM-generated summary of the compacted conversation history */
+ @JsonProperty("summaryContent") String summaryContent,
+ /** Checkpoint snapshot number created for recovery */
+ @JsonProperty("checkpointNumber") Double checkpointNumber,
+ /** File path where the checkpoint was stored */
+ @JsonProperty("checkpointPath") String checkpointPath,
+ /** Token usage breakdown for the compaction LLM call */
+ @JsonProperty("compactionTokensUsed") SessionCompactionCompleteEventDataCompactionTokensUsed compactionTokensUsed,
+ /** GitHub request tracing ID (x-github-request-id header) for the compaction LLM call */
+ @JsonProperty("requestId") String requestId,
+ /** Token count from system message(s) after compaction */
+ @JsonProperty("systemTokens") Double systemTokens,
+ /** Token count from non-system messages (user, assistant, tool) after compaction */
+ @JsonProperty("conversationTokens") Double conversationTokens,
+ /** Token count from tool definitions after compaction */
+ @JsonProperty("toolDefinitionsTokens") Double toolDefinitionsTokens
+ ) {
+
+ /** Token usage breakdown for the compaction LLM call */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionCompactionCompleteEventDataCompactionTokensUsed(
+ /** Input tokens consumed by the compaction LLM call */
+ @JsonProperty("input") Double input,
+ /** Output tokens produced by the compaction LLM call */
+ @JsonProperty("output") Double output,
+ /** Cached input tokens reused in the compaction LLM call */
+ @JsonProperty("cachedInput") Double cachedInput
+ ) {
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionCompactionStartEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionCompactionStartEvent.java
new file mode 100644
index 000000000..2e0fb6d6f
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionCompactionStartEvent.java
@@ -0,0 +1,46 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.compaction_start} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionCompactionStartEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.compaction_start"; }
+
+ @JsonProperty("data")
+ private SessionCompactionStartEventData data;
+
+ public SessionCompactionStartEventData getData() { return data; }
+ public void setData(SessionCompactionStartEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionCompactionStartEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionCompactionStartEventData(
+ /** Token count from system message(s) at compaction start */
+ @JsonProperty("systemTokens") Double systemTokens,
+ /** Token count from non-system messages (user, assistant, tool) at compaction start */
+ @JsonProperty("conversationTokens") Double conversationTokens,
+ /** Token count from tool definitions at compaction start */
+ @JsonProperty("toolDefinitionsTokens") Double toolDefinitionsTokens
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionContextChangedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionContextChangedEvent.java
new file mode 100644
index 000000000..5399860a2
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionContextChangedEvent.java
@@ -0,0 +1,74 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.context_changed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionContextChangedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.context_changed"; }
+
+ @JsonProperty("data")
+ private SessionContextChangedEventData data;
+
+ public SessionContextChangedEventData getData() { return data; }
+ public void setData(SessionContextChangedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionContextChangedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionContextChangedEventData(
+ /** Current working directory path */
+ @JsonProperty("cwd") String cwd,
+ /** Root directory of the git repository, resolved via git rev-parse */
+ @JsonProperty("gitRoot") String gitRoot,
+ /** Repository identifier derived from the git remote URL ("owner/name" for GitHub, "org/project/repo" for Azure DevOps) */
+ @JsonProperty("repository") String repository,
+ /** Hosting platform type of the repository (github or ado) */
+ @JsonProperty("hostType") SessionContextChangedEventDataHostType hostType,
+ /** Current git branch name */
+ @JsonProperty("branch") String branch,
+ /** Head commit of current git branch at session start time */
+ @JsonProperty("headCommit") String headCommit,
+ /** Base commit of current git branch at session start time */
+ @JsonProperty("baseCommit") String baseCommit
+ ) {
+
+ /** Hosting platform type of the repository (github or ado) */
+ public enum SessionContextChangedEventDataHostType {
+ /** The {@code github} variant. */
+ GITHUB("github"),
+ /** The {@code ado} variant. */
+ ADO("ado");
+
+ private final String value;
+ SessionContextChangedEventDataHostType(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SessionContextChangedEventDataHostType fromValue(String value) {
+ for (SessionContextChangedEventDataHostType v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SessionContextChangedEventDataHostType value: " + value);
+ }
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionCustomAgentsUpdatedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionCustomAgentsUpdatedEvent.java
new file mode 100644
index 000000000..0a0c3f761
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionCustomAgentsUpdatedEvent.java
@@ -0,0 +1,69 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.custom_agents_updated} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionCustomAgentsUpdatedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.custom_agents_updated"; }
+
+ @JsonProperty("data")
+ private SessionCustomAgentsUpdatedEventData data;
+
+ public SessionCustomAgentsUpdatedEventData getData() { return data; }
+ public void setData(SessionCustomAgentsUpdatedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionCustomAgentsUpdatedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionCustomAgentsUpdatedEventData(
+ /** Array of loaded custom agent metadata */
+ @JsonProperty("agents") List agents,
+ /** Non-fatal warnings from agent loading */
+ @JsonProperty("warnings") List warnings,
+ /** Fatal errors from agent loading */
+ @JsonProperty("errors") List errors
+ ) {
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionCustomAgentsUpdatedEventDataAgentsItem(
+ /** Unique identifier for the agent */
+ @JsonProperty("id") String id,
+ /** Internal name of the agent */
+ @JsonProperty("name") String name,
+ /** Human-readable display name */
+ @JsonProperty("displayName") String displayName,
+ /** Description of what the agent does */
+ @JsonProperty("description") String description,
+ /** Source location: user, project, inherited, remote, or plugin */
+ @JsonProperty("source") String source,
+ /** List of tool names available to this agent */
+ @JsonProperty("tools") List tools,
+ /** Whether the agent can be selected by the user */
+ @JsonProperty("userInvocable") Boolean userInvocable,
+ /** Model override for this agent, if set */
+ @JsonProperty("model") String model
+ ) {
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionErrorEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionErrorEvent.java
new file mode 100644
index 000000000..33dc68834
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionErrorEvent.java
@@ -0,0 +1,52 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.error} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionErrorEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.error"; }
+
+ @JsonProperty("data")
+ private SessionErrorEventData data;
+
+ public SessionErrorEventData getData() { return data; }
+ public void setData(SessionErrorEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionErrorEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionErrorEventData(
+ /** Category of error (e.g., "authentication", "authorization", "quota", "rate_limit", "context_limit", "query") */
+ @JsonProperty("errorType") String errorType,
+ /** Human-readable error message */
+ @JsonProperty("message") String message,
+ /** Error stack trace, when available */
+ @JsonProperty("stack") String stack,
+ /** HTTP status code from the upstream request, if applicable */
+ @JsonProperty("statusCode") Long statusCode,
+ /** GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs */
+ @JsonProperty("providerCallId") String providerCallId,
+ /** Optional URL associated with this error that the user can open in a browser */
+ @JsonProperty("url") String url
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionEvent.java
new file mode 100644
index 000000000..608b814c5
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionEvent.java
@@ -0,0 +1,215 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import java.time.OffsetDateTime;
+import java.util.UUID;
+import javax.annotation.processing.Generated;
+
+/**
+ * Base class for all generated session events.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = UnknownSessionEvent.class)
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = SessionStartEvent.class, name = "session.start"),
+ @JsonSubTypes.Type(value = SessionResumeEvent.class, name = "session.resume"),
+ @JsonSubTypes.Type(value = SessionRemoteSteerableChangedEvent.class, name = "session.remote_steerable_changed"),
+ @JsonSubTypes.Type(value = SessionErrorEvent.class, name = "session.error"),
+ @JsonSubTypes.Type(value = SessionIdleEvent.class, name = "session.idle"),
+ @JsonSubTypes.Type(value = SessionTitleChangedEvent.class, name = "session.title_changed"),
+ @JsonSubTypes.Type(value = SessionInfoEvent.class, name = "session.info"),
+ @JsonSubTypes.Type(value = SessionWarningEvent.class, name = "session.warning"),
+ @JsonSubTypes.Type(value = SessionModelChangeEvent.class, name = "session.model_change"),
+ @JsonSubTypes.Type(value = SessionModeChangedEvent.class, name = "session.mode_changed"),
+ @JsonSubTypes.Type(value = SessionPlanChangedEvent.class, name = "session.plan_changed"),
+ @JsonSubTypes.Type(value = SessionWorkspaceFileChangedEvent.class, name = "session.workspace_file_changed"),
+ @JsonSubTypes.Type(value = SessionHandoffEvent.class, name = "session.handoff"),
+ @JsonSubTypes.Type(value = SessionTruncationEvent.class, name = "session.truncation"),
+ @JsonSubTypes.Type(value = SessionSnapshotRewindEvent.class, name = "session.snapshot_rewind"),
+ @JsonSubTypes.Type(value = SessionShutdownEvent.class, name = "session.shutdown"),
+ @JsonSubTypes.Type(value = SessionContextChangedEvent.class, name = "session.context_changed"),
+ @JsonSubTypes.Type(value = SessionUsageInfoEvent.class, name = "session.usage_info"),
+ @JsonSubTypes.Type(value = SessionCompactionStartEvent.class, name = "session.compaction_start"),
+ @JsonSubTypes.Type(value = SessionCompactionCompleteEvent.class, name = "session.compaction_complete"),
+ @JsonSubTypes.Type(value = SessionTaskCompleteEvent.class, name = "session.task_complete"),
+ @JsonSubTypes.Type(value = UserMessageEvent.class, name = "user.message"),
+ @JsonSubTypes.Type(value = PendingMessagesModifiedEvent.class, name = "pending_messages.modified"),
+ @JsonSubTypes.Type(value = AssistantTurnStartEvent.class, name = "assistant.turn_start"),
+ @JsonSubTypes.Type(value = AssistantIntentEvent.class, name = "assistant.intent"),
+ @JsonSubTypes.Type(value = AssistantReasoningEvent.class, name = "assistant.reasoning"),
+ @JsonSubTypes.Type(value = AssistantReasoningDeltaEvent.class, name = "assistant.reasoning_delta"),
+ @JsonSubTypes.Type(value = AssistantStreamingDeltaEvent.class, name = "assistant.streaming_delta"),
+ @JsonSubTypes.Type(value = AssistantMessageEvent.class, name = "assistant.message"),
+ @JsonSubTypes.Type(value = AssistantMessageDeltaEvent.class, name = "assistant.message_delta"),
+ @JsonSubTypes.Type(value = AssistantTurnEndEvent.class, name = "assistant.turn_end"),
+ @JsonSubTypes.Type(value = AssistantUsageEvent.class, name = "assistant.usage"),
+ @JsonSubTypes.Type(value = AbortEvent.class, name = "abort"),
+ @JsonSubTypes.Type(value = ToolUserRequestedEvent.class, name = "tool.user_requested"),
+ @JsonSubTypes.Type(value = ToolExecutionStartEvent.class, name = "tool.execution_start"),
+ @JsonSubTypes.Type(value = ToolExecutionPartialResultEvent.class, name = "tool.execution_partial_result"),
+ @JsonSubTypes.Type(value = ToolExecutionProgressEvent.class, name = "tool.execution_progress"),
+ @JsonSubTypes.Type(value = ToolExecutionCompleteEvent.class, name = "tool.execution_complete"),
+ @JsonSubTypes.Type(value = SkillInvokedEvent.class, name = "skill.invoked"),
+ @JsonSubTypes.Type(value = SubagentStartedEvent.class, name = "subagent.started"),
+ @JsonSubTypes.Type(value = SubagentCompletedEvent.class, name = "subagent.completed"),
+ @JsonSubTypes.Type(value = SubagentFailedEvent.class, name = "subagent.failed"),
+ @JsonSubTypes.Type(value = SubagentSelectedEvent.class, name = "subagent.selected"),
+ @JsonSubTypes.Type(value = SubagentDeselectedEvent.class, name = "subagent.deselected"),
+ @JsonSubTypes.Type(value = HookStartEvent.class, name = "hook.start"),
+ @JsonSubTypes.Type(value = HookEndEvent.class, name = "hook.end"),
+ @JsonSubTypes.Type(value = SystemMessageEvent.class, name = "system.message"),
+ @JsonSubTypes.Type(value = SystemNotificationEvent.class, name = "system.notification"),
+ @JsonSubTypes.Type(value = PermissionRequestedEvent.class, name = "permission.requested"),
+ @JsonSubTypes.Type(value = PermissionCompletedEvent.class, name = "permission.completed"),
+ @JsonSubTypes.Type(value = UserInputRequestedEvent.class, name = "user_input.requested"),
+ @JsonSubTypes.Type(value = UserInputCompletedEvent.class, name = "user_input.completed"),
+ @JsonSubTypes.Type(value = ElicitationRequestedEvent.class, name = "elicitation.requested"),
+ @JsonSubTypes.Type(value = ElicitationCompletedEvent.class, name = "elicitation.completed"),
+ @JsonSubTypes.Type(value = SamplingRequestedEvent.class, name = "sampling.requested"),
+ @JsonSubTypes.Type(value = SamplingCompletedEvent.class, name = "sampling.completed"),
+ @JsonSubTypes.Type(value = McpOauthRequiredEvent.class, name = "mcp.oauth_required"),
+ @JsonSubTypes.Type(value = McpOauthCompletedEvent.class, name = "mcp.oauth_completed"),
+ @JsonSubTypes.Type(value = ExternalToolRequestedEvent.class, name = "external_tool.requested"),
+ @JsonSubTypes.Type(value = ExternalToolCompletedEvent.class, name = "external_tool.completed"),
+ @JsonSubTypes.Type(value = CommandQueuedEvent.class, name = "command.queued"),
+ @JsonSubTypes.Type(value = CommandExecuteEvent.class, name = "command.execute"),
+ @JsonSubTypes.Type(value = CommandCompletedEvent.class, name = "command.completed"),
+ @JsonSubTypes.Type(value = CommandsChangedEvent.class, name = "commands.changed"),
+ @JsonSubTypes.Type(value = CapabilitiesChangedEvent.class, name = "capabilities.changed"),
+ @JsonSubTypes.Type(value = ExitPlanModeRequestedEvent.class, name = "exit_plan_mode.requested"),
+ @JsonSubTypes.Type(value = ExitPlanModeCompletedEvent.class, name = "exit_plan_mode.completed"),
+ @JsonSubTypes.Type(value = SessionToolsUpdatedEvent.class, name = "session.tools_updated"),
+ @JsonSubTypes.Type(value = SessionBackgroundTasksChangedEvent.class, name = "session.background_tasks_changed"),
+ @JsonSubTypes.Type(value = SessionSkillsLoadedEvent.class, name = "session.skills_loaded"),
+ @JsonSubTypes.Type(value = SessionCustomAgentsUpdatedEvent.class, name = "session.custom_agents_updated"),
+ @JsonSubTypes.Type(value = SessionMcpServersLoadedEvent.class, name = "session.mcp_servers_loaded"),
+ @JsonSubTypes.Type(value = SessionMcpServerStatusChangedEvent.class, name = "session.mcp_server_status_changed"),
+ @JsonSubTypes.Type(value = SessionExtensionsLoadedEvent.class, name = "session.extensions_loaded")
+})
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public abstract sealed class SessionEvent permits
+ SessionStartEvent,
+ SessionResumeEvent,
+ SessionRemoteSteerableChangedEvent,
+ SessionErrorEvent,
+ SessionIdleEvent,
+ SessionTitleChangedEvent,
+ SessionInfoEvent,
+ SessionWarningEvent,
+ SessionModelChangeEvent,
+ SessionModeChangedEvent,
+ SessionPlanChangedEvent,
+ SessionWorkspaceFileChangedEvent,
+ SessionHandoffEvent,
+ SessionTruncationEvent,
+ SessionSnapshotRewindEvent,
+ SessionShutdownEvent,
+ SessionContextChangedEvent,
+ SessionUsageInfoEvent,
+ SessionCompactionStartEvent,
+ SessionCompactionCompleteEvent,
+ SessionTaskCompleteEvent,
+ UserMessageEvent,
+ PendingMessagesModifiedEvent,
+ AssistantTurnStartEvent,
+ AssistantIntentEvent,
+ AssistantReasoningEvent,
+ AssistantReasoningDeltaEvent,
+ AssistantStreamingDeltaEvent,
+ AssistantMessageEvent,
+ AssistantMessageDeltaEvent,
+ AssistantTurnEndEvent,
+ AssistantUsageEvent,
+ AbortEvent,
+ ToolUserRequestedEvent,
+ ToolExecutionStartEvent,
+ ToolExecutionPartialResultEvent,
+ ToolExecutionProgressEvent,
+ ToolExecutionCompleteEvent,
+ SkillInvokedEvent,
+ SubagentStartedEvent,
+ SubagentCompletedEvent,
+ SubagentFailedEvent,
+ SubagentSelectedEvent,
+ SubagentDeselectedEvent,
+ HookStartEvent,
+ HookEndEvent,
+ SystemMessageEvent,
+ SystemNotificationEvent,
+ PermissionRequestedEvent,
+ PermissionCompletedEvent,
+ UserInputRequestedEvent,
+ UserInputCompletedEvent,
+ ElicitationRequestedEvent,
+ ElicitationCompletedEvent,
+ SamplingRequestedEvent,
+ SamplingCompletedEvent,
+ McpOauthRequiredEvent,
+ McpOauthCompletedEvent,
+ ExternalToolRequestedEvent,
+ ExternalToolCompletedEvent,
+ CommandQueuedEvent,
+ CommandExecuteEvent,
+ CommandCompletedEvent,
+ CommandsChangedEvent,
+ CapabilitiesChangedEvent,
+ ExitPlanModeRequestedEvent,
+ ExitPlanModeCompletedEvent,
+ SessionToolsUpdatedEvent,
+ SessionBackgroundTasksChangedEvent,
+ SessionSkillsLoadedEvent,
+ SessionCustomAgentsUpdatedEvent,
+ SessionMcpServersLoadedEvent,
+ SessionMcpServerStatusChangedEvent,
+ SessionExtensionsLoadedEvent,
+ UnknownSessionEvent {
+
+ /** Unique event identifier (UUID v4), generated when the event is emitted. */
+ @JsonProperty("id")
+ private UUID id;
+
+ /** ISO 8601 timestamp when the event was created. */
+ @JsonProperty("timestamp")
+ private OffsetDateTime timestamp;
+
+ /** ID of the chronologically preceding event in the session. Null for the first event. */
+ @JsonProperty("parentId")
+ private UUID parentId;
+
+ /** When true, the event is transient and not persisted to the session event log on disk. */
+ @JsonProperty("ephemeral")
+ private Boolean ephemeral;
+
+ /**
+ * Returns the event-type discriminator string (e.g., {@code "session.idle"}).
+ *
+ * @return the event type
+ */
+ public abstract String getType();
+
+ public UUID getId() { return id; }
+ public void setId(UUID id) { this.id = id; }
+
+ public OffsetDateTime getTimestamp() { return timestamp; }
+ public void setTimestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; }
+
+ public UUID getParentId() { return parentId; }
+ public void setParentId(UUID parentId) { this.parentId = parentId; }
+
+ public Boolean getEphemeral() { return ephemeral; }
+ public void setEphemeral(Boolean ephemeral) { this.ephemeral = ephemeral; }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionExtensionsLoadedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionExtensionsLoadedEvent.java
new file mode 100644
index 000000000..969851a78
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionExtensionsLoadedEvent.java
@@ -0,0 +1,101 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.extensions_loaded} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionExtensionsLoadedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.extensions_loaded"; }
+
+ @JsonProperty("data")
+ private SessionExtensionsLoadedEventData data;
+
+ public SessionExtensionsLoadedEventData getData() { return data; }
+ public void setData(SessionExtensionsLoadedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionExtensionsLoadedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionExtensionsLoadedEventData(
+ /** Array of discovered extensions and their status */
+ @JsonProperty("extensions") List extensions
+ ) {
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionExtensionsLoadedEventDataExtensionsItem(
+ /** Source-qualified extension ID (e.g., 'project:my-ext', 'user:auth-helper') */
+ @JsonProperty("id") String id,
+ /** Extension name (directory name) */
+ @JsonProperty("name") String name,
+ /** Discovery source */
+ @JsonProperty("source") SessionExtensionsLoadedEventDataExtensionsItemSource source,
+ /** Current status: running, disabled, failed, or starting */
+ @JsonProperty("status") SessionExtensionsLoadedEventDataExtensionsItemStatus status
+ ) {
+
+ /** Discovery source */
+ public enum SessionExtensionsLoadedEventDataExtensionsItemSource {
+ /** The {@code project} variant. */
+ PROJECT("project"),
+ /** The {@code user} variant. */
+ USER("user");
+
+ private final String value;
+ SessionExtensionsLoadedEventDataExtensionsItemSource(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SessionExtensionsLoadedEventDataExtensionsItemSource fromValue(String value) {
+ for (SessionExtensionsLoadedEventDataExtensionsItemSource v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SessionExtensionsLoadedEventDataExtensionsItemSource value: " + value);
+ }
+ }
+
+ /** Current status: running, disabled, failed, or starting */
+ public enum SessionExtensionsLoadedEventDataExtensionsItemStatus {
+ /** The {@code running} variant. */
+ RUNNING("running"),
+ /** The {@code disabled} variant. */
+ DISABLED("disabled"),
+ /** The {@code failed} variant. */
+ FAILED("failed"),
+ /** The {@code starting} variant. */
+ STARTING("starting");
+
+ private final String value;
+ SessionExtensionsLoadedEventDataExtensionsItemStatus(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SessionExtensionsLoadedEventDataExtensionsItemStatus fromValue(String value) {
+ for (SessionExtensionsLoadedEventDataExtensionsItemStatus v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SessionExtensionsLoadedEventDataExtensionsItemStatus value: " + value);
+ }
+ }
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionHandoffEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionHandoffEvent.java
new file mode 100644
index 000000000..431108733
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionHandoffEvent.java
@@ -0,0 +1,88 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.handoff} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionHandoffEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.handoff"; }
+
+ @JsonProperty("data")
+ private SessionHandoffEventData data;
+
+ public SessionHandoffEventData getData() { return data; }
+ public void setData(SessionHandoffEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionHandoffEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionHandoffEventData(
+ /** ISO 8601 timestamp when the handoff occurred */
+ @JsonProperty("handoffTime") OffsetDateTime handoffTime,
+ /** Origin type of the session being handed off */
+ @JsonProperty("sourceType") SessionHandoffEventDataSourceType sourceType,
+ /** Repository context for the handed-off session */
+ @JsonProperty("repository") SessionHandoffEventDataRepository repository,
+ /** Additional context information for the handoff */
+ @JsonProperty("context") String context,
+ /** Summary of the work done in the source session */
+ @JsonProperty("summary") String summary,
+ /** Session ID of the remote session being handed off */
+ @JsonProperty("remoteSessionId") String remoteSessionId,
+ /** GitHub host URL for the source session (e.g., https://github.com or https://tenant.ghe.com) */
+ @JsonProperty("host") String host
+ ) {
+
+ /** Origin type of the session being handed off */
+ public enum SessionHandoffEventDataSourceType {
+ /** The {@code remote} variant. */
+ REMOTE("remote"),
+ /** The {@code local} variant. */
+ LOCAL("local");
+
+ private final String value;
+ SessionHandoffEventDataSourceType(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SessionHandoffEventDataSourceType fromValue(String value) {
+ for (SessionHandoffEventDataSourceType v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SessionHandoffEventDataSourceType value: " + value);
+ }
+ }
+
+ /** Repository context for the handed-off session */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionHandoffEventDataRepository(
+ /** Repository owner (user or organization) */
+ @JsonProperty("owner") String owner,
+ /** Repository name */
+ @JsonProperty("name") String name,
+ /** Git branch name, if applicable */
+ @JsonProperty("branch") String branch
+ ) {
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionIdleEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionIdleEvent.java
new file mode 100644
index 000000000..86376ae7c
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionIdleEvent.java
@@ -0,0 +1,42 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.idle} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionIdleEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.idle"; }
+
+ @JsonProperty("data")
+ private SessionIdleEventData data;
+
+ public SessionIdleEventData getData() { return data; }
+ public void setData(SessionIdleEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionIdleEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionIdleEventData(
+ /** True when the preceding agentic loop was cancelled via abort signal */
+ @JsonProperty("aborted") Boolean aborted
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionInfoEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionInfoEvent.java
new file mode 100644
index 000000000..4dee36ba5
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionInfoEvent.java
@@ -0,0 +1,46 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.info} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionInfoEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.info"; }
+
+ @JsonProperty("data")
+ private SessionInfoEventData data;
+
+ public SessionInfoEventData getData() { return data; }
+ public void setData(SessionInfoEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionInfoEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionInfoEventData(
+ /** Category of informational message (e.g., "notification", "timing", "context_window", "mcp", "snapshot", "configuration", "authentication", "model") */
+ @JsonProperty("infoType") String infoType,
+ /** Human-readable informational message for display in the timeline */
+ @JsonProperty("message") String message,
+ /** Optional URL associated with this message that the user can open in a browser */
+ @JsonProperty("url") String url
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionMcpServerStatusChangedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionMcpServerStatusChangedEvent.java
new file mode 100644
index 000000000..7bf09f7f5
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionMcpServerStatusChangedEvent.java
@@ -0,0 +1,72 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.mcp_server_status_changed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionMcpServerStatusChangedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.mcp_server_status_changed"; }
+
+ @JsonProperty("data")
+ private SessionMcpServerStatusChangedEventData data;
+
+ public SessionMcpServerStatusChangedEventData getData() { return data; }
+ public void setData(SessionMcpServerStatusChangedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionMcpServerStatusChangedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionMcpServerStatusChangedEventData(
+ /** Name of the MCP server whose status changed */
+ @JsonProperty("serverName") String serverName,
+ /** New connection status: connected, failed, needs-auth, pending, disabled, or not_configured */
+ @JsonProperty("status") SessionMcpServerStatusChangedEventDataStatus status
+ ) {
+
+ /** New connection status: connected, failed, needs-auth, pending, disabled, or not_configured */
+ public enum SessionMcpServerStatusChangedEventDataStatus {
+ /** The {@code connected} variant. */
+ CONNECTED("connected"),
+ /** The {@code failed} variant. */
+ FAILED("failed"),
+ /** The {@code needs-auth} variant. */
+ NEEDS_AUTH("needs-auth"),
+ /** The {@code pending} variant. */
+ PENDING("pending"),
+ /** The {@code disabled} variant. */
+ DISABLED("disabled"),
+ /** The {@code not_configured} variant. */
+ NOT_CONFIGURED("not_configured");
+
+ private final String value;
+ SessionMcpServerStatusChangedEventDataStatus(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SessionMcpServerStatusChangedEventDataStatus fromValue(String value) {
+ for (SessionMcpServerStatusChangedEventDataStatus v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SessionMcpServerStatusChangedEventDataStatus value: " + value);
+ }
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionMcpServersLoadedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionMcpServersLoadedEvent.java
new file mode 100644
index 000000000..e6ab5f25d
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionMcpServersLoadedEvent.java
@@ -0,0 +1,85 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.mcp_servers_loaded} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionMcpServersLoadedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.mcp_servers_loaded"; }
+
+ @JsonProperty("data")
+ private SessionMcpServersLoadedEventData data;
+
+ public SessionMcpServersLoadedEventData getData() { return data; }
+ public void setData(SessionMcpServersLoadedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionMcpServersLoadedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionMcpServersLoadedEventData(
+ /** Array of MCP server status summaries */
+ @JsonProperty("servers") List servers
+ ) {
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionMcpServersLoadedEventDataServersItem(
+ /** Server name (config key) */
+ @JsonProperty("name") String name,
+ /** Connection status: connected, failed, needs-auth, pending, disabled, or not_configured */
+ @JsonProperty("status") SessionMcpServersLoadedEventDataServersItemStatus status,
+ /** Configuration source: user, workspace, plugin, or builtin */
+ @JsonProperty("source") String source,
+ /** Error message if the server failed to connect */
+ @JsonProperty("error") String error
+ ) {
+
+ /** Connection status: connected, failed, needs-auth, pending, disabled, or not_configured */
+ public enum SessionMcpServersLoadedEventDataServersItemStatus {
+ /** The {@code connected} variant. */
+ CONNECTED("connected"),
+ /** The {@code failed} variant. */
+ FAILED("failed"),
+ /** The {@code needs-auth} variant. */
+ NEEDS_AUTH("needs-auth"),
+ /** The {@code pending} variant. */
+ PENDING("pending"),
+ /** The {@code disabled} variant. */
+ DISABLED("disabled"),
+ /** The {@code not_configured} variant. */
+ NOT_CONFIGURED("not_configured");
+
+ private final String value;
+ SessionMcpServersLoadedEventDataServersItemStatus(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SessionMcpServersLoadedEventDataServersItemStatus fromValue(String value) {
+ for (SessionMcpServersLoadedEventDataServersItemStatus v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SessionMcpServersLoadedEventDataServersItemStatus value: " + value);
+ }
+ }
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionModeChangedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionModeChangedEvent.java
new file mode 100644
index 000000000..82ae9ff39
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionModeChangedEvent.java
@@ -0,0 +1,44 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.mode_changed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionModeChangedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.mode_changed"; }
+
+ @JsonProperty("data")
+ private SessionModeChangedEventData data;
+
+ public SessionModeChangedEventData getData() { return data; }
+ public void setData(SessionModeChangedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionModeChangedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionModeChangedEventData(
+ /** Agent mode before the change (e.g., "interactive", "plan", "autopilot") */
+ @JsonProperty("previousMode") String previousMode,
+ /** Agent mode after the change (e.g., "interactive", "plan", "autopilot") */
+ @JsonProperty("newMode") String newMode
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionModelChangeEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionModelChangeEvent.java
new file mode 100644
index 000000000..c23c8a5f5
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionModelChangeEvent.java
@@ -0,0 +1,48 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.model_change} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionModelChangeEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.model_change"; }
+
+ @JsonProperty("data")
+ private SessionModelChangeEventData data;
+
+ public SessionModelChangeEventData getData() { return data; }
+ public void setData(SessionModelChangeEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionModelChangeEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionModelChangeEventData(
+ /** Model that was previously selected, if any */
+ @JsonProperty("previousModel") String previousModel,
+ /** Newly selected model identifier */
+ @JsonProperty("newModel") String newModel,
+ /** Reasoning effort level before the model change, if applicable */
+ @JsonProperty("previousReasoningEffort") String previousReasoningEffort,
+ /** Reasoning effort level after the model change, if applicable */
+ @JsonProperty("reasoningEffort") String reasoningEffort
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionPlanChangedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionPlanChangedEvent.java
new file mode 100644
index 000000000..0ea80289a
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionPlanChangedEvent.java
@@ -0,0 +1,64 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.plan_changed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionPlanChangedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.plan_changed"; }
+
+ @JsonProperty("data")
+ private SessionPlanChangedEventData data;
+
+ public SessionPlanChangedEventData getData() { return data; }
+ public void setData(SessionPlanChangedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionPlanChangedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionPlanChangedEventData(
+ /** The type of operation performed on the plan file */
+ @JsonProperty("operation") SessionPlanChangedEventDataOperation operation
+ ) {
+
+ /** The type of operation performed on the plan file */
+ public enum SessionPlanChangedEventDataOperation {
+ /** The {@code create} variant. */
+ CREATE("create"),
+ /** The {@code update} variant. */
+ UPDATE("update"),
+ /** The {@code delete} variant. */
+ DELETE("delete");
+
+ private final String value;
+ SessionPlanChangedEventDataOperation(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SessionPlanChangedEventDataOperation fromValue(String value) {
+ for (SessionPlanChangedEventDataOperation v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SessionPlanChangedEventDataOperation value: " + value);
+ }
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionRemoteSteerableChangedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionRemoteSteerableChangedEvent.java
new file mode 100644
index 000000000..ba752f4c6
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionRemoteSteerableChangedEvent.java
@@ -0,0 +1,42 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.remote_steerable_changed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionRemoteSteerableChangedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.remote_steerable_changed"; }
+
+ @JsonProperty("data")
+ private SessionRemoteSteerableChangedEventData data;
+
+ public SessionRemoteSteerableChangedEventData getData() { return data; }
+ public void setData(SessionRemoteSteerableChangedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionRemoteSteerableChangedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionRemoteSteerableChangedEventData(
+ /** Whether this session now supports remote steering via Mission Control */
+ @JsonProperty("remoteSteerable") Boolean remoteSteerable
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionResumeEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionResumeEvent.java
new file mode 100644
index 000000000..e132a1c9f
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionResumeEvent.java
@@ -0,0 +1,96 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.resume} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionResumeEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.resume"; }
+
+ @JsonProperty("data")
+ private SessionResumeEventData data;
+
+ public SessionResumeEventData getData() { return data; }
+ public void setData(SessionResumeEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionResumeEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionResumeEventData(
+ /** ISO 8601 timestamp when the session was resumed */
+ @JsonProperty("resumeTime") OffsetDateTime resumeTime,
+ /** Total number of persisted events in the session at the time of resume */
+ @JsonProperty("eventCount") Double eventCount,
+ /** Model currently selected at resume time */
+ @JsonProperty("selectedModel") String selectedModel,
+ /** Reasoning effort level used for model calls, if applicable (e.g. "low", "medium", "high", "xhigh") */
+ @JsonProperty("reasoningEffort") String reasoningEffort,
+ /** Updated working directory and git context at resume time */
+ @JsonProperty("context") SessionResumeEventDataContext context,
+ /** Whether the session was already in use by another client at resume time */
+ @JsonProperty("alreadyInUse") Boolean alreadyInUse,
+ /** Whether this session supports remote steering via Mission Control */
+ @JsonProperty("remoteSteerable") Boolean remoteSteerable
+ ) {
+
+ /** Updated working directory and git context at resume time */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionResumeEventDataContext(
+ /** Current working directory path */
+ @JsonProperty("cwd") String cwd,
+ /** Root directory of the git repository, resolved via git rev-parse */
+ @JsonProperty("gitRoot") String gitRoot,
+ /** Repository identifier derived from the git remote URL ("owner/name" for GitHub, "org/project/repo" for Azure DevOps) */
+ @JsonProperty("repository") String repository,
+ /** Hosting platform type of the repository (github or ado) */
+ @JsonProperty("hostType") SessionResumeEventDataContextHostType hostType,
+ /** Current git branch name */
+ @JsonProperty("branch") String branch,
+ /** Head commit of current git branch at session start time */
+ @JsonProperty("headCommit") String headCommit,
+ /** Base commit of current git branch at session start time */
+ @JsonProperty("baseCommit") String baseCommit
+ ) {
+
+ /** Hosting platform type of the repository (github or ado) */
+ public enum SessionResumeEventDataContextHostType {
+ /** The {@code github} variant. */
+ GITHUB("github"),
+ /** The {@code ado} variant. */
+ ADO("ado");
+
+ private final String value;
+ SessionResumeEventDataContextHostType(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SessionResumeEventDataContextHostType fromValue(String value) {
+ for (SessionResumeEventDataContextHostType v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SessionResumeEventDataContextHostType value: " + value);
+ }
+ }
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionShutdownEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionShutdownEvent.java
new file mode 100644
index 000000000..929d7eb79
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionShutdownEvent.java
@@ -0,0 +1,137 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.shutdown} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionShutdownEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.shutdown"; }
+
+ @JsonProperty("data")
+ private SessionShutdownEventData data;
+
+ public SessionShutdownEventData getData() { return data; }
+ public void setData(SessionShutdownEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionShutdownEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionShutdownEventData(
+ /** Whether the session ended normally ("routine") or due to a crash/fatal error ("error") */
+ @JsonProperty("shutdownType") SessionShutdownEventDataShutdownType shutdownType,
+ /** Error description when shutdownType is "error" */
+ @JsonProperty("errorReason") String errorReason,
+ /** Total number of premium API requests used during the session */
+ @JsonProperty("totalPremiumRequests") Double totalPremiumRequests,
+ /** Cumulative time spent in API calls during the session, in milliseconds */
+ @JsonProperty("totalApiDurationMs") Double totalApiDurationMs,
+ /** Unix timestamp (milliseconds) when the session started */
+ @JsonProperty("sessionStartTime") Double sessionStartTime,
+ /** Aggregate code change metrics for the session */
+ @JsonProperty("codeChanges") SessionShutdownEventDataCodeChanges codeChanges,
+ /** Per-model usage breakdown, keyed by model identifier */
+ @JsonProperty("modelMetrics") Map modelMetrics,
+ /** Model that was selected at the time of shutdown */
+ @JsonProperty("currentModel") String currentModel,
+ /** Total tokens in context window at shutdown */
+ @JsonProperty("currentTokens") Double currentTokens,
+ /** System message token count at shutdown */
+ @JsonProperty("systemTokens") Double systemTokens,
+ /** Non-system message token count at shutdown */
+ @JsonProperty("conversationTokens") Double conversationTokens,
+ /** Tool definitions token count at shutdown */
+ @JsonProperty("toolDefinitionsTokens") Double toolDefinitionsTokens
+ ) {
+
+ /** Whether the session ended normally ("routine") or due to a crash/fatal error ("error") */
+ public enum SessionShutdownEventDataShutdownType {
+ /** The {@code routine} variant. */
+ ROUTINE("routine"),
+ /** The {@code error} variant. */
+ ERROR("error");
+
+ private final String value;
+ SessionShutdownEventDataShutdownType(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SessionShutdownEventDataShutdownType fromValue(String value) {
+ for (SessionShutdownEventDataShutdownType v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SessionShutdownEventDataShutdownType value: " + value);
+ }
+ }
+
+ /** Aggregate code change metrics for the session */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionShutdownEventDataCodeChanges(
+ /** Total number of lines added during the session */
+ @JsonProperty("linesAdded") Double linesAdded,
+ /** Total number of lines removed during the session */
+ @JsonProperty("linesRemoved") Double linesRemoved,
+ /** List of file paths that were modified during the session */
+ @JsonProperty("filesModified") List filesModified
+ ) {
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionShutdownEventDataModelMetricsValue(
+ /** Request count and cost metrics */
+ @JsonProperty("requests") SessionShutdownEventDataModelMetricsValueRequests requests,
+ /** Token usage breakdown */
+ @JsonProperty("usage") SessionShutdownEventDataModelMetricsValueUsage usage
+ ) {
+
+ /** Request count and cost metrics */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionShutdownEventDataModelMetricsValueRequests(
+ /** Total number of API requests made to this model */
+ @JsonProperty("count") Double count,
+ /** Cumulative cost multiplier for requests to this model */
+ @JsonProperty("cost") Double cost
+ ) {
+ }
+
+ /** Token usage breakdown */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionShutdownEventDataModelMetricsValueUsage(
+ /** Total input tokens consumed across all requests to this model */
+ @JsonProperty("inputTokens") Double inputTokens,
+ /** Total output tokens produced across all requests to this model */
+ @JsonProperty("outputTokens") Double outputTokens,
+ /** Total tokens read from prompt cache across all requests */
+ @JsonProperty("cacheReadTokens") Double cacheReadTokens,
+ /** Total tokens written to prompt cache across all requests */
+ @JsonProperty("cacheWriteTokens") Double cacheWriteTokens,
+ /** Total reasoning tokens produced across all requests to this model */
+ @JsonProperty("reasoningTokens") Double reasoningTokens
+ ) {
+ }
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionSkillsLoadedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionSkillsLoadedEvent.java
new file mode 100644
index 000000000..e1a2857cd
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionSkillsLoadedEvent.java
@@ -0,0 +1,61 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.skills_loaded} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionSkillsLoadedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.skills_loaded"; }
+
+ @JsonProperty("data")
+ private SessionSkillsLoadedEventData data;
+
+ public SessionSkillsLoadedEventData getData() { return data; }
+ public void setData(SessionSkillsLoadedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionSkillsLoadedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionSkillsLoadedEventData(
+ /** Array of resolved skill metadata */
+ @JsonProperty("skills") List skills
+ ) {
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionSkillsLoadedEventDataSkillsItem(
+ /** Unique identifier for the skill */
+ @JsonProperty("name") String name,
+ /** Description of what the skill does */
+ @JsonProperty("description") String description,
+ /** Source location type of the skill (e.g., project, personal, plugin) */
+ @JsonProperty("source") String source,
+ /** Whether the skill can be invoked by the user as a slash command */
+ @JsonProperty("userInvocable") Boolean userInvocable,
+ /** Whether the skill is currently enabled */
+ @JsonProperty("enabled") Boolean enabled,
+ /** Absolute path to the skill file, if available */
+ @JsonProperty("path") String path
+ ) {
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionSnapshotRewindEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionSnapshotRewindEvent.java
new file mode 100644
index 000000000..8842827fb
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionSnapshotRewindEvent.java
@@ -0,0 +1,44 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.snapshot_rewind} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionSnapshotRewindEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.snapshot_rewind"; }
+
+ @JsonProperty("data")
+ private SessionSnapshotRewindEventData data;
+
+ public SessionSnapshotRewindEventData getData() { return data; }
+ public void setData(SessionSnapshotRewindEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionSnapshotRewindEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionSnapshotRewindEventData(
+ /** Event ID that was rewound to; this event and all after it were removed */
+ @JsonProperty("upToEventId") String upToEventId,
+ /** Number of events that were removed by the rewind */
+ @JsonProperty("eventsRemoved") Double eventsRemoved
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionStartEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionStartEvent.java
new file mode 100644
index 000000000..2db2d3fe7
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionStartEvent.java
@@ -0,0 +1,102 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.start} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionStartEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.start"; }
+
+ @JsonProperty("data")
+ private SessionStartEventData data;
+
+ public SessionStartEventData getData() { return data; }
+ public void setData(SessionStartEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionStartEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionStartEventData(
+ /** Unique identifier for the session */
+ @JsonProperty("sessionId") String sessionId,
+ /** Schema version number for the session event format */
+ @JsonProperty("version") Double version,
+ /** Identifier of the software producing the events (e.g., "copilot-agent") */
+ @JsonProperty("producer") String producer,
+ /** Version string of the Copilot application */
+ @JsonProperty("copilotVersion") String copilotVersion,
+ /** ISO 8601 timestamp when the session was created */
+ @JsonProperty("startTime") OffsetDateTime startTime,
+ /** Model selected at session creation time, if any */
+ @JsonProperty("selectedModel") String selectedModel,
+ /** Reasoning effort level used for model calls, if applicable (e.g. "low", "medium", "high", "xhigh") */
+ @JsonProperty("reasoningEffort") String reasoningEffort,
+ /** Working directory and git context at session start */
+ @JsonProperty("context") SessionStartEventDataContext context,
+ /** Whether the session was already in use by another client at start time */
+ @JsonProperty("alreadyInUse") Boolean alreadyInUse,
+ /** Whether this session supports remote steering via Mission Control */
+ @JsonProperty("remoteSteerable") Boolean remoteSteerable
+ ) {
+
+ /** Working directory and git context at session start */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionStartEventDataContext(
+ /** Current working directory path */
+ @JsonProperty("cwd") String cwd,
+ /** Root directory of the git repository, resolved via git rev-parse */
+ @JsonProperty("gitRoot") String gitRoot,
+ /** Repository identifier derived from the git remote URL ("owner/name" for GitHub, "org/project/repo" for Azure DevOps) */
+ @JsonProperty("repository") String repository,
+ /** Hosting platform type of the repository (github or ado) */
+ @JsonProperty("hostType") SessionStartEventDataContextHostType hostType,
+ /** Current git branch name */
+ @JsonProperty("branch") String branch,
+ /** Head commit of current git branch at session start time */
+ @JsonProperty("headCommit") String headCommit,
+ /** Base commit of current git branch at session start time */
+ @JsonProperty("baseCommit") String baseCommit
+ ) {
+
+ /** Hosting platform type of the repository (github or ado) */
+ public enum SessionStartEventDataContextHostType {
+ /** The {@code github} variant. */
+ GITHUB("github"),
+ /** The {@code ado} variant. */
+ ADO("ado");
+
+ private final String value;
+ SessionStartEventDataContextHostType(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SessionStartEventDataContextHostType fromValue(String value) {
+ for (SessionStartEventDataContextHostType v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SessionStartEventDataContextHostType value: " + value);
+ }
+ }
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionTaskCompleteEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionTaskCompleteEvent.java
new file mode 100644
index 000000000..1af7e699b
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionTaskCompleteEvent.java
@@ -0,0 +1,44 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.task_complete} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionTaskCompleteEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.task_complete"; }
+
+ @JsonProperty("data")
+ private SessionTaskCompleteEventData data;
+
+ public SessionTaskCompleteEventData getData() { return data; }
+ public void setData(SessionTaskCompleteEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionTaskCompleteEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionTaskCompleteEventData(
+ /** Summary of the completed task, provided by the agent */
+ @JsonProperty("summary") String summary,
+ /** Whether the tool call succeeded. False when validation failed (e.g., invalid arguments) */
+ @JsonProperty("success") Boolean success
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionTitleChangedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionTitleChangedEvent.java
new file mode 100644
index 000000000..309330188
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionTitleChangedEvent.java
@@ -0,0 +1,42 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.title_changed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionTitleChangedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.title_changed"; }
+
+ @JsonProperty("data")
+ private SessionTitleChangedEventData data;
+
+ public SessionTitleChangedEventData getData() { return data; }
+ public void setData(SessionTitleChangedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionTitleChangedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionTitleChangedEventData(
+ /** The new display title for the session */
+ @JsonProperty("title") String title
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionToolsUpdatedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionToolsUpdatedEvent.java
new file mode 100644
index 000000000..a3b5313cf
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionToolsUpdatedEvent.java
@@ -0,0 +1,41 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.tools_updated} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionToolsUpdatedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.tools_updated"; }
+
+ @JsonProperty("data")
+ private SessionToolsUpdatedEventData data;
+
+ public SessionToolsUpdatedEventData getData() { return data; }
+ public void setData(SessionToolsUpdatedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionToolsUpdatedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionToolsUpdatedEventData(
+ @JsonProperty("model") String model
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionTruncationEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionTruncationEvent.java
new file mode 100644
index 000000000..103d1d017
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionTruncationEvent.java
@@ -0,0 +1,56 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.truncation} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionTruncationEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.truncation"; }
+
+ @JsonProperty("data")
+ private SessionTruncationEventData data;
+
+ public SessionTruncationEventData getData() { return data; }
+ public void setData(SessionTruncationEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionTruncationEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionTruncationEventData(
+ /** Maximum token count for the model's context window */
+ @JsonProperty("tokenLimit") Double tokenLimit,
+ /** Total tokens in conversation messages before truncation */
+ @JsonProperty("preTruncationTokensInMessages") Double preTruncationTokensInMessages,
+ /** Number of conversation messages before truncation */
+ @JsonProperty("preTruncationMessagesLength") Double preTruncationMessagesLength,
+ /** Total tokens in conversation messages after truncation */
+ @JsonProperty("postTruncationTokensInMessages") Double postTruncationTokensInMessages,
+ /** Number of conversation messages after truncation */
+ @JsonProperty("postTruncationMessagesLength") Double postTruncationMessagesLength,
+ /** Number of tokens removed by truncation */
+ @JsonProperty("tokensRemovedDuringTruncation") Double tokensRemovedDuringTruncation,
+ /** Number of messages removed by truncation */
+ @JsonProperty("messagesRemovedDuringTruncation") Double messagesRemovedDuringTruncation,
+ /** Identifier of the component that performed truncation (e.g., "BasicTruncator") */
+ @JsonProperty("performedBy") String performedBy
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionUsageInfoEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionUsageInfoEvent.java
new file mode 100644
index 000000000..f83c36024
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionUsageInfoEvent.java
@@ -0,0 +1,54 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.usage_info} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionUsageInfoEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.usage_info"; }
+
+ @JsonProperty("data")
+ private SessionUsageInfoEventData data;
+
+ public SessionUsageInfoEventData getData() { return data; }
+ public void setData(SessionUsageInfoEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionUsageInfoEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionUsageInfoEventData(
+ /** Maximum token count for the model's context window */
+ @JsonProperty("tokenLimit") Double tokenLimit,
+ /** Current number of tokens in the context window */
+ @JsonProperty("currentTokens") Double currentTokens,
+ /** Current number of messages in the conversation */
+ @JsonProperty("messagesLength") Double messagesLength,
+ /** Token count from system message(s) */
+ @JsonProperty("systemTokens") Double systemTokens,
+ /** Token count from non-system messages (user, assistant, tool) */
+ @JsonProperty("conversationTokens") Double conversationTokens,
+ /** Token count from tool definitions */
+ @JsonProperty("toolDefinitionsTokens") Double toolDefinitionsTokens,
+ /** Whether this is the first usage_info event emitted in this session */
+ @JsonProperty("isInitial") Boolean isInitial
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionWarningEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionWarningEvent.java
new file mode 100644
index 000000000..1870a26e8
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionWarningEvent.java
@@ -0,0 +1,46 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.warning} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionWarningEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.warning"; }
+
+ @JsonProperty("data")
+ private SessionWarningEventData data;
+
+ public SessionWarningEventData getData() { return data; }
+ public void setData(SessionWarningEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionWarningEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionWarningEventData(
+ /** Category of warning (e.g., "subscription", "policy", "mcp") */
+ @JsonProperty("warningType") String warningType,
+ /** Human-readable warning message for display in the timeline */
+ @JsonProperty("message") String message,
+ /** Optional URL associated with this warning that the user can open in a browser */
+ @JsonProperty("url") String url
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SessionWorkspaceFileChangedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SessionWorkspaceFileChangedEvent.java
new file mode 100644
index 000000000..ea2245adf
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SessionWorkspaceFileChangedEvent.java
@@ -0,0 +1,64 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code session.workspace_file_changed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionWorkspaceFileChangedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "session.workspace_file_changed"; }
+
+ @JsonProperty("data")
+ private SessionWorkspaceFileChangedEventData data;
+
+ public SessionWorkspaceFileChangedEventData getData() { return data; }
+ public void setData(SessionWorkspaceFileChangedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SessionWorkspaceFileChangedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionWorkspaceFileChangedEventData(
+ /** Relative path within the session workspace files directory */
+ @JsonProperty("path") String path,
+ /** Whether the file was newly created or updated */
+ @JsonProperty("operation") SessionWorkspaceFileChangedEventDataOperation operation
+ ) {
+
+ /** Whether the file was newly created or updated */
+ public enum SessionWorkspaceFileChangedEventDataOperation {
+ /** The {@code create} variant. */
+ CREATE("create"),
+ /** The {@code update} variant. */
+ UPDATE("update");
+
+ private final String value;
+ SessionWorkspaceFileChangedEventDataOperation(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SessionWorkspaceFileChangedEventDataOperation fromValue(String value) {
+ for (SessionWorkspaceFileChangedEventDataOperation v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SessionWorkspaceFileChangedEventDataOperation value: " + value);
+ }
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SkillInvokedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SkillInvokedEvent.java
new file mode 100644
index 000000000..e6c696eb0
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SkillInvokedEvent.java
@@ -0,0 +1,55 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code skill.invoked} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SkillInvokedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "skill.invoked"; }
+
+ @JsonProperty("data")
+ private SkillInvokedEventData data;
+
+ public SkillInvokedEventData getData() { return data; }
+ public void setData(SkillInvokedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SkillInvokedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SkillInvokedEventData(
+ /** Name of the invoked skill */
+ @JsonProperty("name") String name,
+ /** File path to the SKILL.md definition */
+ @JsonProperty("path") String path,
+ /** Full content of the skill file, injected into the conversation for the model */
+ @JsonProperty("content") String content,
+ /** Tool names that should be auto-approved when this skill is active */
+ @JsonProperty("allowedTools") List allowedTools,
+ /** Name of the plugin this skill originated from, when applicable */
+ @JsonProperty("pluginName") String pluginName,
+ /** Version of the plugin this skill originated from, when applicable */
+ @JsonProperty("pluginVersion") String pluginVersion,
+ /** Description of the skill from its SKILL.md frontmatter */
+ @JsonProperty("description") String description
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SubagentCompletedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SubagentCompletedEvent.java
new file mode 100644
index 000000000..b2cce20c3
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SubagentCompletedEvent.java
@@ -0,0 +1,54 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code subagent.completed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SubagentCompletedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "subagent.completed"; }
+
+ @JsonProperty("data")
+ private SubagentCompletedEventData data;
+
+ public SubagentCompletedEventData getData() { return data; }
+ public void setData(SubagentCompletedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SubagentCompletedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SubagentCompletedEventData(
+ /** Tool call ID of the parent tool invocation that spawned this sub-agent */
+ @JsonProperty("toolCallId") String toolCallId,
+ /** Internal name of the sub-agent */
+ @JsonProperty("agentName") String agentName,
+ /** Human-readable display name of the sub-agent */
+ @JsonProperty("agentDisplayName") String agentDisplayName,
+ /** Model used by the sub-agent */
+ @JsonProperty("model") String model,
+ /** Total number of tool calls made by the sub-agent */
+ @JsonProperty("totalToolCalls") Double totalToolCalls,
+ /** Total tokens (input + output) consumed by the sub-agent */
+ @JsonProperty("totalTokens") Double totalTokens,
+ /** Wall-clock duration of the sub-agent execution in milliseconds */
+ @JsonProperty("durationMs") Double durationMs
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SubagentDeselectedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SubagentDeselectedEvent.java
new file mode 100644
index 000000000..3db9429db
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SubagentDeselectedEvent.java
@@ -0,0 +1,39 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code subagent.deselected} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SubagentDeselectedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "subagent.deselected"; }
+
+ @JsonProperty("data")
+ private SubagentDeselectedEventData data;
+
+ public SubagentDeselectedEventData getData() { return data; }
+ public void setData(SubagentDeselectedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SubagentDeselectedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SubagentDeselectedEventData() {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SubagentFailedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SubagentFailedEvent.java
new file mode 100644
index 000000000..490532fc3
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SubagentFailedEvent.java
@@ -0,0 +1,56 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code subagent.failed} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SubagentFailedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "subagent.failed"; }
+
+ @JsonProperty("data")
+ private SubagentFailedEventData data;
+
+ public SubagentFailedEventData getData() { return data; }
+ public void setData(SubagentFailedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SubagentFailedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SubagentFailedEventData(
+ /** Tool call ID of the parent tool invocation that spawned this sub-agent */
+ @JsonProperty("toolCallId") String toolCallId,
+ /** Internal name of the sub-agent */
+ @JsonProperty("agentName") String agentName,
+ /** Human-readable display name of the sub-agent */
+ @JsonProperty("agentDisplayName") String agentDisplayName,
+ /** Error message describing why the sub-agent failed */
+ @JsonProperty("error") String error,
+ /** Model used by the sub-agent (if any model calls succeeded before failure) */
+ @JsonProperty("model") String model,
+ /** Total number of tool calls made before the sub-agent failed */
+ @JsonProperty("totalToolCalls") Double totalToolCalls,
+ /** Total tokens (input + output) consumed before the sub-agent failed */
+ @JsonProperty("totalTokens") Double totalTokens,
+ /** Wall-clock duration of the sub-agent execution in milliseconds */
+ @JsonProperty("durationMs") Double durationMs
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SubagentSelectedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SubagentSelectedEvent.java
new file mode 100644
index 000000000..e910bc9c2
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SubagentSelectedEvent.java
@@ -0,0 +1,47 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code subagent.selected} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SubagentSelectedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "subagent.selected"; }
+
+ @JsonProperty("data")
+ private SubagentSelectedEventData data;
+
+ public SubagentSelectedEventData getData() { return data; }
+ public void setData(SubagentSelectedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SubagentSelectedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SubagentSelectedEventData(
+ /** Internal name of the selected custom agent */
+ @JsonProperty("agentName") String agentName,
+ /** Human-readable display name of the selected custom agent */
+ @JsonProperty("agentDisplayName") String agentDisplayName,
+ /** List of tool names available to this agent, or null for all tools */
+ @JsonProperty("tools") List tools
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SubagentStartedEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SubagentStartedEvent.java
new file mode 100644
index 000000000..6e9926bd4
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SubagentStartedEvent.java
@@ -0,0 +1,48 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code subagent.started} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SubagentStartedEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "subagent.started"; }
+
+ @JsonProperty("data")
+ private SubagentStartedEventData data;
+
+ public SubagentStartedEventData getData() { return data; }
+ public void setData(SubagentStartedEventData data) { this.data = data; }
+
+ /** Data payload for {@link SubagentStartedEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SubagentStartedEventData(
+ /** Tool call ID of the parent tool invocation that spawned this sub-agent */
+ @JsonProperty("toolCallId") String toolCallId,
+ /** Internal name of the sub-agent */
+ @JsonProperty("agentName") String agentName,
+ /** Human-readable display name of the sub-agent */
+ @JsonProperty("agentDisplayName") String agentDisplayName,
+ /** Description of what the sub-agent does */
+ @JsonProperty("agentDescription") String agentDescription
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SystemMessageEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SystemMessageEvent.java
new file mode 100644
index 000000000..8df24f3a6
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SystemMessageEvent.java
@@ -0,0 +1,80 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code system.message} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SystemMessageEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "system.message"; }
+
+ @JsonProperty("data")
+ private SystemMessageEventData data;
+
+ public SystemMessageEventData getData() { return data; }
+ public void setData(SystemMessageEventData data) { this.data = data; }
+
+ /** Data payload for {@link SystemMessageEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SystemMessageEventData(
+ /** The system or developer prompt text */
+ @JsonProperty("content") String content,
+ /** Message role: "system" for system prompts, "developer" for developer-injected instructions */
+ @JsonProperty("role") SystemMessageEventDataRole role,
+ /** Optional name identifier for the message source */
+ @JsonProperty("name") String name,
+ /** Metadata about the prompt template and its construction */
+ @JsonProperty("metadata") SystemMessageEventDataMetadata metadata
+ ) {
+
+ /** Message role: "system" for system prompts, "developer" for developer-injected instructions */
+ public enum SystemMessageEventDataRole {
+ /** The {@code system} variant. */
+ SYSTEM("system"),
+ /** The {@code developer} variant. */
+ DEVELOPER("developer");
+
+ private final String value;
+ SystemMessageEventDataRole(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SystemMessageEventDataRole fromValue(String value) {
+ for (SystemMessageEventDataRole v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SystemMessageEventDataRole value: " + value);
+ }
+ }
+
+ /** Metadata about the prompt template and its construction */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SystemMessageEventDataMetadata(
+ /** Version identifier of the prompt template used */
+ @JsonProperty("promptVersion") String promptVersion,
+ /** Template variables used when constructing the prompt */
+ @JsonProperty("variables") Map variables
+ ) {
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/SystemNotificationEvent.java b/src/generated/java/com/github/copilot/sdk/generated/SystemNotificationEvent.java
new file mode 100644
index 000000000..877b3db98
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/SystemNotificationEvent.java
@@ -0,0 +1,44 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code system.notification} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SystemNotificationEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "system.notification"; }
+
+ @JsonProperty("data")
+ private SystemNotificationEventData data;
+
+ public SystemNotificationEventData getData() { return data; }
+ public void setData(SystemNotificationEventData data) { this.data = data; }
+
+ /** Data payload for {@link SystemNotificationEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SystemNotificationEventData(
+ /** The notification text, typically wrapped in XML tags */
+ @JsonProperty("content") String content,
+ /** Structured metadata identifying what triggered this notification */
+ @JsonProperty("kind") Object kind
+ ) {
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/ToolExecutionCompleteEvent.java b/src/generated/java/com/github/copilot/sdk/generated/ToolExecutionCompleteEvent.java
new file mode 100644
index 000000000..41ca020ff
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/ToolExecutionCompleteEvent.java
@@ -0,0 +1,84 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: session-events.schema.json
+
+package com.github.copilot.sdk.generated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+
+/**
+ * The {@code tool.execution_complete} session event.
+ *
+ * @since 1.0.0
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class ToolExecutionCompleteEvent extends SessionEvent {
+
+ @Override
+ public String getType() { return "tool.execution_complete"; }
+
+ @JsonProperty("data")
+ private ToolExecutionCompleteEventData data;
+
+ public ToolExecutionCompleteEventData getData() { return data; }
+ public void setData(ToolExecutionCompleteEventData data) { this.data = data; }
+
+ /** Data payload for {@link ToolExecutionCompleteEvent}. */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record ToolExecutionCompleteEventData(
+ /** Unique identifier for the completed tool call */
+ @JsonProperty("toolCallId") String toolCallId,
+ /** Whether the tool execution completed successfully */
+ @JsonProperty("success") Boolean success,
+ /** Model identifier that generated this tool call */
+ @JsonProperty("model") String model,
+ /** CAPI interaction ID for correlating this tool execution with upstream telemetry */
+ @JsonProperty("interactionId") String interactionId,
+ /** Whether this tool call was explicitly requested by the user rather than the assistant */
+ @JsonProperty("isUserRequested") Boolean isUserRequested,
+ /** Tool execution result on success */
+ @JsonProperty("result") ToolExecutionCompleteEventDataResult result,
+ /** Error details when the tool execution failed */
+ @JsonProperty("error") ToolExecutionCompleteEventDataError error,
+ /** Tool-specific telemetry data (e.g., CodeQL check counts, grep match counts) */
+ @JsonProperty("toolTelemetry") Map toolTelemetry,
+ /** Tool call ID of the parent tool invocation when this event originates from a sub-agent */
+ @JsonProperty("parentToolCallId") String parentToolCallId
+ ) {
+
+ /** Tool execution result on success */
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record ToolExecutionCompleteEventDataResult(
+ /** Concise tool result text sent to the LLM for chat completion, potentially truncated for token efficiency */
+ @JsonProperty("content") String content,
+ /** Full detailed tool result for UI/timeline display, preserving complete content such as diffs. Falls back to content when absent. */
+ @JsonProperty("detailedContent") String detailedContent,
+ /** Structured content blocks (text, images, audio, resources) returned by the tool in their native format */
+ @JsonProperty("contents") List