@integrity-labs/agt-cli 0.28.228 → 0.28.230
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 +4 -4
- package/dist/{chunk-STDJAYQQ.js → chunk-L55H4BIT.js} +3 -3
- package/dist/{chunk-VV5IXUN6.js → chunk-X4FOPVGZ.js} +8 -1
- package/dist/{chunk-VV5IXUN6.js.map → chunk-X4FOPVGZ.js.map} +1 -1
- package/dist/{claude-pair-runtime-CGFYM63W.js → claude-pair-runtime-CGUFXCYJ.js} +2 -2
- package/dist/lib/manager-worker.js +80 -9
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/slack-channel.js +16 -7
- package/dist/mcp/telegram-channel.js +11 -7
- package/dist/{persistent-session-VZ44GVA4.js → persistent-session-XYM2DWZU.js} +2 -2
- package/dist/{responsiveness-probe-DLIVXYKX.js → responsiveness-probe-MUPAYTJF.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-STDJAYQQ.js.map → chunk-L55H4BIT.js.map} +0 -0
- /package/dist/{claude-pair-runtime-CGFYM63W.js.map → claude-pair-runtime-CGUFXCYJ.js.map} +0 -0
- /package/dist/{persistent-session-VZ44GVA4.js.map → persistent-session-XYM2DWZU.js.map} +0 -0
- /package/dist/{responsiveness-probe-DLIVXYKX.js.map → responsiveness-probe-MUPAYTJF.js.map} +0 -0
|
@@ -14814,14 +14814,14 @@ function busyAckNoticeText() {
|
|
|
14814
14814
|
}
|
|
14815
14815
|
var GIVE_UP_SIGNAL_FILENAME = "watchdog-give-up.json";
|
|
14816
14816
|
var GIVE_UP_SIGNAL_MAX_AGE_MS = 30 * 60 * 1e3;
|
|
14817
|
-
function
|
|
14817
|
+
function readGiveUpSignal(path, now = Date.now()) {
|
|
14818
14818
|
if (!path) return null;
|
|
14819
14819
|
try {
|
|
14820
14820
|
const raw = JSON.parse(readFileSync2(path, "utf8"));
|
|
14821
14821
|
if (typeof raw.gave_up_at !== "string") return null;
|
|
14822
14822
|
const t = Date.parse(raw.gave_up_at);
|
|
14823
14823
|
if (!Number.isFinite(t) || t > now) return null;
|
|
14824
|
-
return t;
|
|
14824
|
+
return { atMs: t, reason: raw.reason === "transient_overload" ? "transient_overload" : null };
|
|
14825
14825
|
} catch {
|
|
14826
14826
|
return null;
|
|
14827
14827
|
}
|
|
@@ -14833,7 +14833,10 @@ function decideGiveUpNotice(input) {
|
|
|
14833
14833
|
if (input.lastHandledAtMs != null && input.signalAtMs <= input.lastHandledAtMs) return false;
|
|
14834
14834
|
return true;
|
|
14835
14835
|
}
|
|
14836
|
-
function giveUpNoticeText() {
|
|
14836
|
+
function giveUpNoticeText(reason = null) {
|
|
14837
|
+
if (reason === "transient_overload") {
|
|
14838
|
+
return "\u26A0\uFE0F I hit a brief overload and couldn\u2019t finish your last message \u2014 please resend it in a moment.";
|
|
14839
|
+
}
|
|
14837
14840
|
return "\u26A0\uFE0F I couldn't read your last message \u2014 please resend it.";
|
|
14838
14841
|
}
|
|
14839
14842
|
function oldestPendingMarkerAgeMs(dir, now = Date.now(), opts) {
|
|
@@ -18612,7 +18615,7 @@ function listPendingSlackConversations() {
|
|
|
18612
18615
|
}
|
|
18613
18616
|
return [...byKey.values()];
|
|
18614
18617
|
}
|
|
18615
|
-
function postSlackWatchdogGiveUpNotice(channel, threadTs, isThreadReply) {
|
|
18618
|
+
function postSlackWatchdogGiveUpNotice(channel, threadTs, isThreadReply, reason) {
|
|
18616
18619
|
if (!BOT_TOKEN || !channel) return;
|
|
18617
18620
|
const now = Date.now();
|
|
18618
18621
|
const conversationKey = isThreadReply ? `${channel}:${threadTs}` : channel;
|
|
@@ -18632,7 +18635,7 @@ function postSlackWatchdogGiveUpNotice(channel, threadTs, isThreadReply) {
|
|
|
18632
18635
|
},
|
|
18633
18636
|
body: JSON.stringify({
|
|
18634
18637
|
channel,
|
|
18635
|
-
text: giveUpNoticeText(),
|
|
18638
|
+
text: giveUpNoticeText(reason),
|
|
18636
18639
|
// CR on PR #1824: anchor to the originating message even for root
|
|
18637
18640
|
// messages (threadTs === messageTs is still the conversation target) —
|
|
18638
18641
|
// a channel-root notice diverges from postUndeliverableNotice and
|
|
@@ -18645,7 +18648,8 @@ function postSlackWatchdogGiveUpNotice(channel, threadTs, isThreadReply) {
|
|
|
18645
18648
|
}
|
|
18646
18649
|
function checkSlackWatchdogGiveUpNotice() {
|
|
18647
18650
|
if (!SLACK_AGENT_DIR) return;
|
|
18648
|
-
const
|
|
18651
|
+
const signal = readGiveUpSignal(join9(SLACK_AGENT_DIR, GIVE_UP_SIGNAL_FILENAME));
|
|
18652
|
+
const signalAtMs = signal?.atMs ?? null;
|
|
18649
18653
|
const act = decideGiveUpNotice({
|
|
18650
18654
|
signalAtMs,
|
|
18651
18655
|
lastHandledAtMs: lastSlackGiveUpHandledAtMs,
|
|
@@ -18656,7 +18660,12 @@ function checkSlackWatchdogGiveUpNotice() {
|
|
|
18656
18660
|
}
|
|
18657
18661
|
if (!act) return;
|
|
18658
18662
|
for (const convo of listPendingSlackConversations()) {
|
|
18659
|
-
postSlackWatchdogGiveUpNotice(
|
|
18663
|
+
postSlackWatchdogGiveUpNotice(
|
|
18664
|
+
convo.channel,
|
|
18665
|
+
convo.threadTs,
|
|
18666
|
+
convo.isThreadReply,
|
|
18667
|
+
signal?.reason ?? null
|
|
18668
|
+
);
|
|
18660
18669
|
}
|
|
18661
18670
|
}
|
|
18662
18671
|
function __resetSlackGiveUpNoticeStateForTests() {
|
|
@@ -17140,14 +17140,14 @@ function busyAckNoticeText() {
|
|
|
17140
17140
|
}
|
|
17141
17141
|
var GIVE_UP_SIGNAL_FILENAME = "watchdog-give-up.json";
|
|
17142
17142
|
var GIVE_UP_SIGNAL_MAX_AGE_MS = 30 * 60 * 1e3;
|
|
17143
|
-
function
|
|
17143
|
+
function readGiveUpSignal(path, now = Date.now()) {
|
|
17144
17144
|
if (!path) return null;
|
|
17145
17145
|
try {
|
|
17146
17146
|
const raw = JSON.parse(readFileSync9(path, "utf8"));
|
|
17147
17147
|
if (typeof raw.gave_up_at !== "string") return null;
|
|
17148
17148
|
const t = Date.parse(raw.gave_up_at);
|
|
17149
17149
|
if (!Number.isFinite(t) || t > now) return null;
|
|
17150
|
-
return t;
|
|
17150
|
+
return { atMs: t, reason: raw.reason === "transient_overload" ? "transient_overload" : null };
|
|
17151
17151
|
} catch {
|
|
17152
17152
|
return null;
|
|
17153
17153
|
}
|
|
@@ -17159,7 +17159,10 @@ function decideGiveUpNotice(input) {
|
|
|
17159
17159
|
if (input.lastHandledAtMs != null && input.signalAtMs <= input.lastHandledAtMs) return false;
|
|
17160
17160
|
return true;
|
|
17161
17161
|
}
|
|
17162
|
-
function giveUpNoticeText() {
|
|
17162
|
+
function giveUpNoticeText(reason = null) {
|
|
17163
|
+
if (reason === "transient_overload") {
|
|
17164
|
+
return "\u26A0\uFE0F I hit a brief overload and couldn\u2019t finish your last message \u2014 please resend it in a moment.";
|
|
17165
|
+
}
|
|
17163
17166
|
return "\u26A0\uFE0F I couldn't read your last message \u2014 please resend it.";
|
|
17164
17167
|
}
|
|
17165
17168
|
function oldestPendingMarkerAgeMs(dir, now = Date.now(), opts) {
|
|
@@ -19194,14 +19197,14 @@ function listPendingInboundChatIds() {
|
|
|
19194
19197
|
}
|
|
19195
19198
|
return [...chats];
|
|
19196
19199
|
}
|
|
19197
|
-
async function notifyWatchdogGiveUp(chatId) {
|
|
19200
|
+
async function notifyWatchdogGiveUp(chatId, reason) {
|
|
19198
19201
|
const now = Date.now();
|
|
19199
19202
|
if (!shouldPostUndeliverableNotice(lastUndeliverableNoticeAt.get(chatId), now)) return;
|
|
19200
19203
|
lastUndeliverableNoticeAt.set(chatId, now);
|
|
19201
19204
|
try {
|
|
19202
19205
|
const resp = await telegramApiCall(
|
|
19203
19206
|
"sendMessage",
|
|
19204
|
-
{ chat_id: chatId, text: giveUpNoticeText() },
|
|
19207
|
+
{ chat_id: chatId, text: giveUpNoticeText(reason) },
|
|
19205
19208
|
1e4
|
|
19206
19209
|
);
|
|
19207
19210
|
if (!resp.ok) {
|
|
@@ -19224,7 +19227,8 @@ async function notifyWatchdogGiveUp(chatId) {
|
|
|
19224
19227
|
}
|
|
19225
19228
|
function checkWatchdogGiveUpNotice() {
|
|
19226
19229
|
if (!AGENT_DIR) return;
|
|
19227
|
-
const
|
|
19230
|
+
const signal = readGiveUpSignal(join9(AGENT_DIR, GIVE_UP_SIGNAL_FILENAME));
|
|
19231
|
+
const signalAtMs = signal?.atMs ?? null;
|
|
19228
19232
|
const act = decideGiveUpNotice({
|
|
19229
19233
|
signalAtMs,
|
|
19230
19234
|
lastHandledAtMs: lastGiveUpHandledAtMs,
|
|
@@ -19243,7 +19247,7 @@ function checkWatchdogGiveUpNotice() {
|
|
|
19243
19247
|
return;
|
|
19244
19248
|
}
|
|
19245
19249
|
for (const chatId of chats) {
|
|
19246
|
-
void notifyWatchdogGiveUp(chatId);
|
|
19250
|
+
void notifyWatchdogGiveUp(chatId, signal?.reason ?? null);
|
|
19247
19251
|
}
|
|
19248
19252
|
}
|
|
19249
19253
|
function __resetGiveUpNoticeStateForTests() {
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
writeDirectChatSessionState,
|
|
37
37
|
writeEgressAllowlist,
|
|
38
38
|
writePersistentClaudeWrapper
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-X4FOPVGZ.js";
|
|
40
40
|
import "./chunk-XWVM4KPK.js";
|
|
41
41
|
export {
|
|
42
42
|
EGRESS_BASELINE_DOMAINS,
|
|
@@ -77,4 +77,4 @@ export {
|
|
|
77
77
|
writeEgressAllowlist,
|
|
78
78
|
writePersistentClaudeWrapper
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=persistent-session-
|
|
80
|
+
//# sourceMappingURL=persistent-session-XYM2DWZU.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X4FOPVGZ.js";
|
|
4
4
|
import "./chunk-XWVM4KPK.js";
|
|
5
5
|
|
|
6
6
|
// src/lib/responsiveness-probe.ts
|
|
@@ -303,4 +303,4 @@ export {
|
|
|
303
303
|
readAndResetChannelDeflections,
|
|
304
304
|
readAndResetChannelLaneClassifications
|
|
305
305
|
};
|
|
306
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
306
|
+
//# sourceMappingURL=responsiveness-probe-MUPAYTJF.js.map
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|