@integrity-labs/agt-cli 0.28.463 → 0.28.464

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
@@ -40,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-VCZNGC6J.js";
43
+ } from "../chunk-Q5GHZOXL.js";
44
44
  import {
45
45
  AnchorSessionClient,
46
46
  CHANNEL_REGISTRY,
@@ -4830,7 +4830,7 @@ import { execFileSync, execSync } from "child_process";
4830
4830
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4831
4831
  import chalk18 from "chalk";
4832
4832
  import ora16 from "ora";
4833
- var cliVersion = true ? "0.28.463" : "dev";
4833
+ var cliVersion = true ? "0.28.464" : "dev";
4834
4834
  async function fetchLatestVersion() {
4835
4835
  const host2 = getHost();
4836
4836
  if (!host2) return null;
@@ -6002,7 +6002,7 @@ function handleError(err) {
6002
6002
  }
6003
6003
 
6004
6004
  // src/bin/agt.ts
6005
- var cliVersion2 = true ? "0.28.463" : "dev";
6005
+ var cliVersion2 = true ? "0.28.464" : "dev";
6006
6006
  var program = new Command();
6007
6007
  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");
6008
6008
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -4911,7 +4911,7 @@ function requireHost() {
4911
4911
  }
4912
4912
 
4913
4913
  // src/lib/api-client.ts
4914
- var agtCliVersion = true ? "0.28.463" : "dev";
4914
+ var agtCliVersion = true ? "0.28.464" : "dev";
4915
4915
  var lastConfigHash = null;
4916
4916
  function setConfigHash(hash) {
4917
4917
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -7595,4 +7595,4 @@ export {
7595
7595
  managerInstallSystemUnitCommand,
7596
7596
  managerUninstallSystemUnitCommand
7597
7597
  };
7598
- //# sourceMappingURL=chunk-VCZNGC6J.js.map
7598
+ //# sourceMappingURL=chunk-Q5GHZOXL.js.map
@@ -42,7 +42,7 @@ import {
42
42
  resolveEffectivePinRaw,
43
43
  safeWriteJsonAtomic,
44
44
  setConfigHash
45
- } from "../chunk-VCZNGC6J.js";
45
+ } from "../chunk-Q5GHZOXL.js";
46
46
  import {
47
47
  getProjectDir as getProjectDir2,
48
48
  getReadyTasks,
@@ -9976,7 +9976,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
9976
9976
  var lastVersionCheckAt = 0;
9977
9977
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
9978
9978
  var lastResponsivenessProbeAt = 0;
9979
- var agtCliVersion = true ? "0.28.463" : "dev";
9979
+ var agtCliVersion = true ? "0.28.464" : "dev";
9980
9980
  function resolveBrewPath(execFileSync2) {
9981
9981
  try {
9982
9982
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -37291,6 +37291,37 @@ function emitTransientApiErrorTelemetry(channel, match, original) {
37291
37291
  }
37292
37292
  }
37293
37293
 
37294
+ // src/strip-url-wrapping-asterisks.ts
37295
+ var URL_WITH_ASTERISKS = /(\*+)?(?<!<)(https?:\/\/[^\s*]+)(\*+)?/gi;
37296
+ function stripUrlWrappingAsterisks(text) {
37297
+ if (!text || !text.includes("*") || !/https?:\/\//i.test(text)) {
37298
+ return { text, stripped: false, count: 0 };
37299
+ }
37300
+ let count = 0;
37301
+ const out = text.replace(URL_WITH_ASTERISKS, (match, lead, url, trail) => {
37302
+ if (!lead && !trail) return match;
37303
+ const keepLead = lead && !trail ? lead : "";
37304
+ const rebuilt = keepLead + url;
37305
+ if (rebuilt !== match) count++;
37306
+ return rebuilt;
37307
+ });
37308
+ return { text: out, stripped: count > 0, count };
37309
+ }
37310
+ function emitUrlAsteriskStripTelemetry(channel, count = 0) {
37311
+ const agentCode = process.env.AGT_AGENT_CODE_NAME ?? "unknown";
37312
+ try {
37313
+ process.stderr.write(
37314
+ `agt.egress.url_wrapping_asterisks_stripped ${JSON.stringify({
37315
+ channel,
37316
+ agent_code: agentCode,
37317
+ count
37318
+ })}
37319
+ `
37320
+ );
37321
+ } catch {
37322
+ }
37323
+ }
37324
+
37294
37325
  // src/slack-pending-inbound-cleanup.ts
37295
37326
  import { existsSync as existsSync4, readdirSync as readdirSync4, statSync as statSync3, unlinkSync } from "fs";
37296
37327
  import { join as join10 } from "path";
@@ -40670,7 +40701,9 @@ async function processSlackRecoveryOutboxFile(filename) {
40670
40701
  if (recoveredGuarded.redacted) emitToolCallMarkupRedactionTelemetry("slack");
40671
40702
  const apiErr = rewriteTransientApiError(recoveredGuarded.text);
40672
40703
  if (apiErr.rewritten) emitTransientApiErrorTelemetry("slack", apiErr.match, apiErr.original);
40673
- const text = apiErr.text;
40704
+ const urlFixed = stripUrlWrappingAsterisks(apiErr.text);
40705
+ if (urlFixed.stripped) emitUrlAsteriskStripTelemetry("slack", urlFixed.count);
40706
+ const text = urlFixed.text;
40674
40707
  const ghostReplyMode = resolveGhostReplyMode();
40675
40708
  if (ghostReplyMode !== "off") {
40676
40709
  const decision = await decideRecovery(text, ghostReplyMode);
@@ -43170,6 +43203,8 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
43170
43203
  if (sanitizedGuarded.redacted) emitToolCallMarkupRedactionTelemetry("slack");
43171
43204
  const apiErr = rewriteTransientApiError(sanitizedGuarded.text);
43172
43205
  if (apiErr.rewritten) emitTransientApiErrorTelemetry("slack", apiErr.match, apiErr.original);
43206
+ const urlFixed = stripUrlWrappingAsterisks(apiErr.text);
43207
+ if (urlFixed.stripped) emitUrlAsteriskStripTelemetry("slack", urlFixed.count);
43173
43208
  try {
43174
43209
  const res = await fetch("https://slack.com/api/chat.postMessage", {
43175
43210
  method: "POST",
@@ -43179,7 +43214,7 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
43179
43214
  },
43180
43215
  body: JSON.stringify({
43181
43216
  channel: effectiveChannel,
43182
- text: apiErr.text,
43217
+ text: urlFixed.text,
43183
43218
  ...effectiveThreadTs ? { thread_ts: effectiveThreadTs } : {},
43184
43219
  ...buildAugmentedSlackMetadata() ? { metadata: buildAugmentedSlackMetadata() } : {}
43185
43220
  // ↑ Labels this message as Augmented-agent-originated so peer agents
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.463",
3
+ "version": "0.28.464",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {