@rine-network/mcp 0.2.4 → 0.2.5

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/server.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as tools } from "./tools-BSM9cgE-.js";
2
+ import { t as tools } from "./tools-Q4oz33CC.js";
3
3
  import { createRequire } from "node:module";
4
4
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
5
5
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -1,2 +1,2 @@
1
- import { t as tools } from "../tools-BSM9cgE-.js";
1
+ import { t as tools } from "../tools-Q4oz33CC.js";
2
2
  export { tools };
@@ -431,8 +431,9 @@ const tools = [
431
431
  async handler(ctx, p) {
432
432
  const original = await ctx.client.get(`/messages/${String(p.message_id)}`);
433
433
  const agentId = original.to_agent_id;
434
+ if (!agentId) throw new Error("Cannot determine recipient from message");
435
+ if (original.from_agent_id === agentId) throw new Error("Cannot reply to your own message. Send a new message to follow up in this conversation.");
434
436
  const recipientId = original.from_agent_id;
435
- if (!agentId || !recipientId) throw new Error("Cannot determine sender/recipient from message");
436
437
  const recipientEncPk = await fetchRecipientEncryptionKey(ctx.client, recipientId);
437
438
  const result = await encryptMessage(ctx.configDir, agentId, recipientEncPk, p.payload);
438
439
  return ctx.client.post("/messages", {
package/package.json CHANGED
@@ -1,56 +1,56 @@
1
1
  {
2
- "name": "@rine-network/mcp",
3
- "version": "0.2.4",
4
- "description": "MCP server for rine.network \u2014 agent-to-agent messaging for AI",
5
- "author": "mmmbs <mmmbs@proton.me>",
6
- "license": "EUPL-1.2",
7
- "type": "module",
8
- "engines": {
9
- "node": ">=22"
10
- },
11
- "bin": {
12
- "rine-mcp": "bin/rine-mcp.js"
13
- },
14
- "files": [
15
- "bin/",
16
- "dist/"
17
- ],
18
- "exports": {
19
- ".": "./dist/server.js"
20
- },
21
- "scripts": {
22
- "build": "tsdown src/server.ts src/tools/index.ts --format esm --outDir dist --clean",
23
- "prepublishOnly": "npm run build",
24
- "typecheck": "tsc --noEmit",
25
- "lint": "biome check .",
26
- "test": "vitest run",
27
- "dev": "tsx src/server.ts"
28
- },
29
- "dependencies": {
30
- "@modelcontextprotocol/sdk": "^1.12.0",
31
- "@rine-network/core": "^0.2.0"
32
- },
33
- "devDependencies": {
34
- "@biomejs/biome": "^1.9.0",
35
- "@types/node": "^22.0.0",
36
- "tsdown": "^0.12.0",
37
- "tsx": "^4.19.0",
38
- "typescript": "^5.8.0",
39
- "vitest": "^3.0.0"
40
- },
41
- "homepage": "https://rine.network",
42
- "repository": {
43
- "type": "git",
44
- "url": "https://codeberg.org/rine/rine-mcp"
45
- },
46
- "publishConfig": {
47
- "access": "public"
48
- },
49
- "keywords": [
50
- "mcp",
51
- "messaging",
52
- "ai-agents",
53
- "a2a",
54
- "rine"
55
- ]
2
+ "name": "@rine-network/mcp",
3
+ "version": "0.2.5",
4
+ "description": "MCP server for rine.network agent-to-agent messaging for AI",
5
+ "author": "mmmbs <mmmbs@proton.me>",
6
+ "license": "EUPL-1.2",
7
+ "type": "module",
8
+ "engines": {
9
+ "node": ">=22"
10
+ },
11
+ "bin": {
12
+ "rine-mcp": "bin/rine-mcp.js"
13
+ },
14
+ "files": [
15
+ "bin/",
16
+ "dist/"
17
+ ],
18
+ "exports": {
19
+ ".": "./dist/server.js"
20
+ },
21
+ "scripts": {
22
+ "build": "tsdown src/server.ts src/tools/index.ts --format esm --outDir dist --clean",
23
+ "prepublishOnly": "npm run build",
24
+ "typecheck": "tsc --noEmit",
25
+ "lint": "biome check .",
26
+ "test": "vitest run",
27
+ "dev": "tsx src/server.ts"
28
+ },
29
+ "dependencies": {
30
+ "@modelcontextprotocol/sdk": "^1.12.0",
31
+ "@rine-network/core": "file:../rine-core"
32
+ },
33
+ "devDependencies": {
34
+ "@biomejs/biome": "^1.9.0",
35
+ "@types/node": "^22.0.0",
36
+ "tsdown": "^0.12.0",
37
+ "tsx": "^4.19.0",
38
+ "typescript": "^5.8.0",
39
+ "vitest": "^3.0.0"
40
+ },
41
+ "homepage": "https://rine.network",
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "https://codeberg.org/rine/rine-mcp"
45
+ },
46
+ "publishConfig": {
47
+ "access": "public"
48
+ },
49
+ "keywords": [
50
+ "mcp",
51
+ "messaging",
52
+ "ai-agents",
53
+ "a2a",
54
+ "rine"
55
+ ]
56
56
  }