@integrity-labs/agt-cli 0.10.4 → 0.10.6

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.
@@ -13927,6 +13927,28 @@ mcp.setRequestHandler(ListToolsRequestSchema, async () => ({
13927
13927
  },
13928
13928
  required: ["channel", "timestamp", "emoji"]
13929
13929
  }
13930
+ },
13931
+ {
13932
+ name: "slack.read_thread",
13933
+ description: "Read the full message history of a Slack thread. Use this to catch up on thread context before replying, especially for auto-followed threads.",
13934
+ inputSchema: {
13935
+ type: "object",
13936
+ properties: {
13937
+ channel: {
13938
+ type: "string",
13939
+ description: "Slack channel ID where the thread lives"
13940
+ },
13941
+ thread_ts: {
13942
+ type: "string",
13943
+ description: "Thread timestamp (thread_ts) of the parent message"
13944
+ },
13945
+ limit: {
13946
+ type: "number",
13947
+ description: "Max messages to return (default 50, max 200)"
13948
+ }
13949
+ },
13950
+ required: ["channel", "thread_ts"]
13951
+ }
13930
13952
  }
13931
13953
  ]
13932
13954
  }));
@@ -13996,6 +14018,56 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
13996
14018
  };
13997
14019
  }
13998
14020
  }
14021
+ if (name === "slack.read_thread") {
14022
+ const { channel, thread_ts, limit: rawLimit } = args;
14023
+ const limit = Math.min(Math.max(rawLimit ?? 50, 1), 200);
14024
+ try {
14025
+ const allMessages = [];
14026
+ let cursor;
14027
+ do {
14028
+ const remaining = limit - allMessages.length;
14029
+ if (remaining <= 0) break;
14030
+ const params = new URLSearchParams({
14031
+ channel,
14032
+ ts: thread_ts,
14033
+ limit: String(Math.min(remaining, 100)),
14034
+ ...cursor ? { cursor } : {}
14035
+ });
14036
+ const res = await fetch(`https://slack.com/api/conversations.replies?${params}`, {
14037
+ headers: { Authorization: `Bearer ${BOT_TOKEN}` }
14038
+ });
14039
+ const data = await res.json();
14040
+ if (!data.ok) {
14041
+ return {
14042
+ content: [{ type: "text", text: `Slack error: ${data.error}` }],
14043
+ isError: true
14044
+ };
14045
+ }
14046
+ for (const msg of data.messages ?? []) {
14047
+ allMessages.push({
14048
+ user: msg.user ?? msg.bot_id ?? "unknown",
14049
+ text: msg.text ?? "",
14050
+ ts: msg.ts ?? ""
14051
+ });
14052
+ }
14053
+ cursor = data.response_metadata?.next_cursor || void 0;
14054
+ } while (cursor && allMessages.length < limit);
14055
+ const formatted = allMessages.map((m) => `[${m.ts}] <@${m.user}>: ${m.text}`).join("\n");
14056
+ return {
14057
+ content: [{
14058
+ type: "text",
14059
+ text: allMessages.length > 0 ? `Thread (${allMessages.length} messages):
14060
+
14061
+ ${formatted}` : "Thread is empty or not found."
14062
+ }]
14063
+ };
14064
+ } catch (err) {
14065
+ return {
14066
+ content: [{ type: "text", text: `Failed: ${err.message}` }],
14067
+ isError: true
14068
+ };
14069
+ }
14070
+ }
13999
14071
  throw new Error(`Unknown tool: ${name}`);
14000
14072
  });
14001
14073
  await mcp.connect(new StdioServerTransport());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.10.4",
3
+ "version": "0.10.6",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "bin": {