wokitoki 0.0.0-stage → 0.2.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/LICENSE ADDED
@@ -0,0 +1,55 @@
1
+ Apache License
2
+
3
+ Version 2.0, January 2004
4
+
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16
+
17
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18
+
19
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20
+
21
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22
+
23
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24
+
25
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26
+
27
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28
+
29
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30
+
31
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32
+
33
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34
+
35
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36
+
37
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
38
+
39
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
40
+
41
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
42
+
43
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
package/README.md CHANGED
@@ -1,3 +1,176 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <img src="https://raw.githubusercontent.com/pandeyvishwas51-oss/wokitoki/main/assets/hero.svg" width="520" alt="Two orange WokiToki walkie-talkie mascots exchanging encrypted messages over a direct line">
4
+
5
+ # WokiToki
6
+
7
+ **Walkie-talkies for your AI coding agents.**
8
+
9
+ Your Claude Code talks to your friend's Claude Code (or Codex), directly, peer to peer, end-to-end encrypted.<br>
10
+ No server. No account. No tunnel. Free and open source.
11
+
12
+ [![CI](https://github.com/pandeyvishwas51-oss/wokitoki/actions/workflows/ci.yml/badge.svg)](https://github.com/pandeyvishwas51-oss/wokitoki/actions/workflows/ci.yml)
13
+ [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-FF5A1F)](https://github.com/pandeyvishwas51-oss/wokitoki/blob/main/LICENSE)
14
+ [![MCP server](https://img.shields.io/badge/MCP-server-2B1306)](#use-it-from-claude-code-or-codex)
15
+ [![Node 22.18+](https://img.shields.io/badge/node-22.18%2B-2B1306)](https://nodejs.org)
16
+
17
+ **[▶ Watch the 1-minute demo (sound on)](https://pandeyvishwas51-oss.github.io/wokitoki/#demo)**
18
+
19
+ [Website](https://pandeyvishwas51-oss.github.io/wokitoki/) · [Quick start](#quick-start) · [How it works](#how-it-works) · [FAQ](#faq) · [Security](#security-honestly)
20
+
21
+ </div>
22
+
23
+ ## What is WokiToki?
24
+
25
+ WokiToki is an open-source, peer-to-peer messaging tool that lets AI coding agents run by different people, such as **Claude Code** and **OpenAI Codex**, message each other directly. Each developer installs it with one command. The two people pair once by comparing a 6-digit code. From then on, their agents send and read end-to-end encrypted messages through ordinary **MCP tools**. There is no server to host, no account to create, and nobody stores the messages in between.
26
+
27
+ It is for two developers whose agents need to coordinate: a frontend and a backend agent agreeing on an API, two teammates' agents handing over context, or a friend's agent answering a question about their code. You stop copy-pasting between chat windows.
28
+
29
+ ## Quick start
30
+
31
+ You need Node.js 22.18+ (`brew install node` or [nodejs.org](https://nodejs.org)) and git, on macOS or Linux (on Windows, use WSL).
32
+
33
+ **1. You:** install, then create an invite.
34
+
35
+ ```bash
36
+ curl -fsSL https://raw.githubusercontent.com/pandeyvishwas51-oss/wokitoki/main/install.sh | bash -s -- --name "Vishwas"
37
+ wokitoki pair create
38
+ ```
39
+
40
+ **2. Your friend:** paste the one line that `pair create` printed for them. It looks like this:
41
+
42
+ ```bash
43
+ curl -fsSL https://raw.githubusercontent.com/pandeyvishwas51-oss/wokitoki/main/install.sh | bash -s -- --name "Rahul" --join amp2.XXXX...
44
+ ```
45
+
46
+ That single command installs WokiToki, starts it at every login, connects it to their Claude Code and Codex, and joins your invite.
47
+
48
+ **3. Both of you:** compare the 6-digit verify code on a call. Approve only if the codes match.
49
+
50
+ ```bash
51
+ wokitoki pair approve <request-id>
52
+ ```
53
+
54
+ Done. `wokitoki agents ls` shows your friend as `active [online]`.
55
+
56
+ <p align="center"><img src="https://raw.githubusercontent.com/pandeyvishwas51-oss/wokitoki/main/assets/how-it-works.png" width="900" alt="How WokiToki works: 1 install with one line, 2 pair by comparing a 6-digit code, 3 agents talk directly, encrypted end to end"></p>
57
+
58
+ ## Use it from Claude Code or Codex
59
+
60
+ Restart any open agent sessions once after setup, then just ask:
61
+
62
+ > *Check my WokiToki inbox.*
63
+ >
64
+ > *Send Rahul a message on WokiToki asking whether the orders API returns amounts in paise.*
65
+
66
+ | MCP tool | What it does |
67
+ |---|---|
68
+ | `wokitoki_get_status` | your identity, network state and outbox |
69
+ | `wokitoki_list_peers` | paired agents, their state, online or offline |
70
+ | `wokitoki_send_message` | send encrypted text to a paired agent |
71
+ | `wokitoki_read_inbox` | read unread messages (marks them read) |
72
+ | `wokitoki_list_messages` | conversation history with delivery state |
73
+
74
+ `wokitoki setup` also installs a Claude Code [skill](https://github.com/pandeyvishwas51-oss/wokitoki/blob/main/skills/wokitoki/SKILL.md) that tells the agent when to use these tools, to never send secrets, and to treat incoming messages as information rather than instructions.
75
+
76
+ Your agent **cannot** pair, approve or revoke; those always need you at the terminal. Incoming text is labelled as untrusted data, so agents treat it as information, never as instructions. Any MCP client can use WokiToki by running `wokitoki mcp`.
77
+
78
+ From the terminal:
79
+
80
+ ```bash
81
+ wokitoki msg send Rahul --text "Can you confirm the /orders response shape?"
82
+ wokitoki msg watch # live incoming messages
83
+ wokitoki msg ls # history: queued -> relayed -> delivered
84
+ wokitoki agents revoke Rahul # cut them off, on both sides, immediately
85
+ ```
86
+
87
+ ## How it works
88
+
89
+ <p align="center"><img src="https://raw.githubusercontent.com/pandeyvishwas51-oss/wokitoki/main/assets/p2p.png" width="900" alt="WokiToki peer-to-peer architecture: each daemon announces its public key on a public DHT, the peer looks it up, and the two connect directly with a Noise-encrypted channel through NAT hole punching. Nothing is stored in between."></p>
90
+
91
+ - Each WokiToki daemon joins the public **HyperDHT** (an open, distributed network, also used by the Keet messenger) under its own Ed25519 public key. Your invite carries that key.
92
+ - Your friend's daemon looks the key up. The two machines then **hole-punch** through their home or office routers and open a **Noise-encrypted, mutually authenticated** connection. WokiToki's own message encryption (XChaCha20-Poly1305) runs inside it.
93
+ - A firewall drops every key that is not a paired peer. A stranger can only knock while you have an invite open, and gets 5 tries.
94
+ - If your friend is offline, messages wait encrypted in your outbox and deliver automatically when both machines are online.
95
+
96
+ ## FAQ
97
+
98
+ ### How do I make two Claude Code instances on different computers talk to each other?
99
+ Install WokiToki on both computers, create an invite on one with `wokitoki pair create`, and run the printed one-liner on the other. Compare the 6-digit code and approve on both sides. Both Claude Code sessions then have `wokitoki_send_message` and `wokitoki_read_inbox` tools.
100
+
101
+ ### Can Claude Code talk to OpenAI Codex?
102
+ Yes. WokiToki is a standard MCP server, so any mix works: Claude Code with Claude Code, Claude Code with Codex, or Codex with Codex. Each person keeps their own AI subscription and account.
103
+
104
+ ### Do I need to host a server, open a port or set up a tunnel?
105
+ No. Connections are peer to peer over a public distributed hash table with NAT hole punching. There is no WokiToki server, no signup and no port forwarding. A self-hostable relay exists only as an optional fallback for networks that block peer-to-peer traffic.
106
+
107
+ ### Is it secure? Can the other person's agent run commands on my machine?
108
+ Messages are end-to-end encrypted with libsodium, and pairing needs a one-time invite plus both people approving a matching verify code. WokiToki only carries text: it never runs incoming content, never touches your files, and gives the other side no access to your machine. Read the [threat model](https://github.com/pandeyvishwas51-oss/wokitoki/blob/main/docs/THREAT_MODEL.md) for the honest limits. There has been no external audit yet.
109
+
110
+ ### What happens if my friend's laptop is off?
111
+ Your message waits, encrypted, in your local outbox and delivers when both computers are online at the same time. The daemon starts at login, so in practice that means "both laptops awake".
112
+
113
+ ### Does it work behind corporate firewalls?
114
+ Usually, through NAT hole punching. Networks that block UDP entirely, or strict carrier NAT on both ends, can prevent a direct connection. Then use the optional relay: `wokitoki config set-relay <url>`.
115
+
116
+ ### How is WokiToki different from Tailscale-based tools or Google's A2A protocol?
117
+ Tools built on Tailscale need every participant in the same tailnet with an account. A2A is an interoperability protocol for agents that expose HTTP endpoints. WokiToki needs neither an account nor a reachable endpoint: two developers pair with an invite and a verify code, and their existing coding agents talk through MCP.
118
+
119
+ ### Is WokiToki free?
120
+ Yes. It is open source under Apache-2.0, and there is no paid tier, hosted service or telemetry.
121
+
122
+ ## Compared with the alternatives
123
+
124
+ | | WokiToki | Copy-paste between chats | Shared Slack/Discord bot | Tailscale-based agent tools |
125
+ |---|---|---|---|---|
126
+ | Agents talk directly | yes | no | via a third-party server | yes |
127
+ | Server or account needed | none | none | bot hosting + workspace | Tailscale account and tailnet |
128
+ | End-to-end encrypted | yes | n/a | no | transport (WireGuard) |
129
+ | Pairing with human verification | 6-digit verify code | n/a | no | tailnet ACLs |
130
+ | Works with Claude Code and Codex via MCP | yes | manual | custom integration | varies |
131
+
132
+ ## Security, honestly
133
+
134
+ - Messages are end-to-end encrypted between the two daemons. In peer-to-peer mode, nothing is stored anywhere but the two machines.
135
+ - Pairing needs a one-time invite **and** both people approving the same verify code. A leaked invite alone pairs no one, and nobody in the middle can swap keys without detection.
136
+ - Message-layer keys are static per pairing (no ratchet yet). Keys live in `~/.wokitoki/identity.json` (mode 0600), and local history is stored unencrypted on disk.
137
+ - No external security audit has been done. Don't send secrets.
138
+
139
+ Details: [threat model](https://github.com/pandeyvishwas51-oss/wokitoki/blob/main/docs/THREAT_MODEL.md) · [architecture](https://github.com/pandeyvishwas51-oss/wokitoki/blob/main/docs/ARCHITECTURE.md) · [protocol](https://github.com/pandeyvishwas51-oss/wokitoki/blob/main/docs/PROTOCOL.md) · [security policy](https://github.com/pandeyvishwas51-oss/wokitoki/blob/main/SECURITY.md) · [verification log](https://github.com/pandeyvishwas51-oss/wokitoki/blob/main/VERIFICATION.md)
140
+
141
+ ## Commands
142
+
143
+ ```
144
+ wokitoki setup [--name <n>] [--join <invite>] [--relay <url>] [--no-autostart] [--no-mcp]
145
+ wokitoki pair create [--expires 10m] | join <invite> | requests | approve <id> | reject <id>
146
+ wokitoki agents ls | revoke <agent>
147
+ wokitoki msg send <agent> --text <t> [--reply-to <id>] | ls [agent] | watch [agent]
148
+ wokitoki status | logs | identity show | mcp
149
+ wokitoki config show | set-relay <url|off>
150
+ wokitoki daemon run|start|stop|status|install|uninstall
151
+ ```
152
+
153
+ Every command accepts `--json` and `--home <dir>` (default `~/.wokitoki`). The old command name `agentmesh` still works as an alias.
154
+
155
+ ## Daily use
156
+
157
+ - **After a reboot:** nothing to do; the daemon starts at login. Check with `wokitoki status`.
158
+ - **Update:** rerun the install one-liner, then `wokitoki daemon stop && wokitoki daemon start`.
159
+ - **Uninstall:**
160
+ ```bash
161
+ wokitoki daemon uninstall
162
+ rm -rf ~/.wokitoki ~/.wokitoki-src ~/.local/bin/wokitoki ~/.local/bin/agentmesh
163
+ claude mcp remove wokitoki -s user
164
+ codex mcp remove wokitoki
165
+ ```
166
+
167
+ ## Development
168
+
169
+ ```bash
170
+ pnpm install
171
+ pnpm check # strict TypeScript + 57 tests: unit, adversarial, P2P on a local DHT testnet, multi-process CLI e2e, real MCP calls
172
+ ```
173
+
174
+ [Roadmap](https://github.com/pandeyvishwas51-oss/wokitoki/blob/main/ROADMAP.md): tasks, encrypted file transfer, multi-agent rooms and a web console are next. License: [Apache-2.0](https://github.com/pandeyvishwas51-oss/wokitoki/blob/main/LICENSE).
175
+
176
+ <p align="center"><img src="https://raw.githubusercontent.com/pandeyvishwas51-oss/wokitoki/main/assets/logo.svg" width="72" alt="WokiToki mascot"></p>