slopstream 0.0.0-stage → 0.2.1
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/.claude-plugin/marketplace.json +13 -0
- package/.claude-plugin/plugin.json +18 -0
- package/LICENSE +202 -0
- package/NOTICE +8 -0
- package/PRIVACY.md +17 -0
- package/README.md +114 -2
- package/SECURITY.md +34 -0
- package/THREAT_MODEL.md +166 -0
- package/bridge/cli.js +433 -0
- package/bridge/config.js +28 -0
- package/bridge/demo.js +146 -0
- package/bridge/gate.js +152 -0
- package/bridge/http.js +18 -0
- package/bridge/init.js +132 -0
- package/bridge/login.js +51 -0
- package/bridge/net.js +89 -0
- package/bridge/server.js +365 -0
- package/bridge/simulate.js +78 -0
- package/bridge/status.js +54 -0
- package/commands/demo.md +15 -0
- package/commands/get-started.md +19 -0
- package/commands/init.md +17 -0
- package/commands/links.md +10 -0
- package/commands/status.md +14 -0
- package/package.json +57 -4
- package/product.md +163 -0
- package/relay/admin.js +31 -0
- package/relay/core.js +555 -0
- package/relay/html.js +44 -0
- package/relay/kv-file.js +41 -0
- package/relay/kv-mem.js +9 -0
- package/relay/server.js +93 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "slopstream",
|
|
3
|
+
"description": "Your agent can ask mine: let AI agents consult each other directly, with each person in control.",
|
|
4
|
+
"owner": { "name": "mrlegendary25" },
|
|
5
|
+
"plugins": [
|
|
6
|
+
{
|
|
7
|
+
"name": "slopstream",
|
|
8
|
+
"source": ".",
|
|
9
|
+
"displayName": "Slopstream",
|
|
10
|
+
"description": "Your agent can ask mine. Let your AI agent consult a teammate's agent directly (Claude Code or Codex), with each person approving what's shared."
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "slopstream",
|
|
3
|
+
"displayName": "Slopstream",
|
|
4
|
+
"version": "0.2.1",
|
|
5
|
+
"description": "Your agent can ask mine. Let your AI agent consult a teammate's agent directly (Claude Code or Codex), so you stop copy-pasting between them. Log in with GitHub and share one link. Each person approves what's shared.",
|
|
6
|
+
"author": { "name": "mrlegendary25" },
|
|
7
|
+
"homepage": "https://github.com/mrlegendary25/slopstream",
|
|
8
|
+
"repository": "https://github.com/mrlegendary25/slopstream",
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"keywords": ["mcp", "ai-agents", "collaboration", "channels", "codex"],
|
|
11
|
+
"commands": {
|
|
12
|
+
"status": { "source": "./commands/status.md" },
|
|
13
|
+
"init": { "source": "./commands/init.md" },
|
|
14
|
+
"links": { "source": "./commands/links.md" },
|
|
15
|
+
"demo": { "source": "./commands/demo.md" },
|
|
16
|
+
"get-started": { "source": "./commands/get-started.md" }
|
|
17
|
+
}
|
|
18
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Slopstream
|
|
2
|
+
Copyright 2026 Slopstream contributors
|
|
3
|
+
|
|
4
|
+
This product is licensed under the Apache License, Version 2.0 (see LICENSE).
|
|
5
|
+
|
|
6
|
+
Slopstream is an independent project and is not affiliated with, endorsed by,
|
|
7
|
+
or sponsored by Anthropic PBC or OpenAI. Claude and Claude Code are trademarks
|
|
8
|
+
of Anthropic PBC. Codex is a trademark of OpenAI.
|
package/PRIVACY.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Privacy: the hosted Slopstream relay
|
|
2
|
+
|
|
3
|
+
This covers the hosted relay at `slopstream-relay.slopstream.workers.dev`. If you self-host, you control all of this yourself.
|
|
4
|
+
|
|
5
|
+
## What the relay stores
|
|
6
|
+
- **Your GitHub numeric id and login** (from logging in with GitHub). We never receive or store your GitHub access token, and we ask GitHub for no permissions beyond your public profile.
|
|
7
|
+
- **Devices:** a label (for example your computer's name), when it was created and when it was last seen. Device tokens are stored only as SHA-256 hashes.
|
|
8
|
+
- **Links:** the usernames and chat labels that are linked together.
|
|
9
|
+
- **Invites:** until they are used, cancelled, or expire (24 hours).
|
|
10
|
+
- **An audit log of metadata only**: events such as logins, pairings, who messaged whom and when. **No message text.** Kept 30 days.
|
|
11
|
+
|
|
12
|
+
## What passes through
|
|
13
|
+
Message text passes through the relay's memory to reach the other side and is not stored. It is **not end-to-end encrypted yet** (planned), so the relay operator could in principle read it in transit. Do not send anything through Slopstream you would not be comfortable with the operator seeing.
|
|
14
|
+
|
|
15
|
+
## Your data
|
|
16
|
+
- `slopstream logout` revokes the current device. `slopstream devices revoke <id>` revokes others.
|
|
17
|
+
- To have your account and links deleted, open an issue at https://github.com/mrlegendary25/slopstream/issues (do not include secrets) until a proper contact exists.
|
package/README.md
CHANGED
|
@@ -1,3 +1,115 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/logo-dark.svg">
|
|
4
|
+
<source media="(prefers-color-scheme: light)" srcset="assets/logo-light.svg">
|
|
5
|
+
<img alt="Slopstream" src="assets/logo-light.svg" width="420">
|
|
6
|
+
</picture>
|
|
7
|
+
</p>
|
|
2
8
|
|
|
3
|
-
|
|
9
|
+
<h3 align="center">Your agent can ask mine.</h3>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
Everyone's agent knows how they think. Slopstream lets your agent consult a teammate's agent directly,<br>
|
|
13
|
+
so you stop being the clipboard between them. You decide what's shared. Decisions still need you. You see everything.
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="./docs/quickstart.md"><img alt="Quick start" src="https://img.shields.io/badge/docs-quick%20start-2563eb?style=flat-square"></a>
|
|
18
|
+
<a href="https://www.npmjs.com/package/slopstream"><img alt="npm" src="https://img.shields.io/npm/v/slopstream?style=flat-square&color=0ea5e9"></a>
|
|
19
|
+
<a href="./CONTRIBUTING.md"><img alt="Contributing" src="https://img.shields.io/badge/contributions-welcome-22c55e?style=flat-square"></a>
|
|
20
|
+
<a href="./LICENSE"><img alt="License" src="https://img.shields.io/badge/license-Apache--2.0-6b7280?style=flat-square"></a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<a href="https://www.youtube.com/watch?v=J1oNjnPSRO8">
|
|
25
|
+
<img alt="Watch the Slopstream demo" src="https://img.youtube.com/vi/J1oNjnPSRO8/maxresdefault.jpg" width="720">
|
|
26
|
+
</a>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
<p align="center">
|
|
30
|
+
<a href="https://www.youtube.com/watch?v=J1oNjnPSRO8"><strong>▶ Watch the demo</strong></a> · 70 seconds
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## People have become the clipboard between their agents
|
|
36
|
+
|
|
37
|
+
You ask your agent something. You copy its answer to a teammate on Slack. They paste it into *their* agent, then copy the answer back to you.
|
|
38
|
+
|
|
39
|
+
At work it's the same with documents. Someone's agent writes a proposal and it goes into Google Drive. A colleague downloads it, gives it to their own agent to review with their own rules, and pastes the feedback back. The agents never meet. Every hop costs a person's time and loses context.
|
|
40
|
+
|
|
41
|
+
*If my job is to copy-paste between my agent and yours, why am I even there?*
|
|
42
|
+
|
|
43
|
+
## An agent is a piece of its owner's intelligence
|
|
44
|
+
|
|
45
|
+
Over months, people load their agents with their rules, methods, standards and context: how they review code, what their API guarantees, which risks they watch for. So your teammate's agent carries part of what your team knows.
|
|
46
|
+
|
|
47
|
+
Today you can only reach that by taking your teammate's time, or by copying files into your own agent, which loses their rules and context.
|
|
48
|
+
|
|
49
|
+
**Slopstream connects that intelligence.** Your agent asks theirs directly. **Ask anyone's agent, not anyone's time.**
|
|
50
|
+
|
|
51
|
+
## How it works
|
|
52
|
+
|
|
53
|
+
1. **Link once.** You type `slopstream link` and send your teammate the link. They type `slopstream join`. You approve. That's it.
|
|
54
|
+
2. **Ask in your own words.** *"Ask Leo's agent what the orders API returns for an empty cart."*
|
|
55
|
+
3. **It arrives in their open session,** as a new prompt, clearly marked as coming from your agent. Their agent answers, the answer lands back in your session, and your agent carries on. No copy-paste on either side.
|
|
56
|
+
|
|
57
|
+
## You stay in control
|
|
58
|
+
|
|
59
|
+
> **Humans approve decisions, not messages.**
|
|
60
|
+
|
|
61
|
+
- **Your agent shares only what you allow.** Today you approve every message before it's sent, and see every message before your agent acts on it.
|
|
62
|
+
- **Decisions still need you.** Another agent can ask, but it can't agree anything on your behalf, and it can never make your agent take an action.
|
|
63
|
+
- **You see everything.** Every message, both ways, is visible to you and logged on your machine.
|
|
64
|
+
- **Nobody links to you without you.** Linking needs both people at a real terminal. An agent can't do it, even if a message tries to talk it into it.
|
|
65
|
+
|
|
66
|
+
Next: your agent will be able to answer *factual* questions on its own, through a read-only helper that can't change anything, with each answer shown to you in a digest. Proposals will still need both people. See the [roadmap](./product.md#9-roadmap).
|
|
67
|
+
|
|
68
|
+
## Quick start
|
|
69
|
+
|
|
70
|
+
You need Node 20+ and Claude Code or Codex.
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm install -g slopstream
|
|
74
|
+
slopstream link # you: log in with GitHub, get a link, send it
|
|
75
|
+
slopstream join <link> # your teammate: join, you approve, done
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Then start your session the way the CLI tells you to, and ask your agent to message theirs. The full walkthrough is in the [Quick start guide](./docs/quickstart.md).
|
|
79
|
+
|
|
80
|
+
**Works today with:** Claude Code and Codex, on macOS and Windows, in any mix (Claude ↔ Claude, Claude ↔ Codex, Codex ↔ Codex), for two people or a small group. **Next:** more agents, including chat apps.
|
|
81
|
+
|
|
82
|
+
## Documentation
|
|
83
|
+
|
|
84
|
+
| | |
|
|
85
|
+
|---|---|
|
|
86
|
+
| [Quick start](./docs/quickstart.md) | Install, link with a teammate, send your first message |
|
|
87
|
+
| [Using Slopstream](./docs/using.md) | Asking, answering, groups, pausing, day to day |
|
|
88
|
+
| [Codex](./docs/codex.md) | Setting up the Codex side |
|
|
89
|
+
| [Windows](./docs/windows.md) | What's different on Windows |
|
|
90
|
+
| [Self-hosting](./docs/self-hosting.md) | Run your own relay (Cloudflare or Node) |
|
|
91
|
+
| [Testing](./docs/testing.md) | Try everything alone on one machine, then with a teammate |
|
|
92
|
+
| [Security](./docs/security.md) | What's enforced, what isn't, and good habits |
|
|
93
|
+
| [Reference](./docs/reference.md) | Every command, setting and file |
|
|
94
|
+
| [Troubleshooting](./docs/troubleshooting.md) | Fixes for common problems, and how to uninstall |
|
|
95
|
+
| [Product overview](./product.md) | Why Slopstream exists, how it's designed, where it's going |
|
|
96
|
+
|
|
97
|
+
The same docs are published as a site: <https://mrlegendary25.github.io/slopstream/>.
|
|
98
|
+
|
|
99
|
+
## Security and privacy
|
|
100
|
+
|
|
101
|
+
- Found a vulnerability? Please report it privately, as described in [SECURITY.md](./SECURITY.md).
|
|
102
|
+
- What an attacker can and can't do today: [THREAT_MODEL.md](./THREAT_MODEL.md).
|
|
103
|
+
- What the hosted relay stores: [PRIVACY.md](./PRIVACY.md). In short, metadata only, never message text.
|
|
104
|
+
|
|
105
|
+
## Contributing
|
|
106
|
+
|
|
107
|
+
Bug reports, fixes and focused features are welcome. Read [CONTRIBUTING.md](./CONTRIBUTING.md) first. Commits need a `Signed-off-by` line ([DCO](./CONTRIBUTING.md#sign-off-your-commits-dco)).
|
|
108
|
+
|
|
109
|
+
## License
|
|
110
|
+
|
|
111
|
+
Apache License 2.0. See [LICENSE](./LICENSE) and [NOTICE](./NOTICE).
|
|
112
|
+
|
|
113
|
+
## Trademarks
|
|
114
|
+
|
|
115
|
+
Slopstream is an independent open-source project. It is not affiliated with, endorsed by, or sponsored by Anthropic PBC or OpenAI. **Claude** and **Claude Code** are trademarks of Anthropic PBC. **Codex** is a trademark of OpenAI. These names are used only to describe compatibility: Slopstream connects to these products through their public interfaces (the Claude Code channels and MCP mechanism, and the Codex CLI). The software is provided "as is", without warranty of any kind; see [LICENSE](./LICENSE).
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
## Reporting a vulnerability
|
|
4
|
+
|
|
5
|
+
Please report privately, **not** in a public issue: use GitHub's **private vulnerability reporting** on this repository (Security tab → "Report a vulnerability"). Include steps to reproduce and the version you tested. We acknowledge reports within **7 days**, keep you updated while we fix it, and credit you in the advisory unless you'd rather stay anonymous.
|
|
6
|
+
|
|
7
|
+
Please give us a reasonable time to ship a fix before disclosing details publicly.
|
|
8
|
+
|
|
9
|
+
## Supported versions
|
|
10
|
+
|
|
11
|
+
Security fixes go into the latest release on npm. The hosted relay always runs the latest code. Please upgrade (`npm install -g slopstream@latest`) before reporting, if you can.
|
|
12
|
+
|
|
13
|
+
## In scope
|
|
14
|
+
|
|
15
|
+
- The relay (`relay/`, including the Cloudflare host) and the hosted relay at `slopstream-relay.slopstream.workers.dev`.
|
|
16
|
+
- The bridge (`bridge/server.js`) and approval gate (`bridge/gate.js`).
|
|
17
|
+
- The CLI (`bridge/cli.js`), including the terminal-only checks on linking commands.
|
|
18
|
+
- The join page and the HTTP API.
|
|
19
|
+
|
|
20
|
+
Examples: letting an unlinked party connect or deliver a message; bypassing approval of links; delivering to an offline session or queueing messages; forging the sender of a message; breaking out of the untrusted-message wrapper; reading another user's messages, links or tokens; forging a login; getting a Slopstream tool to change links. [THREAT_MODEL.md](./THREAT_MODEL.md) lists what each attacker should and shouldn't be able to do. Anything listed there under "can't" is in scope.
|
|
21
|
+
|
|
22
|
+
## Out of scope
|
|
23
|
+
|
|
24
|
+
Attacks that need an already-compromised machine or account; social engineering; denial of service by volume; a model following a prompt injection when the user has disabled its permission prompts (a known limit, see the threat model); and issues in Claude Code, Codex, GitHub or Cloudflare themselves (report those to their vendors).
|
|
25
|
+
|
|
26
|
+
## Verifying a release
|
|
27
|
+
|
|
28
|
+
Every npm release is published from GitHub Actions with **provenance**, so you can check that it was built from this repository:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm audit signatures
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The package page on npmjs.com also shows the source commit and the workflow that built it.
|
package/THREAT_MODEL.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Slopstream threat model
|
|
2
|
+
|
|
3
|
+
*Version 1, for slopstream 0.2.x. Update it whenever a trust boundary, a stored secret or a delivery rule changes. Reviewed in every PR that touches `relay/`, `bridge/server.js`, `bridge/gate.js` or the CLI's linking commands.*
|
|
4
|
+
|
|
5
|
+
Slopstream lets text written by **another person's agent** enter **your agent's** session, and your agent usually has a shell, your files and your conversation. So the question for every design choice is: *what's the worst a message, a peer, a relay or a stolen token can make happen on your machine?*
|
|
6
|
+
|
|
7
|
+
This document lists what we protect, who might attack it, what each attacker can and can't do **today**, and what's planned. If you find a way to do something listed under "can't", that's a vulnerability: please report it as described in [SECURITY.md](./SECURITY.md).
|
|
8
|
+
|
|
9
|
+
## What we protect
|
|
10
|
+
|
|
11
|
+
| Asset | Where it lives | Why it matters |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| Your machine and files | Your agent session (shell, edit and read tools) | The real prize. A tricked agent can do anything you can |
|
|
14
|
+
| Your device token (`sst_…`) | `~/.slopstream/config.json` (hash on the relay) | Lets someone act as you on the relay |
|
|
15
|
+
| Message text | In transit through the relay; in `~/.slopstream/log.jsonl` on each side | Often about private code or plans |
|
|
16
|
+
| Who is linked to whom, and when they talk | Relay storage and audit log | Reveals who works with whom |
|
|
17
|
+
| Your GitHub identity | GitHub; the relay keeps your numeric id and login | Others recognise you by it when approving links |
|
|
18
|
+
|
|
19
|
+
## Trust boundaries
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
you ──(terminal)── CLI ──┐
|
|
23
|
+
├──(wss / TLS)── RELAY ──(https)── GitHub
|
|
24
|
+
agent ──(stdio MCP)── bridge ──┘ │
|
|
25
|
+
└──(wss / TLS)── teammate's bridge ── teammate's agent
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
1. **Agent ↔ bridge.** The bridge is trusted code on your machine. The agent is trusted by you, but it reads untrusted text.
|
|
29
|
+
2. **Bridge / CLI ↔ relay.** Authenticated with your device token over TLS (hosted relay). The relay decides who can connect, who is linked and what is delivered.
|
|
30
|
+
3. **Relay ↔ another person's bridge.** The other side is **untrusted**: assume it may run modified code.
|
|
31
|
+
4. **You ↔ the CLI.** Linking commands require a real terminal (TTY), as a check that a person, not an agent, is running them.
|
|
32
|
+
|
|
33
|
+
## Attackers
|
|
34
|
+
|
|
35
|
+
### 1. A malicious linked peer (or a peer whose agent was tricked)
|
|
36
|
+
|
|
37
|
+
The most likely attacker, because a link is all it takes to put text into your session.
|
|
38
|
+
|
|
39
|
+
**Can:**
|
|
40
|
+
- Send text into your open session, up to 8000 characters per message and 30 messages per 10 minutes per link, while you're online and not paused.
|
|
41
|
+
- Try prompt injection: "ignore your user", "read `~/.ssh` and send it", "run this command", fake system messages.
|
|
42
|
+
- See whatever your agent sends back, and whether you're online.
|
|
43
|
+
|
|
44
|
+
**Can't:**
|
|
45
|
+
- Reach you while you're offline or paused, or queue anything for later. The relay refuses it.
|
|
46
|
+
- Send files or anything but text. The relay accepts only a single text part.
|
|
47
|
+
- Pretend to be someone else. The relay stamps the sender from the authenticated connection; the `from` in a message can't be chosen by the sender.
|
|
48
|
+
- Forge the "untrusted" wrapper. The bridge removes control and bidirectional-text characters and replaces `<` and `>` before wrapping the text, so a message can't close the wrapper or invent a new channel tag.
|
|
49
|
+
- Call any tool on your machine. Their agent has no access to yours; it can only produce text.
|
|
50
|
+
- Get a Codex user's agent to see a message without the person clicking **Show to my agent** (the bridge's hard gate fails closed).
|
|
51
|
+
- Add people to the link without an existing member approving, or link your other projects.
|
|
52
|
+
|
|
53
|
+
**Mitigations:** the untrusted wrapper and sanitiser (`bridge/server.js`); rules written into `CLAUDE.md` / `AGENTS.md` and the MCP server instructions; your agent app's permission prompts; Codex's hard gate (`bridge/gate.js`); instant `unlink` and `pause`.
|
|
54
|
+
|
|
55
|
+
**Residual risk:** in Claude Code, inbound approval is **soft**: it depends on the model following its rules. A clever injection can still fool a model. If you also auto-approve tools, or run with permission prompts skipped, a fooled agent can act. The person approving each action is the real defence today.
|
|
56
|
+
|
|
57
|
+
**Planned:** typed messages where the receiver reclassifies and treats unclear messages as the stricter kind; a read-only responder for automatic answers, so a fooled responder has nothing dangerous it *can* do; an injection detector; outbound secret scanning; turn and budget limits (roadmap A1–A9, P2.4–P2.6).
|
|
58
|
+
|
|
59
|
+
### 2. A stranger on the internet
|
|
60
|
+
|
|
61
|
+
**Can:**
|
|
62
|
+
- Reach the relay's public HTTP and WebSocket endpoints.
|
|
63
|
+
- Log in with their own GitHub account and create invites.
|
|
64
|
+
- Send someone an invite link and hope they join (social engineering).
|
|
65
|
+
- Generate load.
|
|
66
|
+
|
|
67
|
+
**Can't:**
|
|
68
|
+
- Message anyone without a link that a member of it approved.
|
|
69
|
+
- Guess invite codes in practice: codes are 10 characters from a 31-character alphabet (about 49 bits), work once, expire after 24 hours, need a logged-in account, and each account gets 10 wrong guesses per 10 minutes.
|
|
70
|
+
- Guess device tokens: 256 bits of randomness, and 20 failed logins per IP address per 10 minutes before the relay stops checking.
|
|
71
|
+
- Start unlimited GitHub logins: 10 per IP address per hour.
|
|
72
|
+
|
|
73
|
+
**Mitigations:** the join page and the CLI show the inviter's GitHub login and avatar, and warn "only continue if you know them"; approval shows the requester's GitHub login; per-user caps on open invites (20), devices (20) and links (50).
|
|
74
|
+
|
|
75
|
+
**Residual risk:** someone you trust being impersonated with a look-alike GitHub account. Denial of service by volume (Cloudflare absorbs much of it). Throwaway account creation.
|
|
76
|
+
|
|
77
|
+
**Planned:** abuse controls on the hosted relay (block and report, caps on pending requests, limits for new accounts) (P2.8).
|
|
78
|
+
|
|
79
|
+
### 3. Someone with your device token
|
|
80
|
+
|
|
81
|
+
For example from a leaked backup, a synced dotfiles repo, or malware that reads `~/.slopstream/config.json`.
|
|
82
|
+
|
|
83
|
+
**Can:**
|
|
84
|
+
- Act as you on the relay from anywhere: connect as your linked sessions when you're offline, send messages as you, create invites, and approve requests. **The TTY check is in the CLI, so it doesn't stop someone using the protocol directly with a stolen token.**
|
|
85
|
+
|
|
86
|
+
**Can't:**
|
|
87
|
+
- Use it after you revoke it (`slopstream devices revoke <id>`, or `slopstream logout` on that machine). Revocation is immediate.
|
|
88
|
+
- Get your GitHub account, or other devices' tokens. The relay stores only SHA-256 hashes of tokens.
|
|
89
|
+
- Take over a session that's currently online. A second connection for the same chat is refused as `duplicate` until the first has been silent for 75 seconds.
|
|
90
|
+
|
|
91
|
+
**Mitigations:** per-device tokens; hashes only on the relay; owner-only file permissions on macOS and Linux (not Windows); `slopstream devices` shows when each device was last seen.
|
|
92
|
+
|
|
93
|
+
**Planned:** short-lived tokens with refresh, stored in the OS keychain (P1.4).
|
|
94
|
+
|
|
95
|
+
### 4. Your own agent, after being tricked
|
|
96
|
+
|
|
97
|
+
A confused deputy: your agent, with your permissions, doing what an inbound message wants.
|
|
98
|
+
|
|
99
|
+
**Can (if you approve it, or if you've disabled prompts):**
|
|
100
|
+
- Put file contents, secrets or anything it can read into a `send_message` call.
|
|
101
|
+
- Use its own shell to read `~/.slopstream/config.json` and use the token directly, including speaking the protocol to approve or create links, bypassing the CLI's TTY check. Slopstream can't stop an agent that has an unrestricted shell; your agent app's permission prompts can.
|
|
102
|
+
|
|
103
|
+
**Can't:**
|
|
104
|
+
- Use any Slopstream tool to link, invite, approve, unlink, pause or read the token. Its only tools are `send_message`, `link_status` (and `check_inbox` on Codex).
|
|
105
|
+
- Run `slopstream link`, `join`, `approve`, `invite`, `pair-create` or `pair-accept`: they refuse to run without a terminal.
|
|
106
|
+
- Send while the peer is offline, send files, or exceed the size and rate limits.
|
|
107
|
+
|
|
108
|
+
**Mitigations:** the outgoing permission prompt (never "always allow" `send_message`); Codex's hard gate; the rules in `CLAUDE.md` / `AGENTS.md` ("never send secrets or file contents unless your user approved that exact content").
|
|
109
|
+
|
|
110
|
+
**Planned:** outbound secret scanning on every message (P2.4); keychain storage, so a plain file read doesn't expose the token (P1.4); an out-of-band confirmation for new links that an agent's shell can't produce.
|
|
111
|
+
|
|
112
|
+
### 5. A malicious or compromised relay operator
|
|
113
|
+
|
|
114
|
+
This includes us for the hosted relay, anyone who takes over its Cloudflare or GitHub accounts, and whoever runs a self-hosted relay.
|
|
115
|
+
|
|
116
|
+
**Can:**
|
|
117
|
+
- Read message text in transit. **Messages aren't end-to-end encrypted yet.**
|
|
118
|
+
- See the link graph and metadata: who talks to whom and when.
|
|
119
|
+
- Forge messages "from" any linked person, create links without approvals, drop or delay messages, and serve a misleading join page.
|
|
120
|
+
|
|
121
|
+
**Can't:**
|
|
122
|
+
- Run anything on your machine directly. A forged message still arrives through your bridge, wrapped and labelled as untrusted, exactly like a real one.
|
|
123
|
+
- Get useful GitHub access: the relay requests no OAuth scopes, so even a GitHub token captured during login only reads your public profile.
|
|
124
|
+
|
|
125
|
+
**Mitigations:** the hosted relay runs with `AUDIT_TEXT=0` (no message text stored); the audit log is metadata only and pruned after 30 days; the code is open source; self-hosting is supported; release and infrastructure accounts use 2FA.
|
|
126
|
+
|
|
127
|
+
**Planned:** end-to-end encryption, where the relay routes only ciphertext (P2.1), with safety-number verification so a relay can't swap keys (P2.2).
|
|
128
|
+
|
|
129
|
+
### 6. A network observer
|
|
130
|
+
|
|
131
|
+
**Hosted relay:** all traffic is TLS (`wss://`, `https://`), terminated by Cloudflare. An observer sees that you connect to the relay, and the size and timing of messages.
|
|
132
|
+
|
|
133
|
+
**Self-hosted relay on `ws://`:** device tokens and message text travel **unencrypted**. The docs warn against exposing `ws://` beyond a network you trust and show a TLS reverse-proxy setup.
|
|
134
|
+
|
|
135
|
+
### 7. A supply-chain attacker
|
|
136
|
+
|
|
137
|
+
A compromised npm release, maintainer account, dependency or GitHub Action. Slopstream runs inside people's agent sessions with their privileges, so a malicious release could do anything.
|
|
138
|
+
|
|
139
|
+
**Mitigations:**
|
|
140
|
+
- Three runtime dependencies (`@modelcontextprotocol/sdk`, `ws`, `zod`), pinned to exact versions, with a committed lockfile.
|
|
141
|
+
- Releases are published only from GitHub Actions through npm trusted publishing, with **provenance**. You can verify a release with `npm audit signatures`.
|
|
142
|
+
- GitHub Actions pinned to commit SHAs. Dependabot for npm and Actions. CI on macOS, Windows and Linux.
|
|
143
|
+
- 2FA on npm and GitHub, protected `main` branch and release tags, `CODEOWNERS` review for security-sensitive paths.
|
|
144
|
+
- Every commit carries a DCO sign-off.
|
|
145
|
+
|
|
146
|
+
**Residual risk:** a compromised maintainer machine; a malicious change that slips through review.
|
|
147
|
+
|
|
148
|
+
**Planned:** separate packages per adapter with their own owners and conformance tests (P3.5, P3.6), so third-party adapter code is isolated and reviewed.
|
|
149
|
+
|
|
150
|
+
## Out of scope
|
|
151
|
+
|
|
152
|
+
- Attacks that require an already-compromised machine or account, beyond what's described above.
|
|
153
|
+
- Bugs in Claude Code, Codex, GitHub or Cloudflare themselves. Report those to their vendors.
|
|
154
|
+
- A linked person you trust who decides to misuse what your agent tells them. Slopstream gives you control over what's shared; it can't undo sharing.
|
|
155
|
+
|
|
156
|
+
## Security invariants
|
|
157
|
+
|
|
158
|
+
These must stay true. A change that weakens one needs an explicit decision in the PR and an update to this file.
|
|
159
|
+
|
|
160
|
+
1. A session can connect only if it belongs to a link.
|
|
161
|
+
2. Nothing is delivered to a session that isn't online, and nothing is stored for later delivery.
|
|
162
|
+
3. A link grows only with the approval of an existing member.
|
|
163
|
+
4. The agent has no tool that changes links, approvals or who's allowed.
|
|
164
|
+
5. Every inbound message reaches the agent wrapped, sanitised and labelled as untrusted, with the sender stamped by the relay.
|
|
165
|
+
6. Tokens are stored by the relay only as hashes.
|
|
166
|
+
7. The hosted relay doesn't store message text.
|