@integrity-labs/agt-cli 0.28.443 → 0.28.444
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-X2LHWP6E.js → chunk-3TACGG7X.js} +2 -2
- package/dist/lib/manager-worker.js +2 -2
- package/dist/mcp/slack-channel.js +19 -1
- package/dist/mcp/telegram-channel.js +19 -2
- package/package.json +1 -1
- /package/dist/{chunk-X2LHWP6E.js.map → chunk-3TACGG7X.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-3TACGG7X.js";
|
|
44
44
|
import {
|
|
45
45
|
AnchorSessionClient,
|
|
46
46
|
CHANNEL_REGISTRY,
|
|
@@ -4830,7 +4830,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4830
4830
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4831
4831
|
import chalk18 from "chalk";
|
|
4832
4832
|
import ora16 from "ora";
|
|
4833
|
-
var cliVersion = true ? "0.28.
|
|
4833
|
+
var cliVersion = true ? "0.28.444" : "dev";
|
|
4834
4834
|
async function fetchLatestVersion() {
|
|
4835
4835
|
const host2 = getHost();
|
|
4836
4836
|
if (!host2) return null;
|
|
@@ -6002,7 +6002,7 @@ function handleError(err) {
|
|
|
6002
6002
|
}
|
|
6003
6003
|
|
|
6004
6004
|
// src/bin/agt.ts
|
|
6005
|
-
var cliVersion2 = true ? "0.28.
|
|
6005
|
+
var cliVersion2 = true ? "0.28.444" : "dev";
|
|
6006
6006
|
var program = new Command();
|
|
6007
6007
|
program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
|
|
6008
6008
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -4901,7 +4901,7 @@ function requireHost() {
|
|
|
4901
4901
|
}
|
|
4902
4902
|
|
|
4903
4903
|
// src/lib/api-client.ts
|
|
4904
|
-
var agtCliVersion = true ? "0.28.
|
|
4904
|
+
var agtCliVersion = true ? "0.28.444" : "dev";
|
|
4905
4905
|
var lastConfigHash = null;
|
|
4906
4906
|
function setConfigHash(hash) {
|
|
4907
4907
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -7402,4 +7402,4 @@ export {
|
|
|
7402
7402
|
managerInstallSystemUnitCommand,
|
|
7403
7403
|
managerUninstallSystemUnitCommand
|
|
7404
7404
|
};
|
|
7405
|
-
//# sourceMappingURL=chunk-
|
|
7405
|
+
//# sourceMappingURL=chunk-3TACGG7X.js.map
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
resolveEffectivePinRaw,
|
|
43
43
|
safeWriteJsonAtomic,
|
|
44
44
|
setConfigHash
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-3TACGG7X.js";
|
|
46
46
|
import {
|
|
47
47
|
getProjectDir as getProjectDir2,
|
|
48
48
|
getReadyTasks,
|
|
@@ -9787,7 +9787,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
9787
9787
|
var lastVersionCheckAt = 0;
|
|
9788
9788
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
9789
9789
|
var lastResponsivenessProbeAt = 0;
|
|
9790
|
-
var agtCliVersion = true ? "0.28.
|
|
9790
|
+
var agtCliVersion = true ? "0.28.444" : "dev";
|
|
9791
9791
|
function resolveBrewPath(execFileSync2) {
|
|
9792
9792
|
try {
|
|
9793
9793
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -35459,6 +35459,15 @@ function shouldReplayMarker(i) {
|
|
|
35459
35459
|
}
|
|
35460
35460
|
return true;
|
|
35461
35461
|
}
|
|
35462
|
+
function markerGcThresholdMs(i) {
|
|
35463
|
+
if (i.discretionary) {
|
|
35464
|
+
return i.discretionaryThresholdMs != null ? Math.min(i.thresholdMs, i.discretionaryThresholdMs) : i.thresholdMs;
|
|
35465
|
+
}
|
|
35466
|
+
if (i.replayEnabled && i.hasPayload && i.replayCount === 0) {
|
|
35467
|
+
return Math.max(i.thresholdMs, i.hardCeilingMs);
|
|
35468
|
+
}
|
|
35469
|
+
return i.thresholdMs;
|
|
35470
|
+
}
|
|
35462
35471
|
function isMarkerGenuinelyAged(receivedAt, nowMs, thresholdMs) {
|
|
35463
35472
|
const t = Date.parse(receivedAt ?? "");
|
|
35464
35473
|
return Number.isFinite(t) && t <= nowMs && nowMs - t >= thresholdMs;
|
|
@@ -40081,6 +40090,7 @@ function sweepSlackStaleMarkers(thresholdMs) {
|
|
|
40081
40090
|
return;
|
|
40082
40091
|
}
|
|
40083
40092
|
const now = Date.now();
|
|
40093
|
+
const replayEnabled = channelReplayEnabled();
|
|
40084
40094
|
let cleared = 0;
|
|
40085
40095
|
for (const filename of filenames) {
|
|
40086
40096
|
if (!filename.endsWith(".json")) continue;
|
|
@@ -40102,7 +40112,15 @@ function sweepSlackStaleMarkers(thresholdMs) {
|
|
|
40102
40112
|
continue;
|
|
40103
40113
|
}
|
|
40104
40114
|
const { channel, thread_ts, message_ts, received_at } = marker;
|
|
40105
|
-
const effectiveThresholdMs =
|
|
40115
|
+
const effectiveThresholdMs = markerGcThresholdMs({
|
|
40116
|
+
thresholdMs,
|
|
40117
|
+
hardCeilingMs: STALE_MARKER_MS,
|
|
40118
|
+
discretionaryThresholdMs: DISCRETIONARY_MARKER_MS,
|
|
40119
|
+
discretionary: marker.discretionary,
|
|
40120
|
+
hasPayload: Boolean(marker.payload),
|
|
40121
|
+
replayCount: marker.replay_count ?? 0,
|
|
40122
|
+
replayEnabled
|
|
40123
|
+
});
|
|
40106
40124
|
const structurallyBroken = !channel || !thread_ts || !message_ts;
|
|
40107
40125
|
const timeStale = isPendingMarkerStale(received_at, now, effectiveThresholdMs);
|
|
40108
40126
|
if (structurallyBroken || timeStale) {
|
|
@@ -37905,6 +37905,15 @@ function shouldReplayMarker(i) {
|
|
|
37905
37905
|
}
|
|
37906
37906
|
return true;
|
|
37907
37907
|
}
|
|
37908
|
+
function markerGcThresholdMs(i) {
|
|
37909
|
+
if (i.discretionary) {
|
|
37910
|
+
return i.discretionaryThresholdMs != null ? Math.min(i.thresholdMs, i.discretionaryThresholdMs) : i.thresholdMs;
|
|
37911
|
+
}
|
|
37912
|
+
if (i.replayEnabled && i.hasPayload && i.replayCount === 0) {
|
|
37913
|
+
return Math.max(i.thresholdMs, i.hardCeilingMs);
|
|
37914
|
+
}
|
|
37915
|
+
return i.thresholdMs;
|
|
37916
|
+
}
|
|
37908
37917
|
function isMarkerGenuinelyAged(receivedAt, nowMs, thresholdMs) {
|
|
37909
37918
|
const t = Date.parse(receivedAt ?? "");
|
|
37910
37919
|
return Number.isFinite(t) && t <= nowMs && nowMs - t >= thresholdMs;
|
|
@@ -39851,6 +39860,7 @@ function sweepTelegramStaleMarkers(thresholdMs) {
|
|
|
39851
39860
|
return;
|
|
39852
39861
|
}
|
|
39853
39862
|
const now = Date.now();
|
|
39863
|
+
const replayEnabled = channelReplayEnabled();
|
|
39854
39864
|
let cleared = 0;
|
|
39855
39865
|
for (const filename of filenames) {
|
|
39856
39866
|
if (!filename.endsWith(".json")) continue;
|
|
@@ -39872,10 +39882,17 @@ function sweepTelegramStaleMarkers(thresholdMs) {
|
|
|
39872
39882
|
continue;
|
|
39873
39883
|
}
|
|
39874
39884
|
const { chat_id, message_id, received_at } = marker;
|
|
39885
|
+
const effectiveThresholdMs = markerGcThresholdMs({
|
|
39886
|
+
thresholdMs,
|
|
39887
|
+
hardCeilingMs: STALE_MARKER_MS,
|
|
39888
|
+
hasPayload: Boolean(marker.payload),
|
|
39889
|
+
replayCount: marker.replay_count ?? 0,
|
|
39890
|
+
replayEnabled
|
|
39891
|
+
});
|
|
39875
39892
|
const structurallyBroken = !chat_id || !message_id;
|
|
39876
|
-
const timeStale = isPendingMarkerStale(received_at, now,
|
|
39893
|
+
const timeStale = isPendingMarkerStale(received_at, now, effectiveThresholdMs);
|
|
39877
39894
|
if (structurallyBroken || timeStale) {
|
|
39878
|
-
if (!structurallyBroken && isMarkerGenuinelyAged(received_at, now,
|
|
39895
|
+
if (!structurallyBroken && isMarkerGenuinelyAged(received_at, now, effectiveThresholdMs) && marker.payload) {
|
|
39879
39896
|
recordChannelDeflection(
|
|
39880
39897
|
AGENT_DIR,
|
|
39881
39898
|
"telegram",
|
package/package.json
CHANGED
|
File without changes
|