@integrity-labs/agt-cli 0.28.1309 → 0.28.1310

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 (30) hide show
  1. package/dist/{api-client-OU7NANHC.js → api-client-A3QUGSNM.js} +3 -3
  2. package/dist/bin/agt.js +7 -7
  3. package/dist/{chunk-LZZNWEAC.js → chunk-6WALYNWT.js} +3 -3
  4. package/dist/{chunk-JZOA4A3J.js → chunk-B762DH5R.js} +2 -2
  5. package/dist/{chunk-GODP7VNT.js → chunk-PN5AZVKG.js} +15 -9
  6. package/dist/chunk-PN5AZVKG.js.map +1 -0
  7. package/dist/{chunk-NXTNYNNV.js → chunk-QSND4PGO.js} +2 -2
  8. package/dist/{chunk-VSJUMNQ5.js → chunk-V4LGFXJD.js} +28 -8
  9. package/dist/{chunk-VSJUMNQ5.js.map → chunk-V4LGFXJD.js.map} +1 -1
  10. package/dist/{chunk-WW2CTOEO.js → chunk-XSXBOLMK.js} +1 -1
  11. package/dist/chunk-XSXBOLMK.js.map +1 -0
  12. package/dist/{claude-code-updater-OU4AEM5Y.js → claude-code-updater-MC24BHPQ.js} +3 -3
  13. package/dist/{claude-pair-runtime-H7A7ZOEW.js → claude-pair-runtime-DI4N4NQ5.js} +3 -3
  14. package/dist/lib/manager-worker.js +46 -24
  15. package/dist/lib/manager-worker.js.map +1 -1
  16. package/dist/{persistent-session-OUCTECWP.js → persistent-session-WRHN2XP6.js} +4 -4
  17. package/dist/{responsiveness-probe-SC72APRB.js → responsiveness-probe-ZH5C4LKK.js} +4 -4
  18. package/dist/{session-auth-dead-MQR2SLW5.js → session-auth-dead-ZZO7YYU7.js} +3 -3
  19. package/package.json +1 -1
  20. package/dist/chunk-GODP7VNT.js.map +0 -1
  21. package/dist/chunk-WW2CTOEO.js.map +0 -1
  22. /package/dist/{api-client-OU7NANHC.js.map → api-client-A3QUGSNM.js.map} +0 -0
  23. /package/dist/{chunk-LZZNWEAC.js.map → chunk-6WALYNWT.js.map} +0 -0
  24. /package/dist/{chunk-JZOA4A3J.js.map → chunk-B762DH5R.js.map} +0 -0
  25. /package/dist/{chunk-NXTNYNNV.js.map → chunk-QSND4PGO.js.map} +0 -0
  26. /package/dist/{claude-code-updater-OU4AEM5Y.js.map → claude-code-updater-MC24BHPQ.js.map} +0 -0
  27. /package/dist/{claude-pair-runtime-H7A7ZOEW.js.map → claude-pair-runtime-DI4N4NQ5.js.map} +0 -0
  28. /package/dist/{persistent-session-OUCTECWP.js.map → persistent-session-WRHN2XP6.js.map} +0 -0
  29. /package/dist/{responsiveness-probe-SC72APRB.js.map → responsiveness-probe-ZH5C4LKK.js.map} +0 -0
  30. /package/dist/{session-auth-dead-MQR2SLW5.js.map → session-auth-dead-ZZO7YYU7.js.map} +0 -0
@@ -13,9 +13,9 @@ import {
13
13
  probeClaudeInstalls,
14
14
  readsAsNativeInstall,
15
15
  shouldRunClaudeCodeUpdater
16
- } from "./chunk-JZOA4A3J.js";
16
+ } from "./chunk-B762DH5R.js";
17
17
  import "./chunk-XWVM4KPK.js";
18
- import "./chunk-WW2CTOEO.js";
18
+ import "./chunk-XSXBOLMK.js";
19
19
  import "./chunk-AIUIMEUS.js";
20
20
  import "./chunk-DGUM43GV.js";
21
21
  export {
@@ -34,4 +34,4 @@ export {
34
34
  readsAsNativeInstall,
35
35
  shouldRunClaudeCodeUpdater
36
36
  };
37
- //# sourceMappingURL=claude-code-updater-OU4AEM5Y.js.map
37
+ //# sourceMappingURL=claude-code-updater-MC24BHPQ.js.map
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  redactPaneFrame,
12
12
  sanitizeTerminalFrame
13
- } from "./chunk-WW2CTOEO.js";
13
+ } from "./chunk-XSXBOLMK.js";
14
14
  import {
15
15
  CLAUDE_CONFIG_DIR_ENV,
16
16
  claudeConfigDirFor,
@@ -323,7 +323,7 @@ async function spawnPairSession(session) {
323
323
  return { ok: true };
324
324
  } catch {
325
325
  }
326
- const { resolveClaudeBinary } = await import("./persistent-session-OUCTECWP.js");
326
+ const { resolveClaudeBinary } = await import("./persistent-session-WRHN2XP6.js");
327
327
  const claudeBin = resolveClaudeBinary();
328
328
  const pairEnv = {
329
329
  ...process.env,
@@ -838,4 +838,4 @@ export {
838
838
  startClaudePair,
839
839
  submitClaudePairCode
840
840
  };
841
- //# sourceMappingURL=claude-pair-runtime-H7A7ZOEW.js.map
841
+ //# sourceMappingURL=claude-pair-runtime-DI4N4NQ5.js.map
@@ -70,7 +70,7 @@ import {
70
70
  tripClass,
71
71
  writeEtcEnvironment,
72
72
  writeProfileDScript
73
- } from "../chunk-GODP7VNT.js";
73
+ } from "../chunk-PN5AZVKG.js";
74
74
  import {
75
75
  ApiError,
76
76
  adoptHostKeyInProcess,
@@ -88,7 +88,7 @@ import {
88
88
  probeHostKey,
89
89
  requireHost,
90
90
  setConfigHash
91
- } from "../chunk-LZZNWEAC.js";
91
+ } from "../chunk-6WALYNWT.js";
92
92
  import {
93
93
  BLOCKED_ON_PROMPT_DECISION,
94
94
  CHANNEL_SECRET_ENV_KEYS,
@@ -185,7 +185,7 @@ import {
185
185
  webFetchBaselineValue,
186
186
  webFetchRestartNeeded,
187
187
  writeEgressAllowlist
188
- } from "../chunk-VSJUMNQ5.js";
188
+ } from "../chunk-V4LGFXJD.js";
189
189
  import {
190
190
  isAgentIdle,
191
191
  isStaleForToday,
@@ -197,7 +197,7 @@ import {
197
197
  subagentActivityAgeSeconds,
198
198
  subagentTranscriptDir,
199
199
  transcriptActivityAgeSeconds
200
- } from "../chunk-NXTNYNNV.js";
200
+ } from "../chunk-QSND4PGO.js";
201
201
  import {
202
202
  classifyUnanswerablePane,
203
203
  focusedConfirmDialogBlock,
@@ -223,7 +223,7 @@ import {
223
223
  runSafeCleanup,
224
224
  tightestDiskStat,
225
225
  withPackageCacheLock
226
- } from "../chunk-JZOA4A3J.js";
226
+ } from "../chunk-B762DH5R.js";
227
227
  import {
228
228
  parsePsRows,
229
229
  reapOrphanChannelMcps
@@ -352,7 +352,7 @@ import {
352
352
  stabiliseResetInstant,
353
353
  sumTranscriptUsageInWindow,
354
354
  summarizeTranscriptActivity
355
- } from "../chunk-WW2CTOEO.js";
355
+ } from "../chunk-XSXBOLMK.js";
356
356
  import {
357
357
  CLAUDE_CONFIG_DIR_ENV,
358
358
  claudeConfigDirFor,
@@ -2183,6 +2183,9 @@ function shouldDeferBindRemediationForFirstConnect(outcome, ctx) {
2183
2183
 
2184
2184
  // src/lib/integration-hash.ts
2185
2185
  import { createHash as createHash2 } from "crypto";
2186
+ function oauthGrantedToolsOf(i) {
2187
+ return Array.isArray(i.grantedTools) ? JSON.stringify(i.grantedTools) : null;
2188
+ }
2186
2189
  function remoteMcpUrlOf(i) {
2187
2190
  const url = i.remoteMcp?.url;
2188
2191
  return typeof url === "string" && url ? url : null;
@@ -2224,7 +2227,9 @@ function computeIntegrationsHash(integrations) {
2224
2227
  const url = remoteMcpUrlOf(i);
2225
2228
  const withUrl = url ? `${base}:remote=${url}` : base;
2226
2229
  const allow = remoteMcpAllowlistOf(i);
2227
- const withAllow = allow ? `${withUrl}:allow=${allow}` : withUrl;
2230
+ const withAllowOnly = allow ? `${withUrl}:allow=${allow}` : withUrl;
2231
+ const granted = oauthGrantedToolsOf(i);
2232
+ const withAllow = granted ? `${withAllowOnly}:granted=${granted}` : withAllowOnly;
2228
2233
  const key = connectionKeyOf(i);
2229
2234
  return key ? JSON.stringify(["named", key, withAllow]) : withAllow;
2230
2235
  }).sort();
@@ -2263,9 +2268,24 @@ function withResolvedRemoteMcp(integration) {
2263
2268
  // row into use-time credential delivery — anything else (including a value
2264
2269
  // a newer API might add later) reads as today's env delivery, so an
2265
2270
  // unrecognised value can never strip an agent's `git`/`gh` credentials.
2266
- credentialDelivery: normalizeCredentialDelivery(integration.credential_delivery)
2271
+ credentialDelivery: normalizeCredentialDelivery(integration.credential_delivery),
2272
+ // ENG-12314: same seam. Present-but-unusable maps to [] ("granted nothing",
2273
+ // withheld), never to undefined ("not narrowed").
2274
+ grantedTools: normalizeGrantedTools(integration.granted_tool_allowlist)
2267
2275
  };
2268
2276
  }
2277
+ function normalizeGrantedTools(raw) {
2278
+ if (raw === void 0 || raw === null) return void 0;
2279
+ if (!Array.isArray(raw)) return [];
2280
+ const out = [];
2281
+ for (const n of raw) {
2282
+ if (typeof n !== "string") continue;
2283
+ const name = n.trim();
2284
+ if (name === "" || name.includes(",") || out.includes(name)) continue;
2285
+ out.push(name);
2286
+ }
2287
+ return out;
2288
+ }
2269
2289
  function normalizeToolTiers(raw) {
2270
2290
  if (!raw) return void 0;
2271
2291
  const out = {};
@@ -16025,7 +16045,7 @@ function createFileMigrationReportIO(codeName, log2) {
16025
16045
  };
16026
16046
  }
16027
16047
  var managerHostPost = async (path, body) => {
16028
- const { api: api2, ApiError: ApiError3 } = await import("../api-client-OU7NANHC.js");
16048
+ const { api: api2, ApiError: ApiError3 } = await import("../api-client-A3QUGSNM.js");
16029
16049
  try {
16030
16050
  const json = await api2.post(path, body);
16031
16051
  return { status: 200, json };
@@ -18195,7 +18215,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
18195
18215
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
18196
18216
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
18197
18217
  async function channelInboundActivityAgeSecondsFor(codeName) {
18198
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-SC72APRB.js");
18218
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-ZH5C4LKK.js");
18199
18219
  const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
18200
18220
  if (newest === null) return null;
18201
18221
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -19106,7 +19126,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
19106
19126
  var lastVersionCheckAt = 0;
19107
19127
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
19108
19128
  var lastResponsivenessProbeAt = 0;
19109
- var agtCliVersion = true ? "0.28.1309" : "dev";
19129
+ var agtCliVersion = true ? "0.28.1310" : "dev";
19110
19130
  function resolveBrewPath(execFileSync5) {
19111
19131
  try {
19112
19132
  const out = execFileSync5("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -21242,7 +21262,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
21242
21262
  if (codeNames.length === 0) return;
21243
21263
  void (async () => {
21244
21264
  try {
21245
- const { collectDiagnostics } = await import("../persistent-session-OUCTECWP.js");
21265
+ const { collectDiagnostics } = await import("../persistent-session-WRHN2XP6.js");
21246
21266
  await api.post("/host/heartbeat", {
21247
21267
  host_id: hostId,
21248
21268
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -21387,7 +21407,7 @@ async function pollCycleInner() {
21387
21407
  }
21388
21408
  try {
21389
21409
  const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
21390
- const { collectDiagnostics } = await import("../persistent-session-OUCTECWP.js");
21410
+ const { collectDiagnostics } = await import("../persistent-session-WRHN2XP6.js");
21391
21411
  const recordedSinceHeartbeat = new Set(spawnOutcomesSinceHeartbeat.drain());
21392
21412
  const diagCodeNames = heartbeatDiagnosticsCodeNames(agentState.persistentSessionAgents, recordedSinceHeartbeat);
21393
21413
  const heartbeatSpawnOutcomeFor = spawnOutcomeIfRecorded(spawnOutcomeForDiagnostics, recordedSinceHeartbeat);
@@ -21688,7 +21708,7 @@ async function pollCycleInner() {
21688
21708
  }
21689
21709
  try {
21690
21710
  const desiredClaudeCodeVersion = hbResp?.desired_claude_code_version?.trim();
21691
- const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-OU4AEM5Y.js");
21711
+ const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-MC24BHPQ.js");
21692
21712
  const securityFloor = currentSecurityFloor();
21693
21713
  claudeUpdaterInFlight = true;
21694
21714
  if (desiredClaudeCodeVersion && (claudePairLoop.busy || claudePairingInProgress())) {
@@ -21723,7 +21743,7 @@ async function pollCycleInner() {
21723
21743
  collectPanelessActivityProbes,
21724
21744
  getResponsivenessIntervalMs,
21725
21745
  occupancyQualificationClassifications
21726
- } = await import("../responsiveness-probe-SC72APRB.js");
21746
+ } = await import("../responsiveness-probe-ZH5C4LKK.js");
21727
21747
  const probeIntervalMs = getResponsivenessIntervalMs();
21728
21748
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
21729
21749
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -21840,7 +21860,7 @@ async function pollCycleInner() {
21840
21860
  collectResponsivenessProbes,
21841
21861
  livePendingInboundOldestAgeSeconds,
21842
21862
  parkPendingInbound
21843
- } = await import("../responsiveness-probe-SC72APRB.js");
21863
+ } = await import("../responsiveness-probe-ZH5C4LKK.js");
21844
21864
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-5PCBGRNY.js");
21845
21865
  const wedgeNow = /* @__PURE__ */ new Date();
21846
21866
  const liveAgents = agentState.persistentSessionAgents;
@@ -22129,7 +22149,7 @@ async function pollCycleInner() {
22129
22149
  }
22130
22150
  );
22131
22151
  if (!paneFatalTornDown) continue;
22132
- const { parkPendingInbound } = await import("../responsiveness-probe-SC72APRB.js");
22152
+ const { parkPendingInbound } = await import("../responsiveness-probe-ZH5C4LKK.js");
22133
22153
  const { parked, deadLettered } = parkPendingInbound(codeName, new Date(fatalNowMs));
22134
22154
  paneFatalStreak.delete(codeName);
22135
22155
  paneFatalRestarts.set(codeName, [...history, fatalNowMs]);
@@ -22160,7 +22180,7 @@ async function pollCycleInner() {
22160
22180
  TRANSCRIPT_MOUNT_ESCALATION_REFRESH_MS,
22161
22181
  bindSourceEscalations
22162
22182
  } = await import("../transcript-mount-health-OHE6IVJV.js");
22163
- const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-OUCTECWP.js");
22183
+ const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-WRHN2XP6.js");
22164
22184
  const mountConfig = resolveTranscriptMountConfig();
22165
22185
  const liveAgents = agentState.persistentSessionAgents;
22166
22186
  for (const tracked of [
@@ -22326,7 +22346,7 @@ async function pollCycleInner() {
22326
22346
  }
22327
22347
  try {
22328
22348
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-VR5QGP3J.js");
22329
- const { probeSessionAuth } = await import("../session-auth-dead-MQR2SLW5.js");
22349
+ const { probeSessionAuth } = await import("../session-auth-dead-ZZO7YYU7.js");
22330
22350
  const observations = [];
22331
22351
  const pendingCacheCommits = [];
22332
22352
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -24682,7 +24702,9 @@ async function processAgent(agent, agentStates, managedToolkits) {
24682
24702
  config: q.config ?? {},
24683
24703
  capabilities: [],
24684
24704
  ...q.remote_mcp ? { remoteMcp: q.remote_mcp } : {},
24685
- ...q.stdio_mcp === true ? { stdioMcp: true } : {}
24705
+ ...q.stdio_mcp === true ? { stdioMcp: true } : {},
24706
+ // ENG-12314: probe the same narrowed surface the live entry had.
24707
+ grantedTools: normalizeGrantedTools(q.granted_tool_allowlist)
24686
24708
  });
24687
24709
  if (entry) q.inline_server_entry = entry;
24688
24710
  } catch (err) {
@@ -27547,7 +27569,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
27547
27569
  if (!refreshData) return;
27548
27570
  const framework = refreshData.agent?.framework ?? agentFrameworkCache.get(codeName) ?? DEFAULT_FRAMEWORK;
27549
27571
  const hostId = await getHostId();
27550
- const parkForRestart = await import("../responsiveness-probe-SC72APRB.js").then(
27572
+ const parkForRestart = await import("../responsiveness-probe-ZH5C4LKK.js").then(
27551
27573
  (m) => m.parkPendingInbound,
27552
27574
  (err) => err
27553
27575
  );
@@ -27628,7 +27650,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
27628
27650
  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}`));
27629
27651
  void (async () => {
27630
27652
  try {
27631
- const { collectDiagnostics } = await import("../persistent-session-OUCTECWP.js");
27653
+ const { collectDiagnostics } = await import("../persistent-session-WRHN2XP6.js");
27632
27654
  await api.post("/host/heartbeat", {
27633
27655
  host_id: hostId,
27634
27656
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -27681,7 +27703,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
27681
27703
  }
27682
27704
  try {
27683
27705
  const hostId = await getHostId();
27684
- const { collectDiagnostics } = await import("../persistent-session-OUCTECWP.js");
27706
+ const { collectDiagnostics } = await import("../persistent-session-WRHN2XP6.js");
27685
27707
  await api.post("/host/heartbeat", {
27686
27708
  host_id: hostId,
27687
27709
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
@@ -28557,7 +28579,7 @@ async function processClaudePairSessions(agents) {
28557
28579
  snapshotPairConfig,
28558
28580
  // ENG-11659: result -> report body + the manager.log line that records it.
28559
28581
  planPairStartReport
28560
- } = await import("../claude-pair-runtime-H7A7ZOEW.js");
28582
+ } = await import("../claude-pair-runtime-DI4N4NQ5.js");
28561
28583
  const { resetClaudeSignin, describeSigninResetForLog, describeSigninResetFailure } = await import("../claude-signin-reset-6IJMMVYG.js");
28562
28584
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
28563
28585
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);