@zeph-to/mcp-server 1.2.2 → 1.3.0

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.
@@ -10,7 +10,7 @@ export declare class ZephApiClient {
10
10
  private readonly baseUrl;
11
11
  constructor(config: McpServerConfig);
12
12
  sendPush(params: {
13
- title: string;
13
+ title?: string;
14
14
  body?: string;
15
15
  url?: string;
16
16
  type?: string;
@@ -22,7 +22,12 @@ export declare class ZephApiClient {
22
22
  fileName: string;
23
23
  fileSize: number;
24
24
  fileType: string;
25
+ iv?: string;
26
+ encryptedKey?: string;
25
27
  }[];
28
+ isEncrypted?: boolean;
29
+ encryptedKey?: string;
30
+ senderPublicKey?: string;
26
31
  }): Promise<PushResponse>;
27
32
  triggerHook(hookId: string, params: {
28
33
  title: string;
@@ -50,7 +55,7 @@ export declare class ZephApiClient {
50
55
  fileType: string;
51
56
  fileSize: number;
52
57
  }): Promise<UploadRequestResponse>;
53
- uploadToS3(url: string, content: string, contentType: string): Promise<void>;
58
+ uploadToS3(url: string, content: string | Buffer, contentType: string): Promise<void>;
54
59
  private request;
55
60
  }
56
61
  //# sourceMappingURL=api-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAEV,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAEpB,qBAAa,QAAS,SAAQ,KAAK;aAGf,IAAI,EAAE,MAAM;aACZ,MAAM,EAAE,MAAM;gBAF9B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM;CAKjC;AAKD,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,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M,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAQjF,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIrD,gBAAgB,IAAI,OAAO,CAAC,eAAe,CAAC;IAI5C,YAAY,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAIzC,aAAa,CAAC,MAAM,EAAE;QAC1B,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAI5B,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAc7E,OAAO;CAsCtB"}
@@ -55,10 +55,12 @@ class ZephApiClient {
55
55
  return this.request('POST', '/files/upload-request', params);
56
56
  }
57
57
  async uploadToS3(url, content, contentType) {
58
+ const isText = typeof content === 'string';
59
+ const body = isText ? content : new Uint8Array(content);
58
60
  const response = await fetch(url, {
59
61
  method: 'PUT',
60
- headers: { 'Content-Type': `${contentType}; charset=utf-8` },
61
- body: content,
62
+ headers: { 'Content-Type': isText ? `${contentType}; charset=utf-8` : contentType },
63
+ body,
62
64
  signal: AbortSignal.timeout(DEFAULT_TIMEOUT_MS),
63
65
  });
64
66
  if (!response.ok) {
@@ -0,0 +1,58 @@
1
+ /**
2
+ * E2E encryption for MCP server — self-contained ECDH P-256 + AES-256-GCM
3
+ * Mirrors @zeph/crypto API but bundled inline (no external dependency).
4
+ * Uses Web Crypto API (globalThis.crypto.subtle) — Node.js 18+.
5
+ */
6
+ /**
7
+ * Initialize crypto: load or generate ECDH key pair.
8
+ * Safe to call concurrently — deduplicates to single init.
9
+ * Returns the exported public key (Base64 SPKI).
10
+ */
11
+ export declare const initCrypto: () => Promise<string>;
12
+ export declare const getKeyPair: () => CryptoKeyPair | null;
13
+ export declare const getPublicKey: () => string | null;
14
+ /**
15
+ * Encrypt push body for a recipient.
16
+ * Returns fields ready to merge into the sendPush payload.
17
+ */
18
+ export declare const encryptPushBody: (input: {
19
+ title?: string;
20
+ body?: string;
21
+ url?: string;
22
+ }, recipientPublicKeyRaw: string) => Promise<{
23
+ body: string;
24
+ encryptedKey: string;
25
+ senderPublicKey: string;
26
+ isEncrypted: true;
27
+ }>;
28
+ /**
29
+ * Encrypt push body for self (all own devices).
30
+ */
31
+ export declare const encryptPushBodyForSelf: (input: {
32
+ title?: string;
33
+ body?: string;
34
+ url?: string;
35
+ }) => Promise<{
36
+ body: string;
37
+ encryptedKey: string;
38
+ senderPublicKey: string;
39
+ isEncrypted: true;
40
+ }>;
41
+ /**
42
+ * Encrypt file content for a recipient.
43
+ * Returns encrypted buffer + key material for file attachment metadata.
44
+ */
45
+ export declare const encryptFileForRecipient: (content: string, recipientPublicKeyRaw: string) => Promise<{
46
+ ciphertext: Buffer;
47
+ iv: string;
48
+ encryptedKey: string;
49
+ }>;
50
+ /**
51
+ * Encrypt file content for self (all own devices).
52
+ */
53
+ export declare const encryptFileForSelf: (content: string) => Promise<{
54
+ ciphertext: Buffer;
55
+ iv: string;
56
+ encryptedKey: string;
57
+ }>;
58
+ //# sourceMappingURL=crypto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../src/crypto.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA0JH;;;;GAIG;AACH,eAAO,MAAM,UAAU,QAAO,OAAO,CAAC,MAAM,CAoB3C,CAAC;AAEF,eAAO,MAAM,UAAU,QAAO,aAAa,GAAG,IAAqB,CAAC;AACpE,eAAO,MAAM,YAAY,QAAO,MAAM,GAAG,IAA+B,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,EACtD,uBAAuB,MAAM,KAC5B,OAAO,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,IAAI,CAAC;CACnB,CAeA,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,KACrD,OAAO,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,IAAI,CAAC;CACnB,CAaA,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAClC,SAAS,MAAM,EACf,uBAAuB,MAAM,KAC5B,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CASlE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,MAAM,KACd,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAQlE,CAAC"}
package/dist/crypto.js ADDED
@@ -0,0 +1,193 @@
1
+ "use strict";
2
+ /**
3
+ * E2E encryption for MCP server — self-contained ECDH P-256 + AES-256-GCM
4
+ * Mirrors @zeph/crypto API but bundled inline (no external dependency).
5
+ * Uses Web Crypto API (globalThis.crypto.subtle) — Node.js 18+.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.encryptFileForSelf = exports.encryptFileForRecipient = exports.encryptPushBodyForSelf = exports.encryptPushBody = exports.getPublicKey = exports.getKeyPair = exports.initCrypto = void 0;
9
+ /// <reference lib="dom" />
10
+ const fs_1 = require("fs");
11
+ const path_1 = require("path");
12
+ // ─── Base64 helpers ───
13
+ const toBase64 = (buffer) => {
14
+ const bytes = new Uint8Array(buffer);
15
+ let binary = '';
16
+ for (let i = 0; i < bytes.length; i++) {
17
+ binary += String.fromCharCode(bytes[i]);
18
+ }
19
+ return btoa(binary);
20
+ };
21
+ const fromBase64 = (base64) => {
22
+ const binary = atob(base64);
23
+ const bytes = new Uint8Array(binary.length);
24
+ for (let i = 0; i < binary.length; i++) {
25
+ bytes[i] = binary.charCodeAt(i);
26
+ }
27
+ return bytes.buffer;
28
+ };
29
+ // ─── ECDH key management ───
30
+ const ECDH_PARAMS = { name: 'ECDH', namedCurve: 'P-256' };
31
+ const generateKeyPair = async () => crypto.subtle.generateKey(ECDH_PARAMS, true, ['deriveKey', 'deriveBits']);
32
+ const exportKeyPair = async (keyPair) => {
33
+ const [publicRaw, privateRaw] = await Promise.all([
34
+ crypto.subtle.exportKey('spki', keyPair.publicKey),
35
+ crypto.subtle.exportKey('pkcs8', keyPair.privateKey),
36
+ ]);
37
+ return { publicKey: toBase64(publicRaw), privateKey: toBase64(privateRaw) };
38
+ };
39
+ const importPublicKey = async (base64) => crypto.subtle.importKey('spki', fromBase64(base64), ECDH_PARAMS, true, []);
40
+ const importPrivateKey = async (base64) => crypto.subtle.importKey('pkcs8', fromBase64(base64), ECDH_PARAMS, true, ['deriveKey', 'deriveBits']);
41
+ const importKeyPair = async (exported) => {
42
+ const [publicKey, privateKey] = await Promise.all([
43
+ importPublicKey(exported.publicKey),
44
+ importPrivateKey(exported.privateKey),
45
+ ]);
46
+ return { publicKey, privateKey };
47
+ };
48
+ const deriveAesKey = async (privateKey, publicKey) => crypto.subtle.deriveKey({ name: 'ECDH', public: publicKey }, privateKey, { name: 'AES-GCM', length: 256 }, false, ['encrypt', 'decrypt']);
49
+ const encrypt = async (plaintext, senderPrivateKey, recipientPublicKey) => {
50
+ const messageKey = await crypto.subtle.generateKey({ name: 'AES-GCM', length: 256 }, true, ['encrypt', 'decrypt']);
51
+ const iv = crypto.getRandomValues(new Uint8Array(12));
52
+ const ciphertext = await crypto.subtle.encrypt({ name: 'AES-GCM', iv }, messageKey, new TextEncoder().encode(plaintext));
53
+ const sharedKey = await deriveAesKey(senderPrivateKey, recipientPublicKey);
54
+ const rawMessageKey = await crypto.subtle.exportKey('raw', messageKey);
55
+ const keyIv = crypto.getRandomValues(new Uint8Array(12));
56
+ const encryptedKey = await crypto.subtle.encrypt({ name: 'AES-GCM', iv: keyIv }, sharedKey, rawMessageKey);
57
+ return {
58
+ ciphertext: toBase64(ciphertext),
59
+ iv: toBase64(iv.buffer),
60
+ encryptedKey: toBase64(encryptedKey),
61
+ keyIv: toBase64(keyIv.buffer),
62
+ };
63
+ };
64
+ // ─── File encryption ───
65
+ const encryptFileContent = async (content, senderPrivateKey, recipientPublicKey) => {
66
+ const buffer = new TextEncoder().encode(content).buffer;
67
+ const fileKey = await crypto.subtle.generateKey({ name: 'AES-GCM', length: 256 }, true, ['encrypt', 'decrypt']);
68
+ const iv = crypto.getRandomValues(new Uint8Array(12));
69
+ const ciphertext = await crypto.subtle.encrypt({ name: 'AES-GCM', iv }, fileKey, buffer);
70
+ const sharedKey = await deriveAesKey(senderPrivateKey, recipientPublicKey);
71
+ const rawFileKey = await crypto.subtle.exportKey('raw', fileKey);
72
+ const keyIv = crypto.getRandomValues(new Uint8Array(12));
73
+ const encryptedKey = await crypto.subtle.encrypt({ name: 'AES-GCM', iv: keyIv }, sharedKey, rawFileKey);
74
+ return {
75
+ ciphertext: Buffer.from(ciphertext),
76
+ iv: toBase64(iv.buffer),
77
+ encryptedKey: toBase64(encryptedKey),
78
+ keyIv: toBase64(keyIv.buffer),
79
+ };
80
+ };
81
+ // ─── Key persistence (~/.config/zeph/keys.json) ───
82
+ const KEYS_DIR = (0, path_1.join)(process.env.HOME ?? '~', '.config', 'zeph');
83
+ const KEYS_PATH = (0, path_1.join)(KEYS_DIR, 'keys.json');
84
+ const loadStoredKeys = () => {
85
+ try {
86
+ return JSON.parse((0, fs_1.readFileSync)(KEYS_PATH, 'utf-8'));
87
+ }
88
+ catch {
89
+ return null;
90
+ }
91
+ };
92
+ const storeKeys = (exported) => {
93
+ (0, fs_1.mkdirSync)(KEYS_DIR, { recursive: true });
94
+ (0, fs_1.writeFileSync)(KEYS_PATH, JSON.stringify(exported, null, 2), { mode: 0o600 });
95
+ };
96
+ // ─── Cached state ───
97
+ let cachedKeyPair = null;
98
+ let cachedExportedPublicKey = null;
99
+ let cachedOwnPublicKey = null;
100
+ let initPromise = null;
101
+ /**
102
+ * Initialize crypto: load or generate ECDH key pair.
103
+ * Safe to call concurrently — deduplicates to single init.
104
+ * Returns the exported public key (Base64 SPKI).
105
+ */
106
+ const initCrypto = () => {
107
+ if (initPromise)
108
+ return initPromise;
109
+ initPromise = (async () => {
110
+ const stored = loadStoredKeys();
111
+ if (stored) {
112
+ cachedKeyPair = await importKeyPair(stored);
113
+ cachedExportedPublicKey = stored.publicKey;
114
+ cachedOwnPublicKey = cachedKeyPair.publicKey;
115
+ return stored.publicKey;
116
+ }
117
+ const keyPair = await generateKeyPair();
118
+ const exported = await exportKeyPair(keyPair);
119
+ storeKeys(exported);
120
+ cachedKeyPair = keyPair;
121
+ cachedExportedPublicKey = exported.publicKey;
122
+ cachedOwnPublicKey = keyPair.publicKey;
123
+ return exported.publicKey;
124
+ })();
125
+ return initPromise;
126
+ };
127
+ exports.initCrypto = initCrypto;
128
+ const getKeyPair = () => cachedKeyPair;
129
+ exports.getKeyPair = getKeyPair;
130
+ const getPublicKey = () => cachedExportedPublicKey;
131
+ exports.getPublicKey = getPublicKey;
132
+ /**
133
+ * Encrypt push body for a recipient.
134
+ * Returns fields ready to merge into the sendPush payload.
135
+ */
136
+ const encryptPushBody = async (input, recipientPublicKeyRaw) => {
137
+ if (!cachedKeyPair || !cachedExportedPublicKey)
138
+ throw new Error('Crypto not initialized');
139
+ const recipientKey = await importPublicKey(recipientPublicKeyRaw);
140
+ const payload = await encrypt(JSON.stringify({ title: input.title, body: input.body, url: input.url }), cachedKeyPair.privateKey, recipientKey);
141
+ return {
142
+ body: JSON.stringify({ ciphertext: payload.ciphertext, iv: payload.iv }),
143
+ encryptedKey: JSON.stringify({ encryptedKey: payload.encryptedKey, keyIv: payload.keyIv }),
144
+ senderPublicKey: cachedExportedPublicKey,
145
+ isEncrypted: true,
146
+ };
147
+ };
148
+ exports.encryptPushBody = encryptPushBody;
149
+ /**
150
+ * Encrypt push body for self (all own devices).
151
+ */
152
+ const encryptPushBodyForSelf = async (input) => {
153
+ if (!cachedKeyPair || !cachedExportedPublicKey || !cachedOwnPublicKey)
154
+ throw new Error('Crypto not initialized');
155
+ const payload = await encrypt(JSON.stringify({ title: input.title, body: input.body, url: input.url }), cachedKeyPair.privateKey, cachedOwnPublicKey);
156
+ return {
157
+ body: JSON.stringify({ ciphertext: payload.ciphertext, iv: payload.iv }),
158
+ encryptedKey: JSON.stringify({ encryptedKey: payload.encryptedKey, keyIv: payload.keyIv }),
159
+ senderPublicKey: cachedExportedPublicKey,
160
+ isEncrypted: true,
161
+ };
162
+ };
163
+ exports.encryptPushBodyForSelf = encryptPushBodyForSelf;
164
+ /**
165
+ * Encrypt file content for a recipient.
166
+ * Returns encrypted buffer + key material for file attachment metadata.
167
+ */
168
+ const encryptFileForRecipient = async (content, recipientPublicKeyRaw) => {
169
+ if (!cachedKeyPair)
170
+ throw new Error('Crypto not initialized');
171
+ const recipientKey = await importPublicKey(recipientPublicKeyRaw);
172
+ const result = await encryptFileContent(content, cachedKeyPair.privateKey, recipientKey);
173
+ return {
174
+ ciphertext: result.ciphertext,
175
+ iv: result.iv,
176
+ encryptedKey: JSON.stringify({ encryptedKey: result.encryptedKey, keyIv: result.keyIv }),
177
+ };
178
+ };
179
+ exports.encryptFileForRecipient = encryptFileForRecipient;
180
+ /**
181
+ * Encrypt file content for self (all own devices).
182
+ */
183
+ const encryptFileForSelf = async (content) => {
184
+ if (!cachedKeyPair || !cachedOwnPublicKey)
185
+ throw new Error('Crypto not initialized');
186
+ const result = await encryptFileContent(content, cachedKeyPair.privateKey, cachedOwnPublicKey);
187
+ return {
188
+ ciphertext: result.ciphertext,
189
+ iv: result.iv,
190
+ encryptedKey: JSON.stringify({ encryptedKey: result.encryptedKey, keyIv: result.keyIv }),
191
+ };
192
+ };
193
+ exports.encryptFileForSelf = encryptFileForSelf;
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
7
7
  const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
8
8
  const config_js_1 = require("./config.js");
9
9
  const api_client_js_1 = require("./api-client.js");
10
+ const crypto_js_1 = require("./crypto.js");
10
11
  const notify_js_1 = require("./tools/notify.js");
11
12
  const prompt_js_1 = require("./tools/prompt.js");
12
13
  const input_js_1 = require("./tools/input.js");
@@ -66,6 +67,14 @@ const createServer = () => {
66
67
  return server;
67
68
  };
68
69
  const main = async () => {
70
+ // Initialize E2E encryption keys (load or generate)
71
+ try {
72
+ const publicKey = await (0, crypto_js_1.initCrypto)();
73
+ console.error(`[Crypto] E2E encryption ready (publicKey: ${publicKey.slice(0, 20)}...)`);
74
+ }
75
+ catch (err) {
76
+ console.error('[Crypto] E2E encryption unavailable:', err);
77
+ }
69
78
  const server = createServer();
70
79
  const transport = new stdio_js_1.StdioServerTransport();
71
80
  await server.connect(transport);
@@ -1 +1 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/tools/file.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,eAAO,MAAM,gBAAgB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,EAAE,QAAQ,eAAe,SA2CjG,CAAC"}
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/tools/file.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAwBpD,eAAO,MAAM,gBAAgB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,EAAE,QAAQ,eAAe,SA0EjG,CAAC"}
@@ -3,6 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.registerFileTool = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const error_format_js_1 = require("../error-format.js");
6
+ const crypto_js_1 = require("../crypto.js");
7
+ const inferMimeType = (fileName) => {
8
+ const ext = fileName.split('.').pop()?.toLowerCase();
9
+ const map = {
10
+ txt: 'text/plain',
11
+ json: 'application/json',
12
+ csv: 'text/csv',
13
+ md: 'text/markdown',
14
+ html: 'text/html',
15
+ xml: 'text/xml',
16
+ yaml: 'text/yaml',
17
+ yml: 'text/yaml',
18
+ log: 'text/plain',
19
+ ts: 'text/typescript',
20
+ js: 'text/javascript',
21
+ py: 'text/x-python',
22
+ sh: 'text/x-shellscript',
23
+ };
24
+ return map[ext ?? ''] ?? 'text/plain';
25
+ };
6
26
  const registerFileTool = (server, client, config) => {
7
27
  server.registerTool('zeph_file', {
8
28
  description: 'Send a text file to the user\'s device. The content is uploaded and delivered as a file push. Use for logs, reports, code snippets, or any text content.',
@@ -19,20 +39,50 @@ const registerFileTool = (server, client, config) => {
19
39
  },
20
40
  }, async ({ fileName, content, title, targetDeviceId }) => {
21
41
  try {
22
- const fileType = inferMimeType(fileName);
23
- const fileSize = new TextEncoder().encode(content).byteLength;
24
- // Step 1: Request upload URL
25
- const upload = await client.requestUpload({ fileName, fileType, fileSize });
26
- // Step 2: Upload content to S3
27
- await client.uploadToS3(upload.data.uploadUrl, content, fileType);
28
- // Step 3: Send file push
29
- const result = await client.sendPush({
30
- title: title ?? fileName,
42
+ const canEncrypt = !!(0, crypto_js_1.getKeyPair)() && !!(0, crypto_js_1.getPublicKey)();
43
+ let fileType = inferMimeType(fileName);
44
+ const originalSize = new TextEncoder().encode(content).byteLength;
45
+ // Step 1: Optionally encrypt file content
46
+ let uploadContent = content;
47
+ let uploadSize = originalSize;
48
+ let fileIv;
49
+ let fileEncryptedKey;
50
+ if (canEncrypt) {
51
+ try {
52
+ const encrypted = await (0, crypto_js_1.encryptFileForSelf)(content);
53
+ uploadContent = encrypted.ciphertext;
54
+ uploadSize = encrypted.ciphertext.length;
55
+ fileType = 'application/octet-stream';
56
+ fileIv = encrypted.iv;
57
+ fileEncryptedKey = encrypted.encryptedKey;
58
+ }
59
+ catch (err) {
60
+ console.error('[Crypto] File encryption failed, sending plaintext:', err);
61
+ }
62
+ }
63
+ // Step 2: Request upload URL
64
+ const upload = await client.requestUpload({ fileName, fileType, fileSize: uploadSize });
65
+ // Step 3: Upload content to S3
66
+ await client.uploadToS3(upload.data.uploadUrl, uploadContent, fileType);
67
+ // Step 4: Send file push (encrypt push body if possible)
68
+ const pushTitle = title ?? fileName;
69
+ let pushPayload = {
70
+ title: pushTitle,
31
71
  type: 'file',
32
- files: [{ fileKey: upload.data.fileKey, fileName, fileSize, fileType }],
72
+ files: [{ fileKey: upload.data.fileKey, fileName, fileSize: originalSize, fileType: inferMimeType(fileName), iv: fileIv, encryptedKey: fileEncryptedKey }],
33
73
  targetDeviceId: targetDeviceId ?? config.deviceId,
34
- });
35
- return (0, error_format_js_1.textResult)({ pushId: result.data.pushId, fileKey: upload.data.fileKey, fileSize });
74
+ };
75
+ if (canEncrypt) {
76
+ try {
77
+ const enc = await (0, crypto_js_1.encryptPushBodyForSelf)({ title: pushTitle });
78
+ pushPayload = { ...pushPayload, title: undefined, body: enc.body, isEncrypted: enc.isEncrypted, encryptedKey: enc.encryptedKey, senderPublicKey: enc.senderPublicKey };
79
+ }
80
+ catch (err) {
81
+ console.error('[Crypto] Push encryption failed, sending plaintext:', err);
82
+ }
83
+ }
84
+ const result = await client.sendPush(pushPayload);
85
+ return (0, error_format_js_1.textResult)({ pushId: result.data.pushId, fileKey: upload.data.fileKey, fileSize: originalSize, encrypted: canEncrypt });
36
86
  }
37
87
  catch (err) {
38
88
  return (0, error_format_js_1.formatToolError)(err);
@@ -40,22 +90,3 @@ const registerFileTool = (server, client, config) => {
40
90
  });
41
91
  };
42
92
  exports.registerFileTool = registerFileTool;
43
- const inferMimeType = (fileName) => {
44
- const ext = fileName.split('.').pop()?.toLowerCase();
45
- const map = {
46
- txt: 'text/plain',
47
- json: 'application/json',
48
- csv: 'text/csv',
49
- md: 'text/markdown',
50
- html: 'text/html',
51
- xml: 'text/xml',
52
- yaml: 'text/yaml',
53
- yml: 'text/yaml',
54
- log: 'text/plain',
55
- ts: 'text/typescript',
56
- js: 'text/javascript',
57
- py: 'text/x-python',
58
- sh: 'text/x-shellscript',
59
- };
60
- return map[ext ?? ''] ?? 'text/plain';
61
- };
@@ -1 +1 @@
1
- {"version":3,"file":"notify.d.ts","sourceRoot":"","sources":["../../src/tools/notify.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAWpD,eAAO,MAAM,kBAAkB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,EAAE,QAAQ,eAAe,SA+DnG,CAAC"}
1
+ {"version":3,"file":"notify.d.ts","sourceRoot":"","sources":["../../src/tools/notify.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAYpD,eAAO,MAAM,kBAAkB,GAAI,QAAQ,SAAS,EAAE,QAAQ,aAAa,EAAE,QAAQ,eAAe,SA2GnG,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.registerNotifyTool = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const error_format_js_1 = require("../error-format.js");
6
+ const crypto_js_1 = require("../crypto.js");
6
7
  const BODY_FILE_THRESHOLD = 0;
7
8
  const PREVIEW_LENGTH = 200;
8
9
  const inferMimeType = (fileName) => {
@@ -33,33 +34,73 @@ const registerNotifyTool = (server, client, config) => {
33
34
  const deviceId = targetDeviceId ?? config.deviceId;
34
35
  const bodyBytes = body ? new TextEncoder().encode(body).byteLength : 0;
35
36
  const isLongBody = bodyBytes > BODY_FILE_THRESHOLD;
37
+ const canEncrypt = !!(0, crypto_js_1.getKeyPair)() && !!(0, crypto_js_1.getPublicKey)();
36
38
  if (isLongBody && body) {
37
39
  const fileName = 'response.md';
38
40
  const fileType = inferMimeType(fileName);
39
41
  const fileSize = bodyBytes;
40
- const upload = await client.requestUpload({ fileName, fileType, fileSize });
41
- await client.uploadToS3(upload.data.uploadUrl, body, fileType);
42
+ // Encrypt file content if keys available
43
+ let uploadContent = body;
44
+ let uploadContentType = fileType;
45
+ let fileIv;
46
+ let fileEncryptedKey;
47
+ if (canEncrypt) {
48
+ try {
49
+ const encrypted = await (0, crypto_js_1.encryptFileForSelf)(body);
50
+ uploadContent = encrypted.ciphertext;
51
+ uploadContentType = 'application/octet-stream';
52
+ fileIv = encrypted.iv;
53
+ fileEncryptedKey = encrypted.encryptedKey;
54
+ }
55
+ catch (err) {
56
+ console.error('[Crypto] File encryption failed, sending plaintext:', err);
57
+ }
58
+ }
59
+ const upload = await client.requestUpload({ fileName, fileType: uploadContentType, fileSize: typeof uploadContent === 'string' ? fileSize : uploadContent.length });
60
+ await client.uploadToS3(upload.data.uploadUrl, uploadContent, uploadContentType);
42
61
  const preview = body.length > PREVIEW_LENGTH ? body.slice(0, PREVIEW_LENGTH) + '...' : body;
43
- const result = await client.sendPush({
62
+ // Encrypt push body (title/preview/url) if keys available
63
+ let pushPayload = {
44
64
  title,
45
65
  body: preview,
46
66
  url,
47
67
  type: 'file',
48
68
  priority,
49
- files: [{ fileKey: upload.data.fileKey, fileName, fileSize, fileType }],
69
+ files: [{ fileKey: upload.data.fileKey, fileName, fileSize, fileType, iv: fileIv, encryptedKey: fileEncryptedKey }],
50
70
  targetDeviceId: deviceId,
51
- });
52
- return (0, error_format_js_1.textResult)({ pushId: result.data.pushId, fileKey: upload.data.fileKey, autoFile: true });
71
+ };
72
+ if (canEncrypt) {
73
+ try {
74
+ const enc = await (0, crypto_js_1.encryptPushBodyForSelf)({ title, body: preview, url });
75
+ pushPayload = { ...pushPayload, title: undefined, body: enc.body, isEncrypted: enc.isEncrypted, encryptedKey: enc.encryptedKey, senderPublicKey: enc.senderPublicKey };
76
+ }
77
+ catch (err) {
78
+ console.error('[Crypto] Push encryption failed, sending plaintext:', err);
79
+ }
80
+ }
81
+ const result = await client.sendPush(pushPayload);
82
+ return (0, error_format_js_1.textResult)({ pushId: result.data.pushId, fileKey: upload.data.fileKey, autoFile: true, encrypted: canEncrypt });
53
83
  }
54
- const result = await client.sendPush({
84
+ // Short body encrypt push only
85
+ let pushPayload = {
55
86
  title,
56
87
  body,
57
88
  url,
58
89
  type: 'hook',
59
90
  priority,
60
91
  targetDeviceId: deviceId,
61
- });
62
- return (0, error_format_js_1.textResult)({ pushId: result.data.pushId });
92
+ };
93
+ if (canEncrypt) {
94
+ try {
95
+ const enc = await (0, crypto_js_1.encryptPushBodyForSelf)({ title, body, url });
96
+ pushPayload = { ...pushPayload, title: undefined, body: enc.body, isEncrypted: enc.isEncrypted, encryptedKey: enc.encryptedKey, senderPublicKey: enc.senderPublicKey };
97
+ }
98
+ catch (err) {
99
+ console.error('[Crypto] Push encryption failed, sending plaintext:', err);
100
+ }
101
+ }
102
+ const result = await client.sendPush(pushPayload);
103
+ return (0, error_format_js_1.textResult)({ pushId: result.data.pushId, encrypted: canEncrypt });
63
104
  }
64
105
  catch (err) {
65
106
  return (0, error_format_js_1.formatToolError)(err);
package/dist/types.d.ts CHANGED
@@ -34,6 +34,7 @@ export interface DeviceRecord {
34
34
  model?: string;
35
35
  isOnline?: boolean;
36
36
  lastSeenAt?: string;
37
+ publicKey?: string;
37
38
  }
38
39
  export interface DevicesResponse {
39
40
  data: DeviceRecord[];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;QAC5D,QAAQ,CAAC,EAAE;YACT,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;SAC5B,CAAC;KACH,CAAC;CACH;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EA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I,EAAE,aAAa,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeph-to/mcp-server",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "Zeph MCP server — AI agent notifications, prompts, and input via MCP protocol",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",