tactus-mcp 0.1.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/CHANGELOG.md +47 -0
- package/LICENSE +201 -0
- package/README.md +226 -0
- package/dist/buttplug.d.ts +36 -0
- package/dist/buttplug.js +216 -0
- package/dist/buttplug.js.map +1 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.js +38 -0
- package/dist/config.js.map +1 -0
- package/dist/controller.d.ts +35 -0
- package/dist/controller.js +2 -0
- package/dist/controller.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +75 -0
- package/dist/index.js.map +1 -0
- package/dist/safety.d.ts +50 -0
- package/dist/safety.js +216 -0
- package/dist/safety.js.map +1 -0
- package/dist/server.d.ts +11 -0
- package/dist/server.js +234 -0
- package/dist/server.js.map +1 -0
- package/dist/types.d.ts +42 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/package.json +56 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format is based on
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/), and this project adheres to
|
|
5
|
+
[Semantic Versioning](https://semver.org/). While the major version is `0`, the
|
|
6
|
+
public tool interface may still change between minor versions.
|
|
7
|
+
|
|
8
|
+
## [0.1.1] — 2026-06-13
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- A rate-limited command that was coalesced and then failed on flush (e.g. a
|
|
12
|
+
dropped link) no longer becomes an unhandled rejection that crashes the
|
|
13
|
+
server; the failure is swallowed and logged to stderr.
|
|
14
|
+
- `server_status` / `status()` is now safe to call while disconnected or
|
|
15
|
+
mid-reconnect — it previously read `client.devices` unconditionally, which
|
|
16
|
+
throws when the connector is down.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- `npm run e2e`: an end-to-end probe that drives the real controller + safety
|
|
20
|
+
stack against a live Intiface (capability-adaptive; simulator or real device).
|
|
21
|
+
- Regression tests for the rate-limiter flush error path and for `status()`
|
|
22
|
+
while disconnected.
|
|
23
|
+
|
|
24
|
+
## [0.1.0] — unreleased
|
|
25
|
+
|
|
26
|
+
First feature-complete development version. Verified against the Intiface device
|
|
27
|
+
simulator and at least one real device.
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
- MCP server (stdio) wrapping Buttplug/Intiface as a content-agnostic control layer.
|
|
31
|
+
- Tools: `list_devices`, `scan_for_devices`, `get_battery`, `vibrate`, `oscillate`,
|
|
32
|
+
`rotate`, `linear`, `vibrate_pattern`, `stop_device`, `stop_all`, `server_status`.
|
|
33
|
+
- Safety layer (on by default): intensity clamping with honest effective-value
|
|
34
|
+
reporting, an independent per-device watchdog auto-stop, stop-preemptible
|
|
35
|
+
patterns, per-device rate limiting, stop-on-disconnect/exit, and fail-safe
|
|
36
|
+
stop semantics that retry rather than assume success.
|
|
37
|
+
- Server-side hard validation of pattern bounds and out-of-range input.
|
|
38
|
+
- Robust Intiface connection with exponential-backoff reconnect; the server never
|
|
39
|
+
crashes when Intiface is unavailable and returns clear, actionable errors.
|
|
40
|
+
- Reacts to a device dropping (BLE link lost / out of range): logs the
|
|
41
|
+
disconnect and clears that device's safety timers so no watchdog fires for a
|
|
42
|
+
device that is gone. (Note: silent BLE degradation that Intiface does not
|
|
43
|
+
detect is not yet actively probed — see known limitations.)
|
|
44
|
+
- Configuration via `INTIFACE_URL`, `MAX_INTENSITY`, `MAX_CONTINUOUS_MS`,
|
|
45
|
+
`SCAN_DEFAULT_MS`, and a gated `--allow-unsafe` override.
|
|
46
|
+
- Apache-2.0 license, compliance/trademark/acceptable-use documentation, unit
|
|
47
|
+
tests for the safety layer, and CI across Node 20/22/24.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
95
|
+
Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Tactus contributors
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
<!-- mcp-name: io.github.ProjectAILiberation/tactus -->
|
|
2
|
+
|
|
3
|
+
# Tactus
|
|
4
|
+
|
|
5
|
+
[](https://github.com/ProjectAILiberation/tactus/actions/workflows/ci.yml)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
**A content-agnostic MCP server that lets any AI agent control intimate hardware through a clean, safe tool interface.**
|
|
9
|
+
|
|
10
|
+
Tactus is a thin, neutral control layer. It wraps [Buttplug](https://buttplug.io/) /
|
|
11
|
+
Intiface — so a single integration reaches 750+ devices across ~26 brands — and
|
|
12
|
+
exposes them to AI agents as Model Context Protocol (MCP) tools. It forwards
|
|
13
|
+
hardware control commands only. **It does not generate, host, or store any
|
|
14
|
+
content of any kind.**
|
|
15
|
+
|
|
16
|
+
- **Safety first.** Intensity clamping, an independent watchdog auto-stop, a
|
|
17
|
+
one-call emergency stop, and fail-safe stop semantics are built in and on by
|
|
18
|
+
default — this is the headline feature, not an afterthought.
|
|
19
|
+
- **One-line install.** `npx -y tactus-mcp`, no clone or build.
|
|
20
|
+
- **OS-agnostic.** Tactus never touches Bluetooth. Intiface owns the radio; we
|
|
21
|
+
just talk to it over a local WebSocket.
|
|
22
|
+
|
|
23
|
+
> ⚠️ Adults only (18+, or the age of majority in your jurisdiction). For use
|
|
24
|
+
> only on devices you own and only with the consent of everyone involved.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## How it works
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
AI client / agent Tactus (this server) Intiface Central
|
|
32
|
+
(Claude Desktop, MCP - MCP server WebSocket - holds BLE/USB
|
|
33
|
+
Claude Code, your ───────▶ - Buttplug client ────────▶ - 750+ device
|
|
34
|
+
own AI product) - SAFETY LAYER :12345 protocols
|
|
35
|
+
│ BLE/USB
|
|
36
|
+
▼
|
|
37
|
+
🔵 your device
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Everything runs locally on your machine. Tactus is a Buttplug client that
|
|
41
|
+
connects to a locally running Intiface Central/Engine at
|
|
42
|
+
`ws://127.0.0.1:12345`.
|
|
43
|
+
|
|
44
|
+
## Prerequisites
|
|
45
|
+
|
|
46
|
+
1. Install [Intiface Central](https://intiface.com/central/).
|
|
47
|
+
2. Open it and click **Start Server**.
|
|
48
|
+
3. Pair your device (or, for development, add a simulated device under
|
|
49
|
+
**Devices → Manage Simulated Devices**).
|
|
50
|
+
|
|
51
|
+
## Install & configure
|
|
52
|
+
|
|
53
|
+
Tactus runs over stdio via `npx`. Add it to your MCP client config.
|
|
54
|
+
|
|
55
|
+
**Claude Desktop / Claude Code** (`claude_desktop_config.json`):
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"mcpServers": {
|
|
60
|
+
"tactus": {
|
|
61
|
+
"command": "npx",
|
|
62
|
+
"args": ["-y", "tactus-mcp"],
|
|
63
|
+
"env": { "MAX_INTENSITY": "1.0" }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The same `command`/`args` work for any MCP client that launches stdio servers
|
|
70
|
+
(Cursor, Cline, Continue, etc.).
|
|
71
|
+
|
|
72
|
+
## Tools
|
|
73
|
+
|
|
74
|
+
| Tool | Purpose |
|
|
75
|
+
|---|---|
|
|
76
|
+
| `list_devices` | List connected devices and their actuators |
|
|
77
|
+
| `scan_for_devices` | Scan for and return newly found devices |
|
|
78
|
+
| `get_battery` | Read battery level (0.0–1.0) |
|
|
79
|
+
| `vibrate` | Set vibration intensity (0.0–1.0) |
|
|
80
|
+
| `oscillate` | Set oscillation intensity (0.0–1.0) |
|
|
81
|
+
| `rotate` | Set rotation speed and direction |
|
|
82
|
+
| `linear` | Move a stroker to a position over a duration |
|
|
83
|
+
| `vibrate_pattern` | Play a timed, interruptible vibration pattern |
|
|
84
|
+
| `stop_device` | Stop one device |
|
|
85
|
+
| `stop_all` | Emergency stop — halt every device immediately |
|
|
86
|
+
| `server_status` | Report connection status to Intiface |
|
|
87
|
+
|
|
88
|
+
All intensities are normalized to `0.0–1.0`. Every tool returns both structured
|
|
89
|
+
data and human-readable text.
|
|
90
|
+
|
|
91
|
+
## Safety
|
|
92
|
+
|
|
93
|
+
The safety layer wraps every driving command and is on by default:
|
|
94
|
+
|
|
95
|
+
- **Intensity clamp** — requests are clamped to `MAX_INTENSITY`; the effective
|
|
96
|
+
value is reported back, and out-of-range input is rejected with a clear error
|
|
97
|
+
rather than silently coerced.
|
|
98
|
+
- **Watchdog auto-stop** — any continuous drive auto-stops after
|
|
99
|
+
`MAX_CONTINUOUS_MS` (default 10 minutes) unless refreshed by a new command.
|
|
100
|
+
This is an independent timer, not a check-on-next-call.
|
|
101
|
+
- **Stop on disconnect/exit** — if the AI client disconnects or the process is
|
|
102
|
+
signalled, all devices stop. The watchdog is the hard backstop for hard kills.
|
|
103
|
+
- **Interruptible patterns** — patterns are time-scheduled so a single call
|
|
104
|
+
never blocks the server; any stop preempts them instantly.
|
|
105
|
+
- **Rate limiting** — per-device command bursts are coalesced to protect BLE.
|
|
106
|
+
- **Fail-safe stop** — if a stop cannot be confirmed, Tactus retries rather than
|
|
107
|
+
optimistically reporting success.
|
|
108
|
+
|
|
109
|
+
## Configuration
|
|
110
|
+
|
|
111
|
+
| Variable | Default | Meaning |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| `INTIFACE_URL` | `ws://127.0.0.1:12345` | Intiface WebSocket address |
|
|
114
|
+
| `MAX_INTENSITY` | `1.0` | Clamp ceiling for drive intensity (0.0–1.0) |
|
|
115
|
+
| `MAX_CONTINUOUS_MS` | `600000` | Watchdog auto-stop window |
|
|
116
|
+
| `SCAN_DEFAULT_MS` | `5000` | Default scan duration |
|
|
117
|
+
| `--allow-unsafe` | _off_ | Disables the intensity clamp (discouraged) |
|
|
118
|
+
|
|
119
|
+
## Troubleshooting
|
|
120
|
+
|
|
121
|
+
**"Intiface is not reachable at ws://127.0.0.1:12345"**
|
|
122
|
+
Start Intiface Central and click **Start Server** (the top status should read
|
|
123
|
+
"Engine running"). Tactus retries automatically with backoff, so once Intiface
|
|
124
|
+
is up the tools start working without restarting your MCP client.
|
|
125
|
+
|
|
126
|
+
**A device doesn't show up when scanning**
|
|
127
|
+
- Make sure it is powered on and awake (press a button to wake it), and **not
|
|
128
|
+
already connected to its own phone app** — Bluetooth devices accept one host at
|
|
129
|
+
a time, so close/disconnect the app first.
|
|
130
|
+
- On macOS, Intiface needs Bluetooth permission: **System Settings → Privacy &
|
|
131
|
+
Security → Bluetooth → enable Intiface Central**, then quit and reopen Intiface
|
|
132
|
+
(the permission only takes effect after a restart).
|
|
133
|
+
- Keep the device in range; out-of-range devices drop and disappear from
|
|
134
|
+
`list_devices`.
|
|
135
|
+
|
|
136
|
+
**My computer sees the device over Bluetooth, but Intiface/Tactus doesn't**
|
|
137
|
+
The device's advertised Bluetooth name isn't in Buttplug's supported device
|
|
138
|
+
list (common for regional/rebranded SKUs). Support must be added **upstream in
|
|
139
|
+
[Buttplug](https://github.com/buttplugio/buttplug)** — Tactus deliberately adds
|
|
140
|
+
no per-device code and does not reverse-engineer devices.
|
|
141
|
+
|
|
142
|
+
**A command returns "Unknown device id"**
|
|
143
|
+
The device disconnected (e.g. out of range) and left the known set. Call
|
|
144
|
+
`scan_for_devices` / `list_devices` to reconnect and get its current id.
|
|
145
|
+
|
|
146
|
+
## Known limitations
|
|
147
|
+
|
|
148
|
+
- **Device coverage = whatever Buttplug supports.** Devices not present in
|
|
149
|
+
Buttplug's device configuration cannot be controlled until added upstream.
|
|
150
|
+
- **Silent link degradation is not actively detected.** A dropped link that
|
|
151
|
+
Intiface reports is handled (the device leaves `list_devices` and drive calls
|
|
152
|
+
error clearly). But if a Bluetooth link degrades silently *without* Intiface
|
|
153
|
+
noticing, commands may appear to succeed while the device is unresponsive —
|
|
154
|
+
active liveness probing is not yet implemented.
|
|
155
|
+
- **Local only.** This package controls devices on the same machine via a local
|
|
156
|
+
Intiface. Internet/remote control is out of scope here.
|
|
157
|
+
|
|
158
|
+
## Adding support for an unrecognized device
|
|
159
|
+
|
|
160
|
+
Using a device from a supported brand that doesn't show up? It often just
|
|
161
|
+
advertises a Bluetooth name (or regional SKU) that Buttplug hasn't catalogued
|
|
162
|
+
yet. Because Tactus wraps Buttplug, the fix belongs **upstream in Buttplug**, not
|
|
163
|
+
here — and for a same-brand device it's usually just adding a **name**, with no
|
|
164
|
+
reverse-engineering.
|
|
165
|
+
|
|
166
|
+
1. Find the device's advertised Bluetooth name (see Troubleshooting above).
|
|
167
|
+
2. In Intiface's user device configuration, add that name to the same brand's
|
|
168
|
+
existing protocol and test whether it drives correctly.
|
|
169
|
+
3. If it works, contribute the name upstream to
|
|
170
|
+
[buttplugio/buttplug](https://github.com/buttplugio/buttplug) so everyone
|
|
171
|
+
benefits — and/or open an **"Unsupported device"** issue here and we'll help.
|
|
172
|
+
|
|
173
|
+
If a device only works under a protocol it doesn't truly match — or needs a
|
|
174
|
+
protocol Buttplug doesn't have — that would require reverse-engineering, which is
|
|
175
|
+
out of scope (see [CONTRIBUTING](CONTRIBUTING.md)).
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Trademarks
|
|
180
|
+
|
|
181
|
+
"Lovense", "We-Vibe", "Satisfyer", "Kiiroo", "Lelo", "The Handy", "Magic
|
|
182
|
+
Motion", "Svakom", and other device names are trademarks of their respective
|
|
183
|
+
owners. Tactus is an independent project and is **not** affiliated with,
|
|
184
|
+
endorsed by, sponsored by, or partnered with any device manufacturer. It is
|
|
185
|
+
described as *compatible with* these devices only in the factual sense that it
|
|
186
|
+
builds on the open-source Buttplug protocol library. No manufacturer logos are
|
|
187
|
+
used.
|
|
188
|
+
|
|
189
|
+
## Content generation — out of scope
|
|
190
|
+
|
|
191
|
+
This server forwards hardware control commands only. It does **not** generate,
|
|
192
|
+
synthesize, recommend, or produce any text, image, audio, or video content. The
|
|
193
|
+
calling AI agent is the sole content-generating party and is solely responsible
|
|
194
|
+
for any content it produces and for compliance with content obligations in its
|
|
195
|
+
jurisdiction.
|
|
196
|
+
|
|
197
|
+
## Acceptable use
|
|
198
|
+
|
|
199
|
+
Tactus is a neutral, content-agnostic hardware control layer. It does **not**
|
|
200
|
+
support, document, or assist with: use on devices you do not own or lack consent
|
|
201
|
+
to operate; use by or on minors; or any use violating applicable law in your
|
|
202
|
+
jurisdiction. These statements describe the scope of maintainer support and
|
|
203
|
+
documentation — they are **not** additional restrictions on the License, which
|
|
204
|
+
continues to govern all use, modification, and redistribution. Users are
|
|
205
|
+
independently responsible for evaluating their use against applicable law.
|
|
206
|
+
|
|
207
|
+
Tactus only uses device protocols already supported upstream by Buttplug. It
|
|
208
|
+
does **not** reverse-engineer unsupported devices and does **not** break any
|
|
209
|
+
device encryption or access control. It collects and transmits no personal or
|
|
210
|
+
usage data.
|
|
211
|
+
|
|
212
|
+
## Disclaimer
|
|
213
|
+
|
|
214
|
+
This software controls hardware you connect to it. Use it only on devices you
|
|
215
|
+
own and only with the consent of everyone involved. For adults only (18+, or the
|
|
216
|
+
age of majority in your jurisdiction).
|
|
217
|
+
|
|
218
|
+
This software is provided "AS IS", without warranty of any kind (see
|
|
219
|
+
[LICENSE](LICENSE)). The statements above are informational; they do not modify
|
|
220
|
+
the License, add warranties or duties of care, or transfer liability. The
|
|
221
|
+
License's no-warranty and limitation-of-liability terms continue to apply in
|
|
222
|
+
full.
|
|
223
|
+
|
|
224
|
+
## License
|
|
225
|
+
|
|
226
|
+
[Apache-2.0](LICENSE).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { DeviceController, DriveTarget, ScalarOutput } from "./controller.js";
|
|
2
|
+
import { DeviceInfo, ServerStatus, TactusConfig } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* DeviceController backed by Buttplug/Intiface over a local WebSocket.
|
|
5
|
+
* Our code never touches BLE — Intiface owns that, so this is OS-agnostic.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ButtplugController implements DeviceController {
|
|
8
|
+
private readonly config;
|
|
9
|
+
private readonly client;
|
|
10
|
+
private serverName?;
|
|
11
|
+
private readonly disconnectCbs;
|
|
12
|
+
private readonly deviceRemovedCbs;
|
|
13
|
+
private readonly deviceAddedCbs;
|
|
14
|
+
constructor(config: TactusConfig);
|
|
15
|
+
connect(): Promise<void>;
|
|
16
|
+
disconnect(): Promise<void>;
|
|
17
|
+
isConnected(): boolean;
|
|
18
|
+
status(): ServerStatus;
|
|
19
|
+
listDevices(): DeviceInfo[];
|
|
20
|
+
scan(durationMs: number): Promise<DeviceInfo[]>;
|
|
21
|
+
getBattery(deviceId: number): Promise<number>;
|
|
22
|
+
output(deviceId: number, type: ScalarOutput, value: number, target?: DriveTarget): Promise<void>;
|
|
23
|
+
rotate(deviceId: number, speed: number, clockwise: boolean, target?: DriveTarget): Promise<void>;
|
|
24
|
+
linear(deviceId: number, position: number, durationMs: number, target?: DriveTarget): Promise<void>;
|
|
25
|
+
stopDevice(deviceId: number): Promise<void>;
|
|
26
|
+
stopAll(): Promise<void>;
|
|
27
|
+
onDisconnect(cb: () => void): void;
|
|
28
|
+
onDeviceAdded(cb: (id: number, name: string) => void): void;
|
|
29
|
+
onDeviceRemoved(cb: (id: number, name: string) => void): void;
|
|
30
|
+
/** Resolve the target features, build a per-feature command, and send. */
|
|
31
|
+
private runOnFeatures;
|
|
32
|
+
private featuresFor;
|
|
33
|
+
private describe;
|
|
34
|
+
private requireConnected;
|
|
35
|
+
private requireDevice;
|
|
36
|
+
}
|