@integrity-labs/agt-cli 0.28.729 → 0.28.731

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.
@@ -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-KHGH6UKC.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-BHJLZTYX.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-BHULWRDO.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-BZVFVAMR.js.map
@@ -57,7 +57,7 @@ import {
57
57
  safeWriteJsonAtomic,
58
58
  setConfigHash,
59
59
  tripClass
60
- } from "../chunk-TRKFDPYJ.js";
60
+ } from "../chunk-YNIRFRQE.js";
61
61
  import {
62
62
  getProjectDir as getProjectDir2,
63
63
  getReadyTasks,
@@ -118,7 +118,7 @@ import {
118
118
  takeZombieDetection,
119
119
  toOpencodeModel,
120
120
  writeEgressAllowlist
121
- } from "../chunk-KF3IFJVV.js";
121
+ } from "../chunk-QB6TIA3Z.js";
122
122
  import {
123
123
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
124
124
  AnchorSessionClient,
@@ -203,7 +203,7 @@ import {
203
203
  subagentActivityAgeSeconds,
204
204
  sumTranscriptUsageInWindow,
205
205
  transcriptActivityAgeSeconds
206
- } from "../chunk-WVYNQJRS.js";
206
+ } from "../chunk-BADE2W6M.js";
207
207
  import {
208
208
  reapOrphanChannelMcps
209
209
  } from "../chunk-XWVM4KPK.js";
@@ -5568,6 +5568,22 @@ function createTickBoardFetcher(fetchBoard) {
5568
5568
  };
5569
5569
  }
5570
5570
 
5571
+ // src/lib/refresh-manifest-flags.ts
5572
+ var REFRESH_MANIFEST_FLAGS = {
5573
+ /** Knowledge as slug + hash instead of inline bodies. */
5574
+ knowledge_manifest: true,
5575
+ /** Global + shared ROOT skills as metadata + hash. */
5576
+ skills_manifest: true,
5577
+ /**
5578
+ * Integration CHILD skills as metadata + hash. Deliberately not folded into
5579
+ * `skills_manifest`: a manager that claimed the family but could not decode
5580
+ * this lane would read it as empty, and an empty integration-skill list is
5581
+ * what the orphan sweep treats as "every integration was uninstalled" — it
5582
+ * deletes the folders off disk. The flag has to name the exact capability.
5583
+ */
5584
+ integration_skills_manifest: true
5585
+ };
5586
+
5571
5587
  // src/lib/channel-hash-cache.ts
5572
5588
  import { existsSync as existsSync8, readFileSync as readFileSync19, writeFileSync as writeFileSync10 } from "fs";
5573
5589
  import { join as join25 } from "path";
@@ -12331,7 +12347,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
12331
12347
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
12332
12348
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
12333
12349
  async function channelInboundActivityAgeSecondsFor(codeName) {
12334
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-ASAPVDUQ.js");
12350
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-457EYSWZ.js");
12335
12351
  const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
12336
12352
  if (newest === null) return null;
12337
12353
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -12979,7 +12995,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
12979
12995
  var lastVersionCheckAt = 0;
12980
12996
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
12981
12997
  var lastResponsivenessProbeAt = 0;
12982
- var agtCliVersion = true ? "0.28.729" : "dev";
12998
+ var agtCliVersion = true ? "0.28.731" : "dev";
12983
12999
  function resolveBrewPath(execFileSync3) {
12984
13000
  try {
12985
13001
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -14506,7 +14522,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
14506
14522
  if (codeNames.length === 0) return;
14507
14523
  void (async () => {
14508
14524
  try {
14509
- const { collectDiagnostics } = await import("../persistent-session-KHGH6UKC.js");
14525
+ const { collectDiagnostics } = await import("../persistent-session-BHJLZTYX.js");
14510
14526
  await api.post("/host/heartbeat", {
14511
14527
  host_id: hostId,
14512
14528
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -14647,7 +14663,7 @@ async function pollCycleInner() {
14647
14663
  }
14648
14664
  try {
14649
14665
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
14650
- const { collectDiagnostics } = await import("../persistent-session-KHGH6UKC.js");
14666
+ const { collectDiagnostics } = await import("../persistent-session-BHJLZTYX.js");
14651
14667
  const diagCodeNames = [...agentState.persistentSessionAgents];
14652
14668
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
14653
14669
  let tailscaleHostname;
@@ -14816,7 +14832,7 @@ async function pollCycleInner() {
14816
14832
  collectPanelessActivityProbes,
14817
14833
  getResponsivenessIntervalMs,
14818
14834
  occupancyQualificationClassifications
14819
- } = await import("../responsiveness-probe-ASAPVDUQ.js");
14835
+ } = await import("../responsiveness-probe-457EYSWZ.js");
14820
14836
  const probeIntervalMs = getResponsivenessIntervalMs();
14821
14837
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
14822
14838
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -14926,7 +14942,7 @@ async function pollCycleInner() {
14926
14942
  collectResponsivenessProbes,
14927
14943
  livePendingInboundOldestAgeSeconds,
14928
14944
  parkPendingInbound
14929
- } = await import("../responsiveness-probe-ASAPVDUQ.js");
14945
+ } = await import("../responsiveness-probe-457EYSWZ.js");
14930
14946
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
14931
14947
  const wedgeNow = /* @__PURE__ */ new Date();
14932
14948
  const liveAgents = agentState.persistentSessionAgents;
@@ -15082,7 +15098,7 @@ async function pollCycleInner() {
15082
15098
  }
15083
15099
  try {
15084
15100
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
15085
- const { probeSessionAuth } = await import("../session-auth-dead-ABEYQHK3.js");
15101
+ const { probeSessionAuth } = await import("../session-auth-dead-YUPZGR3F.js");
15086
15102
  const observations = [];
15087
15103
  const pendingCacheCommits = [];
15088
15104
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -15840,20 +15856,12 @@ async function processAgent(agent, agentStates, managedToolkits) {
15840
15856
  try {
15841
15857
  refreshData = await api.post("/host/refresh", {
15842
15858
  agent_id: agent.agent_id,
15843
- // ENG-9585: ask for hashes instead of knowledge bodies. An API build that
15844
- // predates the manifest ignores this and answers with `knowledge` as
15845
- // before, which the resolution below handles without a version check.
15846
- knowledge_manifest: true,
15847
- // ENG-9585: the same for the two root-skill lanes. A separate flag
15848
- // because the two shipped in different CLI versions — an API that
15849
- // understands one and not the other must still be able to answer.
15850
- skills_manifest: true,
15851
- // ENG-9585: and the integration lane, a third flag for the same reason
15852
- // one level sharper. A manager that sent `skills_manifest` but could not
15853
- // decode THIS manifest would read the lane as empty and sweep every
15854
- // integration skill folder off disk, so the flag has to name the exact
15855
- // capability rather than the family.
15856
- integration_skills_manifest: true
15859
+ // ENG-9585: ask for hashes instead of bodies on all three lanes. The
15860
+ // rationale for each flag, and for their staying three flags rather than
15861
+ // one, now lives with the constant — so that a new `/host/refresh` caller
15862
+ // inherits it instead of having to rediscover it. The manifest is
15863
+ // normalised back into `refreshData.knowledge` immediately below.
15864
+ ...REFRESH_MANIFEST_FLAGS
15857
15865
  });
15858
15866
  if (refreshData.knowledge_manifest) {
15859
15867
  const resolved = await resolveKnowledgeFromManifest({
@@ -17179,12 +17187,10 @@ async function processAgent(agent, agentStates, managedToolkits) {
17179
17187
  }
17180
17188
  const freshData = await api.post("/host/refresh", {
17181
17189
  agent_id: agent.agent_id,
17182
- knowledge_manifest: true,
17183
17190
  // Only `scheduled_tasks` is read here, so ask for the manifest shape on
17184
17191
  // every lane — nothing in this branch consumes a skill body, and the
17185
17192
  // skill lanes are the largest part of the payload being discarded.
17186
- skills_manifest: true,
17187
- integration_skills_manifest: true
17193
+ ...REFRESH_MANIFEST_FLAGS
17188
17194
  });
17189
17195
  tasks = freshData.scheduled_tasks ?? tasks;
17190
17196
  }
@@ -18945,6 +18951,17 @@ function restartReasonNeedsRender(reason) {
18945
18951
  function restartReasonStampsTiming(reason) {
18946
18952
  return reason === "integration-change";
18947
18953
  }
18954
+ async function fetchSpawnRefreshData(agentId, codeName, lane) {
18955
+ try {
18956
+ return await api.post("/host/refresh", {
18957
+ agent_id: agentId,
18958
+ ...REFRESH_MANIFEST_FLAGS
18959
+ });
18960
+ } catch (err) {
18961
+ log(`[${lane}] refresh failed for '${codeName}', leaving for slow poll: ${err.message}`);
18962
+ return null;
18963
+ }
18964
+ }
18948
18965
  async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
18949
18966
  const prev = state8.agents.find((a) => a.agentId === agentId);
18950
18967
  const codeName = prev?.codeName;
@@ -18964,13 +18981,8 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
18964
18981
  try {
18965
18982
  log(`[restart-lane] Fast restart for '${codeName}' at ${requestedAt}`);
18966
18983
  const hostId = await getHostId();
18967
- let refreshData;
18968
- try {
18969
- refreshData = await api.post("/host/refresh", { agent_id: agentId });
18970
- } catch (err) {
18971
- log(`[restart-lane] refresh failed for '${codeName}', leaving for slow poll: ${err.message}`);
18972
- return;
18973
- }
18984
+ const refreshData = await fetchSpawnRefreshData(agentId, codeName, "restart-lane");
18985
+ if (!refreshData) return;
18974
18986
  const displayName = refreshData.agent?.display_name ?? codeName;
18975
18987
  const framework = refreshData.agent?.framework ?? agentFrameworkCache.get(codeName) ?? DEFAULT_FRAMEWORK;
18976
18988
  if (restartTargetsOpencodeServe(framework)) {
@@ -18997,7 +19009,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
18997
19009
  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}`));
18998
19010
  void (async () => {
18999
19011
  try {
19000
- const { collectDiagnostics } = await import("../persistent-session-KHGH6UKC.js");
19012
+ const { collectDiagnostics } = await import("../persistent-session-BHJLZTYX.js");
19001
19013
  await api.post("/host/heartbeat", {
19002
19014
  host_id: hostId,
19003
19015
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -19025,13 +19037,8 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
19025
19037
  restartInFlight.add(agentId);
19026
19038
  try {
19027
19039
  if (isSessionHealthy(codeName)) return;
19028
- let refreshData;
19029
- try {
19030
- refreshData = await api.post("/host/refresh", { agent_id: agentId });
19031
- } catch (err) {
19032
- log(`[fast-mcp-respawn] refresh failed for '${codeName}', leaving for slow poll: ${err.message}`);
19033
- return;
19034
- }
19040
+ const refreshData = await fetchSpawnRefreshData(agentId, codeName, "fast-mcp-respawn");
19041
+ if (!refreshData) return;
19035
19042
  const displayName = refreshData.agent?.display_name ?? codeName;
19036
19043
  const result = await ensurePersistentSession(
19037
19044
  { agent_id: agentId, code_name: codeName, display_name: displayName },
@@ -19048,7 +19055,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
19048
19055
  }
19049
19056
  try {
19050
19057
  const hostId = await getHostId();
19051
- const { collectDiagnostics } = await import("../persistent-session-KHGH6UKC.js");
19058
+ const { collectDiagnostics } = await import("../persistent-session-BHJLZTYX.js");
19052
19059
  await api.post("/host/heartbeat", {
19053
19060
  host_id: hostId,
19054
19061
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -19680,7 +19687,7 @@ async function processClaudePairSessions(agents) {
19680
19687
  killPairSession,
19681
19688
  pairTmuxSession,
19682
19689
  finalizeClaudePairOnboarding
19683
- } = await import("../claude-pair-runtime-BHULWRDO.js");
19690
+ } = await import("../claude-pair-runtime-BZVFVAMR.js");
19684
19691
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
19685
19692
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
19686
19693
  const killed = await killPairSession(pairTmuxSession(pairId));