@cadraos/sdk 0.3.8 → 0.3.10

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/dist/index.d.cts CHANGED
@@ -2843,6 +2843,13 @@ interface KanbanCard {
2843
2843
  executionId?: string;
2844
2844
  /** Summary of the card's current/last run, if any. */
2845
2845
  run?: KanbanRunSummary;
2846
+ /**
2847
+ * When this card next becomes DUE on a scheduled lane (ISO string) — maps to
2848
+ * `agentic_card.next_due_at` (spec §3a / STORY-003/004). Drives the board's
2849
+ * ⧗ "due" chip: `next_due_at ≤ now` → due (the next sweep will pick it up).
2850
+ * OPTIONAL — absent → no due chip (today's render).
2851
+ */
2852
+ nextDueAt?: string;
2846
2853
  /** Who created the card. */
2847
2854
  createdBy?: string;
2848
2855
  /** When the card was created (ISO string). */
package/dist/index.d.ts CHANGED
@@ -2843,6 +2843,13 @@ interface KanbanCard {
2843
2843
  executionId?: string;
2844
2844
  /** Summary of the card's current/last run, if any. */
2845
2845
  run?: KanbanRunSummary;
2846
+ /**
2847
+ * When this card next becomes DUE on a scheduled lane (ISO string) — maps to
2848
+ * `agentic_card.next_due_at` (spec §3a / STORY-003/004). Drives the board's
2849
+ * ⧗ "due" chip: `next_due_at ≤ now` → due (the next sweep will pick it up).
2850
+ * OPTIONAL — absent → no due chip (today's render).
2851
+ */
2852
+ nextDueAt?: string;
2846
2853
  /** Who created the card. */
2847
2854
  createdBy?: string;
2848
2855
  /** When the card was created (ISO string). */
package/dist/index.js CHANGED
@@ -675,15 +675,6 @@ var ExecutionStreamControllerImpl = class {
675
675
  sseClient = null;
676
676
  status = "connecting";
677
677
  reconnectAttempts = 0;
678
- // CAD-39 / webchat dual-plane create-connect race. `hasConnected` flips true on
679
- // the first successful SSE open; `notFoundRetries` bounds retries of a 404
680
- // encountered BEFORE we ever connect (the run row is persisted slightly AFTER
681
- // the client opens the stream — the norm on the webchat path where msg-api owns
682
- // the executionId and cadra persists the agent_executions row via an async
683
- // worker callback). See handleConnectionError.
684
- hasConnected = false;
685
- notFoundRetries = 0;
686
- maxConnectRaceRetries = 3;
687
678
  seenEventIds = /* @__PURE__ */ new Set();
688
679
  _lastEventId = null;
689
680
  activityTimeoutId = null;
@@ -823,8 +814,6 @@ var ExecutionStreamControllerImpl = class {
823
814
  if (connected) {
824
815
  this.status = "connected";
825
816
  this.reconnectAttempts = 0;
826
- this.hasConnected = true;
827
- this.notFoundRetries = 0;
828
817
  this.resetActivityTimeout();
829
818
  }
830
819
  this.emit("connectionChange", { connected, usingFallback: false });
@@ -1114,38 +1103,6 @@ var ExecutionStreamControllerImpl = class {
1114
1103
  return;
1115
1104
  }
1116
1105
  const msg = error instanceof Error ? error.message : String(error);
1117
- const isNotFound = /\b404\b/.test(msg);
1118
- const isAuthFailure = /\b40[13]\b/.test(msg) || /INVALID_API_KEY|INVALID_REQUEST/.test(msg);
1119
- if (isNotFound && !isAuthFailure && !this.hasConnected) {
1120
- if (this.notFoundRetries < this.maxConnectRaceRetries) {
1121
- this.notFoundRetries++;
1122
- this.status = "reconnecting";
1123
- const delay = Math.min(
1124
- this.config.reconnectBaseDelayMs * this.notFoundRetries,
1125
- this.config.reconnectMaxDelayMs
1126
- );
1127
- await new Promise((resolve) => setTimeout(resolve, delay));
1128
- if (this.status === "closed") {
1129
- return;
1130
- }
1131
- try {
1132
- await this.connectSSE();
1133
- } catch (retryError) {
1134
- await this.handleConnectionError(retryError);
1135
- }
1136
- return;
1137
- }
1138
- if (this.pollingEnabled) {
1139
- if (this.sseClient) {
1140
- this.sseClient.disconnect();
1141
- this.sseClient = null;
1142
- }
1143
- this.status = "fallback_polling";
1144
- this.emit("connectionChange", { connected: false, usingFallback: true });
1145
- this.startPolling();
1146
- return;
1147
- }
1148
- }
1149
1106
  if (/\b4\d\d\b/.test(msg) || /INVALID_API_KEY|INVALID_REQUEST/.test(msg)) {
1150
1107
  if (this.sseClient) {
1151
1108
  this.sseClient.disconnect();