srift-transfer 2.2.12 → 2.2.13

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.
Files changed (4) hide show
  1. package/LICENSE +22 -21
  2. package/README.md +332 -134
  3. package/dist/index.js +28 -6
  4. package/package.json +16 -5
package/LICENSE CHANGED
@@ -1,21 +1,22 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 SRIFT
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2026 SRIFT (Sripto Corporation Private Limited)
4
+ https://srift.app
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md CHANGED
@@ -1,134 +1,332 @@
1
- # srift
2
-
3
- **Secure peer-to-peer file transfer and encrypted chat for AI agents and humans.** Ships an [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server so Claude, Cursor, Continue, Zed, Codex and any MCP-compatible agent can send and receive files directly — no accounts, no API keys, no cloud storage.
4
-
5
- ```bash
6
- npm install -g srift-transfer
7
- ```
8
-
9
- ---
10
-
11
- ## Why
12
-
13
- Coding agents can read and write files in their own sandbox, but they have no good way to get a file **to you** — or to another machine. Attaching, uploading and pasting all break down for anything large or binary.
14
-
15
- SRIFT gives an agent one tool call that produces a link a human can open:
16
-
17
- ```
18
- srift_quick_share({ filepath: "./build/report.pdf" })
19
- → https://srift.app/d/a1b2c3d
20
- ```
21
-
22
- No signup on either end. Payloads are AES-256-GCM encrypted end-to-end; keys derive locally from the session ID (plus an optional room secret) and are never sent to the server.
23
-
24
- ## Quick start
25
-
26
- ```bash
27
- npm install -g srift-transfer
28
-
29
- srift quick-share ./report.pdf # public link, open anywhere
30
- srift session start # long-lived room, host approves joins
31
- srift status # daemon + session + transfers
32
- srift doctor # full health check
33
- ```
34
-
35
- ## Use as an MCP server
36
-
37
- Register SRIFT with any MCP client:
38
-
39
- ```bash
40
- srift install-mcp # print config snippets for every supported IDE
41
- srift install-mcp --auto # write directly into Claude Desktop's config
42
- ```
43
-
44
- Or configure it manually:
45
-
46
- ```json
47
- {
48
- "mcpServers": {
49
- "srift": {
50
- "command": "srift",
51
- "args": ["mcp"]
52
- }
53
- }
54
- }
55
- ```
56
-
57
- Works in **Claude Desktop, Claude Code, Cursor, Continue, Zed, Codex, Windsurf** and any client speaking MCP `2025-06-18` (backward compatible with `2024-11-05`).
58
-
59
- ### Transports
60
-
61
- | Transport | Endpoint |
62
- |---|---|
63
- | stdio | `srift mcp` |
64
- | Streamable HTTP | `POST http://127.0.0.1:3822/mcp` |
65
- | SSE (legacy) | `GET http://127.0.0.1:3822/mcp/sse` |
66
-
67
- ### Tools exposed
68
-
69
- | Tool | Purpose |
70
- |---|---|
71
- | `srift_quick_share` | One-step public download link for a file |
72
- | `srift_start_session` | Open a session; returns 7-character ID + URL |
73
- | `srift_join_session` | Request to join a session |
74
- | `srift_session_status` | Current session, peers, state |
75
- | `srift_close_session` | Tear down the session |
76
- | `srift_send_file` | Offer a file to joined peers |
77
- | `srift_accept_transfer` | Accept an incoming offer |
78
- | `srift_list_transfers` | List active transfers |
79
- | `srift_approve_join` / `srift_reject_join` / `srift_kick_user` | Host controls |
80
- | `srift_send_chat` / `srift_chat_history` | Encrypted chat |
81
- | `srift_read_state` | Read workspace state |
82
-
83
- Resources: `srift://session/status`, `srift://transfers/active`, `srift://chat/messages`, `srift://workspace/state`, `srift://docs/quickstart`
84
-
85
- Prompts: `send_file_to_user`, `receive_file_from_user`, `start_collab_session`
86
-
87
- ## CLI reference
88
-
89
- ```
90
- Sessions srift session start | join <id> | status | close
91
- Transfers srift quick-share <file> [--ttl 15m] [--once] [--max-downloads N]
92
- srift send <file> | receive <file-id> | list | monitor <file-id>
93
- Public srift pubshare list | add <file> | revoke <token>
94
- Host srift approve <id> | reject <id> | kick <id>
95
- Chat srift chat send "<msg>" | chat history
96
- Agents srift install-mcp [--auto] | bootstrap [dir] | info
97
- Daemon srift daemon start | stop | restart | status
98
- Maintenance srift status | doctor | logs | version | self-update | reset | config
99
- ```
100
-
101
- Every command accepts `--json` for machine-readable output — intended for agent use.
102
-
103
- ## How transfers work
104
-
105
- - **Small/medium files** stream over an authenticated WebSocket channel.
106
- - **Large files** (>10 MB) switch to WebTorrent swarm transfer where available.
107
- - **Browser-to-browser** sessions negotiate WebRTC data channels directly.
108
- - Content is encrypted client-side with **AES-256-GCM** before it leaves your machine. Relay infrastructure forwards ciphertext and does not hold decryption keys.
109
-
110
- `webtorrent` is an *optional* dependency — it pulls native modules that don't build everywhere. If it's unavailable, SRIFT logs a warning and falls back to WebSocket transfer; every other feature keeps working.
111
-
112
- ## Configuration
113
-
114
- | Variable | Default | Purpose |
115
- |---|---|---|
116
- | `SRIFT_DAEMON_PORT` | `3822` | Daemon port |
117
- | `SRIFT_NO_UPDATE_CHECK` | – | Set to `1` to disable update checks |
118
-
119
- Config file: `~/.srift/config.json` (`srift config get|set|delete`)
120
-
121
- ## Requirements
122
-
123
- Node.js >= 20.
124
-
125
- ## Links
126
-
127
- - Website — <https://srift.app>
128
- - Agent documentation — <https://srift.app/ai-agents>
129
- - OpenAPI spec — <https://srift.app/openapi.json>
130
- - `llms.txt` — <https://srift.app/llms.txt>
131
-
132
- ## License
133
-
134
- MIT
1
+ # srift-transfer
2
+
3
+ [![npm version](https://img.shields.io/npm/v/srift-transfer.svg?color=blue)](https://www.npmjs.com/package/srift-transfer)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen.svg)](https://nodejs.org/)
6
+ [![MCP Protocol](https://img.shields.io/badge/MCP-2025--06--18-purple.svg)](https://modelcontextprotocol.io)
7
+ [![Encryption: AES-256-GCM](https://img.shields.io/badge/Encryption-AES--256--GCM-green.svg)](https://srift.app)
8
+ [![Zero Telemetry](https://img.shields.io/badge/telemetry-zero-success.svg)](https://srift.app/privacy)
9
+
10
+ > **Zero-config, zero-token peer-to-peer secure file transfer, encrypted chat, and Model Context Protocol (MCP) server for AI coding agents & developers.**
11
+
12
+ Deliver any file from an AI agent sandbox (Claude, Cursor, Windsurf, Continue, Zed, Codex, Cline, Roo-Code, Devin) directly to a user in one tool call. End-to-end encrypted with AES-256-GCM. No cloud storage, no account signups, no API keys.
13
+
14
+ 🌐 **Web Platform:** [https://srift.app](https://srift.app)
15
+ 📦 **GitHub Repository:** [https://github.com/srivardhan113/SRIFT-Open_Source](https://github.com/srivardhan113/SRIFT-Open_Source)
16
+ 🤖 **AI Agent Hub:** [https://srift.app/ai-agents](https://srift.app/ai-agents)
17
+
18
+ ---
19
+
20
+ ## ⚡ Why SRIFT for AI Agents?
21
+
22
+ AI coding agents run in sandboxed environments. While they can create build artifacts, PDFs, database dumps, logs, and zip files on disk, getting those files **to the human developer** has historically been broken:
23
+ - ❌ **Base64 in chat**: Bloats prompt tokens, hits LLM output token limits, crashes browser windows.
24
+ - ❌ **Manual disk search**: Tells users to dig through obscure temporary directories (`/tmp/...` or `~/.cache/...`).
25
+ - ❌ **Cloud upload services**: Require configuring API keys, tokens, or third-party cloud accounts.
26
+
27
+ ### The SRIFT Solution: One Command, Instant Delivery
28
+
29
+ SRIFT gives your agent a local headless daemon and toolset to seed files locally and generate a direct, encrypted download link:
30
+
31
+ ```bash
32
+ srift quick-share ./dist/release-bundle.zip
33
+ # ↳ https://srift.app/d/7k3m9xq
34
+ ```
35
+
36
+ The user opens the link in any web browser or runs `curl -OJ https://srift.app/d/7k3m9xq` or `wget --content-disposition https://srift.app/d/7k3m9xq`. **The recipient needs nothing installed.**
37
+
38
+ **Session** transfers are end-to-end encrypted with **AES-256-GCM**, keys derived locally (PBKDF2-SHA256, 100,000 iterations) and never sent to us.
39
+
40
+ Public `quick-share` links are a deliberate exception, and it's worth being precise: the link is designed to be opened by any browser, `curl` or `wget` — clients that hold no key and run no SRIFT code. End-to-end encryption is therefore impossible on that path by definition. What SRIFT guarantees for quick-share is **zero retention**: bytes stream from the sender straight to the open HTTP response, are never written to SRIFT storage, and are served `Cache-Control: no-store`. If you need the relay to be unable to read the content, use a session transfer instead of a public link.
41
+
42
+ ---
43
+
44
+ ## 🚀 Installation
45
+
46
+ ### Global Install via npm (Node.js 20+)
47
+ ```bash
48
+ npm install -g srift-transfer
49
+ ```
50
+
51
+ ### Standalone Binary (Zero Node.js dependency)
52
+ - **macOS / Linux / WSL / Termux (POSIX sh):**
53
+ ```bash
54
+ curl -fsSL https://srift.app/install.sh | sh
55
+ ```
56
+ - **Windows PowerShell:**
57
+ ```powershell
58
+ irm https://srift.app/install.ps1 | iex
59
+ ```
60
+ - **Windows Command Prompt:**
61
+ ```cmd
62
+ powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://srift.app/install.ps1 | iex"
63
+ ```
64
+
65
+ ### On-Demand via npx
66
+ ```bash
67
+ npx srift-transfer quick-share ./build/output.zip
68
+ ```
69
+
70
+ ---
71
+
72
+ ## 🛠 Model Context Protocol (MCP) Setup
73
+
74
+ SRIFT ships a native Model Context Protocol server exposing **14 agent tools**, resources, and prompt templates over the local stdio/HTTP transports. The hosted endpoint exposes 8 of them (see below).
75
+
76
+ ### Automatic One-Command Setup
77
+ Run the auto-installer to print or register config into supported IDEs:
78
+ ```bash
79
+ srift install-mcp # prints copy-paste config for all major clients
80
+ srift install-mcp --auto # writes directly into Claude Desktop config
81
+ ```
82
+
83
+ ### Manual Client Configuration
84
+
85
+ #### Claude Desktop
86
+ Add to your `%APPDATA%\Claude\claude_desktop_config.json` (Windows) or `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):
87
+ ```json
88
+ {
89
+ "mcpServers": {
90
+ "srift": {
91
+ "command": "srift",
92
+ "args": ["mcp"]
93
+ }
94
+ }
95
+ }
96
+ ```
97
+
98
+ #### Cursor
99
+ Add to `~/.cursor/mcp.json` or workspace configuration:
100
+ ```json
101
+ {
102
+ "mcpServers": {
103
+ "srift": {
104
+ "command": "srift",
105
+ "args": ["mcp"]
106
+ }
107
+ }
108
+ }
109
+ ```
110
+
111
+ #### Windsurf
112
+ Add to `~/.codeium/windsurf/mcp_config.json`:
113
+ ```json
114
+ {
115
+ "mcpServers": {
116
+ "srift": {
117
+ "command": "srift",
118
+ "args": ["mcp"]
119
+ }
120
+ }
121
+ }
122
+ ```
123
+
124
+ #### Continue.dev
125
+ Add to `~/.continue/config.yaml`:
126
+ ```yaml
127
+ mcpServers:
128
+ - name: srift
129
+ command: srift
130
+ args: ["mcp"]
131
+ ```
132
+
133
+ #### Zed
134
+ Add to `~/.config/zed/settings.json`:
135
+ ```json
136
+ {
137
+ "context_servers": {
138
+ "srift": {
139
+ "command": { "path": "srift", "args": ["mcp"] }
140
+ }
141
+ }
142
+ }
143
+ ```
144
+
145
+ #### Cloud & Browser-Based Agents (Zero-Install MCP)
146
+ For web-based agents (ChatGPT, Claude.ai, Gemini, Perplexity) that cannot run local binaries.
147
+
148
+ > **The hosted endpoint exposes 8 of the 14 tools** — session and peer orchestration only
149
+ > (`start_session`, `join_session`, `session_status`, `close_session`, `approve_join`,
150
+ > `reject_join`, `kick_user`, `list_transfers`).
151
+ > `quick_share`, `send_file`, `accept_transfer`, `send_chat`, `chat_history` and `read_state`
152
+ > are **local-only**: the first three need access to your disk, and the chat tools would
153
+ > require deriving session keys server-side. Install the CLI if you need those.
154
+ ```json
155
+ {
156
+ "mcpServers": {
157
+ "srift": {
158
+ "type": "streamable-http",
159
+ "url": "https://srift.app/mcp"
160
+ }
161
+ }
162
+ }
163
+ ```
164
+
165
+ ---
166
+
167
+ ## 🧰 MCP Tools Reference (14 Tools)
168
+
169
+ | Tool | Parameters | Description |
170
+ |---|---|---|
171
+ | `srift_quick_share` | `filePath` (string), `maxDownloads?` (number), `ttlMs?` (number) | **Primary tool.** Seeds file and returns public `https://srift.app/d/<token>` download URL. |
172
+ | `srift_start_session` | `sessionName?` (string), `roomSecret?` (string) | Starts a new peer session with host role; returns room code & URL. |
173
+ | `srift_join_session` | `sessionId` (string), `username?` (string), `roomSecret?` (string) | Requests to join an existing session as a peer. |
174
+ | `srift_session_status` | _none_ | Retrieves active session state, role, connected peers, and pending joins. |
175
+ | `srift_close_session` | _none_ | Closes active room, terminates peer channels, and securely flushes encryption keys. |
176
+ | `srift_approve_join` | `tempUserId` (string) | Host control: approves a pending user join request. |
177
+ | `srift_reject_join` | `tempUserId` (string), `reason?` (string) | Host control: rejects a pending user join request. |
178
+ | `srift_kick_user` | `userId` (string) | Host control: kicks an active user from the session room. |
179
+ | `srift_send_file` | `filePath` (string), `protocol?` ("webtorrent" \| "websocket") | Offers a file for direct peer-to-peer transfer to joined peers. |
180
+ | `srift_accept_transfer` | `fileId` (string), `saveDir?` (string) | Accepts an inbound file offer and streams it to local disk. |
181
+ | `srift_list_transfers` | _none_ | Lists active transfers with progress percentage, speed (KB/s), and ETA. |
182
+ | `srift_send_chat` | `message` (string) | Sends an end-to-end encrypted chat message to the active session. |
183
+ | `srift_chat_history` | _none_ | Returns decrypted chat message history for the active session. |
184
+ | `srift_read_state` | _none_ | Returns atomic snapshot of `.srift-state.json` (transfers, session, peers). |
185
+
186
+ ### MCP Resources & Prompts
187
+ - **Resources**: `srift://session/status`, `srift://transfers/active`, `srift://chat/messages`, `srift://workspace/state`, `srift://docs/quickstart`
188
+ - **Prompts**: `send_file_to_user`, `receive_file_from_user`, `start_collab_session`
189
+
190
+ ---
191
+
192
+ ## 💻 CLI Command Reference
193
+
194
+ All CLI commands support `--json` for machine-readable JSON output suitable for subagents and CI/CD pipelines.
195
+
196
+ ### Public File Sharing (Recipient needs nothing installed)
197
+ ```bash
198
+ # Generate public link with unlimited downloads and no expiration
199
+ srift quick-share /path/to/archive.zip
200
+
201
+ # Single-use link (invalidates immediately after first completed download)
202
+ srift quick-share /path/to/database.sql --once
203
+
204
+ # Time-limited link with automatic expiration
205
+ srift quick-share /path/to/report.pdf --ttl 15m # supports: 30s, 15m, 2h, 1d
206
+
207
+ # Download cap limit
208
+ srift quick-share /path/to/installer.exe --max-downloads 5
209
+
210
+ # Manage active links
211
+ srift pubshare list # list all active public links and counters
212
+ srift pubshare revoke <token> # immediately revoke an active link
213
+ ```
214
+
215
+ ### Collaborative Sessions & P2P Rooms
216
+ ```bash
217
+ srift session start [--name "Project Review"] # create session as host
218
+ srift session join <session-id> # join existing room
219
+ srift session status # view peers and role
220
+ srift session close # teardown room & clear keys
221
+ ```
222
+
223
+ ### P2P File Transfers
224
+ ```bash
225
+ srift send <file-path> # offer file to peers in room
226
+ srift receive <file-id> [--save-dir ./downloads] # accept incoming file transfer
227
+ srift list # list active transfers
228
+ srift monitor <file-id> [--json-stream] # live transfer progress stream
229
+ ```
230
+
231
+ ### Moderation & Encrypted Chat
232
+ ```bash
233
+ srift approve <user-id> # host: approve join request
234
+ srift reject <user-id> [--reason <msg>] # host: reject join request
235
+ srift kick <user-id> # host: kick participant
236
+ srift chat send "Analysis complete." # send encrypted message
237
+ srift chat history # view decrypted room history
238
+ ```
239
+
240
+ ### Daemon & Diagnostics
241
+ ```bash
242
+ srift daemon start # run daemon in foreground
243
+ srift daemon status # daemon status and port
244
+ srift daemon restart # restart daemon process
245
+ srift doctor # diagnostic health check
246
+ srift logs [--tail 100] # inspect daemon activity logs
247
+ srift reset # flush session state & keys
248
+ srift self-update # update to latest version
249
+ ```
250
+
251
+ ---
252
+
253
+ ## 🌐 Headless Daemon & REST API
254
+
255
+ The SRIFT daemon auto-starts on port `3822` (default) on the local loopback interface (`127.0.0.1`). Any language, framework, or automation tool (Python, Go, Rust, LangChain, LlamaIndex, n8n, Zapier) can call it directly:
256
+
257
+ ```bash
258
+ # Deliver file via REST API
259
+ curl -X POST http://127.0.0.1:3822/quick-share \
260
+ -H "Content-Type: application/json" \
261
+ -d '{"filePath": "/abs/path/to/file.zip"}'
262
+
263
+ # Response:
264
+ # {
265
+ # "sessionId": "ABC1234",
266
+ # "fileId": "file_xyz789",
267
+ # "downloadUrl": "https://srift.app/d/7k3m9xq",
268
+ # "fileName": "file.zip",
269
+ # "fileSize": 10485760
270
+ # }
271
+ ```
272
+
273
+ ### Server-Sent Events (SSE) Stream
274
+ Subscribe to real-time events without polling:
275
+ ```bash
276
+ curl -N http://127.0.0.1:3822/api/v1/monitor/events
277
+ ```
278
+ Events emitted: `connection_state`, `join_request`, `file_offer`, `transfer_progress`, `chat_received`.
279
+
280
+ ---
281
+
282
+ ## 🔐 Architecture & Security
283
+
284
+ - **End-to-End Cryptography**: All transferred data is encrypted client-side using **AES-256-GCM** with a distinct 12-byte initialization vector (IV) per block. Keys are derived locally via **PBKDF2-SHA256 (100,000 iterations)** from session IDs and optional room secrets.
285
+ - **Adaptive Transport Stack**:
286
+ 1. **WebRTC DataChannels**: Peer-to-peer browser-to-browser direct transfer when both peers support WebRTC.
287
+ 2. **WebTorrent**: Swarm-assisted peer-to-peer distribution for large files.
288
+ 3. **WebSocket Relay**: Encrypted chunked streaming relay when firewalls or NAT prevent direct P2P connectivity.
289
+ - **Privacy First**: The daemon binds to `127.0.0.1` only. Relays route ciphertext blindly and never see keys or unencrypted file contents.
290
+
291
+ ---
292
+
293
+ ## ⚙️ Configuration
294
+
295
+ Set custom configuration options via environment variables or `~/.srift/config.json`:
296
+
297
+ | Environment Variable | Default | Description |
298
+ |---|---|---|
299
+ | `SRIFT_DAEMON_PORT` | `3822` | Port for the local background daemon |
300
+ | `SRIFT_BASE_URL` | `http://127.0.0.1:3822` | Base URL used by SDK clients to reach daemon |
301
+ | `SRIFT_NO_UPDATE_CHECK` | `0` | Set to `1` to disable automatic update checks |
302
+
303
+ ---
304
+
305
+ ## 📚 Ecosystem & Official SDKs
306
+
307
+ First-party, zero-dependency SDKs for accessing SRIFT from any programming language:
308
+
309
+ - **Node.js**: [`sdk/node`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/node) (`npm install srift`)
310
+ - **Python**: [`sdk/python`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/python) (CPython 3.8+, PyPy, asyncio)
311
+ - **Go**: [`sdk/go`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/go) (Go 1.21+)
312
+ - **Rust**: [`sdk/rust`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/rust) (sync/async)
313
+ - **Java**: [`sdk/java`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/java) (Java 11+)
314
+ - **C# / .NET**: [`sdk/dotnet`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/dotnet) (.NET 6+)
315
+ - **Shell / Bash / PowerShell**: [`sdk/shell`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/shell)
316
+
317
+ ---
318
+
319
+ ## 🔗 Links & Resources
320
+
321
+ - **Web Application**: [https://srift.app](https://srift.app)
322
+ - **GitHub Repository**: [https://github.com/srivardhan113/SRIFT-Open_Source](https://github.com/srivardhan113/SRIFT-Open_Source)
323
+ - **AI Agent Manual (AGENTS.md)**: [https://srift.app/AGENTS.md](https://srift.app/AGENTS.md)
324
+ - **OpenAPI Specification**: [https://srift.app/openapi.json](https://srift.app/openapi.json)
325
+ - **LLM Context (`llms.txt`)**: [https://srift.app/llms.txt](https://srift.app/llms.txt)
326
+ - **Bug Tracker & Issues**: [https://github.com/srivardhan113/SRIFT-Open_Source/issues](https://github.com/srivardhan113/SRIFT-Open_Source/issues)
327
+
328
+ ---
329
+
330
+ ## 📄 License
331
+
332
+ MIT License © [SRIFT](https://srift.app)
package/dist/index.js CHANGED
@@ -2913,7 +2913,7 @@ var __filename = fileURLToPath2(import.meta.url);
2913
2913
  var __dirname = path3.dirname(__filename);
2914
2914
  var DAEMON_PORT3 = parseInt(process.env.SRIFT_DAEMON_PORT || "3822", 10);
2915
2915
  var DAEMON_URL3 = `http://127.0.0.1:${DAEMON_PORT3}`;
2916
- var CLI_VERSION = "2.2.12";
2916
+ var CLI_VERSION = "2.2.13";
2917
2917
  function parseDuration(s) {
2918
2918
  if (!s) return 0;
2919
2919
  const m = /^(\d+(?:\.\d+)?)\s*(ms|s|m|h|d)?$/i.exec(s.trim());
@@ -3070,6 +3070,15 @@ async function handleSelfUpdate(isJson) {
3070
3070
  }
3071
3071
  console.log(`[srift] Updating ${CLI_VERSION} \u2192 ${latest} ...`);
3072
3072
  if (!isBinary) {
3073
+ const entry = (typeof __filename === "string" ? __filename : "").replace(/\\/g, "/");
3074
+ const isNpmInstall = /\/node_modules\//.test(entry);
3075
+ if (isNpmInstall) {
3076
+ const cmd = `npm install -g srift-transfer@latest`;
3077
+ console.log(`[srift] Installed via npm \u2014 update with:`);
3078
+ console.log(`[srift] ${cmd}`);
3079
+ if (isJson) console.log(JSON.stringify({ ok: false, error: "npm-install", updateCmd: cmd, latest }));
3080
+ return;
3081
+ }
3073
3082
  console.log(`[srift] Running as Node script \u2014 delegating to install script.`);
3074
3083
  if (process.platform === "win32") {
3075
3084
  console.log(`[srift] Run: irm https://srift.app/install.ps1 | iex`);
@@ -4368,8 +4377,8 @@ function printHelp() {
4368
4377
  console.log(`
4369
4378
  SRIFT v${CLI_VERSION} \u2014 Headless P2P file transfer + MCP server
4370
4379
 
4371
- Install: curl -fsSL https://srift.app/install.sh | sh
4372
- Update: srift self-update
4380
+ Install: npm i -g srift-transfer (or) curl -fsSL https://srift.app/install.sh | sh
4381
+ Update: srift self-update (npm installs: npm i -g srift-transfer@latest)
4373
4382
  Docs: https://srift.app/ai-agents
4374
4383
 
4375
4384
  \u2500\u2500\u2500 Daemon \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
@@ -4424,9 +4433,11 @@ Docs: https://srift.app/ai-agents
4424
4433
  srift info Zero-config quick reference
4425
4434
 
4426
4435
  \u2500\u2500\u2500 MCP Server \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
4427
- srift mcp stdio transport
4436
+ srift mcp stdio transport (all 14 tools)
4428
4437
  HTTP: POST http://127.0.0.1:${DAEMON_PORT3}/mcp streamable HTTP (MCP 2025-06-18)
4429
4438
  SSE: GET http://127.0.0.1:${DAEMON_PORT3}/mcp/sse
4439
+ Hosted (no install): POST https://srift.app/mcp
4440
+ 8 orchestration tools only \u2014 file/chat tools need this local daemon.
4430
4441
 
4431
4442
  \u2500\u2500\u2500 Maintenance \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
4432
4443
  srift version [--json]
@@ -4452,11 +4463,17 @@ function printInstallMcpInstructions() {
4452
4463
  let cmd;
4453
4464
  let argList;
4454
4465
  let cursorCmd;
4466
+ const entry = (typeof __filename === "string" ? __filename : "").replace(/\\/g, "/");
4467
+ const isNpmInstall = /\/node_modules\//.test(entry) && entry.endsWith(".js");
4455
4468
  if (isCompiledBinary) {
4456
4469
  const sriftPath = execPath.replace(/\\/g, "/");
4457
4470
  cmd = sriftPath;
4458
4471
  argList = `["mcp"]`;
4459
4472
  cursorCmd = `${sriftPath} mcp`;
4473
+ } else if (isNpmInstall) {
4474
+ cmd = `srift`;
4475
+ argList = `["mcp"]`;
4476
+ cursorCmd = `srift mcp`;
4460
4477
  } else {
4461
4478
  const scriptPath = path3.resolve(__dirname, "index.ts").replace(/\\/g, "/");
4462
4479
  cmd = `node`;
@@ -4490,14 +4507,19 @@ Command: ${cursorCmd}
4490
4507
  # Codex CLI / Zed / Aider / any MCP-aware client
4491
4508
  Same command/args as above.
4492
4509
 
4493
- # Cloud agents (ChatGPT Custom GPTs, OpenAI Apps, n8n, Zapier, etc.):
4510
+ # Cloud / browser agents (ChatGPT, Claude.ai, n8n, Zapier, etc.)
4511
+ # These run off your machine and CANNOT reach 127.0.0.1 \u2014 use the hosted endpoint:
4512
+ Hosted MCP: POST https://srift.app/mcp (no install, 8 orchestration tools)
4513
+ { "mcpServers": { "srift": { "type": "streamable-http", "url": "https://srift.app/mcp" } } }
4514
+
4515
+ # Local daemon surfaces (this machine only \u2014 full 14 tools):
4494
4516
  HTTP MCP endpoint: POST http://127.0.0.1:${DAEMON_PORT3}/mcp
4495
4517
  OpenAPI spec: GET http://127.0.0.1:${DAEMON_PORT3}/openapi.json
4496
4518
  AI Plugin: GET http://127.0.0.1:${DAEMON_PORT3}/.well-known/ai-plugin.json
4497
4519
  A2A discovery: GET http://127.0.0.1:${DAEMON_PORT3}/.well-known/agent.json
4498
4520
  MCP server card: GET http://127.0.0.1:${DAEMON_PORT3}/.well-known/mcp/server-card.json
4499
4521
 
4500
- No tokens. No auth. Localhost-only by default.
4522
+ No tokens. No auth. File and chat tools require the local daemon.
4501
4523
  `);
4502
4524
  }
4503
4525
  function printAgentInfo() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srift-transfer",
3
- "version": "2.2.12",
4
- "description": "Secure P2P file transfer, encrypted chat and MCP server for AI coding agents. Zero accounts, zero tokens, end-to-end encrypted. Works with Claude, Cursor, Continue, Zed, Codex and any MCP client.",
3
+ "version": "2.2.13",
4
+ "description": "Zero-config, zero-token peer-to-peer secure file transfer, encrypted chat, and Model Context Protocol (MCP) server for AI coding agents (Claude, Cursor, Windsurf, Continue, Zed) and developers. End-to-end AES-256-GCM encrypted.",
5
5
  "keywords": [
6
6
  "mcp",
7
7
  "mcp-server",
@@ -10,6 +10,13 @@
10
10
  "ai-agents",
11
11
  "claude",
12
12
  "cursor",
13
+ "windsurf",
14
+ "continue-dev",
15
+ "cline",
16
+ "roo-code",
17
+ "zed",
18
+ "codex",
19
+ "aider",
13
20
  "file-transfer",
14
21
  "p2p",
15
22
  "peer-to-peer",
@@ -17,21 +24,25 @@
17
24
  "webtorrent",
18
25
  "end-to-end-encryption",
19
26
  "e2ee",
27
+ "aes-256-gcm",
20
28
  "encrypted",
21
29
  "secure-file-transfer",
22
30
  "send-files",
23
31
  "cli",
32
+ "quick-share",
24
33
  "agent-tools",
25
- "llm-tools"
34
+ "llm-tools",
35
+ "developer-tools",
36
+ "zero-retention"
26
37
  ],
27
38
  "homepage": "https://srift.app",
28
39
  "repository": {
29
40
  "type": "git",
30
- "url": "git+https://github.com/srivardhan113/srift.git",
41
+ "url": "git+https://github.com/srivardhan113/SRIFT-Open_Source.git",
31
42
  "directory": "packages/cli"
32
43
  },
33
44
  "bugs": {
34
- "url": "https://github.com/srivardhan113/srift/issues"
45
+ "url": "https://github.com/srivardhan113/SRIFT-Open_Source/issues"
35
46
  },
36
47
  "license": "MIT",
37
48
  "author": "SRIFT",