@integrity-labs/agt-cli 0.28.65 → 0.28.67

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.
@@ -22,7 +22,7 @@ import {
22
22
  resolveConnectivityProbe,
23
23
  worseConnectivityOutcome,
24
24
  wrapScheduledTaskPrompt
25
- } from "./chunk-XKAJW4EX.js";
25
+ } from "./chunk-CDMYI3G6.js";
26
26
 
27
27
  // ../../packages/core/dist/integrations/registry.js
28
28
  var INTEGRATION_REGISTRY = [
@@ -7347,7 +7347,7 @@ function requireHost() {
7347
7347
  }
7348
7348
 
7349
7349
  // src/lib/api-client.ts
7350
- var agtCliVersion = true ? "0.28.65" : "dev";
7350
+ var agtCliVersion = true ? "0.28.67" : "dev";
7351
7351
  var lastConfigHash = null;
7352
7352
  function setConfigHash(hash) {
7353
7353
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -8643,4 +8643,4 @@ export {
8643
8643
  managerInstallSystemUnitCommand,
8644
8644
  managerUninstallSystemUnitCommand
8645
8645
  };
8646
- //# sourceMappingURL=chunk-PZ3TJOW4.js.map
8646
+ //# sourceMappingURL=chunk-M4PTVE27.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-WJBIN6WM.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-XVVQWPD6.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-SPP3CUBA.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-ICHMWZPP.js.map
@@ -27,7 +27,7 @@ import {
27
27
  requireHost,
28
28
  safeWriteJsonAtomic,
29
29
  setConfigHash
30
- } from "../chunk-PZ3TJOW4.js";
30
+ } from "../chunk-M4PTVE27.js";
31
31
  import {
32
32
  getProjectDir as getProjectDir2,
33
33
  getReadyTasks,
@@ -65,7 +65,7 @@ import {
65
65
  takeWatchdogGiveUpCount,
66
66
  takeZombieDetection,
67
67
  transcriptActivityAgeSeconds
68
- } from "../chunk-4P7HUXWI.js";
68
+ } from "../chunk-4W57ZRW6.js";
69
69
  import {
70
70
  FLAGS_SCHEMA_VERSION,
71
71
  FLAG_REGISTRY,
@@ -96,7 +96,7 @@ import {
96
96
  resolveDmTarget,
97
97
  sumTranscriptUsageInWindow,
98
98
  wrapScheduledTaskPrompt
99
- } from "../chunk-XKAJW4EX.js";
99
+ } from "../chunk-CDMYI3G6.js";
100
100
  import {
101
101
  parsePsRows,
102
102
  reapOrphanChannelMcps
@@ -6734,7 +6734,7 @@ var cachedMaintenanceWindow = null;
6734
6734
  var lastVersionCheckAt = 0;
6735
6735
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
6736
6736
  var lastResponsivenessProbeAt = 0;
6737
- var agtCliVersion = true ? "0.28.65" : "dev";
6737
+ var agtCliVersion = true ? "0.28.67" : "dev";
6738
6738
  function resolveBrewPath(execFileSync4) {
6739
6739
  try {
6740
6740
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -7842,7 +7842,7 @@ async function pollCycle() {
7842
7842
  }
7843
7843
  try {
7844
7844
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
7845
- const { collectDiagnostics } = await import("../persistent-session-WJBIN6WM.js");
7845
+ const { collectDiagnostics } = await import("../persistent-session-XVVQWPD6.js");
7846
7846
  const diagCodeNames = [...agentState.persistentSessionAgents];
7847
7847
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
7848
7848
  let tailscaleHostname;
@@ -7943,7 +7943,7 @@ async function pollCycle() {
7943
7943
  const {
7944
7944
  collectResponsivenessProbes,
7945
7945
  getResponsivenessIntervalMs
7946
- } = await import("../responsiveness-probe-XVWLBSSH.js");
7946
+ } = await import("../responsiveness-probe-IRGV6O77.js");
7947
7947
  const probeIntervalMs = getResponsivenessIntervalMs();
7948
7948
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
7949
7949
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -7975,7 +7975,7 @@ async function pollCycle() {
7975
7975
  collectResponsivenessProbes,
7976
7976
  livePendingInboundOldestAgeSeconds,
7977
7977
  parkPendingInbound
7978
- } = await import("../responsiveness-probe-XVWLBSSH.js");
7978
+ } = await import("../responsiveness-probe-IRGV6O77.js");
7979
7979
  const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
7980
7980
  const wedgeNow = /* @__PURE__ */ new Date();
7981
7981
  const liveAgents = agentState.persistentSessionAgents;
@@ -11409,7 +11409,7 @@ async function processClaudePairSessions(agents) {
11409
11409
  killPairSession,
11410
11410
  pairTmuxSession,
11411
11411
  finalizeClaudePairOnboarding
11412
- } = await import("../claude-pair-runtime-SPP3CUBA.js");
11412
+ } = await import("../claude-pair-runtime-ICHMWZPP.js");
11413
11413
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
11414
11414
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
11415
11415
  const killed = await killPairSession(pairTmuxSession(pairId));
@@ -21094,6 +21094,10 @@ var AdminDebugClient = class _AdminDebugClient {
21094
21094
  searchHosts(args) {
21095
21095
  return this.get("/admin/debug/hosts", _AdminDebugClient.cleanQuery(args));
21096
21096
  }
21097
+ /** Host-centric composite: host + agents + rollup alerts + versions (ENG-6518). */
21098
+ getHost(args) {
21099
+ return this.get("/admin/debug/get-host", _AdminDebugClient.cleanQuery(args));
21100
+ }
21097
21101
  /** List the orgs you're authorized to read, with tier + grant standing + rollups (ENG-6483). */
21098
21102
  searchOrgs(args) {
21099
21103
  return this.get("/admin/debug/orgs", _AdminDebugClient.cleanQuery(args));
@@ -21266,6 +21270,10 @@ var searchHostsSchema = external_exports.object({
21266
21270
  status: external_exports.string().max(32).optional().describe("Filter by host status (active | decommissioned)."),
21267
21271
  limit: limitSchema
21268
21272
  });
21273
+ var getHostSchema = external_exports.object({
21274
+ host: external_exports.string().min(1).max(128).describe("The host id (uuid) or its exact, case-insensitive name. Use the id if the name is ambiguous."),
21275
+ since_hours: external_exports.number().int().min(1).max(720).optional().describe("Window for the restart-count rollup, in hours. Default 24.")
21276
+ });
21269
21277
  var hostVersionsSchema = external_exports.object({
21270
21278
  q: external_exports.string().max(128).optional().describe("Case-insensitive substring match on host name."),
21271
21279
  status: external_exports.string().max(32).optional().describe("Filter by host status (active | decommissioned)."),
@@ -21494,6 +21502,19 @@ server.tool(
21494
21502
  }
21495
21503
  }
21496
21504
  );
21505
+ server.tool(
21506
+ "debug_get_host",
21507
+ "Fetch a host-centric composite for ONE host \u2014 the host equivalent of debug_get_agent, and the right entry point for host-WIDE incidents (e.g. an env drift or a bad deploy hitting every agent on a box). One read returns: the host projection (status, framework + CC version, last-seen verdict, EC2 + Claude auth), EVERY agent bound to the host (each with its own heartbeat verdict + org), a rollup of alerts (the host's own infra alerts \u2014 including NULL-team ones like host_down / probe_timeout \u2014 PLUS each bound agent's alerts), and a { agent_count, restart_count, restart_window_hours } rollup. Saves stitching debug_search_hosts + per-agent reads together. Resolve the host by its id (uuid) or its exact, case-insensitive name; an ambiguous name returns a 400 asking for the id. Returns { host: { \u2026, agents[], recent_alerts[], rollup } }. Fails closed (uniform not-found) for an unauthorized or unknown host; every call is audited as a cross-org access. Pass { host, since_hours? } (since_hours sets the restart-count window, default 24).",
21508
+ getHostSchema.shape,
21509
+ async (args) => {
21510
+ try {
21511
+ const result = await client.getHost(args);
21512
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
21513
+ } catch (err) {
21514
+ return { content: [{ type: "text", text: formatError2(err) }], isError: true };
21515
+ }
21516
+ }
21517
+ );
21497
21518
  server.tool(
21498
21519
  "debug_list_alerts",
21499
21520
  "List recent platform alerts across authorized orgs (host-down, agent-stale, probe-timeout, auth-failed), including NULL-team host alerts. Returns a projection per alert (kind, severity, message, source, open/closed state). Filter with { severity, open, limit }.",
@@ -17853,15 +17853,13 @@ async function forwardOnboardingSlashCommand(opts) {
17853
17853
  return;
17854
17854
  }
17855
17855
  try {
17856
- const res = await fetch(`${AGT_HOST}/host${path}`, {
17857
- method: "POST",
17858
- headers: {
17859
- "Content-Type": "application/json; charset=utf-8",
17860
- Authorization: `Bearer ${AGT_API_KEY}`
17861
- },
17862
- body: JSON.stringify({ agent_id: AGT_AGENT_ID }),
17863
- signal: AbortSignal.timeout(SLACK_DOWNLOAD_TIMEOUT_MS)
17864
- });
17856
+ const { apiCall: apiCall2 } = await Promise.resolve().then(() => (init_ask_user_runtime(), ask_user_runtime_exports));
17857
+ const cfg = {
17858
+ apiHost: AGT_HOST,
17859
+ apiKey: AGT_API_KEY,
17860
+ agentId: AGT_AGENT_ID
17861
+ };
17862
+ const res = await apiCall2(cfg, "POST", `/host${path}`, { agent_id: AGT_AGENT_ID });
17865
17863
  const data = await res.json();
17866
17864
  const text = data.ok ? `\u{1F504} ${data.message ?? "Onboarding updated."}` : `:x: \`${verb}\` failed${data.error ? `: ${data.error}` : "."}`;
17867
17865
  await postEphemeralViaResponseUrl(responseUrl, text, codeName);
@@ -17123,14 +17123,14 @@ async function handleOnboardingCommand(opts) {
17123
17123
  return;
17124
17124
  }
17125
17125
  try {
17126
- const res = await fetch(`${AGT_HOST}/host/onboarding/${opts.mode}`, {
17127
- method: "POST",
17128
- headers: {
17129
- "Content-Type": "application/json; charset=utf-8",
17130
- Authorization: `Bearer ${AGT_API_KEY}`
17131
- },
17132
- body: JSON.stringify({ agent_id: AGT_AGENT_ID }),
17133
- signal: AbortSignal.timeout(1e4)
17126
+ const { apiCall: apiCall2 } = await Promise.resolve().then(() => (init_ask_user_runtime(), ask_user_runtime_exports));
17127
+ const cfg = {
17128
+ apiHost: AGT_HOST,
17129
+ apiKey: AGT_API_KEY,
17130
+ agentId: AGT_AGENT_ID
17131
+ };
17132
+ const res = await apiCall2(cfg, "POST", `/host/onboarding/${opts.mode}`, {
17133
+ agent_id: AGT_AGENT_ID
17134
17134
  });
17135
17135
  const data = await res.json();
17136
17136
  process.stderr.write(
@@ -25,8 +25,8 @@ import {
25
25
  takeZombieDetection,
26
26
  writeDirectChatSessionState,
27
27
  writePersistentClaudeWrapper
28
- } from "./chunk-4P7HUXWI.js";
29
- import "./chunk-XKAJW4EX.js";
28
+ } from "./chunk-4W57ZRW6.js";
29
+ import "./chunk-CDMYI3G6.js";
30
30
  import "./chunk-XWVM4KPK.js";
31
31
  export {
32
32
  SEND_KEYS_ENTER_DELAY_MS,
@@ -56,4 +56,4 @@ export {
56
56
  writeDirectChatSessionState,
57
57
  writePersistentClaudeWrapper
58
58
  };
59
- //# sourceMappingURL=persistent-session-WJBIN6WM.js.map
59
+ //# sourceMappingURL=persistent-session-XVVQWPD6.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-4P7HUXWI.js";
4
- import "./chunk-XKAJW4EX.js";
3
+ } from "./chunk-4W57ZRW6.js";
4
+ import "./chunk-CDMYI3G6.js";
5
5
  import "./chunk-XWVM4KPK.js";
6
6
 
7
7
  // src/lib/responsiveness-probe.ts
@@ -250,4 +250,4 @@ export {
250
250
  parkPendingInbound,
251
251
  readAndResetChannelDeflections
252
252
  };
253
- //# sourceMappingURL=responsiveness-probe-XVWLBSSH.js.map
253
+ //# sourceMappingURL=responsiveness-probe-IRGV6O77.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.65",
3
+ "version": "0.28.67",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {