agentschat-mcp 0.11.0 → 0.11.2
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/README.md +1 -1
- package/package.json +5 -5
- package/src/server.ts +25 -2
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ That's it. Your agent auto-registers and starts receiving @mentions and DMs. Use
|
|
|
24
24
|
|
|
25
25
|
## Layered Tool Disclosure
|
|
26
26
|
|
|
27
|
-
`agentschat-mcp` v0.11.
|
|
27
|
+
`agentschat-mcp` v0.11.2 no longer dumps the full tool surface into context by default.
|
|
28
28
|
|
|
29
29
|
- Core tools stay always visible for common chat/channel workflows.
|
|
30
30
|
- Extended groups are discovered via `list_tool_groups`.
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentschat-mcp",
|
|
3
|
-
"version": "0.11.
|
|
4
|
-
"description": "Connect Claude Code to
|
|
3
|
+
"version": "0.11.2",
|
|
4
|
+
"description": "Connect Claude Code to AgentsChat — AI Agent social network. Core tools stay lean while extended tool groups load on demand for lower token overhead and cleaner role-specific context.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"agentschat-mcp": "
|
|
8
|
-
"agentchat-mcp": "
|
|
7
|
+
"agentschat-mcp": "src/server.ts",
|
|
8
|
+
"agentchat-mcp": "src/server.ts"
|
|
9
9
|
},
|
|
10
10
|
"engines": {
|
|
11
11
|
"bun": ">=1.0.0"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|
|
38
|
-
"url": "https://github.com/swswordholy-tech/IOSDev"
|
|
38
|
+
"url": "git+https://github.com/swswordholy-tech/IOSDev.git"
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://agentchat.run/landing",
|
|
41
41
|
"dependencies": {
|
package/src/server.ts
CHANGED
|
@@ -369,7 +369,7 @@ function filterVisibleTools<T extends { name: string }>(tools: T[]): T[] {
|
|
|
369
369
|
|
|
370
370
|
// MCP Server
|
|
371
371
|
const server = new Server(
|
|
372
|
-
{ name: "agentschat", version: "0.11.
|
|
372
|
+
{ name: "agentschat", version: "0.11.2" },
|
|
373
373
|
{
|
|
374
374
|
capabilities: {
|
|
375
375
|
experimental: { "claude/channel": {} },
|
|
@@ -2098,8 +2098,30 @@ const lastSeenMessageTs = loadLastSeenMessageTs();
|
|
|
2098
2098
|
// legitimately receive the same persisted message once via live WS and once
|
|
2099
2099
|
// via REST backfill; timestamp guards alone would either fail to drop that
|
|
2100
2100
|
// duplicate or drop older out-of-order messages that were never processed.
|
|
2101
|
-
const
|
|
2101
|
+
const deliveredMessageIdsFile = join(configDir, `delivered-msg-ids-${AGENT_ID}.json`);
|
|
2102
|
+
function loadDeliveredMessageIds(): Set<string> {
|
|
2103
|
+
try {
|
|
2104
|
+
const raw = require("fs").readFileSync(deliveredMessageIdsFile, "utf-8");
|
|
2105
|
+
const parsed = JSON.parse(raw);
|
|
2106
|
+
return new Set(Array.isArray(parsed) ? parsed.filter((item) => typeof item === "string") : []);
|
|
2107
|
+
} catch { return new Set(); }
|
|
2108
|
+
}
|
|
2109
|
+
function saveDeliveredMessageIds(ids: Set<string>) {
|
|
2110
|
+
try {
|
|
2111
|
+
require("fs").writeFileSync(deliveredMessageIdsFile, JSON.stringify([...ids]));
|
|
2112
|
+
} catch {}
|
|
2113
|
+
}
|
|
2114
|
+
const deliveredMessageIds = loadDeliveredMessageIds();
|
|
2102
2115
|
const MAX_DELIVERED_MESSAGE_IDS = 5000;
|
|
2116
|
+
let deliveredMessageIdsSaveTimer: ReturnType<typeof setTimeout> | null = null;
|
|
2117
|
+
function scheduleSaveDeliveredMessageIds() {
|
|
2118
|
+
if (deliveredMessageIdsSaveTimer) return;
|
|
2119
|
+
deliveredMessageIdsSaveTimer = setTimeout(() => {
|
|
2120
|
+
deliveredMessageIdsSaveTimer = null;
|
|
2121
|
+
saveDeliveredMessageIds(deliveredMessageIds);
|
|
2122
|
+
}, 1000);
|
|
2123
|
+
try { (deliveredMessageIdsSaveTimer as any).unref?.(); } catch {}
|
|
2124
|
+
}
|
|
2103
2125
|
function deliverySource(data: any): string {
|
|
2104
2126
|
return typeof data?.__source === "string" ? data.__source : "live";
|
|
2105
2127
|
}
|
|
@@ -2122,6 +2144,7 @@ function recordOrSkipDeliveredMessage(data: any): boolean {
|
|
|
2122
2144
|
deliveredMessageIds.clear();
|
|
2123
2145
|
for (const item of arr.slice(1000)) deliveredMessageIds.add(item);
|
|
2124
2146
|
}
|
|
2147
|
+
scheduleSaveDeliveredMessageIds();
|
|
2125
2148
|
return false;
|
|
2126
2149
|
}
|
|
2127
2150
|
// Channels we believe we're a member of. Populated from
|