@integrity-labs/agt-cli 0.28.470 → 0.28.472

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-UYMZ2MEI.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-Y77TKSL6.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-63X4ERBM.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-62G3PXXX.js.map
@@ -44,7 +44,7 @@ import {
44
44
  resolveEffectivePinRaw,
45
45
  safeWriteJsonAtomic,
46
46
  setConfigHash
47
- } from "../chunk-BFCHF4XF.js";
47
+ } from "../chunk-KCU4ZTE4.js";
48
48
  import {
49
49
  getProjectDir as getProjectDir2,
50
50
  getReadyTasks,
@@ -166,7 +166,7 @@ import {
166
166
  toOpencodeModel,
167
167
  transcriptActivityAgeSeconds,
168
168
  writeEgressAllowlist
169
- } from "../chunk-GPSEUO2D.js";
169
+ } from "../chunk-YR6ESOCM.js";
170
170
  import {
171
171
  reapOrphanChannelMcps
172
172
  } from "../chunk-XWVM4KPK.js";
@@ -10038,7 +10038,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
10038
10038
  var lastVersionCheckAt = 0;
10039
10039
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
10040
10040
  var lastResponsivenessProbeAt = 0;
10041
- var agtCliVersion = true ? "0.28.470" : "dev";
10041
+ var agtCliVersion = true ? "0.28.472" : "dev";
10042
10042
  function resolveBrewPath(execFileSync2) {
10043
10043
  try {
10044
10044
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -11199,7 +11199,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
11199
11199
  if (codeNames.length === 0) return;
11200
11200
  void (async () => {
11201
11201
  try {
11202
- const { collectDiagnostics } = await import("../persistent-session-UYMZ2MEI.js");
11202
+ const { collectDiagnostics } = await import("../persistent-session-Y77TKSL6.js");
11203
11203
  await api.post("/host/heartbeat", {
11204
11204
  host_id: hostId,
11205
11205
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor)
@@ -11306,7 +11306,7 @@ async function pollCycle() {
11306
11306
  }
11307
11307
  try {
11308
11308
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
11309
- const { collectDiagnostics } = await import("../persistent-session-UYMZ2MEI.js");
11309
+ const { collectDiagnostics } = await import("../persistent-session-Y77TKSL6.js");
11310
11310
  const diagCodeNames = [...agentState.persistentSessionAgents];
11311
11311
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor) : void 0;
11312
11312
  let tailscaleHostname;
@@ -11420,7 +11420,7 @@ async function pollCycle() {
11420
11420
  collectResponsivenessProbes,
11421
11421
  collectPanelessActivityProbes,
11422
11422
  getResponsivenessIntervalMs
11423
- } = await import("../responsiveness-probe-WXHKKJ7N.js");
11423
+ } = await import("../responsiveness-probe-KIPMD2UJ.js");
11424
11424
  const probeIntervalMs = getResponsivenessIntervalMs();
11425
11425
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
11426
11426
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -11484,7 +11484,7 @@ async function pollCycle() {
11484
11484
  collectResponsivenessProbes,
11485
11485
  livePendingInboundOldestAgeSeconds,
11486
11486
  parkPendingInbound
11487
- } = await import("../responsiveness-probe-WXHKKJ7N.js");
11487
+ } = await import("../responsiveness-probe-KIPMD2UJ.js");
11488
11488
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
11489
11489
  const wedgeNow = /* @__PURE__ */ new Date();
11490
11490
  const liveAgents = agentState.persistentSessionAgents;
@@ -14952,7 +14952,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
14952
14952
  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}`));
14953
14953
  void (async () => {
14954
14954
  try {
14955
- const { collectDiagnostics } = await import("../persistent-session-UYMZ2MEI.js");
14955
+ const { collectDiagnostics } = await import("../persistent-session-Y77TKSL6.js");
14956
14956
  await api.post("/host/heartbeat", {
14957
14957
  host_id: hostId,
14958
14958
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
@@ -15002,7 +15002,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
15002
15002
  }
15003
15003
  try {
15004
15004
  const hostId = await getHostId();
15005
- const { collectDiagnostics } = await import("../persistent-session-UYMZ2MEI.js");
15005
+ const { collectDiagnostics } = await import("../persistent-session-Y77TKSL6.js");
15006
15006
  await api.post("/host/heartbeat", {
15007
15007
  host_id: hostId,
15008
15008
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
@@ -15460,7 +15460,7 @@ async function processClaudePairSessions(agents) {
15460
15460
  killPairSession,
15461
15461
  pairTmuxSession,
15462
15462
  finalizeClaudePairOnboarding
15463
- } = await import("../claude-pair-runtime-63X4ERBM.js");
15463
+ } = await import("../claude-pair-runtime-62G3PXXX.js");
15464
15464
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
15465
15465
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
15466
15466
  const killed = await killPairSession(pairTmuxSession(pairId));
package/dist/mcp/index.js CHANGED
@@ -21104,6 +21104,15 @@ function renderKanbanList(items) {
21104
21104
  var HUMAN_ASSIGNED_SECTION_HEADING = "Assigned to a person (not yours to action)";
21105
21105
  var HUMAN_ASSIGNED_SECTION_NOTE = "_These belong to a person, not to you. You cannot move, note or complete them \u2014 every kanban write is refused. If the work is finished (or was never really theirs), use `kanban_recall` to pull the card back onto your board, then close it as normal._";
21106
21106
 
21107
+ // src/kanban-person-waiting-kind.ts
21108
+ function isPersonWaitingKindMcp(kind) {
21109
+ if (kind === void 0 || kind === null || kind === "") return true;
21110
+ return kind === "human" || kind === "approval" || kind === "pr-review" || kind === "pr-merged";
21111
+ }
21112
+ function personWaitingKindRejection(kind) {
21113
+ return `Error: waiting_on_person cannot be used with waiting_kind="${kind ?? "unset"}". A "${kind}" wait is parked on a system or is unclassified, so there is no one to notify. Name a person on a "human" decision, or on a "pr-review"/"pr-merged" wait (the reviewer or whoever has to tap merge), or drop waiting_on_person.`;
21114
+ }
21115
+
21107
21116
  // src/kanban-write-outcome.ts
21108
21117
  function describeKanbanWriteFailure(failure, label) {
21109
21118
  if (!failure) return null;
@@ -21944,7 +21953,7 @@ server.tool(
21944
21953
  'Optional, best with waiting_kind="human": 2-5 short answer options to offer the person as one-click buttons (e.g. ["Ship it", "Hold", "Needs changes"]). Keep them short. They can still add a free-text comment alongside a choice. Omit for an open-ended human wait (they just get a comment box).'
21945
21954
  ),
21946
21955
  waiting_on_person: external_exports.string().optional().describe(
21947
- `Only with waiting_kind="human": the Slack user id of the ONE person whose decision you are parked on (e.g. "U0123ABCD" - the same id you would pass to deliver_to). This puts the card in that person's "Awaiting you" queue and notifies them, so your ask does not sit unseen. It does NOT reassign the card - you still own driving it to done and you resume as soon as they answer. Set it whenever you know who has to act; omit only if genuinely nobody specific does.`
21956
+ `The Slack user id of the ONE person who has to act before you can continue (e.g. "U0123ABCD" - the same id you would pass to deliver_to). This puts the card in that person's "Awaiting you" queue and notifies them, so your ask does not sit unseen. It does NOT reassign the card - you still own driving it to done and you resume as soon as they answer. Valid on "human", "approval", "pr-review" and "pr-merged" waits (ENG-8291: a PR waiting on a review or a merge tap IS waiting on a person, and naming them is the whole point). NOT valid on "external" or "other", which are parked on a system or unclassified - there is nobody to notify. Set it whenever you know who has to act; omit only if genuinely nobody specific does.`
21948
21957
  )
21949
21958
  } : {}
21950
21959
  },
@@ -21979,14 +21988,9 @@ server.tool(
21979
21988
  isError: true
21980
21989
  };
21981
21990
  }
21982
- if (p.waiting_on_person && p.waiting_kind !== "human") {
21991
+ if (p.waiting_on_person && !isPersonWaitingKindMcp(p.waiting_kind)) {
21983
21992
  return {
21984
- content: [
21985
- {
21986
- type: "text",
21987
- text: `Error: waiting_on_person is only valid with waiting_kind="human" (got "${p.waiting_kind ?? "unset"}"). Use waiting_kind="human" when one specific person must decide; for a PR use "pr-review"/"pr-merged" with waiting_repo + waiting_pr, and for a non-human blocker use "external"/"other" with waiting_on.`
21988
- }
21989
- ],
21993
+ content: [{ type: "text", text: personWaitingKindRejection(p.waiting_kind) }],
21990
21994
  isError: true
21991
21995
  };
21992
21996
  }
@@ -39,14 +39,27 @@ function parsePreEnableToolsets(raw) {
39
39
  }
40
40
  return out;
41
41
  }
42
+ var ACTIVATION_TOOL = "enable_toolset";
42
43
  function buildEnableToolsetRequest(toolset) {
43
44
  return JSON.stringify({
44
45
  jsonrpc: "2.0",
45
46
  id: `agt-preenable-${toolset}`,
46
47
  method: "tools/call",
47
- params: { name: "enable_toolset", arguments: { name: toolset } }
48
+ params: { name: ACTIVATION_TOOL, arguments: { name: toolset } }
48
49
  });
49
50
  }
