@integrity-labs/agt-cli 0.28.755 → 0.28.756

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.
package/dist/bin/agt.js CHANGED
@@ -41,7 +41,7 @@ import {
41
41
  success,
42
42
  table,
43
43
  warn
44
- } from "../chunk-3PIEDU3Z.js";
44
+ } from "../chunk-UFL5XDJF.js";
45
45
  import {
46
46
  getProjectDir,
47
47
  isSessionResumeDisabled,
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
5467
5467
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5468
5468
  import chalk18 from "chalk";
5469
5469
  import ora16 from "ora";
5470
- var cliVersion = true ? "0.28.755" : "dev";
5470
+ var cliVersion = true ? "0.28.756" : "dev";
5471
5471
  async function fetchLatestVersion() {
5472
5472
  const host2 = getHost();
5473
5473
  if (!host2) return null;
@@ -6658,7 +6658,7 @@ function handleError(err) {
6658
6658
  }
6659
6659
 
6660
6660
  // src/bin/agt.ts
6661
- var cliVersion2 = true ? "0.28.755" : "dev";
6661
+ var cliVersion2 = true ? "0.28.756" : "dev";
6662
6662
  var program = new Command();
6663
6663
  program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
6664
6664
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -6436,7 +6436,7 @@ function exchangeFailureKind(err) {
6436
6436
  }
6437
6437
 
6438
6438
  // src/lib/api-client.ts
6439
- var agtCliVersion = true ? "0.28.755" : "dev";
6439
+ var agtCliVersion = true ? "0.28.756" : "dev";
6440
6440
  var lastConfigHash = null;
6441
6441
  function setConfigHash(hash) {
6442
6442
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -10593,4 +10593,4 @@ export {
10593
10593
  managerInstallSystemUnitCommand,
10594
10594
  managerUninstallSystemUnitCommand
10595
10595
  };
10596
- //# sourceMappingURL=chunk-3PIEDU3Z.js.map
10596
+ //# sourceMappingURL=chunk-UFL5XDJF.js.map
@@ -58,7 +58,7 @@ import {
58
58
  safeWriteJsonAtomic,
59
59
  setConfigHash,
60
60
  tripClass
61
- } from "../chunk-3PIEDU3Z.js";
61
+ } from "../chunk-UFL5XDJF.js";
62
62
  import {
63
63
  getProjectDir as getProjectDir2,
64
64
  getReadyTasks,
@@ -13385,7 +13385,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
13385
13385
  var lastVersionCheckAt = 0;
13386
13386
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
13387
13387
  var lastResponsivenessProbeAt = 0;
13388
- var agtCliVersion = true ? "0.28.755" : "dev";
13388
+ var agtCliVersion = true ? "0.28.756" : "dev";
13389
13389
  function resolveBrewPath(execFileSync3) {
13390
13390
  try {
13391
13391
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -39550,6 +39550,72 @@ function emitMarkdownToMrkdwnTelemetry(channel, links = 0, images = 0) {
39550
39550
  }
39551
39551
  }
39552
39552
 
39553
+ // src/decode-html-entities.ts
39554
+ var RESERVED_CODE_POINTS = /* @__PURE__ */ new Set([38, 60, 62]);
39555
+ var NAMED = {
39556
+ mdash: "\u2014",
39557
+ ndash: "\u2013",
39558
+ nbsp: " ",
39559
+ hellip: "\u2026",
39560
+ lsquo: "\u2018",
39561
+ rsquo: "\u2019",
39562
+ ldquo: "\u201C",
39563
+ rdquo: "\u201D",
39564
+ bull: "\u2022",
39565
+ middot: "\xB7",
39566
+ times: "\xD7",
39567
+ trade: "\u2122",
39568
+ copy: "\xA9",
39569
+ reg: "\xAE",
39570
+ deg: "\xB0",
39571
+ laquo: "\xAB",
39572
+ raquo: "\xBB",
39573
+ quot: '"',
39574
+ apos: "'"
39575
+ };
39576
+ var ENTITY = /&(?:amp;)*(?:#(x?)([0-9a-f]+)|([a-z][a-z0-9]{1,10}));/gi;
39577
+ function decodeHtmlEntities(text) {
39578
+ if (!text || !text.includes("&")) return { text, decoded: false, count: 0 };
39579
+ let count = 0;
39580
+ const out = segmentByCode(text).map((segment) => segment.code ? segment.text : decodeRun(segment.text, () => count++)).join("");
39581
+ return { text: out, decoded: count > 0, count };
39582
+ }
39583
+ function decodeRun(text, tally) {
39584
+ return text.replace(
39585
+ ENTITY,
39586
+ (match, hex, digits, name) => {
39587
+ if (digits !== void 0) {
39588
+ const cp = Number.parseInt(digits, hex ? 16 : 10);
39589
+ if (!Number.isFinite(cp) || cp <= 0 || cp > 1114111) return match;
39590
+ if (RESERVED_CODE_POINTS.has(cp)) return match;
39591
+ if (cp < 32 || cp >= 127 && cp <= 159) return match;
39592
+ if (cp >= 55296 && cp <= 57343) return match;
39593
+ tally();
39594
+ return String.fromCodePoint(cp);
39595
+ }
39596
+ if (name === void 0) return match;
39597
+ const replacement = NAMED[name.toLowerCase()];
39598
+ if (replacement === void 0) return match;
39599
+ tally();
39600
+ return replacement;
39601
+ }
39602
+ );
39603
+ }
39604
+ function emitHtmlEntityDecodeTelemetry(channel, count = 0) {
39605
+ const agentCode = process.env.AGT_AGENT_CODE_NAME ?? "unknown";
39606
+ try {
39607
+ process.stderr.write(
39608
+ `agt.egress.html_entities_decoded ${JSON.stringify({
39609
+ channel,
39610
+ agent_code: agentCode,
39611
+ count
39612
+ })}
39613
+ `
39614
+ );
39615
+ } catch {
39616
+ }
39617
+ }
39618
+
39553
39619
  // src/slack-pending-inbound-cleanup.ts
39554
39620
  import { existsSync as existsSync4, readdirSync as readdirSync4, statSync as statSync3, unlinkSync } from "fs";
39555
39621
  import { join as join9 } from "path";
@@ -43188,7 +43254,9 @@ async function processSlackRecoveryOutboxFile(filename) {
43188
43254
  if (recoveredGuarded.redacted) emitToolCallMarkupRedactionTelemetry("slack");
43189
43255
  const apiErr = rewriteTransientApiError(recoveredGuarded.text);
43190
43256
  if (apiErr.rewritten) emitTransientApiErrorTelemetry("slack", apiErr.match, apiErr.original);
43191
- const mrkdwn = markdownToMrkdwn(apiErr.text);
43257
+ const entities = decodeHtmlEntities(apiErr.text);
43258
+ if (entities.decoded) emitHtmlEntityDecodeTelemetry("slack", entities.count);
43259
+ const mrkdwn = markdownToMrkdwn(entities.text);
43192
43260
  if (mrkdwn.converted) emitMarkdownToMrkdwnTelemetry("slack", mrkdwn.links, mrkdwn.images);
43193
43261
  const urlFixed = stripUrlWrappingAsterisks(mrkdwn.text);
43194
43262
  if (urlFixed.stripped) emitUrlAsteriskStripTelemetry("slack", urlFixed.count);
@@ -45790,7 +45858,9 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
45790
45858
  if (sanitizedGuarded.redacted) emitToolCallMarkupRedactionTelemetry("slack");
45791
45859
  const apiErr = rewriteTransientApiError(sanitizedGuarded.text);
45792
45860
  if (apiErr.rewritten) emitTransientApiErrorTelemetry("slack", apiErr.match, apiErr.original);
45793
- const mrkdwn = markdownToMrkdwn(apiErr.text);
45861
+ const entities = decodeHtmlEntities(apiErr.text);
45862
+ if (entities.decoded) emitHtmlEntityDecodeTelemetry("slack", entities.count);
45863
+ const mrkdwn = markdownToMrkdwn(entities.text);
45794
45864
  if (mrkdwn.converted) emitMarkdownToMrkdwnTelemetry("slack", mrkdwn.links, mrkdwn.images);
45795
45865
  const urlFixed = stripUrlWrappingAsterisks(mrkdwn.text);
45796
45866
  if (urlFixed.stripped) emitUrlAsteriskStripTelemetry("slack", urlFixed.count);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.755",
3
+ "version": "0.28.756",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {