@jxsuite/protocol 1.1.0 → 1.2.0

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/types.ts +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jxsuite/protocol",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "The Studio Backend Protocol — wire types and the canonical route table every Jx Studio backend implements",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -27,6 +27,6 @@
27
27
  "test:coverage": "bun test --isolate --coverage"
28
28
  },
29
29
  "dependencies": {
30
- "@jxsuite/schema": "^1.6.0"
30
+ "@jxsuite/schema": "^1.8.0"
31
31
  }
32
32
  }
package/src/types.ts CHANGED
@@ -518,6 +518,16 @@ export interface AiModelsResponse {
518
518
  defaultModel?: string;
519
519
  /** Set when the upstream provider was unreachable and defaults were returned. */
520
520
  upstreamError?: number | string;
521
+ /**
522
+ * Why the backend holds no working credentials, when it holds none.
523
+ *
524
+ * `configured: false` alone cannot tell "this user has never connected" from "this user's grant
525
+ * lapsed", and those are different sentences on screen — the second one explains a thing that
526
+ * used to work. `cf_upstream_error` is the third case and deliberately arrives WITH `configured:
527
+ * true`: Cloudflare being briefly unreachable is not a reason to send someone round an OAuth flow
528
+ * that fixes nothing.
529
+ */
530
+ code?: "cf_not_connected" | "cf_reconnect_required" | "cf_upstream_error";
521
531
  }
522
532
 
523
533
  // ─── Cloudflare publish surface ──────────────────────────────────────────────