51
+ function stripActivationTool(tools) {
52
+ return tools.filter((t) => toolName(t) !== ACTIVATION_TOOL);
53
+ }
54
+ function isManagedActivationCall(method, params) {
55
+ if (method !== "tools/call") return false;
56
+ const name = params && typeof params === "object" && typeof params.name === "string" ? params.name : "";
57
+ return name === ACTIVATION_TOOL;
58
+ }
59
+ function activationRefusalMessage(label2, managed) {
60
+ const groups = managed.length > 0 ? managed.join(", ") : "none";
61
+ return `${label2}: toolset activation is managed by this connection, not by the agent. This connection manages these toolsets, and their tools are already in this session's tool list: ${groups}. Calling ${ACTIVATION_TOOL} cannot add a callable tool \u2014 the tool list is fixed for the session, so anything it reported as "newly available" would still answer "No such tool available". Call the tool you need directly; if it is not in your tool list, it is not enabled for this integration.`;
62
+ }
50
63
  function buildToolsListRequest() {
51
64
  return JSON.stringify({ jsonrpc: "2.0", id: "agt-union-list", method: "tools/list", params: {} });
52
65
  }
@@ -250,6 +263,10 @@ function ensureUnionManifest(token) {
250
263
  return unionOnce;
251
264
  }
252
265
  async function forward(line, id, isNotification, method, params) {
266
+ if (preEnableToolsets.length > 0 && isManagedActivationCall(method, params)) {
267
+ logErr(`refused agent-issued ${ACTIVATION_TOOL} (activation is proxy-managed)`);
268
+ return isNotification ? [] : [jsonRpcError(id, -32601, activationRefusalMessage(label, preEnableToolsets))];
269
+ }
253
270
  const token = readCurrentToken(tokenFile, tokenVar);
254
271
  if (!token) {
255
272
  logErr(`no token in ${tokenFile} (var ${tokenVar})`);
@@ -259,6 +276,7 @@ async function forward(line, id, isNotification, method, params) {
259
276
  await ensureUnionManifest(token);
260
277
  let tools = [...unionToolByName.values()];
261
278
  if (toolAllowlist.size > 0) tools = tools.filter((t) => toolAllowlist.has(toolName(t)));
279
+ tools = stripActivationTool(tools);
262
280
  return [JSON.stringify({ jsonrpc: "2.0", id: id ?? null, result: { tools } })];
263
281
  }
264
282
  if (method === "tools/call" && preEnableToolsets.length > 0) {
@@ -384,12 +402,16 @@ if (invokedDirectly) {
384
402
  void main();
385
403
  }
386
404
  export {
405
+ ACTIVATION_TOOL,
406
+ activationRefusalMessage,
387
407
  buildEnableToolsetRequest,
388
408
  buildForwardHeaders,
389
409
  buildToolsListRequest,
390
410
  extractJsonRpcMessages,
391
411
  extractToolsArray,
392
412
  filterToolsListMessage,
413
+ forward,
414
+ isManagedActivationCall,
393
415
  isToolCallBlocked,
394
416
  main,
395
417
  parseEnableToolsetResponse,
@@ -397,5 +419,6 @@ export {
397
419
  parsePreEnableToolsets,
398
420
  parseToolAllowlist,
399
421
  readCurrentToken,
422
+ stripActivationTool,
400
423
  toolName
401
424
  };
@@ -36,7 +36,7 @@ import {
36
36
  writeDirectChatSessionState,
37
37
  writeEgressAllowlist,
38
38
  writePersistentClaudeWrapper
39
- } from "./chunk-GPSEUO2D.js";
39
+ } from "./chunk-YR6ESOCM.js";
40
40
  import "./chunk-XWVM4KPK.js";
41
41
  export {
42
42
  EGRESS_BASELINE_DOMAINS,
@@ -77,4 +77,4 @@ export {
77
77
  writeEgressAllowlist,
78
78
  writePersistentClaudeWrapper
79
79
  };
80
- //# sourceMappingURL=persistent-session-UYMZ2MEI.js.map
80
+ //# sourceMappingURL=persistent-session-Y77TKSL6.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-GPSEUO2D.js";
3
+ } from "./chunk-YR6ESOCM.js";
4
4
  import "./chunk-XWVM4KPK.js";
5
5
 
6
6
  // src/lib/responsiveness-probe.ts
@@ -596,4 +596,4 @@ export {
596
596
  readAndResetSlackReplyBindingClassifications,
597
597
  readAndResetSlackReplyTargetClassifications
598
598
  };
599
- //# sourceMappingURL=responsiveness-probe-WXHKKJ7N.js.map
599
+ //# sourceMappingURL=responsiveness-probe-KIPMD2UJ.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.470",
3
+ "version": "0.28.472",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {