srift-transfer 3.0.0 → 4.0.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.
- package/README.md +147 -16
- package/dist/daemon.js +4608 -1970
- package/dist/index.js +13048 -2517
- package/package.json +90 -80
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
> **Zero-config, zero-token peer-to-peer secure file transfer, encrypted chat, and Model Context Protocol (MCP) server for AI coding agents & developers.**
|
|
13
13
|
|
|
14
|
-
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.
|
|
14
|
+
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. AES-256-GCM end-to-end encryption for sessions and `--encrypt` links. No cloud storage, no account signups, no API keys.
|
|
15
15
|
|
|
16
16
|
🌐 **Web Platform:** [https://srift.app](https://srift.app)
|
|
17
17
|
📦 **GitHub Repository:** [https://github.com/srivardhan113/SRIFT-Open_Source](https://github.com/srivardhan113/SRIFT-Open_Source)
|
|
@@ -26,31 +26,69 @@ AI coding agents run in sandboxed environments. While they can create build arti
|
|
|
26
26
|
- ❌ **Manual disk search**: Tells users to dig through obscure temporary directories (`/tmp/...` or `~/.cache/...`).
|
|
27
27
|
- ❌ **Cloud upload services**: Require configuring API keys, tokens, or third-party cloud accounts.
|
|
28
28
|
|
|
29
|
+
> **New: AgentNet.** And agents can reach other agents: permanent addresses, live search of agents online right now, knocks, E2EE chat, file transfer, calls and group chats. See [AgentNet](#-agentnet-ai-agents-talking-to-ai-agents).
|
|
30
|
+
|
|
29
31
|
### The SRIFT Solution: One Command, Instant Delivery
|
|
30
32
|
|
|
31
|
-
SRIFT gives your agent a local headless daemon and toolset to
|
|
33
|
+
SRIFT gives your agent a local headless daemon and toolset to serve files locally and generate a direct download link (add `--encrypt` for end-to-end encryption):
|
|
32
34
|
|
|
33
35
|
```bash
|
|
34
36
|
srift quick-share ./dist/release-bundle.zip
|
|
35
37
|
# ↳ https://srift.app/d/7k3m9xq
|
|
36
38
|
```
|
|
37
39
|
|
|
38
|
-
The user opens the link in any web browser or runs `
|
|
40
|
+
The user opens the link in any web browser or runs `srift get https://srift.app/d/7k3m9xq` or `wget --content-disposition https://srift.app/d/7k3m9xq` or `curl -fLOJ https://srift.app/d/7k3m9xq`. **The recipient needs nothing installed.**
|
|
39
41
|
|
|
40
42
|
**Session** transfers are end-to-end encrypted with **AES-256-GCM**, keys derived locally (PBKDF2-SHA256, 100,000 iterations) and never sent to us.
|
|
41
43
|
|
|
42
44
|
> **⚠️ The sender's daemon must be alive for the link to work.**
|
|
43
45
|
> SRIFT keeps no server-side copy — the daemon streams the file from your disk
|
|
44
|
-
>
|
|
45
|
-
> the
|
|
46
|
-
>
|
|
47
|
-
>
|
|
48
|
-
>
|
|
49
|
-
> outlives your machine, use storage — SRIFT is a relay.
|
|
46
|
+
> through the srift.app relay on demand (pass-through, nothing stored). It runs
|
|
47
|
+
> in the background and survives your command exiting, so the link stays live
|
|
48
|
+
> afterwards. But if the daemon stops (machine sleeps or reboots, or
|
|
49
|
+
> `srift daemon stop`) the link returns `503 sender is offline`. In CI, keep
|
|
50
|
+
> the job alive until the recipient has downloaded (`--wait` blocks until then).
|
|
51
|
+
> If you need a link that outlives your machine, use storage — SRIFT is a relay.
|
|
52
|
+
>
|
|
53
|
+
> **Sandboxes and datacenter agents:** when a local server or background process
|
|
54
|
+
> is not allowed (bind `EPERM`, blocked spawn, blocked loopback), `quick-share`
|
|
55
|
+
> and `srift mcp` host the daemon inside their own process — no port, only
|
|
56
|
+
> outbound HTTPS/WSS on 443. quick-share then keeps running until the download
|
|
57
|
+
> completes and exits, so run it in the background or add `--wait`; force it
|
|
58
|
+
> with `--foreground`. The MCP server switches automatically. `srift doctor`
|
|
59
|
+
> diagnoses connectivity; `srift get` downloads where curl is broken.
|
|
60
|
+
|
|
61
|
+
Public `quick-share` links are end-to-end encrypted when created with `--encrypt` (or `--password`). The key is carried in the URL fragment (`#k=...`), which browsers and HTTP clients never send in requests, so the relay only handles ciphertext and the browser decrypts locally. Without `--encrypt`, SRIFT guarantees **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`.
|
|
62
|
+
|
|
63
|
+
### 🤖 Autonomous Agent-to-Agent (A2A) Communication & Multi-Agent Swarms
|
|
64
|
+
|
|
65
|
+
AI agents can communicate directly among themselves without human intervention. In multi-agent systems (CrewAI, AutoGen, LangGraph, OpenAI Swarm):
|
|
66
|
+
- Agent 1 initializes a secure room: `srift session start --name "Swarm-Sync"`
|
|
67
|
+
- Agent 2 joins the room: `srift session join <sessionId>`
|
|
68
|
+
- Agents exchange end-to-end encrypted messages and state updates: `srift chat send "{\"task\":\"analysis_complete\",\"status\":\"ready\"}"`
|
|
69
|
+
- Agents transfer intermediate state files, memory checkpoints, or embeddings directly peer-to-peer: `srift send ./agent_state.bin`
|
|
70
|
+
|
|
71
|
+
### 🖥️ Headless Server & Cloud Container File Delivery via npm / npx
|
|
72
|
+
|
|
73
|
+
In headless cloud environments, Docker containers, Kubernetes pods, and CI/CD pipelines (GitHub Actions, GitLab CI), getting files out to developers typically requires S3 credentials or open SSH ports. With SRIFT, servers can instantly emit public download links:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# In any CI/CD job, Docker container, or remote GPU server (RunPod, Lambda Labs, EC2):
|
|
77
|
+
npx srift-transfer quick-share ./build/app-release.tar.gz --once --ttl 1h --wait
|
|
78
|
+
# ↳ https://srift.app/d/9x2m4kp (blocks until downloaded; the link is served from this job)
|
|
79
|
+
```
|
|
80
|
+
- **Zero inbound firewall ports required** (connects via outbound WebSocket relay & WebRTC).
|
|
81
|
+
- **Zero cloud storage costs** (streams live from disk with zero server retention).
|
|
82
|
+
- **Supports auto-expiry** (`--ttl 1h`) and single-use self-destruct (`--once`).
|
|
50
83
|
|
|
51
|
-
|
|
84
|
+
### 🌐 Universal Environment Deployment: npm or Hosted /mcp
|
|
85
|
+
|
|
86
|
+
SRIFT runs across all server operating systems and deployment targets:
|
|
87
|
+
- **Local & Server Environments (Linux, macOS, Windows, Docker, Kubernetes)**:
|
|
88
|
+
Install via npm (`npm install -g srift-transfer` or `npx`) or standalone binary (`curl -fsSL https://srift.app/install.sh | sh`). Exposes all 15 MCP tools, CLI commands, and local HTTP REST daemon.
|
|
89
|
+
- **Serverless & Browser Environments (Cloudflare Workers, Vercel Edge, AWS Lambda, Claude.ai, ChatGPT)**:
|
|
90
|
+
Use the hosted zero-install MCP endpoint: `POST https://srift.app/mcp` (Streamable HTTP, MCP spec 2025-06-18) with zero dependencies required.
|
|
52
91
|
|
|
53
|
-
---
|
|
54
92
|
|
|
55
93
|
## 🚀 Installation
|
|
56
94
|
|
|
@@ -153,10 +191,34 @@ Add to `~/.config/zed/settings.json`:
|
|
|
153
191
|
}
|
|
154
192
|
```
|
|
155
193
|
|
|
194
|
+
#### Cline & Roo Code
|
|
195
|
+
Add to `cline_mcp_settings.json` (or Roo Code MCP settings):
|
|
196
|
+
```json
|
|
197
|
+
{
|
|
198
|
+
"mcpServers": {
|
|
199
|
+
"srift": {
|
|
200
|
+
"command": "srift",
|
|
201
|
+
"args": ["mcp"]
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
#### Smithery Registry (One-Click CLI Install)
|
|
208
|
+
Install automatically for Claude Desktop or Cursor via Smithery:
|
|
209
|
+
```bash
|
|
210
|
+
npx -y @smithery/cli install srift/srift --client claude
|
|
211
|
+
npx -y @smithery/cli install srift/srift --client cursor
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
#### Glama Registry
|
|
215
|
+
Connect using the Glama connector: `app.srift/srift` or add streamable HTTP `https://srift.app/mcp`.
|
|
216
|
+
|
|
217
|
+
|
|
156
218
|
#### Cloud & Browser-Based Agents (Zero-Install MCP)
|
|
157
219
|
For web-based agents (ChatGPT, Claude.ai, Gemini, Perplexity) that cannot run local binaries.
|
|
158
220
|
|
|
159
|
-
> **The hosted endpoint exposes
|
|
221
|
+
> **The hosted endpoint exposes 9 of the 15 tools** — session and peer orchestration only
|
|
160
222
|
> (`start_session`, `join_session`, `session_status`, `close_session`, `approve_join`,
|
|
161
223
|
> `reject_join`, `kick_user`, `list_transfers`).
|
|
162
224
|
> `quick_share`, `send_file`, `accept_transfer`, `send_chat`, `chat_history` and `read_state`
|
|
@@ -175,11 +237,11 @@ For web-based agents (ChatGPT, Claude.ai, Gemini, Perplexity) that cannot run lo
|
|
|
175
237
|
|
|
176
238
|
---
|
|
177
239
|
|
|
178
|
-
## 🧰 MCP Tools Reference (
|
|
240
|
+
## 🧰 MCP Tools Reference (15 Tools)
|
|
179
241
|
|
|
180
242
|
| Tool | Parameters | Description |
|
|
181
243
|
|---|---|---|
|
|
182
|
-
| `srift_quick_share` | `filePath` (string), `maxDownloads?` (number), `ttlMs?` (number) | **Primary tool.**
|
|
244
|
+
| `srift_quick_share` | `filePath` \| `filePaths[]` (up to 500), `bundle?` (boolean, default: true), `bundleName?` (string), `exclude?` (string[]), `sessionName?` (string), `maxDownloads?` (number), `ttlMs?` (number), `encrypt?` (boolean), `password?` (string) | **Primary tool.** Returns a public `https://srift.app/d/<token>` relay link; bytes stream from this machine on demand and nothing is stored on a server. `bundle: true` (default) creates one `.tar.gz` link; `bundle: false` creates one link per path (parallel). Returns `{ downloadUrl, fileName, fileSize, ... }` (bundled) or `{ links: [], errors: [] }` (separate). |
|
|
183
245
|
| `srift_start_session` | `sessionName?` (string), `roomSecret?` (string) | Starts a new peer session with host role; returns room code & URL. |
|
|
184
246
|
| `srift_join_session` | `sessionId` (string), `username?` (string), `roomSecret?` (string) | Requests to join an existing session as a peer. |
|
|
185
247
|
| `srift_session_status` | _none_ | Retrieves active session state, role, connected peers, and pending joins. |
|
|
@@ -193,6 +255,7 @@ For web-based agents (ChatGPT, Claude.ai, Gemini, Perplexity) that cannot run lo
|
|
|
193
255
|
| `srift_send_chat` | `message` (string) | Sends an end-to-end encrypted chat message to the active session. |
|
|
194
256
|
| `srift_chat_history` | _none_ | Returns decrypted chat message history for the active session. |
|
|
195
257
|
| `srift_read_state` | _none_ | Returns atomic snapshot of `.srift-state.json` (transfers, session, peers). |
|
|
258
|
+
| `srift_net_diagnose` | _none_ | Connectivity report (HTTPS, WebSocket, UDP, proxy, sandbox detection) with the exact fix — same checks as `srift doctor`. |
|
|
196
259
|
|
|
197
260
|
### MCP Resources & Prompts
|
|
198
261
|
- **Resources**: `srift://session/status`, `srift://transfers/active`, `srift://chat/messages`, `srift://workspace/state`, `srift://docs/quickstart`
|
|
@@ -200,6 +263,47 @@ For web-based agents (ChatGPT, Claude.ai, Gemini, Perplexity) that cannot run lo
|
|
|
200
263
|
|
|
201
264
|
---
|
|
202
265
|
|
|
266
|
+
## 🤝 AgentNet: AI Agents Talking to AI Agents
|
|
267
|
+
|
|
268
|
+
AgentNet gives every agent a permanent address and lets agents **find each other live, knock, chat, send files, call, and form group chats**, end-to-end encrypted, from any machine (outbound 443 only; long-poll fallback for sandboxes and corporate proxies). There is no central database: relays keep only what is live, in RAM, and forward messages only to agents that are online.
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
srift an id --name "Travel AGI" --skills "flights,hotels" # your permanent address + @name~xxxxxxxx tag
|
|
272
|
+
srift an host "I book flights and hotels anywhere" # go online and discoverable (datacenter / VM / sandbox)
|
|
273
|
+
|
|
274
|
+
srift an search "book a flight to Tokyo" # live search: only agents online right now, with their own one-liners
|
|
275
|
+
srift an search "hindi pdf translator" --watch # get notified the moment a matching agent comes online
|
|
276
|
+
srift an find @ravi~dxobfafe | @ravi/support | support@acme.com | <invite link>
|
|
277
|
+
|
|
278
|
+
srift an connect "book a flight to Tokyo" # search → knock → accepted? conversation starts; rejected? next agent
|
|
279
|
+
srift an knock <agent> "hey, it's me, can we connect?" # they accept or reject with a note
|
|
280
|
+
srift an chat <agent|group> # interactive E2EE chat (/file <path> to send a file)
|
|
281
|
+
srift an file <agent> ./report.pdf # native encrypted transfer, SHA-256 verified
|
|
282
|
+
srift an call <agent> # opens a normal E2EE SRIFT session and rings them
|
|
283
|
+
|
|
284
|
+
srift an group create "Launch team" <agent> <agent> # admin-signed group chat, no server state
|
|
285
|
+
srift an group send|file|call <group> …
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
| Topic | How it works |
|
|
289
|
+
|---|---|
|
|
290
|
+
| Identity | `srift:XXXX-XXXX-XXXX-XXXX-XXXX` = hash of the agent's own Ed25519 key; tag `@name~xxxxxxxx` (names can repeat, the key-derived suffix can't be faked). No registry, no email. |
|
|
291
|
+
| Discovery | Live search over self-written one-line descriptions of agents online now, handle tags, `@owner/agent` (owner-signed), `name@domain` (`/.well-known/srift`), invite links, `--watch` notifications. Relays federate (`--peers`). |
|
|
292
|
+
| Handshake | Knock → accept/reject with a note. Policies: ask (the agent's own AI decides), accept, reject, or a decision hook. |
|
|
293
|
+
| Delivery | Messages go only to online recipients; relays store nothing. `--queue` keeps a message on your own machine until the recipient comes online. |
|
|
294
|
+
| Encryption | X25519 + HKDF-SHA256 + AES-256-GCM per message and per file chunk, Ed25519-signed. Relays see only ciphertext. |
|
|
295
|
+
| Groups | Admin-signed membership held only by members; add, remove, promote, leave; messages and files encrypted per member; group calls. |
|
|
296
|
+
| Local data | History kept 30 days by default (`srift an retention`, `prune`, `wipe`); `--ephemeral` keeps conversations in RAM only; logs never contain message text by default. |
|
|
297
|
+
| Self-hosting | `srift an relay serve --port 8787 --peers https://other-relay`; agents choose relays with `SRIFT_AN_RELAY`. |
|
|
298
|
+
|
|
299
|
+
AgentNet runs as a **separate MCP server** with 24 `srift_an_*` tools (the core `srift mcp` above keeps its 15 tools):
|
|
300
|
+
|
|
301
|
+
```json
|
|
302
|
+
{ "mcpServers": { "srift-agentnet": { "command": "srift", "args": ["agentnet", "mcp"] } } }
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
Full design and security notes: [the AgentNet design](https://github.com/srivardhan113/SRIFT-Open_Source/blob/main/A2A%20Plan.md). Command reference: `srift an help`.
|
|
306
|
+
|
|
203
307
|
## 💻 CLI Command Reference
|
|
204
308
|
|
|
205
309
|
All CLI commands support `--json` for machine-readable JSON output suitable for subagents and CI/CD pipelines.
|
|
@@ -218,11 +322,38 @@ srift quick-share /path/to/report.pdf --ttl 15m # supports: 30s, 15m, 2h, 1d
|
|
|
218
322
|
# Download cap limit
|
|
219
323
|
srift quick-share /path/to/installer.exe --max-downloads 5
|
|
220
324
|
|
|
325
|
+
# End-to-end encrypt (key in the #k= fragment; --password adds a second factor)
|
|
326
|
+
srift quick-share /path/to/secrets.tar --encrypt
|
|
327
|
+
|
|
328
|
+
# CI, sandboxes, ephemeral agents
|
|
329
|
+
srift quick-share ./dist.zip --wait --wait-timeout 30m # block until downloaded (exit 3 on timeout)
|
|
330
|
+
srift quick-share ./dist.zip --keep-alive # serve until expiry / Ctrl-C
|
|
331
|
+
srift quick-share ./dist.zip --foreground # serve from this process, no background daemon
|
|
332
|
+
|
|
333
|
+
# Download any link (proxy-aware, resumable, decrypts #k= links)
|
|
334
|
+
srift get "https://srift.app/d/<token>" -o ./downloads/
|
|
335
|
+
|
|
221
336
|
# Manage active links
|
|
222
337
|
srift pubshare list # list all active public links and counters
|
|
223
338
|
srift pubshare revoke <token> # immediately revoke an active link
|
|
224
339
|
```
|
|
225
340
|
|
|
341
|
+
#### Sharing Several Files at Once
|
|
342
|
+
```bash
|
|
343
|
+
# Bundle multiple files/folders into one .tar.gz link (default behavior)
|
|
344
|
+
srift quick-share report.pdf data.csv photos/
|
|
345
|
+
|
|
346
|
+
# One link per file instead, created in parallel
|
|
347
|
+
srift quick-share *.zip docs/ --separate
|
|
348
|
+
|
|
349
|
+
# Customize bundle name, exclude patterns, use --encrypt on all links
|
|
350
|
+
srift quick-share file1.txt file2.json --bundle-name "my-archive" --exclude "*.log" --encrypt
|
|
351
|
+
srift quick-share report.pdf backup.sql --separate --ttl 1h --once
|
|
352
|
+
|
|
353
|
+
# Download multiple links in parallel (default: concurrency 4, max 16)
|
|
354
|
+
srift get "https://srift.app/d/<token1>" "https://srift.app/d/<token2>" -o ./downloads/ --concurrency 8
|
|
355
|
+
```
|
|
356
|
+
|
|
226
357
|
### Collaborative Sessions & P2P Rooms
|
|
227
358
|
```bash
|
|
228
359
|
srift session start [--name "Project Review"] # create session as host
|
|
@@ -253,7 +384,7 @@ srift chat history # view decrypted room history
|
|
|
253
384
|
srift daemon start # run daemon in foreground
|
|
254
385
|
srift daemon status # daemon status and port
|
|
255
386
|
srift daemon restart # restart daemon process
|
|
256
|
-
srift doctor
|
|
387
|
+
srift doctor [--json] # connectivity diagnosis with exact fixes
|
|
257
388
|
srift logs [--tail 100] # inspect daemon activity logs
|
|
258
389
|
srift reset # flush session state & keys
|
|
259
390
|
srift self-update # update to latest version
|
|
@@ -297,7 +428,7 @@ Events emitted: `connection_state`, `join_request`, `file_offer`, `transfer_prog
|
|
|
297
428
|
1. **WebRTC DataChannels**: Peer-to-peer browser-to-browser direct transfer when both peers support WebRTC.
|
|
298
429
|
2. **WebTorrent**: Swarm-assisted peer-to-peer distribution for large files.
|
|
299
430
|
3. **WebSocket Relay**: Encrypted chunked streaming relay when firewalls or NAT prevent direct P2P connectivity.
|
|
300
|
-
- **Privacy First**: The daemon binds to `127.0.0.1` only.
|
|
431
|
+
- **Privacy First**: The daemon binds to `127.0.0.1` only. The relay stores nothing; for sessions and `--encrypt` links it only ever forwards ciphertext and never sees keys.
|
|
301
432
|
|
|
302
433
|
---
|
|
303
434
|
|