wayfind 2.0.63 → 2.0.64

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wayfind",
3
- "version": "2.0.63",
3
+ "version": "2.0.64",
4
4
  "description": "Team decision trail for AI-assisted development. The connective tissue between product, engineering, and strategy.",
5
5
  "bin": {
6
6
  "wayfind": "./bin/team-context.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wayfind",
3
- "version": "2.0.63",
3
+ "version": "2.0.64",
4
4
  "description": "Team decision trail for AI-assisted development. Session memory, decision journals, and team digests.",
5
5
  "author": {
6
6
  "name": "Wayfind",
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 [ "$MCP_REGISTERED" = false ]; then
448
- if [ "$DRY_RUN" = false ]; then
449
- TMP_SETTINGS="$(mktemp)"
450
- if python3 - "$SETTINGS" "$TMP_SETTINGS" <<'PYEOF' 2>/dev/null; then
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": "wayfind-mcp"}
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
- mv "$TMP_SETTINGS" "$SETTINGS"
466
- log "Registered wayfind MCP server in ~/.claude/settings.json"
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
- rm -f "$TMP_SETTINGS"
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 "[dry-run] Would register wayfind MCP server in $SETTINGS"
483
+ info "MCP server already registered in settings.json skipped"
474
484
  fi
475
485
  else
476
- info "MCP server already registered in settings.json skipped"
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 [ "$CURSOR_MCP_REGISTERED" = false ]; then
515
- if [ "$DRY_RUN" = false ]; then
516
- if [ ! -f "$CURSOR_MCP" ]; then
517
- printf '{\n "mcpServers": {\n "wayfind": {\n "command": "wayfind-mcp",\n "args": []\n }\n }\n}\n' > "$CURSOR_MCP"
518
- log "Created ~/.cursor/mcp.json with wayfind MCP server"
519
- else
520
- TMP_MCP="$(mktemp)"
521
- if python3 - "$CURSOR_MCP" "$TMP_MCP" <<'PYEOF' 2>/dev/null; then
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": "wayfind-mcp", "args": []}
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
- mv "$TMP_MCP" "$CURSOR_MCP"
537
- log "Registered wayfind MCP server in ~/.cursor/mcp.json"
538
- else
539
- rm -f "$TMP_MCP"
540
- warn "Could not register MCP server — add manually to ~/.cursor/mcp.json:"
541
- warn ' "mcpServers": { "wayfind": { "command": "wayfind-mcp", "args": [] } }'
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 "[dry-run] Would register wayfind MCP server in ~/.cursor/mcp.json"
564
+ info "MCP server already registered in ~/.cursor/mcp.json — skipped"
546
565
  fi
547
566
  else
548
- info "MCP server already registered in ~/.cursor/mcp.json skipped"
567
+ warn "wayfind-mcp binary not found skipping Cursor MCP registration. Re-run after npm install."
549
568
  fi
550
569
  ;;
551
570