@integrity-labs/agt-cli 0.28.712 → 0.28.713

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-4OXDKMGC.js";
43
+ } from "../chunk-FHCGBMIJ.js";
44
44
  import {
45
45
  readDirectChatSessionState
46
46
  } from "../chunk-F6AZ6KPI.js";
@@ -4909,7 +4909,7 @@ import { execFileSync, execSync } from "child_process";
4909
4909
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4910
4910
  import chalk18 from "chalk";
4911
4911
  import ora16 from "ora";
4912
- var cliVersion = true ? "0.28.712" : "dev";
4912
+ var cliVersion = true ? "0.28.713" : "dev";
4913
4913
  async function fetchLatestVersion() {
4914
4914
  const host2 = getHost();
4915
4915
  if (!host2) return null;
@@ -6089,7 +6089,7 @@ function handleError(err) {
6089
6089
  }
6090
6090
 
6091
6091
  // src/bin/agt.ts
6092
- var cliVersion2 = true ? "0.28.712" : "dev";
6092
+ var cliVersion2 = true ? "0.28.713" : "dev";
6093
6093
  var program = new Command();
6094
6094
  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");
6095
6095
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -6425,7 +6425,7 @@ function exchangeFailureKind(err) {
6425
6425
  }
6426
6426
 
6427
6427
  // src/lib/api-client.ts
6428
- var agtCliVersion = true ? "0.28.712" : "dev";
6428
+ var agtCliVersion = true ? "0.28.713" : "dev";
6429
6429
  var lastConfigHash = null;
6430
6430
  function setConfigHash(hash) {
6431
6431
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -10166,4 +10166,4 @@ export {
10166
10166
  managerInstallSystemUnitCommand,
10167
10167
  managerUninstallSystemUnitCommand
10168
10168
  };
10169
- //# sourceMappingURL=chunk-4OXDKMGC.js.map
10169
+ //# sourceMappingURL=chunk-FHCGBMIJ.js.map
@@ -54,7 +54,7 @@ import {
54
54
  safeWriteJsonAtomic,
55
55
  setConfigHash,
56
56
  tripClass
57
- } from "../chunk-4OXDKMGC.js";
57
+ } from "../chunk-FHCGBMIJ.js";
58
58
  import {
59
59
  getProjectDir as getProjectDir2,
60
60
  getReadyTasks,
@@ -12826,7 +12826,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
12826
12826
  var lastVersionCheckAt = 0;
12827
12827
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
12828
12828
  var lastResponsivenessProbeAt = 0;
12829
- var agtCliVersion = true ? "0.28.712" : "dev";
12829
+ var agtCliVersion = true ? "0.28.713" : "dev";
12830
12830
  function resolveBrewPath(execFileSync3) {
12831
12831
  try {
12832
12832
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -39616,6 +39616,38 @@ function resolveReplyThreadTs(input) {
39616
39616
  if (input.threadTs === null) return void 0;
39617
39617
  return input.activeCardThreadTs || void 0;
39618
39618
  }
39619
+ function validateToChannelRoot(value) {
39620
+ if (value === void 0 || typeof value === "boolean") return { ok: true };
39621
+ return {
39622
+ ok: false,
39623
+ error: `to_channel_root must be a boolean, not ${typeof value} ${JSON.stringify(value)} \u2014 omit it to reply in context, or pass true (unquoted) to start a new top-level thread.`
39624
+ };
39625
+ }
39626
+ function resolveStructuredSendThread(input) {
39627
+ const valid = validateToChannelRoot(input.toChannelRoot);
39628
+ if (!valid.ok) return valid;
39629
+ const wantsRoot = input.toChannelRoot === true;
39630
+ if (wantsRoot && (input.threadTs || input.messageTs)) {
39631
+ return {
39632
+ ok: false,
39633
+ error: "to_channel_root cannot be combined with thread_ts or message_ts \u2014 omit them to start a new top-level thread, or drop to_channel_root to reply in the thread."
39634
+ };
39635
+ }
39636
+ return {
39637
+ ok: true,
39638
+ threadTs: resolveReplyThreadTs({
39639
+ channel: void 0,
39640
+ threadTs: wantsRoot ? null : input.threadTs,
39641
+ messageTs: input.messageTs,
39642
+ activeCardThreadTs: input.activeCardThreadTs
39643
+ })
39644
+ };
39645
+ }
39646
+ function shouldConsultActiveCardThread(input) {
39647
+ if (!validateToChannelRoot(input.toChannelRoot).ok) return false;
39648
+ if (input.toChannelRoot === true) return false;
39649
+ return !input.threadTs && !input.messageTs;
39650
+ }
39619
39651
 
39620
39652
  // src/slack-hot-thread.ts
39621
39653
  function parseThreadKey(key2) {
@@ -45098,7 +45130,29 @@ mcp.setRequestHandler(ListToolsRequestSchema, async () => ({
45098
45130
  description: 'Array of Block Kit blocks. Supported block types: header, section, divider, context, actions. Supported interactive elements (inside actions blocks): button. IMAGES: a context block is the only way to show one \u2014 message text is mrkdwn, which has no inline image syntax, so `![](url)` never renders. Use { type: "image", image_url, alt_text } (alt_text required) alongside an mrkdwn element, one context block per row, since elements flow as a single wrapping line. image_url must be a PNG, JPG or GIF: Slack does not render SVG. For vendor/product logos use our mirror at logos.augmented.team rather than hotlinking the upstream source (upload.wikimedia.org and friends) \u2014 those are the sync scripts\' INPUT, and three had already rotted before the mirror existed. Hard limits: 50 blocks per message, 10 elements per context block, 5 elements per actions block, 3000 chars per section text, 3000 chars per image_url, 75 chars per button label.'
45099
45131
  },
45100
45132
  text: { type: "string", description: "Plain-text fallback for push notifications and unfurls. Required." },
45101
- thread_ts: { type: "string", description: "Thread timestamp for an existing thread reply (from the thread_ts attribute). Safe to omit: for a channel message the server automatically threads your reply off the message you are answering (via message_ts), and a DM reply posts inline." },
45133
+ thread_ts: { type: "string", description: "Thread timestamp for an existing thread reply (from the thread_ts attribute). Safe to omit when you are ANSWERING something: the server threads off the message you are replying to (via message_ts), or off your active task's originating thread. If you are starting a NEW top-level conversation, do not just omit this \u2014 set to_channel_root: true, or your post may land inside whatever thread your current task came from." },
45134
+ // CS-1611: the explicit "start a new top-level thread" escape.
45135
+ //
45136
+ // Omitting thread_ts is NOT that instruction, and the gap is what
45137
+ // this ticket is about. A send with no thread coords falls back to
45138
+ // the agent's ACTIVE KANBAN CARD source thread (CS-1470), which is
45139
+ // right for a task/sub-agent step reply and wrong for a background
45140
+ // workflow announcing something new. On 2026-08-26 that put two
45141
+ // posts from a dynamic-workflow run (ts 1787712876.405999 and
45142
+ // 1787712912.881139) inside an unrelated customer thread in
45143
+ // C0B5UL7V5NZ — agent alfred, Zanda org. Second confirmed
45144
+ // occurrence, prod customer channel.
45145
+ //
45146
+ // `resolveReplyThreadTs` already honours an explicit null as
45147
+ // "channel root" and is tested for it, but the tool schema declared
45148
+ // thread_ts as a plain string, so no caller could express it — the
45149
+ // escape existed and was unreachable from here. This surfaces it as
45150
+ // a named boolean instead, which is also what a model can actually
45151
+ // be instructed to use.
45152
+ to_channel_root: {
45153
+ type: "boolean",
45154
+ description: "Post at the channel root, starting a NEW top-level thread, ignoring any thread your current task or reply context is associated with. Use for self-initiated or background posts (announcements, digests, workflow output) that are not answering anyone. Cannot be combined with thread_ts."
45155
+ },
45102
45156
  // ENG-6763: mirror slack.reply — accept message_ts so a structured
45103
45157
  // reply to a channel @-mention threads deterministically off the
45104
45158
  // inbound even when the model omits thread_ts (the ENG-5861/ENG-6296
@@ -46143,20 +46197,26 @@ async function handleSendStructured(args) {
46143
46197
  }
46144
46198
  const runtime = await Promise.resolve().then(() => (init_slack_block_kit_runtime(), slack_block_kit_runtime_exports));
46145
46199
  const { validateSlackBlocks: validateSlackBlocks2 } = runtime;
46146
- const { channel, blocks, text, thread_ts, message_ts } = args;
46200
+ const { channel, blocks, text, thread_ts, message_ts, to_channel_root } = args;
46147
46201
  if (typeof channel !== "string" || !channel) {
46148
46202
  return errResult("channel is required");
46149
46203
  }
46150
46204
  if (typeof text !== "string" || !text) {
46151
46205
  return errResult("text is required (used as fallback for push notifications and unfurls)");
46152
46206
  }
46153
- const activeCardThreadTs = !thread_ts && !message_ts && kanbanCardActiveClient ? await kanbanCardActiveClient.getActiveCardSourceThread("slack", channel) : void 0;
46154
- const effectiveThreadTs = resolveReplyThreadTs({
46155
- channel,
46207
+ const activeCardThreadTs = shouldConsultActiveCardThread({
46208
+ threadTs: thread_ts,
46209
+ messageTs: message_ts,
46210
+ toChannelRoot: to_channel_root
46211
+ }) && kanbanCardActiveClient ? await kanbanCardActiveClient.getActiveCardSourceThread("slack", channel) : void 0;
46212
+ const threadDecision = resolveStructuredSendThread({
46156
46213
  threadTs: thread_ts,
46157
46214
  messageTs: message_ts,
46215
+ toChannelRoot: to_channel_root,
46158
46216
  activeCardThreadTs
46159
46217
  });
46218
+ if (!threadDecision.ok) return errResult(threadDecision.error);
46219
+ const effectiveThreadTs = threadDecision.threadTs;
46160
46220
  recordReplyTargetClassification(
46161
46221
  SLACK_AGENT_DIR,
46162
46222
  "slack",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.712",
3
+ "version": "0.28.713",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {