@integrity-labs/agt-cli 0.28.929 → 0.28.930

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.
Files changed (23) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-IIIMUCGD.js → chunk-7F32775G.js} +46 -1
  3. package/dist/{chunk-IIIMUCGD.js.map → chunk-7F32775G.js.map} +1 -1
  4. package/dist/{chunk-ZNVYUZSM.js → chunk-HC3EDWKC.js} +2 -2
  5. package/dist/{chunk-VZVCPJC7.js → chunk-NCNQFUNQ.js} +4 -4
  6. package/dist/{claude-pair-runtime-MA4CLC6B.js → claude-pair-runtime-TDP2NJTT.js} +2 -2
  7. package/dist/lib/manager-worker.js +26 -17
  8. package/dist/lib/manager-worker.js.map +1 -1
  9. package/dist/mcp/direct-chat-channel.js +4 -0
  10. package/dist/mcp/index.js +4 -0
  11. package/dist/mcp/origami.js +4 -0
  12. package/dist/mcp/slack-channel.js +4 -0
  13. package/dist/mcp/telegram-channel.js +4 -0
  14. package/dist/{persistent-session-PYQ5U6FU.js → persistent-session-Z7S2MMRH.js} +3 -3
  15. package/dist/{responsiveness-probe-T4LKSNFO.js → responsiveness-probe-SR62Y32C.js} +3 -3
  16. package/dist/{session-auth-dead-M5SFWTQH.js → session-auth-dead-25KP23AU.js} +2 -2
  17. package/package.json +1 -1
  18. /package/dist/{chunk-ZNVYUZSM.js.map → chunk-HC3EDWKC.js.map} +0 -0
  19. /package/dist/{chunk-VZVCPJC7.js.map → chunk-NCNQFUNQ.js.map} +0 -0
  20. /package/dist/{claude-pair-runtime-MA4CLC6B.js.map → claude-pair-runtime-TDP2NJTT.js.map} +0 -0
  21. /package/dist/{persistent-session-PYQ5U6FU.js.map → persistent-session-Z7S2MMRH.js.map} +0 -0
  22. /package/dist/{responsiveness-probe-T4LKSNFO.js.map → responsiveness-probe-SR62Y32C.js.map} +0 -0
  23. /package/dist/{session-auth-dead-M5SFWTQH.js.map → session-auth-dead-25KP23AU.js.map} +0 -0
@@ -19,7 +19,7 @@ import {
19
19
  rotateDailySession,
20
20
  sessionFileExists,
21
21
  todayLocalIso
22
- } from "./chunk-IIIMUCGD.js";
22
+ } from "./chunk-7F32775G.js";
23
23
  import {
24
24
  reapOrphanChannelMcps
25
25
  } from "./chunk-XWVM4KPK.js";
@@ -5730,4 +5730,4 @@ export {
5730
5730
  stopAllSessionsAndWait,
5731
5731
  getProjectDir
5732
5732
  };
5733
- //# sourceMappingURL=chunk-ZNVYUZSM.js.map
5733
+ //# sourceMappingURL=chunk-HC3EDWKC.js.map
@@ -16,7 +16,7 @@ import {
16
16
  parseEnvIntegrations,
17
17
  shellQuote,
18
18
  summarizeUnanswerablePane
19
- } from "./chunk-ZNVYUZSM.js";
19
+ } from "./chunk-HC3EDWKC.js";
20
20
  import {
21
21
  BIND_FAILURE_QUARANTINE_THRESHOLD,
22
22
  INTEGRATIONS_SECTION_END,
@@ -76,7 +76,7 @@ import {
76
76
  sessionTranscriptDir,
77
77
  worseConnectivityOutcome,
78
78
  wrapScheduledTaskPrompt
79
- } from "./chunk-IIIMUCGD.js";
79
+ } from "./chunk-7F32775G.js";
80
80
  import {
81
81
  parsePsRows
82
82
  } from "./chunk-XWVM4KPK.js";
@@ -6942,7 +6942,7 @@ function exchangeFailureKind(err) {
6942
6942
  }
6943
6943
 
6944
6944
  // src/lib/api-client.ts
6945
- var agtCliVersion = true ? "0.28.929" : "dev";
6945
+ var agtCliVersion = true ? "0.28.930" : "dev";
6946
6946
  var lastConfigHash = null;
6947
6947
  function setConfigHash(hash) {
6948
6948
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -11567,4 +11567,4 @@ export {
11567
11567
  managerInstallSystemUnitCommand,
11568
11568
  managerUninstallSystemUnitCommand
11569
11569
  };
11570
- //# sourceMappingURL=chunk-VZVCPJC7.js.map
11570
+ //# sourceMappingURL=chunk-NCNQFUNQ.js.map
@@ -100,7 +100,7 @@ async function spawnPairSession(session) {
100
100
  return { ok: true };
101
101
  } catch {
102
102
  }
103
- const { resolveClaudeBinary } = await import("./persistent-session-PYQ5U6FU.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-Z7S2MMRH.js");
104
104
  const claudeBin = resolveClaudeBinary();
105
105
  const pairEnv = {
106
106
  ...process.env,
@@ -373,4 +373,4 @@ export {
373
373
  startClaudePair,
374
374
  submitClaudePairCode
375
375
  };
376
- //# sourceMappingURL=claude-pair-runtime-MA4CLC6B.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-TDP2NJTT.js.map
@@ -63,7 +63,7 @@ import {
63
63
  safeWriteJsonAtomic,
64
64
  setConfigHash,
65
65
  tripClass
66
- } from "../chunk-VZVCPJC7.js";
66
+ } from "../chunk-NCNQFUNQ.js";
67
67
  import {
68
68
  getProjectDir as getProjectDir2,
69
69
  getReadyTasks,
@@ -136,7 +136,7 @@ import {
136
136
  takeZombieDetection,
137
137
  toOpencodeModel,
138
138
  writeEgressAllowlist
139
- } from "../chunk-ZNVYUZSM.js";
139
+ } from "../chunk-HC3EDWKC.js";
140
140
  import {
141
141
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
142
142
  AnchorSessionClient,
@@ -163,6 +163,7 @@ import {
163
163
  agentRulesRestartBasis,
164
164
  appendDmFooter,
165
165
  attributeTranscriptUsageByRun,
166
+ bannerRemedyFor,
166
167
  buildFailureCategoryPromptLines,
167
168
  buildHostUsageReading,
168
169
  buildScheduledTaskContextBlocks,
@@ -231,7 +232,7 @@ import {
231
232
  subagentActivityAgeSeconds,
232
233
  sumTranscriptUsageInWindow,
233
234
  transcriptActivityAgeSeconds
234
- } from "../chunk-IIIMUCGD.js";
235
+ } from "../chunk-7F32775G.js";
235
236
  import {
236
237
  reapOrphanChannelMcps
237
238
  } from "../chunk-XWVM4KPK.js";
@@ -2757,12 +2758,14 @@ async function maybeReportUsageBanner(args) {
2757
2758
  lastPct: existing?.lastPct ?? null,
2758
2759
  lastWeekResetsAt: existing?.lastWeekResetsAt ?? null,
2759
2760
  lastLimitScope: existing?.lastLimitScope ?? null,
2761
+ lastBannerRemedy: existing?.lastBannerRemedy ?? null,
2760
2762
  lastCheckedAt: nowMs,
2761
2763
  lastPostedAt: existing?.lastPostedAt ?? null,
2762
2764
  consecutiveAbsences: existing?.consecutiveAbsences ?? 0,
2763
2765
  coldClearPosted: existing?.coldClearPosted ?? false
2764
2766
  };
2765
- const observation = tail ? parseUsageBanner(scopeToCurrentPaneEpoch(tail), now) : null;
2767
+ const scoped = tail ? scopeToCurrentPaneEpoch(tail) : null;
2768
+ const observation = scoped ? parseUsageBanner(scoped, now) : null;
2766
2769
  if (!observation) {
2767
2770
  if (!existing || existing.lastPct === null) {
2768
2771
  if (!args.openUsageAlert) {
@@ -2809,6 +2812,7 @@ async function maybeReportUsageBanner(args) {
2809
2812
  next.lastPct = null;
2810
2813
  next.lastWeekResetsAt = null;
2811
2814
  next.lastLimitScope = null;
2815
+ next.lastBannerRemedy = null;
2812
2816
  next.coldClearPosted = true;
2813
2817
  next.consecutiveAbsences = 0;
2814
2818
  next.lastPostedAt = nowMs;
@@ -2823,7 +2827,8 @@ async function maybeReportUsageBanner(args) {
2823
2827
  next.consecutiveAbsences = 0;
2824
2828
  next.coldClearPosted = false;
2825
2829
  const weekResetsAtIso = observation.weekResetsAt.toISOString();
2826
- const unchanged = existing !== void 0 && existing.lastPct === observation.pct && existing.lastWeekResetsAt === weekResetsAtIso && existing.lastLimitScope === observation.limitScope;
2830
+ const bannerRemedy = bannerRemedyFor(scoped ?? "", observation.limitQualifier, now);
2831
+ const unchanged = existing !== void 0 && existing.lastPct === observation.pct && existing.lastWeekResetsAt === weekResetsAtIso && existing.lastLimitScope === observation.limitScope && existing.lastBannerRemedy === bannerRemedy;
2827
2832
  const dueToReaffirm = next.lastPostedAt === null || nowMs - next.lastPostedAt >= REAFFIRM_INTERVAL_MS;
2828
2833
  if (unchanged && !dueToReaffirm) {
2829
2834
  state.set(codeName, next);
@@ -2853,11 +2858,15 @@ async function maybeReportUsageBanner(args) {
2853
2858
  // Sending the field is the whole fix: a session cap can now be told from
2854
2859
  // a weekly one, which is what ENG-9007 exists to do.
2855
2860
  limit_scope: observation.limitScope,
2856
- source: "pane_log"
2861
+ source: "pane_log",
2862
+ // ENG-10503: the key is OMITTED when there is no remedy, not sent as null,
2863
+ // so "the banner carried none" can never arrive looking like a value.
2864
+ ...bannerRemedy ? { banner_remedy: bannerRemedy } : {}
2857
2865
  });
2858
2866
  next.lastPct = observation.pct;
2859
2867
  next.lastWeekResetsAt = weekResetsAtIso;
2860
2868
  next.lastLimitScope = observation.limitScope;
2869
+ next.lastBannerRemedy = bannerRemedy;
2861
2870
  next.lastPostedAt = nowMs;
2862
2871
  state.set(codeName, next);
2863
2872
  } catch (err) {
@@ -13221,7 +13230,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
13221
13230
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
13222
13231
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
13223
13232
  async function channelInboundActivityAgeSecondsFor(codeName) {
13224
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-T4LKSNFO.js");
13233
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-SR62Y32C.js");
13225
13234
  const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
13226
13235
  if (newest === null) return null;
13227
13236
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -13906,7 +13915,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
13906
13915
  var lastVersionCheckAt = 0;
13907
13916
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
13908
13917
  var lastResponsivenessProbeAt = 0;
13909
- var agtCliVersion = true ? "0.28.929" : "dev";
13918
+ var agtCliVersion = true ? "0.28.930" : "dev";
13910
13919
  function resolveBrewPath(execFileSync2) {
13911
13920
  try {
13912
13921
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -15496,7 +15505,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
15496
15505
  if (codeNames.length === 0) return;
15497
15506
  void (async () => {
15498
15507
  try {
15499
- const { collectDiagnostics } = await import("../persistent-session-PYQ5U6FU.js");
15508
+ const { collectDiagnostics } = await import("../persistent-session-Z7S2MMRH.js");
15500
15509
  await api.post("/host/heartbeat", {
15501
15510
  host_id: hostId,
15502
15511
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -15638,7 +15647,7 @@ async function pollCycleInner() {
15638
15647
  }
15639
15648
  try {
15640
15649
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
15641
- const { collectDiagnostics } = await import("../persistent-session-PYQ5U6FU.js");
15650
+ const { collectDiagnostics } = await import("../persistent-session-Z7S2MMRH.js");
15642
15651
  const diagCodeNames = [...agentState.persistentSessionAgents];
15643
15652
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
15644
15653
  let tailscaleHostname;
@@ -15813,7 +15822,7 @@ async function pollCycleInner() {
15813
15822
  collectPanelessActivityProbes,
15814
15823
  getResponsivenessIntervalMs,
15815
15824
  occupancyQualificationClassifications
15816
- } = await import("../responsiveness-probe-T4LKSNFO.js");
15825
+ } = await import("../responsiveness-probe-SR62Y32C.js");
15817
15826
  const probeIntervalMs = getResponsivenessIntervalMs();
15818
15827
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
15819
15828
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -15930,7 +15939,7 @@ async function pollCycleInner() {
15930
15939
  collectResponsivenessProbes,
15931
15940
  livePendingInboundOldestAgeSeconds,
15932
15941
  parkPendingInbound
15933
- } = await import("../responsiveness-probe-T4LKSNFO.js");
15942
+ } = await import("../responsiveness-probe-SR62Y32C.js");
15934
15943
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
15935
15944
  const wedgeNow = /* @__PURE__ */ new Date();
15936
15945
  const liveAgents = agentState.persistentSessionAgents;
@@ -16086,7 +16095,7 @@ async function pollCycleInner() {
16086
16095
  }
16087
16096
  try {
16088
16097
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
16089
- const { probeSessionAuth } = await import("../session-auth-dead-M5SFWTQH.js");
16098
+ const { probeSessionAuth } = await import("../session-auth-dead-25KP23AU.js");
16090
16099
  const observations = [];
16091
16100
  const pendingCacheCommits = [];
16092
16101
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -20350,7 +20359,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
20350
20359
  try {
20351
20360
  const freshId = rotateSessionForWedge(codeName);
20352
20361
  consecutiveWedgeCycles.delete(codeName);
20353
- const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-T4LKSNFO.js");
20362
+ const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-SR62Y32C.js");
20354
20363
  const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
20355
20364
  const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
20356
20365
  const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
@@ -20393,7 +20402,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
20393
20402
  void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
20394
20403
  void (async () => {
20395
20404
  try {
20396
- const { collectDiagnostics } = await import("../persistent-session-PYQ5U6FU.js");
20405
+ const { collectDiagnostics } = await import("../persistent-session-Z7S2MMRH.js");
20397
20406
  await api.post("/host/heartbeat", {
20398
20407
  host_id: hostId,
20399
20408
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -20444,7 +20453,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
20444
20453
  }
20445
20454
  try {
20446
20455
  const hostId = await getHostId();
20447
- const { collectDiagnostics } = await import("../persistent-session-PYQ5U6FU.js");
20456
+ const { collectDiagnostics } = await import("../persistent-session-Z7S2MMRH.js");
20448
20457
  await api.post("/host/heartbeat", {
20449
20458
  host_id: hostId,
20450
20459
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -21086,7 +21095,7 @@ async function processClaudePairSessions(agents) {
21086
21095
  killPairSession,
21087
21096
  pairTmuxSession,
21088
21097
  finalizeClaudePairOnboarding
21089
- } = await import("../claude-pair-runtime-MA4CLC6B.js");
21098
+ } = await import("../claude-pair-runtime-TDP2NJTT.js");
21090
21099
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
21091
21100
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
21092
21101
  const killed = await killPairSession(pairTmuxSession(pairId));