@crossworks/client-types 0.237.13 → 0.238.1

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 +1 -1
  2. package/src/dto/rows.ts +31 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossworks/client-types",
3
- "version": "0.237.13",
3
+ "version": "0.238.1",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
package/src/dto/rows.ts CHANGED
@@ -677,10 +677,40 @@ export type NeedsYou = {
677
677
  locked: number;
678
678
  newest: NeedsYouItem | null;
679
679
  };
680
- /** review.submitted + review.leftBehind + requests.open (+ sharing.locked). */
680
+ /** Embedding or extraction provider failures an admin must act on
681
+ * (migration 0230, docs/embeddings.md "Provider outages"). Absent from
682
+ * brains before 0230; empty while all works. */
683
+ providers?: ProviderAlert[];
684
+ /** review.submitted + review.leftBehind + requests.open (+ sharing.locked)
685
+ * (+ providers.length). */
681
686
  total: number;
682
687
  };
683
688
 
689
+ /**
690
+ * One open provider outage, as an admin sees it. `reason` is fixed text
691
+ * chosen by `code`, never provider text: it is safe on a banner and a phone.
692
+ */
693
+ export type ProviderAlert = {
694
+ subject: 'embedding' | 'extraction';
695
+ /** quota | auth | no_key | model (permanent); rate_limit | server |
696
+ * network | timeout (transient, shown after 10 min). */
697
+ code: string;
698
+ permanent: boolean;
699
+ reason: string;
700
+ /** Provider id (e.g. `openai`) and model slug. Never a key. */
701
+ provider: string | null;
702
+ model: string | null;
703
+ /** When it started failing (ISO). */
704
+ since: string;
705
+ /** The extract queue stopped taking jobs until it works again. */
706
+ paused: boolean;
707
+ /** When the brain tries one tiny call again (ISO), or null. */
708
+ nextProbeAt: string | null;
709
+ /** Extract jobs that wait: queued, retrying, running and dead-lettered.
710
+ * Null when the queue has not started yet. */
711
+ waiting: number | null;
712
+ };
713
+
684
714
  export type AccountFoldersResult =
685
715
  | {
686
716
  ok: true;