@integrity-labs/agt-cli 0.15.2 → 0.15.3

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
@@ -3402,7 +3402,7 @@ import { execFileSync, execSync } from "child_process";
3402
3402
  import { existsSync as existsSync4, realpathSync } from "fs";
3403
3403
  import chalk17 from "chalk";
3404
3404
  import ora15 from "ora";
3405
- var cliVersion = true ? "0.15.2" : "dev";
3405
+ var cliVersion = true ? "0.15.3" : "dev";
3406
3406
  async function fetchLatestVersion() {
3407
3407
  const host2 = getHost();
3408
3408
  if (!host2) return null;
@@ -3851,7 +3851,7 @@ function handleError(err) {
3851
3851
  }
3852
3852
 
3853
3853
  // src/bin/agt.ts
3854
- var cliVersion2 = true ? "0.15.2" : "dev";
3854
+ var cliVersion2 = true ? "0.15.3" : "dev";
3855
3855
  var program = new Command();
3856
3856
  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");
3857
3857
  program.hook("preAction", (thisCommand) => {
@@ -14229,6 +14229,21 @@ if (!BOT_TOKEN || !APP_TOKEN) {
14229
14229
  );
14230
14230
  process.exit(1);
14231
14231
  }
14232
+ async function getBotUserId() {
14233
+ try {
14234
+ const res = await fetch("https://slack.com/api/auth.test", {
14235
+ headers: { Authorization: `Bearer ${BOT_TOKEN}` }
14236
+ });
14237
+ const data = await res.json();
14238
+ return data.ok ? data.user_id ?? null : null;
14239
+ } catch {
14240
+ return null;
14241
+ }
14242
+ }
14243
+ var botUserId = await getBotUserId();
14244
+ process.stderr.write(`slack-channel: Bot user ID: ${botUserId}
14245
+ `);
14246
+ var selfIdentityInstruction = botUserId ? `Your own Slack user_id is ${botUserId}. Treat <@${botUserId}> mentions as directed at you, even inside auto_followed threads.` : "";
14232
14247
  var mcp = new Server(
14233
14248
  { name: "slack", version: "0.1.0" },
14234
14249
  {
@@ -14241,6 +14256,7 @@ var mcp = new Server(
14241
14256
  // and the agent silently loses attachment-handling guidance.
14242
14257
  instructions: [
14243
14258
  'Messages from Slack arrive as <channel source="slack" user="<slack-id>" user_name="<display-name>" channel="..." thread_ts="...">.',
14259
+ ...selfIdentityInstruction ? [selfIdentityInstruction] : [],
14244
14260
  "Inbound attachments: the <channel> tag's `files` attribute is a JSON-serialised array \u2014 JSON.parse it before iterating. If a file entry has a `path`, the image is ALREADY DOWNLOADED locally \u2014 Read that path directly, do NOT call slack.download_attachment. That tool is only for entries with `file_id` but NO `path` (PDF, docx, csv, etc.): pass file_id + channel verbatim (never paraphrase), then Read the returned path. Single-image messages also get a top-level `image_path` convenience attribute; multi-image messages omit it. Never tell the user about internal file-handling failures that don't affect the answer.",
14245
14261
  "Reply via slack.reply passing channel and thread_ts from the tag. Always include thread_ts on threaded replies so the response lands in the same thread.",
14246
14262
  "Address users by user_name, never by raw user ID. In multi-participant threads the CURRENT speaker is the one on the latest <channel> tag \u2014 don't conflate with earlier participants.",
@@ -14768,18 +14784,6 @@ async function buildInboundFileMeta(rawFiles, codeName, channel) {
14768
14784
  return out;
14769
14785
  }
14770
14786
  await mcp.connect(new StdioServerTransport());
14771
- var botUserId = null;
14772
- async function getBotUserId() {
14773
- try {
14774
- const res = await fetch("https://slack.com/api/auth.test", {
14775
- headers: { Authorization: `Bearer ${BOT_TOKEN}` }
14776
- });
14777
- const data = await res.json();
14778
- return data.ok ? data.user_id ?? null : null;
14779
- } catch {
14780
- return null;
14781
- }
14782
- }
14783
14787
  var userNameCache = /* @__PURE__ */ new Map();
14784
14788
  async function resolveUserName(userId) {
14785
14789
  if (!userId || userId === "unknown") return userId ?? "unknown";
@@ -14983,7 +14987,4 @@ if (THREAD_STORE_PATH) {
14983
14987
  "slack-channel: AGT_AGENT_CODE_NAME not set \u2014 running without thread-follow persistence\n"
14984
14988
  );
14985
14989
  }
14986
- botUserId = await getBotUserId();
14987
- process.stderr.write(`slack-channel: Bot user ID: ${botUserId}
14988
- `);
14989
14990
  connectSocketModeSafely();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.15.2",
3
+ "version": "0.15.3",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {