@integrity-labs/agt-cli 0.28.937 → 0.28.939
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/bin/agt.js +3 -3
- package/dist/{chunk-B73ALGR7.js → chunk-XSP5C7GE.js} +78 -11
- package/dist/{chunk-B73ALGR7.js.map → chunk-XSP5C7GE.js.map} +1 -1
- package/dist/lib/manager-worker.js +2 -2
- package/dist/mcp/slack-channel.js +16 -5
- package/dist/mcp/telegram-channel.js +16 -5
- package/package.json +1 -1
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
safeWriteJsonAtomic,
|
|
64
64
|
setConfigHash,
|
|
65
65
|
tripClass
|
|
66
|
-
} from "../chunk-
|
|
66
|
+
} from "../chunk-XSP5C7GE.js";
|
|
67
67
|
import {
|
|
68
68
|
getProjectDir as getProjectDir2,
|
|
69
69
|
getReadyTasks,
|
|
@@ -13939,7 +13939,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
13939
13939
|
var lastVersionCheckAt = 0;
|
|
13940
13940
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
13941
13941
|
var lastResponsivenessProbeAt = 0;
|
|
13942
|
-
var agtCliVersion = true ? "0.28.
|
|
13942
|
+
var agtCliVersion = true ? "0.28.939" : "dev";
|
|
13943
13943
|
function resolveBrewPath(execFileSync2) {
|
|
13944
13944
|
try {
|
|
13945
13945
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -39554,6 +39554,14 @@ function channelReplayEnabled() {
|
|
|
39554
39554
|
defaultValue: true
|
|
39555
39555
|
});
|
|
39556
39556
|
}
|
|
39557
|
+
function resolveSessionLiveness(i) {
|
|
39558
|
+
if (!i.env.TMUX) return "unknown";
|
|
39559
|
+
if (!i.codeName || i.codeName === "unknown") return "unknown";
|
|
39560
|
+
const probe = i.probe(i.codeName);
|
|
39561
|
+
if (probe.tmux === "dead" || probe.claude === "dead") return "dead";
|
|
39562
|
+
if (probe.tmux === "alive" && probe.claude === "alive") return "alive";
|
|
39563
|
+
return "unknown";
|
|
39564
|
+
}
|
|
39557
39565
|
function combineMarkerReplayFacts(markers) {
|
|
39558
39566
|
if (markers.length === 0) return null;
|
|
39559
39567
|
return {
|
|
@@ -39569,7 +39577,7 @@ function markerReplayable(i) {
|
|
|
39569
39577
|
}
|
|
39570
39578
|
function shouldReplayMarker(i) {
|
|
39571
39579
|
if (!markerReplayable(i)) return false;
|
|
39572
|
-
if (
|
|
39580
|
+
if (i.sessionState === "dead") return false;
|
|
39573
39581
|
const paneFreshDeferMax = i.paneFreshDeferMaxMs ?? paneFreshDeferMaxMs();
|
|
39574
39582
|
const minAge = i.minAgeMs ?? Math.min(REPLY_WEDGED_THRESHOLD_MS, Math.floor(paneFreshDeferMax / 2));
|
|
39575
39583
|
if (i.markerAgeMs < minAge) return false;
|
|
@@ -48765,9 +48773,12 @@ var SLACK_REPLAY_SCAN_INTERVAL_MS = 6e4;
|
|
|
48765
48773
|
async function replayPendingSlackMarkers() {
|
|
48766
48774
|
if (!channelReplayEnabled()) return;
|
|
48767
48775
|
if (!SLACK_PENDING_INBOUND_DIR || !existsSync10(SLACK_PENDING_INBOUND_DIR)) return;
|
|
48768
|
-
const
|
|
48769
|
-
|
|
48770
|
-
|
|
48776
|
+
const sessionState = resolveSessionLiveness({
|
|
48777
|
+
env: process.env,
|
|
48778
|
+
codeName: AGENT_CODE_NAME,
|
|
48779
|
+
probe: probeAgentSessionCached
|
|
48780
|
+
});
|
|
48781
|
+
if (sessionState === "dead") return;
|
|
48771
48782
|
let filenames;
|
|
48772
48783
|
try {
|
|
48773
48784
|
filenames = readdirSync7(SLACK_PENDING_INBOUND_DIR);
|
|
@@ -48803,7 +48814,7 @@ async function replayPendingSlackMarkers() {
|
|
|
48803
48814
|
if (!shouldReplayMarker({
|
|
48804
48815
|
enabled: true,
|
|
48805
48816
|
hasPayload: Boolean(marker.payload),
|
|
48806
|
-
|
|
48817
|
+
sessionState,
|
|
48807
48818
|
markerAgeMs: ageMs,
|
|
48808
48819
|
replayCount: marker.replay_count ?? 0,
|
|
48809
48820
|
paneFreshAgeMs,
|
|
@@ -42165,6 +42165,14 @@ function channelReplayEnabled() {
|
|
|
42165
42165
|
defaultValue: true
|
|
42166
42166
|
});
|
|
42167
42167
|
}
|
|
42168
|
+
function resolveSessionLiveness(i) {
|
|
42169
|
+
if (!i.env.TMUX) return "unknown";
|
|
42170
|
+
if (!i.codeName || i.codeName === "unknown") return "unknown";
|
|
42171
|
+
const probe = i.probe(i.codeName);
|
|
42172
|
+
if (probe.tmux === "dead" || probe.claude === "dead") return "dead";
|
|
42173
|
+
if (probe.tmux === "alive" && probe.claude === "alive") return "alive";
|
|
42174
|
+
return "unknown";
|
|
42175
|
+
}
|
|
42168
42176
|
function combineMarkerReplayFacts(markers) {
|
|
42169
42177
|
if (markers.length === 0) return null;
|
|
42170
42178
|
return {
|
|
@@ -42180,7 +42188,7 @@ function markerReplayable(i) {
|
|
|
42180
42188
|
}
|
|
42181
42189
|
function shouldReplayMarker(i) {
|
|
42182
42190
|
if (!markerReplayable(i)) return false;
|
|
42183
|
-
if (
|
|
42191
|
+
if (i.sessionState === "dead") return false;
|
|
42184
42192
|
const paneFreshDeferMax = i.paneFreshDeferMaxMs ?? paneFreshDeferMaxMs();
|
|
42185
42193
|
const minAge = i.minAgeMs ?? Math.min(REPLY_WEDGED_THRESHOLD_MS, Math.floor(paneFreshDeferMax / 2));
|
|
42186
42194
|
if (i.markerAgeMs < minAge) return false;
|
|
@@ -45713,9 +45721,12 @@ var REPLAY_SCAN_INTERVAL_MS = 6e4;
|
|
|
45713
45721
|
async function replayPendingTelegramMarkers() {
|
|
45714
45722
|
if (!channelReplayEnabled()) return;
|
|
45715
45723
|
if (!PENDING_INBOUND_DIR || !existsSync9(PENDING_INBOUND_DIR)) return;
|
|
45716
|
-
const
|
|
45717
|
-
|
|
45718
|
-
|
|
45724
|
+
const sessionState = resolveSessionLiveness({
|
|
45725
|
+
env: process.env,
|
|
45726
|
+
codeName: AGENT_CODE_NAME,
|
|
45727
|
+
probe: probeAgentSessionCached
|
|
45728
|
+
});
|
|
45729
|
+
if (sessionState === "dead") return;
|
|
45719
45730
|
let filenames;
|
|
45720
45731
|
try {
|
|
45721
45732
|
filenames = readdirSync6(PENDING_INBOUND_DIR);
|
|
@@ -45751,7 +45762,7 @@ async function replayPendingTelegramMarkers() {
|
|
|
45751
45762
|
if (!shouldReplayMarker({
|
|
45752
45763
|
enabled: true,
|
|
45753
45764
|
hasPayload: Boolean(marker.payload),
|
|
45754
|
-
|
|
45765
|
+
sessionState,
|
|
45755
45766
|
markerAgeMs: ageMs,
|
|
45756
45767
|
replayCount: marker.replay_count ?? 0,
|
|
45757
45768
|
paneFreshAgeMs,
|