@blade-hq/agent-client 1.2.1-beta.3 → 1.2.1-beta.6
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.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/shared/projection/builder.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -914,6 +914,7 @@ var ClientProjectionBuilder = class {
|
|
|
914
914
|
pendingChildPauses = /* @__PURE__ */ new Map();
|
|
915
915
|
pendingMemoryRefs = /* @__PURE__ */ new Map();
|
|
916
916
|
activeCompactions = /* @__PURE__ */ new Map();
|
|
917
|
+
failedCompactions = /* @__PURE__ */ new Map();
|
|
917
918
|
seq = 0;
|
|
918
919
|
syntheticCounter = 0;
|
|
919
920
|
displayNameResolver;
|
|
@@ -1019,6 +1020,7 @@ var ClientProjectionBuilder = class {
|
|
|
1019
1020
|
this.pendingChildPauses.clear();
|
|
1020
1021
|
this.pendingMemoryRefs.clear();
|
|
1021
1022
|
this.activeCompactions.clear();
|
|
1023
|
+
this.failedCompactions.clear();
|
|
1022
1024
|
this.seq = 0;
|
|
1023
1025
|
this.syntheticCounter = 0;
|
|
1024
1026
|
}
|
|
@@ -1491,7 +1493,7 @@ var ClientProjectionBuilder = class {
|
|
|
1491
1493
|
onCompaction(eventType, loopId, payload) {
|
|
1492
1494
|
const compactionId = String(payload.compaction_id ?? "");
|
|
1493
1495
|
if (!compactionId) return null;
|
|
1494
|
-
|
|
1496
|
+
let current = {
|
|
1495
1497
|
...this.activeCompactions.get(compactionId) ?? {},
|
|
1496
1498
|
...payload,
|
|
1497
1499
|
loop_id: loopId
|
|
@@ -1501,6 +1503,7 @@ var ClientProjectionBuilder = class {
|
|
|
1501
1503
|
case "compaction:start":
|
|
1502
1504
|
status = "streaming";
|
|
1503
1505
|
this.activeCompactions.set(compactionId, current);
|
|
1506
|
+
this.failedCompactions.delete(compactionId);
|
|
1504
1507
|
break;
|
|
1505
1508
|
case "compaction:end":
|
|
1506
1509
|
status = "completed";
|
|
@@ -1513,11 +1516,17 @@ var ClientProjectionBuilder = class {
|
|
|
1513
1516
|
case "compaction:error":
|
|
1514
1517
|
status = "failed";
|
|
1515
1518
|
this.activeCompactions.delete(compactionId);
|
|
1519
|
+
this.failedCompactions.set(compactionId, { ...current });
|
|
1516
1520
|
break;
|
|
1517
1521
|
default:
|
|
1518
1522
|
status = "streaming";
|
|
1519
1523
|
this.activeCompactions.set(compactionId, current);
|
|
1520
1524
|
}
|
|
1525
|
+
const failed = this.failedCompactions.get(compactionId);
|
|
1526
|
+
if (failed && status !== "failed") {
|
|
1527
|
+
current = { ...failed, ...current };
|
|
1528
|
+
status = "failed";
|
|
1529
|
+
}
|
|
1521
1530
|
const turn = buildCompactionTurn(this.nextSeq(), compactionId, loopId, status, current);
|
|
1522
1531
|
return [{ kind: "upsert", turn }];
|
|
1523
1532
|
}
|
|
@@ -4120,7 +4129,7 @@ function resolveAuthToken(options) {
|
|
|
4120
4129
|
|
|
4121
4130
|
// src/version.ts
|
|
4122
4131
|
var SDK_NAME = "agent-client";
|
|
4123
|
-
var SDK_VERSION = true ? "1.2.1-beta.
|
|
4132
|
+
var SDK_VERSION = true ? "1.2.1-beta.6" : "1.1.1";
|
|
4124
4133
|
|
|
4125
4134
|
// src/socket.ts
|
|
4126
4135
|
function withSdkIdentity(auth) {
|