@cadraos/sdk 0.3.7 → 0.3.9
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/board-host/index.d.cts +74 -6
- package/dist/board-host/index.d.ts +74 -6
- package/dist/board-host/server/index.d.cts +81 -6
- package/dist/board-host/server/index.d.ts +81 -6
- package/dist/chat/index.cjs +4 -43
- package/dist/chat/index.cjs.map +1 -1
- package/dist/chat/index.d.cts +7 -0
- package/dist/chat/index.d.ts +7 -0
- package/dist/chat/index.js +4 -43
- package/dist/chat/index.js.map +1 -1
- package/dist/index.cjs +4 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +4 -43
- package/dist/index.js.map +1 -1
- package/dist/kanban/engine/index.cjs +119 -31
- package/dist/kanban/engine/index.cjs.map +1 -1
- package/dist/kanban/engine/index.d.cts +112 -6
- package/dist/kanban/engine/index.d.ts +112 -6
- package/dist/kanban/engine/index.js +119 -31
- package/dist/kanban/engine/index.js.map +1 -1
- package/dist/kanban/index.cjs +574 -155
- package/dist/kanban/index.cjs.map +1 -1
- package/dist/kanban/index.d.cts +277 -11
- package/dist/kanban/index.d.ts +277 -11
- package/dist/kanban/index.js +569 -156
- package/dist/kanban/index.js.map +1 -1
- package/dist/teams/index.cjs +4 -43
- package/dist/teams/index.cjs.map +1 -1
- package/dist/teams/index.d.cts +7 -0
- package/dist/teams/index.d.ts +7 -0
- package/dist/teams/index.js +4 -43
- package/dist/teams/index.js.map +1 -1
- package/package.json +16 -15
package/dist/chat/index.d.cts
CHANGED
|
@@ -3817,6 +3817,13 @@ interface KanbanCard {
|
|
|
3817
3817
|
executionId?: string;
|
|
3818
3818
|
/** Summary of the card's current/last run, if any. */
|
|
3819
3819
|
run?: KanbanRunSummary;
|
|
3820
|
+
/**
|
|
3821
|
+
* When this card next becomes DUE on a scheduled lane (ISO string) — maps to
|
|
3822
|
+
* `agentic_card.next_due_at` (spec §3a / STORY-003/004). Drives the board's
|
|
3823
|
+
* ⧗ "due" chip: `next_due_at ≤ now` → due (the next sweep will pick it up).
|
|
3824
|
+
* OPTIONAL — absent → no due chip (today's render).
|
|
3825
|
+
*/
|
|
3826
|
+
nextDueAt?: string;
|
|
3820
3827
|
/** Who created the card. */
|
|
3821
3828
|
createdBy?: string;
|
|
3822
3829
|
/** When the card was created (ISO string). */
|
package/dist/chat/index.d.ts
CHANGED
|
@@ -3817,6 +3817,13 @@ interface KanbanCard {
|
|
|
3817
3817
|
executionId?: string;
|
|
3818
3818
|
/** Summary of the card's current/last run, if any. */
|
|
3819
3819
|
run?: KanbanRunSummary;
|
|
3820
|
+
/**
|
|
3821
|
+
* When this card next becomes DUE on a scheduled lane (ISO string) — maps to
|
|
3822
|
+
* `agentic_card.next_due_at` (spec §3a / STORY-003/004). Drives the board's
|
|
3823
|
+
* ⧗ "due" chip: `next_due_at ≤ now` → due (the next sweep will pick it up).
|
|
3824
|
+
* OPTIONAL — absent → no due chip (today's render).
|
|
3825
|
+
*/
|
|
3826
|
+
nextDueAt?: string;
|
|
3820
3827
|
/** Who created the card. */
|
|
3821
3828
|
createdBy?: string;
|
|
3822
3829
|
/** When the card was created (ISO string). */
|
package/dist/chat/index.js
CHANGED
|
@@ -682,15 +682,6 @@ var ExecutionStreamControllerImpl = class {
|
|
|
682
682
|
sseClient = null;
|
|
683
683
|
status = "connecting";
|
|
684
684
|
reconnectAttempts = 0;
|
|
685
|
-
// CAD-39 / webchat dual-plane create-connect race. `hasConnected` flips true on
|
|
686
|
-
// the first successful SSE open; `notFoundRetries` bounds retries of a 404
|
|
687
|
-
// encountered BEFORE we ever connect (the run row is persisted slightly AFTER
|
|
688
|
-
// the client opens the stream — the norm on the webchat path where msg-api owns
|
|
689
|
-
// the executionId and cadra persists the agent_executions row via an async
|
|
690
|
-
// worker callback). See handleConnectionError.
|
|
691
|
-
hasConnected = false;
|
|
692
|
-
notFoundRetries = 0;
|
|
693
|
-
maxConnectRaceRetries = 3;
|
|
694
685
|
seenEventIds = /* @__PURE__ */ new Set();
|
|
695
686
|
_lastEventId = null;
|
|
696
687
|
activityTimeoutId = null;
|
|
@@ -830,8 +821,6 @@ var ExecutionStreamControllerImpl = class {
|
|
|
830
821
|
if (connected) {
|
|
831
822
|
this.status = "connected";
|
|
832
823
|
this.reconnectAttempts = 0;
|
|
833
|
-
this.hasConnected = true;
|
|
834
|
-
this.notFoundRetries = 0;
|
|
835
824
|
this.resetActivityTimeout();
|
|
836
825
|
}
|
|
837
826
|
this.emit("connectionChange", { connected, usingFallback: false });
|
|
@@ -1121,38 +1110,6 @@ var ExecutionStreamControllerImpl = class {
|
|
|
1121
1110
|
return;
|
|
1122
1111
|
}
|
|
1123
1112
|
const msg = error instanceof Error ? error.message : String(error);
|
|
1124
|
-
const isNotFound = /\b404\b/.test(msg);
|
|
1125
|
-
const isAuthFailure = /\b40[13]\b/.test(msg) || /INVALID_API_KEY|INVALID_REQUEST/.test(msg);
|
|
1126
|
-
if (isNotFound && !isAuthFailure && !this.hasConnected) {
|
|
1127
|
-
if (this.notFoundRetries < this.maxConnectRaceRetries) {
|
|
1128
|
-
this.notFoundRetries++;
|
|
1129
|
-
this.status = "reconnecting";
|
|
1130
|
-
const delay = Math.min(
|
|
1131
|
-
this.config.reconnectBaseDelayMs * this.notFoundRetries,
|
|
1132
|
-
this.config.reconnectMaxDelayMs
|
|
1133
|
-
);
|
|
1134
|
-
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
1135
|
-
if (this.status === "closed") {
|
|
1136
|
-
return;
|
|
1137
|
-
}
|
|
1138
|
-
try {
|
|
1139
|
-
await this.connectSSE();
|
|
1140
|
-
} catch (retryError) {
|
|
1141
|
-
await this.handleConnectionError(retryError);
|
|
1142
|
-
}
|
|
1143
|
-
return;
|
|
1144
|
-
}
|
|
1145
|
-
if (this.pollingEnabled) {
|
|
1146
|
-
if (this.sseClient) {
|
|
1147
|
-
this.sseClient.disconnect();
|
|
1148
|
-
this.sseClient = null;
|
|
1149
|
-
}
|
|
1150
|
-
this.status = "fallback_polling";
|
|
1151
|
-
this.emit("connectionChange", { connected: false, usingFallback: true });
|
|
1152
|
-
this.startPolling();
|
|
1153
|
-
return;
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
1113
|
if (/\b4\d\d\b/.test(msg) || /INVALID_API_KEY|INVALID_REQUEST/.test(msg)) {
|
|
1157
1114
|
if (this.sseClient) {
|
|
1158
1115
|
this.sseClient.disconnect();
|
|
@@ -1402,6 +1359,7 @@ var AgentsAPI = class extends BaseResourceAPI {
|
|
|
1402
1359
|
super(http, "/api/v1/agents");
|
|
1403
1360
|
this.getStreamConfig = getStreamConfig;
|
|
1404
1361
|
}
|
|
1362
|
+
getStreamConfig;
|
|
1405
1363
|
// ===== LIST Operations =====
|
|
1406
1364
|
/**
|
|
1407
1365
|
* List all agents in the organization
|
|
@@ -2307,6 +2265,7 @@ var SessionsAPI = class extends BaseResourceAPI {
|
|
|
2307
2265
|
super(http, "/api/v1/sessions");
|
|
2308
2266
|
this.getStreamConfig = getStreamConfig;
|
|
2309
2267
|
}
|
|
2268
|
+
getStreamConfig;
|
|
2310
2269
|
// ===== LIST Operations =====
|
|
2311
2270
|
/**
|
|
2312
2271
|
* List all sessions in the organization
|
|
@@ -2626,6 +2585,7 @@ var KanbanAPI = class extends BaseResourceAPI {
|
|
|
2626
2585
|
super(http, "/api/v1/kanban");
|
|
2627
2586
|
this.getStreamConfig = getStreamConfig;
|
|
2628
2587
|
}
|
|
2588
|
+
getStreamConfig;
|
|
2629
2589
|
// ===== BOARD =====
|
|
2630
2590
|
/**
|
|
2631
2591
|
* Get the current org's board (lanes in declared order). Auto-provisions
|
|
@@ -2827,6 +2787,7 @@ var RemoteAgentsAPI = class extends BaseResourceAPI {
|
|
|
2827
2787
|
super(http, "/api/v1/remote-agents");
|
|
2828
2788
|
this.getStreamConfig = getStreamConfig;
|
|
2829
2789
|
}
|
|
2790
|
+
getStreamConfig;
|
|
2830
2791
|
/**
|
|
2831
2792
|
* List all remote agents in the organization
|
|
2832
2793
|
*
|