@uxnan/shared 0.0.15-alpha.20260813 → 0.0.16-alpha.20260919

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.
@@ -11,8 +11,11 @@
11
11
  * over `agent/usageStats`. The Dart equivalents live in uxnanmobile and are kept
12
12
  * in sync manually (see 02e-bridge-integration.md §4.2).
13
13
  *
14
- * Posture: only the CLI's own stored token is read — never browser cookies or
15
- * user-pasted API keys.
14
+ * Posture: only the token the CLI itself stored is read — from its file, or
15
+ * from the OS credential store where that is where the CLI keeps it (Claude
16
+ * Code on macOS), and then only after the user has granted the OS-level
17
+ * permission once (see `accessRequired`). Never browser cookies, never
18
+ * user-pasted API keys, never a refresh token.
16
19
  */
17
20
  /** A coding CLI whose usage we read from its own stored token. */
18
21
  export type UsageProvider = 'codex' | 'claude' | 'copilot' | 'grok';
@@ -22,6 +25,11 @@ export type UsageStatus =
22
25
  'ok'
23
26
  /** CLI is present but not signed in (no usable token). */
24
27
  | 'authRequired'
28
+ /** The CLI's token exists in the OS credential store, but the OS has not yet
29
+ * authorized the reader to open it. The user grants that once from the
30
+ * desktop's Providers panel (the OS shows its own dialog); the reader never
31
+ * prompts on its own. A phone shows "grant access on the PC". */
32
+ | 'accessRequired'
25
33
  /** CLI / its config directory is not present on this machine. */
26
34
  | 'notInstalled'
27
35
  /** Read/network/parse failure — see {@link ProviderUsage.message}. */
@@ -121,7 +129,8 @@ export interface ProviderUsage {
121
129
  resetCredits?: ResetCredits;
122
130
  /** When this snapshot was produced (epoch ms). */
123
131
  updatedAt: number;
124
- /** Error/hint message for `error` / `authRequired` / `notInstalled` states. */
132
+ /** Error/hint message for `error` / `authRequired` / `accessRequired` /
133
+ * `notInstalled` states. */
125
134
  message?: string;
126
135
  }
127
136
  /**
@@ -11,8 +11,11 @@
11
11
  * over `agent/usageStats`. The Dart equivalents live in uxnanmobile and are kept
12
12
  * in sync manually (see 02e-bridge-integration.md §4.2).
13
13
  *
14
- * Posture: only the CLI's own stored token is read — never browser cookies or
15
- * user-pasted API keys.
14
+ * Posture: only the token the CLI itself stored is read — from its file, or
15
+ * from the OS credential store where that is where the CLI keeps it (Claude
16
+ * Code on macOS), and then only after the user has granted the OS-level
17
+ * permission once (see `accessRequired`). Never browser cookies, never
18
+ * user-pasted API keys, never a refresh token.
16
19
  */
17
20
  export {};
18
21
  //# sourceMappingURL=usage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usage.js","sourceRoot":"","sources":["../../../src/models/usage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
1
+ {"version":3,"file":"usage.js","sourceRoot":"","sources":["../../../src/models/usage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxnan/shared",
3
- "version": "0.0.15-alpha.20260813",
3
+ "version": "0.0.16-alpha.20260919",
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",