The spec does not guarantee the personal(primary mail) account is the first element of session.accounts. I'm not sure whether JamesServer supports account/mailbox sharing. But cyrus-imapd seems that the personal account always is the last element of session.accounts.
I suggest that we add a getPersonalAccountId() method, and keep getFirstAccountId until 2.0 release.