diff --git a/dotnet/src/Generated/Rpc.cs b/dotnet/src/Generated/Rpc.cs index 7c33a0ac3..7d1a41421 100644 --- a/dotnet/src/Generated/Rpc.cs +++ b/dotnet/src/Generated/Rpc.cs @@ -24269,4 +24269,4 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(WorkspacesSaveLargePasteRequest))] [JsonSerializable(typeof(WorkspacesSaveLargePasteResult))] [JsonSerializable(typeof(WorkspacesSaveLargePasteResultSaved))] -internal partial class RpcJsonContext : JsonSerializerContext; \ No newline at end of file +internal partial class RpcJsonContext : JsonSerializerContext; diff --git a/nodejs/test/e2e/rpc_server.e2e.test.ts b/nodejs/test/e2e/rpc_server.e2e.test.ts index 8913146b1..791957c41 100644 --- a/nodejs/test/e2e/rpc_server.e2e.test.ts +++ b/nodejs/test/e2e/rpc_server.e2e.test.ts @@ -187,6 +187,26 @@ describe("Server-scoped RPC", async () => { } }); + it("should call rpc commands list with well-known session-start commands", async () => { + await client.start(); + const result = await client.rpc.commands.list(); + expect(result.commands).toBeDefined(); + expect(result.commands.length).toBeGreaterThan(0); + + const names = result.commands.map((command) => command.name); + // Well-known commands that work as the first message in a new session. + expect(names).toContain("plan"); + expect(names).toContain("env"); + // Commands that require an active session must not be listed. + expect(names).not.toContain("compact"); + expect(names).not.toContain("usage"); + + for (const command of result.commands) { + expect(command.name).toBeTruthy(); + expect(command.kind).toBe("builtin"); + } + }); + it("should call rpc sessionFs setProvider with typed result", async () => { const fsClient = createClientWithEnv({}); await fsClient.start();