Add Identity service implementation (RFC 8621 Section 6) #20
+462
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements the JMAP Identity service according to RFC 8621 Section 6, enabling clients to manage email identities (sender addresses, signatures, reply-to addresses, etc.).
Key Changes
New Identity Schema (
src/identity/schema.ts): Comprehensive schema definitions for all Identity operations including:IdentityObject: Core identity data structure with email, name, signatures, reply-to, and bcc fieldsIdentityMutable: Creatable/updatable identity propertiesIdentity/get,Identity/set, andIdentity/changesmethodsNew Identity Service (
src/identity/service.ts): Effect-based service implementation providing:get(): Retrieve identities by IDset(): Create, update, or destroy identitieschanges(): Track identity changes since a stategetAll(): Convenience method to fetch all identities for an accountgetDefault(): Convenience method to get the first/default identityClient Integration (
src/client/wrapper.ts): AddedIdentityNamespaceto the promise-based wrapper with all service methods exposed as async functionsLayer Configuration (
src/layers.ts): IntegratedIdentityServiceLiveinto the dependency injection layerPublic API (
src/identity/index.ts,src/index.ts): Exported all Identity types and service interfacesTest Configuration (
tests/config/capabilities.ts): Enabled Identity capability flags for testingImplementation Details
https://claude.ai/code/session_01EHPdDuJwHEyaghPQ4KwBYE