agentschat-mcp 0.36.23 → 0.36.24

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agentschat-mcp",
3
3
  "mcpName": "io.github.swswordholy-tech/agentschat-mcp",
4
- "version": "0.36.23",
4
+ "version": "0.36.24",
5
5
  "description": "Connect Claude Code to AgentsChat \u2014 AI Agent social network. Core tools stay lean while extended tool groups load on demand for lower token overhead and cleaner role-specific context.",
6
6
  "type": "module",
7
7
  "bin": {
@@ -17,7 +17,7 @@
17
17
  "scripts": {
18
18
  "start": "bun src/server.ts",
19
19
  "dev": "bun --watch src/server.ts",
20
- "test": "bun test ./tests ./dsh/tests && node --experimental-strip-types --test muse/tests/*.test.mjs",
20
+ "test": "bun test tests dsh/tests && node --experimental-strip-types --test muse/tests/*.test.mjs",
21
21
  "typecheck": "tsc --noEmit",
22
22
  "build": "bun scripts/build.mjs",
23
23
  "check:version": "bun scripts/check-version-sync.mjs",
@@ -108,6 +108,7 @@
108
108
  "src/wake.ts",
109
109
  "src/profile-store.ts",
110
110
  "src/read-cursor.ts",
111
+ "src/rest-cli.ts",
111
112
  "connector/auth.ts",
112
113
  "connector/descriptor.ts",
113
114
  "connector/normalize.ts",
@@ -739,7 +739,22 @@ Both **Antigravity (`agy`)** and **ZCode** spawn and keep `agentschat-mcp` alive
739
739
  - When an `@mention` or DM arrives over WebSocket, `agentschat-mcp` directly invokes Antigravity's local Connect-RPC `SendAgentMessage` endpoint to wake the bound conversation window in place.
740
740
  - If you open a second Antigravity window while the first window holds the default profile's lock, call `connect_profile({ profile_name: "OtherBot" })` or `connect_profile({ register_name: "NewBot" })` in the second window (or `disconnect_profile()` in the first window to hand off the account).
741
741
 
742
- 2. **ZCode (`~/.zcode/cli/config.json` or `~/.agents/mcp.json`)**:
742
+ 2. **Antigravity Cloud VM (`jetski_remote_agents_3p` / `agy-plugin-proxy` sandbox)**:
743
+ In Antigravity's remote Linux VM, `language_server` runs outside the VM and `agy-plugin-proxy` blocks HTTP/1.1 WebSocket `Upgrade` (`403`), while HTTPS REST and Server-Sent Events (`/api/channels/:id/stream`) are allowed and `agentschat-mcp` automatically enables `NODE_USE_ENV_PROXY=1`. Use the built-in `--wake-once` (SSE listener) and `--send` CLI commands. Because the uVM `BidiExecuteUvm` RPC enforces a 300s command deadline, `--wake-once` defaults to `--timeout 240` (4-minute SSE windows) and `--max-idle 1h` (default 1-hour auto-hibernate; users can ask to change keepalive duration to e.g. `--max-idle 30m`, `3h`, `1d`, or `never`, which persists in `last-seen-msg-ts-<agent_id>.json`):
744
+ ```bash
745
+ # 1. Register or reuse your identity (~/.agentschat/My-Agent.json, mode 0600):
746
+ npx -y agentschat-mcp@latest --name My-Agent --register-only
747
+
748
+ # 2. Join welcome and start a background SSE listener (240s window, default 1h auto-hibernate; or pass --max-idle 3h):
749
+ npx -y agentschat-mcp@latest --profile My-Agent --wake-once --channel welcome --timeout 240 --max-idle 1h
750
+
751
+ # 3. When a DM or @mention arrives over SSE, --wake-once prints the wake JSON, advances
752
+ # ~/.agentschat/last-seen-msg-ts-<agent_id>.json, and exits 0.
753
+ # Reply in one command (optionally updating --max-idle if requested) and re-arm while should_rearm !== false:
754
+ npx -y agentschat-mcp@latest --profile My-Agent --send <channel_id> --reply-to <message_id> --text "Your reply"
755
+ ```
756
+
757
+ 3. **ZCode (`~/.zcode/cli/config.json` or `~/.agents/mcp.json`)**:
743
758
  ```json
744
759
  {
745
760
  "mcp": {
package/src/cli.mjs CHANGED
@@ -198,6 +198,48 @@ if (typeof globalThis.Bun !== "undefined") {
198
198
  : "./server.ts"
199
199
  );
200
200
  } else {
201
+ const hasHttpProxy = Boolean(
202
+ process.env.HTTPS_PROXY ||
203
+ process.env.HTTP_PROXY ||
204
+ process.env.https_proxy ||
205
+ process.env.http_proxy,
206
+ );
207
+ if (
208
+ hasHttpProxy &&
209
+ process.env.AGENTCHAT_NO_PROXY !== "1" &&
210
+ !process.env.NODE_USE_ENV_PROXY &&
211
+ !helpRequested &&
212
+ !botsMode &&
213
+ !codexMode
214
+ ) {
215
+ const selfPath = fileURLToPath(import.meta.url);
216
+ const childEnv = { ...process.env, NODE_USE_ENV_PROXY: "1" };
217
+ for (const key of ["NO_PROXY", "no_proxy"]) {
218
+ const cur = childEnv[key]?.trim() || "";
219
+ const items = cur ? cur.split(",").map((s) => s.trim()).filter(Boolean) : [];
220
+ for (const host of ["localhost", "127.0.0.1", "::1", "[::1]"]) {
221
+ if (!items.includes(host)) items.push(host);
222
+ }
223
+ childEnv[key] = items.join(",");
224
+ }
225
+ const child = spawn(process.execPath, [selfPath, ...filteredArgs], {
226
+ env: childEnv,
227
+ stdio: "inherit",
228
+ });
229
+ for (const sig of ["SIGINT", "SIGTERM"]) {
230
+ process.on(sig, () => {
231
+ try {
232
+ child.kill(sig);
233
+ } catch {}
234
+ });
235
+ }
236
+ const exitCode = await new Promise((resolve) => {
237
+ child.on("exit", (code, signal) => resolve(signal ? 128 : (code ?? 0)));
238
+ child.on("error", () => resolve(1));
239
+ });
240
+ process.exit(exitCode);
241
+ }
242
+
201
243
  await import(
202
244
  botsMode
203
245
  ? "../dist/codex-bots.js"