@cryptiklemur/lattice 1.36.5 → 1.37.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.md +19 -0
- package/package.json +1 -1
- package/server/src/config.ts +1 -1
- package/server/src/daemon.ts +1 -1
- package/server/src/index.ts +1 -1
package/CLAUDE.md
CHANGED
|
@@ -44,9 +44,28 @@ DO NOT EVER LEAVE PRE-EXISTING ERRORS. FIX THEM.
|
|
|
44
44
|
- ANTHROPIC_API_KEY is optional — server uses the token from `claude setup-token` if not set.
|
|
45
45
|
- Server binds to 0.0.0.0:7654 (WSL2 compatible).
|
|
46
46
|
- Client dev server runs on :5173 but production serves from server via client/dist/.
|
|
47
|
+
- `LATTICE_HOME` — override data directory (default: `~/.lattice`).
|
|
48
|
+
- `LATTICE_PORT` — override server port (default: 7654). Also: `--port=N`.
|
|
47
49
|
|
|
48
50
|
## Testing
|
|
49
51
|
- Playwright tests live in `tests/` at the project root.
|
|
50
52
|
- Tests require the server running on localhost:7654.
|
|
51
53
|
- Screenshots on failure go to `test-results/`.
|
|
52
54
|
- Use Playwright MCP for visual verification. Save screenshots to `.playwright-mcp/`.
|
|
55
|
+
|
|
56
|
+
### Testing Mesh/Node Functionality
|
|
57
|
+
Run a second Lattice instance with a separate data directory and port:
|
|
58
|
+
```bash
|
|
59
|
+
LATTICE_HOME=/tmp/lattice-test-node LATTICE_PORT=7655 bun server/src/index.ts daemon
|
|
60
|
+
```
|
|
61
|
+
Then pair the two instances via the UI or WebSocket:
|
|
62
|
+
```bash
|
|
63
|
+
# Generate invite on :7654, then pair from :7655:
|
|
64
|
+
bun -e "
|
|
65
|
+
var ws = new WebSocket('ws://localhost:7655/ws');
|
|
66
|
+
ws.onopen = function() { ws.send(JSON.stringify({ type: 'mesh:pair', code: 'LTCE-XXXX-...' })); };
|
|
67
|
+
ws.onmessage = function(e) { console.log(JSON.parse(e.data).type); };
|
|
68
|
+
"
|
|
69
|
+
```
|
|
70
|
+
The test instance serves from `client/dist/` (run `bun run build` first for UI access on :7655).
|
|
71
|
+
Clean up: `rm -rf /tmp/lattice-test-node`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cryptiklemur/lattice",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.37.1",
|
|
4
4
|
"description": "Multi-machine agentic dashboard for Claude Code. Monitor sessions, manage MCP servers and skills, orchestrate across mesh-networked nodes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Aaron Scherer <me@aaronscherer.me>",
|
package/server/src/config.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { join } from "node:path";
|
|
|
4
4
|
import { DEFAULT_PORT, LATTICE_HOME_DIR } from "@lattice/shared";
|
|
5
5
|
import type { LatticeConfig } from "@lattice/shared";
|
|
6
6
|
|
|
7
|
-
var home = join(homedir(), LATTICE_HOME_DIR);
|
|
7
|
+
var home = process.env.LATTICE_HOME || join(homedir(), LATTICE_HOME_DIR);
|
|
8
8
|
var cachedConfig: LatticeConfig | null = null;
|
|
9
9
|
|
|
10
10
|
export function getLatticeHome(): string {
|
package/server/src/daemon.ts
CHANGED
|
@@ -250,7 +250,7 @@ export async function startDaemon(portOverride?: number | null): Promise<void> {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
if (!isAuthenticated(req, config.passphraseHash)) {
|
|
253
|
+
if (url.pathname !== "/ws" && !isAuthenticated(req, config.passphraseHash)) {
|
|
254
254
|
return new Response(buildLoginPage(), {
|
|
255
255
|
status: 200,
|
|
256
256
|
headers: { "Content-Type": "text/html; charset=utf-8" },
|
package/server/src/index.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { IS_COMPILED } from "./runtime";
|
|
|
7
7
|
|
|
8
8
|
var args = process.argv.slice(2);
|
|
9
9
|
var command = "start";
|
|
10
|
-
var portOverride: number | null = null;
|
|
10
|
+
var portOverride: number | null = process.env.LATTICE_PORT ? parseInt(process.env.LATTICE_PORT, 10) : null;
|
|
11
11
|
|
|
12
12
|
for (var i = 0; i < args.length; i++) {
|
|
13
13
|
if (args[i] === "--port" && i + 1 < args.length) {
|