@integrity-labs/agt-cli 0.27.162 → 0.27.163
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-LK7R6HLJ.js → chunk-3A2H4ZLD.js} +9 -2
- package/dist/{chunk-LK7R6HLJ.js.map → chunk-3A2H4ZLD.js.map} +1 -1
- package/dist/{chunk-AEECYKHW.js → chunk-5TBIEU36.js} +2 -2
- package/dist/{chunk-H5B4ESA5.js → chunk-DTZKJYJP.js} +2 -2
- package/dist/{claude-pair-runtime-TZOAZFBQ.js → claude-pair-runtime-ZEFIYDUH.js} +2 -2
- package/dist/lib/manager-worker.js +10 -13
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/slack-channel.js +123 -81
- package/dist/mcp/telegram-channel.js +85 -43
- package/dist/{persistent-session-WL22MKBS.js → persistent-session-7BLPRGWR.js} +3 -3
- package/dist/{responsiveness-probe-N3Q3O6X7.js → responsiveness-probe-AL3O7SYZ.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-AEECYKHW.js.map → chunk-5TBIEU36.js.map} +0 -0
- /package/dist/{chunk-H5B4ESA5.js.map → chunk-DTZKJYJP.js.map} +0 -0
- /package/dist/{claude-pair-runtime-TZOAZFBQ.js.map → claude-pair-runtime-ZEFIYDUH.js.map} +0 -0
- /package/dist/{persistent-session-WL22MKBS.js.map → persistent-session-7BLPRGWR.js.map} +0 -0
- /package/dist/{responsiveness-probe-N3Q3O6X7.js.map → responsiveness-probe-AL3O7SYZ.js.map} +0 -0
|
@@ -14318,9 +14318,9 @@ import https from "https";
|
|
|
14318
14318
|
import { createHash, randomUUID as randomUUID2 } from "crypto";
|
|
14319
14319
|
import {
|
|
14320
14320
|
createWriteStream,
|
|
14321
|
-
existsSync as
|
|
14321
|
+
existsSync as existsSync5,
|
|
14322
14322
|
mkdirSync as mkdirSync4,
|
|
14323
|
-
readFileSync as
|
|
14323
|
+
readFileSync as readFileSync6,
|
|
14324
14324
|
readdirSync as readdirSync2,
|
|
14325
14325
|
renameSync as renameSync4,
|
|
14326
14326
|
statSync,
|
|
@@ -14328,8 +14328,8 @@ import {
|
|
|
14328
14328
|
watch,
|
|
14329
14329
|
writeFileSync as writeFileSync4
|
|
14330
14330
|
} from "fs";
|
|
14331
|
-
import { homedir as
|
|
14332
|
-
import { join as
|
|
14331
|
+
import { homedir as homedir3 } from "os";
|
|
14332
|
+
import { join as join6 } from "path";
|
|
14333
14333
|
|
|
14334
14334
|
// src/channel-attachments.ts
|
|
14335
14335
|
import { homedir } from "os";
|
|
@@ -15976,8 +15976,47 @@ function readLockHolder(path) {
|
|
|
15976
15976
|
}
|
|
15977
15977
|
|
|
15978
15978
|
// src/ack-reaction.ts
|
|
15979
|
-
import { readdirSync, readFileSync as
|
|
15979
|
+
import { readdirSync, readFileSync as readFileSync5 } from "fs";
|
|
15980
|
+
import { join as join5 } from "path";
|
|
15981
|
+
|
|
15982
|
+
// src/flags-cache-read.ts
|
|
15983
|
+
import { existsSync as existsSync4, readFileSync as readFileSync4 } from "fs";
|
|
15984
|
+
import { homedir as homedir2 } from "os";
|
|
15980
15985
|
import { join as join4 } from "path";
|
|
15986
|
+
function defaultFlagsCachePath() {
|
|
15987
|
+
return join4(homedir2(), ".augmented", "flags-cache.json");
|
|
15988
|
+
}
|
|
15989
|
+
function envBoolean(raw) {
|
|
15990
|
+
if (raw === void 0) return void 0;
|
|
15991
|
+
const v = raw.trim().toLowerCase();
|
|
15992
|
+
if (v === "") return void 0;
|
|
15993
|
+
if (v === "1" || v === "true" || v === "yes" || v === "on") return true;
|
|
15994
|
+
if (v === "0" || v === "false" || v === "no" || v === "off") return false;
|
|
15995
|
+
return void 0;
|
|
15996
|
+
}
|
|
15997
|
+
function cachedBoolean(key2, path) {
|
|
15998
|
+
try {
|
|
15999
|
+
if (!existsSync4(path)) return void 0;
|
|
16000
|
+
const parsed = JSON.parse(readFileSync4(path, "utf8"));
|
|
16001
|
+
if (!parsed || typeof parsed !== "object") return void 0;
|
|
16002
|
+
const flags = parsed.flags;
|
|
16003
|
+
if (!flags || typeof flags !== "object") return void 0;
|
|
16004
|
+
const value = flags[key2];
|
|
16005
|
+
return typeof value === "boolean" ? value : void 0;
|
|
16006
|
+
} catch {
|
|
16007
|
+
return void 0;
|
|
16008
|
+
}
|
|
16009
|
+
}
|
|
16010
|
+
function resolveHostBooleanFlag(opts) {
|
|
16011
|
+
const env = opts.env ?? process.env;
|
|
16012
|
+
const envValue = envBoolean(env[opts.envVar]);
|
|
16013
|
+
if (envValue !== void 0) return envValue;
|
|
16014
|
+
const cached2 = cachedBoolean(opts.key, opts.cachePath ?? defaultFlagsCachePath());
|
|
16015
|
+
if (cached2 !== void 0) return cached2;
|
|
16016
|
+
return opts.defaultValue;
|
|
16017
|
+
}
|
|
16018
|
+
|
|
16019
|
+
// src/ack-reaction.ts
|
|
15981
16020
|
var REPLY_WEDGED_THRESHOLD_MS = 5 * 60 * 1e3;
|
|
15982
16021
|
var ACK_STARTUP_GRACE_MS = 6e4;
|
|
15983
16022
|
var ACK_PANE_FRESH_THRESHOLD_MS = 6e4;
|
|
@@ -16010,8 +16049,11 @@ function undeliverableNoticeText() {
|
|
|
16010
16049
|
var BUSY_ACK_THRESHOLD_MS = 9e4;
|
|
16011
16050
|
var BUSY_ACK_NOTICE_THROTTLE_MS = 10 * 60 * 1e3;
|
|
16012
16051
|
function channelBusyAckEnabled() {
|
|
16013
|
-
|
|
16014
|
-
|
|
16052
|
+
return resolveHostBooleanFlag({
|
|
16053
|
+
key: "channel-busy-ack",
|
|
16054
|
+
envVar: "AGT_CHANNEL_BUSY_ACK_ENABLED",
|
|
16055
|
+
defaultValue: false
|
|
16056
|
+
});
|
|
16015
16057
|
}
|
|
16016
16058
|
function channelBusyAckThresholdMs() {
|
|
16017
16059
|
const raw = parseInt(process.env.AGT_CHANNEL_BUSY_ACK_THRESHOLD_MS ?? "", 10);
|
|
@@ -16035,7 +16077,7 @@ var GIVE_UP_SIGNAL_MAX_AGE_MS = 30 * 60 * 1e3;
|
|
|
16035
16077
|
function readGiveUpSignalAtMs(path, now = Date.now()) {
|
|
16036
16078
|
if (!path) return null;
|
|
16037
16079
|
try {
|
|
16038
|
-
const raw = JSON.parse(
|
|
16080
|
+
const raw = JSON.parse(readFileSync5(path, "utf8"));
|
|
16039
16081
|
if (typeof raw.gave_up_at !== "string") return null;
|
|
16040
16082
|
const t = Date.parse(raw.gave_up_at);
|
|
16041
16083
|
if (!Number.isFinite(t) || t > now) return null;
|
|
@@ -16067,7 +16109,7 @@ function oldestPendingMarkerAgeMs(dir, now = Date.now()) {
|
|
|
16067
16109
|
if (!name.endsWith(".json")) continue;
|
|
16068
16110
|
let receivedAt;
|
|
16069
16111
|
try {
|
|
16070
|
-
const raw = JSON.parse(
|
|
16112
|
+
const raw = JSON.parse(readFileSync5(join5(dir, name), "utf-8"));
|
|
16071
16113
|
receivedAt = raw.received_at;
|
|
16072
16114
|
} catch {
|
|
16073
16115
|
continue;
|
|
@@ -16115,7 +16157,7 @@ function redactId(id) {
|
|
|
16115
16157
|
}
|
|
16116
16158
|
var BOT_TOKEN = process.env.TELEGRAM_BOT_TOKEN;
|
|
16117
16159
|
var AGENT_CODE_NAME = process.env.AGT_AGENT_CODE_NAME ?? "unknown";
|
|
16118
|
-
var TELEGRAM_AGENT_DIR = AGENT_CODE_NAME && AGENT_CODE_NAME !== "unknown" ?
|
|
16160
|
+
var TELEGRAM_AGENT_DIR = AGENT_CODE_NAME && AGENT_CODE_NAME !== "unknown" ? join6(homedir3(), ".augmented", AGENT_CODE_NAME) : null;
|
|
16119
16161
|
var AGT_HOST = process.env.AGT_HOST ?? null;
|
|
16120
16162
|
var AGT_API_KEY = process.env.AGT_API_KEY ?? null;
|
|
16121
16163
|
var AGT_AGENT_ID = process.env.AGT_AGENT_ID ?? null;
|
|
@@ -16209,9 +16251,9 @@ if (!BOT_TOKEN) {
|
|
|
16209
16251
|
var stderrLogStream = null;
|
|
16210
16252
|
if (AGENT_CODE_NAME && AGENT_CODE_NAME !== "unknown") {
|
|
16211
16253
|
try {
|
|
16212
|
-
const logDir =
|
|
16254
|
+
const logDir = join6(homedir3(), ".augmented", AGENT_CODE_NAME);
|
|
16213
16255
|
mkdirSync4(logDir, { recursive: true });
|
|
16214
|
-
stderrLogStream = createWriteStream(
|
|
16256
|
+
stderrLogStream = createWriteStream(join6(logDir, "telegram-channel-stderr.log"), {
|
|
16215
16257
|
flags: "a",
|
|
16216
16258
|
mode: 384
|
|
16217
16259
|
});
|
|
@@ -16401,7 +16443,7 @@ function scheduleBusyAck(chatId, messageId) {
|
|
|
16401
16443
|
let paneLogFreshAgeMs = null;
|
|
16402
16444
|
if (AGENT_DIR) {
|
|
16403
16445
|
try {
|
|
16404
|
-
const paneMtimeMs = statSync(
|
|
16446
|
+
const paneMtimeMs = statSync(join6(AGENT_DIR, "pane.log")).mtimeMs;
|
|
16405
16447
|
paneLogFreshAgeMs = Math.max(0, Date.now() - paneMtimeMs);
|
|
16406
16448
|
} catch {
|
|
16407
16449
|
}
|
|
@@ -16423,7 +16465,7 @@ function scheduleBusyAck(chatId, messageId) {
|
|
|
16423
16465
|
function __resetBusyAckNoticeThrottle() {
|
|
16424
16466
|
lastBusyAckNoticeAt.clear();
|
|
16425
16467
|
}
|
|
16426
|
-
var RESTART_FLAGS_DIR =
|
|
16468
|
+
var RESTART_FLAGS_DIR = join6(homedir3(), ".augmented", "restart-flags");
|
|
16427
16469
|
function writeTelegramRestartConfirm(reply, requesterName) {
|
|
16428
16470
|
if (!RESTART_CONFIRM_FILE) return;
|
|
16429
16471
|
const marker = {
|
|
@@ -16555,10 +16597,10 @@ async function handleStatusCommand(opts) {
|
|
|
16555
16597
|
}
|
|
16556
16598
|
async function handleRestartCommand(opts) {
|
|
16557
16599
|
try {
|
|
16558
|
-
if (!
|
|
16600
|
+
if (!existsSync5(RESTART_FLAGS_DIR)) {
|
|
16559
16601
|
mkdirSync4(RESTART_FLAGS_DIR, { recursive: true });
|
|
16560
16602
|
}
|
|
16561
|
-
const flagPath =
|
|
16603
|
+
const flagPath = join6(RESTART_FLAGS_DIR, `${AGENT_CODE_NAME}.flag`);
|
|
16562
16604
|
writeTelegramRestartConfirm(
|
|
16563
16605
|
{ chat_id: opts.chatId, message_id: opts.messageId },
|
|
16564
16606
|
opts.requesterName
|
|
@@ -16937,10 +16979,10 @@ async function classifyRestartCommand(text) {
|
|
|
16937
16979
|
if (!ours) return "verification_failed";
|
|
16938
16980
|
return target === ours ? "act" : "ignore";
|
|
16939
16981
|
}
|
|
16940
|
-
var AGENT_DIR = AGENT_CODE_NAME && AGENT_CODE_NAME !== "unknown" ?
|
|
16941
|
-
var PENDING_INBOUND_DIR = AGENT_DIR ?
|
|
16942
|
-
var RECOVERY_OUTBOX_DIR = AGENT_DIR ?
|
|
16943
|
-
var RESTART_CONFIRM_FILE = AGENT_DIR ?
|
|
16982
|
+
var AGENT_DIR = AGENT_CODE_NAME && AGENT_CODE_NAME !== "unknown" ? join6(homedir3(), ".augmented", AGENT_CODE_NAME) : null;
|
|
16983
|
+
var PENDING_INBOUND_DIR = AGENT_DIR ? join6(AGENT_DIR, "telegram-pending-inbound") : null;
|
|
16984
|
+
var RECOVERY_OUTBOX_DIR = AGENT_DIR ? join6(AGENT_DIR, "telegram-recovery-outbox") : null;
|
|
16985
|
+
var RESTART_CONFIRM_FILE = AGENT_DIR ? join6(AGENT_DIR, "telegram-restart-confirm.json") : null;
|
|
16944
16986
|
var TELEGRAM_PROCESS_BOOT_MS = Date.now();
|
|
16945
16987
|
function safeMarkerName(chatId, messageId) {
|
|
16946
16988
|
const safe = (s) => s.replace(/[^A-Za-z0-9_-]/g, "_");
|
|
@@ -16948,7 +16990,7 @@ function safeMarkerName(chatId, messageId) {
|
|
|
16948
16990
|
}
|
|
16949
16991
|
function pendingInboundPath(chatId, messageId) {
|
|
16950
16992
|
if (!PENDING_INBOUND_DIR) return null;
|
|
16951
|
-
return
|
|
16993
|
+
return join6(PENDING_INBOUND_DIR, safeMarkerName(chatId, messageId));
|
|
16952
16994
|
}
|
|
16953
16995
|
function writePendingInboundMarker(chatId, messageId, chatType, undeliverable = false, payload) {
|
|
16954
16996
|
const path = pendingInboundPath(chatId, messageId);
|
|
@@ -16977,7 +17019,7 @@ function writePendingInboundMarker(chatId, messageId, chatType, undeliverable =
|
|
|
16977
17019
|
function clearTelegramMarkerFileWithHeal(fullPath) {
|
|
16978
17020
|
let marker = null;
|
|
16979
17021
|
try {
|
|
16980
|
-
marker = JSON.parse(
|
|
17022
|
+
marker = JSON.parse(readFileSync6(fullPath, "utf-8"));
|
|
16981
17023
|
} catch {
|
|
16982
17024
|
}
|
|
16983
17025
|
if (marker && decideRecoveryHeal({
|
|
@@ -16987,7 +17029,7 @@ function clearTelegramMarkerFileWithHeal(fullPath) {
|
|
|
16987
17029
|
notifyBackOnline(marker.chat_id);
|
|
16988
17030
|
}
|
|
16989
17031
|
try {
|
|
16990
|
-
if (
|
|
17032
|
+
if (existsSync5(fullPath)) unlinkSync4(fullPath);
|
|
16991
17033
|
} catch {
|
|
16992
17034
|
}
|
|
16993
17035
|
}
|
|
@@ -16998,9 +17040,9 @@ function clearPendingInboundMarker(chatId, messageId) {
|
|
|
16998
17040
|
}
|
|
16999
17041
|
function readPendingInboundMarker(chatId, messageId) {
|
|
17000
17042
|
const path = pendingInboundPath(chatId, messageId);
|
|
17001
|
-
if (!path || !
|
|
17043
|
+
if (!path || !existsSync5(path)) return null;
|
|
17002
17044
|
try {
|
|
17003
|
-
return JSON.parse(
|
|
17045
|
+
return JSON.parse(readFileSync6(path, "utf-8"));
|
|
17004
17046
|
} catch {
|
|
17005
17047
|
return null;
|
|
17006
17048
|
}
|
|
@@ -17020,10 +17062,10 @@ function nextRetryName(filename) {
|
|
|
17020
17062
|
async function processRecoveryOutboxFile(filename) {
|
|
17021
17063
|
if (!RECOVERY_OUTBOX_DIR) return;
|
|
17022
17064
|
if (filename.endsWith(".poison.json") || filename.endsWith(".tmp")) return;
|
|
17023
|
-
const fullPath =
|
|
17065
|
+
const fullPath = join6(RECOVERY_OUTBOX_DIR, filename);
|
|
17024
17066
|
let payload;
|
|
17025
17067
|
try {
|
|
17026
|
-
const raw =
|
|
17068
|
+
const raw = readFileSync6(fullPath, "utf-8");
|
|
17027
17069
|
payload = JSON.parse(raw);
|
|
17028
17070
|
} catch (err) {
|
|
17029
17071
|
process.stderr.write(
|
|
@@ -17086,7 +17128,7 @@ async function processRecoveryOutboxFile(filename) {
|
|
|
17086
17128
|
const next = nextRetryName(filename);
|
|
17087
17129
|
if (next) {
|
|
17088
17130
|
try {
|
|
17089
|
-
renameSync4(fullPath,
|
|
17131
|
+
renameSync4(fullPath, join6(RECOVERY_OUTBOX_DIR, next.next));
|
|
17090
17132
|
if (next.attempt >= MAX_RECOVERY_ATTEMPTS) {
|
|
17091
17133
|
process.stderr.write(
|
|
17092
17134
|
`telegram-channel(${AGENT_CODE_NAME}): ghost-reply recovery exhausted retries \u2014 moved to ${next.next}
|
|
@@ -17126,7 +17168,7 @@ function scanRecoveryRetries() {
|
|
|
17126
17168
|
if (!f.includes(".retry-") || f.endsWith(".poison.json")) continue;
|
|
17127
17169
|
let mtimeMs;
|
|
17128
17170
|
try {
|
|
17129
|
-
mtimeMs = statSync(
|
|
17171
|
+
mtimeMs = statSync(join6(RECOVERY_OUTBOX_DIR, f)).mtimeMs;
|
|
17130
17172
|
} catch {
|
|
17131
17173
|
continue;
|
|
17132
17174
|
}
|
|
@@ -17156,7 +17198,7 @@ function startRecoveryOutboxWatcher() {
|
|
|
17156
17198
|
const watcher = watch(RECOVERY_OUTBOX_DIR, (event, filename) => {
|
|
17157
17199
|
if (event !== "rename" || !filename) return;
|
|
17158
17200
|
if (!isFirstAttemptOutboxFile(filename)) return;
|
|
17159
|
-
if (
|
|
17201
|
+
if (existsSync5(join6(RECOVERY_OUTBOX_DIR, filename))) {
|
|
17160
17202
|
void processRecoveryOutboxFile(filename);
|
|
17161
17203
|
}
|
|
17162
17204
|
});
|
|
@@ -17177,7 +17219,7 @@ function trackPendingMessage(chatId, messageId, chatType, undeliverable = false,
|
|
|
17177
17219
|
}
|
|
17178
17220
|
function sweepTelegramStaleMarkers(thresholdMs) {
|
|
17179
17221
|
if (!PENDING_INBOUND_DIR) return;
|
|
17180
|
-
if (!
|
|
17222
|
+
if (!existsSync5(PENDING_INBOUND_DIR)) return;
|
|
17181
17223
|
let filenames;
|
|
17182
17224
|
try {
|
|
17183
17225
|
filenames = readdirSync2(PENDING_INBOUND_DIR);
|
|
@@ -17193,10 +17235,10 @@ function sweepTelegramStaleMarkers(thresholdMs) {
|
|
|
17193
17235
|
for (const filename of filenames) {
|
|
17194
17236
|
if (!filename.endsWith(".json")) continue;
|
|
17195
17237
|
if (filename.endsWith(".tmp")) continue;
|
|
17196
|
-
const fullPath =
|
|
17238
|
+
const fullPath = join6(PENDING_INBOUND_DIR, filename);
|
|
17197
17239
|
let marker;
|
|
17198
17240
|
try {
|
|
17199
|
-
marker = JSON.parse(
|
|
17241
|
+
marker = JSON.parse(readFileSync6(fullPath, "utf-8"));
|
|
17200
17242
|
} catch (err) {
|
|
17201
17243
|
process.stderr.write(
|
|
17202
17244
|
`telegram-channel(${AGENT_CODE_NAME}): stale-marker parse failed for ${redactId(filename)}: ${err.message}
|
|
@@ -17235,14 +17277,14 @@ var orphanSweepTimer = setInterval(() => {
|
|
|
17235
17277
|
orphanSweepTimer.unref?.();
|
|
17236
17278
|
var lastGiveUpHandledAtMs = null;
|
|
17237
17279
|
function listPendingInboundChatIds() {
|
|
17238
|
-
if (!PENDING_INBOUND_DIR || !
|
|
17280
|
+
if (!PENDING_INBOUND_DIR || !existsSync5(PENDING_INBOUND_DIR)) return [];
|
|
17239
17281
|
const chats = /* @__PURE__ */ new Set();
|
|
17240
17282
|
try {
|
|
17241
17283
|
for (const name of readdirSync2(PENDING_INBOUND_DIR)) {
|
|
17242
17284
|
if (!name.endsWith(".json")) continue;
|
|
17243
17285
|
try {
|
|
17244
17286
|
const marker = JSON.parse(
|
|
17245
|
-
|
|
17287
|
+
readFileSync6(join6(PENDING_INBOUND_DIR, name), "utf8")
|
|
17246
17288
|
);
|
|
17247
17289
|
if (typeof marker.chat_id === "string" && marker.chat_id) chats.add(marker.chat_id);
|
|
17248
17290
|
} catch {
|
|
@@ -17283,7 +17325,7 @@ async function notifyWatchdogGiveUp(chatId) {
|
|
|
17283
17325
|
}
|
|
17284
17326
|
function checkWatchdogGiveUpNotice() {
|
|
17285
17327
|
if (!AGENT_DIR) return;
|
|
17286
|
-
const signalAtMs = readGiveUpSignalAtMs(
|
|
17328
|
+
const signalAtMs = readGiveUpSignalAtMs(join6(AGENT_DIR, GIVE_UP_SIGNAL_FILENAME));
|
|
17287
17329
|
const act = decideGiveUpNotice({
|
|
17288
17330
|
signalAtMs,
|
|
17289
17331
|
lastHandledAtMs: lastGiveUpHandledAtMs,
|
|
@@ -17361,7 +17403,7 @@ function clearPendingMessage(chatId, messageId) {
|
|
|
17361
17403
|
clearPendingInboundMarker(chatId, messageId);
|
|
17362
17404
|
return;
|
|
17363
17405
|
}
|
|
17364
|
-
if (!PENDING_INBOUND_DIR || !
|
|
17406
|
+
if (!PENDING_INBOUND_DIR || !existsSync5(PENDING_INBOUND_DIR)) return;
|
|
17365
17407
|
const safeChatId = chatId.replace(/[^A-Za-z0-9_-]/g, "_");
|
|
17366
17408
|
const prefix = `${safeChatId}__`;
|
|
17367
17409
|
let filenames;
|
|
@@ -17373,7 +17415,7 @@ function clearPendingMessage(chatId, messageId) {
|
|
|
17373
17415
|
for (const filename of filenames) {
|
|
17374
17416
|
if (!filename.startsWith(prefix)) continue;
|
|
17375
17417
|
if (!filename.endsWith(".json")) continue;
|
|
17376
|
-
clearTelegramMarkerFileWithHeal(
|
|
17418
|
+
clearTelegramMarkerFileWithHeal(join6(PENDING_INBOUND_DIR, filename));
|
|
17377
17419
|
}
|
|
17378
17420
|
}
|
|
17379
17421
|
function noteThreadActivity(chatId, messageId) {
|
|
@@ -17972,7 +18014,7 @@ await mcp.connect(new StdioServerTransport());
|
|
|
17972
18014
|
var REPLAY_SCAN_INTERVAL_MS = 6e4;
|
|
17973
18015
|
async function replayPendingTelegramMarkers() {
|
|
17974
18016
|
if (!channelReplayEnabled()) return;
|
|
17975
|
-
if (!PENDING_INBOUND_DIR || !
|
|
18017
|
+
if (!PENDING_INBOUND_DIR || !existsSync5(PENDING_INBOUND_DIR)) return;
|
|
17976
18018
|
const probe = process.env.TMUX && AGENT_CODE_NAME && AGENT_CODE_NAME !== "unknown" ? probeAgentSessionCached(AGENT_CODE_NAME) : { tmux: "unknown", claude: "unknown" };
|
|
17977
18019
|
const sessionAlive = probe.tmux === "alive" && probe.claude === "alive";
|
|
17978
18020
|
if (!sessionAlive) return;
|
|
@@ -17986,10 +18028,10 @@ async function replayPendingTelegramMarkers() {
|
|
|
17986
18028
|
const entries = [];
|
|
17987
18029
|
for (const name of filenames) {
|
|
17988
18030
|
if (!name.endsWith(".json") || name.endsWith(".tmp")) continue;
|
|
17989
|
-
const fullPath =
|
|
18031
|
+
const fullPath = join6(PENDING_INBOUND_DIR, name);
|
|
17990
18032
|
let marker;
|
|
17991
18033
|
try {
|
|
17992
|
-
marker = JSON.parse(
|
|
18034
|
+
marker = JSON.parse(readFileSync6(fullPath, "utf-8"));
|
|
17993
18035
|
} catch {
|
|
17994
18036
|
continue;
|
|
17995
18037
|
}
|
|
@@ -18021,7 +18063,7 @@ async function replayPendingTelegramMarkers() {
|
|
|
18021
18063
|
continue;
|
|
18022
18064
|
}
|
|
18023
18065
|
try {
|
|
18024
|
-
if (
|
|
18066
|
+
if (existsSync5(path)) {
|
|
18025
18067
|
const updated = {
|
|
18026
18068
|
...marker,
|
|
18027
18069
|
replay_count: (marker.replay_count ?? 0) + 1
|
|
@@ -18384,7 +18426,7 @@ async function pollLoop() {
|
|
|
18384
18426
|
let paneLogFreshAgeMs = null;
|
|
18385
18427
|
if (AGENT_DIR) {
|
|
18386
18428
|
try {
|
|
18387
|
-
const paneMtimeMs = statSync(
|
|
18429
|
+
const paneMtimeMs = statSync(join6(AGENT_DIR, "pane.log")).mtimeMs;
|
|
18388
18430
|
paneLogFreshAgeMs = Math.max(0, Date.now() - paneMtimeMs);
|
|
18389
18431
|
} catch {
|
|
18390
18432
|
}
|
|
@@ -25,8 +25,8 @@ import {
|
|
|
25
25
|
takeAcpxExecFailureCount,
|
|
26
26
|
takeZombieDetection,
|
|
27
27
|
writePersistentClaudeWrapper
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-5TBIEU36.js";
|
|
29
|
+
import "./chunk-3A2H4ZLD.js";
|
|
30
30
|
import "./chunk-XWVM4KPK.js";
|
|
31
31
|
export {
|
|
32
32
|
SEND_KEYS_ENTER_DELAY_MS,
|
|
@@ -56,4 +56,4 @@ export {
|
|
|
56
56
|
takeZombieDetection,
|
|
57
57
|
writePersistentClaudeWrapper
|
|
58
58
|
};
|
|
59
|
-
//# sourceMappingURL=persistent-session-
|
|
59
|
+
//# sourceMappingURL=persistent-session-7BLPRGWR.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-5TBIEU36.js";
|
|
4
|
+
import "./chunk-3A2H4ZLD.js";
|
|
5
5
|
import "./chunk-XWVM4KPK.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/responsiveness-probe.ts
|
|
@@ -192,4 +192,4 @@ export {
|
|
|
192
192
|
oldestLivePendingInboundMtimeMs,
|
|
193
193
|
parkPendingInbound
|
|
194
194
|
};
|
|
195
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
195
|
+
//# sourceMappingURL=responsiveness-probe-AL3O7SYZ.js.map
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|