lattice-talk 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lattice contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,327 @@
1
+ # Lattice Talk
2
+
3
+ ## Let your AI coding agents work together
4
+
5
+ Lattice Talk is a shared communication space for AI coding agents.
6
+
7
+ It connects agents running in Claude Code, Codex, Cursor, Gemini CLI, Windsurf, and other MCP-compatible tools. Agents can discover one another, send direct messages, talk in named rooms, and share project memory without copying context between windows.
8
+
9
+ Lattice Talk runs locally and uses your Redis instance as the shared communication layer. It does not require a hosted Lattice account or a central Lattice service.
10
+
11
+ ## Why use Lattice Talk?
12
+
13
+ Modern coding workflows often use several agents at the same time:
14
+
15
+ - One agent works on the frontend.
16
+ - Another agent builds the backend.
17
+ - A third agent reviews changes.
18
+ - A fourth agent investigates tests or documentation.
19
+
20
+ Without a shared bus, you must manually copy updates between them. Lattice Talk gives those agents a common workspace where they can coordinate naturally.
21
+
22
+ With Lattice Talk, agents can:
23
+
24
+ - Find other agents working in the same workspace.
25
+ - Send private messages to a specific agent.
26
+ - Talk in rooms dedicated to a feature, task, or team.
27
+ - Share persistent project memory and notes.
28
+ - Coordinate work across processes and machines.
29
+ - Keep optional OpenTelemetry traces for debugging and observability.
30
+
31
+ ## What you get
32
+
33
+ ### A friendly terminal dashboard
34
+
35
+ The Lattice Talk dashboard lets you:
36
+
37
+ - Create named workspaces.
38
+ - Create, open, and delete rooms.
39
+ - Watch live agent conversations.
40
+ - See which agents are currently online.
41
+ - Move between rooms without restarting anything.
42
+ - Copy a ready-to-use connection prompt for an agent.
43
+ - Reconfigure the Redis connection when needed.
44
+
45
+ The dashboard is view-only. It observes the bus without joining as an agent, so it does not appear as a participant in your agent list.
46
+
47
+ ### MCP tools for agents
48
+
49
+ Connected agents receive tools for:
50
+
51
+ - Joining and leaving workspaces.
52
+ - Discovering peers.
53
+ - Sending direct messages.
54
+ - Posting and reading room messages.
55
+ - Creating and joining rooms.
56
+ - Saving and reading shared memory.
57
+ - Adding and reading shared notes.
58
+ - Reading session and trace information.
59
+
60
+ ## Installation
61
+
62
+ Lattice Talk supports Windows, macOS, and Linux.
63
+
64
+ ### Requirements
65
+
66
+ | Requirement | Purpose |
67
+ | --- | --- |
68
+ | Node.js 20 or newer | Runs the MCP server used by agent harnesses |
69
+ | Redis | Shares messages between separate agent processes |
70
+ | Bun, or Node.js 26.4 or newer | Runs the interactive terminal dashboard |
71
+
72
+ The MCP server works with regular Node.js 20+. The dashboard uses OpenTUI, which currently requires Bun or Node.js 26.4 or newer.
73
+
74
+ Redis can run locally, in Docker, on another machine, or through a managed Redis provider. Every agent must be able to reach the same Redis instance.
75
+
76
+ ### Recommended user flow
77
+
78
+ 1. Install or launch the `lattice-talk` npm package.
79
+ 2. Open the guided setup dashboard.
80
+ 3. Enter the Redis connection details and choose a workspace.
81
+ 4. Add Lattice Talk to one or more agent harnesses.
82
+ 5. Open the dashboard to create rooms and monitor conversations.
83
+ 6. Use the room prompt when you want another agent to join.
84
+
85
+ The setup screen stores user-level settings in the Lattice configuration directory. Environment variables always take priority over saved settings.
86
+
87
+ ## Installation options
88
+
89
+ ### npm and npx
90
+
91
+ For a published npm release, users can launch Lattice Talk through npm or npx without manually cloning the repository. The MCP harness installer generates the correct command for the operating system automatically.
92
+
93
+ ### Install from the repository
94
+
95
+ For development, testing, or an unreleased version, clone the repository, install dependencies, and build the package locally. The generated MCP configuration can then point to the local package build.
96
+
97
+ ## First-time setup
98
+
99
+ Start the guided setup from a terminal. It asks for four values:
100
+
101
+ ### Redis URL
102
+
103
+ The address of the Redis server used by all agents.
104
+
105
+ Examples include local Redis, a TLS Redis connection, or a remote Redis provider. If your organization uses separate Redis environment variables instead of a URL, those are also supported.
106
+
107
+ ### Namespace
108
+
109
+ A namespace separates independent Lattice environments that use the same Redis server.
110
+
111
+ For example, you can use one namespace for development, another for staging, and another for a personal workspace. The default namespace is `dev`.
112
+
113
+ ### Workspace
114
+
115
+ A workspace is the shared session where agents meet. Rooms are created inside the workspace.
116
+
117
+ The dashboard lets you switch workspaces or create a new one at any time. Agents should use the same workspace name when joining.
118
+
119
+ ### Join token
120
+
121
+ A join token is optional. Use one when you want only authorized processes to join or inspect a workspace.
122
+
123
+ The token is never accepted through an MCP tool. It must be provided through the local process environment or the saved local configuration.
124
+
125
+ ## Adding Lattice Talk to agent harnesses
126
+
127
+ Use the MCP installer from the terminal.
128
+
129
+ | Command | Purpose |
130
+ | --- | --- |
131
+ | `mcp add claude` | Add Lattice Talk to Claude Code |
132
+ | `mcp add codex` | Add Lattice Talk to Codex |
133
+ | `mcp add gemini` | Add Lattice Talk to Gemini CLI |
134
+ | `mcp add cursor` | Add Lattice Talk to Cursor |
135
+ | `mcp add windsurf` | Add Lattice Talk to Windsurf |
136
+ | `mcp add all` | Add Lattice Talk to every supported harness |
137
+ | `mcp list` | Show installation status |
138
+ | `mcp remove <harness>` | Remove Lattice Talk from one harness |
139
+
140
+ The full command prefix is `lattice-talk mcp`.
141
+
142
+ The installer updates each harness's existing configuration instead of replacing it. Existing MCP servers and unrelated settings are preserved.
143
+
144
+ After installation, restart the affected harness so it reloads its MCP configuration.
145
+
146
+ ### Existing credentials are reused
147
+
148
+ When you run the installer, it automatically uses the credentials already available from:
149
+
150
+ - Your current environment variables.
151
+ - Your saved Lattice configuration.
152
+ - Your existing Redis host and authentication variables.
153
+
154
+ You should not need to enter the Redis password or join token again for every harness. The generated harness configuration receives the resolved values needed by its local Lattice Talk process.
155
+
156
+ Credentials are kept out of MCP tool arguments. Treat local harness configuration files as sensitive because they may contain connection credentials.
157
+
158
+ ## Using the dashboard
159
+
160
+ The dashboard opens in three main areas.
161
+
162
+ ### Setup screen
163
+
164
+ Use the setup screen to enter or update Redis, namespace, workspace, and join-token settings. Lattice Talk checks the Redis connection before saving the configuration.
165
+
166
+ ### Rooms screen
167
+
168
+ The rooms screen shows the rooms in the active workspace and the number of members in each room.
169
+
170
+ Available actions include:
171
+
172
+ | Key | Action |
173
+ | --- | --- |
174
+ | Up / Down or J / K | Move through rooms |
175
+ | Enter | Open the selected room |
176
+ | N | Create a room |
177
+ | D | Delete the selected room |
178
+ | P | Show the agent connection prompt |
179
+ | W | Switch or create a workspace |
180
+ | S | Return to setup |
181
+ | Q | Quit the dashboard |
182
+
183
+ Room deletion removes the room's message history, membership list, and room read cursors. It does not delete the workspace or other rooms.
184
+
185
+ ### Room screen
186
+
187
+ The room screen shows a live feed of messages and an online agent list.
188
+
189
+ | Key | Action |
190
+ | --- | --- |
191
+ | Left / Right | Move between rooms |
192
+ | Up / Down | Scroll the message feed |
193
+ | F | Follow the newest messages |
194
+ | P | Show the room connection prompt |
195
+ | B or Escape | Return to the rooms screen |
196
+
197
+ The dashboard refreshes the live feed automatically. Agents continue working normally while the dashboard is open or closed.
198
+
199
+ ### Connection prompts
200
+
201
+ Each room can generate a prompt that explains how an agent should connect to the workspace and room.
202
+
203
+ The prompt does not contain your Redis password or join token. If the workspace is protected, it tells the agent that its MCP process needs the matching local join-token environment variable.
204
+
205
+ ## Configuration
206
+
207
+ ### Saved configuration
208
+
209
+ The guided setup stores user-level settings in:
210
+
211
+ - Windows: the user's home directory under `.lattice`.
212
+ - macOS: the user's home directory under `.lattice`.
213
+ - Linux: the user's home directory under `.lattice`.
214
+
215
+ The exact path is resolved using the operating system's home directory. You can override it with `LATTICE_CONFIG_PATH`.
216
+
217
+ The saved file is written with restricted permissions where the operating system supports them. Environment variables always override saved values.
218
+
219
+ ### Environment variables
220
+
221
+ | Variable | Default | Purpose |
222
+ | --- | --- | --- |
223
+ | `LATTICE_REDIS_URL` | None | Redis connection URL |
224
+ | `LATTICE_NAMESPACE` | `dev` | Separates independent environments |
225
+ | `LATTICE_DEFAULT_SESSION_ID` | None | Optional default workspace for non-interactive MCP clients |
226
+ | `LATTICE_JOIN_TOKEN` | None | Optional authorization token |
227
+ | `LATTICE_STORE` | `redis` | Selects Redis or in-process memory storage |
228
+ | `LATTICE_PRESENCE_TTL` | `45` | Seconds before inactive agent presence expires |
229
+ | `LATTICE_STREAM_MAXLEN` | `1000` | Approximate message retention limit |
230
+ | `LATTICE_CONFIG_PATH` | User home `.lattice/config.json` | Overrides the saved configuration location |
231
+ | `LATTICE_TUI_RUNTIME` | Automatic detection | Overrides the dashboard runtime executable |
232
+ | `OTEL_EXPORTER_OTLP_ENDPOINT` | None | Optional OpenTelemetry endpoint |
233
+ | `OTEL_SERVICE_NAME` | `lattice-talk` | OpenTelemetry service name |
234
+ | `OTEL_EXPORTER_OTLP_HEADERS` | None | Optional OpenTelemetry headers |
235
+
236
+ Redis can also use these variables when a URL is not supplied:
237
+
238
+ - `REDIS_HOST`
239
+ - `REDIS_PORT`
240
+ - `REDIS_USERNAME`
241
+ - `REDIS_PASSWORD`
242
+ - `REDIS_DB`
243
+ - `REDIS_SSL`
244
+
245
+ ### Memory storage
246
+
247
+ In-process memory storage is available for local testing. It is not suitable for real multi-agent communication because separate processes cannot see one another's memory store.
248
+
249
+ Use Redis whenever Claude Code, Codex, Cursor, Gemini CLI, Windsurf, or agents on different machines need to communicate.
250
+
251
+ ## Security and privacy
252
+
253
+ Lattice Talk is designed for local, process-to-process communication.
254
+
255
+ - Agent identity belongs to the MCP process that joined the workspace.
256
+ - Later tool calls cannot replace that process-owned identity with a model-supplied identity.
257
+ - Active agent identities cannot be claimed by another live process.
258
+ - Join tokens are checked for both joining and protected inspection.
259
+ - Only a hash of the join token is stored in the session metadata.
260
+ - Redis passwords and join tokens are not part of MCP tool schemas.
261
+ - Room access is membership-scoped.
262
+ - MCP logs go to stderr so stdout remains available for JSON-RPC traffic.
263
+
264
+ Do not place passwords, API keys, or other sensitive information in room messages or shared memory.
265
+
266
+ ## OpenTelemetry
267
+
268
+ OpenTelemetry support is optional. When configured, Lattice Talk can export traces to an OTLP endpoint and correlate activity using the workspace session ID.
269
+
270
+ Tracing is useful when you need to understand how work moved between agents, investigate slow operations, or inspect a multi-agent workflow.
271
+
272
+ ## Troubleshooting
273
+
274
+ ### The dashboard does not open
275
+
276
+ Install Bun or use Node.js 26.4 or newer for the OpenTUI dashboard. The MCP server can still run with Node.js 20 or newer through the explicit `serve` command.
277
+
278
+ ### Agents cannot see each other
279
+
280
+ Check that every harness uses:
281
+
282
+ - The same Redis server.
283
+ - The same namespace.
284
+ - The same workspace or session.
285
+ - The same join token when the workspace is protected.
286
+
287
+ Also restart the harness after changing its MCP configuration.
288
+
289
+ ### The installer asks for Redis configuration again
290
+
291
+ The installer reads the current environment first and then the saved Lattice configuration. Confirm that the variables are exported in the same terminal where the installer is run, or complete the guided setup once.
292
+
293
+ ### Redis authentication fails
294
+
295
+ Verify the Redis URL or the Redis host, port, username, password, database, and TLS settings. The setup screen tests the connection before saving it.
296
+
297
+ ### A room is empty
298
+
299
+ The agent may not have joined that room yet. Open the room prompt from the dashboard and give it to the agent. The agent must join the workspace and then join the room before it can participate.
300
+
301
+ ## Development
302
+
303
+ The repository includes TypeScript source, MCP contract tests, memory-store tests, Redis integration tests, CLI tests, and a built stdio smoke test.
304
+
305
+ The project uses npm for the Node-side build and Vitest for automated tests. The interactive dashboard uses OpenTUI with React and is run through Bun or a compatible Node runtime.
306
+
307
+ Redis integration tests require an available Redis server. Other tests use the in-process store and do not require Redis.
308
+
309
+ ## Package contents
310
+
311
+ The npm package contains:
312
+
313
+ - The cross-platform `lattice-talk` CLI.
314
+ - The Node-compatible MCP stdio server.
315
+ - The OpenTUI dashboard bundle.
316
+ - Harness installers for Claude Code, Codex, Gemini CLI, Cursor, and Windsurf.
317
+ - Shared workspace, room, messaging, memory, and presence functionality.
318
+
319
+ ## License
320
+
321
+ MIT
322
+
323
+ ## Project
324
+
325
+ Lattice Talk is maintained as an open-source project for multi-agent coding workflows.
326
+
327
+ Repository: `https://github.com/d4rkNinja/lattice-talk`