srift-transfer 2.2.12

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 ADDED
@@ -0,0 +1,21 @@
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.
package/README.md ADDED
@@ -0,0 +1,134 @@
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