@evident-ai/cli 3.0.1-dev.53a2800 → 3.0.1-dev.5506426
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 +29 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1918,6 +1918,15 @@ var ChannelDriver = class {
|
|
|
1918
1918
|
* the row leaves the processing list, exactly like `dontRedispatch`.
|
|
1919
1919
|
*/
|
|
1920
1920
|
doneUndeliverable = /* @__PURE__ */ new Set();
|
|
1921
|
+
/**
|
|
1922
|
+
* "Already emitted `readopt_poll_unresolved` for this row" (#229). The b1 /
|
|
1923
|
+
* unreadable-status re-evaluate leaf leaves the row UN-tracked so it is re-read
|
|
1924
|
+
* every ~2s drain until the status map becomes readable — but the server-visible
|
|
1925
|
+
* signal is an OUTCOME, so it must fire at most ONCE per row, not once per drain
|
|
1926
|
+
* (Bugbot "Re-adopt signals flood every drain"). Cleared when the row leaves the
|
|
1927
|
+
* processing list, exactly like `dontRedispatch`/`doneUndeliverable`.
|
|
1928
|
+
*/
|
|
1929
|
+
readoptPollUnresolvedSignalled = /* @__PURE__ */ new Set();
|
|
1921
1930
|
/**
|
|
1922
1931
|
* "A null-id re-adopt re-dispatch is in flight, awaiting its read-back" (WI-5
|
|
1923
1932
|
* Task 5.4, High-2). Since we no longer send a caller-supplied id, a re-dispatch
|
|
@@ -2731,12 +2740,17 @@ var ChannelDriver = class {
|
|
|
2731
2740
|
*/
|
|
2732
2741
|
async readoptProcessing() {
|
|
2733
2742
|
const rows = await this.getProcessingMessages();
|
|
2734
|
-
if (this.dontRedispatch.size > 0 || this.doneUndeliverable.size > 0) {
|
|
2743
|
+
if (this.dontRedispatch.size > 0 || this.doneUndeliverable.size > 0 || this.readoptPollUnresolvedSignalled.size > 0) {
|
|
2735
2744
|
const stillProcessing = new Set(rows.map((r) => r.id));
|
|
2736
|
-
for (const id of [
|
|
2745
|
+
for (const id of [
|
|
2746
|
+
...this.dontRedispatch,
|
|
2747
|
+
...this.doneUndeliverable,
|
|
2748
|
+
...this.readoptPollUnresolvedSignalled
|
|
2749
|
+
]) {
|
|
2737
2750
|
if (!stillProcessing.has(id)) {
|
|
2738
2751
|
const cleared = this.dontRedispatch.delete(id);
|
|
2739
2752
|
const clearedUndeliverable = this.doneUndeliverable.delete(id);
|
|
2753
|
+
this.readoptPollUnresolvedSignalled.delete(id);
|
|
2740
2754
|
if (cleared || clearedUndeliverable) {
|
|
2741
2755
|
this.log({
|
|
2742
2756
|
level: "info",
|
|
@@ -2855,6 +2869,7 @@ var ChannelDriver = class {
|
|
|
2855
2869
|
conversation_id: row.conversation_id,
|
|
2856
2870
|
message_id: row.id
|
|
2857
2871
|
});
|
|
2872
|
+
void this.postSignal(row.conversation_id, row.id, "readopt_undeliverable");
|
|
2858
2873
|
return;
|
|
2859
2874
|
}
|
|
2860
2875
|
this.log({
|
|
@@ -2866,6 +2881,7 @@ var ChannelDriver = class {
|
|
|
2866
2881
|
return;
|
|
2867
2882
|
}
|
|
2868
2883
|
this.dontRedispatch.delete(row.id);
|
|
2884
|
+
void this.postSignal(row.conversation_id, row.id, "readopt_done");
|
|
2869
2885
|
return;
|
|
2870
2886
|
}
|
|
2871
2887
|
if (state === "failed") {
|
|
@@ -2888,6 +2904,7 @@ var ChannelDriver = class {
|
|
|
2888
2904
|
conversation_id: row.conversation_id,
|
|
2889
2905
|
message_id: row.id
|
|
2890
2906
|
});
|
|
2907
|
+
void this.postSignal(row.conversation_id, row.id, "readopt_undeliverable");
|
|
2891
2908
|
return;
|
|
2892
2909
|
}
|
|
2893
2910
|
this.log({
|
|
@@ -2899,6 +2916,7 @@ var ChannelDriver = class {
|
|
|
2899
2916
|
return;
|
|
2900
2917
|
}
|
|
2901
2918
|
this.dontRedispatch.delete(row.id);
|
|
2919
|
+
void this.postSignal(row.conversation_id, row.id, "readopt_failed");
|
|
2902
2920
|
return;
|
|
2903
2921
|
}
|
|
2904
2922
|
if (this.dontRedispatch.has(row.id)) {
|
|
@@ -2941,6 +2959,10 @@ var ChannelDriver = class {
|
|
|
2941
2959
|
conversation_id: row.conversation_id,
|
|
2942
2960
|
message_id: row.id
|
|
2943
2961
|
});
|
|
2962
|
+
if (!this.readoptPollUnresolvedSignalled.has(row.id)) {
|
|
2963
|
+
this.readoptPollUnresolvedSignalled.add(row.id);
|
|
2964
|
+
void this.postSignal(row.conversation_id, row.id, "readopt_poll_unresolved");
|
|
2965
|
+
}
|
|
2944
2966
|
return;
|
|
2945
2967
|
}
|
|
2946
2968
|
this.log({
|
|
@@ -2984,6 +3006,7 @@ var ChannelDriver = class {
|
|
|
2984
3006
|
conversation_id: row.conversation_id,
|
|
2985
3007
|
message_id: row.id
|
|
2986
3008
|
});
|
|
3009
|
+
void this.postSignal(row.conversation_id, row.id, "readopt_reattached");
|
|
2987
3010
|
return;
|
|
2988
3011
|
}
|
|
2989
3012
|
await this.forceReadoptRun(sessionId, row);
|
|
@@ -3036,6 +3059,7 @@ var ChannelDriver = class {
|
|
|
3036
3059
|
conversation_id: row.conversation_id,
|
|
3037
3060
|
message_id: row.id
|
|
3038
3061
|
});
|
|
3062
|
+
void this.postSignal(row.conversation_id, row.id, "readopt_window_elapsed");
|
|
3039
3063
|
return;
|
|
3040
3064
|
}
|
|
3041
3065
|
const options = {
|
|
@@ -3064,6 +3088,7 @@ var ChannelDriver = class {
|
|
|
3064
3088
|
conversation_id: row.conversation_id,
|
|
3065
3089
|
message_id: row.id
|
|
3066
3090
|
});
|
|
3091
|
+
void this.postSignal(row.conversation_id, row.id, "readopt_orphan_unsent");
|
|
3067
3092
|
return;
|
|
3068
3093
|
}
|
|
3069
3094
|
if (ocId === null) {
|
|
@@ -3074,6 +3099,7 @@ var ChannelDriver = class {
|
|
|
3074
3099
|
conversation_id: row.conversation_id,
|
|
3075
3100
|
message_id: row.id
|
|
3076
3101
|
});
|
|
3102
|
+
void this.postSignal(row.conversation_id, row.id, "readopt_orphan_unsent");
|
|
3077
3103
|
return;
|
|
3078
3104
|
}
|
|
3079
3105
|
const conv = this.convForRow(sessionId, row);
|
|
@@ -3083,6 +3109,7 @@ var ChannelDriver = class {
|
|
|
3083
3109
|
this.readopted.add(row.id);
|
|
3084
3110
|
this.awaitingReadopt.delete(row.id);
|
|
3085
3111
|
this.ensureWatcherRunning(sessionId);
|
|
3112
|
+
void this.postSignal(row.conversation_id, row.id, "readopt_redispatched");
|
|
3086
3113
|
}
|
|
3087
3114
|
/**
|
|
3088
3115
|
* True if `evidentMessageId` is already being driven — either in the
|