Conversation
| /** Extension metadata */ | ||
| _meta?: Record<string, unknown>; | ||
|
|
||
| /** Credit/balance information */ |
There was a problem hiding this comment.
From the specification perspective, having all these values feel very specific to a given product mindset.
I wonder, should the spec focus on the messaging spec and allow specific clients to start with _meta as a way to send the information they want?
| ```typescript | ||
| interface CreditsInfo { | ||
| /** Remaining credit balance in smallest currency unit (e.g., cents) */ | ||
| remaining?: number | null; |
There was a problem hiding this comment.
How are we going to know how to format it? Some currencies do not have cents, so we would need to import a CLDR library to know exactly how to format them? Or should this be a string? Same as the field below.
| total?: number | null; | ||
|
|
||
| /** Currency code (ISO 4217, e.g., "USD") */ | ||
| currency?: string | null; |
There was a problem hiding this comment.
For GitHub, in particular, they do not have currency, but "premium requests", so currency wouldn't work for them (this same issue exists on SessionUsage too).
| requests?: number | null; | ||
|
|
||
| /** Total cost incurred in smallest currency unit */ | ||
| cost?: number | null; |
There was a problem hiding this comment.
The SessionUsage RFD calls this "amount", perhaps worth aligning?
No description provided.