@integrity-labs/agt-cli 0.28.1136 → 0.28.1137

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.
@@ -269,7 +269,7 @@ async function spawnPairSession(session) {
269
269
  return { ok: true };
270
270
  } catch {
271
271
  }
272
- const { resolveClaudeBinary } = await import("./persistent-session-6W6PZGNB.js");
272
+ const { resolveClaudeBinary } = await import("./persistent-session-2X3BCGV5.js");
273
273
  const claudeBin = resolveClaudeBinary();
274
274
  const pairEnv = {
275
275
  ...process.env,
@@ -739,4 +739,4 @@ export {
739
739
  startClaudePair,
740
740
  submitClaudePairCode
741
741
  };
742
- //# sourceMappingURL=claude-pair-runtime-6SJHKHRE.js.map
742
+ //# sourceMappingURL=claude-pair-runtime-OZLZFJZR.js.map
@@ -76,7 +76,7 @@ import {
76
76
  setConfigHash,
77
77
  shellGuard,
78
78
  tripClass
79
- } from "../chunk-AMW44JCN.js";
79
+ } from "../chunk-HZFUOGUV.js";
80
80
  import {
81
81
  getProjectDir as getProjectDir2,
82
82
  getReadyTasks,
@@ -163,7 +163,7 @@ import {
163
163
  webFetchBaselineValue,
164
164
  webFetchRestartNeeded,
165
165
  writeEgressAllowlist
166
- } from "../chunk-PGTZFME3.js";
166
+ } from "../chunk-LQCWKNFX.js";
167
167
  import {
168
168
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
169
169
  AnchorSessionClient,
@@ -274,7 +274,7 @@ import {
274
274
  subagentActivityAgeSeconds,
275
275
  sumTranscriptUsageInWindow,
276
276
  transcriptActivityAgeSeconds
277
- } from "../chunk-773ZNDNR.js";
277
+ } from "../chunk-WIU4HUHD.js";
278
278
  import {
279
279
  classifyUnanswerablePane,
280
280
  focusedConfirmDialogBlock,
@@ -14491,7 +14491,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
14491
14491
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
14492
14492
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
14493
14493
  async function channelInboundActivityAgeSecondsFor(codeName) {
14494
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-LLYHYZR7.js");
14494
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-QFLFS5QX.js");
14495
14495
  const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
14496
14496
  if (newest === null) return null;
14497
14497
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -15249,7 +15249,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
15249
15249
  var lastVersionCheckAt = 0;
15250
15250
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
15251
15251
  var lastResponsivenessProbeAt = 0;
15252
- var agtCliVersion = true ? "0.28.1136" : "dev";
15252
+ var agtCliVersion = true ? "0.28.1137" : "dev";
15253
15253
  function resolveBrewPath(execFileSync3) {
15254
15254
  try {
15255
15255
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -16879,7 +16879,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
16879
16879
  if (codeNames.length === 0) return;
16880
16880
  void (async () => {
16881
16881
  try {
16882
- const { collectDiagnostics } = await import("../persistent-session-6W6PZGNB.js");
16882
+ const { collectDiagnostics } = await import("../persistent-session-2X3BCGV5.js");
16883
16883
  await api.post("/host/heartbeat", {
16884
16884
  host_id: hostId,
16885
16885
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
@@ -17021,7 +17021,7 @@ async function pollCycleInner() {
17021
17021
  }
17022
17022
  try {
17023
17023
  const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
17024
- const { collectDiagnostics } = await import("../persistent-session-6W6PZGNB.js");
17024
+ const { collectDiagnostics } = await import("../persistent-session-2X3BCGV5.js");
17025
17025
  const diagCodeNames = [...agentState.persistentSessionAgents];
17026
17026
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor) : void 0;
17027
17027
  let tailscaleHostname;
@@ -17229,7 +17229,7 @@ async function pollCycleInner() {
17229
17229
  collectPanelessActivityProbes,
17230
17230
  getResponsivenessIntervalMs,
17231
17231
  occupancyQualificationClassifications
17232
- } = await import("../responsiveness-probe-LLYHYZR7.js");
17232
+ } = await import("../responsiveness-probe-QFLFS5QX.js");
17233
17233
  const probeIntervalMs = getResponsivenessIntervalMs();
17234
17234
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
17235
17235
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -17346,7 +17346,7 @@ async function pollCycleInner() {
17346
17346
  collectResponsivenessProbes,
17347
17347
  livePendingInboundOldestAgeSeconds,
17348
17348
  parkPendingInbound
17349
- } = await import("../responsiveness-probe-LLYHYZR7.js");
17349
+ } = await import("../responsiveness-probe-QFLFS5QX.js");
17350
17350
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-M6AFZWNU.js");
17351
17351
  const wedgeNow = /* @__PURE__ */ new Date();
17352
17352
  const liveAgents = agentState.persistentSessionAgents;
@@ -17632,7 +17632,7 @@ async function pollCycleInner() {
17632
17632
  }
17633
17633
  }
17634
17634
  );
17635
- const { parkPendingInbound } = await import("../responsiveness-probe-LLYHYZR7.js");
17635
+ const { parkPendingInbound } = await import("../responsiveness-probe-QFLFS5QX.js");
17636
17636
  const { parked, deadLettered } = parkPendingInbound(codeName, new Date(fatalNowMs));
17637
17637
  paneFatalStreak.delete(codeName);
17638
17638
  paneFatalRestarts.set(codeName, [...history, fatalNowMs]);
@@ -17663,7 +17663,7 @@ async function pollCycleInner() {
17663
17663
  TRANSCRIPT_MOUNT_ESCALATION_REFRESH_MS,
17664
17664
  bindSourceEscalations
17665
17665
  } = await import("../transcript-mount-health-OHE6IVJV.js");
17666
- const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-6W6PZGNB.js");
17666
+ const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-2X3BCGV5.js");
17667
17667
  const mountConfig = resolveTranscriptMountConfig();
17668
17668
  const liveAgents = agentState.persistentSessionAgents;
17669
17669
  for (const tracked of [
@@ -17828,7 +17828,7 @@ async function pollCycleInner() {
17828
17828
  }
17829
17829
  try {
17830
17830
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-VR5QGP3J.js");
17831
- const { probeSessionAuth } = await import("../session-auth-dead-QZET5C3W.js");
17831
+ const { probeSessionAuth } = await import("../session-auth-dead-QE7GT5Y5.js");
17832
17832
  const observations = [];
17833
17833
  const pendingCacheCommits = [];
17834
17834
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -22423,7 +22423,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
22423
22423
  try {
22424
22424
  const freshId = rotateSessionForWedge(codeName);
22425
22425
  consecutiveWedgeCycles.delete(codeName);
22426
- const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-LLYHYZR7.js");
22426
+ const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-QFLFS5QX.js");
22427
22427
  const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
22428
22428
  const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
22429
22429
  const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
@@ -22466,7 +22466,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
22466
22466
  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}`));
22467
22467
  void (async () => {
22468
22468
  try {
22469
- const { collectDiagnostics } = await import("../persistent-session-6W6PZGNB.js");
22469
+ const { collectDiagnostics } = await import("../persistent-session-2X3BCGV5.js");
22470
22470
  await api.post("/host/heartbeat", {
22471
22471
  host_id: hostId,
22472
22472
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
@@ -22517,7 +22517,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
22517
22517
  }
22518
22518
  try {
22519
22519
  const hostId = await getHostId();
22520
- const { collectDiagnostics } = await import("../persistent-session-6W6PZGNB.js");
22520
+ const { collectDiagnostics } = await import("../persistent-session-2X3BCGV5.js");
22521
22521
  await api.post("/host/heartbeat", {
22522
22522
  host_id: hostId,
22523
22523
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
@@ -23190,7 +23190,7 @@ async function processClaudePairSessions(agents) {
23190
23190
  // cannot take it for itself — by the time it runs, the write it is looking
23191
23191
  // for may already have happened.
23192
23192
  snapshotPairConfig
23193
- } = await import("../claude-pair-runtime-6SJHKHRE.js");
23193
+ } = await import("../claude-pair-runtime-OZLZFJZR.js");
23194
23194
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
23195
23195
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
23196
23196
  const killed = await killPairSession(pairTmuxSession(pairId));
package/dist/mcp/index.js CHANGED
@@ -47350,6 +47350,15 @@ var ARTEFACT_KINDS_MCP = [
47350
47350
  ];
47351
47351
 
47352
47352
  // src/kanban-write-outcome.ts
47353
+ function approvalRedirectNotice(data, match = {}) {
47354
+ const entries = data?.approval_wait_redirects;
47355
+ if (!Array.isArray(entries) || entries.length === 0) return "";
47356
+ const relevant = entries.filter((e) => match.id === void 0 || e?.id === void 0 || e.id === match.id);
47357
+ return relevant.map((e) => {
47358
+ if (typeof e?.message === "string" && e.message.trim()) return ` ${e.message.trim()}`;
47359
+ return typeof e?.approval_request_id === "string" ? ` This card is already waiting on approval ${e.approval_request_id}; it stays parked on that approval.` : "";
47360
+ }).filter((m) => m.length > 0).join("");
47361
+ }
47353
47362
  function noticeCloseNotice(data) {
47354
47363
  const entries = data?.notice_close_warnings;
47355
47364
  if (!Array.isArray(entries) || entries.length === 0) return "";
@@ -47951,6 +47960,19 @@ function describeButtonsRequestResult(resp, channelId, optionCount) {
47951
47960
  }
47952
47961
 
47953
47962
  // src/approval-tools.ts
47963
+ function describeKanbanLink(requestedCardId, resp) {
47964
+ if (!requestedCardId) return "";
47965
+ if (resp.duplicate) {
47966
+ return ` The card link was not re-checked on this retry; confirm card ${requestedCardId} shows as waiting on the approval with kanban_get.`;
47967
+ }
47968
+ const link = resp.kanban_link;
47969
+ if (link?.linked) return ` Card ${link.kanban_item_id} is now parked on this approval; the approver can decide it from the card.`;
47970
+ const why = link?.reason ?? "not_reported";
47971
+ if (why === "link_stamp_failed") {
47972
+ return ` Card ${requestedCardId} was parked on this approval but the link could not be recorded (link_stamp_failed), so the approver can NOT decide it from the card: they have to use the Approvals page. Do not re-park the card; tell the approver to decide it on the Approvals page.`;
47973
+ }
47974
+ return ` Card ${requestedCardId} was NOT linked to this approval (${why}), so the card is not waiting on it and answering the card will not decide it. Leave the request as is (the approver can still decide it from the Approvals page) and do not park the card as a human Approve/Deny wait.`;
47975
+ }
47954
47976
  function statusToOutcome(status) {
47955
47977
  switch (status) {
47956
47978
  case "active":
@@ -47976,7 +47998,8 @@ function render(result) {
47976
47998
  outcome: result.outcome,
47977
47999
  ...result.reason ? { reason: result.reason } : {},
47978
48000
  ...result.result_payload != null ? { result_payload: result.result_payload } : {},
47979
- ...result.expires_at ? { expires_at: result.expires_at } : {}
48001
+ ...result.expires_at ? { expires_at: result.expires_at } : {},
48002
+ ...result.kanban_link ? { kanban_link: result.kanban_link } : {}
47980
48003
  })].filter(Boolean);
47981
48004
  return { content: [{ type: "text", text: lines.join("\n") }] };
47982
48005
  }
@@ -47992,7 +48015,10 @@ function registerApprovalTools(server2, deps) {
47992
48015
  detail: external_exports.record(external_exports.unknown()).optional().describe(
47993
48016
  "Optional structured context for the approver (display + audit only; never executed). When the action is sending an email, include email: { to, from, subject } (to: an address or a list of them; from: the mailbox it goes out from) so the approval card shows From / To / Subject. Asking again with a different detail under the same idempotency_key is a different request."
47994
48017
  ),
47995
- ttl_seconds: external_exports.number().int().optional().describe("How long the request stays open before it times out (default 3600; clamped to [60, 86400]).")
48018
+ ttl_seconds: external_exports.number().int().optional().describe("How long the request stays open before it times out (default 3600; clamped to [60, 86400])."),
48019
+ kanban_item_id: external_exports.string().uuid().optional().describe(
48020
+ 'The id of YOUR kanban card this approval is about. Pass it whenever the ask belongs to a card: the platform tries to park that card as waiting on this approval, so the approver can Approve/Deny from the card itself and the answer reaches this request. The result says whether the link happened (kanban_link); if it did not, the reason is given and the card is NOT waiting on the approval. Do NOT also park the card as a "human" wait with your own Approve/Deny choices; that creates a second ask the approval never hears, and the request expires.'
48021
+ )
47996
48022
  },
47997
48023
  async (params) => {
47998
48024
  try {
@@ -48002,11 +48028,18 @@ function registerApprovalTools(server2, deps) {
48002
48028
  reason: params.reason,
48003
48029
  idempotency_key: params.idempotency_key,
48004
48030
  detail: params.detail,
48005
- ttl_seconds: params.ttl_seconds
48031
+ ttl_seconds: params.ttl_seconds,
48032
+ ...params.kanban_item_id ? { kanban_item_id: params.kanban_item_id } : {}
48006
48033
  });
48007
48034
  const outcome = resp.outcome ?? statusToOutcome(resp.status);
48008
48035
  const note = resp.duplicate ? `An open request for this idempotency_key already exists \u2014 re-attached to it (request_id ${resp.request_id}). Poll it with check_approval.` : resp.notification_status === "failed" ? `Approval filed (request_id ${resp.request_id}) but the Manager notification failed (${resp.notification_failure_reason ?? "unknown"}). ${resp.escalated ? "Your org admins were alerted that it is waiting for a decision." : "No human was pinged; tell your operator."} Poll with check_approval.` : `Approval requested (request_id ${resp.request_id}). Your Manager was notified. End your turn; poll with check_approval later.`;
48009
- return render({ request_id: resp.request_id, outcome, expires_at: resp.expires_at ?? null, note });
48036
+ return render({
48037
+ request_id: resp.request_id,
48038
+ outcome,
48039
+ expires_at: resp.expires_at ?? null,
48040
+ note: note + describeKanbanLink(params.kanban_item_id, resp),
48041
+ ...resp.kanban_link ? { kanban_link: resp.kanban_link } : {}
48042
+ });
48010
48043
  } catch (err) {
48011
48044
  const msg = err instanceof Error ? err.message : String(err);
48012
48045
  return {
@@ -48906,7 +48939,9 @@ server.tool(
48906
48939
  data,
48907
48940
  { id: params.id, title: params.title },
48908
48941
  label,
48909
- () => `Moved "${label}" \u2192 ${params.status}.`
48942
+ // CS-2178: say so when the server kept the card on its pending approval
48943
+ // instead of the human wait asked for, or the agent re-asks on the card.
48944
+ () => `Moved "${label}" \u2192 ${params.status}.${approvalRedirectNotice(data, { id: params.id })}`
48910
48945
  );
48911
48946
  return {
48912
48947
  content: [{ type: "text", text: outcome.text }],
@@ -68,8 +68,8 @@ import {
68
68
  writeDirectChatSessionState,
69
69
  writeEgressAllowlist,
70
70
  writePersistentClaudeWrapper
71
- } from "./chunk-PGTZFME3.js";
72
- import "./chunk-773ZNDNR.js";
71
+ } from "./chunk-LQCWKNFX.js";
72
+ import "./chunk-WIU4HUHD.js";
73
73
  import "./chunk-B6UYVEMD.js";
74
74
  import "./chunk-XWVM4KPK.js";
75
75
  import "./chunk-EL5MWGGH.js";
@@ -145,4 +145,4 @@ export {
145
145
  writeEgressAllowlist,
146
146
  writePersistentClaudeWrapper
147
147
  };
148
- //# sourceMappingURL=persistent-session-6W6PZGNB.js.map
148
+ //# sourceMappingURL=persistent-session-2X3BCGV5.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-PGTZFME3.js";
4
- import "./chunk-773ZNDNR.js";
3
+ } from "./chunk-LQCWKNFX.js";
4
+ import "./chunk-WIU4HUHD.js";
5
5
  import "./chunk-B6UYVEMD.js";
6
6
  import "./chunk-XWVM4KPK.js";
7
7
  import "./chunk-EL5MWGGH.js";
@@ -802,4 +802,4 @@ export {
802
802
  readAndResetSlackReplyBindingClassifications,
803
803
  readAndResetSlackReplyTargetClassifications
804
804
  };
805
- //# sourceMappingURL=responsiveness-probe-LLYHYZR7.js.map
805
+ //# sourceMappingURL=responsiveness-probe-QFLFS5QX.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sessionTranscriptDir
3
- } from "./chunk-773ZNDNR.js";
3
+ } from "./chunk-WIU4HUHD.js";
4
4
  import "./chunk-DGUM43GV.js";
5
5
 
6
6
  // src/lib/session-auth-dead.ts
@@ -204,4 +204,4 @@ export {
204
204
  decideSessionAuthState,
205
205
  probeSessionAuth
206
206
  };
207
- //# sourceMappingURL=session-auth-dead-QZET5C3W.js.map
207
+ //# sourceMappingURL=session-auth-dead-QE7GT5Y5.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.1136",
3
+ "version": "0.28.1137",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {