@integrity-labs/agt-cli 0.28.956 → 0.28.957

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.
@@ -14,7 +14,7 @@ import {
14
14
  parseEnvFileEntries,
15
15
  parseEnvIntegrations,
16
16
  shellQuote
17
- } from "./chunk-ZV4R5NVN.js";
17
+ } from "./chunk-WU3POTSH.js";
18
18
  import {
19
19
  BIND_FAILURE_QUARANTINE_THRESHOLD,
20
20
  INTEGRATIONS_SECTION_END,
@@ -74,7 +74,7 @@ import {
74
74
  sessionTranscriptDir,
75
75
  worseConnectivityOutcome,
76
76
  wrapScheduledTaskPrompt
77
- } from "./chunk-K42A4EG3.js";
77
+ } from "./chunk-CRM7ITIY.js";
78
78
  import {
79
79
  classifyUnanswerablePane,
80
80
  summarizeUnanswerablePane
@@ -6967,7 +6967,7 @@ function exchangeFailureKind(err) {
6967
6967
  }
6968
6968
 
6969
6969
  // src/lib/api-client.ts
6970
- var agtCliVersion = true ? "0.28.956" : "dev";
6970
+ var agtCliVersion = true ? "0.28.957" : "dev";
6971
6971
  var lastConfigHash = null;
6972
6972
  function setConfigHash(hash) {
6973
6973
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -11666,4 +11666,4 @@ export {
11666
11666
  managerInstallSystemUnitCommand,
11667
11667
  managerUninstallSystemUnitCommand
11668
11668
  };
11669
- //# sourceMappingURL=chunk-FWLDKWP5.js.map
11669
+ //# sourceMappingURL=chunk-W4WCFH5J.js.map
@@ -19,7 +19,7 @@ import {
19
19
  rotateDailySession,
20
20
  sessionFileExists,
21
21
  todayLocalIso
22
- } from "./chunk-K42A4EG3.js";
22
+ } from "./chunk-CRM7ITIY.js";
23
23
  import {
24
24
  classifyUnanswerablePane,
25
25
  findUsageLimitResetHint,
@@ -5454,4 +5454,4 @@ export {
5454
5454
  stopAllSessionsAndWait,
5455
5455
  getProjectDir
5456
5456
  };
5457
- //# sourceMappingURL=chunk-ZV4R5NVN.js.map
5457
+ //# sourceMappingURL=chunk-WU3POTSH.js.map
@@ -164,7 +164,7 @@ async function spawnPairSession(session) {
164
164
  return { ok: true };
165
165
  } catch {
166
166
  }
167
- const { resolveClaudeBinary } = await import("./persistent-session-NURJS4CF.js");
167
+ const { resolveClaudeBinary } = await import("./persistent-session-T7AGO2U3.js");
168
168
  const claudeBin = resolveClaudeBinary();
169
169
  const pairEnv = {
170
170
  ...process.env,
@@ -475,4 +475,4 @@ export {
475
475
  startClaudePair,
476
476
  submitClaudePairCode
477
477
  };
478
- //# sourceMappingURL=claude-pair-runtime-UXMP6TBO.js.map
478
+ //# sourceMappingURL=claude-pair-runtime-CCBUXYHV.js.map
@@ -63,7 +63,7 @@ import {
63
63
  safeWriteJsonAtomic,
64
64
  setConfigHash,
65
65
  tripClass
66
- } from "../chunk-FWLDKWP5.js";
66
+ } from "../chunk-W4WCFH5J.js";
67
67
  import {
68
68
  getProjectDir as getProjectDir2,
69
69
  getReadyTasks,
@@ -136,7 +136,7 @@ import {
136
136
  takeZombieDetection,
137
137
  toOpencodeModel,
138
138
  writeEgressAllowlist
139
- } from "../chunk-ZV4R5NVN.js";
139
+ } from "../chunk-WU3POTSH.js";
140
140
  import {
141
141
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
142
142
  AnchorSessionClient,
@@ -232,7 +232,7 @@ import {
232
232
  subagentActivityAgeSeconds,
233
233
  sumTranscriptUsageInWindow,
234
234
  transcriptActivityAgeSeconds
235
- } from "../chunk-K42A4EG3.js";
235
+ } from "../chunk-CRM7ITIY.js";
236
236
  import "../chunk-DHWNVVX4.js";
237
237
  import {
238
238
  reapOrphanChannelMcps
@@ -13258,7 +13258,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
13258
13258
  var dayRolloverInboundHold = /* @__PURE__ */ new Map();
13259
13259
  var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
13260
13260
  async function channelInboundActivityAgeSecondsFor(codeName) {
13261
- const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-TFYKREIL.js");
13261
+ const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-NU6NKXBT.js");
13262
13262
  const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
13263
13263
  if (newest === null) return null;
13264
13264
  return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
@@ -13943,7 +13943,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
13943
13943
  var lastVersionCheckAt = 0;
13944
13944
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
13945
13945
  var lastResponsivenessProbeAt = 0;
13946
- var agtCliVersion = true ? "0.28.956" : "dev";
13946
+ var agtCliVersion = true ? "0.28.957" : "dev";
13947
13947
  function resolveBrewPath(execFileSync2) {
13948
13948
  try {
13949
13949
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -15545,7 +15545,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
15545
15545
  if (codeNames.length === 0) return;
15546
15546
  void (async () => {
15547
15547
  try {
15548
- const { collectDiagnostics } = await import("../persistent-session-NURJS4CF.js");
15548
+ const { collectDiagnostics } = await import("../persistent-session-T7AGO2U3.js");
15549
15549
  await api.post("/host/heartbeat", {
15550
15550
  host_id: hostId,
15551
15551
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -15687,7 +15687,7 @@ async function pollCycleInner() {
15687
15687
  }
15688
15688
  try {
15689
15689
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
15690
- const { collectDiagnostics } = await import("../persistent-session-NURJS4CF.js");
15690
+ const { collectDiagnostics } = await import("../persistent-session-T7AGO2U3.js");
15691
15691
  const diagCodeNames = [...agentState.persistentSessionAgents];
15692
15692
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
15693
15693
  let tailscaleHostname;
@@ -15863,7 +15863,7 @@ async function pollCycleInner() {
15863
15863
  collectPanelessActivityProbes,
15864
15864
  getResponsivenessIntervalMs,
15865
15865
  occupancyQualificationClassifications
15866
- } = await import("../responsiveness-probe-TFYKREIL.js");
15866
+ } = await import("../responsiveness-probe-NU6NKXBT.js");
15867
15867
  const probeIntervalMs = getResponsivenessIntervalMs();
15868
15868
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
15869
15869
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -15980,7 +15980,7 @@ async function pollCycleInner() {
15980
15980
  collectResponsivenessProbes,
15981
15981
  livePendingInboundOldestAgeSeconds,
15982
15982
  parkPendingInbound
15983
- } = await import("../responsiveness-probe-TFYKREIL.js");
15983
+ } = await import("../responsiveness-probe-NU6NKXBT.js");
15984
15984
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
15985
15985
  const wedgeNow = /* @__PURE__ */ new Date();
15986
15986
  const liveAgents = agentState.persistentSessionAgents;
@@ -16136,7 +16136,7 @@ async function pollCycleInner() {
16136
16136
  }
16137
16137
  try {
16138
16138
  const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
16139
- const { probeSessionAuth } = await import("../session-auth-dead-T72P26K3.js");
16139
+ const { probeSessionAuth } = await import("../session-auth-dead-D25XBWZO.js");
16140
16140
  const observations = [];
16141
16141
  const pendingCacheCommits = [];
16142
16142
  const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
@@ -20400,7 +20400,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
20400
20400
  try {
20401
20401
  const freshId = rotateSessionForWedge(codeName);
20402
20402
  consecutiveWedgeCycles.delete(codeName);
20403
- const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-TFYKREIL.js");
20403
+ const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-NU6NKXBT.js");
20404
20404
  const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
20405
20405
  const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
20406
20406
  const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
@@ -20443,7 +20443,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
20443
20443
  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}`));
20444
20444
  void (async () => {
20445
20445
  try {
20446
- const { collectDiagnostics } = await import("../persistent-session-NURJS4CF.js");
20446
+ const { collectDiagnostics } = await import("../persistent-session-T7AGO2U3.js");
20447
20447
  await api.post("/host/heartbeat", {
20448
20448
  host_id: hostId,
20449
20449
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -20494,7 +20494,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
20494
20494
  }
20495
20495
  try {
20496
20496
  const hostId = await getHostId();
20497
- const { collectDiagnostics } = await import("../persistent-session-NURJS4CF.js");
20497
+ const { collectDiagnostics } = await import("../persistent-session-T7AGO2U3.js");
20498
20498
  await api.post("/host/heartbeat", {
20499
20499
  host_id: hostId,
20500
20500
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
@@ -21136,7 +21136,7 @@ async function processClaudePairSessions(agents) {
21136
21136
  killPairSession,
21137
21137
  pairTmuxSession,
21138
21138
  finalizeClaudePairOnboarding
21139
- } = await import("../claude-pair-runtime-UXMP6TBO.js");
21139
+ } = await import("../claude-pair-runtime-CCBUXYHV.js");
21140
21140
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
21141
21141
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
21142
21142
  const killed = await killPairSession(pairTmuxSession(pairId));
@@ -37295,6 +37295,9 @@ var PLACEHOLDER_RE = /\{([a-zA-Z_][a-zA-Z0-9_]*)\}/g;
37295
37295
  function buildHttpRequest(input) {
37296
37296
  const { tool, args, baseUrl, bearerToken, authScheme, authEncoding, requestId, extraHeaders } = input;
37297
37297
  const { method, path_template, query_template, headers_template, body_template, idempotency_key_header } = tool.http;
37298
+ rejectOptionalPlaceholder("path_template", path_template);
37299
+ for (const v of Object.values(query_template ?? {}))
37300
+ rejectOptionalPlaceholder("query_template", v);
37298
37301
  const path = templatePath(path_template, args);
37299
37302
  const query = query_template ? buildQueryString(query_template, args) : "";
37300
37303
  const url2 = joinUrl(baseUrl, path) + query;
@@ -37450,10 +37453,19 @@ function buildQueryString(template, args) {
37450
37453
  }
37451
37454
  return params.length === 0 ? "" : `?${params.join("&")}`;
37452
37455
  }
37456
+ var OPTIONAL_PLACEHOLDER_RE = /\{\?([a-zA-Z_][a-zA-Z0-9_]*)\}/;
37457
+ function rejectOptionalPlaceholder(field, template) {
37458
+ if (typeof template === "string" && OPTIONAL_PLACEHOLDER_RE.test(template)) {
37459
+ throw new TemplateError(`optional placeholder ${template.match(OPTIONAL_PLACEHOLDER_RE)[0]} is not supported in ${field} (only as the whole value of an object property in body_template)`);
37460
+ }
37461
+ }
37453
37462
  function expandBodyTemplate(template, args) {
37454
37463
  if (template === "{$body}")
37455
37464
  return args;
37456
37465
  if (typeof template === "string") {
37466
+ if (OPTIONAL_PLACEHOLDER_RE.test(template)) {
37467
+ throw new TemplateError(`optional placeholder ${template.match(OPTIONAL_PLACEHOLDER_RE)[0]} is only valid as the whole value of an object property in body_template (got "${template}")`);
37468
+ }
37457
37469
  return template.replace(PLACEHOLDER_RE, (_full, key) => {
37458
37470
  const v = args[key];
37459
37471
  if (v === void 0 || v === null)
@@ -37470,6 +37482,15 @@ function expandBodyTemplate(template, args) {
37470
37482
  if (template && typeof template === "object") {
37471
37483
  const out = {};
37472
37484
  for (const [k, v] of Object.entries(template)) {
37485
+ if (typeof v === "string") {
37486
+ const optionalMatch = v.match(/^\{\?([a-zA-Z_][a-zA-Z0-9_]*)\}$/);
37487
+ if (optionalMatch && optionalMatch[1] !== void 0) {
37488
+ const value = args[optionalMatch[1]];
37489
+ if (value !== void 0 && value !== null)
37490
+ out[k] = value;
37491
+ continue;
37492
+ }
37493
+ }
37473
37494
  if (typeof v === "string") {
37474
37495
  const wholeMatch = v.match(/^\{([a-zA-Z_][a-zA-Z0-9_]*)\}$/);
37475
37496
  if (wholeMatch && wholeMatch[1] !== void 0 && wholeMatch[1] in args) {
@@ -62,8 +62,8 @@ import {
62
62
  writeDirectChatSessionState,
63
63
  writeEgressAllowlist,
64
64
  writePersistentClaudeWrapper
65
- } from "./chunk-ZV4R5NVN.js";
66
- import "./chunk-K42A4EG3.js";
65
+ } from "./chunk-WU3POTSH.js";
66
+ import "./chunk-CRM7ITIY.js";
67
67
  import "./chunk-DHWNVVX4.js";
68
68
  import "./chunk-XWVM4KPK.js";
69
69
  export {
@@ -131,4 +131,4 @@ export {
131
131
  writeEgressAllowlist,
132
132
  writePersistentClaudeWrapper
133
133
  };
134
- //# sourceMappingURL=persistent-session-NURJS4CF.js.map
134
+ //# sourceMappingURL=persistent-session-T7AGO2U3.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-ZV4R5NVN.js";
4
- import "./chunk-K42A4EG3.js";
3
+ } from "./chunk-WU3POTSH.js";
4
+ import "./chunk-CRM7ITIY.js";
5
5
  import "./chunk-DHWNVVX4.js";
6
6
  import "./chunk-XWVM4KPK.js";
7
7
 
@@ -800,4 +800,4 @@ export {
800
800
  readAndResetSlackReplyBindingClassifications,
801
801
  readAndResetSlackReplyTargetClassifications
802
802
  };
803
- //# sourceMappingURL=responsiveness-probe-TFYKREIL.js.map
803
+ //# sourceMappingURL=responsiveness-probe-NU6NKXBT.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sessionTranscriptDir
3
- } from "./chunk-K42A4EG3.js";
3
+ } from "./chunk-CRM7ITIY.js";
4
4
 
5
5
  // src/lib/session-auth-dead.ts
6
6
  import { closeSync, openSync, readSync, readdirSync, statSync } from "fs";
@@ -203,4 +203,4 @@ export {
203
203
  decideSessionAuthState,
204
204
  probeSessionAuth
205
205
  };
206
- //# sourceMappingURL=session-auth-dead-T72P26K3.js.map
206
+ //# sourceMappingURL=session-auth-dead-D25XBWZO.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.956",
3
+ "version": "0.28.957",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {