@integrity-labs/agt-cli 0.28.964 → 0.28.966

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 (25) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-WVOB2TIP.js → chunk-K2VDNAD2.js} +2 -2
  3. package/dist/{chunk-JCAQEJYK.js → chunk-STTM33M5.js} +4 -4
  4. package/dist/{chunk-SMZQHDO7.js → chunk-V73S7OXI.js} +128 -14
  5. package/dist/chunk-V73S7OXI.js.map +1 -0
  6. package/dist/{claude-pair-runtime-QEVUC7L4.js → claude-pair-runtime-ICRPR6QQ.js} +2 -2
  7. package/dist/lib/manager-worker.js +16 -94
  8. package/dist/lib/manager-worker.js.map +1 -1
  9. package/dist/mcp/direct-chat-channel.js +56 -28
  10. package/dist/mcp/index.js +43 -13
  11. package/dist/mcp/origami.js +43 -13
  12. package/dist/mcp/slack-channel.js +45 -13
  13. package/dist/mcp/teams-channel.js +2 -0
  14. package/dist/mcp/telegram-channel.js +45 -13
  15. package/dist/{persistent-session-TZO2JPCC.js → persistent-session-6C3XIT5F.js} +3 -3
  16. package/dist/{responsiveness-probe-DW7SMQGE.js → responsiveness-probe-22RREUHV.js} +3 -3
  17. package/dist/{session-auth-dead-5D3XND6M.js → session-auth-dead-IOBL2YXT.js} +2 -2
  18. package/package.json +1 -1
  19. package/dist/chunk-SMZQHDO7.js.map +0 -1
  20. /package/dist/{chunk-WVOB2TIP.js.map → chunk-K2VDNAD2.js.map} +0 -0
  21. /package/dist/{chunk-JCAQEJYK.js.map → chunk-STTM33M5.js.map} +0 -0
  22. /package/dist/{claude-pair-runtime-QEVUC7L4.js.map → claude-pair-runtime-ICRPR6QQ.js.map} +0 -0
  23. /package/dist/{persistent-session-TZO2JPCC.js.map → persistent-session-6C3XIT5F.js.map} +0 -0
  24. /package/dist/{responsiveness-probe-DW7SMQGE.js.map → responsiveness-probe-22RREUHV.js.map} +0 -0
  25. /package/dist/{session-auth-dead-5D3XND6M.js.map → session-auth-dead-IOBL2YXT.js.map} +0 -0
@@ -236,7 +236,7 @@ async function spawnPairSession(session) {
236
236
  return { ok: true };
237
237
  } catch {
238
238
  }
239
- const { resolveClaudeBinary } = await import("./persistent-session-TZO2JPCC.js");
239
+ const { resolveClaudeBinary } = await import("./persistent-session-6C3XIT5F.js");
240
240
  const claudeBin = resolveClaudeBinary();
241
241
  const pairEnv = {
242
242
  ...process.env,
@@ -558,4 +558,4 @@ export {
558
558
  startClaudePair,
559
559
  submitClaudePairCode
560
560
  };
561
- //# sourceMappingURL=claude-pair-runtime-QEVUC7L4.js.map
561
+ //# sourceMappingURL=claude-pair-runtime-ICRPR6QQ.js.map
@@ -63,7 +63,7 @@ import {
63
63
  safeWriteJsonAtomic,
64
64
  setConfigHash,
65
65
  tripClass
66
- } from "../chunk-JCAQEJYK.js";
66
+ } from "../chunk-STTM33M5.js";
67
67
  import {
68
68
  getProjectDir as getProjectDir2,
69
69
  getReadyTasks,
@@ -140,7 +140,7 @@ import {
140
140
  takeZombieDetection,
141
141
  toOpencodeModel,
142
142
  writeEgressAllowlist
143
- } from "../chunk-WVOB2TIP.js";
143
+ } from "../chunk-K2VDNAD2.js";
144
144
  import {
145
145
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
146
146
  AnchorSessionClient,
@@ -175,9 +175,11 @@ import {
175
175
  classifyActor,
176
176
  classifyCursorAdvance,
177
177
  classifyOutput,
178
+ classifySlackPolicyBlock,
178
179
  classifyTranscriptRateLimit,
179
180
  coerceOnboardingState,
180
181
  cursorAdvanceCounterKey,
182
+ decideInboundAccess,
181
183
  describeOnboardingChannel,
182
184
  estimateActiveTasksTokens,
183
185
  extractFrontmatter,
@@ -236,7 +238,7 @@ import {
236
238
  subagentActivityAgeSeconds,
237
239
  sumTranscriptUsageInWindow,
238
240
  transcriptActivityAgeSeconds
239
- } from "../chunk-SMZQHDO7.js";
241
+ } from "../chunk-V73S7OXI.js";
240
242
  import "../chunk-DHWNVVX4.js";
241
243
  import {
242
244
  reapOrphanChannelMcps
@@ -10032,86 +10034,6 @@ function parsePeerAgentModeEnv(raw) {
10032
10034
  return "off";
10033
10035
  }
10034
10036
 
10035
- // ../../packages/core/dist/channels/governance/sender-policy-decline.js
10036
- function teamOnlyReason(allowlist) {
10037
- return allowlist && allowlist.length > 0 ? "mode_team_only" : "mode_team_only_no_principals";
10038
- }
10039
- function classifySlackPolicyBlock(evt, policy) {
10040
- if (policy.internalOnly && (!policy.homeTeamId || evt.team !== policy.homeTeamId)) {
10041
- return "internal_only";
10042
- }
10043
- switch (policy.mode) {
10044
- case "manager_only":
10045
- return "mode_manager_only";
10046
- case "team_only":
10047
- return teamOnlyReason(policy.teamPrincipalSlackUserIds);
10048
- case "team_agents_only":
10049
- return "mode_team_agents_only";
10050
- case "agents_only":
10051
- return "mode_agents_only";
10052
- case "all":
10053
- return "internal_only";
10054
- }
10055
- }
10056
- function politeDeclineCopy(reason) {
10057
- switch (reason) {
10058
- case "internal_only":
10059
- return "Sorry, I can only respond to people inside our organisation. This conversation appears to be from outside.";
10060
- case "mode_manager_only":
10061
- return "Sorry, I only respond to my manager in this channel.";
10062
- case "mode_team_only":
10063
- return "Sorry, this agent only replies to its team members.";
10064
- case "mode_team_only_no_principals":
10065
- return "Sorry, I can't reply to anyone in this channel yet: none of my team members' accounts here are linked to me. An admin needs to link them first.";
10066
- case "mode_team_agents_only":
10067
- return "Sorry, I only respond to agents on my team in this channel.";
10068
- case "mode_agents_only":
10069
- return "Sorry, I only respond to other agents in this channel.";
10070
- }
10071
- }
10072
-
10073
- // ../../packages/core/dist/channels/governance/inbound-access.js
10074
- function decideInboundAccess(input) {
10075
- if (!input.content.forward) {
10076
- return { kind: "drop", reason: `content:${input.content.reason}` };
10077
- }
10078
- if (input.isSelf) {
10079
- return { kind: "drop", reason: "self" };
10080
- }
10081
- if (input.orgBoundary && !input.orgBoundary.forward) {
10082
- return { kind: "drop", reason: "org_boundary" };
10083
- }
10084
- if (input.chatType && !input.chatType.forward) {
10085
- return { kind: "drop", reason: "chat_type" };
10086
- }
10087
- if (input.senderPolicy && !input.senderPolicy.forward) {
10088
- const reason = input.senderPolicy.reason;
10089
- const declineWorthy = input.sameOrg && reason !== "internal_only";
10090
- return {
10091
- kind: "drop",
10092
- reason: `sender_policy:${reason}`,
10093
- decline: declineWorthy ? politeDeclineCopy(reason) : void 0
10094
- };
10095
- }
10096
- if (input.command && !input.isBot) {
10097
- return {
10098
- kind: "command",
10099
- command: input.command.command,
10100
- authorized: input.command.authorized
10101
- };
10102
- }
10103
- if (input.isBot) {
10104
- const peer = input.peer;
10105
- if (!peer || peer.kind === "self") {
10106
- return { kind: "drop", reason: peer?.kind === "self" ? "self" : "peer:unclassified" };
10107
- }
10108
- if (peer.kind === "drop") {
10109
- return { kind: "drop", reason: `peer:${peer.reason ?? "unspecified"}` };
10110
- }
10111
- }
10112
- return { kind: "admit" };
10113
- }
10114
-
10115
10037
  // ../../packages/core/dist/channels/governance/slack-sender-gate.js
10116
10038
  function evaluateSlackInboundGate(evt, deps) {
10117
10039
  const isBot = Boolean(evt.bot_id);
@@ -13262,7 +13184,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
13262
13184
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
13263
13185
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
13264
13186
  async function channelInboundActivityAgeSecondsFor(codeName) {
13265
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-DW7SMQGE.js");
13187
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-22RREUHV.js");
13266
13188
  const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
13267
13189
  if (newest === null) return null;
13268
13190
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -13947,7 +13869,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
13947
13869
  var lastVersionCheckAt = 0;
13948
13870
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
13949
13871
  var lastResponsivenessProbeAt = 0;
13950
- var agtCliVersion = true ? "0.28.964" : "dev";
13872
+ var agtCliVersion = true ? "0.28.966" : "dev";
13951
13873
  function resolveBrewPath(execFileSync2) {
13952
13874
  try {
13953
13875
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -15549,7 +15471,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
15549
15471
  if (codeNames.length === 0) return;
15550
15472
  void (async () => {
15551
15473
  try {
15552
- const { collectDiagnostics } = await import("../persistent-session-TZO2JPCC.js");
15474
+ const { collectDiagnostics } = await import("../persistent-session-6C3XIT5F.js");
15553
15475
  await api.post("/host/heartbeat", {
15554
15476
  host_id: hostId,
15555
15477
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -15691,7 +15613,7 @@ async function pollCycleInner() {
15691
15613
  }
15692
15614
  try {
15693
15615
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
15694
- const { collectDiagnostics } = await import("../persistent-session-TZO2JPCC.js");
15616
+ const { collectDiagnostics } = await import("../persistent-session-6C3XIT5F.js");
15695
15617
  const diagCodeNames = [...agentState.persistentSessionAgents];
15696
15618
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
15697
15619
  let tailscaleHostname;
@@ -15867,7 +15789,7 @@ async function pollCycleInner() {
15867
15789
  collectPanelessActivityProbes,
15868
15790
  getResponsivenessIntervalMs,
15869
15791
  occupancyQualificationClassifications
15870
- } = await import("../responsiveness-probe-DW7SMQGE.js");
15792
+ } = await import("../responsiveness-probe-22RREUHV.js");
15871
15793
  const probeIntervalMs = getResponsivenessIntervalMs();
15872
15794
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
15873
15795
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -15984,7 +15906,7 @@ async function pollCycleInner() {
15984
15906
  collectResponsivenessProbes,
15985
15907
  livePendingInboundOldestAgeSeconds,
15986
15908
  parkPendingInbound
15987
- } = await import("../responsiveness-probe-DW7SMQGE.js");
15909
+ } = await import("../responsiveness-probe-22RREUHV.js");
15988
15910
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
15989
15911
  const wedgeNow = /* @__PURE__ */ new Date();
15990
15912
  const liveAgents = agentState.persistentSessionAgents;
@@ -16140,7 +16062,7 @@ async function pollCycleInner() {
16140
16062
  }
16141
16063
  try {
16142
16064
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
16143
- const { probeSessionAuth } = await import("../session-auth-dead-5D3XND6M.js");
16065
+ const { probeSessionAuth } = await import("../session-auth-dead-IOBL2YXT.js");
16144
16066
  const observations = [];
16145
16067
  const pendingCacheCommits = [];
16146
16068
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -20416,7 +20338,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
20416
20338
  try {
20417
20339
  const freshId = rotateSessionForWedge(codeName);
20418
20340
  consecutiveWedgeCycles.delete(codeName);
20419
- const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-DW7SMQGE.js");
20341
+ const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-22RREUHV.js");
20420
20342
  const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
20421
20343
  const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
20422
20344
  const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
@@ -20459,7 +20381,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
20459
20381
  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}`));
20460
20382
  void (async () => {
20461
20383
  try {
20462
- const { collectDiagnostics } = await import("../persistent-session-TZO2JPCC.js");
20384
+ const { collectDiagnostics } = await import("../persistent-session-6C3XIT5F.js");
20463
20385
  await api.post("/host/heartbeat", {
20464
20386
  host_id: hostId,
20465
20387
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -20510,7 +20432,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
20510
20432
  }
20511
20433
  try {
20512
20434
  const hostId = await getHostId();
20513
- const { collectDiagnostics } = await import("../persistent-session-TZO2JPCC.js");
20435
+ const { collectDiagnostics } = await import("../persistent-session-6C3XIT5F.js");
20514
20436
  await api.post("/host/heartbeat", {
20515
20437
  host_id: hostId,
20516
20438
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -21152,7 +21074,7 @@ async function processClaudePairSessions(agents) {
21152
21074
  killPairSession,
21153
21075
  pairTmuxSession,
21154
21076
  finalizeClaudePairOnboarding
21155
- } = await import("../claude-pair-runtime-QEVUC7L4.js");
21077
+ } = await import("../claude-pair-runtime-ICRPR6QQ.js");
21156
21078
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
21157
21079
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
21158
21080
  const killed = await killPairSession(pairTmuxSession(pairId));