@integrity-labs/agt-cli 0.27.154 → 0.27.156

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
@@ -28,7 +28,7 @@ import {
28
28
  success,
29
29
  table,
30
30
  warn
31
- } from "../chunk-ELCLXTJI.js";
31
+ } from "../chunk-25VLOVMK.js";
32
32
  import {
33
33
  CHANNEL_REGISTRY,
34
34
  DEPLOYMENT_TEMPLATES,
@@ -54,7 +54,7 @@ import {
54
54
  renderTemplate,
55
55
  resolveChannels,
56
56
  serializeManifestForSlackCli
57
- } from "../chunk-FZTGR2AQ.js";
57
+ } from "../chunk-3X6V4SVW.js";
58
58
 
59
59
  // src/bin/agt.ts
60
60
  import { join as join20 } from "path";
@@ -4941,7 +4941,7 @@ import { execFileSync, execSync } from "child_process";
4941
4941
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4942
4942
  import chalk18 from "chalk";
4943
4943
  import ora16 from "ora";
4944
- var cliVersion = true ? "0.27.154" : "dev";
4944
+ var cliVersion = true ? "0.27.156" : "dev";
4945
4945
  async function fetchLatestVersion() {
4946
4946
  const host2 = getHost();
4947
4947
  if (!host2) return null;
@@ -5864,7 +5864,7 @@ function handleError(err) {
5864
5864
  }
5865
5865
 
5866
5866
  // src/bin/agt.ts
5867
- var cliVersion2 = true ? "0.27.154" : "dev";
5867
+ var cliVersion2 = true ? "0.27.156" : "dev";
5868
5868
  var program = new Command();
5869
5869
  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");
5870
5870
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -10,7 +10,7 @@ import {
10
10
  registerFramework,
11
11
  resolveAvatarEnvUrl,
12
12
  wrapScheduledTaskPrompt
13
- } from "./chunk-FZTGR2AQ.js";
13
+ } from "./chunk-3X6V4SVW.js";
14
14
 
15
15
  // ../../packages/core/dist/integrations/registry.js
16
16
  var INTEGRATION_REGISTRY = [
@@ -4413,6 +4413,7 @@ function provisionStopHook(codeName) {
4413
4413
  ].join("\n") + "\n";
4414
4414
  writeFileSync5(hookScriptPath, hookScript, { mode: 493 });
4415
4415
  const ghostHookPath = join4(claudeDir, "agt-ghost-reply-hook.sh");
4416
+ const jqNormalizeContent = '(.message.content // .content // []) | if type == "string" then [{type: "text", text: .}] elif type == "array" then . else [] end';
4416
4417
  const ghostHookScript = [
4417
4418
  "#!/bin/bash",
4418
4419
  "# Auto-generated by Augmented (ENG-4569) \u2014 detects ghost replies and",
@@ -4453,17 +4454,24 @@ function provisionStopHook(codeName) {
4453
4454
  'if [ "$TG_PENDING" = "0" ] && [ "$SL_PENDING" = "0" ] && [ "$MS_PENDING" = "0" ]; then exit 0; fi',
4454
4455
  `LAST_ASSISTANT=$(tail -200 "$TRANSCRIPT_PATH" | jq -cs '[.[] | select(.type == "assistant" or .role == "assistant")] | last // empty' 2>/dev/null || true)`,
4455
4456
  'if [ -z "$LAST_ASSISTANT" ] || [ "$LAST_ASSISTANT" = "null" ]; then exit 0; fi',
4456
- `TEXT=$(echo "$LAST_ASSISTANT" | jq -r '(.message.content // .content // []) | map(select(.type == "text") | .text) | join("\\n\\n")' 2>/dev/null || true)`,
4457
+ "# Assistant content is array-shaped today; normalize anyway so a shape",
4458
+ "# change can never resurrect the swallowed-jq-error no-op (ENG-6288).",
4459
+ `TEXT=$(echo "$LAST_ASSISTANT" | jq -r '${jqNormalizeContent} | map(select(type == "object" and .type == "text") | .text) | join("\\n\\n")' 2>/dev/null || true)`,
4457
4460
  "# Strip whitespace and bail only on truly-empty (vs the previous <4-char",
4458
4461
  '# threshold that dropped legit short replies like "ok", "yes", emoji).',
4459
4462
  'if [ -z "${TEXT//[[:space:]]/}" ]; then exit 0; fi',
4460
- `TOOL_NAMES=$(echo "$LAST_ASSISTANT" | jq -r '(.message.content // .content // []) | map(select(.type == "tool_use") | .name) | .[]' 2>/dev/null || true)`,
4463
+ `TOOL_NAMES=$(echo "$LAST_ASSISTANT" | jq -r '${jqNormalizeContent} | map(select(type == "object" and .type == "tool_use") | .name) | .[]' 2>/dev/null || true)`,
4461
4464
  "# Find the LAST <channel ...> tag in user/notification turns. Channel",
4462
4465
  "# notifications are forwarded into the session as text containing this",
4463
4466
  "# tag (slack-channel.ts:1247 / telegram-channel.ts:776 emit content +",
4464
4467
  "# meta which Claude Code wraps in a <channel ...> preamble). Searching",
4465
4468
  "# the raw text gives us the exact pending conversation key.",
4466
- `CHANNEL_TAG=$(tail -400 "$TRANSCRIPT_PATH" | jq -r '(.message.content // .content // []) | map(select(.type == "text") | .text) | join(" ")' 2>/dev/null | grep -oE '<channel [^>]+>' | tail -1 || true)`,
4469
+ "# User-event content is frequently a PLAIN STRING (channel notifications",
4470
+ "# land that way), not a content-block array \u2014 map() over a string is a",
4471
+ "# jq error, which the 2>/dev/null swallowed, so the tag came back empty",
4472
+ "# and recovery silently no-oped on every Slack ghost reply (confirmed",
4473
+ "# live on sherlock/agt-aws-1 2026-06-10). Normalize before mapping.",
4474
+ `CHANNEL_TAG=$(tail -400 "$TRANSCRIPT_PATH" | jq -r '${jqNormalizeContent} | map(select(type == "object" and .type == "text") | .text) | join(" ")' 2>/dev/null | grep -oE '<channel [^>]+>' | tail -1 || true)`,
4467
4475
  'TAG_SOURCE=""',
4468
4476
  `if [ -n "$CHANNEL_TAG" ]; then TAG_SOURCE=$(echo "$CHANNEL_TAG" | grep -oE 'source="[^"]+"' | head -1 | sed 's/source="\\(.*\\)"/\\1/' || true); fi`,
4469
4477
  'extract_attr() { echo "$1" | grep -oE "$2=\\"[^\\"]+\\"" | head -1 | sed -E "s/$2=\\"(.*)\\"/\\\\1/"; }',
@@ -7972,4 +7980,4 @@ export {
7972
7980
  managerInstallSystemUnitCommand,
7973
7981
  managerUninstallSystemUnitCommand
7974
7982
  };
7975
- //# sourceMappingURL=chunk-ELCLXTJI.js.map
7983
+ //# sourceMappingURL=chunk-25VLOVMK.js.map