wayfind 2.0.63 → 2.0.65
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/bin/mcp-server.js
CHANGED
|
@@ -228,7 +228,7 @@ async function proxyGetEntry(id) {
|
|
|
228
228
|
const TOOLS = [
|
|
229
229
|
{
|
|
230
230
|
name: 'search_context',
|
|
231
|
-
description: 'Search team
|
|
231
|
+
description: 'Search the team\'s full decision history across all repos and all engineers. Returns ranked journal entries, decisions, and signals. Use this — not file reads — to answer any question about past work, architectural decisions, what was decided, or team activity. The content store covers history that state files cannot.',
|
|
232
232
|
inputSchema: {
|
|
233
233
|
type: 'object',
|
|
234
234
|
properties: {
|
package/package.json
CHANGED
package/setup.sh
CHANGED
|
@@ -441,15 +441,22 @@ PYEOF
|
|
|
441
441
|
fi
|
|
442
442
|
fi
|
|
443
443
|
|
|
444
|
-
# MCP server — register wayfind-mcp in settings.json
|
|
444
|
+
# MCP server — register wayfind-mcp in settings.json using absolute path
|
|
445
|
+
# (Claude Code spawns MCP servers with a minimal env; bare command may not resolve)
|
|
446
|
+
MCP_BIN="$(command -v wayfind-mcp 2>/dev/null || true)"
|
|
447
|
+
if [ -z "$MCP_BIN" ]; then
|
|
448
|
+
NPM_PREFIX="$(npm config get prefix 2>/dev/null || true)"
|
|
449
|
+
[ -n "$NPM_PREFIX" ] && MCP_BIN="$NPM_PREFIX/bin/wayfind-mcp"
|
|
450
|
+
fi
|
|
445
451
|
MCP_REGISTERED=false
|
|
446
452
|
grep -q '"wayfind"' "$SETTINGS" 2>/dev/null && MCP_REGISTERED=true
|
|
447
|
-
if [ "$
|
|
448
|
-
if [ "$
|
|
449
|
-
|
|
450
|
-
|
|
453
|
+
if [ -n "$MCP_BIN" ] && [ -f "$MCP_BIN" ]; then
|
|
454
|
+
if [ "$MCP_REGISTERED" = false ]; then
|
|
455
|
+
if [ "$DRY_RUN" = false ]; then
|
|
456
|
+
TMP_SETTINGS="$(mktemp)"
|
|
457
|
+
if python3 - "$SETTINGS" "$MCP_BIN" "$TMP_SETTINGS" <<'PYEOF' 2>/dev/null; then
|
|
451
458
|
import json, sys
|
|
452
|
-
settings_path, out_path = sys.argv[1], sys.argv[2]
|
|
459
|
+
settings_path, mcp_bin, out_path = sys.argv[1], sys.argv[2], sys.argv[3]
|
|
453
460
|
try:
|
|
454
461
|
with open(settings_path) as f:
|
|
455
462
|
settings = json.load(f)
|
|
@@ -457,23 +464,26 @@ except (json.JSONDecodeError, IOError):
|
|
|
457
464
|
sys.exit(1)
|
|
458
465
|
mcp = settings.setdefault("mcpServers", {})
|
|
459
466
|
if "wayfind" not in mcp:
|
|
460
|
-
mcp["wayfind"] = {"command":
|
|
467
|
+
mcp["wayfind"] = {"command": mcp_bin}
|
|
461
468
|
with open(out_path, "w") as f:
|
|
462
469
|
json.dump(settings, f, indent=2)
|
|
463
470
|
f.write("\n")
|
|
464
471
|
PYEOF
|
|
465
|
-
|
|
466
|
-
|
|
472
|
+
mv "$TMP_SETTINGS" "$SETTINGS"
|
|
473
|
+
log "Registered wayfind MCP server in ~/.claude/settings.json"
|
|
474
|
+
else
|
|
475
|
+
rm -f "$TMP_SETTINGS"
|
|
476
|
+
warn "Could not register MCP server — add manually to ~/.claude/settings.json:"
|
|
477
|
+
warn " \"mcpServers\": { \"wayfind\": { \"command\": \"$MCP_BIN\" } }"
|
|
478
|
+
fi
|
|
467
479
|
else
|
|
468
|
-
|
|
469
|
-
warn "Could not register MCP server — add manually to ~/.claude/settings.json:"
|
|
470
|
-
warn ' "mcpServers": { "wayfind": { "command": "wayfind-mcp" } }'
|
|
480
|
+
info "[dry-run] Would register wayfind MCP server ($MCP_BIN) in $SETTINGS"
|
|
471
481
|
fi
|
|
472
482
|
else
|
|
473
|
-
info "
|
|
483
|
+
info "MCP server already registered in settings.json — skipped"
|
|
474
484
|
fi
|
|
475
485
|
else
|
|
476
|
-
|
|
486
|
+
warn "wayfind-mcp binary not found — skipping MCP registration. Re-run after npm install."
|
|
477
487
|
fi
|
|
478
488
|
|
|
479
489
|
;;
|
|
@@ -506,21 +516,27 @@ PYEOF
|
|
|
506
516
|
fi
|
|
507
517
|
fi
|
|
508
518
|
|
|
509
|
-
# MCP server — register wayfind-mcp in ~/.cursor/mcp.json
|
|
519
|
+
# MCP server — register wayfind-mcp in ~/.cursor/mcp.json using absolute path
|
|
520
|
+
CURSOR_MCP_BIN="$(command -v wayfind-mcp 2>/dev/null || true)"
|
|
521
|
+
if [ -z "$CURSOR_MCP_BIN" ]; then
|
|
522
|
+
NPM_PREFIX="$(npm config get prefix 2>/dev/null || true)"
|
|
523
|
+
[ -n "$NPM_PREFIX" ] && CURSOR_MCP_BIN="$NPM_PREFIX/bin/wayfind-mcp"
|
|
524
|
+
fi
|
|
510
525
|
CURSOR_MCP="$HOME/.cursor/mcp.json"
|
|
511
526
|
run mkdir -p "$HOME/.cursor"
|
|
512
527
|
CURSOR_MCP_REGISTERED=false
|
|
513
528
|
grep -q '"wayfind"' "$CURSOR_MCP" 2>/dev/null && CURSOR_MCP_REGISTERED=true
|
|
514
|
-
if [ "$
|
|
515
|
-
if [ "$
|
|
516
|
-
if [
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
529
|
+
if [ -n "$CURSOR_MCP_BIN" ] && [ -f "$CURSOR_MCP_BIN" ]; then
|
|
530
|
+
if [ "$CURSOR_MCP_REGISTERED" = false ]; then
|
|
531
|
+
if [ "$DRY_RUN" = false ]; then
|
|
532
|
+
if [ ! -f "$CURSOR_MCP" ]; then
|
|
533
|
+
printf '{\n "mcpServers": {\n "wayfind": {\n "command": "%s",\n "args": []\n }\n }\n}\n' "$CURSOR_MCP_BIN" > "$CURSOR_MCP"
|
|
534
|
+
log "Created ~/.cursor/mcp.json with wayfind MCP server"
|
|
535
|
+
else
|
|
536
|
+
TMP_MCP="$(mktemp)"
|
|
537
|
+
if python3 - "$CURSOR_MCP" "$CURSOR_MCP_BIN" "$TMP_MCP" <<'PYEOF' 2>/dev/null; then
|
|
522
538
|
import json, sys
|
|
523
|
-
mcp_path, out_path = sys.argv[1], sys.argv[2]
|
|
539
|
+
mcp_path, mcp_bin, out_path = sys.argv[1], sys.argv[2], sys.argv[3]
|
|
524
540
|
try:
|
|
525
541
|
with open(mcp_path) as f:
|
|
526
542
|
config = json.load(f)
|
|
@@ -528,24 +544,27 @@ except (json.JSONDecodeError, IOError):
|
|
|
528
544
|
config = {}
|
|
529
545
|
mcp = config.setdefault("mcpServers", {})
|
|
530
546
|
if "wayfind" not in mcp:
|
|
531
|
-
mcp["wayfind"] = {"command":
|
|
547
|
+
mcp["wayfind"] = {"command": mcp_bin, "args": []}
|
|
532
548
|
with open(out_path, "w") as f:
|
|
533
549
|
json.dump(config, f, indent=2)
|
|
534
550
|
f.write("\n")
|
|
535
551
|
PYEOF
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
552
|
+
mv "$TMP_MCP" "$CURSOR_MCP"
|
|
553
|
+
log "Registered wayfind MCP server in ~/.cursor/mcp.json"
|
|
554
|
+
else
|
|
555
|
+
rm -f "$TMP_MCP"
|
|
556
|
+
warn "Could not register MCP server — add manually to ~/.cursor/mcp.json:"
|
|
557
|
+
warn " \"mcpServers\": { \"wayfind\": { \"command\": \"$CURSOR_MCP_BIN\", \"args\": [] } }"
|
|
558
|
+
fi
|
|
542
559
|
fi
|
|
560
|
+
else
|
|
561
|
+
info "[dry-run] Would register wayfind MCP server ($CURSOR_MCP_BIN) in ~/.cursor/mcp.json"
|
|
543
562
|
fi
|
|
544
563
|
else
|
|
545
|
-
info "
|
|
564
|
+
info "MCP server already registered in ~/.cursor/mcp.json — skipped"
|
|
546
565
|
fi
|
|
547
566
|
else
|
|
548
|
-
|
|
567
|
+
warn "wayfind-mcp binary not found — skipping Cursor MCP registration. Re-run after npm install."
|
|
549
568
|
fi
|
|
550
569
|
;;
|
|
551
570
|
|
|
@@ -27,6 +27,18 @@
|
|
|
27
27
|
3. Check the Memory Files table in global-state.md — load any `~/.claude/memory/` files whose keywords match this session's topic
|
|
28
28
|
4. Summarize current state, then ask: **"What's the goal for this session? What does success look like?"**
|
|
29
29
|
|
|
30
|
+
### Using the Wayfind MCP Server
|
|
31
|
+
|
|
32
|
+
The `search_context` MCP tool is the right way to answer questions about past decisions, architectural choices, and team activity. **Do not read state files or repo files to answer these questions** — the content store covers the entire team's decision history across all repos and all engineers, which state files cannot.
|
|
33
|
+
|
|
34
|
+
Use `search_context` when asked about:
|
|
35
|
+
- What was decided about X
|
|
36
|
+
- What work has been done on X
|
|
37
|
+
- What the team's approach to X is
|
|
38
|
+
- Recent activity in a repo or area
|
|
39
|
+
|
|
40
|
+
State files (`team-state.md`, `personal-state.md`) are for **current status** — who's working on what right now. The content store is for **decision history** — what was decided and why.
|
|
41
|
+
|
|
30
42
|
### Mid-Session
|
|
31
43
|
|
|
32
44
|
If work drifts from the stated goal, flag it: *"Quick check — we set out to [goal]. This feels like [tangent]. Stay the course or pivot?"*
|