From 3e8eb0c322b47896fd49899d2910572834a0eb0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 17:30:52 +0000 Subject: [PATCH 1/3] Bump the java-codegen-deps group in /java/scripts/codegen with 2 updates Bumps the java-codegen-deps group in /java/scripts/codegen with 2 updates: [@github/copilot](https://github.com/github/copilot-cli) and [tsx](https://github.com/privatenumber/tsx). Updates `@github/copilot` from 1.0.49-3 to 1.0.51 - [Release notes](https://github.com/github/copilot-cli/releases) - [Changelog](https://github.com/github/copilot-cli/blob/main/changelog.md) - [Commits](https://github.com/github/copilot-cli/commits/v1.0.51) Updates `tsx` from 4.21.0 to 4.22.3 - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.21.0...v4.22.3) --- updated-dependencies: - dependency-name: "@github/copilot" dependency-version: 1.0.51 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: java-codegen-deps - dependency-name: tsx dependency-version: 4.22.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: java-codegen-deps ... Signed-off-by: dependabot[bot] --- java/scripts/codegen/package-lock.json | 370 ++++++++++++++----------- java/scripts/codegen/package.json | 4 +- 2 files changed, 214 insertions(+), 160 deletions(-) diff --git a/java/scripts/codegen/package-lock.json b/java/scripts/codegen/package-lock.json index c1d610b39..cf2683c5a 100644 --- a/java/scripts/codegen/package-lock.json +++ b/java/scripts/codegen/package-lock.json @@ -6,15 +6,15 @@ "": { "name": "copilot-sdk-java-codegen", "dependencies": { - "@github/copilot": "^1.0.49-1", + "@github/copilot": "^1.0.51", "json-schema": "^0.4.0", - "tsx": "^4.20.6" + "tsx": "^4.22.3" } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz", + "integrity": "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==", "cpu": [ "ppc64" ], @@ -28,9 +28,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.0.tgz", + "integrity": "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==", "cpu": [ "arm" ], @@ -44,9 +44,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.0.tgz", + "integrity": "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==", "cpu": [ "arm64" ], @@ -60,9 +60,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.0.tgz", + "integrity": "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==", "cpu": [ "x64" ], @@ -76,9 +76,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.0.tgz", + "integrity": "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==", "cpu": [ "arm64" ], @@ -92,9 +92,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.0.tgz", + "integrity": "sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==", "cpu": [ "x64" ], @@ -108,9 +108,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.0.tgz", + "integrity": "sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==", "cpu": [ "arm64" ], @@ -124,9 +124,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.0.tgz", + "integrity": "sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==", "cpu": [ "x64" ], @@ -140,9 +140,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.0.tgz", + "integrity": "sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==", "cpu": [ "arm" ], @@ -156,9 +156,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.0.tgz", + "integrity": "sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==", "cpu": [ "arm64" ], @@ -172,9 +172,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.0.tgz", + "integrity": "sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==", "cpu": [ "ia32" ], @@ -188,9 +188,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.0.tgz", + "integrity": "sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==", "cpu": [ "loong64" ], @@ -204,9 +204,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.0.tgz", + "integrity": "sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==", "cpu": [ "mips64el" ], @@ -220,9 +220,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.0.tgz", + "integrity": "sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==", "cpu": [ "ppc64" ], @@ -236,9 +236,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.0.tgz", + "integrity": "sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==", "cpu": [ "riscv64" ], @@ -252,9 +252,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.0.tgz", + "integrity": "sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==", "cpu": [ "s390x" ], @@ -268,9 +268,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.0.tgz", + "integrity": "sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==", "cpu": [ "x64" ], @@ -284,9 +284,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.0.tgz", + "integrity": "sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==", "cpu": [ "arm64" ], @@ -300,9 +300,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.0.tgz", + "integrity": "sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==", "cpu": [ "x64" ], @@ -316,9 +316,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.0.tgz", + "integrity": "sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==", "cpu": [ "arm64" ], @@ -332,9 +332,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.0.tgz", + "integrity": "sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==", "cpu": [ "x64" ], @@ -348,9 +348,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.0.tgz", + "integrity": "sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==", "cpu": [ "arm64" ], @@ -364,9 +364,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.0.tgz", + "integrity": "sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==", "cpu": [ "x64" ], @@ -380,9 +380,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.0.tgz", + "integrity": "sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==", "cpu": [ "arm64" ], @@ -396,9 +396,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.0.tgz", + "integrity": "sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==", "cpu": [ "ia32" ], @@ -412,9 +412,9 @@ } }, "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==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.0.tgz", + "integrity": "sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==", "cpu": [ "x64" ], @@ -428,28 +428,31 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.49-3", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.49-3.tgz", - "integrity": "sha512-MoaUolkTfeDTeUpKjzLNZLyykdJmhW7xNEzSmM+zz9erZE0St1ACFz3TigJMM05r4L1cPR6j1TY37XfPExqdyg==", + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.51.tgz", + "integrity": "sha512-yKXbMeApxO8P68/BeSS/lmIRsCprcMdY8MRRp+Vp/QymCv59o4lxDcAIVq2h/CD8vJHoiG4OijdWydd76yoqLw==", "license": "SEE LICENSE IN LICENSE.md", + "dependencies": { + "detect-libc": "^2.1.2" + }, "bin": { "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.49-3", - "@github/copilot-darwin-x64": "1.0.49-3", - "@github/copilot-linux-arm64": "1.0.49-3", - "@github/copilot-linux-x64": "1.0.49-3", - "@github/copilot-linuxmusl-arm64": "1.0.49-3", - "@github/copilot-linuxmusl-x64": "1.0.49-3", - "@github/copilot-win32-arm64": "1.0.49-3", - "@github/copilot-win32-x64": "1.0.49-3" + "@github/copilot-darwin-arm64": "1.0.51", + "@github/copilot-darwin-x64": "1.0.51", + "@github/copilot-linux-arm64": "1.0.51", + "@github/copilot-linux-x64": "1.0.51", + "@github/copilot-linuxmusl-arm64": "1.0.51", + "@github/copilot-linuxmusl-x64": "1.0.51", + "@github/copilot-win32-arm64": "1.0.51", + "@github/copilot-win32-x64": "1.0.51" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.49-3", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.49-3.tgz", - "integrity": "sha512-z6WpgoT+aro2nuA2zGfpxsMPtGSS3ZNACXERjfBxBzEoVjTMJi8kD1tpHFIPPCcLfaLniIi01Q6rvxMmZC6iKw==", + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.51.tgz", + "integrity": "sha512-i713sW3GzbeLKowGVY6/A97lGkUMJNVdUD0oaUWTWmXX08u+hWsnVKbqL4EQlw7x8xU511X5vkgFMi31DWyCuQ==", "cpu": [ "arm64" ], @@ -463,9 +466,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.49-3", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.49-3.tgz", - "integrity": "sha512-ox9zs0uaFroB5SujopKFMz6/1shs2JsI5eIx4Kb/gugDrwU+Y3VVJJLw+dbEElJjQOCsb33kD9n+MsV1T6dubA==", + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.51.tgz", + "integrity": "sha512-c67SbMznclcHqlJINXBCwudhqRgE5HNaY9fqMQqu954+ezVa6Q/2hwhCU51PNbYLWtZTGgXsgWnrxOg77hh0ug==", "cpu": [ "x64" ], @@ -479,9 +482,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.49-3", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.49-3.tgz", - "integrity": "sha512-1uZaRtTH5H8HcPWKiN7eWJHsmmaW+tq6Eaxdme95Dfup4G9hemZMDHfdTjPXjZ6xykuoVKqWgC6knlk71JTWxQ==", + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.51.tgz", + "integrity": "sha512-MlQeTB4CSPnG2BZTxsPSV5a7rjsqFOzhTCVCNjLeht3ODObWjrIYhtzVF7h/nue9ii96u9RBB0gIAfoBReryTw==", "cpu": [ "arm64" ], @@ -495,9 +498,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.49-3", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.49-3.tgz", - "integrity": "sha512-OebfGDDFFn+KbiEbSHX8TvXRe77JeH1SBJyzle5QRSD/nBqNGEkNClRMGm8M5/cqyke6TbRP2XmmAQAApJmaQA==", + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.51.tgz", + "integrity": "sha512-fniGTwR5KLFfNDjSFbWvZ3Bno+2bXsMdNM0l3dFHwVTHyBqQSXZ3xvEEDadGimCxgKfRDRt1M1FYnUpqhLYf/Q==", "cpu": [ "x64" ], @@ -510,10 +513,83 @@ "copilot-linux-x64": "copilot" } }, + "node_modules/@github/copilot-linuxmusl-arm64": { + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.51.tgz", + "integrity": "sha512-vg9sWZw4u/bqHa7ylF/GZeuznt+k4/Em899C++CTBU4CKhtAaxd2TZDsEV0Ap2DXzP2UFxCn77vZoHyxByMI5A==", + "cpu": [ + "arm64" + ], + "license": "SEE LICENSE IN LICENSE.md", + "optional": true, + "os": [ + "linux" + ], + "bin": { + "copilot-linuxmusl-arm64": "copilot" + } + }, + "node_modules/@github/copilot-linuxmusl-x64": { + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.51.tgz", + "integrity": "sha512-zxXRdzjshHTQd/LDWmOIDXt0T8nvw66ue6cneAXHhLXWzuiv5mqPKnxuHQyvQDt+IBEyq9utuetlKxcAVo+gYw==", + "cpu": [ + "x64" + ], + "license": "SEE LICENSE IN LICENSE.md", + "optional": true, + "os": [ + "linux" + ], + "bin": { + "copilot-linuxmusl-x64": "copilot" + } + }, + "node_modules/@github/copilot-win32-arm64": { + "version": "1.0.51", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.51.tgz", + "integrity": "sha512-/SP8DfOukjllCXavgBNI0qwJa+8hCFRNK7Q3/Q3qzAOvaWUZZkabKSVZfXaGxerTGpGq009Zg3nyIPR0jfm60w==", + "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.51", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.51.tgz", + "integrity": "sha512-ZB5Jr9m4ZR8gFOwXnYGNfdU+bMFeUgj1OCU3x64Tx5GC6Uln/pf8Ue5LHlsBkBq/NuKvkp/g4GARDIHBCKXEnQ==", + "cpu": [ + "x64" + ], + "license": "SEE LICENSE IN LICENSE.md", + "optional": true, + "os": [ + "win32" + ], + "bin": { + "copilot-win32-x64": "copilot.exe" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, "node_modules/esbuild": { - "version": "0.27.7", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", - "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.0.tgz", + "integrity": "sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==", "hasInstallScript": true, "license": "MIT", "bin": { @@ -523,32 +599,32 @@ "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" + "@esbuild/aix-ppc64": "0.28.0", + "@esbuild/android-arm": "0.28.0", + "@esbuild/android-arm64": "0.28.0", + "@esbuild/android-x64": "0.28.0", + "@esbuild/darwin-arm64": "0.28.0", + "@esbuild/darwin-x64": "0.28.0", + "@esbuild/freebsd-arm64": "0.28.0", + "@esbuild/freebsd-x64": "0.28.0", + "@esbuild/linux-arm": "0.28.0", + "@esbuild/linux-arm64": "0.28.0", + "@esbuild/linux-ia32": "0.28.0", + "@esbuild/linux-loong64": "0.28.0", + "@esbuild/linux-mips64el": "0.28.0", + "@esbuild/linux-ppc64": "0.28.0", + "@esbuild/linux-riscv64": "0.28.0", + "@esbuild/linux-s390x": "0.28.0", + "@esbuild/linux-x64": "0.28.0", + "@esbuild/netbsd-arm64": "0.28.0", + "@esbuild/netbsd-x64": "0.28.0", + "@esbuild/openbsd-arm64": "0.28.0", + "@esbuild/openbsd-x64": "0.28.0", + "@esbuild/openharmony-arm64": "0.28.0", + "@esbuild/sunos-x64": "0.28.0", + "@esbuild/win32-arm64": "0.28.0", + "@esbuild/win32-ia32": "0.28.0", + "@esbuild/win32-x64": "0.28.0" } }, "node_modules/fsevents": { @@ -565,41 +641,19 @@ "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==", + "version": "4.22.3", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.22.3.tgz", + "integrity": "sha512-mdoNxBC/cSQObGGVQ5Bpn5i+yv7j68gk3Nfm3wFjcJg3Z0Mix9jzAFfP12prmm5eVGmDKtp0yyArrs0Q+8gZHg==", "license": "MIT", "dependencies": { - "esbuild": "~0.27.0", - "get-tsconfig": "^4.7.5" + "esbuild": "~0.28.0" }, "bin": { "tsx": "dist/cli.mjs" diff --git a/java/scripts/codegen/package.json b/java/scripts/codegen/package.json index 8726bacc1..fe622bf46 100644 --- a/java/scripts/codegen/package.json +++ b/java/scripts/codegen/package.json @@ -7,8 +7,8 @@ "generate:java": "tsx java.ts" }, "dependencies": { - "@github/copilot": "^1.0.49-1", + "@github/copilot": "^1.0.51", "json-schema": "^0.4.0", - "tsx": "^4.20.6" + "tsx": "^4.22.3" } } From cb8a3fd5bcc0882787a469907101ff463527a110 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 17:31:19 +0000 Subject: [PATCH 2/3] Regenerate Java codegen output Auto-committed by java-codegen-check workflow. --- .../sdk/generated/AssistantMessageEvent.java | 2 +- .../AssistantStreamingDeltaEvent.java | 2 +- ...AssistantUsageCopilotUsageTokenDetail.java | 6 +- .../sdk/generated/AssistantUsageEvent.java | 14 +- .../AssistantUsageQuotaSnapshot.java | 6 +- .../AutoModeSwitchRequestedEvent.java | 2 +- ...ompactionCompleteCompactionTokensUsed.java | 10 +- ...tionTokensUsedCopilotUsageTokenDetail.java | 6 +- .../sdk/generated/ModelCallFailureEvent.java | 2 +- .../SessionCompactionCompleteEvent.java | 18 +- .../SessionCompactionStartEvent.java | 6 +- .../sdk/generated/SessionResumeEvent.java | 2 +- .../sdk/generated/SessionShutdownEvent.java | 12 +- .../generated/SessionSnapshotRewindEvent.java | 2 +- .../sdk/generated/SessionStartEvent.java | 2 +- .../sdk/generated/SessionTruncationEvent.java | 14 +- .../sdk/generated/SessionUsageInfoEvent.java | 12 +- .../sdk/generated/ShutdownCodeChanges.java | 4 +- .../ShutdownModelMetricRequests.java | 2 +- .../ShutdownModelMetricTokenDetail.java | 2 +- .../generated/ShutdownModelMetricUsage.java | 10 +- .../sdk/generated/ShutdownTokenDetail.java | 2 +- .../sdk/generated/SubagentCompletedEvent.java | 6 +- .../sdk/generated/SubagentFailedEvent.java | 6 +- .../sdk/generated/UserMessageEvent.java | 2 +- .../sdk/generated/rpc/AbortReason.java | 37 ++++ .../copilot/sdk/generated/rpc/AgentInfo.java | 18 +- .../sdk/generated/rpc/AgentInfoSource.java | 43 +++++ .../sdk/generated/rpc/EventsAgentScope.java | 35 ++++ .../sdk/generated/rpc/EventsCursorStatus.java | 35 ++++ .../sdk/generated/rpc/InstalledPlugin.java | 39 ++++ .../generated/rpc/InstructionsSources.java | 9 +- .../rpc/InstructionsSourcesLocation.java | 4 +- .../rpc/InstructionsSourcesType.java | 4 +- .../rpc/McpExecuteSamplingRequest.java | 24 +++ .../rpc/McpExecuteSamplingResult.java | 24 +++ .../rpc/McpSamplingExecutionAction.java | 37 ++++ .../rpc/McpSetEnvValueModeDetails.java | 35 ++++ .../rpc/MetadataSnapshotCurrentMode.java | 37 ++++ .../rpc/MetadataSnapshotRemoteMetadata.java | 33 ++++ ...adataSnapshotRemoteMetadataRepository.java | 31 ++++ ...etadataSnapshotRemoteMetadataTaskType.java | 35 ++++ .../rpc/OptionsUpdateEnvValueMode.java | 35 ++++ .../rpc/PendingPermissionRequest.java | 29 +++ .../generated/rpc/PermissionLocationType.java | 35 ++++ .../generated/rpc/PermissionPathsConfig.java | 34 ++++ .../sdk/generated/rpc/PermissionRule.java | 29 +++ .../sdk/generated/rpc/PermissionRulesSet.java | 30 ++++ .../generated/rpc/PermissionUrlsConfig.java | 30 ++++ ...igureAdditionalContentExclusionPolicy.java | 30 ++++ ...eAdditionalContentExclusionPolicyRule.java | 31 ++++ ...ionalContentExclusionPolicyRuleSource.java | 27 +++ ...AdditionalContentExclusionPolicyScope.java | 35 ++++ .../rpc/PermissionsModifyRulesScope.java | 35 ++++ .../rpc/PermissionsSetApproveAllSource.java | 39 ++++ .../copilot/sdk/generated/rpc/PingResult.java | 7 +- .../sdk/generated/rpc/QueuePendingItems.java | 29 +++ .../generated/rpc/QueuePendingItemsKind.java | 35 ++++ .../sdk/generated/rpc/ScheduleEntry.java | 38 ++++ .../sdk/generated/rpc/SendAgentMode.java | 39 ++++ .../copilot/sdk/generated/rpc/SendMode.java | 35 ++++ .../sdk/generated/rpc/ServerSessionsApi.java | 170 ++++++++++++++++++ .../sdk/generated/rpc/SessionAbortParams.java | 29 +++ .../sdk/generated/rpc/SessionAbortResult.java | 29 +++ .../sdk/generated/rpc/SessionAuthApi.java | 19 ++ .../rpc/SessionAuthSetCredentialsParams.java | 29 +++ .../rpc/SessionAuthSetCredentialsResult.java | 27 +++ .../sdk/generated/rpc/SessionCommandsApi.java | 40 ++++- .../rpc/SessionCommandsEnqueueParams.java | 29 +++ .../rpc/SessionCommandsEnqueueResult.java | 27 +++ .../rpc/SessionCommandsExecuteParams.java | 31 ++++ .../rpc/SessionCommandsExecuteResult.java | 27 +++ ...nCommandsRespondToQueuedCommandParams.java | 6 +- ...nCommandsRespondToQueuedCommandResult.java | 4 +- .../sdk/generated/rpc/SessionContext.java | 35 ++++ .../generated/rpc/SessionContextHostType.java | 35 ++++ .../sdk/generated/rpc/SessionEventLogApi.java | 87 +++++++++ .../rpc/SessionEventLogReadParams.java | 37 ++++ .../rpc/SessionEventLogReadResult.java | 34 ++++ ...SessionEventLogRegisterInterestParams.java | 29 +++ ...SessionEventLogRegisterInterestResult.java | 27 +++ .../SessionEventLogReleaseInterestParams.java | 29 +++ .../SessionEventLogReleaseInterestResult.java | 27 +++ .../rpc/SessionEventLogTailParams.java | 27 +++ .../rpc/SessionEventLogTailResult.java | 27 +++ .../rpc/SessionFsSqliteQueryResult.java | 4 +- ...ionHistoryAbortManualCompactionParams.java | 27 +++ ...ionHistoryAbortManualCompactionResult.java | 27 +++ .../sdk/generated/rpc/SessionHistoryApi.java | 30 ++++ ...storyCancelBackgroundCompactionParams.java | 27 +++ ...storyCancelBackgroundCompactionResult.java | 27 +++ .../rpc/SessionHistoryCompactResult.java | 4 +- ...ssionHistorySummarizeForHandoffParams.java | 27 +++ ...ssionHistorySummarizeForHandoffResult.java | 27 +++ .../generated/rpc/SessionInstalledPlugin.java | 39 ++++ .../generated/rpc/SessionInstructionsApi.java | 2 + .../sdk/generated/rpc/SessionLogParams.java | 8 +- .../sdk/generated/rpc/SessionLspApi.java | 47 +++++ .../rpc/SessionLspInitializeParams.java | 33 ++++ .../sdk/generated/rpc/SessionMcpApi.java | 55 ++++++ ...ssionMcpCancelSamplingExecutionParams.java | 29 +++ ...ssionMcpCancelSamplingExecutionResult.java | 27 +++ .../rpc/SessionMcpExecuteSamplingParams.java | 35 ++++ .../rpc/SessionMcpExecuteSamplingResult.java | 31 ++++ .../rpc/SessionMcpRemoveGitHubParams.java | 27 +++ .../rpc/SessionMcpRemoveGitHubResult.java | 27 +++ .../rpc/SessionMcpSetEnvValueModeParams.java | 29 +++ .../rpc/SessionMcpSetEnvValueModeResult.java | 27 +++ .../sdk/generated/rpc/SessionMetadata.java | 41 +++++ .../sdk/generated/rpc/SessionMetadataApi.java | 112 ++++++++++++ .../rpc/SessionMetadataContextInfoParams.java | 33 ++++ .../rpc/SessionMetadataContextInfoResult.java | 52 ++++++ .../SessionMetadataIsProcessingParams.java | 27 +++ .../SessionMetadataIsProcessingResult.java | 27 +++ ...nMetadataRecomputeContextTokensParams.java | 29 +++ ...nMetadataRecomputeContextTokensResult.java | 31 ++++ ...sionMetadataRecordContextChangeParams.java | 29 +++ ...sionMetadataRecordContextChangeResult.java | 24 +++ ...sionMetadataSetWorkingDirectoryParams.java | 29 +++ ...sionMetadataSetWorkingDirectoryResult.java | 27 +++ .../rpc/SessionMetadataSnapshotParams.java | 27 +++ .../rpc/SessionMetadataSnapshotResult.java | 77 ++++++++ .../sdk/generated/rpc/SessionModeApi.java | 4 + .../sdk/generated/rpc/SessionModelApi.java | 19 ++ .../rpc/SessionModelGetCurrentResult.java | 6 +- .../SessionModelSetReasoningEffortParams.java | 29 +++ .../SessionModelSetReasoningEffortResult.java | 27 +++ .../sdk/generated/rpc/SessionNameApi.java | 19 ++ .../rpc/SessionNameSetAutoParams.java | 29 +++ .../rpc/SessionNameSetAutoResult.java | 27 +++ .../sdk/generated/rpc/SessionOptionsApi.java | 47 +++++ .../rpc/SessionOptionsUpdateParams.java | 101 +++++++++++ .../rpc/SessionOptionsUpdateResult.java | 27 +++ .../generated/rpc/SessionPermissionsApi.java | 91 +++++++++- .../SessionPermissionsConfigureParams.java | 40 +++++ .../SessionPermissionsConfigureResult.java | 27 +++ ...ermissionsFolderTrustAddTrustedParams.java | 29 +++ ...ermissionsFolderTrustAddTrustedResult.java | 27 +++ .../rpc/SessionPermissionsFolderTrustApi.java | 62 +++++++ ...PermissionsFolderTrustIsTrustedParams.java | 29 +++ ...PermissionsFolderTrustIsTrustedResult.java | 27 +++ ...sHandlePendingPermissionRequestParams.java | 2 +- ...issionsLocationsAddToolApprovalParams.java | 31 ++++ ...issionsLocationsAddToolApprovalResult.java | 27 +++ .../rpc/SessionPermissionsLocationsApi.java | 77 ++++++++ ...essionPermissionsLocationsApplyParams.java | 29 +++ ...essionPermissionsLocationsApplyResult.java | 38 ++++ ...sionPermissionsLocationsResolveParams.java | 29 +++ ...sionPermissionsLocationsResolveResult.java | 29 +++ .../SessionPermissionsModifyRulesParams.java | 36 ++++ .../SessionPermissionsModifyRulesResult.java | 27 +++ ...ionPermissionsNotifyPromptShownParams.java | 29 +++ ...ionPermissionsNotifyPromptShownResult.java | 27 +++ .../rpc/SessionPermissionsPathsAddParams.java | 29 +++ .../rpc/SessionPermissionsPathsAddResult.java | 27 +++ .../rpc/SessionPermissionsPathsApi.java | 102 +++++++++++ ...sIsPathWithinAllowedDirectoriesParams.java | 29 +++ ...sIsPathWithinAllowedDirectoriesResult.java | 27 +++ ...sionsPathsIsPathWithinWorkspaceParams.java | 29 +++ ...sionsPathsIsPathWithinWorkspaceResult.java | 27 +++ .../SessionPermissionsPathsListParams.java | 27 +++ .../SessionPermissionsPathsListResult.java | 30 ++++ ...onPermissionsPathsUpdatePrimaryParams.java | 29 +++ ...onPermissionsPathsUpdatePrimaryResult.java | 27 +++ ...ssionPermissionsPendingRequestsParams.java | 27 +++ ...ssionPermissionsPendingRequestsResult.java | 28 +++ ...SessionPermissionsSetApproveAllParams.java | 6 +- .../SessionPermissionsSetRequiredParams.java | 29 +++ .../SessionPermissionsSetRequiredResult.java | 27 +++ .../rpc/SessionPermissionsUrlsApi.java | 47 +++++ ...missionsUrlsSetUnrestrictedModeParams.java | 29 +++ ...missionsUrlsSetUnrestrictedModeResult.java | 27 +++ .../sdk/generated/rpc/SessionPlanApi.java | 6 + .../sdk/generated/rpc/SessionQueueApi.java | 60 +++++++ .../rpc/SessionQueueClearParams.java | 27 +++ .../rpc/SessionQueuePendingItemsParams.java | 27 +++ .../rpc/SessionQueuePendingItemsResult.java | 30 ++++ .../SessionQueueRemoveMostRecentParams.java | 27 +++ .../SessionQueueRemoveMostRecentResult.java | 27 +++ .../sdk/generated/rpc/SessionRemoteApi.java | 15 ++ ...ionRemoteNotifySteerableChangedParams.java | 29 +++ ...ionRemoteNotifySteerableChangedResult.java | 24 +++ .../copilot/sdk/generated/rpc/SessionRpc.java | 72 +++++++- .../sdk/generated/rpc/SessionScheduleApi.java | 57 ++++++ .../rpc/SessionScheduleListParams.java | 27 +++ .../rpc/SessionScheduleListResult.java | 28 +++ .../rpc/SessionScheduleStopParams.java | 29 +++ .../rpc/SessionScheduleStopResult.java | 27 +++ .../sdk/generated/rpc/SessionSendParams.java | 55 ++++++ .../sdk/generated/rpc/SessionSendResult.java | 27 +++ .../sdk/generated/rpc/SessionShellApi.java | 4 + .../generated/rpc/SessionShutdownParams.java | 31 ++++ .../sdk/generated/rpc/SessionSkillsApi.java | 20 +++ .../rpc/SessionSkillsEnsureLoadedParams.java | 27 +++ .../rpc/SessionSkillsGetInvokedParams.java | 27 +++ .../rpc/SessionSkillsGetInvokedResult.java | 28 +++ .../sdk/generated/rpc/SessionTasksApi.java | 55 ++++++ ...essionTasksGetCurrentPromotableParams.java | 27 +++ ...essionTasksGetCurrentPromotableResult.java | 27 +++ .../rpc/SessionTasksGetProgressParams.java | 29 +++ .../rpc/SessionTasksGetProgressResult.java | 27 +++ ...TasksPromoteCurrentToBackgroundParams.java | 27 +++ ...TasksPromoteCurrentToBackgroundResult.java | 27 +++ .../rpc/SessionTasksRefreshParams.java | 27 +++ .../rpc/SessionTasksRefreshResult.java | 24 +++ .../rpc/SessionTasksWaitForPendingParams.java | 27 +++ .../rpc/SessionTasksWaitForPendingResult.java | 24 +++ .../generated/rpc/SessionTelemetryApi.java | 47 +++++ ...ionTelemetrySetFeatureOverridesParams.java | 30 ++++ .../sdk/generated/rpc/SessionToolsApi.java | 12 ++ ...ssionToolsInitializeAndValidateParams.java | 27 +++ ...ssionToolsInitializeAndValidateResult.java | 24 +++ .../sdk/generated/rpc/SessionUiApi.java | 89 +++++++++ ...onUiHandlePendingAutoModeSwitchParams.java | 31 ++++ ...onUiHandlePendingAutoModeSwitchResult.java | 27 +++ ...sionUiHandlePendingExitPlanModeParams.java | 31 ++++ ...sionUiHandlePendingExitPlanModeResult.java | 27 +++ .../SessionUiHandlePendingSamplingParams.java | 31 ++++ .../SessionUiHandlePendingSamplingResult.java | 27 +++ ...SessionUiHandlePendingUserInputParams.java | 31 ++++ ...SessionUiHandlePendingUserInputResult.java | 27 +++ ...sterDirectAutoModeSwitchHandlerParams.java | 27 +++ ...sterDirectAutoModeSwitchHandlerResult.java | 27 +++ ...sterDirectAutoModeSwitchHandlerParams.java | 29 +++ ...sterDirectAutoModeSwitchHandlerResult.java | 27 +++ .../rpc/SessionUsageGetMetricsResult.java | 9 +- .../rpc/SessionWorkingDirectoryContext.java | 41 +++++ ...essionWorkingDirectoryContextHostType.java | 35 ++++ .../generated/rpc/SessionWorkspacesApi.java | 48 +++++ .../SessionWorkspacesGetWorkspaceResult.java | 31 +--- ...essionWorkspacesListCheckpointsParams.java | 27 +++ ...essionWorkspacesListCheckpointsResult.java | 28 +++ ...SessionWorkspacesReadCheckpointParams.java | 29 +++ ...SessionWorkspacesReadCheckpointResult.java | 27 +++ ...SessionWorkspacesSaveLargePasteParams.java | 29 +++ ...SessionWorkspacesSaveLargePasteResult.java | 39 ++++ .../rpc/SessionsBulkDeleteParams.java | 28 +++ .../rpc/SessionsBulkDeleteResult.java | 28 +++ .../rpc/SessionsCheckInUseParams.java | 28 +++ .../rpc/SessionsCheckInUseResult.java | 28 +++ .../generated/rpc/SessionsCloseParams.java | 27 +++ .../generated/rpc/SessionsCloseResult.java | 24 +++ .../rpc/SessionsEnrichMetadataParams.java | 28 +++ .../rpc/SessionsEnrichMetadataResult.java | 28 +++ .../rpc/SessionsFindByPrefixParams.java | 27 +++ .../rpc/SessionsFindByPrefixResult.java | 27 +++ .../rpc/SessionsFindByTaskIdParams.java | 27 +++ .../rpc/SessionsFindByTaskIdResult.java | 27 +++ .../rpc/SessionsGetEventFilePathParams.java | 27 +++ .../rpc/SessionsGetEventFilePathResult.java | 27 +++ .../rpc/SessionsGetLastForContextParams.java | 27 +++ .../rpc/SessionsGetLastForContextResult.java | 27 +++ ...ionsGetPersistedRemoteSteerableParams.java | 27 +++ ...ionsGetPersistedRemoteSteerableResult.java | 27 +++ .../generated/rpc/SessionsGetSizesResult.java | 28 +++ .../sdk/generated/rpc/SessionsListResult.java | 28 +++ .../SessionsLoadDeferredRepoHooksParams.java | 27 +++ .../SessionsLoadDeferredRepoHooksResult.java | 30 ++++ .../generated/rpc/SessionsPruneOldParams.java | 34 ++++ .../generated/rpc/SessionsPruneOldResult.java | 36 ++++ .../rpc/SessionsReleaseLockParams.java | 27 +++ .../rpc/SessionsReleaseLockResult.java | 24 +++ .../rpc/SessionsReloadPluginHooksParams.java | 29 +++ .../rpc/SessionsReloadPluginHooksResult.java | 24 +++ .../sdk/generated/rpc/SessionsSaveParams.java | 27 +++ .../sdk/generated/rpc/SessionsSaveResult.java | 24 +++ .../SessionsSetAdditionalPluginsParams.java | 28 +++ .../SessionsSetAdditionalPluginsResult.java | 24 +++ .../sdk/generated/rpc/ShutdownType.java | 35 ++++ .../copilot/sdk/generated/rpc/Skill.java | 4 +- .../sdk/generated/rpc/SkillsInvokedSkill.java | 36 ++++ .../rpc/UIAutoModeSwitchResponse.java | 37 ++++ .../generated/rpc/UIExitPlanModeAction.java | 39 ++++ .../generated/rpc/UIExitPlanModeResponse.java | 33 ++++ .../rpc/UIHandlePendingSamplingResponse.java | 24 +++ .../generated/rpc/UIUserInputResponse.java | 29 +++ .../rpc/UsageMetricsCodeChanges.java | 5 +- .../rpc/UsageMetricsModelMetric.java | 2 +- .../rpc/WorkspaceSummaryHostType.java | 35 ++++ .../generated/rpc/WorkspacesCheckpoints.java | 31 ++++ .../WorkspacesWorkspaceDetailsHostType.java | 35 ++++ 281 files changed, 7983 insertions(+), 134 deletions(-) create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/AbortReason.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/AgentInfoSource.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/EventsAgentScope.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/EventsCursorStatus.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstalledPlugin.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpExecuteSamplingRequest.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpExecuteSamplingResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpSamplingExecutionAction.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpSetEnvValueModeDetails.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotCurrentMode.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotRemoteMetadata.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotRemoteMetadataRepository.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotRemoteMetadataTaskType.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/OptionsUpdateEnvValueMode.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/PendingPermissionRequest.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionLocationType.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionPathsConfig.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionRule.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionRulesSet.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionUrlsConfig.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicy.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRule.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyScope.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsModifyRulesScope.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsSetApproveAllSource.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/QueuePendingItems.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/QueuePendingItemsKind.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/ScheduleEntry.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SendAgentMode.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SendMode.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAbortParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAbortResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAuthSetCredentialsParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAuthSetCredentialsResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsEnqueueParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsEnqueueResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsExecuteParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsExecuteResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionContext.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionContextHostType.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogApi.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReadParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReadResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogRegisterInterestParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogRegisterInterestResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReleaseInterestParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReleaseInterestResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogTailParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogTailResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryAbortManualCompactionParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryAbortManualCompactionResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryCancelBackgroundCompactionParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryCancelBackgroundCompactionResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistorySummarizeForHandoffParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistorySummarizeForHandoffResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionInstalledPlugin.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionLspApi.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionLspInitializeParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpCancelSamplingExecutionParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpCancelSamplingExecutionResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpExecuteSamplingParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpExecuteSamplingResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpRemoveGitHubParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpRemoveGitHubResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpSetEnvValueModeParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpSetEnvValueModeResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadata.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataApi.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataContextInfoParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataContextInfoResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataIsProcessingParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataIsProcessingResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecomputeContextTokensParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecomputeContextTokensResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecordContextChangeParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecordContextChangeResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSetWorkingDirectoryParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSetWorkingDirectoryResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSnapshotParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSnapshotResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelSetReasoningEffortParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelSetReasoningEffortResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameSetAutoParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameSetAutoResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionOptionsApi.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionOptionsUpdateParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionOptionsUpdateResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsConfigureParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsConfigureResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustAddTrustedParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustAddTrustedResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustApi.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustIsTrustedParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustIsTrustedResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsAddToolApprovalParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsAddToolApprovalResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsApi.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsApplyParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsApplyResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsResolveParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsResolveResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsModifyRulesParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsModifyRulesResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsNotifyPromptShownParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsNotifyPromptShownResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsAddParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsAddResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsApi.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinAllowedDirectoriesParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinAllowedDirectoriesResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinWorkspaceParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinWorkspaceResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsListParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsListResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsUpdatePrimaryParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsUpdatePrimaryResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPendingRequestsParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPendingRequestsResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetRequiredParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetRequiredResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsUrlsApi.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsUrlsSetUnrestrictedModeParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsUrlsSetUnrestrictedModeResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueApi.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueClearParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueuePendingItemsParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueuePendingItemsResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueRemoveMostRecentParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueRemoveMostRecentResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRemoteNotifySteerableChangedParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRemoteNotifySteerableChangedResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleApi.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleListParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleListResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleStopParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleStopResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSendParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSendResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShutdownParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsEnsureLoadedParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsGetInvokedParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsGetInvokedResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetCurrentPromotableParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetCurrentPromotableResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetProgressParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetProgressResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksPromoteCurrentToBackgroundParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksPromoteCurrentToBackgroundResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksRefreshParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksRefreshResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksWaitForPendingParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksWaitForPendingResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTelemetryApi.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTelemetrySetFeatureOverridesParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionToolsInitializeAndValidateParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionToolsInitializeAndValidateResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingAutoModeSwitchParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingAutoModeSwitchResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingExitPlanModeParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingExitPlanModeResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingSamplingParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingSamplingResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingUserInputParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingUserInputResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiRegisterDirectAutoModeSwitchHandlerParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiRegisterDirectAutoModeSwitchHandlerResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiUnregisterDirectAutoModeSwitchHandlerParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiUnregisterDirectAutoModeSwitchHandlerResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkingDirectoryContext.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkingDirectoryContextHostType.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesListCheckpointsParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesListCheckpointsResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesReadCheckpointParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesReadCheckpointResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesSaveLargePasteParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesSaveLargePasteResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsBulkDeleteParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsBulkDeleteResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCheckInUseParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCheckInUseResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCloseParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCloseResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsEnrichMetadataParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsEnrichMetadataResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByPrefixParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByPrefixResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByTaskIdParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByTaskIdResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetEventFilePathParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetEventFilePathResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetLastForContextParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetLastForContextResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetPersistedRemoteSteerableParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetPersistedRemoteSteerableResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetSizesResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsListResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsLoadDeferredRepoHooksParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsLoadDeferredRepoHooksResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsPruneOldParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsPruneOldResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReleaseLockParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReleaseLockResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReloadPluginHooksParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReloadPluginHooksResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSaveParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSaveResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSetAdditionalPluginsParams.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSetAdditionalPluginsResult.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/ShutdownType.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/SkillsInvokedSkill.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIAutoModeSwitchResponse.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIExitPlanModeAction.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIExitPlanModeResponse.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIHandlePendingSamplingResponse.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIUserInputResponse.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/WorkspaceSummaryHostType.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/WorkspacesCheckpoints.java create mode 100644 java/src/generated/java/com/github/copilot/sdk/generated/rpc/WorkspacesWorkspaceDetailsHostType.java diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/AssistantMessageEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/AssistantMessageEvent.java index 98af7b90a..ab58b24e5 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/AssistantMessageEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/AssistantMessageEvent.java @@ -53,7 +53,7 @@ public record AssistantMessageEventData( /** 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, + @JsonProperty("outputTokens") Long 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 */ diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/AssistantStreamingDeltaEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/AssistantStreamingDeltaEvent.java index 70707a56e..31acae7c6 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/AssistantStreamingDeltaEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/AssistantStreamingDeltaEvent.java @@ -36,7 +36,7 @@ public final class AssistantStreamingDeltaEvent extends SessionEvent { @JsonInclude(JsonInclude.Include.NON_NULL) public record AssistantStreamingDeltaEventData( /** Cumulative total bytes received from the streaming response so far */ - @JsonProperty("totalResponseSizeBytes") Double totalResponseSizeBytes + @JsonProperty("totalResponseSizeBytes") Long totalResponseSizeBytes ) { } } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageCopilotUsageTokenDetail.java b/java/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageCopilotUsageTokenDetail.java index 895f19030..bea7cf162 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageCopilotUsageTokenDetail.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageCopilotUsageTokenDetail.java @@ -22,11 +22,11 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record AssistantUsageCopilotUsageTokenDetail( /** Number of tokens in this billing batch */ - @JsonProperty("batchSize") Double batchSize, + @JsonProperty("batchSize") Long batchSize, /** Cost per batch of tokens */ - @JsonProperty("costPerBatch") Double costPerBatch, + @JsonProperty("costPerBatch") Long costPerBatch, /** Total token count for this entry */ - @JsonProperty("tokenCount") Double tokenCount, + @JsonProperty("tokenCount") Long tokenCount, /** Token category (e.g., "input", "output") */ @JsonProperty("tokenType") String tokenType ) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageEvent.java index d704a862c..7d06ae9a0 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageEvent.java @@ -39,21 +39,21 @@ public record AssistantUsageEventData( /** Model identifier used for this API call */ @JsonProperty("model") String model, /** Number of input tokens consumed */ - @JsonProperty("inputTokens") Double inputTokens, + @JsonProperty("inputTokens") Long inputTokens, /** Number of output tokens produced */ - @JsonProperty("outputTokens") Double outputTokens, + @JsonProperty("outputTokens") Long outputTokens, /** Number of tokens read from prompt cache */ - @JsonProperty("cacheReadTokens") Double cacheReadTokens, + @JsonProperty("cacheReadTokens") Long cacheReadTokens, /** Number of tokens written to prompt cache */ - @JsonProperty("cacheWriteTokens") Double cacheWriteTokens, + @JsonProperty("cacheWriteTokens") Long cacheWriteTokens, /** Number of output tokens used for reasoning (e.g., chain-of-thought) */ - @JsonProperty("reasoningTokens") Double reasoningTokens, + @JsonProperty("reasoningTokens") Long reasoningTokens, /** Model multiplier cost for billing purposes */ @JsonProperty("cost") Double cost, /** Duration of the API call in milliseconds */ - @JsonProperty("duration") Double duration, + @JsonProperty("duration") Long duration, /** Time to first token in milliseconds. Only available for streaming requests */ - @JsonProperty("ttftMs") Double ttftMs, + @JsonProperty("timeToFirstTokenMs") Long timeToFirstTokenMs, /** 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 */ diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageQuotaSnapshot.java b/java/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageQuotaSnapshot.java index 9e5675360..32ed7e45e 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageQuotaSnapshot.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/AssistantUsageQuotaSnapshot.java @@ -25,16 +25,16 @@ public record AssistantUsageQuotaSnapshot( /** Whether the user has an unlimited usage entitlement */ @JsonProperty("isUnlimitedEntitlement") Boolean isUnlimitedEntitlement, /** Total requests allowed by the entitlement */ - @JsonProperty("entitlementRequests") Double entitlementRequests, + @JsonProperty("entitlementRequests") Long entitlementRequests, /** Number of requests already consumed */ - @JsonProperty("usedRequests") Double usedRequests, + @JsonProperty("usedRequests") Long 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) */ + /** Percentage of quota remaining (0 to 100) */ @JsonProperty("remainingPercentage") Double remainingPercentage, /** Date when the quota resets */ @JsonProperty("resetDate") OffsetDateTime resetDate diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/AutoModeSwitchRequestedEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/AutoModeSwitchRequestedEvent.java index b1a768adc..4c68eb746 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/AutoModeSwitchRequestedEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/AutoModeSwitchRequestedEvent.java @@ -40,7 +40,7 @@ public record AutoModeSwitchRequestedEventData( /** The rate limit error code that triggered this request */ @JsonProperty("errorCode") String errorCode, /** Seconds until the rate limit resets, when known. Lets clients render a humanized reset time alongside the prompt. */ - @JsonProperty("retryAfterSeconds") Double retryAfterSeconds + @JsonProperty("retryAfterSeconds") Long retryAfterSeconds ) { } } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/CompactionCompleteCompactionTokensUsed.java b/java/src/generated/java/com/github/copilot/sdk/generated/CompactionCompleteCompactionTokensUsed.java index 440979392..c3469eb7b 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/CompactionCompleteCompactionTokensUsed.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/CompactionCompleteCompactionTokensUsed.java @@ -22,17 +22,17 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record CompactionCompleteCompactionTokensUsed( /** Input tokens consumed by the compaction LLM call */ - @JsonProperty("inputTokens") Double inputTokens, + @JsonProperty("inputTokens") Long inputTokens, /** Output tokens produced by the compaction LLM call */ - @JsonProperty("outputTokens") Double outputTokens, + @JsonProperty("outputTokens") Long outputTokens, /** Cached input tokens reused in the compaction LLM call */ - @JsonProperty("cacheReadTokens") Double cacheReadTokens, + @JsonProperty("cacheReadTokens") Long cacheReadTokens, /** Tokens written to prompt cache in the compaction LLM call */ - @JsonProperty("cacheWriteTokens") Double cacheWriteTokens, + @JsonProperty("cacheWriteTokens") Long cacheWriteTokens, /** Per-request cost and usage data from the CAPI copilot_usage response field */ @JsonProperty("copilotUsage") CompactionCompleteCompactionTokensUsedCopilotUsage copilotUsage, /** Duration of the compaction LLM call in milliseconds */ - @JsonProperty("duration") Double duration, + @JsonProperty("duration") Long duration, /** Model identifier used for the compaction LLM call */ @JsonProperty("model") String model ) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail.java b/java/src/generated/java/com/github/copilot/sdk/generated/CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail.java index 3c7fde8ad..5c368251f 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail.java @@ -22,11 +22,11 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail( /** Number of tokens in this billing batch */ - @JsonProperty("batchSize") Double batchSize, + @JsonProperty("batchSize") Long batchSize, /** Cost per batch of tokens */ - @JsonProperty("costPerBatch") Double costPerBatch, + @JsonProperty("costPerBatch") Long costPerBatch, /** Total token count for this entry */ - @JsonProperty("tokenCount") Double tokenCount, + @JsonProperty("tokenCount") Long tokenCount, /** Token category (e.g., "input", "output") */ @JsonProperty("tokenType") String tokenType ) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/ModelCallFailureEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/ModelCallFailureEvent.java index 33a3f8618..42de2f1f8 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/ModelCallFailureEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/ModelCallFailureEvent.java @@ -46,7 +46,7 @@ public record ModelCallFailureEventData( /** HTTP status code from the failed request */ @JsonProperty("statusCode") Long statusCode, /** Duration of the failed API call in milliseconds */ - @JsonProperty("durationMs") Double durationMs, + @JsonProperty("durationMs") Long durationMs, /** Where the failed model call originated */ @JsonProperty("source") ModelCallFailureSource source, /** Raw provider/runtime error message for restricted telemetry */ diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/SessionCompactionCompleteEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/SessionCompactionCompleteEvent.java index b6a3775e9..c2562b66c 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/SessionCompactionCompleteEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/SessionCompactionCompleteEvent.java @@ -40,19 +40,19 @@ public record SessionCompactionCompleteEventData( /** Error message if compaction failed */ @JsonProperty("error") String error, /** Total tokens in conversation before compaction */ - @JsonProperty("preCompactionTokens") Double preCompactionTokens, + @JsonProperty("preCompactionTokens") Long preCompactionTokens, /** Total tokens in conversation after compaction */ - @JsonProperty("postCompactionTokens") Double postCompactionTokens, + @JsonProperty("postCompactionTokens") Long postCompactionTokens, /** Number of messages before compaction */ - @JsonProperty("preCompactionMessagesLength") Double preCompactionMessagesLength, + @JsonProperty("preCompactionMessagesLength") Long preCompactionMessagesLength, /** Number of messages removed during compaction */ - @JsonProperty("messagesRemoved") Double messagesRemoved, + @JsonProperty("messagesRemoved") Long messagesRemoved, /** Number of tokens removed during compaction */ - @JsonProperty("tokensRemoved") Double tokensRemoved, + @JsonProperty("tokensRemoved") Long tokensRemoved, /** LLM-generated summary of the compacted conversation history */ @JsonProperty("summaryContent") String summaryContent, /** Checkpoint snapshot number created for recovery */ - @JsonProperty("checkpointNumber") Double checkpointNumber, + @JsonProperty("checkpointNumber") Long checkpointNumber, /** File path where the checkpoint was stored */ @JsonProperty("checkpointPath") String checkpointPath, /** Token usage breakdown for the compaction LLM call (aligned with assistant.usage format) */ @@ -60,11 +60,11 @@ public record SessionCompactionCompleteEventData( /** 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, + @JsonProperty("systemTokens") Long systemTokens, /** Token count from non-system messages (user, assistant, tool) after compaction */ - @JsonProperty("conversationTokens") Double conversationTokens, + @JsonProperty("conversationTokens") Long conversationTokens, /** Token count from tool definitions after compaction */ - @JsonProperty("toolDefinitionsTokens") Double toolDefinitionsTokens + @JsonProperty("toolDefinitionsTokens") Long toolDefinitionsTokens ) { } } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/SessionCompactionStartEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/SessionCompactionStartEvent.java index 2ff7ace48..051f83f4c 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/SessionCompactionStartEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/SessionCompactionStartEvent.java @@ -36,11 +36,11 @@ public final class SessionCompactionStartEvent extends SessionEvent { @JsonInclude(JsonInclude.Include.NON_NULL) public record SessionCompactionStartEventData( /** Token count from system message(s) at compaction start */ - @JsonProperty("systemTokens") Double systemTokens, + @JsonProperty("systemTokens") Long systemTokens, /** Token count from non-system messages (user, assistant, tool) at compaction start */ - @JsonProperty("conversationTokens") Double conversationTokens, + @JsonProperty("conversationTokens") Long conversationTokens, /** Token count from tool definitions at compaction start */ - @JsonProperty("toolDefinitionsTokens") Double toolDefinitionsTokens + @JsonProperty("toolDefinitionsTokens") Long toolDefinitionsTokens ) { } } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/SessionResumeEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/SessionResumeEvent.java index 93316117b..a5983fc2a 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/SessionResumeEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/SessionResumeEvent.java @@ -39,7 +39,7 @@ 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, + @JsonProperty("eventCount") Long eventCount, /** Model currently selected at resume time */ @JsonProperty("selectedModel") String selectedModel, /** Reasoning effort level used for model calls, if applicable (e.g. "none", "low", "medium", "high", "xhigh", "max") */ diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/SessionShutdownEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/SessionShutdownEvent.java index 269416994..e9d3c4432 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/SessionShutdownEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/SessionShutdownEvent.java @@ -47,9 +47,9 @@ public record SessionShutdownEventData( /** Session-wide per-token-type accumulated token counts */ @JsonProperty("tokenDetails") Map tokenDetails, /** Cumulative time spent in API calls during the session, in milliseconds */ - @JsonProperty("totalApiDurationMs") Double totalApiDurationMs, + @JsonProperty("totalApiDurationMs") Long totalApiDurationMs, /** Unix timestamp (milliseconds) when the session started */ - @JsonProperty("sessionStartTime") Double sessionStartTime, + @JsonProperty("sessionStartTime") Long sessionStartTime, /** Aggregate code change metrics for the session */ @JsonProperty("codeChanges") ShutdownCodeChanges codeChanges, /** Per-model usage breakdown, keyed by model identifier */ @@ -57,13 +57,13 @@ public record SessionShutdownEventData( /** Model that was selected at the time of shutdown */ @JsonProperty("currentModel") String currentModel, /** Total tokens in context window at shutdown */ - @JsonProperty("currentTokens") Double currentTokens, + @JsonProperty("currentTokens") Long currentTokens, /** System message token count at shutdown */ - @JsonProperty("systemTokens") Double systemTokens, + @JsonProperty("systemTokens") Long systemTokens, /** Non-system message token count at shutdown */ - @JsonProperty("conversationTokens") Double conversationTokens, + @JsonProperty("conversationTokens") Long conversationTokens, /** Tool definitions token count at shutdown */ - @JsonProperty("toolDefinitionsTokens") Double toolDefinitionsTokens + @JsonProperty("toolDefinitionsTokens") Long toolDefinitionsTokens ) { } } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/SessionSnapshotRewindEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/SessionSnapshotRewindEvent.java index 0b564f291..b121fdff3 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/SessionSnapshotRewindEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/SessionSnapshotRewindEvent.java @@ -38,7 +38,7 @@ 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 + @JsonProperty("eventsRemoved") Long eventsRemoved ) { } } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/SessionStartEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/SessionStartEvent.java index d3484b3e1..0143908f5 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/SessionStartEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/SessionStartEvent.java @@ -39,7 +39,7 @@ public record SessionStartEventData( /** Unique identifier for the session */ @JsonProperty("sessionId") String sessionId, /** Schema version number for the session event format */ - @JsonProperty("version") Double version, + @JsonProperty("version") Long version, /** Identifier of the software producing the events (e.g., "copilot-agent") */ @JsonProperty("producer") String producer, /** Version string of the Copilot application */ diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/SessionTruncationEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/SessionTruncationEvent.java index b2ffad48f..60e7134e6 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/SessionTruncationEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/SessionTruncationEvent.java @@ -36,19 +36,19 @@ public final class SessionTruncationEvent extends SessionEvent { @JsonInclude(JsonInclude.Include.NON_NULL) public record SessionTruncationEventData( /** Maximum token count for the model's context window */ - @JsonProperty("tokenLimit") Double tokenLimit, + @JsonProperty("tokenLimit") Long tokenLimit, /** Total tokens in conversation messages before truncation */ - @JsonProperty("preTruncationTokensInMessages") Double preTruncationTokensInMessages, + @JsonProperty("preTruncationTokensInMessages") Long preTruncationTokensInMessages, /** Number of conversation messages before truncation */ - @JsonProperty("preTruncationMessagesLength") Double preTruncationMessagesLength, + @JsonProperty("preTruncationMessagesLength") Long preTruncationMessagesLength, /** Total tokens in conversation messages after truncation */ - @JsonProperty("postTruncationTokensInMessages") Double postTruncationTokensInMessages, + @JsonProperty("postTruncationTokensInMessages") Long postTruncationTokensInMessages, /** Number of conversation messages after truncation */ - @JsonProperty("postTruncationMessagesLength") Double postTruncationMessagesLength, + @JsonProperty("postTruncationMessagesLength") Long postTruncationMessagesLength, /** Number of tokens removed by truncation */ - @JsonProperty("tokensRemovedDuringTruncation") Double tokensRemovedDuringTruncation, + @JsonProperty("tokensRemovedDuringTruncation") Long tokensRemovedDuringTruncation, /** Number of messages removed by truncation */ - @JsonProperty("messagesRemovedDuringTruncation") Double messagesRemovedDuringTruncation, + @JsonProperty("messagesRemovedDuringTruncation") Long messagesRemovedDuringTruncation, /** Identifier of the component that performed truncation (e.g., "BasicTruncator") */ @JsonProperty("performedBy") String performedBy ) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/SessionUsageInfoEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/SessionUsageInfoEvent.java index 7c9c19eaf..84d73703a 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/SessionUsageInfoEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/SessionUsageInfoEvent.java @@ -36,17 +36,17 @@ public final class SessionUsageInfoEvent extends SessionEvent { @JsonInclude(JsonInclude.Include.NON_NULL) public record SessionUsageInfoEventData( /** Maximum token count for the model's context window */ - @JsonProperty("tokenLimit") Double tokenLimit, + @JsonProperty("tokenLimit") Long tokenLimit, /** Current number of tokens in the context window */ - @JsonProperty("currentTokens") Double currentTokens, + @JsonProperty("currentTokens") Long currentTokens, /** Current number of messages in the conversation */ - @JsonProperty("messagesLength") Double messagesLength, + @JsonProperty("messagesLength") Long messagesLength, /** Token count from system message(s) */ - @JsonProperty("systemTokens") Double systemTokens, + @JsonProperty("systemTokens") Long systemTokens, /** Token count from non-system messages (user, assistant, tool) */ - @JsonProperty("conversationTokens") Double conversationTokens, + @JsonProperty("conversationTokens") Long conversationTokens, /** Token count from tool definitions */ - @JsonProperty("toolDefinitionsTokens") Double toolDefinitionsTokens, + @JsonProperty("toolDefinitionsTokens") Long toolDefinitionsTokens, /** Whether this is the first usage_info event emitted in this session */ @JsonProperty("isInitial") Boolean isInitial ) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownCodeChanges.java b/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownCodeChanges.java index 1afb58b69..9512573bd 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownCodeChanges.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownCodeChanges.java @@ -23,9 +23,9 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record ShutdownCodeChanges( /** Total number of lines added during the session */ - @JsonProperty("linesAdded") Double linesAdded, + @JsonProperty("linesAdded") Long linesAdded, /** Total number of lines removed during the session */ - @JsonProperty("linesRemoved") Double linesRemoved, + @JsonProperty("linesRemoved") Long linesRemoved, /** List of file paths that were modified during the session */ @JsonProperty("filesModified") List filesModified ) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownModelMetricRequests.java b/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownModelMetricRequests.java index 1872a6603..901d2a3e7 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownModelMetricRequests.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownModelMetricRequests.java @@ -22,7 +22,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record ShutdownModelMetricRequests( /** Total number of API requests made to this model */ - @JsonProperty("count") Double count, + @JsonProperty("count") Long count, /** Cumulative cost multiplier for requests to this model */ @JsonProperty("cost") Double cost ) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownModelMetricTokenDetail.java b/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownModelMetricTokenDetail.java index 658efe35a..f179898a3 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownModelMetricTokenDetail.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownModelMetricTokenDetail.java @@ -22,6 +22,6 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record ShutdownModelMetricTokenDetail( /** Accumulated token count for this token type */ - @JsonProperty("tokenCount") Double tokenCount + @JsonProperty("tokenCount") Long tokenCount ) { } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownModelMetricUsage.java b/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownModelMetricUsage.java index bd47eaeb5..a2301664b 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownModelMetricUsage.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownModelMetricUsage.java @@ -22,14 +22,14 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record ShutdownModelMetricUsage( /** Total input tokens consumed across all requests to this model */ - @JsonProperty("inputTokens") Double inputTokens, + @JsonProperty("inputTokens") Long inputTokens, /** Total output tokens produced across all requests to this model */ - @JsonProperty("outputTokens") Double outputTokens, + @JsonProperty("outputTokens") Long outputTokens, /** Total tokens read from prompt cache across all requests */ - @JsonProperty("cacheReadTokens") Double cacheReadTokens, + @JsonProperty("cacheReadTokens") Long cacheReadTokens, /** Total tokens written to prompt cache across all requests */ - @JsonProperty("cacheWriteTokens") Double cacheWriteTokens, + @JsonProperty("cacheWriteTokens") Long cacheWriteTokens, /** Total reasoning tokens produced across all requests to this model */ - @JsonProperty("reasoningTokens") Double reasoningTokens + @JsonProperty("reasoningTokens") Long reasoningTokens ) { } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownTokenDetail.java b/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownTokenDetail.java index 6a9b3188a..856e4d2f6 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownTokenDetail.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/ShutdownTokenDetail.java @@ -22,6 +22,6 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record ShutdownTokenDetail( /** Accumulated token count for this token type */ - @JsonProperty("tokenCount") Double tokenCount + @JsonProperty("tokenCount") Long tokenCount ) { } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/SubagentCompletedEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/SubagentCompletedEvent.java index f61235b4a..45bdade9a 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/SubagentCompletedEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/SubagentCompletedEvent.java @@ -44,11 +44,11 @@ public record SubagentCompletedEventData( /** Model used by the sub-agent */ @JsonProperty("model") String model, /** Total number of tool calls made by the sub-agent */ - @JsonProperty("totalToolCalls") Double totalToolCalls, + @JsonProperty("totalToolCalls") Long totalToolCalls, /** Total tokens (input + output) consumed by the sub-agent */ - @JsonProperty("totalTokens") Double totalTokens, + @JsonProperty("totalTokens") Long totalTokens, /** Wall-clock duration of the sub-agent execution in milliseconds */ - @JsonProperty("durationMs") Double durationMs + @JsonProperty("durationMs") Long durationMs ) { } } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/SubagentFailedEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/SubagentFailedEvent.java index 19644eee1..3437e93ba 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/SubagentFailedEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/SubagentFailedEvent.java @@ -46,11 +46,11 @@ public record SubagentFailedEventData( /** 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, + @JsonProperty("totalToolCalls") Long totalToolCalls, /** Total tokens (input + output) consumed before the sub-agent failed */ - @JsonProperty("totalTokens") Double totalTokens, + @JsonProperty("totalTokens") Long totalTokens, /** Wall-clock duration of the sub-agent execution in milliseconds */ - @JsonProperty("durationMs") Double durationMs + @JsonProperty("durationMs") Long durationMs ) { } } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/UserMessageEvent.java b/java/src/generated/java/com/github/copilot/sdk/generated/UserMessageEvent.java index bf30633b0..0e0de5dd2 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/UserMessageEvent.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/UserMessageEvent.java @@ -44,7 +44,7 @@ public record UserMessageEventData( @JsonProperty("attachments") List attachments, /** Normalized document MIME types that were sent natively instead of through tagged_files XML */ @JsonProperty("supportedNativeDocumentMimeTypes") List supportedNativeDocumentMimeTypes, - /** Path-backed native document attachments that stayed on the tagged_files path flow because native upload would exceed the request size limit */ + /** Path-backed native document attachments that stayed on the tagged_files path flow because native upload could not read them or would exceed the request size limit */ @JsonProperty("nativeDocumentPathFallbackPaths") List nativeDocumentPathFallbackPaths, /** Origin of this message, used for timeline filtering (e.g., "skill-pdf" for skill-injected messages that should be hidden from the user) */ @JsonProperty("source") String source, diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/AbortReason.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/AbortReason.java new file mode 100644 index 000000000..0d0302fa4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/AbortReason.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Finite reason code describing why the current turn was aborted + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum AbortReason { + /** The {@code user_initiated} variant. */ + USER_INITIATED("user_initiated"), + /** The {@code remote_command} variant. */ + REMOTE_COMMAND("remote_command"), + /** The {@code user_abort} variant. */ + USER_ABORT("user_abort"); + + private final String value; + AbortReason(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static AbortReason fromValue(String value) { + for (AbortReason v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown AbortReason value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/AgentInfo.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/AgentInfo.java index 66493bce2..df2a24622 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/AgentInfo.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/AgentInfo.java @@ -10,6 +10,8 @@ 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; /** @@ -28,6 +30,20 @@ public record AgentInfo( /** Description of the agent's purpose */ @JsonProperty("description") String description, /** Absolute local file path of the agent definition. Only set for file-based agents loaded from disk; remote agents do not have a path. */ - @JsonProperty("path") String path + @JsonProperty("path") String path, + /** Stable identifier for selection. For most agents this is the same as `name`; for plugin/builtin agents it may differ. Always populated; defaults to `name` when no distinct id was assigned. */ + @JsonProperty("id") String id, + /** Where the agent definition was loaded from */ + @JsonProperty("source") AgentInfoSource source, + /** Whether the agent can be selected directly by the user. Agents marked `false` are subagent-only. */ + @JsonProperty("userInvocable") Boolean userInvocable, + /** Allowed tool names for this agent. Empty array means none; omitted means inherit defaults. */ + @JsonProperty("tools") List tools, + /** Preferred model id for this agent. When omitted, inherits the outer agent's model. */ + @JsonProperty("model") String model, + /** MCP server configurations attached to this agent, keyed by server name. Server config shape mirrors the MCP `mcpServers` schema. */ + @JsonProperty("mcpServers") Map mcpServers, + /** Skill names preloaded into this agent's context. Omitted means none. */ + @JsonProperty("skills") List skills ) { } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/AgentInfoSource.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/AgentInfoSource.java new file mode 100644 index 000000000..699df1787 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/AgentInfoSource.java @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Where the agent definition was loaded from + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum AgentInfoSource { + /** The {@code user} variant. */ + USER("user"), + /** The {@code project} variant. */ + PROJECT("project"), + /** The {@code inherited} variant. */ + INHERITED("inherited"), + /** The {@code remote} variant. */ + REMOTE("remote"), + /** The {@code plugin} variant. */ + PLUGIN("plugin"), + /** The {@code builtin} variant. */ + BUILTIN("builtin"); + + private final String value; + AgentInfoSource(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static AgentInfoSource fromValue(String value) { + for (AgentInfoSource v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown AgentInfoSource value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/EventsAgentScope.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/EventsAgentScope.java new file mode 100644 index 000000000..e748df0d3 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/EventsAgentScope.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Agent-scope filter: 'primary' returns only main-agent events plus events whose type starts with 'subagent.' (matching the typed-subscription default behavior); 'all' returns events from all agents (matching wildcard-subscription behavior). Default is 'all' to preserve wildcard semantics for catch-up callers. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum EventsAgentScope { + /** The {@code primary} variant. */ + PRIMARY("primary"), + /** The {@code all} variant. */ + ALL("all"); + + private final String value; + EventsAgentScope(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static EventsAgentScope fromValue(String value) { + for (EventsAgentScope v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown EventsAgentScope value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/EventsCursorStatus.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/EventsCursorStatus.java new file mode 100644 index 000000000..eb68386ad --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/EventsCursorStatus.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Cursor status: 'ok' means the cursor was applied successfully; 'expired' means the cursor referred to an event that no longer exists in history (e.g. truncated or compacted away) and the read started from the beginning of the remaining history. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum EventsCursorStatus { + /** The {@code ok} variant. */ + OK("ok"), + /** The {@code expired} variant. */ + EXPIRED("expired"); + + private final String value; + EventsCursorStatus(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static EventsCursorStatus fromValue(String value) { + for (EventsCursorStatus v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown EventsCursorStatus value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstalledPlugin.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstalledPlugin.java new file mode 100644 index 000000000..9f48489da --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstalledPlugin.java @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `InstalledPlugin` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record InstalledPlugin( + /** Plugin name */ + @JsonProperty("name") String name, + /** Marketplace the plugin came from (empty string for direct repo installs) */ + @JsonProperty("marketplace") String marketplace, + /** Version installed (if available) */ + @JsonProperty("version") String version, + /** Installation timestamp */ + @JsonProperty("installed_at") String installedAt, + /** Whether the plugin is currently enabled */ + @JsonProperty("enabled") Boolean enabled, + /** Path where the plugin is cached locally */ + @JsonProperty("cache_path") String cachePath, + /** Source for direct repo installs (when marketplace is empty) */ + @JsonProperty("source") Object source +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstructionsSources.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstructionsSources.java index d0a23b337..0cc669e22 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstructionsSources.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstructionsSources.java @@ -10,6 +10,7 @@ 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; /** @@ -33,9 +34,11 @@ public record InstructionsSources( @JsonProperty("type") InstructionsSourcesType type, /** Where this source lives — used for UI grouping */ @JsonProperty("location") InstructionsSourcesLocation location, - /** Glob pattern from frontmatter — when set, this instruction applies only to matching files */ - @JsonProperty("applyTo") String applyTo, + /** Glob pattern(s) from frontmatter — when set, this instruction applies only to matching files */ + @JsonProperty("applyTo") List applyTo, /** Short description (body after frontmatter) for use in instruction tables */ - @JsonProperty("description") String description + @JsonProperty("description") String description, + /** When true, this source starts disabled and must be toggled on by the user */ + @JsonProperty("defaultDisabled") Boolean defaultDisabled ) { } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstructionsSourcesLocation.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstructionsSourcesLocation.java index 01b702cfe..943591213 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstructionsSourcesLocation.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstructionsSourcesLocation.java @@ -21,7 +21,9 @@ public enum InstructionsSourcesLocation { /** The {@code repository} variant. */ REPOSITORY("repository"), /** The {@code working-directory} variant. */ - WORKING_DIRECTORY("working-directory"); + WORKING_DIRECTORY("working-directory"), + /** The {@code plugin} variant. */ + PLUGIN("plugin"); private final String value; InstructionsSourcesLocation(String value) { this.value = value; } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstructionsSourcesType.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstructionsSourcesType.java index 8de131942..b451f40c6 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstructionsSourcesType.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/InstructionsSourcesType.java @@ -27,7 +27,9 @@ public enum InstructionsSourcesType { /** The {@code nested-agents} variant. */ NESTED_AGENTS("nested-agents"), /** The {@code child-instructions} variant. */ - CHILD_INSTRUCTIONS("child-instructions"); + CHILD_INSTRUCTIONS("child-instructions"), + /** The {@code plugin} variant. */ + PLUGIN("plugin"); private final String value; InstructionsSourcesType(String value) { this.value = value; } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpExecuteSamplingRequest.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpExecuteSamplingRequest.java new file mode 100644 index 000000000..9dcf307ea --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpExecuteSamplingRequest.java @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Raw MCP CreateMessageRequest params, as received in the `sampling.requested` event. Treated as opaque at the schema layer; the runtime converts the embedded MCP messages into the OpenAI chat-completion shape internally. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record McpExecuteSamplingRequest() { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpExecuteSamplingResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpExecuteSamplingResult.java new file mode 100644 index 000000000..6524610d0 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpExecuteSamplingResult.java @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * MCP CreateMessageResult payload (with optional 'tools' extension), present when action='success'. Treated as opaque at the schema layer; consumers should construct/consume it per the MCP CreateMessageResult shape. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record McpExecuteSamplingResult() { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpSamplingExecutionAction.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpSamplingExecutionAction.java new file mode 100644 index 000000000..a00f41e82 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpSamplingExecutionAction.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Outcome of the sampling inference. 'success' produced a response; 'failure' encountered an error (including agent-side rejection by content filter or criteria); 'cancelled' the caller cancelled this execution via cancelSamplingExecution. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum McpSamplingExecutionAction { + /** The {@code success} variant. */ + SUCCESS("success"), + /** The {@code failure} variant. */ + FAILURE("failure"), + /** The {@code cancelled} variant. */ + CANCELLED("cancelled"); + + private final String value; + McpSamplingExecutionAction(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static McpSamplingExecutionAction fromValue(String value) { + for (McpSamplingExecutionAction v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown McpSamplingExecutionAction value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpSetEnvValueModeDetails.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpSetEnvValueModeDetails.java new file mode 100644 index 000000000..d62e10c30 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/McpSetEnvValueModeDetails.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * How environment-variable values supplied to MCP servers are resolved. "direct" passes literal string values; "indirect" treats values as references (e.g. names of environment variables on the host) that the runtime resolves before launch. Defaults to the runtime's startup mode; clients that intentionally launch MCP servers with literal values (e.g. CLI prompt mode and ACP) set this to "direct". + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum McpSetEnvValueModeDetails { + /** The {@code direct} variant. */ + DIRECT("direct"), + /** The {@code indirect} variant. */ + INDIRECT("indirect"); + + private final String value; + McpSetEnvValueModeDetails(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static McpSetEnvValueModeDetails fromValue(String value) { + for (McpSetEnvValueModeDetails v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown McpSetEnvValueModeDetails value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotCurrentMode.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotCurrentMode.java new file mode 100644 index 000000000..5d55d1c4b --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotCurrentMode.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * The current agent mode for this session (e.g., 'interactive', 'plan', 'autopilot') + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum MetadataSnapshotCurrentMode { + /** The {@code interactive} variant. */ + INTERACTIVE("interactive"), + /** The {@code plan} variant. */ + PLAN("plan"), + /** The {@code autopilot} variant. */ + AUTOPILOT("autopilot"); + + private final String value; + MetadataSnapshotCurrentMode(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static MetadataSnapshotCurrentMode fromValue(String value) { + for (MetadataSnapshotCurrentMode v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown MetadataSnapshotCurrentMode value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotRemoteMetadata.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotRemoteMetadata.java new file mode 100644 index 000000000..b97a5f12c --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotRemoteMetadata.java @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Remote-session-specific metadata. Populated only when `isRemote` is true. Fields are immutable for the lifetime of the session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record MetadataSnapshotRemoteMetadata( + /** The original resource identifier (task ID or PR node ID), preserved across event-replay reconstructions. Falls back to `sessionId` when absent. */ + @JsonProperty("resourceId") String resourceId, + /** The repository the remote session targets. */ + @JsonProperty("repository") MetadataSnapshotRemoteMetadataRepository repository, + /** The pull request number the remote session is associated with, if any. */ + @JsonProperty("pullRequestNumber") Long pullRequestNumber, + /** Whether the remote task originated from Copilot Coding Agent (cca) or a CLI `--remote` invocation. */ + @JsonProperty("taskType") MetadataSnapshotRemoteMetadataTaskType taskType +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotRemoteMetadataRepository.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotRemoteMetadataRepository.java new file mode 100644 index 000000000..fb6c62e8a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotRemoteMetadataRepository.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * The repository the remote session targets. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record MetadataSnapshotRemoteMetadataRepository( + /** The GitHub owner (user or organization) of the target repository. */ + @JsonProperty("owner") String owner, + /** The GitHub repository name (without owner). */ + @JsonProperty("name") String name, + /** The branch the remote session is operating on. */ + @JsonProperty("branch") String branch +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotRemoteMetadataTaskType.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotRemoteMetadataTaskType.java new file mode 100644 index 000000000..387d39234 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/MetadataSnapshotRemoteMetadataTaskType.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Whether the remote task originated from Copilot Coding Agent (cca) or a CLI `--remote` invocation. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum MetadataSnapshotRemoteMetadataTaskType { + /** The {@code cca} variant. */ + CCA("cca"), + /** The {@code cli} variant. */ + CLI("cli"); + + private final String value; + MetadataSnapshotRemoteMetadataTaskType(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static MetadataSnapshotRemoteMetadataTaskType fromValue(String value) { + for (MetadataSnapshotRemoteMetadataTaskType v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown MetadataSnapshotRemoteMetadataTaskType value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/OptionsUpdateEnvValueMode.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/OptionsUpdateEnvValueMode.java new file mode 100644 index 000000000..f75daae61 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/OptionsUpdateEnvValueMode.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * How env values are passed to MCP servers (`direct` inlines literal values; `indirect` resolves at launch). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum OptionsUpdateEnvValueMode { + /** The {@code direct} variant. */ + DIRECT("direct"), + /** The {@code indirect} variant. */ + INDIRECT("indirect"); + + private final String value; + OptionsUpdateEnvValueMode(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static OptionsUpdateEnvValueMode fromValue(String value) { + for (OptionsUpdateEnvValueMode v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown OptionsUpdateEnvValueMode value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PendingPermissionRequest.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PendingPermissionRequest.java new file mode 100644 index 000000000..acbed841d --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PendingPermissionRequest.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `PendingPermissionRequest` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PendingPermissionRequest( + /** Unique identifier for the pending permission request */ + @JsonProperty("requestId") String requestId, + /** The user-facing permission prompt details (commands, write, read, mcp, url, memory, custom-tool, path, hook) */ + @JsonProperty("request") session-events.schema.json#/definitions/PermissionPromptRequest request +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionLocationType.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionLocationType.java new file mode 100644 index 000000000..c3b368cac --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionLocationType.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Whether the location is a git repo or directory + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum PermissionLocationType { + /** The {@code repo} variant. */ + REPO("repo"), + /** The {@code dir} variant. */ + DIR("dir"); + + private final String value; + PermissionLocationType(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static PermissionLocationType fromValue(String value) { + for (PermissionLocationType v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown PermissionLocationType value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionPathsConfig.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionPathsConfig.java new file mode 100644 index 000000000..1ac49881b --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionPathsConfig.java @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * If specified, replaces the session's path-permission policy. The runtime constructs the appropriate PathManager based on these inputs (rooted at the session's working directory). Omit to leave the current path policy unchanged. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PermissionPathsConfig( + /** If true, the runtime allows access to all paths without prompting. Equivalent to constructing an UnrestrictedPathManager. */ + @JsonProperty("unrestricted") Boolean unrestricted, + /** Additional directories to allow tool access to (in addition to the session's working directory). When `unrestricted` is true, these are still pre-populated on the UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention completion). */ + @JsonProperty("additionalDirectories") List additionalDirectories, + /** Whether to include the system temp directory in the allowed list (defaults to true). Ignored when `unrestricted` is true. */ + @JsonProperty("includeTempDirectory") Boolean includeTempDirectory, + /** Workspace root path (special-cased to be allowed even before the directory exists). Ignored when `unrestricted` is true. */ + @JsonProperty("workspacePath") String workspacePath +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionRule.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionRule.java new file mode 100644 index 000000000..ad8a57d8f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionRule.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `PermissionRule` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PermissionRule( + /** The rule kind, such as Shell or GitHubMCP */ + @JsonProperty("kind") String kind, + /** Argument value matched against the request, or null when the rule kind has no argument (e.g. 'read', 'write', 'memory'). */ + @JsonProperty("argument") String argument +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionRulesSet.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionRulesSet.java new file mode 100644 index 000000000..c29f11ba4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionRulesSet.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * If specified, replaces the session's approved/denied permission rules. Omit to leave the current rules unchanged. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PermissionRulesSet( + /** Rules that auto-approve matching requests */ + @JsonProperty("approved") List approved, + /** Rules that auto-deny matching requests */ + @JsonProperty("denied") List denied +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionUrlsConfig.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionUrlsConfig.java new file mode 100644 index 000000000..46ff5501f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionUrlsConfig.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * If specified, replaces the session's URL-permission policy. The runtime constructs a fresh DefaultUrlManager based on these inputs. Omit to leave the current URL policy unchanged. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PermissionUrlsConfig( + /** If true, the runtime allows access to all URLs without prompting. Initial allow-list is ignored when this is true. */ + @JsonProperty("unrestricted") Boolean unrestricted, + /** Initial list of allowed URL/domain patterns. Patterns may include path components. Ignored when `unrestricted` is true. */ + @JsonProperty("initialAllowed") List initialAllowed +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicy.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicy.java new file mode 100644 index 000000000..2b31068e0 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicy.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Schema for the `PermissionsConfigureAdditionalContentExclusionPolicy` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PermissionsConfigureAdditionalContentExclusionPolicy( + @JsonProperty("rules") List rules, + @JsonProperty("last_updated_at") Object lastUpdatedAt, + /** Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` enumeration. */ + @JsonProperty("scope") PermissionsConfigureAdditionalContentExclusionPolicyScope scope +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRule.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRule.java new file mode 100644 index 000000000..c41050f1b --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRule.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRule` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PermissionsConfigureAdditionalContentExclusionPolicyRule( + @JsonProperty("paths") List paths, + @JsonProperty("ifAnyMatch") List ifAnyMatch, + @JsonProperty("ifNoneMatch") List ifNoneMatch, + /** Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type. */ + @JsonProperty("source") PermissionsConfigureAdditionalContentExclusionPolicyRuleSource source +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.java new file mode 100644 index 000000000..372e341da --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record PermissionsConfigureAdditionalContentExclusionPolicyRuleSource( + @JsonProperty("name") String name, + @JsonProperty("type") String type +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyScope.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyScope.java new file mode 100644 index 000000000..1c378ec62 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyScope.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` enumeration. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum PermissionsConfigureAdditionalContentExclusionPolicyScope { + /** The {@code repo} variant. */ + REPO("repo"), + /** The {@code all} variant. */ + ALL("all"); + + private final String value; + PermissionsConfigureAdditionalContentExclusionPolicyScope(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static PermissionsConfigureAdditionalContentExclusionPolicyScope fromValue(String value) { + for (PermissionsConfigureAdditionalContentExclusionPolicyScope v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown PermissionsConfigureAdditionalContentExclusionPolicyScope value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsModifyRulesScope.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsModifyRulesScope.java new file mode 100644 index 000000000..53dc33391 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsModifyRulesScope.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Whether the change applies to ephemeral session-scoped rules (cleared at session end) or to location-scoped rules persisted via the location-permissions config file. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum PermissionsModifyRulesScope { + /** The {@code session} variant. */ + SESSION("session"), + /** The {@code location} variant. */ + LOCATION("location"); + + private final String value; + PermissionsModifyRulesScope(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static PermissionsModifyRulesScope fromValue(String value) { + for (PermissionsModifyRulesScope v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown PermissionsModifyRulesScope value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsSetApproveAllSource.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsSetApproveAllSource.java new file mode 100644 index 000000000..9e88acc59 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PermissionsSetApproveAllSource.java @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum PermissionsSetApproveAllSource { + /** The {@code cli_flag} variant. */ + CLI_FLAG("cli_flag"), + /** The {@code slash_command} variant. */ + SLASH_COMMAND("slash_command"), + /** The {@code autopilot_confirmation} variant. */ + AUTOPILOT_CONFIRMATION("autopilot_confirmation"), + /** The {@code rpc} variant. */ + RPC("rpc"); + + private final String value; + PermissionsSetApproveAllSource(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static PermissionsSetApproveAllSource fromValue(String value) { + for (PermissionsSetApproveAllSource v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown PermissionsSetApproveAllSource value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PingResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PingResult.java index 299d8f358..b0ed087bd 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PingResult.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PingResult.java @@ -10,10 +10,11 @@ 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; /** - * Server liveness response, including the echoed message, current timestamp, and protocol version. + * Server liveness response, including the echoed message, current server timestamp, and protocol version. * * @since 1.0.0 */ @@ -23,8 +24,8 @@ public record PingResult( /** Echoed message (or default greeting) */ @JsonProperty("message") String message, - /** Server timestamp in milliseconds */ - @JsonProperty("timestamp") Long timestamp, + /** ISO 8601 timestamp when the server handled the ping */ + @JsonProperty("timestamp") OffsetDateTime timestamp, /** Server protocol version number */ @JsonProperty("protocolVersion") Long protocolVersion ) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/QueuePendingItems.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/QueuePendingItems.java new file mode 100644 index 000000000..ccffaed7e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/QueuePendingItems.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `QueuePendingItems` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record QueuePendingItems( + /** Whether this item is a queued user message or a queued slash command / model change */ + @JsonProperty("kind") QueuePendingItemsKind kind, + /** Human-readable text to display for this queue entry in the UI */ + @JsonProperty("displayText") String displayText +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/QueuePendingItemsKind.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/QueuePendingItemsKind.java new file mode 100644 index 000000000..90f9e7f62 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/QueuePendingItemsKind.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Whether this item is a queued user message or a queued slash command / model change + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum QueuePendingItemsKind { + /** The {@code message} variant. */ + MESSAGE("message"), + /** The {@code command} variant. */ + COMMAND("command"); + + private final String value; + QueuePendingItemsKind(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static QueuePendingItemsKind fromValue(String value) { + for (QueuePendingItemsKind v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown QueuePendingItemsKind value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/ScheduleEntry.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/ScheduleEntry.java new file mode 100644 index 000000000..8038341a8 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/ScheduleEntry.java @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Schema for the `ScheduleEntry` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record ScheduleEntry( + /** Sequential id assigned by the runtime within the session. Stable across resumes (rebuilt from the event log). */ + @JsonProperty("id") Long id, + /** Interval between scheduled ticks, in milliseconds. */ + @JsonProperty("intervalMs") Long intervalMs, + /** Prompt text that gets enqueued on every tick. */ + @JsonProperty("prompt") String prompt, + /** Whether the schedule re-arms after each tick (`/every`) or fires once (`/after`). */ + @JsonProperty("recurring") Boolean recurring, + /** Display-only label for the prompt as shown in the UI (e.g. `/skill-name` for a skill-invocation schedule). The actual enqueued prompt is `prompt`. */ + @JsonProperty("displayPrompt") String displayPrompt, + /** ISO 8601 timestamp when the next tick is scheduled to fire. */ + @JsonProperty("nextRunAt") OffsetDateTime nextRunAt +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SendAgentMode.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SendAgentMode.java new file mode 100644 index 000000000..7dee184c9 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SendAgentMode.java @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * The UI mode the agent was in when this message was sent. Defaults to the session's current mode. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum SendAgentMode { + /** The {@code interactive} variant. */ + INTERACTIVE("interactive"), + /** The {@code plan} variant. */ + PLAN("plan"), + /** The {@code autopilot} variant. */ + AUTOPILOT("autopilot"), + /** The {@code shell} variant. */ + SHELL("shell"); + + private final String value; + SendAgentMode(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static SendAgentMode fromValue(String value) { + for (SendAgentMode v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown SendAgentMode value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SendMode.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SendMode.java new file mode 100644 index 000000000..c424caabc --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SendMode.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * How to deliver the message. `enqueue` (default) appends to the message queue. `immediate` interjects during an in-progress turn. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum SendMode { + /** The {@code enqueue} variant. */ + ENQUEUE("enqueue"), + /** The {@code immediate} variant. */ + IMMEDIATE("immediate"); + + private final String value; + SendMode(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static SendMode fromValue(String value) { + for (SendMode v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown SendMode value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/ServerSessionsApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/ServerSessionsApi.java index a78a2fbf5..72a13699c 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/ServerSessionsApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/ServerSessionsApi.java @@ -45,4 +45,174 @@ public CompletableFuture connect() { return caller.invoke("sessions.connect", java.util.Map.of(), SessionsConnectResult.class); } + /** + * Optional metadata-load limit and context filter applied to the returned sessions. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture list() { + return caller.invoke("sessions.list", java.util.Map.of(), SessionsListResult.class); + } + + /** + * GitHub task ID to look up. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture findByTaskId(SessionsFindByTaskIdParams params) { + return caller.invoke("sessions.findByTaskId", params, SessionsFindByTaskIdResult.class); + } + + /** + * UUID prefix to resolve to a unique session ID. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture findByPrefix(SessionsFindByPrefixParams params) { + return caller.invoke("sessions.findByPrefix", params, SessionsFindByPrefixResult.class); + } + + /** + * Optional working-directory context used to score session relevance. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture getLastForContext(SessionsGetLastForContextParams params) { + return caller.invoke("sessions.getLastForContext", params, SessionsGetLastForContextResult.class); + } + + /** + * Session ID whose event-log file path to compute. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture getEventFilePath() { + return caller.invoke("sessions.getEventFilePath", java.util.Map.of(), SessionsGetEventFilePathResult.class); + } + + /** + * Map of sessionId -> on-disk size in bytes for each session's workspace directory. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture getSizes() { + return caller.invoke("sessions.getSizes", java.util.Map.of(), SessionsGetSizesResult.class); + } + + /** + * Session IDs to test for live in-use locks. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture checkInUse(SessionsCheckInUseParams params) { + return caller.invoke("sessions.checkInUse", params, SessionsCheckInUseResult.class); + } + + /** + * Session ID to look up the persisted remote-steerable flag for. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture getPersistedRemoteSteerable() { + return caller.invoke("sessions.getPersistedRemoteSteerable", java.util.Map.of(), SessionsGetPersistedRemoteSteerableResult.class); + } + + /** + * Session ID to close. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture close() { + return caller.invoke("sessions.close", java.util.Map.of(), Void.class); + } + + /** + * Session IDs to close, deactivate, and delete from disk. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture bulkDelete(SessionsBulkDeleteParams params) { + return caller.invoke("sessions.bulkDelete", params, SessionsBulkDeleteResult.class); + } + + /** + * Age threshold and optional flags controlling which old sessions are pruned (or simulated when dryRun is true). + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture pruneOld(SessionsPruneOldParams params) { + return caller.invoke("sessions.pruneOld", params, SessionsPruneOldResult.class); + } + + /** + * Session ID whose pending events should be flushed to disk. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture save() { + return caller.invoke("sessions.save", java.util.Map.of(), Void.class); + } + + /** + * Session ID whose in-use lock should be released. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture releaseLock() { + return caller.invoke("sessions.releaseLock", java.util.Map.of(), Void.class); + } + + /** + * Session metadata records to enrich with summary and context information. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture enrichMetadata(SessionsEnrichMetadataParams params) { + return caller.invoke("sessions.enrichMetadata", params, SessionsEnrichMetadataResult.class); + } + + /** + * Active session ID and an optional flag for deferring repo-level hooks until folder trust. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture reloadPluginHooks(SessionsReloadPluginHooksParams params) { + return caller.invoke("sessions.reloadPluginHooks", params, Void.class); + } + + /** + * Active session ID whose deferred repo-level hooks should be loaded. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture loadDeferredRepoHooks() { + return caller.invoke("sessions.loadDeferredRepoHooks", java.util.Map.of(), SessionsLoadDeferredRepoHooksResult.class); + } + + /** + * Manager-wide additional plugins to register; replaces any previously-configured set. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture setAdditionalPlugins(SessionsSetAdditionalPluginsParams params) { + return caller.invoke("sessions.setAdditionalPlugins", params, Void.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAbortParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAbortParams.java new file mode 100644 index 000000000..8f7c47f7c --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAbortParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Parameters for aborting the current turn + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionAbortParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Finite reason code describing why the current turn was aborted */ + @JsonProperty("reason") AbortReason reason +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAbortResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAbortResult.java new file mode 100644 index 000000000..4a8d42c71 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAbortResult.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Result of aborting the current turn + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionAbortResult( + /** Whether the abort completed successfully */ + @JsonProperty("success") Boolean success, + /** Error message if the abort failed */ + @JsonProperty("error") String error +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAuthApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAuthApi.java index ceb245027..5b87bf3b3 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAuthApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAuthApi.java @@ -18,6 +18,8 @@ @javax.annotation.processing.Generated("copilot-sdk-codegen") public final class SessionAuthApi { + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + private final RpcCaller caller; private final String sessionId; @@ -29,10 +31,27 @@ public final class SessionAuthApi { /** * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture getStatus() { return caller.invoke("session.auth.getStatus", java.util.Map.of("sessionId", this.sessionId), SessionAuthGetStatusResult.class); } + /** + * New auth credentials to install on the session. Omit to leave credentials unchanged. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture setCredentials(SessionAuthSetCredentialsParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.auth.setCredentials", _p, SessionAuthSetCredentialsResult.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAuthSetCredentialsParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAuthSetCredentialsParams.java new file mode 100644 index 000000000..5e5e6b502 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAuthSetCredentialsParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * New auth credentials to install on the session. Omit to leave credentials unchanged. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionAuthSetCredentialsParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** The new auth credentials to install on the session. When omitted or `undefined`, the call is a no-op and the session's existing credentials are preserved. The runtime stores the value verbatim and uses it for outbound model/API requests; it does NOT re-validate or re-fetch the associated Copilot user response. Several variants carry secret material; treat this method's params as containing secrets at rest and in transit. */ + @JsonProperty("credentials") Object credentials +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAuthSetCredentialsResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAuthSetCredentialsResult.java new file mode 100644 index 000000000..5aef213a4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionAuthSetCredentialsResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the credential update succeeded. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionAuthSetCredentialsResult( + /** Whether the operation succeeded */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsApi.java index df5e6d9f2..7a142ecf9 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsApi.java @@ -31,6 +31,8 @@ public final class SessionCommandsApi { /** * Optional filters controlling which command sources to include in the listing. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture list() { @@ -42,6 +44,8 @@ public CompletableFuture list() { *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture invoke(SessionCommandsInvokeParams params) { @@ -55,6 +59,8 @@ public CompletableFuture invoke(SessionCommandsInvokeParams params) { *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture handlePendingCommand(SessionCommandsHandlePendingCommandParams params) { @@ -64,10 +70,42 @@ public CompletableFuture handlePendin } /** - * Queued command request ID and the result indicating whether the client handled it. + * Slash command name and argument string to execute synchronously. *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture execute(SessionCommandsExecuteParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.commands.execute", _p, SessionCommandsExecuteResult.class); + } + + /** + * Slash-prefixed command string to enqueue for FIFO processing. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture enqueue(SessionCommandsEnqueueParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.commands.enqueue", _p, SessionCommandsEnqueueResult.class); + } + + /** + * Queued-command request ID and the result indicating whether the host executed it (and whether to stop processing further queued commands). + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture respondToQueuedCommand(SessionCommandsRespondToQueuedCommandParams params) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsEnqueueParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsEnqueueParams.java new file mode 100644 index 000000000..6ca80d251 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsEnqueueParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Slash-prefixed command string to enqueue for FIFO processing. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionCommandsEnqueueParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Slash-prefixed command string to enqueue, e.g. '/compact' or '/model gpt-4'. Queued FIFO with any in-flight items; if the session is idle, processing kicks off immediately. */ + @JsonProperty("command") String command +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsEnqueueResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsEnqueueResult.java new file mode 100644 index 000000000..e968e1df8 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsEnqueueResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the command was accepted into the local execution queue. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionCommandsEnqueueResult( + /** True when the command was accepted into the local execution queue. False when the call targets a session that does not support local command queueing (e.g. remote sessions). */ + @JsonProperty("queued") Boolean queued +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsExecuteParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsExecuteParams.java new file mode 100644 index 000000000..1f1e73acb --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsExecuteParams.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Slash command name and argument string to execute synchronously. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionCommandsExecuteParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Name of the slash command to invoke (without the leading '/'). */ + @JsonProperty("commandName") String commandName, + /** Argument string to pass to the command (empty string if none). */ + @JsonProperty("args") String args +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsExecuteResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsExecuteResult.java new file mode 100644 index 000000000..a03b08c66 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsExecuteResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Error message produced while executing the command, if any. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionCommandsExecuteResult( + /** Error message produced while executing the command, if any. Omitted when the handler succeeded. */ + @JsonProperty("error") String error +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsRespondToQueuedCommandParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsRespondToQueuedCommandParams.java index b5a2e31f2..8eb5d2dbc 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsRespondToQueuedCommandParams.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsRespondToQueuedCommandParams.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Queued command request ID and the result indicating whether the client handled it. + * Queued-command request ID and the result indicating whether the host executed it (and whether to stop processing further queued commands). * * @since 1.0.0 */ @@ -23,9 +23,9 @@ public record SessionCommandsRespondToQueuedCommandParams( /** Target session identifier */ @JsonProperty("sessionId") String sessionId, - /** Request ID from the queued command event */ + /** Request ID from the `command.queued` event the host is responding to. */ @JsonProperty("requestId") String requestId, - /** Result of the queued command execution */ + /** Result of the queued command execution. */ @JsonProperty("result") Object result ) { } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsRespondToQueuedCommandResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsRespondToQueuedCommandResult.java index eb05c1d9e..3cf5a6de3 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsRespondToQueuedCommandResult.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionCommandsRespondToQueuedCommandResult.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Indicates whether the queued-command response was accepted by the session. + * Indicates whether the queued-command response was matched to a pending request. * * @since 1.0.0 */ @@ -21,7 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionCommandsRespondToQueuedCommandResult( - /** Whether the response was accepted (false if the requestId was not found or already resolved) */ + /** Whether a pending queued command with the given request ID was found and resolved. False when the request was already resolved, cancelled, or unknown. */ @JsonProperty("success") Boolean success ) { } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionContext.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionContext.java new file mode 100644 index 000000000..1a8c148bd --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionContext.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `SessionContext` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionContext( + /** Most recent working directory for this session */ + @JsonProperty("cwd") String cwd, + /** Git repository root, if the cwd was inside a git repo */ + @JsonProperty("gitRoot") String gitRoot, + /** Repository slug in `owner/name` form, when known */ + @JsonProperty("repository") String repository, + /** Repository host type */ + @JsonProperty("hostType") SessionContextHostType hostType, + /** Active git branch */ + @JsonProperty("branch") String branch +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionContextHostType.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionContextHostType.java new file mode 100644 index 000000000..db0945e31 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionContextHostType.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Repository host type + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum SessionContextHostType { + /** The {@code github} variant. */ + GITHUB("github"), + /** The {@code ado} variant. */ + ADO("ado"); + + private final String value; + SessionContextHostType(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static SessionContextHostType fromValue(String value) { + for (SessionContextHostType v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown SessionContextHostType value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogApi.java new file mode 100644 index 000000000..58351e99a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogApi.java @@ -0,0 +1,87 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code eventLog} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionEventLogApi { + + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionEventLogApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * Cursor, batch size, and optional long-poll/filter parameters for reading session events. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture read(SessionEventLogReadParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.eventLog.read", _p, SessionEventLogReadResult.class); + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture tail() { + return caller.invoke("session.eventLog.tail", java.util.Map.of("sessionId", this.sessionId), SessionEventLogTailResult.class); + } + + /** + * Event type to register consumer interest for, used by runtime gating logic. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture registerInterest(SessionEventLogRegisterInterestParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.eventLog.registerInterest", _p, SessionEventLogRegisterInterestResult.class); + } + + /** + * Opaque handle previously returned by `registerInterest` to release. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture releaseInterest(SessionEventLogReleaseInterestParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.eventLog.releaseInterest", _p, SessionEventLogReleaseInterestResult.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReadParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReadParams.java new file mode 100644 index 000000000..cad49d452 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReadParams.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Cursor, batch size, and optional long-poll/filter parameters for reading session events. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionEventLogReadParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Opaque cursor returned by a previous read. Omit on the first call to start from the beginning of the session's persisted history. */ + @JsonProperty("cursor") String cursor, + /** Maximum number of events to return in this batch (1–1000, default 200). */ + @JsonProperty("max") Long max, + /** Milliseconds to wait for new events when the cursor is at the tail of history. 0 (default) returns immediately even if no events are available. Capped at 30000ms. Ephemeral events that arrive during the wait are delivered in this batch but are NOT replayable on a subsequent read (use a non-zero waitMs in your next call to capture future ephemerals as they happen). */ + @JsonProperty("waitMs") Long waitMs, + /** Either '*' to receive all event types, or a non-empty list of event types to receive */ + @JsonProperty("types") Object types, + /** Agent-scope filter: 'primary' returns only main-agent events plus events whose type starts with 'subagent.' (matching the typed-subscription default behavior); 'all' returns events from all agents (matching wildcard-subscription behavior). Default is 'all' to preserve wildcard semantics for catch-up callers. */ + @JsonProperty("agentScope") EventsAgentScope agentScope +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReadResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReadResult.java new file mode 100644 index 000000000..026c25276 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReadResult.java @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Batch of session events returned by a read, with cursor and continuation metadata. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionEventLogReadResult( + /** Events are delivered in two batches per read: persisted events first (in append order), then ephemeral events (in seq order). When `waitMs > 0` and the catch-up batches were empty, post-wait events follow the same two-batch ordering. Persisted and ephemeral events do not interleave within a single read. */ + @JsonProperty("events") List events, + /** Opaque cursor for the next read. Pass back unchanged in the next read.cursor to continue from where this read left off. Always present, even when no events were returned. */ + @JsonProperty("cursor") String cursor, + /** True when the read returned `max` events and more events are available immediately. When false, the next read with a non-zero `waitMs` will block until a new event arrives or the wait expires. */ + @JsonProperty("hasMore") Boolean hasMore, + /** Cursor status: 'ok' means the cursor was applied successfully; 'expired' means the cursor referred to an event that no longer exists in history (e.g. truncated or compacted away) and the read started from the beginning of the remaining history. */ + @JsonProperty("cursorStatus") EventsCursorStatus cursorStatus +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogRegisterInterestParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogRegisterInterestParams.java new file mode 100644 index 000000000..3bddc6904 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogRegisterInterestParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Event type to register consumer interest for, used by runtime gating logic. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionEventLogRegisterInterestParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** The event type the consumer wants the runtime to treat as 'observed' for behavior-switching gating. Some runtime code paths inspect whether any consumer is interested in a specific event type and choose a different implementation accordingly (e.g. `mcp.oauth_required`: when interest is registered the runtime delegates the full interactive OAuth flow to the consumer; when no interest is registered the runtime installs a browserless fallback that silently reuses cached tokens). SDK clients that long-poll events do NOT automatically appear as listeners to these gating checks — they must explicitly call `registerInterest` for each event type they want the runtime to count as having a consumer. Multiple registrations for the same event type from the same or different consumers are tracked independently and must each be released. See: `mcp.oauth_required`, `sampling.requested`, `auto_mode_switch.requested`, `user_input.requested`, `elicitation.requested`, `command.queued`, `exit_plan_mode.requested`. */ + @JsonProperty("eventType") String eventType +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogRegisterInterestResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogRegisterInterestResult.java new file mode 100644 index 000000000..e0a6bb5a5 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogRegisterInterestResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Opaque handle representing an event-type interest registration. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionEventLogRegisterInterestResult( + /** Opaque handle for this registration. Pass to releaseInterest to release. Each call to registerInterest produces a fresh handle, even when the same eventType is registered multiple times. */ + @JsonProperty("handle") String handle +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReleaseInterestParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReleaseInterestParams.java new file mode 100644 index 000000000..c6bd4efb1 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReleaseInterestParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Opaque handle previously returned by `registerInterest` to release. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionEventLogReleaseInterestParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Handle returned by a previous `registerInterest` call. Idempotent: releasing an unknown or already-released handle is a no-op (returns success). When the last outstanding handle for an event type is released, the runtime reverts to its 'no consumer' code path for that event type. */ + @JsonProperty("handle") String handle +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReleaseInterestResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReleaseInterestResult.java new file mode 100644 index 000000000..0ba6b149a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReleaseInterestResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the operation succeeded. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionEventLogReleaseInterestResult( + /** Whether the operation succeeded */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogTailParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogTailParams.java new file mode 100644 index 000000000..270af92dc --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogTailParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionEventLogTailParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogTailResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogTailResult.java new file mode 100644 index 000000000..a966cd591 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogTailResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Snapshot of the current tail cursor without returning any events. Use this when a consumer wants to subscribe to live events going forward without first paginating through the entire persisted history (which would happen if `read` were called without a cursor on a long-lived session). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionEventLogTailResult( + /** Opaque cursor pointing at the current tail of the session's persisted-events history. Pass back to `read` to receive only events that arrive AFTER this snapshot. When the session has no events, this returns the same sentinel as an unset cursor (i.e. equivalent to omitting the cursor on a first read). */ + @JsonProperty("cursor") String cursor +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionFsSqliteQueryResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionFsSqliteQueryResult.java index df6549a9d..edc1e9c83 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionFsSqliteQueryResult.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionFsSqliteQueryResult.java @@ -29,8 +29,8 @@ public record SessionFsSqliteQueryResult( @JsonProperty("columns") List columns, /** Number of rows affected (for INSERT/UPDATE/DELETE) */ @JsonProperty("rowsAffected") Long rowsAffected, - /** Last inserted row ID (for INSERT) */ - @JsonProperty("lastInsertRowid") Double lastInsertRowid, + /** SQLite last_insert_rowid() value for INSERT. */ + @JsonProperty("lastInsertRowid") Long lastInsertRowid, /** Describes a filesystem error. */ @JsonProperty("error") SessionFsError error ) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryAbortManualCompactionParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryAbortManualCompactionParams.java new file mode 100644 index 000000000..c08926c39 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryAbortManualCompactionParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionHistoryAbortManualCompactionParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryAbortManualCompactionResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryAbortManualCompactionResult.java new file mode 100644 index 000000000..efefbd1a0 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryAbortManualCompactionResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether an in-progress manual compaction was aborted. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionHistoryAbortManualCompactionResult( + /** Whether an in-progress manual compaction was aborted. False when no manual compaction was running, when its abort controller was already aborted, or when the session is remote. */ + @JsonProperty("aborted") Boolean aborted +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryApi.java index 9988a4a88..1ab84432c 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryApi.java @@ -54,4 +54,34 @@ public CompletableFuture truncate(SessionHistoryTr return caller.invoke("session.history.truncate", _p, SessionHistoryTruncateResult.class); } + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture cancelBackgroundCompaction() { + return caller.invoke("session.history.cancelBackgroundCompaction", java.util.Map.of("sessionId", this.sessionId), SessionHistoryCancelBackgroundCompactionResult.class); + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture abortManualCompaction() { + return caller.invoke("session.history.abortManualCompaction", java.util.Map.of("sessionId", this.sessionId), SessionHistoryAbortManualCompactionResult.class); + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture summarizeForHandoff() { + return caller.invoke("session.history.summarizeForHandoff", java.util.Map.of("sessionId", this.sessionId), SessionHistorySummarizeForHandoffResult.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryCancelBackgroundCompactionParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryCancelBackgroundCompactionParams.java new file mode 100644 index 000000000..faba738ed --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryCancelBackgroundCompactionParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionHistoryCancelBackgroundCompactionParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryCancelBackgroundCompactionResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryCancelBackgroundCompactionResult.java new file mode 100644 index 000000000..22d9b926e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryCancelBackgroundCompactionResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether an in-progress background compaction was cancelled. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionHistoryCancelBackgroundCompactionResult( + /** Whether an in-progress background compaction was cancelled. False when no compaction was running, when the session is remote, or when the underlying processor was unavailable. */ + @JsonProperty("cancelled") Boolean cancelled +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryCompactResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryCompactResult.java index f7a8664b9..e7546b44c 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryCompactResult.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistoryCompactResult.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Compaction outcome with the number of tokens and messages removed and the resulting context window breakdown. + * Compaction outcome with the number of tokens and messages removed, summary text, and the resulting context window breakdown. * * @since 1.0.0 */ @@ -27,6 +27,8 @@ public record SessionHistoryCompactResult( @JsonProperty("tokensRemoved") Long tokensRemoved, /** Number of messages removed during compaction */ @JsonProperty("messagesRemoved") Long messagesRemoved, + /** Summary text produced by compaction. Omitted when compaction did not produce a summary (e.g. failure path). */ + @JsonProperty("summaryContent") String summaryContent, /** Post-compaction context window usage breakdown */ @JsonProperty("contextWindow") HistoryCompactContextWindow contextWindow ) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistorySummarizeForHandoffParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistorySummarizeForHandoffParams.java new file mode 100644 index 000000000..946b9232f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistorySummarizeForHandoffParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionHistorySummarizeForHandoffParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistorySummarizeForHandoffResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistorySummarizeForHandoffResult.java new file mode 100644 index 000000000..d49b225d2 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionHistorySummarizeForHandoffResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Markdown summary of the conversation context (empty when not available). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionHistorySummarizeForHandoffResult( + /** Markdown summary of the conversation context produced by an LLM. Empty string when there are no messages or when the session does not support local summarization. */ + @JsonProperty("summary") String summary +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionInstalledPlugin.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionInstalledPlugin.java new file mode 100644 index 000000000..8ca95b8b3 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionInstalledPlugin.java @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `SessionInstalledPlugin` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionInstalledPlugin( + /** Plugin name */ + @JsonProperty("name") String name, + /** Marketplace the plugin came from (empty string for direct repo installs) */ + @JsonProperty("marketplace") String marketplace, + /** Installed version, if known */ + @JsonProperty("version") String version, + /** Installation timestamp (ISO-8601) */ + @JsonProperty("installed_at") String installedAt, + /** Whether the plugin is currently enabled */ + @JsonProperty("enabled") Boolean enabled, + /** Path where the plugin is cached locally */ + @JsonProperty("cache_path") String cachePath, + /** Source descriptor for direct repo installs (when marketplace is empty) */ + @JsonProperty("source") Object source +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionInstructionsApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionInstructionsApi.java index 23c4cf3b6..5aec59dfd 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionInstructionsApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionInstructionsApi.java @@ -29,6 +29,8 @@ public final class SessionInstructionsApi { /** * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture getSources() { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionLogParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionLogParams.java index f593c11c2..66e0d4c85 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionLogParams.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionLogParams.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Message text, optional severity level, persistence flag, and optional follow-up URL. + * Message text, optional severity level, persistence flag, optional follow-up URL, and optional tip. * * @since 1.0.0 */ @@ -27,9 +27,13 @@ public record SessionLogParams( @JsonProperty("message") String message, /** Log severity level. Determines how the message is displayed in the timeline. Defaults to "info". */ @JsonProperty("level") SessionLogLevel level, + /** Domain category for this log entry (e.g., "mcp", "subscription", "policy", "model"). Maps to `infoType`/`warningType`/`errorType` on the emitted event. Defaults to "notification". */ + @JsonProperty("type") String type, /** When true, the message is transient and not persisted to the session event log on disk */ @JsonProperty("ephemeral") Boolean ephemeral, /** Optional URL the user can open in their browser for more details */ - @JsonProperty("url") String url + @JsonProperty("url") String url, + /** Optional actionable tip displayed alongside the message. Only honored on `level: "info"`. */ + @JsonProperty("tip") String tip ) { } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionLspApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionLspApi.java new file mode 100644 index 000000000..79aa00055 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionLspApi.java @@ -0,0 +1,47 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code lsp} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionLspApi { + + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionLspApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * Parameters for (re)loading the merged LSP configuration set. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture initialize(SessionLspInitializeParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.lsp.initialize", _p, Void.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionLspInitializeParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionLspInitializeParams.java new file mode 100644 index 000000000..37c064aa7 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionLspInitializeParams.java @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Parameters for (re)loading the merged LSP configuration set. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionLspInitializeParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Working directory used to load project-level LSP configs. Defaults to the session working directory when omitted. */ + @JsonProperty("workingDirectory") String workingDirectory, + /** Git root used as the boundary when traversing for project-level LSP configs (supports monorepos). */ + @JsonProperty("gitRoot") String gitRoot, + /** Force re-initialization even when LSP configs were already loaded for the working directory. */ + @JsonProperty("force") Boolean force +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpApi.java index 93714e068..be2d22d4b 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpApi.java @@ -83,4 +83,59 @@ public CompletableFuture reload() { return caller.invoke("session.mcp.reload", java.util.Map.of("sessionId", this.sessionId), Void.class); } + /** + * Identifiers and raw MCP CreateMessageRequest params used to run a sampling inference. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture executeSampling(SessionMcpExecuteSamplingParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.mcp.executeSampling", _p, SessionMcpExecuteSamplingResult.class); + } + + /** + * The requestId previously passed to executeSampling that should be cancelled. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture cancelSamplingExecution(SessionMcpCancelSamplingExecutionParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.mcp.cancelSamplingExecution", _p, SessionMcpCancelSamplingExecutionResult.class); + } + + /** + * Mode controlling how MCP server env values are resolved (`direct` or `indirect`). + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture setEnvValueMode(SessionMcpSetEnvValueModeParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.mcp.setEnvValueMode", _p, SessionMcpSetEnvValueModeResult.class); + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture removeGitHub() { + return caller.invoke("session.mcp.removeGitHub", java.util.Map.of("sessionId", this.sessionId), SessionMcpRemoveGitHubResult.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpCancelSamplingExecutionParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpCancelSamplingExecutionParams.java new file mode 100644 index 000000000..191eeda98 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpCancelSamplingExecutionParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * The requestId previously passed to executeSampling that should be cancelled. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpCancelSamplingExecutionParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** The requestId previously passed to executeSampling that should be cancelled */ + @JsonProperty("requestId") String requestId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpCancelSamplingExecutionResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpCancelSamplingExecutionResult.java new file mode 100644 index 000000000..35147aed2 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpCancelSamplingExecutionResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether an in-flight sampling execution with the given requestId was found and cancelled. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpCancelSamplingExecutionResult( + /** True if an in-flight execution with the given requestId was found and signalled to cancel. False when no such execution is in flight (already completed, never started, or cancelled by another caller). */ + @JsonProperty("cancelled") Boolean cancelled +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpExecuteSamplingParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpExecuteSamplingParams.java new file mode 100644 index 000000000..19a9adffb --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpExecuteSamplingParams.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifiers and raw MCP CreateMessageRequest params used to run a sampling inference. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpExecuteSamplingParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Caller-provided unique identifier for this sampling execution. Use this same ID with cancelSamplingExecution to cancel the in-flight call. Must be unique within the session for the lifetime of the call. */ + @JsonProperty("requestId") String requestId, + /** Name of the MCP server that initiated the sampling request */ + @JsonProperty("serverName") String serverName, + /** The original MCP JSON-RPC request ID (string or number). Used by the runtime to correlate the inference with the originating MCP request for telemetry; this is distinct from `requestId` (which is the schema-level cancellation handle). */ + @JsonProperty("mcpRequestId") Object mcpRequestId, + /** Raw MCP CreateMessageRequest params, as received in the `sampling.requested` event. Treated as opaque at the schema layer; the runtime converts the embedded MCP messages into the OpenAI chat-completion shape internally. */ + @JsonProperty("request") McpExecuteSamplingRequest request +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpExecuteSamplingResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpExecuteSamplingResult.java new file mode 100644 index 000000000..d22143c53 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpExecuteSamplingResult.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Outcome of an MCP sampling execution: success result, failure error, or cancellation. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpExecuteSamplingResult( + /** Outcome of the sampling inference. 'success' produced a response; 'failure' encountered an error (including agent-side rejection by content filter or criteria); 'cancelled' the caller cancelled this execution via cancelSamplingExecution. */ + @JsonProperty("action") McpSamplingExecutionAction action, + /** MCP CreateMessageResult payload (with optional 'tools' extension), present when action='success'. Treated as opaque at the schema layer; consumers should construct/consume it per the MCP CreateMessageResult shape. */ + @JsonProperty("result") McpExecuteSamplingResult result, + /** Error description, present when action='failure'. */ + @JsonProperty("error") String error +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpRemoveGitHubParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpRemoveGitHubParams.java new file mode 100644 index 000000000..5c7915d9f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpRemoveGitHubParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpRemoveGitHubParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpRemoveGitHubResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpRemoveGitHubResult.java new file mode 100644 index 000000000..1f13b31c4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpRemoveGitHubResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the auto-managed `github` MCP server was removed (false when nothing to remove). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpRemoveGitHubResult( + /** True when the auto-managed `github` MCP server was removed; false when no removal happened (e.g. user has explicitly configured a `github` server, or the server was not registered). */ + @JsonProperty("removed") Boolean removed +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpSetEnvValueModeParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpSetEnvValueModeParams.java new file mode 100644 index 000000000..01efee333 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpSetEnvValueModeParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Mode controlling how MCP server env values are resolved (`direct` or `indirect`). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpSetEnvValueModeParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** How environment-variable values supplied to MCP servers are resolved. "direct" passes literal string values; "indirect" treats values as references (e.g. names of environment variables on the host) that the runtime resolves before launch. Defaults to the runtime's startup mode; clients that intentionally launch MCP servers with literal values (e.g. CLI prompt mode and ACP) set this to "direct". */ + @JsonProperty("mode") McpSetEnvValueModeDetails mode +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpSetEnvValueModeResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpSetEnvValueModeResult.java new file mode 100644 index 000000000..9e69732d2 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpSetEnvValueModeResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Env-value mode recorded on the session after the update. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMcpSetEnvValueModeResult( + /** Mode recorded on the session after the update */ + @JsonProperty("mode") McpSetEnvValueModeDetails mode +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadata.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadata.java new file mode 100644 index 000000000..6069f8ab4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadata.java @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `SessionMetadata` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadata( + /** Stable session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Session creation time as an ISO 8601 timestamp */ + @JsonProperty("startTime") String startTime, + /** Last-modified time of the session's persisted state, as ISO 8601 */ + @JsonProperty("modifiedTime") String modifiedTime, + /** Short summary of the session, when one has been derived */ + @JsonProperty("summary") String summary, + /** Optional human-friendly name set via /rename */ + @JsonProperty("name") String name, + /** True for remote (GitHub) sessions; false for local */ + @JsonProperty("isRemote") Boolean isRemote, + /** Schema for the `SessionContext` type. */ + @JsonProperty("context") SessionContext context, + /** GitHub task ID, when this local session is bound to one. Only present for local sessions exported to remote control. */ + @JsonProperty("mcTaskId") String mcTaskId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataApi.java new file mode 100644 index 000000000..b0a82347a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataApi.java @@ -0,0 +1,112 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code metadata} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionMetadataApi { + + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionMetadataApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture snapshot() { + return caller.invoke("session.metadata.snapshot", java.util.Map.of("sessionId", this.sessionId), SessionMetadataSnapshotResult.class); + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture isProcessing() { + return caller.invoke("session.metadata.isProcessing", java.util.Map.of("sessionId", this.sessionId), SessionMetadataIsProcessingResult.class); + } + + /** + * Model identifier and token limits used to compute the context-info breakdown. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture contextInfo(SessionMetadataContextInfoParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.metadata.contextInfo", _p, SessionMetadataContextInfoResult.class); + } + + /** + * Updated working-directory/git context to record on the session. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture recordContextChange(SessionMetadataRecordContextChangeParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.metadata.recordContextChange", _p, Void.class); + } + + /** + * Absolute path to set as the session's new working directory. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture setWorkingDirectory(SessionMetadataSetWorkingDirectoryParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.metadata.setWorkingDirectory", _p, SessionMetadataSetWorkingDirectoryResult.class); + } + + /** + * Model identifier to use when re-tokenizing the session's existing messages. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture recomputeContextTokens(SessionMetadataRecomputeContextTokensParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.metadata.recomputeContextTokens", _p, SessionMetadataRecomputeContextTokensResult.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataContextInfoParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataContextInfoParams.java new file mode 100644 index 000000000..94176d544 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataContextInfoParams.java @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Model identifier and token limits used to compute the context-info breakdown. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadataContextInfoParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Maximum prompt tokens allowed by the target model. Pass 0 to use the runtime default. */ + @JsonProperty("promptTokenLimit") Long promptTokenLimit, + /** Maximum output tokens allowed by the target model. Pass 0 if unknown. */ + @JsonProperty("outputTokenLimit") Long outputTokenLimit, + /** Model identifier used for tokenization. Omit to use the session default. Used both for token counting and to compute display values. */ + @JsonProperty("selectedModel") String selectedModel +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataContextInfoResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataContextInfoResult.java new file mode 100644 index 000000000..fe8e15f78 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataContextInfoResult.java @@ -0,0 +1,52 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Token breakdown for the session's current context window, or null if uninitialized. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadataContextInfoResult( + /** Token breakdown for the current context window, or null if the session has not yet been initialized (no system prompt or tool metadata cached). */ + @JsonProperty("contextInfo") SessionMetadataContextInfoResultContextInfo contextInfo +) { + + /** Token-usage breakdown for the session's current context window */ + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record SessionMetadataContextInfoResultContextInfo( + /** The model used for token counting */ + @JsonProperty("modelName") String modelName, + /** Tokens consumed by the system prompt */ + @JsonProperty("systemTokens") Long systemTokens, + /** Tokens consumed by user/assistant/tool messages */ + @JsonProperty("conversationTokens") Long conversationTokens, + /** Tokens consumed by tool definitions sent to the model (excludes deferred tools) */ + @JsonProperty("toolDefinitionsTokens") Long toolDefinitionsTokens, + /** Sum of system, conversation and tool-definition tokens */ + @JsonProperty("totalTokens") Long totalTokens, + /** Maximum prompt tokens allowed by the model (or DEFAULT_TOKEN_LIMIT if unspecified) */ + @JsonProperty("promptTokenLimit") Long promptTokenLimit, + /** Token count at which background compaction starts (configurable percentage of promptTokenLimit) */ + @JsonProperty("compactionThreshold") Long compactionThreshold, + /** Total context limit for /context display. promptTokenLimit + min(32k or 64k, outputTokenLimit) depending on model. */ + @JsonProperty("limit") Long limit, + /** Output reserve plus tokens after the buffer-exhaustion blocking threshold (default 95%) */ + @JsonProperty("bufferTokens") Long bufferTokens + ) { + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataIsProcessingParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataIsProcessingParams.java new file mode 100644 index 000000000..5e86f186a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataIsProcessingParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadataIsProcessingParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataIsProcessingResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataIsProcessingResult.java new file mode 100644 index 000000000..fb5d4e59b --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataIsProcessingResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the local session is currently processing a turn or background continuation. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadataIsProcessingResult( + /** Whether the session is currently processing user/agent messages. False for non-local sessions (which don't run a local agentic loop). Reflects an in-flight turn or background continuation. */ + @JsonProperty("processing") Boolean processing +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecomputeContextTokensParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecomputeContextTokensParams.java new file mode 100644 index 000000000..27824912c --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecomputeContextTokensParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Model identifier to use when re-tokenizing the session's existing messages. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadataRecomputeContextTokensParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Model identifier used for tokenization. The runtime token-counts both chat-context and system-context messages against this model. */ + @JsonProperty("modelId") String modelId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecomputeContextTokensResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecomputeContextTokensResult.java new file mode 100644 index 000000000..c8d398a4d --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecomputeContextTokensResult.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Re-tokenize the session's existing messages against `modelId` and return the token totals. Useful for hosts that want an initial estimate of context usage on session resume, before the next agent turn fires `session.context_info_changed` events. Returns zeros for an empty session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadataRecomputeContextTokensResult( + /** Sum of tokens across chat-context and system-context messages currently held by the session. */ + @JsonProperty("totalTokens") Long totalTokens, + /** Tokens contributed by user/assistant/tool messages (excludes system/developer prompts). */ + @JsonProperty("messagesTokenCount") Long messagesTokenCount, + /** Tokens contributed by system/developer prompt snapshots. */ + @JsonProperty("systemTokenCount") Long systemTokenCount +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecordContextChangeParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecordContextChangeParams.java new file mode 100644 index 000000000..24e1c79ba --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecordContextChangeParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Updated working-directory/git context to record on the session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadataRecordContextChangeParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Updated working directory and git context. Emitted as the new payload of `session.context_changed`. */ + @JsonProperty("context") SessionWorkingDirectoryContext context +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecordContextChangeResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecordContextChangeResult.java new file mode 100644 index 000000000..08d780868 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataRecordContextChangeResult.java @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Notify the session that its working directory context has changed. Emits a `session.context_changed` event so consumers (telemetry, OTel tracker, ACP, the timeline UI) can react. Use this when the host has detected a cwd/branch/repo change outside the session's normal lifecycle (e.g., after a shell command in interactive mode). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadataRecordContextChangeResult() { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSetWorkingDirectoryParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSetWorkingDirectoryParams.java new file mode 100644 index 000000000..436286f65 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSetWorkingDirectoryParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Absolute path to set as the session's new working directory. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadataSetWorkingDirectoryParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Absolute path to set as the session's working directory. The runtime updates the session's recorded cwd so subsequent operations (shell tools, file lookups, telemetry) anchor to it. */ + @JsonProperty("workingDirectory") String workingDirectory +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSetWorkingDirectoryResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSetWorkingDirectoryResult.java new file mode 100644 index 000000000..b1c0f5fb9 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSetWorkingDirectoryResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Update the session's working directory. Used by the host when the user explicitly changes cwd (e.g., the `/cd` slash command). The host is responsible for `process.chdir` and any related side-effects (file index, etc.); this method only updates the session's own recorded path. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadataSetWorkingDirectoryResult( + /** Working directory after the update */ + @JsonProperty("workingDirectory") String workingDirectory +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSnapshotParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSnapshotParams.java new file mode 100644 index 000000000..ffbad219e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSnapshotParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadataSnapshotParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSnapshotResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSnapshotResult.java new file mode 100644 index 000000000..49002659e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMetadataSnapshotResult.java @@ -0,0 +1,77 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Point-in-time snapshot of slow-changing session identifier and state fields + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionMetadataSnapshotResult( + /** The unique identifier of the session */ + @JsonProperty("sessionId") String sessionId, + /** ISO 8601 timestamp of when the session started */ + @JsonProperty("startTime") OffsetDateTime startTime, + /** ISO 8601 timestamp of when the session's persisted state was last modified on disk. For new sessions, equals startTime. For resumed sessions, reflects the previous modification time at construction. */ + @JsonProperty("modifiedTime") OffsetDateTime modifiedTime, + /** Whether this is a remote session (i.e., one whose runtime executes elsewhere and is steered through this process) */ + @JsonProperty("isRemote") Boolean isRemote, + /** True when the session was detected to be in use by another process at construction time. Local consumers may surface a confirmation prompt before fully attaching. Always false for new sessions. */ + @JsonProperty("alreadyInUse") Boolean alreadyInUse, + /** Absolute path to the session's workspace directory on disk, or null if the session has no associated workspace */ + @JsonProperty("workspacePath") String workspacePath, + /** User-provided name supplied at session construction (via `--name`), if any. Immutable after construction. */ + @JsonProperty("initialName") String initialName, + /** Remote-session-specific metadata. Populated only when `isRemote` is true. Fields are immutable for the lifetime of the session. */ + @JsonProperty("remoteMetadata") MetadataSnapshotRemoteMetadata remoteMetadata, + /** Short human-readable summary of the session, if known. Omitted when no summary has been generated. */ + @JsonProperty("summary") String summary, + /** Absolute path to the session's current working directory */ + @JsonProperty("workingDirectory") String workingDirectory, + /** The current agent mode for this session (e.g., 'interactive', 'plan', 'autopilot') */ + @JsonProperty("currentMode") MetadataSnapshotCurrentMode currentMode, + /** Currently selected model identifier, if any */ + @JsonProperty("selectedModel") String selectedModel, + /** Public-facing workspace metadata for this session, or null if the session has no associated workspace. Excludes runtime-internal fields (GitHub IDs, summary count, internal flags). */ + @JsonProperty("workspace") SessionMetadataSnapshotResultWorkspace workspace +) { + + /** Public-facing projection of workspace metadata for SDK / TUI consumers */ + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record SessionMetadataSnapshotResultWorkspace( + /** Workspace identifier (1:1 with sessionId) */ + @JsonProperty("id") String id, + /** Current working directory at session start */ + @JsonProperty("cwd") String cwd, + /** Resolved git root for cwd, if any */ + @JsonProperty("git_root") String gitRoot, + /** Repository identifier in 'owner/repo' or 'org/project/repo' format, if any */ + @JsonProperty("repository") String repository, + /** Repository host type, if known */ + @JsonProperty("host_type") WorkspaceSummaryHostType hostType, + /** Branch checked out at session start, if any */ + @JsonProperty("branch") String branch, + /** Display name for the session, if set */ + @JsonProperty("name") String name, + /** ISO 8601 timestamp when the workspace was created */ + @JsonProperty("created_at") OffsetDateTime createdAt, + /** ISO 8601 timestamp when the workspace was last updated */ + @JsonProperty("updated_at") OffsetDateTime updatedAt + ) { + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModeApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModeApi.java index 9e67580dc..b28cd5d37 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModeApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModeApi.java @@ -31,6 +31,8 @@ public final class SessionModeApi { /** * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture get() { @@ -42,6 +44,8 @@ public CompletableFuture get() { *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture set(SessionModeSetParams params) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelApi.java index 55b3b18c9..b2c112b66 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelApi.java @@ -31,6 +31,8 @@ public final class SessionModelApi { /** * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture getCurrent() { @@ -42,6 +44,8 @@ public CompletableFuture getCurrent() { *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture switchTo(SessionModelSwitchToParams params) { @@ -50,4 +54,19 @@ public CompletableFuture switchTo(SessionModelSwitch return caller.invoke("session.model.switchTo", _p, SessionModelSwitchToResult.class); } + /** + * Reasoning effort level to apply to the currently selected model. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture setReasoningEffort(SessionModelSetReasoningEffortParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.model.setReasoningEffort", _p, SessionModelSetReasoningEffortResult.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelGetCurrentResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelGetCurrentResult.java index 4a5a60525..5afd22911 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelGetCurrentResult.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelGetCurrentResult.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * The currently selected model for the session. + * The currently selected model and reasoning effort for the session. * * @since 1.0.0 */ @@ -22,6 +22,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record SessionModelGetCurrentResult( /** Currently active model identifier */ - @JsonProperty("modelId") String modelId + @JsonProperty("modelId") String modelId, + /** Reasoning effort level currently applied to the active model, when one is set. Reads `Session.getReasoningEffort()` synchronously after `getSelectedModel()` resolves so the two values are reported as a snapshot. */ + @JsonProperty("reasoningEffort") String reasoningEffort ) { } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelSetReasoningEffortParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelSetReasoningEffortParams.java new file mode 100644 index 000000000..da6bb1870 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelSetReasoningEffortParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Reasoning effort level to apply to the currently selected model. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionModelSetReasoningEffortParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Reasoning effort level to apply to the currently selected model. The host is responsible for validating the value against the model's supported levels before calling. */ + @JsonProperty("reasoningEffort") String reasoningEffort +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelSetReasoningEffortResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelSetReasoningEffortResult.java new file mode 100644 index 000000000..0ec6e239e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelSetReasoningEffortResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Update the session's reasoning effort without changing the selected model. Use `switchTo` instead when you also need to change the model. The runtime stores the effort on the session and applies it to subsequent turns. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionModelSetReasoningEffortResult( + /** Reasoning effort level recorded on the session after the update */ + @JsonProperty("reasoningEffort") String reasoningEffort +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameApi.java index 371dc15ab..73b6c6bc2 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameApi.java @@ -31,6 +31,8 @@ public final class SessionNameApi { /** * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture get() { @@ -42,6 +44,8 @@ public CompletableFuture get() { *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture set(SessionNameSetParams params) { @@ -50,4 +54,19 @@ public CompletableFuture set(SessionNameSetParams params) { return caller.invoke("session.name.set", _p, Void.class); } + /** + * Auto-generated session summary to apply as the session's name when no user-set name exists. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture setAuto(SessionNameSetAutoParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.name.setAuto", _p, SessionNameSetAutoResult.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameSetAutoParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameSetAutoParams.java new file mode 100644 index 000000000..4b6db1bde --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameSetAutoParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Auto-generated session summary to apply as the session's name when no user-set name exists. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionNameSetAutoParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Auto-generated session summary. Empty/whitespace-only values are ignored; values are trimmed before persisting. */ + @JsonProperty("summary") String summary +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameSetAutoResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameSetAutoResult.java new file mode 100644 index 000000000..134694a8c --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameSetAutoResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the auto-generated summary was applied as the session's name. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionNameSetAutoResult( + /** Whether the auto-generated summary was persisted. False if the session already has a user-set name, the summary normalized to empty, or the session does not have a workspace. */ + @JsonProperty("applied") Boolean applied +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionOptionsApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionOptionsApi.java new file mode 100644 index 000000000..8624c57e3 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionOptionsApi.java @@ -0,0 +1,47 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code options} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionOptionsApi { + + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionOptionsApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * Patch of mutable session options to apply to the running session. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture update(SessionOptionsUpdateParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.options.update", _p, SessionOptionsUpdateResult.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionOptionsUpdateParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionOptionsUpdateParams.java new file mode 100644 index 000000000..fa768dd7b --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionOptionsUpdateParams.java @@ -0,0 +1,101 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Patch of mutable session options to apply to the running session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionOptionsUpdateParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** The model ID to use for assistant turns. */ + @JsonProperty("model") String model, + /** Reasoning effort for the selected model (model-defined enum). */ + @JsonProperty("reasoningEffort") String reasoningEffort, + /** Identifier of the client driving the session. */ + @JsonProperty("clientName") String clientName, + /** Identifier sent to LSP-style integrations. */ + @JsonProperty("lspClientName") String lspClientName, + /** Stable integration identifier used for analytics and rate-limit attribution. */ + @JsonProperty("integrationId") String integrationId, + /** Map of feature-flag IDs to their boolean enabled state. */ + @JsonProperty("featureFlags") Map featureFlags, + /** Whether experimental capabilities are enabled. */ + @JsonProperty("isExperimentalMode") Boolean isExperimentalMode, + /** Custom model-provider configuration (BYOK). Opaque shape; see `ProviderConfig` in the runtime. */ + @JsonProperty("provider") Object provider, + /** Absolute working-directory path for shell tools. */ + @JsonProperty("workingDirectory") String workingDirectory, + /** Allowlist of tool names available to this session. */ + @JsonProperty("availableTools") List availableTools, + /** Denylist of tool names for this session. */ + @JsonProperty("excludedTools") List excludedTools, + /** Whether shell-script safety heuristics are enabled. */ + @JsonProperty("enableScriptSafety") Boolean enableScriptSafety, + /** Shell init profile (`None` or `NonInteractive`). */ + @JsonProperty("shellInitProfile") String shellInitProfile, + /** Per-shell process flags (e.g., `pwsh` arguments). */ + @JsonProperty("shellProcessFlags") List shellProcessFlags, + /** Sandbox configuration shape; opaque to SDK consumers. See `SandboxConfig` in the runtime. */ + @JsonProperty("sandboxConfig") Object sandboxConfig, + /** Whether interactive shell sessions are logged. */ + @JsonProperty("logInteractiveShells") Boolean logInteractiveShells, + /** How env values are passed to MCP servers (`direct` inlines literal values; `indirect` resolves at launch). */ + @JsonProperty("envValueMode") OptionsUpdateEnvValueMode envValueMode, + /** Additional directories to search for skills. */ + @JsonProperty("skillDirectories") List skillDirectories, + /** Skill IDs that should be excluded from this session. */ + @JsonProperty("disabledSkills") List disabledSkills, + /** Whether to discover custom instructions on demand after successful file views (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md surfacing). Combined with `skipCustomInstructions` and the runtime-side `ON_DEMAND_INSTRUCTIONS` feature flag. */ + @JsonProperty("enableOnDemandInstructionDiscovery") Boolean enableOnDemandInstructionDiscovery, + /** Full set of installed plugins for the session. Replaces the existing list; the runtime invalidates the skills cache only when the list materially changes. */ + @JsonProperty("installedPlugins") List installedPlugins, + /** Whether to default custom agents to local-only execution. */ + @JsonProperty("customAgentsLocalOnly") Boolean customAgentsLocalOnly, + /** Whether to skip loading custom instruction sources. */ + @JsonProperty("skipCustomInstructions") Boolean skipCustomInstructions, + /** Instruction source IDs to exclude from the system prompt. */ + @JsonProperty("disabledInstructionSources") List disabledInstructionSources, + /** Whether to include the `Co-authored-by` trailer in commit messages. */ + @JsonProperty("coauthorEnabled") Boolean coauthorEnabled, + /** Optional path for trajectory output. */ + @JsonProperty("trajectoryFile") String trajectoryFile, + /** Whether to stream model responses. */ + @JsonProperty("enableStreaming") Boolean enableStreaming, + /** Override URL for the Copilot API endpoint. */ + @JsonProperty("copilotUrl") String copilotUrl, + /** Whether to disable the `ask_user` tool (encourages autonomous behavior). */ + @JsonProperty("askUserDisabled") Boolean askUserDisabled, + /** Whether to allow auto-mode continuation across turns. */ + @JsonProperty("continueOnAutoMode") Boolean continueOnAutoMode, + /** Whether the session is running in an interactive UI. */ + @JsonProperty("runningInInteractiveMode") Boolean runningInInteractiveMode, + /** Whether to surface reasoning-summary events from the model. */ + @JsonProperty("enableReasoningSummaries") Boolean enableReasoningSummaries, + /** Runtime context discriminator (e.g., `cli`, `actions`). */ + @JsonProperty("agentContext") String agentContext, + /** Override directory for the session-events log. When unset, the runtime's default events log directory is used. */ + @JsonProperty("eventsLogDirectory") String eventsLogDirectory, + /** Additional content-exclusion policies to merge into the session's policy set. Opaque shape; see `ContentExclusionApiResponse` in the runtime. */ + @JsonProperty("additionalContentExclusionPolicies") List additionalContentExclusionPolicies, + /** Whether to expose the `manage_schedule` tool to the agent. The runtime always owns the per-session schedule registry; this flag only controls tool exposure (typically gated to staff users). */ + @JsonProperty("manageScheduleEnabled") Boolean manageScheduleEnabled +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionOptionsUpdateResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionOptionsUpdateResult.java new file mode 100644 index 000000000..a20c64ab8 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionOptionsUpdateResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the session options patch was applied successfully. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionOptionsUpdateResult( + /** Whether the operation succeeded */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsApi.java index 6a32d2d19..082268d89 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsApi.java @@ -23,10 +23,38 @@ public final class SessionPermissionsApi { private final RpcCaller caller; private final String sessionId; + /** API methods for the {@code permissions.paths} sub-namespace. */ + public final SessionPermissionsPathsApi paths; + /** API methods for the {@code permissions.locations} sub-namespace. */ + public final SessionPermissionsLocationsApi locations; + /** API methods for the {@code permissions.folderTrust} sub-namespace. */ + public final SessionPermissionsFolderTrustApi folderTrust; + /** API methods for the {@code permissions.urls} sub-namespace. */ + public final SessionPermissionsUrlsApi urls; + /** @param caller the RPC transport function */ SessionPermissionsApi(RpcCaller caller, String sessionId) { this.caller = caller; this.sessionId = sessionId; + this.paths = new SessionPermissionsPathsApi(caller, sessionId); + this.locations = new SessionPermissionsLocationsApi(caller, sessionId); + this.folderTrust = new SessionPermissionsFolderTrustApi(caller, sessionId); + this.urls = new SessionPermissionsUrlsApi(caller, sessionId); + } + + /** + * Patch of permission policy fields to apply (omit a field to leave it unchanged). + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture configure(SessionPermissionsConfigureParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.permissions.configure", _p, SessionPermissionsConfigureResult.class); } /** @@ -34,6 +62,8 @@ public final class SessionPermissionsApi { *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture handlePendingPermissionRequest(SessionPermissionsHandlePendingPermissionRequestParams params) { @@ -43,10 +73,22 @@ public CompletableFuture } /** - * Whether to auto-approve all tool permission requests for the rest of the session. + * No parameters; returns currently-pending permission requests for the session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture pendingRequests() { + return caller.invoke("session.permissions.pendingRequests", java.util.Map.of("sessionId", this.sessionId), SessionPermissionsPendingRequestsResult.class); + } + + /** + * Allow-all toggle for tool permission requests, with an optional telemetry source. *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture setApproveAll(SessionPermissionsSetApproveAllParams params) { @@ -55,12 +97,59 @@ public CompletableFuture setApproveAll(Se return caller.invoke("session.permissions.setApproveAll", _p, SessionPermissionsSetApproveAllResult.class); } + /** + * Scope and add/remove instructions for modifying session- or location-scoped permission rules. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture modifyRules(SessionPermissionsModifyRulesParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.permissions.modifyRules", _p, SessionPermissionsModifyRulesResult.class); + } + + /** + * Toggles whether permission prompts should be bridged into session events for this client. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture setRequired(SessionPermissionsSetRequiredParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.permissions.setRequired", _p, SessionPermissionsSetRequiredResult.class); + } + /** * No parameters; clears all session-scoped tool permission approvals. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture resetSessionApprovals() { return caller.invoke("session.permissions.resetSessionApprovals", java.util.Map.of("sessionId", this.sessionId), SessionPermissionsResetSessionApprovalsResult.class); } + /** + * Notification payload describing the permission prompt that the client just rendered. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture notifyPromptShown(SessionPermissionsNotifyPromptShownParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.permissions.notifyPromptShown", _p, SessionPermissionsNotifyPromptShownResult.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsConfigureParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsConfigureParams.java new file mode 100644 index 000000000..494495fc5 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsConfigureParams.java @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Patch of permission policy fields to apply (omit a field to leave it unchanged). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsConfigureParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** If specified, sets whether tool permission requests are auto-approved without prompting. Omit to leave the current value unchanged. */ + @JsonProperty("approveAllToolPermissionRequests") Boolean approveAllToolPermissionRequests, + /** If specified, sets whether path/URL read permission requests are auto-approved. Omit to leave the current value unchanged. */ + @JsonProperty("approveAllReadPermissionRequests") Boolean approveAllReadPermissionRequests, + /** If specified, replaces the session's approved/denied permission rules. Omit to leave the current rules unchanged. */ + @JsonProperty("rules") PermissionRulesSet rules, + /** If specified, replaces the session's path-permission policy. The runtime constructs the appropriate PathManager based on these inputs (rooted at the session's working directory). Omit to leave the current path policy unchanged. */ + @JsonProperty("paths") PermissionPathsConfig paths, + /** If specified, replaces the session's URL-permission policy. The runtime constructs a fresh DefaultUrlManager based on these inputs. Omit to leave the current URL policy unchanged. */ + @JsonProperty("urls") PermissionUrlsConfig urls, + /** If specified, replaces the host-supplied GitHub Content Exclusion policies on the session (combined with natively-discovered policies when evaluating tool/file access). Omit to leave the current policies unchanged. */ + @JsonProperty("additionalContentExclusionPolicies") List additionalContentExclusionPolicies +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsConfigureResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsConfigureResult.java new file mode 100644 index 000000000..7f9ce4150 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsConfigureResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the operation succeeded. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsConfigureResult( + /** Whether the operation succeeded */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustAddTrustedParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustAddTrustedParams.java new file mode 100644 index 000000000..184087f22 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustAddTrustedParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Folder path to add to trusted folders. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsFolderTrustAddTrustedParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Folder path to mark as trusted */ + @JsonProperty("path") String path +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustAddTrustedResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustAddTrustedResult.java new file mode 100644 index 000000000..dbe09efc5 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustAddTrustedResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the operation succeeded. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsFolderTrustAddTrustedResult( + /** Whether the operation succeeded */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustApi.java new file mode 100644 index 000000000..5337a40f1 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustApi.java @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code permissions.folderTrust} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionPermissionsFolderTrustApi { + + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionPermissionsFolderTrustApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * Folder path to check for trust. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture isTrusted(SessionPermissionsFolderTrustIsTrustedParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.permissions.folderTrust.isTrusted", _p, SessionPermissionsFolderTrustIsTrustedResult.class); + } + + /** + * Folder path to add to trusted folders. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture addTrusted(SessionPermissionsFolderTrustAddTrustedParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.permissions.folderTrust.addTrusted", _p, SessionPermissionsFolderTrustAddTrustedResult.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustIsTrustedParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustIsTrustedParams.java new file mode 100644 index 000000000..bacbe5649 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustIsTrustedParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Folder path to check for trust. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsFolderTrustIsTrustedParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Folder path to check */ + @JsonProperty("path") String path +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustIsTrustedResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustIsTrustedResult.java new file mode 100644 index 000000000..3f2e26a0d --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsFolderTrustIsTrustedResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Folder trust check result. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsFolderTrustIsTrustedResult( + /** Whether the folder is trusted */ + @JsonProperty("trusted") Boolean trusted +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsHandlePendingPermissionRequestParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsHandlePendingPermissionRequestParams.java index 7991f3248..f8f10a8d1 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsHandlePendingPermissionRequestParams.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsHandlePendingPermissionRequestParams.java @@ -25,7 +25,7 @@ public record SessionPermissionsHandlePendingPermissionRequestParams( @JsonProperty("sessionId") String sessionId, /** Request ID of the pending permission request */ @JsonProperty("requestId") String requestId, - /** Decision to apply to a pending permission request. */ + /** The client's response to the pending permission prompt */ @JsonProperty("result") Object result ) { } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsAddToolApprovalParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsAddToolApprovalParams.java new file mode 100644 index 000000000..42429498d --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsAddToolApprovalParams.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Location-scoped tool approval to persist. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsLocationsAddToolApprovalParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Location key (git root or cwd) to persist the approval to */ + @JsonProperty("locationKey") String locationKey, + /** Tool approval to persist and apply */ + @JsonProperty("approval") Object approval +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsAddToolApprovalResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsAddToolApprovalResult.java new file mode 100644 index 000000000..fae259c23 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsAddToolApprovalResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the operation succeeded. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsLocationsAddToolApprovalResult( + /** Whether the operation succeeded */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsApi.java new file mode 100644 index 000000000..388bd49df --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsApi.java @@ -0,0 +1,77 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code permissions.locations} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionPermissionsLocationsApi { + + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionPermissionsLocationsApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * Working directory to resolve into a location-permissions key. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture resolve(SessionPermissionsLocationsResolveParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.permissions.locations.resolve", _p, SessionPermissionsLocationsResolveResult.class); + } + + /** + * Working directory to load persisted location permissions for. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture apply(SessionPermissionsLocationsApplyParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.permissions.locations.apply", _p, SessionPermissionsLocationsApplyResult.class); + } + + /** + * Location-scoped tool approval to persist. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture addToolApproval(SessionPermissionsLocationsAddToolApprovalParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.permissions.locations.addToolApproval", _p, SessionPermissionsLocationsAddToolApprovalResult.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsApplyParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsApplyParams.java new file mode 100644 index 000000000..7af5ef28f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsApplyParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Working directory to load persisted location permissions for. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsLocationsApplyParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Working directory whose persisted location permissions should be applied */ + @JsonProperty("workingDirectory") String workingDirectory +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsApplyResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsApplyResult.java new file mode 100644 index 000000000..b2514d8af --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsApplyResult.java @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Summary of persisted location permissions applied to the session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsLocationsApplyResult( + /** Location key used in the location-permissions store */ + @JsonProperty("locationKey") String locationKey, + /** Whether the location is a git repo or directory */ + @JsonProperty("locationType") PermissionLocationType locationType, + /** Whether a different location was applied since the previous apply call */ + @JsonProperty("changed") Boolean changed, + /** Number of location-scoped rules added to the live permission service */ + @JsonProperty("appliedRuleCount") Long appliedRuleCount, + /** Number of persisted allowed directories added to the live path manager */ + @JsonProperty("appliedDirectoryCount") Long appliedDirectoryCount, + /** Location-scoped rules applied to the live permission service */ + @JsonProperty("appliedRules") List appliedRules +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsResolveParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsResolveParams.java new file mode 100644 index 000000000..d6ba06fba --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsResolveParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Working directory to resolve into a location-permissions key. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsLocationsResolveParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Working directory whose permission location should be resolved */ + @JsonProperty("workingDirectory") String workingDirectory +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsResolveResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsResolveResult.java new file mode 100644 index 000000000..3254bb2c6 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsLocationsResolveResult.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Resolved location-permissions key and type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsLocationsResolveResult( + /** Location key used in the location-permissions store */ + @JsonProperty("locationKey") String locationKey, + /** Whether the location is a git repo or directory */ + @JsonProperty("locationType") PermissionLocationType locationType +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsModifyRulesParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsModifyRulesParams.java new file mode 100644 index 000000000..ca91f611e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsModifyRulesParams.java @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Scope and add/remove instructions for modifying session- or location-scoped permission rules. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsModifyRulesParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Whether the change applies to ephemeral session-scoped rules (cleared at session end) or to location-scoped rules persisted via the location-permissions config file. */ + @JsonProperty("scope") PermissionsModifyRulesScope scope, + /** Rules to add to the scope. Applied before `remove`/`removeAll`. */ + @JsonProperty("add") List add, + /** Specific rules to remove from the scope. Ignored when `removeAll` is true. */ + @JsonProperty("remove") List remove, + /** When true, removes every rule currently in the scope (after any `add` is applied). Useful for clearing the location scope wholesale. */ + @JsonProperty("removeAll") Boolean removeAll +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsModifyRulesResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsModifyRulesResult.java new file mode 100644 index 000000000..b4ed7786f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsModifyRulesResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the operation succeeded. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsModifyRulesResult( + /** Whether the operation succeeded */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsNotifyPromptShownParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsNotifyPromptShownParams.java new file mode 100644 index 000000000..50129680f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsNotifyPromptShownParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Notification payload describing the permission prompt that the client just rendered. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsNotifyPromptShownParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Human-readable description of the prompt the user is being asked to approve. Used by the runtime to fire the registered `permission_prompt` notification hook (e.g. terminal bell, desktop notification). */ + @JsonProperty("message") String message +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsNotifyPromptShownResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsNotifyPromptShownResult.java new file mode 100644 index 000000000..6f2a368f4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsNotifyPromptShownResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the operation succeeded. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsNotifyPromptShownResult( + /** Whether the operation succeeded */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsAddParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsAddParams.java new file mode 100644 index 000000000..5730b6b5e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsAddParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Directory path to add to the session's allowed directories. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsPathsAddParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Directory to add to the allow-list. The runtime resolves and validates the path before adding. */ + @JsonProperty("path") String path +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsAddResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsAddResult.java new file mode 100644 index 000000000..efb8fd5c4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsAddResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the operation succeeded. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsPathsAddResult( + /** Whether the operation succeeded */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsApi.java new file mode 100644 index 000000000..38ad70c67 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsApi.java @@ -0,0 +1,102 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code permissions.paths} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionPermissionsPathsApi { + + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionPermissionsPathsApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * No parameters; returns the session's allow-listed directories. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture list() { + return caller.invoke("session.permissions.paths.list", java.util.Map.of("sessionId", this.sessionId), SessionPermissionsPathsListResult.class); + } + + /** + * Directory path to add to the session's allowed directories. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture add(SessionPermissionsPathsAddParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.permissions.paths.add", _p, SessionPermissionsPathsAddResult.class); + } + + /** + * Directory path to set as the session's new primary working directory. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture updatePrimary(SessionPermissionsPathsUpdatePrimaryParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.permissions.paths.updatePrimary", _p, SessionPermissionsPathsUpdatePrimaryResult.class); + } + + /** + * Path to evaluate against the session's allowed directories. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture isPathWithinAllowedDirectories(SessionPermissionsPathsIsPathWithinAllowedDirectoriesParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.permissions.paths.isPathWithinAllowedDirectories", _p, SessionPermissionsPathsIsPathWithinAllowedDirectoriesResult.class); + } + + /** + * Path to evaluate against the session's workspace (primary) directory. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture isPathWithinWorkspace(SessionPermissionsPathsIsPathWithinWorkspaceParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.permissions.paths.isPathWithinWorkspace", _p, SessionPermissionsPathsIsPathWithinWorkspaceResult.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinAllowedDirectoriesParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinAllowedDirectoriesParams.java new file mode 100644 index 000000000..71bd09a61 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinAllowedDirectoriesParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Path to evaluate against the session's allowed directories. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsPathsIsPathWithinAllowedDirectoriesParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Path to check against the session's allowed directories */ + @JsonProperty("path") String path +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinAllowedDirectoriesResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinAllowedDirectoriesResult.java new file mode 100644 index 000000000..6aadee068 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinAllowedDirectoriesResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the supplied path is within the session's allowed directories. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsPathsIsPathWithinAllowedDirectoriesResult( + /** Whether the path is within the session's allowed directories */ + @JsonProperty("allowed") Boolean allowed +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinWorkspaceParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinWorkspaceParams.java new file mode 100644 index 000000000..699bf4cc8 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinWorkspaceParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Path to evaluate against the session's workspace (primary) directory. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsPathsIsPathWithinWorkspaceParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Path to check against the session workspace directory */ + @JsonProperty("path") String path +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinWorkspaceResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinWorkspaceResult.java new file mode 100644 index 000000000..3d64be687 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsIsPathWithinWorkspaceResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the supplied path is within the session's workspace directory. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsPathsIsPathWithinWorkspaceResult( + /** Whether the path is within the session workspace directory */ + @JsonProperty("allowed") Boolean allowed +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsListParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsListParams.java new file mode 100644 index 000000000..23fad022d --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsListParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * No parameters; returns the session's allow-listed directories. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsPathsListParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsListResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsListResult.java new file mode 100644 index 000000000..ab56c4a29 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsListResult.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Snapshot of the session's allow-listed directories and primary working directory. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsPathsListResult( + /** All directories currently allowed for tool access on this session. */ + @JsonProperty("directories") List directories, + /** The primary working directory for this session. */ + @JsonProperty("primary") String primary +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsUpdatePrimaryParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsUpdatePrimaryParams.java new file mode 100644 index 000000000..626ef5752 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsUpdatePrimaryParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Directory path to set as the session's new primary working directory. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsPathsUpdatePrimaryParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Directory to set as the new primary working directory for the session's permission policy. */ + @JsonProperty("path") String path +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsUpdatePrimaryResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsUpdatePrimaryResult.java new file mode 100644 index 000000000..34b8c403e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPathsUpdatePrimaryResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the operation succeeded. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsPathsUpdatePrimaryResult( + /** Whether the operation succeeded */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPendingRequestsParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPendingRequestsParams.java new file mode 100644 index 000000000..c7ec7f946 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPendingRequestsParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * No parameters; returns currently-pending permission requests for the session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsPendingRequestsParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPendingRequestsResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPendingRequestsResult.java new file mode 100644 index 000000000..b2b3c4ec1 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsPendingRequestsResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * List of pending permission requests reconstructed from event history. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsPendingRequestsResult( + /** Pending permission prompts reconstructed from the session's event history. Equivalent to the set of `permission.requested` events that have not yet been followed by a matching `permission.completed` event. Used by clients (e.g. the CLI) to hydrate UI for prompts that were emitted before the client attached to the session. */ + @JsonProperty("items") List items +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetApproveAllParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetApproveAllParams.java index ac599a2df..c61bdcca0 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetApproveAllParams.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetApproveAllParams.java @@ -13,7 +13,7 @@ import javax.annotation.processing.Generated; /** - * Whether to auto-approve all tool permission requests for the rest of the session. + * Allow-all toggle for tool permission requests, with an optional telemetry source. * * @since 1.0.0 */ @@ -24,6 +24,8 @@ public record SessionPermissionsSetApproveAllParams( /** Target session identifier */ @JsonProperty("sessionId") String sessionId, /** Whether to auto-approve all tool permission requests */ - @JsonProperty("enabled") Boolean enabled + @JsonProperty("enabled") Boolean enabled, + /** Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers. */ + @JsonProperty("source") PermissionsSetApproveAllSource source ) { } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetRequiredParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetRequiredParams.java new file mode 100644 index 000000000..e862dd76f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetRequiredParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Toggles whether permission prompts should be bridged into session events for this client. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsSetRequiredParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Whether the client wants `permission.requested` events bridged from the session-owned permission service. CLI clients that render prompt UI set this to `true` for as long as their listener is mounted; headless callers leave it unset (the default is `false`). */ + @JsonProperty("required") Boolean required +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetRequiredResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetRequiredResult.java new file mode 100644 index 000000000..56f90afbc --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetRequiredResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the operation succeeded. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsSetRequiredResult( + /** Whether the operation succeeded */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsUrlsApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsUrlsApi.java new file mode 100644 index 000000000..1f46c66dc --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsUrlsApi.java @@ -0,0 +1,47 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code permissions.urls} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionPermissionsUrlsApi { + + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionPermissionsUrlsApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * Whether the URL-permission policy should run in unrestricted mode. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture setUnrestrictedMode(SessionPermissionsUrlsSetUnrestrictedModeParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.permissions.urls.setUnrestrictedMode", _p, SessionPermissionsUrlsSetUnrestrictedModeResult.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsUrlsSetUnrestrictedModeParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsUrlsSetUnrestrictedModeParams.java new file mode 100644 index 000000000..ed3c0bc6b --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsUrlsSetUnrestrictedModeParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Whether the URL-permission policy should run in unrestricted mode. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsUrlsSetUnrestrictedModeParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Whether to allow access to all URLs without prompting. Toggles the runtime's URL-permission policy in place. */ + @JsonProperty("enabled") Boolean enabled +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsUrlsSetUnrestrictedModeResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsUrlsSetUnrestrictedModeResult.java new file mode 100644 index 000000000..41199db33 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsUrlsSetUnrestrictedModeResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the operation succeeded. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionPermissionsUrlsSetUnrestrictedModeResult( + /** Whether the operation succeeded */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPlanApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPlanApi.java index 8f4bc6192..165621138 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPlanApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPlanApi.java @@ -31,6 +31,8 @@ public final class SessionPlanApi { /** * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture read() { @@ -42,6 +44,8 @@ public CompletableFuture read() { *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture update(SessionPlanUpdateParams params) { @@ -52,6 +56,8 @@ public CompletableFuture update(SessionPlanUpdateParams params) { /** * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture delete() { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueApi.java new file mode 100644 index 000000000..19533541d --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueApi.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code queue} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionQueueApi { + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionQueueApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture pendingItems() { + return caller.invoke("session.queue.pendingItems", java.util.Map.of("sessionId", this.sessionId), SessionQueuePendingItemsResult.class); + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture removeMostRecent() { + return caller.invoke("session.queue.removeMostRecent", java.util.Map.of("sessionId", this.sessionId), SessionQueueRemoveMostRecentResult.class); + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture clear() { + return caller.invoke("session.queue.clear", java.util.Map.of("sessionId", this.sessionId), Void.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueClearParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueClearParams.java new file mode 100644 index 000000000..1ab26019e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueClearParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionQueueClearParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueuePendingItemsParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueuePendingItemsParams.java new file mode 100644 index 000000000..6bc51f807 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueuePendingItemsParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionQueuePendingItemsParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueuePendingItemsResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueuePendingItemsResult.java new file mode 100644 index 000000000..9f839fdc1 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueuePendingItemsResult.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Snapshot of the session's pending queued items and immediate-steering messages. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionQueuePendingItemsResult( + /** Pending queued items in submission order. Includes user messages, queued slash commands, and queued model changes; omits internal system items. */ + @JsonProperty("items") List items, + /** Display text for messages currently in the immediate steering queue (interjections sent during a running turn). */ + @JsonProperty("steeringMessages") List steeringMessages +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueRemoveMostRecentParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueRemoveMostRecentParams.java new file mode 100644 index 000000000..1ca36be68 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueRemoveMostRecentParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionQueueRemoveMostRecentParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueRemoveMostRecentResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueRemoveMostRecentResult.java new file mode 100644 index 000000000..a92c93d5f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionQueueRemoveMostRecentResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether a user-facing pending item was removed. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionQueueRemoveMostRecentResult( + /** True if a user-facing pending item was removed (LIFO across both queues); false when no removable items remained. */ + @JsonProperty("removed") Boolean removed +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRemoteApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRemoteApi.java index ba3c91dd0..f5f0ec3cc 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRemoteApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRemoteApi.java @@ -54,4 +54,19 @@ public CompletableFuture disable() { return caller.invoke("session.remote.disable", java.util.Map.of("sessionId", this.sessionId), Void.class); } + /** + * New remote-steerability state to persist as a `session.remote_steerable_changed` event. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture notifySteerableChanged(SessionRemoteNotifySteerableChangedParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.remote.notifySteerableChanged", _p, Void.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRemoteNotifySteerableChangedParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRemoteNotifySteerableChangedParams.java new file mode 100644 index 000000000..8851fad7a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRemoteNotifySteerableChangedParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * New remote-steerability state to persist as a `session.remote_steerable_changed` event. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionRemoteNotifySteerableChangedParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Whether the session now supports remote steering via GitHub. The runtime persists this as a `session.remote_steerable_changed` event so resume/replay sees the up-to-date capability. */ + @JsonProperty("remoteSteerable") Boolean remoteSteerable +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRemoteNotifySteerableChangedResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRemoteNotifySteerableChangedResult.java new file mode 100644 index 000000000..857f37362 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRemoteNotifySteerableChangedResult.java @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Persist a steerability change as a `session.remote_steerable_changed` event. Used by the host (CLI / SDK consumer) when it has just finished enabling or disabling steering on a remote exporter that the runtime does not directly own. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionRemoteNotifySteerableChangedResult() { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRpc.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRpc.java index ffd890a76..a2639eb0a 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRpc.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRpc.java @@ -54,24 +54,38 @@ public final class SessionRpc { public final SessionMcpApi mcp; /** API methods for the {@code plugins} namespace. */ public final SessionPluginsApi plugins; + /** API methods for the {@code options} namespace. */ + public final SessionOptionsApi options; + /** API methods for the {@code lsp} namespace. */ + public final SessionLspApi lsp; /** API methods for the {@code extensions} namespace. */ public final SessionExtensionsApi extensions; /** API methods for the {@code tools} namespace. */ public final SessionToolsApi tools; /** API methods for the {@code commands} namespace. */ public final SessionCommandsApi commands; + /** API methods for the {@code telemetry} namespace. */ + public final SessionTelemetryApi telemetry; /** API methods for the {@code ui} namespace. */ public final SessionUiApi ui; /** API methods for the {@code permissions} namespace. */ public final SessionPermissionsApi permissions; + /** API methods for the {@code metadata} namespace. */ + public final SessionMetadataApi metadata; /** API methods for the {@code shell} namespace. */ public final SessionShellApi shell; /** API methods for the {@code history} namespace. */ public final SessionHistoryApi history; + /** API methods for the {@code queue} namespace. */ + public final SessionQueueApi queue; + /** API methods for the {@code eventLog} namespace. */ + public final SessionEventLogApi eventLog; /** API methods for the {@code usage} namespace. */ public final SessionUsageApi usage; /** API methods for the {@code remote} namespace. */ public final SessionRemoteApi remote; + /** API methods for the {@code schedule} namespace. */ + public final SessionScheduleApi schedule; /** * Creates a new session RPC client. @@ -95,19 +109,28 @@ public SessionRpc(RpcCaller caller, String sessionId) { this.skills = new SessionSkillsApi(caller, sessionId); this.mcp = new SessionMcpApi(caller, sessionId); this.plugins = new SessionPluginsApi(caller, sessionId); + this.options = new SessionOptionsApi(caller, sessionId); + this.lsp = new SessionLspApi(caller, sessionId); this.extensions = new SessionExtensionsApi(caller, sessionId); this.tools = new SessionToolsApi(caller, sessionId); this.commands = new SessionCommandsApi(caller, sessionId); + this.telemetry = new SessionTelemetryApi(caller, sessionId); this.ui = new SessionUiApi(caller, sessionId); this.permissions = new SessionPermissionsApi(caller, sessionId); + this.metadata = new SessionMetadataApi(caller, sessionId); this.shell = new SessionShellApi(caller, sessionId); this.history = new SessionHistoryApi(caller, sessionId); + this.queue = new SessionQueueApi(caller, sessionId); + this.eventLog = new SessionEventLogApi(caller, sessionId); this.usage = new SessionUsageApi(caller, sessionId); this.remote = new SessionRemoteApi(caller, sessionId); + this.schedule = new SessionScheduleApi(caller, sessionId); } /** * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture suspend() { @@ -115,10 +138,57 @@ public CompletableFuture suspend() { } /** - * Message text, optional severity level, persistence flag, and optional follow-up URL. + * Parameters for sending a user message to the session + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture send(SessionSendParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.send", _p, SessionSendResult.class); + } + + /** + * Parameters for aborting the current turn *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture abort(SessionAbortParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.abort", _p, SessionAbortResult.class); + } + + /** + * Parameters for shutting down the session + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture shutdown(SessionShutdownParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.shutdown", _p, Void.class); + } + + /** + * Message text, optional severity level, persistence flag, optional follow-up URL, and optional tip. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture log(SessionLogParams params) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleApi.java new file mode 100644 index 000000000..a0714233b --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleApi.java @@ -0,0 +1,57 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code schedule} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionScheduleApi { + + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionScheduleApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture list() { + return caller.invoke("session.schedule.list", java.util.Map.of("sessionId", this.sessionId), SessionScheduleListResult.class); + } + + /** + * Identifier of the scheduled prompt to remove. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture stop(SessionScheduleStopParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.schedule.stop", _p, SessionScheduleStopResult.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleListParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleListParams.java new file mode 100644 index 000000000..0b32d10d8 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleListParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionScheduleListParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleListResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleListResult.java new file mode 100644 index 000000000..80202f88d --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleListResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Snapshot of the currently active recurring prompts for this session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionScheduleListResult( + /** Active scheduled prompts, ordered by id. */ + @JsonProperty("entries") List entries +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleStopParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleStopParams.java new file mode 100644 index 000000000..f82cca373 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleStopParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifier of the scheduled prompt to remove. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionScheduleStopParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Id of the scheduled prompt to remove. */ + @JsonProperty("id") Long id +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleStopResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleStopResult.java new file mode 100644 index 000000000..803706803 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionScheduleStopResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Remove a scheduled prompt by id. The result entry is omitted if the id was unknown. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionScheduleStopResult( + /** The removed entry, or omitted if no entry matched. */ + @JsonProperty("entry") ScheduleEntry entry +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSendParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSendParams.java new file mode 100644 index 000000000..2769253f9 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSendParams.java @@ -0,0 +1,55 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Parameters for sending a user message to the session + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSendParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** The user message text */ + @JsonProperty("prompt") String prompt, + /** If provided, this is shown in the timeline instead of `prompt` */ + @JsonProperty("displayPrompt") String displayPrompt, + /** Optional attachments (files, directories, selections, blobs, GitHub references) to include with the message */ + @JsonProperty("attachments") List attachments, + /** How to deliver the message. `enqueue` (default) appends to the message queue. `immediate` interjects during an in-progress turn. */ + @JsonProperty("mode") SendMode mode, + /** If true, adds the message to the front of the queue instead of the end */ + @JsonProperty("prepend") Boolean prepend, + /** If false, this message will not trigger a Premium Request Unit charge. User messages default to billable. */ + @JsonProperty("billable") Boolean billable, + /** If set, the request will fail if the named tool is not available when this message is among the user messages at the start of the current exchange */ + @JsonProperty("requiredTool") String requiredTool, + /** Optional provenance tag copied to the resulting user.message event. Supported values are `system`, `command-*`, and `schedule-*`. */ + @JsonProperty("source") Object source, + /** The UI mode the agent was in when this message was sent. Defaults to the session's current mode. */ + @JsonProperty("agentMode") SendAgentMode agentMode, + /** Custom HTTP headers to include in outbound model requests for this turn. Merged with session-level provider headers; per-turn headers augment and overwrite session-level headers with the same key. */ + @JsonProperty("requestHeaders") Map requestHeaders, + /** W3C Trace Context traceparent header for distributed tracing of this agent turn */ + @JsonProperty("traceparent") String traceparent, + /** W3C Trace Context tracestate header for distributed tracing */ + @JsonProperty("tracestate") String tracestate, + /** If true, await completion of the agentic loop for this message before returning. Defaults to false (fire-and-forget). When true, the result still contains the same `messageId`; the caller can rely on the agent having processed the message before the call resolves. */ + @JsonProperty("wait") Boolean wait +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSendResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSendResult.java new file mode 100644 index 000000000..d93c58ce1 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSendResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Result of sending a user message + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSendResult( + /** Unique identifier assigned to the message */ + @JsonProperty("messageId") String messageId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShellApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShellApi.java index 4a8e6a86c..6ed7c8b6b 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShellApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShellApi.java @@ -34,6 +34,8 @@ public final class SessionShellApi { *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture exec(SessionShellExecParams params) { @@ -47,6 +49,8 @@ public CompletableFuture exec(SessionShellExecParams par *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture kill(SessionShellKillParams params) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShutdownParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShutdownParams.java new file mode 100644 index 000000000..e7bf266e8 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShutdownParams.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Parameters for shutting down the session + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionShutdownParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Why the session is being shut down. Defaults to "routine" when omitted. */ + @JsonProperty("type") ShutdownType type, + /** Optional human-readable reason. Typically the message of the error that triggered shutdown when type is 'error'. */ + @JsonProperty("reason") String reason +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsApi.java index a96f410f0..82cea6a8f 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsApi.java @@ -39,6 +39,16 @@ public CompletableFuture list() { return caller.invoke("session.skills.list", java.util.Map.of("sessionId", this.sessionId), SessionSkillsListResult.class); } + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture getInvoked() { + return caller.invoke("session.skills.getInvoked", java.util.Map.of("sessionId", this.sessionId), SessionSkillsGetInvokedResult.class); + } + /** * Name of the skill to enable for the session. *

@@ -79,4 +89,14 @@ public CompletableFuture reload() { return caller.invoke("session.skills.reload", java.util.Map.of("sessionId", this.sessionId), SessionSkillsReloadResult.class); } + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture ensureLoaded() { + return caller.invoke("session.skills.ensureLoaded", java.util.Map.of("sessionId", this.sessionId), Void.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsEnsureLoadedParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsEnsureLoadedParams.java new file mode 100644 index 000000000..8b7ab0e62 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsEnsureLoadedParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSkillsEnsureLoadedParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsGetInvokedParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsGetInvokedParams.java new file mode 100644 index 000000000..8ae29d5e7 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsGetInvokedParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSkillsGetInvokedParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsGetInvokedResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsGetInvokedResult.java new file mode 100644 index 000000000..f20c657c0 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsGetInvokedResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Skills invoked during this session, ordered by invocation time (most recent last). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionSkillsGetInvokedResult( + /** Skills invoked during this session, ordered by invocation time (most recent last) */ + @JsonProperty("skills") List skills +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksApi.java index 577d91ee3..5fa5ca90f 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksApi.java @@ -54,6 +54,51 @@ public CompletableFuture list() { return caller.invoke("session.tasks.list", java.util.Map.of("sessionId", this.sessionId), SessionTasksListResult.class); } + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture refresh() { + return caller.invoke("session.tasks.refresh", java.util.Map.of("sessionId", this.sessionId), Void.class); + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture waitForPending() { + return caller.invoke("session.tasks.waitForPending", java.util.Map.of("sessionId", this.sessionId), Void.class); + } + + /** + * Identifier of the background task to fetch progress for. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture getProgress(SessionTasksGetProgressParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.tasks.getProgress", _p, SessionTasksGetProgressResult.class); + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture getCurrentPromotable() { + return caller.invoke("session.tasks.getCurrentPromotable", java.util.Map.of("sessionId", this.sessionId), SessionTasksGetCurrentPromotableResult.class); + } + /** * Identifier of the task to promote to background mode. *

@@ -69,6 +114,16 @@ public CompletableFuture promoteToBackgro return caller.invoke("session.tasks.promoteToBackground", _p, SessionTasksPromoteToBackgroundResult.class); } + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture promoteCurrentToBackground() { + return caller.invoke("session.tasks.promoteCurrentToBackground", java.util.Map.of("sessionId", this.sessionId), SessionTasksPromoteCurrentToBackgroundResult.class); + } + /** * Identifier of the background task to cancel. *

diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetCurrentPromotableParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetCurrentPromotableParams.java new file mode 100644 index 000000000..e183c7bc4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetCurrentPromotableParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionTasksGetCurrentPromotableParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetCurrentPromotableResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetCurrentPromotableResult.java new file mode 100644 index 000000000..65eee3220 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetCurrentPromotableResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * The first sync-waiting task that can currently be promoted to background mode. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionTasksGetCurrentPromotableResult( + /** The first sync-waiting task (agent first, then shell) that can currently be promoted to background mode. Omitted if no such task exists. The returned task is guaranteed to have executionMode='sync' and canPromoteToBackground=true at the time of the call. */ + @JsonProperty("task") Object task +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetProgressParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetProgressParams.java new file mode 100644 index 000000000..bcdf9a8d8 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetProgressParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifier of the background task to fetch progress for. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionTasksGetProgressParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Task identifier (agent ID or shell ID) */ + @JsonProperty("id") String id +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetProgressResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetProgressResult.java new file mode 100644 index 000000000..d2a4c7eb5 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksGetProgressResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Progress information for the task, or null when no task with that ID is tracked. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionTasksGetProgressResult( + /** Progress information for the task, discriminated by type. Returns null when no task with this ID is currently tracked. */ + @JsonProperty("progress") Object progress +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksPromoteCurrentToBackgroundParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksPromoteCurrentToBackgroundParams.java new file mode 100644 index 000000000..31c7fa94a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksPromoteCurrentToBackgroundParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionTasksPromoteCurrentToBackgroundParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksPromoteCurrentToBackgroundResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksPromoteCurrentToBackgroundResult.java new file mode 100644 index 000000000..590082505 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksPromoteCurrentToBackgroundResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * The promoted task as it now exists in background mode, omitted if no promotable task was waiting. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionTasksPromoteCurrentToBackgroundResult( + /** The promoted task as it now exists in background mode, omitted if no promotable task was waiting. Atomic operation: avoids the race window of getCurrentPromotable + promoteToBackground. */ + @JsonProperty("task") Object task +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksRefreshParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksRefreshParams.java new file mode 100644 index 000000000..3560835af --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksRefreshParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionTasksRefreshParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksRefreshResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksRefreshResult.java new file mode 100644 index 000000000..c38636976 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksRefreshResult.java @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Refresh metadata for any detached background shells the runtime knows about. Use after a long pause to pick up exit/output state for shells running outside the agent loop. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionTasksRefreshResult() { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksWaitForPendingParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksWaitForPendingParams.java new file mode 100644 index 000000000..6dc935822 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksWaitForPendingParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionTasksWaitForPendingParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksWaitForPendingResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksWaitForPendingResult.java new file mode 100644 index 000000000..5cbce9cd5 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTasksWaitForPendingResult.java @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Wait until all in-flight background tasks (agents + shells) and any follow-up turns scheduled by their completions have settled. Returns when the runtime is fully drained or after an internal timeout (default 10 minutes; configurable via COPILOT_TASK_WAIT_TIMEOUT_SECONDS). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionTasksWaitForPendingResult() { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTelemetryApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTelemetryApi.java new file mode 100644 index 000000000..5cad4e771 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTelemetryApi.java @@ -0,0 +1,47 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import java.util.concurrent.CompletableFuture; +import javax.annotation.processing.Generated; + +/** + * API methods for the {@code telemetry} namespace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionTelemetryApi { + + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + + private final RpcCaller caller; + private final String sessionId; + + /** @param caller the RPC transport function */ + SessionTelemetryApi(RpcCaller caller, String sessionId) { + this.caller = caller; + this.sessionId = sessionId; + } + + /** + * Feature override key/value pairs to attach to subsequent telemetry events from this session. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture setFeatureOverrides(SessionTelemetrySetFeatureOverridesParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.telemetry.setFeatureOverrides", _p, Void.class); + } + +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTelemetrySetFeatureOverridesParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTelemetrySetFeatureOverridesParams.java new file mode 100644 index 000000000..aa0d4e3c3 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionTelemetrySetFeatureOverridesParams.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Feature override key/value pairs to attach to subsequent telemetry events from this session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionTelemetrySetFeatureOverridesParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Override key/value pairs to attach to subsequent telemetry events from this session. Replaces any previously-set overrides. */ + @JsonProperty("features") Map features +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionToolsApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionToolsApi.java index 323fdfe51..ded588627 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionToolsApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionToolsApi.java @@ -34,6 +34,8 @@ public final class SessionToolsApi { *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture handlePendingToolCall(SessionToolsHandlePendingToolCallParams params) { @@ -42,4 +44,14 @@ public CompletableFuture handlePendingT return caller.invoke("session.tools.handlePendingToolCall", _p, SessionToolsHandlePendingToolCallResult.class); } + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture initializeAndValidate() { + return caller.invoke("session.tools.initializeAndValidate", java.util.Map.of("sessionId", this.sessionId), Void.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionToolsInitializeAndValidateParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionToolsInitializeAndValidateParams.java new file mode 100644 index 000000000..d3ec2aeea --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionToolsInitializeAndValidateParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionToolsInitializeAndValidateParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionToolsInitializeAndValidateResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionToolsInitializeAndValidateResult.java new file mode 100644 index 000000000..d25c0e5a8 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionToolsInitializeAndValidateResult.java @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Resolve, build, and validate the runtime tool list for this session. Subagent sessions and consumer flows that need an initialized tool set before `send` invoke this. Default base-class implementation is a no-op for sessions that don't support tool validation. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionToolsInitializeAndValidateResult() { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiApi.java index ef37d580d..3ae829588 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiApi.java @@ -34,6 +34,8 @@ public final class SessionUiApi { *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture elicitation(SessionUiElicitationParams params) { @@ -47,6 +49,8 @@ public CompletableFuture elicitation(SessionUiElicit *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture handlePendingElicitation(SessionUiHandlePendingElicitationParams params) { @@ -55,4 +59,89 @@ public CompletableFuture handlePendingE return caller.invoke("session.ui.handlePendingElicitation", _p, SessionUiHandlePendingElicitationResult.class); } + /** + * Request ID of a pending `user_input.requested` event and the user's response. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture handlePendingUserInput(SessionUiHandlePendingUserInputParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.ui.handlePendingUserInput", _p, SessionUiHandlePendingUserInputResult.class); + } + + /** + * Request ID of a pending `sampling.requested` event and an optional sampling result payload (omit to reject). + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture handlePendingSampling(SessionUiHandlePendingSamplingParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.ui.handlePendingSampling", _p, SessionUiHandlePendingSamplingResult.class); + } + + /** + * Request ID of a pending `auto_mode_switch.requested` event and the user's response. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture handlePendingAutoModeSwitch(SessionUiHandlePendingAutoModeSwitchParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.ui.handlePendingAutoModeSwitch", _p, SessionUiHandlePendingAutoModeSwitchResult.class); + } + + /** + * Request ID of a pending `exit_plan_mode.requested` event and the user's response. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture handlePendingExitPlanMode(SessionUiHandlePendingExitPlanModeParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.ui.handlePendingExitPlanMode", _p, SessionUiHandlePendingExitPlanModeResult.class); + } + + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture registerDirectAutoModeSwitchHandler() { + return caller.invoke("session.ui.registerDirectAutoModeSwitchHandler", java.util.Map.of("sessionId", this.sessionId), SessionUiRegisterDirectAutoModeSwitchHandlerResult.class); + } + + /** + * Opaque handle previously returned by `registerDirectAutoModeSwitchHandler` to release. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture unregisterDirectAutoModeSwitchHandler(SessionUiUnregisterDirectAutoModeSwitchHandlerParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.ui.unregisterDirectAutoModeSwitchHandler", _p, SessionUiUnregisterDirectAutoModeSwitchHandlerResult.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingAutoModeSwitchParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingAutoModeSwitchParams.java new file mode 100644 index 000000000..ab37b178c --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingAutoModeSwitchParams.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Request ID of a pending `auto_mode_switch.requested` event and the user's response. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionUiHandlePendingAutoModeSwitchParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** The unique request ID from the auto_mode_switch.requested event */ + @JsonProperty("requestId") String requestId, + /** User's choice for auto-mode switching: yes (allow this turn), yes_always (allow + persist as setting), or no (decline). */ + @JsonProperty("response") UIAutoModeSwitchResponse response +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingAutoModeSwitchResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingAutoModeSwitchResult.java new file mode 100644 index 000000000..0df5ca571 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingAutoModeSwitchResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the pending UI request was resolved by this call. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionUiHandlePendingAutoModeSwitchResult( + /** True if the request was still pending and was resolved by this call. False if the request ID was unknown, already resolved by another client (e.g. GitHub), expired, or otherwise no longer pending. */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingExitPlanModeParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingExitPlanModeParams.java new file mode 100644 index 000000000..a83d7d038 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingExitPlanModeParams.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Request ID of a pending `exit_plan_mode.requested` event and the user's response. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionUiHandlePendingExitPlanModeParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** The unique request ID from the exit_plan_mode.requested event */ + @JsonProperty("requestId") String requestId, + /** Schema for the `UIExitPlanModeResponse` type. */ + @JsonProperty("response") UIExitPlanModeResponse response +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingExitPlanModeResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingExitPlanModeResult.java new file mode 100644 index 000000000..c3c183b51 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingExitPlanModeResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the pending UI request was resolved by this call. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionUiHandlePendingExitPlanModeResult( + /** True if the request was still pending and was resolved by this call. False if the request ID was unknown, already resolved by another client (e.g. GitHub), expired, or otherwise no longer pending. */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingSamplingParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingSamplingParams.java new file mode 100644 index 000000000..6c4304fd5 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingSamplingParams.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Request ID of a pending `sampling.requested` event and an optional sampling result payload (omit to reject). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionUiHandlePendingSamplingParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** The unique request ID from the sampling.requested event */ + @JsonProperty("requestId") String requestId, + /** Optional sampling result payload. Omit to reject/cancel the sampling request without providing a result. */ + @JsonProperty("response") UIHandlePendingSamplingResponse response +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingSamplingResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingSamplingResult.java new file mode 100644 index 000000000..2fa7e09e1 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingSamplingResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the pending UI request was resolved by this call. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionUiHandlePendingSamplingResult( + /** True if the request was still pending and was resolved by this call. False if the request ID was unknown, already resolved by another client (e.g. GitHub), expired, or otherwise no longer pending. */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingUserInputParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingUserInputParams.java new file mode 100644 index 000000000..3e1624bf2 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingUserInputParams.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Request ID of a pending `user_input.requested` event and the user's response. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionUiHandlePendingUserInputParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** The unique request ID from the user_input.requested event */ + @JsonProperty("requestId") String requestId, + /** Schema for the `UIUserInputResponse` type. */ + @JsonProperty("response") UIUserInputResponse response +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingUserInputResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingUserInputResult.java new file mode 100644 index 000000000..fb240b3c5 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingUserInputResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the pending UI request was resolved by this call. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionUiHandlePendingUserInputResult( + /** True if the request was still pending and was resolved by this call. False if the request ID was unknown, already resolved by another client (e.g. GitHub), expired, or otherwise no longer pending. */ + @JsonProperty("success") Boolean success +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiRegisterDirectAutoModeSwitchHandlerParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiRegisterDirectAutoModeSwitchHandlerParams.java new file mode 100644 index 000000000..42c8ba2a5 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiRegisterDirectAutoModeSwitchHandlerParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionUiRegisterDirectAutoModeSwitchHandlerParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiRegisterDirectAutoModeSwitchHandlerResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiRegisterDirectAutoModeSwitchHandlerResult.java new file mode 100644 index 000000000..5aedb596b --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiRegisterDirectAutoModeSwitchHandlerResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Register an in-process handler for `auto_mode_switch.requested` events. The caller still attaches the actual listener via the standard event-subscription mechanism; this registration solely tells the server bridge to skip its own dispatch (so a remote client doesn't race the in-process handler for the same requestId). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionUiRegisterDirectAutoModeSwitchHandlerResult( + /** Opaque handle representing the registration. Pass this same handle to `unregisterDirectAutoModeSwitchHandler` when the in-process handler is no longer active. Multiple registrations are reference-counted; the server bridge will only dispatch auto-mode-switch requests when no handles are active. */ + @JsonProperty("handle") String handle +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiUnregisterDirectAutoModeSwitchHandlerParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiUnregisterDirectAutoModeSwitchHandlerParams.java new file mode 100644 index 000000000..c22ad46e7 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiUnregisterDirectAutoModeSwitchHandlerParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Opaque handle previously returned by `registerDirectAutoModeSwitchHandler` to release. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionUiUnregisterDirectAutoModeSwitchHandlerParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Handle previously returned by `registerDirectAutoModeSwitchHandler` */ + @JsonProperty("handle") String handle +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiUnregisterDirectAutoModeSwitchHandlerResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiUnregisterDirectAutoModeSwitchHandlerResult.java new file mode 100644 index 000000000..6d36ad751 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiUnregisterDirectAutoModeSwitchHandlerResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Indicates whether the handle was active and the registration count was decremented. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionUiUnregisterDirectAutoModeSwitchHandlerResult( + /** True if the handle was active and decremented the counter; false if the handle was unknown. */ + @JsonProperty("unregistered") Boolean unregistered +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUsageGetMetricsResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUsageGetMetricsResult.java index ee7bf42cd..21feae576 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUsageGetMetricsResult.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUsageGetMetricsResult.java @@ -10,6 +10,7 @@ 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.Map; import javax.annotation.processing.Generated; @@ -27,13 +28,13 @@ public record SessionUsageGetMetricsResult( /** Raw count of user-initiated API requests */ @JsonProperty("totalUserRequests") Long totalUserRequests, /** Session-wide accumulated nano-AI units cost */ - @JsonProperty("totalNanoAiu") Long totalNanoAiu, + @JsonProperty("totalNanoAiu") Double totalNanoAiu, /** Session-wide per-token-type accumulated token counts */ @JsonProperty("tokenDetails") Map tokenDetails, /** Total time spent in model API calls (milliseconds) */ - @JsonProperty("totalApiDurationMs") Double totalApiDurationMs, - /** Session start timestamp (epoch milliseconds) */ - @JsonProperty("sessionStartTime") Long sessionStartTime, + @JsonProperty("totalApiDurationMs") Long totalApiDurationMs, + /** ISO 8601 timestamp when the session started */ + @JsonProperty("sessionStartTime") OffsetDateTime sessionStartTime, /** Aggregated code change metrics */ @JsonProperty("codeChanges") UsageMetricsCodeChanges codeChanges, /** Per-model token and request metrics, keyed by model identifier */ diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkingDirectoryContext.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkingDirectoryContext.java new file mode 100644 index 000000000..4c17aa5ea --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkingDirectoryContext.java @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Updated working directory and git context. Emitted as the new payload of `session.context_changed`. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionWorkingDirectoryContext( + /** 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 */ + @JsonProperty("hostType") SessionWorkingDirectoryContextHostType hostType, + /** Raw host string from the git remote URL (e.g. "github.com", "dev.azure.com") */ + @JsonProperty("repositoryHost") String repositoryHost, + /** Current git branch name */ + @JsonProperty("branch") String branch, + /** Head commit of the current git branch */ + @JsonProperty("headCommit") String headCommit, + /** Merge-base commit SHA (fork point from the remote default branch) */ + @JsonProperty("baseCommit") String baseCommit +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkingDirectoryContextHostType.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkingDirectoryContextHostType.java new file mode 100644 index 000000000..0c5a0cffe --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkingDirectoryContextHostType.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Hosting platform type of the repository + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum SessionWorkingDirectoryContextHostType { + /** The {@code github} variant. */ + GITHUB("github"), + /** The {@code ado} variant. */ + ADO("ado"); + + private final String value; + SessionWorkingDirectoryContextHostType(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static SessionWorkingDirectoryContextHostType fromValue(String value) { + for (SessionWorkingDirectoryContextHostType v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown SessionWorkingDirectoryContextHostType value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesApi.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesApi.java index a88463737..de51e4a90 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesApi.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesApi.java @@ -31,6 +31,8 @@ public final class SessionWorkspacesApi { /** * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture getWorkspace() { @@ -39,6 +41,8 @@ public CompletableFuture getWorkspace() { /** * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture listFiles() { @@ -50,6 +54,8 @@ public CompletableFuture listFiles() { *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture readFile(SessionWorkspacesReadFileParams params) { @@ -63,6 +69,8 @@ public CompletableFuture readFile(SessionWorksp *

* Note: the {@code sessionId} field in the params record is overridden * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 */ public CompletableFuture createFile(SessionWorkspacesCreateFileParams params) { @@ -71,4 +79,44 @@ public CompletableFuture createFile(SessionWorkspacesCreateFileParams para return caller.invoke("session.workspaces.createFile", _p, Void.class); } + /** + * Identifies the target session. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture listCheckpoints() { + return caller.invoke("session.workspaces.listCheckpoints", java.util.Map.of("sessionId", this.sessionId), SessionWorkspacesListCheckpointsResult.class); + } + + /** + * Checkpoint number to read. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture readCheckpoint(SessionWorkspacesReadCheckpointParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.workspaces.readCheckpoint", _p, SessionWorkspacesReadCheckpointResult.class); + } + + /** + * Pasted content to save as a UTF-8 file in the session workspace. + *

+ * Note: the {@code sessionId} field in the params record is overridden + * by the session-scoped wrapper; any value provided is ignored. + * + * @apiNote This method is experimental and may change in a future version. + * @since 1.0.0 + */ + public CompletableFuture saveLargePaste(SessionWorkspacesSaveLargePasteParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.workspaces.saveLargePaste", _p, SessionWorkspacesSaveLargePasteResult.class); + } + } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesGetWorkspaceResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesGetWorkspaceResult.java index 3772d5f93..ded4778b4 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesGetWorkspaceResult.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesGetWorkspaceResult.java @@ -11,11 +11,10 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -import java.util.UUID; import javax.annotation.processing.Generated; /** - * Current workspace metadata for the session, or null when not available. + * Current workspace metadata for the session, including its absolute filesystem path when available. * * @since 1.0.0 */ @@ -24,17 +23,20 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record SessionWorkspacesGetWorkspaceResult( /** Current workspace metadata, or null if not available */ - @JsonProperty("workspace") SessionWorkspacesGetWorkspaceResultWorkspace workspace + @JsonProperty("workspace") SessionWorkspacesGetWorkspaceResultWorkspace workspace, + /** Absolute filesystem path to the workspace directory. Omitted when the session has no workspace (e.g. remote sessions). */ + @JsonProperty("path") String path ) { @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) public record SessionWorkspacesGetWorkspaceResultWorkspace( - @JsonProperty("id") UUID id, + @JsonProperty("id") String id, @JsonProperty("cwd") String cwd, @JsonProperty("git_root") String gitRoot, @JsonProperty("repository") String repository, - @JsonProperty("host_type") SessionWorkspacesGetWorkspaceResultWorkspaceHostType hostType, + /** Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. */ + @JsonProperty("host_type") WorkspacesWorkspaceDetailsHostType hostType, @JsonProperty("branch") String branch, @JsonProperty("name") String name, @JsonProperty("user_named") Boolean userNamed, @@ -47,24 +49,5 @@ public record SessionWorkspacesGetWorkspaceResultWorkspace( @JsonProperty("mc_last_event_id") String mcLastEventId, @JsonProperty("chronicle_sync_dismissed") Boolean chronicleSyncDismissed ) { - - public enum SessionWorkspacesGetWorkspaceResultWorkspaceHostType { - /** The {@code github} variant. */ - GITHUB("github"), - /** The {@code ado} variant. */ - ADO("ado"); - - private final String value; - SessionWorkspacesGetWorkspaceResultWorkspaceHostType(String value) { this.value = value; } - @com.fasterxml.jackson.annotation.JsonValue - public String getValue() { return value; } - @com.fasterxml.jackson.annotation.JsonCreator - public static SessionWorkspacesGetWorkspaceResultWorkspaceHostType fromValue(String value) { - for (SessionWorkspacesGetWorkspaceResultWorkspaceHostType v : values()) { - if (v.value.equals(value)) return v; - } - throw new IllegalArgumentException("Unknown SessionWorkspacesGetWorkspaceResultWorkspaceHostType value: " + value); - } - } } } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesListCheckpointsParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesListCheckpointsParams.java new file mode 100644 index 000000000..3f3c1ac1e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesListCheckpointsParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Identifies the target session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionWorkspacesListCheckpointsParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesListCheckpointsResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesListCheckpointsResult.java new file mode 100644 index 000000000..c25be02d4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesListCheckpointsResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Workspace checkpoints in chronological order; empty when the workspace is not enabled. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionWorkspacesListCheckpointsResult( + /** Workspace checkpoints in chronological order. Empty when workspace is not enabled. */ + @JsonProperty("checkpoints") List checkpoints +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesReadCheckpointParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesReadCheckpointParams.java new file mode 100644 index 000000000..851a01bd4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesReadCheckpointParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Checkpoint number to read. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionWorkspacesReadCheckpointParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Checkpoint number to read */ + @JsonProperty("number") Long number +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesReadCheckpointResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesReadCheckpointResult.java new file mode 100644 index 000000000..4f9e18709 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesReadCheckpointResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Checkpoint content as a UTF-8 string, or null when the checkpoint or workspace is missing. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionWorkspacesReadCheckpointResult( + /** Checkpoint content as a UTF-8 string, or null when the checkpoint or workspace is missing */ + @JsonProperty("content") String content +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesSaveLargePasteParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesSaveLargePasteParams.java new file mode 100644 index 000000000..466f5b7ba --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesSaveLargePasteParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Pasted content to save as a UTF-8 file in the session workspace. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionWorkspacesSaveLargePasteParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Pasted content to save as a UTF-8 file */ + @JsonProperty("content") String content +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesSaveLargePasteResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesSaveLargePasteResult.java new file mode 100644 index 000000000..84e5719d7 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesSaveLargePasteResult.java @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Descriptor for the saved paste file, or null when the workspace is unavailable. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionWorkspacesSaveLargePasteResult( + /** Saved-paste descriptor, or null when the workspace is unavailable (e.g. CCA runtime, non-infinite sessions, remote sessions) */ + @JsonProperty("saved") SessionWorkspacesSaveLargePasteResultSaved saved +) { + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record SessionWorkspacesSaveLargePasteResultSaved( + /** Absolute filesystem path to the saved paste file */ + @JsonProperty("filePath") String filePath, + /** Filename within the workspace files directory */ + @JsonProperty("filename") String filename, + /** Size of the saved file in bytes */ + @JsonProperty("sizeBytes") Long sizeBytes + ) { + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsBulkDeleteParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsBulkDeleteParams.java new file mode 100644 index 000000000..986103825 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsBulkDeleteParams.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Session IDs to close, deactivate, and delete from disk. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsBulkDeleteParams( + /** Session IDs to close, deactivate, and delete from disk */ + @JsonProperty("sessionIds") List sessionIds +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsBulkDeleteResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsBulkDeleteResult.java new file mode 100644 index 000000000..893dd8210 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsBulkDeleteResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Map of sessionId -> bytes freed by removing the session's workspace directory. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsBulkDeleteResult( + /** Map of sessionId -> bytes freed by removing the session's workspace directory. Sessions whose deletion failed are omitted from this map (failures are logged on the server but not surfaced per-id; check the map for absent IDs to detect them). */ + @JsonProperty("freedBytes") Map freedBytes +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCheckInUseParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCheckInUseParams.java new file mode 100644 index 000000000..be8b2e385 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCheckInUseParams.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Session IDs to test for live in-use locks. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsCheckInUseParams( + /** Session IDs to test for live in-use locks */ + @JsonProperty("sessionIds") List sessionIds +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCheckInUseResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCheckInUseResult.java new file mode 100644 index 000000000..c22e818cc --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCheckInUseResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Session IDs from the input set that are currently in use by another process. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsCheckInUseResult( + /** Session IDs from the input set that are currently held by another running process via an alive lock file */ + @JsonProperty("inUse") List inUse +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCloseParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCloseParams.java new file mode 100644 index 000000000..c29d385be --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCloseParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Session ID to close. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsCloseParams( + /** Session ID to close */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCloseResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCloseResult.java new file mode 100644 index 000000000..fc8c5ee66 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsCloseResult.java @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Closes a session: emits shutdown, flushes pending events to disk, releases the in-use lock, disposes the active session. Idempotent: succeeds even if the session is not currently active. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsCloseResult() { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsEnrichMetadataParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsEnrichMetadataParams.java new file mode 100644 index 000000000..ef3330a97 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsEnrichMetadataParams.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Session metadata records to enrich with summary and context information. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsEnrichMetadataParams( + /** Session metadata records to enrich. Records that already have summary and context are returned unchanged. */ + @JsonProperty("sessions") List sessions +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsEnrichMetadataResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsEnrichMetadataResult.java new file mode 100644 index 000000000..fee15a2ed --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsEnrichMetadataResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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 same metadata records, with summary and context fields backfilled where available. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsEnrichMetadataResult( + /** Same records, with summary and context backfilled */ + @JsonProperty("sessions") List sessions +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByPrefixParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByPrefixParams.java new file mode 100644 index 000000000..628d93cb8 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByPrefixParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * UUID prefix to resolve to a unique session ID. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsFindByPrefixParams( + /** UUID prefix (>=7 hex chars, <36 chars). Returns the unique session ID, or undefined when there is no match or the prefix matches multiple sessions. */ + @JsonProperty("prefix") String prefix +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByPrefixResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByPrefixResult.java new file mode 100644 index 000000000..94b3a106c --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByPrefixResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Session ID matching the prefix, omitted when no unique match exists. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsFindByPrefixResult( + /** Omitted when no unique session matches the prefix (no match or ambiguous) */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByTaskIdParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByTaskIdParams.java new file mode 100644 index 000000000..23e1aaaed --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByTaskIdParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * GitHub task ID to look up. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsFindByTaskIdParams( + /** GitHub task ID to look up */ + @JsonProperty("taskId") String taskId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByTaskIdResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByTaskIdResult.java new file mode 100644 index 000000000..eb5b9bfd4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsFindByTaskIdResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * ID of the local session bound to the given GitHub task, or omitted when none. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsFindByTaskIdResult( + /** Omitted when no local session is bound to that GitHub task */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetEventFilePathParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetEventFilePathParams.java new file mode 100644 index 000000000..a23a5434c --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetEventFilePathParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Session ID whose event-log file path to compute. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsGetEventFilePathParams( + /** Session ID whose event-log file path to compute */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetEventFilePathResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetEventFilePathResult.java new file mode 100644 index 000000000..261a0d452 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetEventFilePathResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Absolute path to the session's events.jsonl file on disk. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsGetEventFilePathResult( + /** Absolute path to the session's events.jsonl file */ + @JsonProperty("filePath") String filePath +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetLastForContextParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetLastForContextParams.java new file mode 100644 index 000000000..0b06f161f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetLastForContextParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Optional working-directory context used to score session relevance. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsGetLastForContextParams( + /** Optional working-directory context used to score session relevance. When omitted the most-recently-modified session wins. */ + @JsonProperty("context") SessionContext context +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetLastForContextResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetLastForContextResult.java new file mode 100644 index 000000000..c31e8d781 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetLastForContextResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Most-relevant session ID for the supplied context, or omitted when no sessions exist. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsGetLastForContextResult( + /** Most-relevant session ID for the supplied context, or omitted when no sessions exist */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetPersistedRemoteSteerableParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetPersistedRemoteSteerableParams.java new file mode 100644 index 000000000..1fd9e476f --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetPersistedRemoteSteerableParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Session ID to look up the persisted remote-steerable flag for. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsGetPersistedRemoteSteerableParams( + /** Session ID to look up the persisted remote-steerable flag for */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetPersistedRemoteSteerableResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetPersistedRemoteSteerableResult.java new file mode 100644 index 000000000..c4de7b09b --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetPersistedRemoteSteerableResult.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * The session's persisted remote-steerable flag, or omitted when no value has been persisted. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsGetPersistedRemoteSteerableResult( + /** The session's persisted remote-steerable flag if recorded; omitted when no value has been persisted */ + @JsonProperty("remoteSteerable") Boolean remoteSteerable +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetSizesResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetSizesResult.java new file mode 100644 index 000000000..98ec269e4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsGetSizesResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Map of sessionId -> on-disk size in bytes for each session's workspace directory. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsGetSizesResult( + /** Map of sessionId -> on-disk size in bytes for the session's workspace directory */ + @JsonProperty("sizes") Map sizes +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsListResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsListResult.java new file mode 100644 index 000000000..99060bb18 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsListResult.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Persisted sessions matching the filter, ordered most-recently-modified first. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsListResult( + /** Sessions ordered most-recently-modified first */ + @JsonProperty("sessions") List sessions +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsLoadDeferredRepoHooksParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsLoadDeferredRepoHooksParams.java new file mode 100644 index 000000000..67590914e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsLoadDeferredRepoHooksParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Active session ID whose deferred repo-level hooks should be loaded. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsLoadDeferredRepoHooksParams( + /** Active session ID whose deferred repo-level hooks should be loaded */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsLoadDeferredRepoHooksResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsLoadDeferredRepoHooksResult.java new file mode 100644 index 000000000..6f2299a49 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsLoadDeferredRepoHooksResult.java @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Queued repo-level startup prompts and the total hook command count after loading. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsLoadDeferredRepoHooksResult( + /** Repo-level startup prompts queued from repo hook configs. Empty on resume, when no repo configs were pending, or when disableAllHooks is set. */ + @JsonProperty("startupPrompts") List startupPrompts, + /** Total hook command count (user + plugin + repo) loaded for the session by this call. Captured atomically with startupPrompts so callers don't need to read a separate counter. */ + @JsonProperty("hookCount") Long hookCount +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsPruneOldParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsPruneOldParams.java new file mode 100644 index 000000000..e36c033e3 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsPruneOldParams.java @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Age threshold and optional flags controlling which old sessions are pruned (or simulated when dryRun is true). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsPruneOldParams( + /** Delete sessions whose modifiedTime is at least this many days old */ + @JsonProperty("olderThanDays") Long olderThanDays, + /** When true, only report what would be deleted without performing any deletion */ + @JsonProperty("dryRun") Boolean dryRun, + /** When true, named sessions (set via /rename) are also eligible for pruning */ + @JsonProperty("includeNamed") Boolean includeNamed, + /** Session IDs that should never be considered for pruning */ + @JsonProperty("excludeSessionIds") List excludeSessionIds +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsPruneOldResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsPruneOldResult.java new file mode 100644 index 000000000..6bcf5cecd --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsPruneOldResult.java @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Outcome of the prune operation: deleted IDs, dry-run candidates, skipped IDs, total bytes freed, and the dry-run flag. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsPruneOldResult( + /** Session IDs that were deleted (always empty in dry-run mode) */ + @JsonProperty("deleted") List deleted, + /** Session IDs that would be deleted in dry-run mode (always empty otherwise) */ + @JsonProperty("candidates") List candidates, + /** Session IDs that were skipped (e.g., named sessions) */ + @JsonProperty("skipped") List skipped, + /** Total bytes freed (actual when not dry-run, projected when dry-run) */ + @JsonProperty("freedBytes") Long freedBytes, + /** True when no deletions were actually performed */ + @JsonProperty("dryRun") Boolean dryRun +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReleaseLockParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReleaseLockParams.java new file mode 100644 index 000000000..81c968251 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReleaseLockParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Session ID whose in-use lock should be released. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsReleaseLockParams( + /** Session ID whose in-use lock should be released */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReleaseLockResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReleaseLockResult.java new file mode 100644 index 000000000..e3c660dc6 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReleaseLockResult.java @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Release the in-use lock held by this process for the given session. No-op when this process does not currently hold a lock for the session. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsReleaseLockResult() { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReloadPluginHooksParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReloadPluginHooksParams.java new file mode 100644 index 000000000..a9537382a --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReloadPluginHooksParams.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Active session ID and an optional flag for deferring repo-level hooks until folder trust. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsReloadPluginHooksParams( + /** Active session ID to reload hooks for */ + @JsonProperty("sessionId") String sessionId, + /** When true, skip repo-level hooks. Use before folder trust is confirmed; loadDeferredRepoHooks loads them post-trust. */ + @JsonProperty("deferRepoHooks") Boolean deferRepoHooks +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReloadPluginHooksResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReloadPluginHooksResult.java new file mode 100644 index 000000000..0920dd86e --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsReloadPluginHooksResult.java @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Reload all hooks (user, plugin, optionally repo) and apply them to the active session. Call after installing or removing plugins so their hooks take effect immediately. No-op when no active session matches the given sessionId. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsReloadPluginHooksResult() { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSaveParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSaveParams.java new file mode 100644 index 000000000..ae3b42b02 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSaveParams.java @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Session ID whose pending events should be flushed to disk. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsSaveParams( + /** Session ID whose pending events should be flushed to disk */ + @JsonProperty("sessionId") String sessionId +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSaveResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSaveResult.java new file mode 100644 index 000000000..74ae1a466 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSaveResult.java @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Flush a session's pending events to disk. No-op when no writer exists for the session (e.g., already closed). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsSaveResult() { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSetAdditionalPluginsParams.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSetAdditionalPluginsParams.java new file mode 100644 index 000000000..34ca74de9 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSetAdditionalPluginsParams.java @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Manager-wide additional plugins to register; replaces any previously-configured set. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsSetAdditionalPluginsParams( + /** Manager-wide additional plugins to register. Replaces any previously-configured set. Pass an empty array to clear. */ + @JsonProperty("plugins") List plugins +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSetAdditionalPluginsResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSetAdditionalPluginsResult.java new file mode 100644 index 000000000..e6f2a5b4c --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionsSetAdditionalPluginsResult.java @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Replace the manager-wide additional plugins. New session creations and subsequent hook reloads see the new set; already-running sessions keep their existing hook installation until the next reload. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SessionsSetAdditionalPluginsResult() { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/ShutdownType.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/ShutdownType.java new file mode 100644 index 000000000..5dac44cfb --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/ShutdownType.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Why the session is being shut down. Defaults to "routine" when omitted. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum ShutdownType { + /** The {@code routine} variant. */ + ROUTINE("routine"), + /** The {@code error} variant. */ + ERROR("error"); + + private final String value; + ShutdownType(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static ShutdownType fromValue(String value) { + for (ShutdownType v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown ShutdownType value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/Skill.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/Skill.java index cd896add8..92f94d661 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/Skill.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/Skill.java @@ -32,6 +32,8 @@ public record Skill( /** Whether the skill is currently enabled */ @JsonProperty("enabled") Boolean enabled, /** Absolute path to the skill file */ - @JsonProperty("path") String path + @JsonProperty("path") String path, + /** Name of the plugin that provides the skill, when source is 'plugin' */ + @JsonProperty("pluginName") String pluginName ) { } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SkillsInvokedSkill.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SkillsInvokedSkill.java new file mode 100644 index 000000000..7dde08942 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SkillsInvokedSkill.java @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +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; + +/** + * Schema for the `SkillsInvokedSkill` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SkillsInvokedSkill( + /** Unique identifier for the skill */ + @JsonProperty("name") String name, + /** Path to the SKILL.md file */ + @JsonProperty("path") String path, + /** Full content of the skill file */ + @JsonProperty("content") String content, + /** Tools that should be auto-approved when this skill is active, captured at invocation time */ + @JsonProperty("allowedTools") List allowedTools, + /** Turn number when the skill was invoked */ + @JsonProperty("invokedAtTurn") Long invokedAtTurn +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIAutoModeSwitchResponse.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIAutoModeSwitchResponse.java new file mode 100644 index 000000000..170c378a4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIAutoModeSwitchResponse.java @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * User's choice for auto-mode switching: yes (allow this turn), yes_always (allow + persist as setting), or no (decline). + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum UIAutoModeSwitchResponse { + /** The {@code yes} variant. */ + YES("yes"), + /** The {@code yes_always} variant. */ + YES_ALWAYS("yes_always"), + /** The {@code no} variant. */ + NO("no"); + + private final String value; + UIAutoModeSwitchResponse(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static UIAutoModeSwitchResponse fromValue(String value) { + for (UIAutoModeSwitchResponse v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown UIAutoModeSwitchResponse value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIExitPlanModeAction.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIExitPlanModeAction.java new file mode 100644 index 000000000..7ea38d6fd --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIExitPlanModeAction.java @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * The action the user selected. Defaults to 'autopilot' when autoApproveEdits is true, otherwise 'interactive'. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum UIExitPlanModeAction { + /** The {@code exit_only} variant. */ + EXIT_ONLY("exit_only"), + /** The {@code interactive} variant. */ + INTERACTIVE("interactive"), + /** The {@code autopilot} variant. */ + AUTOPILOT("autopilot"), + /** The {@code autopilot_fleet} variant. */ + AUTOPILOT_FLEET("autopilot_fleet"); + + private final String value; + UIExitPlanModeAction(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static UIExitPlanModeAction fromValue(String value) { + for (UIExitPlanModeAction v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown UIExitPlanModeAction value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIExitPlanModeResponse.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIExitPlanModeResponse.java new file mode 100644 index 000000000..55cd430a9 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIExitPlanModeResponse.java @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `UIExitPlanModeResponse` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record UIExitPlanModeResponse( + /** Whether the plan was approved. */ + @JsonProperty("approved") Boolean approved, + /** The action the user selected. Defaults to 'autopilot' when autoApproveEdits is true, otherwise 'interactive'. */ + @JsonProperty("selectedAction") UIExitPlanModeAction selectedAction, + /** Whether subsequent edits should be auto-approved without confirmation. */ + @JsonProperty("autoApproveEdits") Boolean autoApproveEdits, + /** Feedback from the user when they declined the plan or requested changes. */ + @JsonProperty("feedback") String feedback +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIHandlePendingSamplingResponse.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIHandlePendingSamplingResponse.java new file mode 100644 index 000000000..f00084315 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIHandlePendingSamplingResponse.java @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Optional sampling result payload. Omit to reject/cancel the sampling request without providing a result. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record UIHandlePendingSamplingResponse() { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIUserInputResponse.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIUserInputResponse.java new file mode 100644 index 000000000..ec8b6e842 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UIUserInputResponse.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `UIUserInputResponse` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record UIUserInputResponse( + /** The user's answer text */ + @JsonProperty("answer") String answer, + /** True if the user typed a freeform response, false if they selected a presented choice. Used by telemetry to differentiate between free text input and choice selection. */ + @JsonProperty("wasFreeform") Boolean wasFreeform +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsCodeChanges.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsCodeChanges.java index 442c88da2..b425ca3d5 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsCodeChanges.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsCodeChanges.java @@ -10,6 +10,7 @@ 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; /** @@ -26,6 +27,8 @@ public record UsageMetricsCodeChanges( /** Total lines of code removed */ @JsonProperty("linesRemoved") Long linesRemoved, /** Number of distinct files modified */ - @JsonProperty("filesModifiedCount") Long filesModifiedCount + @JsonProperty("filesModifiedCount") Long filesModifiedCount, + /** Distinct file paths modified during the session */ + @JsonProperty("filesModified") List filesModified ) { } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsModelMetric.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsModelMetric.java index 15a133323..f86aab354 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsModelMetric.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsModelMetric.java @@ -27,7 +27,7 @@ public record UsageMetricsModelMetric( /** Token usage metrics for this model */ @JsonProperty("usage") UsageMetricsModelMetricUsage usage, /** Accumulated nano-AI units cost for this model */ - @JsonProperty("totalNanoAiu") Long totalNanoAiu, + @JsonProperty("totalNanoAiu") Double totalNanoAiu, /** Token count details per type */ @JsonProperty("tokenDetails") Map tokenDetails ) { diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/WorkspaceSummaryHostType.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/WorkspaceSummaryHostType.java new file mode 100644 index 000000000..58cc24ea5 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/WorkspaceSummaryHostType.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Repository host type, if known + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum WorkspaceSummaryHostType { + /** The {@code github} variant. */ + GITHUB("github"), + /** The {@code ado} variant. */ + ADO("ado"); + + private final String value; + WorkspaceSummaryHostType(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static WorkspaceSummaryHostType fromValue(String value) { + for (WorkspaceSummaryHostType v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown WorkspaceSummaryHostType value: " + value); + } +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/WorkspacesCheckpoints.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/WorkspacesCheckpoints.java new file mode 100644 index 000000000..81c49f6fa --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/WorkspacesCheckpoints.java @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Schema for the `WorkspacesCheckpoints` type. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record WorkspacesCheckpoints( + /** Checkpoint number assigned by the workspace manager */ + @JsonProperty("number") Long number, + /** Human-readable checkpoint title */ + @JsonProperty("title") String title, + /** Filename of the checkpoint within the workspace checkpoints directory */ + @JsonProperty("filename") String filename +) { +} diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/WorkspacesWorkspaceDetailsHostType.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/WorkspacesWorkspaceDetailsHostType.java new file mode 100644 index 000000000..0872a87a4 --- /dev/null +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/WorkspacesWorkspaceDetailsHostType.java @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.sdk.generated.rpc; + +import javax.annotation.processing.Generated; + +/** + * Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum WorkspacesWorkspaceDetailsHostType { + /** The {@code github} variant. */ + GITHUB("github"), + /** The {@code ado} variant. */ + ADO("ado"); + + private final String value; + WorkspacesWorkspaceDetailsHostType(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static WorkspacesWorkspaceDetailsHostType fromValue(String value) { + for (WorkspacesWorkspaceDetailsHostType v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown WorkspacesWorkspaceDetailsHostType value: " + value); + } +} From 19891e59efb77813575f7cd87d84dfa9464022db Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 17:44:44 +0000 Subject: [PATCH 3/3] Fix Java codegen and build failures after @github/copilot update The new @github/copilot schemas introduced cross-schema $ref references in api.schema.json pointing to session-events.schema.json definitions: - session-events.schema.json#/definitions/SessionEvent - session-events.schema.json#/definitions/PermissionPromptRequest The code generator only handled local #/definitions/ refs, causing invalid Java type names to be emitted (the raw $ref string), which produced compilation errors: PendingPermissionRequest.java: illegal character '#' SessionEventLogReadResult.java: ' expected', etc. Fix in java/scripts/codegen/java.ts: - Track generated session-events type names in generatedSessionEventsTypes - Store session-events definitions in sessionEventsDefinitions - In schemaTypeToJava, detect cross-schema refs and resolve them: - If the type is already generated in the session-events package (e.g. SessionEvent), emit it with the correct import - Otherwise resolve inline using the external definitions (anyOf unions like PermissionPromptRequest fall back to Object) Regenerated affected files: PendingPermissionRequest.java: request field now typed as Object SessionEventLogReadResult.java: events field now typed as List Automated fix applied by java-codegen-fix workflow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- java/scripts/codegen/java.ts | 39 +++++++++++++++++++ .../rpc/PendingPermissionRequest.java | 2 +- .../rpc/SessionEventLogReadResult.java | 3 +- 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/java/scripts/codegen/java.ts b/java/scripts/codegen/java.ts index 0a96ab9f1..30c37e150 100644 --- a/java/scripts/codegen/java.ts +++ b/java/scripts/codegen/java.ts @@ -102,6 +102,13 @@ interface JavaTypeResult { let currentDefinitions: Record = {}; const pendingStandaloneTypes = new Map(); +// Definitions and generated type names from the session-events schema, populated +// during generateSessionEvents so that cross-schema $ref resolution in generateRpcTypes +// can look up types like SessionEvent and PermissionPromptRequest. +let sessionEventsDefinitions: Record = {}; +const generatedSessionEventsTypes = new Set(); +const SESSION_EVENTS_PACKAGE = "com.github.copilot.sdk.generated"; + /** * Resolve a $ref in a JSON Schema against the current definitions. * Returns the resolved schema, or the original if no $ref is present. @@ -131,6 +138,28 @@ function schemaTypeToJava( // Resolve $ref first — register standalone types for generation if (schema.$ref) { + // Handle cross-schema refs (e.g. "session-events.schema.json#/definitions/X") + if (!schema.$ref.startsWith("#")) { + const hashIdx = schema.$ref.indexOf("#"); + const schemaFile = hashIdx >= 0 ? schema.$ref.substring(0, hashIdx) : schema.$ref; + const pointer = hashIdx >= 0 ? schema.$ref.substring(hashIdx + 1) : ""; + const typeName = pointer.replace(/^\/definitions\//, ""); + if (schemaFile === "session-events.schema.json" && typeName) { + if (generatedSessionEventsTypes.has(typeName)) { + // Already generated in the session-events package — use with import + imports.add(`${SESSION_EVENTS_PACKAGE}.${typeName}`); + return { javaType: typeName, imports }; + } + // Not a pre-generated standalone type; resolve inline from session-events defs + const extDef = sessionEventsDefinitions[typeName]; + if (extDef) { + return schemaTypeToJava(extDef, required, context, propName, nestedTypes); + } + } + console.warn(`[codegen] Unresolved cross-schema $ref: ${schema.$ref}`); + return { javaType: "Object", imports }; + } + const name = schema.$ref.replace(/^#\/definitions\//, ""); const resolved = currentDefinitions[name]; if (resolved) { @@ -314,20 +343,30 @@ async function generateSessionEvents(schemaPath: string): Promise { currentDefinitions = (schema.definitions ?? {}) as Record; pendingStandaloneTypes.clear(); + // Store session-events definitions for cross-schema $ref resolution during RPC generation + sessionEventsDefinitions = currentDefinitions; + generatedSessionEventsTypes.clear(); + const variants = extractEventVariants(schema); const packageName = "com.github.copilot.sdk.generated"; const packageDir = `src/generated/java/com/github/copilot/sdk/generated`; // Generate base SessionEvent class await generateSessionEventBaseClass(variants, packageName, packageDir); + generatedSessionEventsTypes.add("SessionEvent"); + generatedSessionEventsTypes.add("UnknownSessionEvent"); // Generate one class file per event variant for (const variant of variants) { await generateEventVariantClass(variant, packageName, packageDir); + generatedSessionEventsTypes.add(variant.className); } // Generate standalone types discovered via $ref resolution await generatePendingStandaloneTypes(packageName, packageDir, GENERATED_FROM_SESSION_EVENTS); + for (const typeName of pendingStandaloneTypes.keys()) { + generatedSessionEventsTypes.add(typeName); + } console.log(`✅ Generated ${variants.length + 1} session event files`); } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PendingPermissionRequest.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PendingPermissionRequest.java index acbed841d..f4d84c730 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PendingPermissionRequest.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/PendingPermissionRequest.java @@ -24,6 +24,6 @@ public record PendingPermissionRequest( /** Unique identifier for the pending permission request */ @JsonProperty("requestId") String requestId, /** The user-facing permission prompt details (commands, write, read, mcp, url, memory, custom-tool, path, hook) */ - @JsonProperty("request") session-events.schema.json#/definitions/PermissionPromptRequest request + @JsonProperty("request") Object request ) { } diff --git a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReadResult.java b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReadResult.java index 026c25276..124426615 100644 --- a/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReadResult.java +++ b/java/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionEventLogReadResult.java @@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.sdk.generated.SessionEvent; import java.util.List; import javax.annotation.processing.Generated; @@ -23,7 +24,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record SessionEventLogReadResult( /** Events are delivered in two batches per read: persisted events first (in append order), then ephemeral events (in seq order). When `waitMs > 0` and the catch-up batches were empty, post-wait events follow the same two-batch ordering. Persisted and ephemeral events do not interleave within a single read. */ - @JsonProperty("events") List events, + @JsonProperty("events") List events, /** Opaque cursor for the next read. Pass back unchanged in the next read.cursor to continue from where this read left off. Always present, even when no events were returned. */ @JsonProperty("cursor") String cursor, /** True when the read returned `max` events and more events are available immediately. When false, the next read with a non-zero `waitMs` will block until a new event arrives or the wait expires. */