@integrity-labs/agt-cli 0.28.182 → 0.28.184

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.
@@ -3,7 +3,7 @@ import {
3
3
  formatMissingVar,
4
4
  isClaudeFastMode,
5
5
  probeMcpEnvSubstitution
6
- } from "./chunk-K362KMGY.js";
6
+ } from "./chunk-K2N44EUC.js";
7
7
  import {
8
8
  reapOrphanChannelMcps
9
9
  } from "./chunk-XWVM4KPK.js";
@@ -1588,4 +1588,4 @@ export {
1588
1588
  stopAllSessionsAndWait,
1589
1589
  getProjectDir
1590
1590
  };
1591
- //# sourceMappingURL=chunk-IQWTBKND.js.map
1591
+ //# sourceMappingURL=chunk-RLDZLSML.js.map
@@ -16,7 +16,7 @@ import {
16
16
  resolveConnectivityProbe,
17
17
  worseConnectivityOutcome,
18
18
  wrapScheduledTaskPrompt
19
- } from "./chunk-K362KMGY.js";
19
+ } from "./chunk-K2N44EUC.js";
20
20
 
21
21
  // ../../packages/core/dist/provisioning/mcp-config-guards.js
22
22
  import { chmodSync, existsSync, readFileSync, renameSync, writeFileSync, unlinkSync } from "fs";
@@ -6120,7 +6120,7 @@ function requireHost() {
6120
6120
  }
6121
6121
 
6122
6122
  // src/lib/api-client.ts
6123
- var agtCliVersion = true ? "0.28.182" : "dev";
6123
+ var agtCliVersion = true ? "0.28.184" : "dev";
6124
6124
  var lastConfigHash = null;
6125
6125
  function setConfigHash(hash) {
6126
6126
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -7425,4 +7425,4 @@ export {
7425
7425
  managerInstallSystemUnitCommand,
7426
7426
  managerUninstallSystemUnitCommand
7427
7427
  };
7428
- //# sourceMappingURL=chunk-GF5CAKEY.js.map
7428
+ //# sourceMappingURL=chunk-YYIBKSSD.js.map
@@ -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-B5MUD4ER.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-KBZFQ7SX.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-7YQEUJFL.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-COEJFJJX.js.map
@@ -28,7 +28,7 @@ import {
28
28
  requireHost,
29
29
  safeWriteJsonAtomic,
30
30
  setConfigHash
31
- } from "../chunk-GF5CAKEY.js";
31
+ } from "../chunk-YYIBKSSD.js";
32
32
  import {
33
33
  getProjectDir as getProjectDir2,
34
34
  getReadyTasks,
@@ -70,7 +70,7 @@ import {
70
70
  takeZombieDetection,
71
71
  transcriptActivityAgeSeconds,
72
72
  writeEgressAllowlist
73
- } from "../chunk-IQWTBKND.js";
73
+ } from "../chunk-RLDZLSML.js";
74
74
  import {
75
75
  CONVERSATION_FAILURE_CATEGORIES,
76
76
  DEFAULT_FRAMEWORK,
@@ -111,7 +111,7 @@ import {
111
111
  resolveChannels,
112
112
  resolveDmTarget,
113
113
  sumTranscriptUsageInWindow
114
- } from "../chunk-K362KMGY.js";
114
+ } from "../chunk-K2N44EUC.js";
115
115
  import {
116
116
  parsePsRows,
117
117
  reapOrphanChannelMcps
@@ -6596,7 +6596,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
6596
6596
  var lastVersionCheckAt = 0;
6597
6597
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
6598
6598
  var lastResponsivenessProbeAt = 0;
6599
- var agtCliVersion = true ? "0.28.182" : "dev";
6599
+ var agtCliVersion = true ? "0.28.184" : "dev";
6600
6600
  function resolveBrewPath(execFileSync4) {
6601
6601
  try {
6602
6602
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -7489,7 +7489,7 @@ async function pollCycle() {
7489
7489
  }
7490
7490
  try {
7491
7491
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
7492
- const { collectDiagnostics } = await import("../persistent-session-B5MUD4ER.js");
7492
+ const { collectDiagnostics } = await import("../persistent-session-KBZFQ7SX.js");
7493
7493
  const diagCodeNames = [...agentState.persistentSessionAgents];
7494
7494
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
7495
7495
  let tailscaleHostname;
@@ -7637,7 +7637,7 @@ async function pollCycle() {
7637
7637
  const {
7638
7638
  collectResponsivenessProbes,
7639
7639
  getResponsivenessIntervalMs
7640
- } = await import("../responsiveness-probe-H4KS4QDK.js");
7640
+ } = await import("../responsiveness-probe-O4F7H7IB.js");
7641
7641
  const probeIntervalMs = getResponsivenessIntervalMs();
7642
7642
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
7643
7643
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -7669,7 +7669,7 @@ async function pollCycle() {
7669
7669
  collectResponsivenessProbes,
7670
7670
  livePendingInboundOldestAgeSeconds,
7671
7671
  parkPendingInbound
7672
- } = await import("../responsiveness-probe-H4KS4QDK.js");
7672
+ } = await import("../responsiveness-probe-O4F7H7IB.js");
7673
7673
  const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
7674
7674
  const wedgeNow = /* @__PURE__ */ new Date();
7675
7675
  const liveAgents = agentState.persistentSessionAgents;
@@ -10644,7 +10644,7 @@ async function processClaudePairSessions(agents) {
10644
10644
  killPairSession,
10645
10645
  pairTmuxSession,
10646
10646
  finalizeClaudePairOnboarding
10647
- } = await import("../claude-pair-runtime-7YQEUJFL.js");
10647
+ } = await import("../claude-pair-runtime-COEJFJJX.js");
10648
10648
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
10649
10649
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
10650
10650
  const killed = await killPairSession(pairTmuxSession(pairId));
@@ -21138,6 +21138,15 @@ var SupportClient = class _SupportClient {
21138
21138
  listAudit(args = {}) {
21139
21139
  return this.get("/host/support/audit", _SupportClient.cleanQuery(args));
21140
21140
  }
21141
+ // ─────────────────────── knowledge base (ENG-7119) ───────────────────────
21142
+ // Org-lock EXEMPT: these hit /host/kb (hostAuth, NOT org-locked) — the shared,
21143
+ // published, org-neutral help. No argument names a scope.
21144
+ searchKnowledgeBase(args) {
21145
+ return this.get("/host/kb/search", _SupportClient.cleanQuery({ q: args.query, limit: args.limit }));
21146
+ }
21147
+ readKbArticle(args) {
21148
+ return this.get(`/host/kb/article/${encodeURIComponent(args.slug)}`);
21149
+ }
21141
21150
  // ─────────────────────── intake + writes (ENG-7000/7001) ───────────────────────
21142
21151
  fileSupportRequest(args) {
21143
21152
  return this.post("/host/support/file_support_request", args, true);
@@ -21160,6 +21169,13 @@ var fileRequestSchema = external_exports.object({
21160
21169
  description: external_exports.string().min(1).describe("Full detail: what happened / what is wanted, and any reproduction steps."),
21161
21170
  provider: external_exports.string().optional().describe('Optional provider/service name when asking for a new integration (e.g. "notion").')
21162
21171
  });
21172
+ var searchKbSchema = external_exports.object({
21173
+ query: external_exports.string().trim().min(1).describe('What to look up in the knowledge base (e.g. "agent keeps restarting", "connect Slack").'),
21174
+ limit: external_exports.number().int().positive().optional().describe("Max results to return (page size, clamped server-side).")
21175
+ });
21176
+ var readKbSchema = external_exports.object({
21177
+ slug: external_exports.string().trim().min(1).describe("The kebab-case article slug returned by search_knowledge_base.")
21178
+ });
21163
21179
  var createAgentSchema = external_exports.object({
21164
21180
  code_name: external_exports.string().regex(
21165
21181
  /^[a-z0-9]+(?:-[a-z0-9]+)*$/,
@@ -21318,6 +21334,30 @@ server.tool(
21318
21334
  }
21319
21335
  }
21320
21336
  );
21337
+ server.tool(
21338
+ "search_knowledge_base",
21339
+ "Search the Augmented knowledge base for help on a question BEFORE answering from memory or filing a request \u2014 it is the curated, up-to-date source of answers (how-tos, common fixes, FAQs). Returns ranked hits with { slug, title, tags, snippet }; call read_kb_article with a slug to get the full article. The KB is shared platform help, the same for every organization (it holds nothing org-specific), so this takes no scope. Pass { query, limit? }.",
21340
+ searchKbSchema.shape,
21341
+ async (args) => {
21342
+ try {
21343
+ return ok(await client.searchKnowledgeBase(args));
21344
+ } catch (err) {
21345
+ return fail(err);
21346
+ }
21347
+ }
21348
+ );
21349
+ server.tool(
21350
+ "read_kb_article",
21351
+ "Fetch the full published knowledge-base article for a slug returned by search_knowledge_base. Returns { article: { slug, title, body_md, tags, published_at } } or a 404 if no published article has that slug. Use the body to answer the user. Pass { slug }.",
21352
+ readKbSchema.shape,
21353
+ async (args) => {
21354
+ try {
21355
+ return ok(await client.readKbArticle(args));
21356
+ } catch (err) {
21357
+ return fail(err);
21358
+ }
21359
+ }
21360
+ );
21321
21361
  server.tool(
21322
21362
  "support_file_support_request",
21323
21363
  "File a BUG report to Augmented Team support when you hit a platform problem you cannot resolve from your own org (it goes to the Augmented Team support queue, not your org). Pass { title, description }. Returns { ok, status } - relay the outcome to the user.",
@@ -19631,6 +19631,10 @@ async function handleCallbackQuery(cb) {
19631
19631
  });
19632
19632
  return;
19633
19633
  }
19634
+ if (decoded.token.startsWith(PERF_REVIEW_TOKEN_PREFIX)) {
19635
+ await handlePerfReviewTap(cb, decoded.callbackId, decoded.token);
19636
+ return;
19637
+ }
19634
19638
  await ackCallbackQuery(cb.id, "Got it").catch(() => {
19635
19639
  });
19636
19640
  const apiCallRuntime = await Promise.resolve().then(() => (init_ask_user_runtime(), ask_user_runtime_exports));
@@ -19696,6 +19700,81 @@ async function handleCallbackQuery(cb) {
19696
19700
  void confirmationLabel;
19697
19701
  }
19698
19702
  }
19703
+ var PERF_REVIEW_TOKEN_PREFIX = "pr_";
19704
+ var PERF_REVIEW_COMMENT_TOKEN = "pr_comment";
19705
+ var PERF_REVIEW_REF_RE = /\[review:([0-9a-f-]{36})\]/;
19706
+ function perfReviewRefMarker(reviewId) {
19707
+ return `[review:${reviewId}]`;
19708
+ }
19709
+ async function handlePerfReviewTap(cb, reviewId, token) {
19710
+ if (token === PERF_REVIEW_COMMENT_TOKEN) {
19711
+ await ackCallbackQuery(cb.id, "Reply with your feedback").catch(() => {
19712
+ });
19713
+ if (cb.message) {
19714
+ try {
19715
+ const resp = await telegramApiCall(
19716
+ "sendMessage",
19717
+ {
19718
+ chat_id: cb.message.chat.id,
19719
+ text: `Reply to this message with any feedback for me.
19720
+
19721
+ ${perfReviewRefMarker(reviewId)}`,
19722
+ reply_markup: { force_reply: true, input_field_placeholder: "Your feedback\u2026" }
19723
+ },
19724
+ 5e3
19725
+ );
19726
+ if (!resp.ok) {
19727
+ process.stderr.write(
19728
+ `telegram-channel(${AGENT_CODE_NAME}): perf-review comment prompt non-ok (review_id=${reviewId}): ${resp.description ?? "unknown"}
19729
+ `
19730
+ );
19731
+ }
19732
+ } catch (err) {
19733
+ process.stderr.write(
19734
+ `telegram-channel(${AGENT_CODE_NAME}): perf-review comment prompt threw (review_id=${reviewId}): ${err.message}
19735
+ `
19736
+ );
19737
+ }
19738
+ }
19739
+ return;
19740
+ }
19741
+ const ok = await postPerfReviewResolve(reviewId, token, String(cb.from.id));
19742
+ await ackCallbackQuery(cb.id, ok ? "Recorded \u2713" : "Could not record your rating").catch(() => {
19743
+ });
19744
+ }
19745
+ async function postPerfReviewResolve(reviewId, token, respondedByUser, comment) {
19746
+ if (!channelRequestInputAvailable()) return false;
19747
+ const apiCallRuntime = await Promise.resolve().then(() => (init_ask_user_runtime(), ask_user_runtime_exports));
19748
+ const cfg = {
19749
+ apiHost: AGT_HOST,
19750
+ apiKey: AGT_API_KEY,
19751
+ agentId: AGT_AGENT_ID
19752
+ };
19753
+ try {
19754
+ const res = await apiCallRuntime.apiCall(cfg, "POST", "/host/perf-review/resolve", {
19755
+ agent_id: cfg.agentId,
19756
+ review_id: reviewId,
19757
+ token,
19758
+ ...comment !== void 0 ? { comment } : {},
19759
+ responded_by_user: respondedByUser
19760
+ });
19761
+ const j = await res.json().catch(() => ({}));
19762
+ if (!res.ok || !j.ok) {
19763
+ process.stderr.write(
19764
+ `telegram-channel(${AGENT_CODE_NAME}): /host/perf-review/resolve non-ok (review_id=${reviewId}, http=${res.status}, reason=${j.reason ?? "unknown"})
19765
+ `
19766
+ );
19767
+ return false;
19768
+ }
19769
+ return j.recorded === true;
19770
+ } catch (err) {
19771
+ process.stderr.write(
19772
+ `telegram-channel(${AGENT_CODE_NAME}): /host/perf-review/resolve threw (review_id=${reviewId}): ${err.message}
19773
+ `
19774
+ );
19775
+ return false;
19776
+ }
19777
+ }
19699
19778
  async function ackCallbackQuery(callbackQueryId, text) {
19700
19779
  try {
19701
19780
  const resp = await telegramApiCall(
@@ -19923,6 +20002,16 @@ async function pollLoop() {
19923
20002
  }
19924
20003
  const msg = update.message;
19925
20004
  if (!msg) continue;
20005
+ const perfReplyRef = typeof msg.text === "string" && msg.text.trim().length > 0 && msg.reply_to_message?.from?.is_bot === true && msg.reply_to_message?.text ? PERF_REVIEW_REF_RE.exec(msg.reply_to_message.text) : null;
20006
+ if (perfReplyRef && msg.from?.id != null) {
20007
+ await postPerfReviewResolve(
20008
+ perfReplyRef[1],
20009
+ PERF_REVIEW_COMMENT_TOKEN,
20010
+ String(msg.from.id),
20011
+ msg.text.trim()
20012
+ );
20013
+ continue;
20014
+ }
19926
20015
  const classifiedAttachments = classifyTelegramAttachments(msg);
19927
20016
  const content = typeof msg.text === "string" && msg.text.length > 0 ? msg.text : typeof msg.caption === "string" && msg.caption.length > 0 ? msg.caption : "";
19928
20017
  if (content.length === 0 && classifiedAttachments.length === 0) continue;
@@ -34,8 +34,8 @@ import {
34
34
  writeDirectChatSessionState,
35
35
  writeEgressAllowlist,
36
36
  writePersistentClaudeWrapper
37
- } from "./chunk-IQWTBKND.js";
38
- import "./chunk-K362KMGY.js";
37
+ } from "./chunk-RLDZLSML.js";
38
+ import "./chunk-K2N44EUC.js";
39
39
  import "./chunk-XWVM4KPK.js";
40
40
  export {
41
41
  EGRESS_BASELINE_DOMAINS,
@@ -74,4 +74,4 @@ export {
74
74
  writeEgressAllowlist,
75
75
  writePersistentClaudeWrapper
76
76
  };
77
- //# sourceMappingURL=persistent-session-B5MUD4ER.js.map
77
+ //# sourceMappingURL=persistent-session-KBZFQ7SX.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-IQWTBKND.js";
4
- import "./chunk-K362KMGY.js";
3
+ } from "./chunk-RLDZLSML.js";
4
+ import "./chunk-K2N44EUC.js";
5
5
  import "./chunk-XWVM4KPK.js";
6
6
 
7
7
  // src/lib/responsiveness-probe.ts
@@ -304,4 +304,4 @@ export {
304
304
  readAndResetChannelDeflections,
305
305
  readAndResetChannelLaneClassifications
306
306
  };
307
- //# sourceMappingURL=responsiveness-probe-H4KS4QDK.js.map
307
+ //# sourceMappingURL=responsiveness-probe-O4F7H7IB.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.182",
3
+ "version": "0.28.184",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {