@integrity-labs/agt-cli 0.28.1194 → 0.28.1195

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 CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-DPXWD2HJ.js";
43
+ } from "../chunk-YTM5HQRH.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
@@ -5200,7 +5200,7 @@ import { execFileSync, execSync } from "child_process";
5200
5200
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
5201
5201
  import chalk17 from "chalk";
5202
5202
  import ora15 from "ora";
5203
- var cliVersion = true ? "0.28.1194" : "dev";
5203
+ var cliVersion = true ? "0.28.1195" : "dev";
5204
5204
  async function fetchLatestVersion() {
5205
5205
  const host2 = getHost();
5206
5206
  if (!host2) return null;
@@ -6460,7 +6460,7 @@ function handleError(err) {
6460
6460
  }
6461
6461
 
6462
6462
  // src/bin/agt.ts
6463
- var cliVersion2 = true ? "0.28.1194" : "dev";
6463
+ var cliVersion2 = true ? "0.28.1195" : "dev";
6464
6464
  var program = new Command();
6465
6465
  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");
6466
6466
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -8082,7 +8082,7 @@ function exchangeFailureKind(err) {
8082
8082
  }
8083
8083
 
8084
8084
  // src/lib/api-client.ts
8085
- var agtCliVersion = true ? "0.28.1194" : "dev";
8085
+ var agtCliVersion = true ? "0.28.1195" : "dev";
8086
8086
  var lastConfigHash = null;
8087
8087
  function setConfigHash(hash) {
8088
8088
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -13682,4 +13682,4 @@ export {
13682
13682
  managerInstallSystemUnitCommand,
13683
13683
  managerUninstallSystemUnitCommand
13684
13684
  };
13685
- //# sourceMappingURL=chunk-DPXWD2HJ.js.map
13685
+ //# sourceMappingURL=chunk-YTM5HQRH.js.map
@@ -84,7 +84,7 @@ import {
84
84
  tripClass,
85
85
  writeEtcEnvironment,
86
86
  writeProfileDScript
87
- } from "../chunk-DPXWD2HJ.js";
87
+ } from "../chunk-YTM5HQRH.js";
88
88
  import {
89
89
  CLAUDE_CODE_SECURITY_FLOOR,
90
90
  SELF_UPDATE_TIMEOUTS,
@@ -16357,7 +16357,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
16357
16357
  var lastVersionCheckAt = 0;
16358
16358
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
16359
16359
  var lastResponsivenessProbeAt = 0;
16360
- var agtCliVersion = true ? "0.28.1194" : "dev";
16360
+ var agtCliVersion = true ? "0.28.1195" : "dev";
16361
16361
  function resolveBrewPath(execFileSync3) {
16362
16362
  try {
16363
16363
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -43830,6 +43830,10 @@ function createSessionMarkerTracker() {
43830
43830
  function replayCountForSession(i) {
43831
43831
  return i.pushedThisSession ? i.replayCount : 0;
43832
43832
  }
43833
+ async function waitForInitializedOrTimeout(i) {
43834
+ const timedOut = await Promise.race([i.initialized.then(() => false), i.timeout.then(() => true)]);
43835
+ if (timedOut) i.onTimeout();
43836
+ }
43833
43837
  function applyToChatMarkers(pendingDir, chatId, op, cutoffMs, reachedSession) {
43834
43838
  const prefix = `${chatId.replace(/[^A-Za-z0-9_-]/g, "_")}__`;
43835
43839
  const bounded = Number.isFinite(cutoffMs);
@@ -46925,7 +46929,12 @@ function sweepTelegramStaleMarkers(thresholdMs) {
46925
46929
  thresholdMs,
46926
46930
  hardCeilingMs: STALE_MARKER_MS,
46927
46931
  hasPayload: Boolean(marker.payload),
46928
- replayCount: marker.replay_count ?? 0,
46932
+ // ENG-11853: same count the replay scan uses. A marker the last session
46933
+ // replayed hasn't been replayed to this one, so it keeps the ceiling too.
46934
+ replayCount: replayCountForSession({
46935
+ pushedThisSession: sessionMarkers.wasPushed(filename),
46936
+ replayCount: marker.replay_count ?? 0
46937
+ }),
46929
46938
  replayEnabled
46930
46939
  });
46931
46940
  const structurallyBroken = !chat_id || !message_id;
@@ -48362,7 +48371,18 @@ mcp.oninitialized = () => {
48362
48371
  };
48363
48372
  var MCP_INITIALIZED_WAIT_MS = 3e4;
48364
48373
  function waitForMcpInitialized() {
48365
- return Promise.race([mcpInitialized, sleep4(MCP_INITIALIZED_WAIT_MS)]);
48374
+ return waitForInitializedOrTimeout({
48375
+ initialized: mcpInitialized,
48376
+ timeout: sleep4(MCP_INITIALIZED_WAIT_MS),
48377
+ // ENG-11853: otherwise a client that stops sending `initialized` costs every boot
48378
+ // 30s of inbound, and pushes ahead of the handshake, with no trace.
48379
+ onTimeout: () => {
48380
+ process.stderr.write(
48381
+ `telegram-channel(${AGENT_CODE_NAME}): no MCP initialized after ${MCP_INITIALIZED_WAIT_MS}ms, polling anyway
48382
+ `
48383
+ );
48384
+ }
48385
+ });
48366
48386
  }
48367
48387
  await mcp.connect(new StdioServerTransport());
48368
48388
  var REPLAY_SCAN_INTERVAL_MS = 6e4;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.1194",
3
+ "version": "0.28.1195",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {