srift-transfer 2.2.12 → 2.2.14

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/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,341 @@
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
+ > **⚠️ The sender's daemon must be alive for the link to work.**
41
+ > SRIFT keeps no server-side copy — the daemon streams the file from your disk
42
+ > on demand. It runs in the background and survives your command exiting, so
43
+ > the link stays live afterwards. But if the daemon stops (machine sleeps or
44
+ > reboots, or `srift daemon stop`) the link returns `503 sender is offline`.
45
+ > This is the direct trade-off for zero retention: nothing is stored, so
46
+ > nothing can be served once the source goes away. If you need a link that
47
+ > outlives your machine, use storage — SRIFT is a relay.
48
+
49
+ 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.
50
+
51
+ ---
52
+
53
+ ## 🚀 Installation
54
+
55
+ ### Global Install via npm (Node.js 20+)
56
+ ```bash
57
+ npm install -g srift-transfer
58
+ ```
59
+
60
+ ### Standalone Binary (Zero Node.js dependency)
61
+ - **macOS / Linux / WSL / Termux (POSIX sh):**
62
+ ```bash
63
+ curl -fsSL https://srift.app/install.sh | sh
64
+ ```
65
+ - **Windows PowerShell:**
66
+ ```powershell
67
+ irm https://srift.app/install.ps1 | iex
68
+ ```
69
+ - **Windows Command Prompt:**
70
+ ```cmd
71
+ powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://srift.app/install.ps1 | iex"
72
+ ```
73
+
74
+ ### On-Demand via npx
75
+ ```bash
76
+ npx srift-transfer quick-share ./build/output.zip
77
+ ```
78
+
79
+ ---
80
+
81
+ ## 🛠 Model Context Protocol (MCP) Setup
82
+
83
+ 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).
84
+
85
+ ### Automatic One-Command Setup
86
+ Run the auto-installer to print or register config into supported IDEs:
87
+ ```bash
88
+ srift install-mcp # prints copy-paste config for all major clients
89
+ srift install-mcp --auto # writes directly into Claude Desktop config
90
+ ```
91
+
92
+ ### Manual Client Configuration
93
+
94
+ #### Claude Desktop
95
+ Add to your `%APPDATA%\Claude\claude_desktop_config.json` (Windows) or `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):
96
+ ```json
97
+ {
98
+ "mcpServers": {
99
+ "srift": {
100
+ "command": "srift",
101
+ "args": ["mcp"]
102
+ }
103
+ }
104
+ }
105
+ ```
106
+
107
+ #### Cursor
108
+ Add to `~/.cursor/mcp.json` or workspace configuration:
109
+ ```json
110
+ {
111
+ "mcpServers": {
112
+ "srift": {
113
+ "command": "srift",
114
+ "args": ["mcp"]
115
+ }
116
+ }
117
+ }
118
+ ```
119
+
120
+ #### Windsurf
121
+ Add to `~/.codeium/windsurf/mcp_config.json`:
122
+ ```json
123
+ {
124
+ "mcpServers": {
125
+ "srift": {
126
+ "command": "srift",
127
+ "args": ["mcp"]
128
+ }
129
+ }
130
+ }
131
+ ```
132
+
133
+ #### Continue.dev
134
+ Add to `~/.continue/config.yaml`:
135
+ ```yaml
136
+ mcpServers:
137
+ - name: srift
138
+ command: srift
139
+ args: ["mcp"]
140
+ ```
141
+
142
+ #### Zed
143
+ Add to `~/.config/zed/settings.json`:
144
+ ```json
145
+ {
146
+ "context_servers": {
147
+ "srift": {
148
+ "command": { "path": "srift", "args": ["mcp"] }
149
+ }
150
+ }
151
+ }
152
+ ```
153
+
154
+ #### Cloud & Browser-Based Agents (Zero-Install MCP)
155
+ For web-based agents (ChatGPT, Claude.ai, Gemini, Perplexity) that cannot run local binaries.
156
+
157
+ > **The hosted endpoint exposes 8 of the 14 tools** — session and peer orchestration only
158
+ > (`start_session`, `join_session`, `session_status`, `close_session`, `approve_join`,
159
+ > `reject_join`, `kick_user`, `list_transfers`).
160
+ > `quick_share`, `send_file`, `accept_transfer`, `send_chat`, `chat_history` and `read_state`
161
+ > are **local-only**: the first three need access to your disk, and the chat tools would
162
+ > require deriving session keys server-side. Install the CLI if you need those.
163
+ ```json
164
+ {
165
+ "mcpServers": {
166
+ "srift": {
167
+ "type": "streamable-http",
168
+ "url": "https://srift.app/mcp"
169
+ }
170
+ }
171
+ }
172
+ ```
173
+
174
+ ---
175
+
176
+ ## 🧰 MCP Tools Reference (14 Tools)
177
+
178
+ | Tool | Parameters | Description |
179
+ |---|---|---|
180
+ | `srift_quick_share` | `filePath` (string), `maxDownloads?` (number), `ttlMs?` (number) | **Primary tool.** Seeds file and returns public `https://srift.app/d/<token>` download URL. |
181
+ | `srift_start_session` | `sessionName?` (string), `roomSecret?` (string) | Starts a new peer session with host role; returns room code & URL. |
182
+ | `srift_join_session` | `sessionId` (string), `username?` (string), `roomSecret?` (string) | Requests to join an existing session as a peer. |
183
+ | `srift_session_status` | _none_ | Retrieves active session state, role, connected peers, and pending joins. |
184
+ | `srift_close_session` | _none_ | Closes active room, terminates peer channels, and securely flushes encryption keys. |
185
+ | `srift_approve_join` | `tempUserId` (string) | Host control: approves a pending user join request. |
186
+ | `srift_reject_join` | `tempUserId` (string), `reason?` (string) | Host control: rejects a pending user join request. |
187
+ | `srift_kick_user` | `userId` (string) | Host control: kicks an active user from the session room. |
188
+ | `srift_send_file` | `filePath` (string), `protocol?` ("webtorrent" \| "websocket") | Offers a file for direct peer-to-peer transfer to joined peers. |
189
+ | `srift_accept_transfer` | `fileId` (string), `saveDir?` (string) | Accepts an inbound file offer and streams it to local disk. |
190
+ | `srift_list_transfers` | _none_ | Lists active transfers with progress percentage, speed (KB/s), and ETA. |
191
+ | `srift_send_chat` | `message` (string) | Sends an end-to-end encrypted chat message to the active session. |
192
+ | `srift_chat_history` | _none_ | Returns decrypted chat message history for the active session. |
193
+ | `srift_read_state` | _none_ | Returns atomic snapshot of `.srift-state.json` (transfers, session, peers). |
194
+
195
+ ### MCP Resources & Prompts
196
+ - **Resources**: `srift://session/status`, `srift://transfers/active`, `srift://chat/messages`, `srift://workspace/state`, `srift://docs/quickstart`
197
+ - **Prompts**: `send_file_to_user`, `receive_file_from_user`, `start_collab_session`
198
+
199
+ ---
200
+
201
+ ## 💻 CLI Command Reference
202
+
203
+ All CLI commands support `--json` for machine-readable JSON output suitable for subagents and CI/CD pipelines.
204
+
205
+ ### Public File Sharing (Recipient needs nothing installed)
206
+ ```bash
207
+ # Generate public link with unlimited downloads and no expiration
208
+ srift quick-share /path/to/archive.zip
209
+
210
+ # Single-use link (invalidates immediately after first completed download)
211
+ srift quick-share /path/to/database.sql --once
212
+
213
+ # Time-limited link with automatic expiration
214
+ srift quick-share /path/to/report.pdf --ttl 15m # supports: 30s, 15m, 2h, 1d
215
+
216
+ # Download cap limit
217
+ srift quick-share /path/to/installer.exe --max-downloads 5
218
+
219
+ # Manage active links
220
+ srift pubshare list # list all active public links and counters
221
+ srift pubshare revoke <token> # immediately revoke an active link
222
+ ```
223
+
224
+ ### Collaborative Sessions & P2P Rooms
225
+ ```bash
226
+ srift session start [--name "Project Review"] # create session as host
227
+ srift session join <session-id> # join existing room
228
+ srift session status # view peers and role
229
+ srift session close # teardown room & clear keys
230
+ ```
231
+
232
+ ### P2P File Transfers
233
+ ```bash
234
+ srift send <file-path> # offer file to peers in room
235
+ srift receive <file-id> [--save-dir ./downloads] # accept incoming file transfer
236
+ srift list # list active transfers
237
+ srift monitor <file-id> [--json-stream] # live transfer progress stream
238
+ ```
239
+
240
+ ### Moderation & Encrypted Chat
241
+ ```bash
242
+ srift approve <user-id> # host: approve join request
243
+ srift reject <user-id> [--reason <msg>] # host: reject join request
244
+ srift kick <user-id> # host: kick participant
245
+ srift chat send "Analysis complete." # send encrypted message
246
+ srift chat history # view decrypted room history
247
+ ```
248
+
249
+ ### Daemon & Diagnostics
250
+ ```bash
251
+ srift daemon start # run daemon in foreground
252
+ srift daemon status # daemon status and port
253
+ srift daemon restart # restart daemon process
254
+ srift doctor # diagnostic health check
255
+ srift logs [--tail 100] # inspect daemon activity logs
256
+ srift reset # flush session state & keys
257
+ srift self-update # update to latest version
258
+ ```
259
+
260
+ ---
261
+
262
+ ## 🌐 Headless Daemon & REST API
263
+
264
+ 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:
265
+
266
+ ```bash
267
+ # Deliver file via REST API
268
+ curl -X POST http://127.0.0.1:3822/quick-share \
269
+ -H "Content-Type: application/json" \
270
+ -d '{"filePath": "/abs/path/to/file.zip"}'
271
+
272
+ # Response:
273
+ # {
274
+ # "sessionId": "ABC1234",
275
+ # "fileId": "file_xyz789",
276
+ # "downloadUrl": "https://srift.app/d/7k3m9xq",
277
+ # "fileName": "file.zip",
278
+ # "fileSize": 10485760
279
+ # }
280
+ ```
281
+
282
+ ### Server-Sent Events (SSE) Stream
283
+ Subscribe to real-time events without polling:
284
+ ```bash
285
+ curl -N http://127.0.0.1:3822/api/v1/monitor/events
286
+ ```
287
+ Events emitted: `connection_state`, `join_request`, `file_offer`, `transfer_progress`, `chat_received`.
288
+
289
+ ---
290
+
291
+ ## 🔐 Architecture & Security
292
+
293
+ - **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.
294
+ - **Adaptive Transport Stack**:
295
+ 1. **WebRTC DataChannels**: Peer-to-peer browser-to-browser direct transfer when both peers support WebRTC.
296
+ 2. **WebTorrent**: Swarm-assisted peer-to-peer distribution for large files.
297
+ 3. **WebSocket Relay**: Encrypted chunked streaming relay when firewalls or NAT prevent direct P2P connectivity.
298
+ - **Privacy First**: The daemon binds to `127.0.0.1` only. Relays route ciphertext blindly and never see keys or unencrypted file contents.
299
+
300
+ ---
301
+
302
+ ## ⚙️ Configuration
303
+
304
+ Set custom configuration options via environment variables or `~/.srift/config.json`:
305
+
306
+ | Environment Variable | Default | Description |
307
+ |---|---|---|
308
+ | `SRIFT_DAEMON_PORT` | `3822` | Port for the local background daemon |
309
+ | `SRIFT_BASE_URL` | `http://127.0.0.1:3822` | Base URL used by SDK clients to reach daemon |
310
+ | `SRIFT_NO_UPDATE_CHECK` | `0` | Set to `1` to disable automatic update checks |
311
+
312
+ ---
313
+
314
+ ## 📚 Ecosystem & Official SDKs
315
+
316
+ First-party, zero-dependency SDKs for accessing SRIFT from any programming language:
317
+
318
+ - **Node.js**: [`sdk/node`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/node) (`npm install srift`)
319
+ - **Python**: [`sdk/python`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/python) (CPython 3.8+, PyPy, asyncio)
320
+ - **Go**: [`sdk/go`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/go) (Go 1.21+)
321
+ - **Rust**: [`sdk/rust`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/rust) (sync/async)
322
+ - **Java**: [`sdk/java`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/java) (Java 11+)
323
+ - **C# / .NET**: [`sdk/dotnet`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/dotnet) (.NET 6+)
324
+ - **Shell / Bash / PowerShell**: [`sdk/shell`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/shell)
325
+
326
+ ---
327
+
328
+ ## 🔗 Links & Resources
329
+
330
+ - **Web Application**: [https://srift.app](https://srift.app)
331
+ - **GitHub Repository**: [https://github.com/srivardhan113/SRIFT-Open_Source](https://github.com/srivardhan113/SRIFT-Open_Source)
332
+ - **AI Agent Manual (AGENTS.md)**: [https://srift.app/AGENTS.md](https://srift.app/AGENTS.md)
333
+ - **OpenAPI Specification**: [https://srift.app/openapi.json](https://srift.app/openapi.json)
334
+ - **LLM Context (`llms.txt`)**: [https://srift.app/llms.txt](https://srift.app/llms.txt)
335
+ - **Bug Tracker & Issues**: [https://github.com/srivardhan113/SRIFT-Open_Source/issues](https://github.com/srivardhan113/SRIFT-Open_Source/issues)
336
+
337
+ ---
338
+
339
+ ## 📄 License
340
+
341
+ MIT License © [SRIFT](https://srift.app)
package/dist/daemon.js CHANGED
@@ -254,7 +254,11 @@ srift_quick_share({ filePath: "/abs/path/file.zip" })
254
254
  \u2192 they open it in any browser, or run:
255
255
  curl -OJ <downloadUrl>
256
256
  wget --content-disposition <downloadUrl>
257
- \u2192 keep the daemon running while the download is in progress
257
+ \u2192 IMPORTANT: the local daemon seeds the file. It keeps running in the
258
+ background after your tool call returns, so the link stays live. But if
259
+ the daemon stops (machine sleeps/reboots, or 'srift daemon stop') the link
260
+ returns 503 "sender is offline" \u2014 SRIFT stores no copy server-side.
261
+ Tell the user to download while their machine is on.
258
262
  \`\`\`
259
263
 
260
264
  **Open a long-lived collaboration room:**
@@ -487,7 +491,13 @@ The peer must call srift_accept_transfer with this fileId.`;
487
491
  ``,
488
492
  `Give the URL to the user \u2014 they open it in any browser, or run:`,
489
493
  ` curl -OJ "${url}"`,
490
- `Keep this srift daemon running while they download.`
494
+ ``,
495
+ `The daemon seeds this file from disk and keeps running in the`,
496
+ `background, so the link stays live after this call returns.`,
497
+ `It stops working if the daemon stops (machine sleeps/reboots, or`,
498
+ `\`srift daemon stop\`) \u2014 SRIFT keeps no server-side copy, so the link`,
499
+ `then returns 503 "sender is offline". Tell the user to grab it while`,
500
+ `this machine is on.`
491
501
  ].join("\n");
492
502
  }
493
503
  case "srift_send_chat":
package/dist/index.js CHANGED
@@ -352,7 +352,11 @@ srift_quick_share({ filePath: "/abs/path/file.zip" })
352
352
  \u2192 they open it in any browser, or run:
353
353
  curl -OJ <downloadUrl>
354
354
  wget --content-disposition <downloadUrl>
355
- \u2192 keep the daemon running while the download is in progress
355
+ \u2192 IMPORTANT: the local daemon seeds the file. It keeps running in the
356
+ background after your tool call returns, so the link stays live. But if
357
+ the daemon stops (machine sleeps/reboots, or 'srift daemon stop') the link
358
+ returns 503 "sender is offline" \u2014 SRIFT stores no copy server-side.
359
+ Tell the user to download while their machine is on.
356
360
  \`\`\`
357
361
 
358
362
  **Open a long-lived collaboration room:**
@@ -479,7 +483,13 @@ The peer must call srift_accept_transfer with this fileId.`;
479
483
  ``,
480
484
  `Give the URL to the user \u2014 they open it in any browser, or run:`,
481
485
  ` curl -OJ "${url}"`,
482
- `Keep this srift daemon running while they download.`
486
+ ``,
487
+ `The daemon seeds this file from disk and keeps running in the`,
488
+ `background, so the link stays live after this call returns.`,
489
+ `It stops working if the daemon stops (machine sleeps/reboots, or`,
490
+ `\`srift daemon stop\`) \u2014 SRIFT keeps no server-side copy, so the link`,
491
+ `then returns 503 "sender is offline". Tell the user to grab it while`,
492
+ `this machine is on.`
483
493
  ].join("\n");
484
494
  }
485
495
  case "srift_send_chat":
@@ -2913,7 +2923,7 @@ var __filename = fileURLToPath2(import.meta.url);
2913
2923
  var __dirname = path3.dirname(__filename);
2914
2924
  var DAEMON_PORT3 = parseInt(process.env.SRIFT_DAEMON_PORT || "3822", 10);
2915
2925
  var DAEMON_URL3 = `http://127.0.0.1:${DAEMON_PORT3}`;
2916
- var CLI_VERSION = "2.2.12";
2926
+ var CLI_VERSION = "2.2.14";
2917
2927
  function parseDuration(s) {
2918
2928
  if (!s) return 0;
2919
2929
  const m = /^(\d+(?:\.\d+)?)\s*(ms|s|m|h|d)?$/i.exec(s.trim());
@@ -3070,6 +3080,15 @@ async function handleSelfUpdate(isJson) {
3070
3080
  }
3071
3081
  console.log(`[srift] Updating ${CLI_VERSION} \u2192 ${latest} ...`);
3072
3082
  if (!isBinary) {
3083
+ const entry = (typeof __filename === "string" ? __filename : "").replace(/\\/g, "/");
3084
+ const isNpmInstall = /\/node_modules\//.test(entry);
3085
+ if (isNpmInstall) {
3086
+ const cmd = `npm install -g srift-transfer@latest`;
3087
+ console.log(`[srift] Installed via npm \u2014 update with:`);
3088
+ console.log(`[srift] ${cmd}`);
3089
+ if (isJson) console.log(JSON.stringify({ ok: false, error: "npm-install", updateCmd: cmd, latest }));
3090
+ return;
3091
+ }
3073
3092
  console.log(`[srift] Running as Node script \u2014 delegating to install script.`);
3074
3093
  if (process.platform === "win32") {
3075
3094
  console.log(`[srift] Run: irm https://srift.app/install.ps1 | iex`);
@@ -4368,8 +4387,8 @@ function printHelp() {
4368
4387
  console.log(`
4369
4388
  SRIFT v${CLI_VERSION} \u2014 Headless P2P file transfer + MCP server
4370
4389
 
4371
- Install: curl -fsSL https://srift.app/install.sh | sh
4372
- Update: srift self-update
4390
+ Install: npm i -g srift-transfer (or) curl -fsSL https://srift.app/install.sh | sh
4391
+ Update: srift self-update (npm installs: npm i -g srift-transfer@latest)
4373
4392
  Docs: https://srift.app/ai-agents
4374
4393
 
4375
4394
  \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 +4443,11 @@ Docs: https://srift.app/ai-agents
4424
4443
  srift info Zero-config quick reference
4425
4444
 
4426
4445
  \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
4446
+ srift mcp stdio transport (all 14 tools)
4428
4447
  HTTP: POST http://127.0.0.1:${DAEMON_PORT3}/mcp streamable HTTP (MCP 2025-06-18)
4429
4448
  SSE: GET http://127.0.0.1:${DAEMON_PORT3}/mcp/sse
4449
+ Hosted (no install): POST https://srift.app/mcp
4450
+ 8 orchestration tools only \u2014 file/chat tools need this local daemon.
4430
4451
 
4431
4452
  \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
4453
  srift version [--json]
@@ -4452,11 +4473,17 @@ function printInstallMcpInstructions() {
4452
4473
  let cmd;
4453
4474
  let argList;
4454
4475
  let cursorCmd;
4476
+ const entry = (typeof __filename === "string" ? __filename : "").replace(/\\/g, "/");
4477
+ const isNpmInstall = /\/node_modules\//.test(entry) && entry.endsWith(".js");
4455
4478
  if (isCompiledBinary) {
4456
4479
  const sriftPath = execPath.replace(/\\/g, "/");
4457
4480
  cmd = sriftPath;
4458
4481
  argList = `["mcp"]`;
4459
4482
  cursorCmd = `${sriftPath} mcp`;
4483
+ } else if (isNpmInstall) {
4484
+ cmd = `srift`;
4485
+ argList = `["mcp"]`;
4486
+ cursorCmd = `srift mcp`;
4460
4487
  } else {
4461
4488
  const scriptPath = path3.resolve(__dirname, "index.ts").replace(/\\/g, "/");
4462
4489
  cmd = `node`;
@@ -4490,14 +4517,19 @@ Command: ${cursorCmd}
4490
4517
  # Codex CLI / Zed / Aider / any MCP-aware client
4491
4518
  Same command/args as above.
4492
4519
 
4493
- # Cloud agents (ChatGPT Custom GPTs, OpenAI Apps, n8n, Zapier, etc.):
4520
+ # Cloud / browser agents (ChatGPT, Claude.ai, n8n, Zapier, etc.)
4521
+ # These run off your machine and CANNOT reach 127.0.0.1 \u2014 use the hosted endpoint:
4522
+ Hosted MCP: POST https://srift.app/mcp (no install, 8 orchestration tools)
4523
+ { "mcpServers": { "srift": { "type": "streamable-http", "url": "https://srift.app/mcp" } } }
4524
+
4525
+ # Local daemon surfaces (this machine only \u2014 full 14 tools):
4494
4526
  HTTP MCP endpoint: POST http://127.0.0.1:${DAEMON_PORT3}/mcp
4495
4527
  OpenAPI spec: GET http://127.0.0.1:${DAEMON_PORT3}/openapi.json
4496
4528
  AI Plugin: GET http://127.0.0.1:${DAEMON_PORT3}/.well-known/ai-plugin.json
4497
4529
  A2A discovery: GET http://127.0.0.1:${DAEMON_PORT3}/.well-known/agent.json
4498
4530
  MCP server card: GET http://127.0.0.1:${DAEMON_PORT3}/.well-known/mcp/server-card.json
4499
4531
 
4500
- No tokens. No auth. Localhost-only by default.
4532
+ No tokens. No auth. File and chat tools require the local daemon.
4501
4533
  `);
4502
4534
  }
4503
4535
  function printAgentInfo() {
@@ -4516,7 +4548,12 @@ Everything below works without tokens, OAuth, or API keys.
4516
4548
  \u2192 the user opens it in any browser, or downloads via:
4517
4549
  curl -OJ https://srift.app/d/<token>
4518
4550
  wget --content-disposition https://srift.app/d/<token>
4519
- \u2192 keep the daemon running while they download
4551
+ \u2192 the daemon keeps seeding in the background after this command exits.
4552
+ The link stays live while that daemon is running. If it is stopped
4553
+ (srift daemon stop, reboot, laptop sleep) the link returns 503
4554
+ "sender is offline" \u2014 SRIFT keeps no server-side copy of the file.
4555
+ For a link that must outlive your machine, upload it somewhere that
4556
+ does retain the bytes; SRIFT is a relay, not storage.
4520
4557
 
4521
4558
  \u2500\u2500\u2500\u2500 Open a long-lived collaboration room \u2500\u2500\u2500\u2500
4522
4559
  srift session start --name "AI-Collab"
package/package.json CHANGED
@@ -1,7 +1,8 @@
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.14",
4
+ "mcpName": "app.srift/srift",
5
+ "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
6
  "keywords": [
6
7
  "mcp",
7
8
  "mcp-server",
@@ -10,6 +11,13 @@
10
11
  "ai-agents",
11
12
  "claude",
12
13
  "cursor",
14
+ "windsurf",
15
+ "continue-dev",
16
+ "cline",
17
+ "roo-code",
18
+ "zed",
19
+ "codex",
20
+ "aider",
13
21
  "file-transfer",
14
22
  "p2p",
15
23
  "peer-to-peer",
@@ -17,21 +25,25 @@
17
25
  "webtorrent",
18
26
  "end-to-end-encryption",
19
27
  "e2ee",
28
+ "aes-256-gcm",
20
29
  "encrypted",
21
30
  "secure-file-transfer",
22
31
  "send-files",
23
32
  "cli",
33
+ "quick-share",
24
34
  "agent-tools",
25
- "llm-tools"
35
+ "llm-tools",
36
+ "developer-tools",
37
+ "zero-retention"
26
38
  ],
27
39
  "homepage": "https://srift.app",
28
40
  "repository": {
29
41
  "type": "git",
30
- "url": "git+https://github.com/srivardhan113/srift.git",
42
+ "url": "git+https://github.com/srivardhan113/SRIFT-Open_Source.git",
31
43
  "directory": "packages/cli"
32
44
  },
33
45
  "bugs": {
34
- "url": "https://github.com/srivardhan113/srift/issues"
46
+ "url": "https://github.com/srivardhan113/SRIFT-Open_Source/issues"
35
47
  },
36
48
  "license": "MIT",
37
49
  "author": "SRIFT",