@uxnan/shared 0.0.23-alpha.20260927 → 0.0.24-alpha.20260928

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,12 +3,14 @@
3
3
  ![TypeScript](https://img.shields.io/badge/TypeScript-ESM-3178C6?style=for-the-badge&logo=typescript&logoColor=white)
4
4
  ![Node.js](https://img.shields.io/badge/Node.js-%E2%89%A518-339933?style=for-the-badge&logo=nodedotjs&logoColor=white)
5
5
  ![JSON Schema](https://img.shields.io/badge/validation-Ajv-000000?style=for-the-badge&logo=json&logoColor=white)
6
- ![Contracts](https://img.shields.io/badge/83_methods_%7C_22_notifications-blue?style=for-the-badge)
6
+ ![Contracts](https://img.shields.io/badge/93_methods_%7C_24_notifications-blue?style=for-the-badge)
7
7
 
8
8
  Shared JSON-RPC and E2EE contracts for the [Uxnan](../README.md) ecosystem — the
9
9
  single source of truth every component agrees on. Consumed as a local workspace
10
10
  dependency by the **[bridge](../bridge/README.md)** and the
11
- **[relay](../relay/README.md)**; the mobile app keeps manually-synced Dart
11
+ **[relay](../relay/README.md)**; **[Uxnan Desktop](../uxnandesktop/README.md)**
12
+ imports its types straight from `src/` (the `$shared` alias) for the chats it
13
+ drives through the bridge; the mobile app keeps manually-synced Dart
12
14
  equivalents (see
13
15
  [`architecture/02b-contracts-and-requirements.md`](../architecture/02b-contracts-and-requirements.md)
14
16
  §1 for the canonical contract list).
@@ -21,25 +23,28 @@ equivalents (see
21
23
 
22
24
  ## Why it exists
23
25
 
24
- Three independent codebases — a Node.js bridge, a Node.js relay, and a Flutter app
25
- — have to agree on exactly the same messages on the wire. Rather than letting each
26
- one drift its own way, every shape lives here once: the request and response
27
- envelopes, the streaming notifications, the E2EE handshake, the pairing payload,
28
- and the domain and agent models. The bridge and relay import this package
29
- directly; the mobile app mirrors it in Dart. When a contract changes, it changes
30
- here first, and the build refuses to pass if the registry and the spec disagree.
26
+ Four independent codebases — a Node.js bridge, a Node.js relay, a Tauri + Svelte
27
+ desktop app and a Flutter app — have to agree on exactly the same messages on
28
+ the wire. Rather than letting each one drift its own way, every shape lives here
29
+ once: the request and response envelopes, the streaming notifications, the E2EE
30
+ handshake, the pairing payload, and the domain and agent models. The bridge and
31
+ relay import this package directly, Uxnan Desktop imports its types from source,
32
+ and the mobile app mirrors it in Dart. When a contract changes, it changes here
33
+ first, and the build refuses to pass if the registry and the spec disagree.
31
34
 
32
35
  <details>
33
- <summary><b>Diagram — one contract, three consumers</b></summary>
36
+ <summary><b>Diagram — one contract, four consumers</b></summary>
34
37
 
35
38
  ```mermaid
36
39
  flowchart TB
37
40
  shared["@uxnan/shared<br/>JSON-RPC + E2EE contracts"]
38
41
  bridge["uxnan-bridge<br/>(imports directly)"]
39
42
  relay["uxnan-relay<br/>(imports directly)"]
43
+ desktop["uxnandesktop<br/>(imports types via $shared)"]
40
44
  mobile["uxnanmobile<br/>(hand-synced Dart mirror)"]
41
45
  shared --> bridge
42
46
  shared --> relay
47
+ shared --> desktop
43
48
  shared -. mirrored .-> mobile
44
49
  ```
45
50
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * JSON-RPC 2.0 error codes used across the Uxnan ecosystem.
3
3
  *
4
- * Standard codes (-32700..-32603) plus Uxnan-specific codes (-32000..-32009).
4
+ * Standard codes (-32700..-32603) plus Uxnan-specific codes (-32000..-32010).
5
5
  * Source: architecture/02b-contracts-and-requirements.md.
6
6
  */
7
7
  export declare const JsonRpcErrorCode: {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * JSON-RPC 2.0 error codes used across the Uxnan ecosystem.
3
3
  *
4
- * Standard codes (-32700..-32603) plus Uxnan-specific codes (-32000..-32009).
4
+ * Standard codes (-32700..-32603) plus Uxnan-specific codes (-32000..-32010).
5
5
  * Source: architecture/02b-contracts-and-requirements.md.
6
6
  */
7
7
  export const JsonRpcErrorCode = {
@@ -50,8 +50,11 @@ export type AccountType =
50
50
  * weekly cap, or a model-specific window).
51
51
  */
52
52
  export interface UsageWindow {
53
- /** Stable id (e.g. `session5h`, `weekly`, `opusWeekly`) — used by the
54
- * status-bar picker to remember which windows to surface. */
53
+ /** Window id (e.g. `session5h`, `weekly`, `monthly`, `opusWeekly`) — used by
54
+ * the status-bar picker to remember which windows to surface. Ids follow
55
+ * what the provider reports (Codex's are named by the window's length), so
56
+ * they can change when the plan or the reader changes: clients must tolerate
57
+ * saved picks that no longer match any window. */
55
58
  id: string;
56
59
  /** Human label (English; the UI localizes known ids, else shows this). */
57
60
  label: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxnan/shared",
3
- "version": "0.0.23-alpha.20260927",
3
+ "version": "0.0.24-alpha.20260928",
4
4
  "description": "Shared JSON-RPC and E2EE contracts for the Uxnan ecosystem (bridge, relay, mobile).",
5
5
  "license": "MPL-2.0",
6
6
  "author": "Luis Donaldo Gamas Vazquez",