wayfind 2.0.73 → 2.0.75

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.
@@ -3698,6 +3698,7 @@ async function contextPull(args) {
3698
3698
  } else if (result.error && result.error.code === 'ETIMEDOUT') {
3699
3699
  log('[wayfind] Team-context pull timed out — using local state');
3700
3700
  } else {
3701
+ log('[wayfind] Team-context pull failed — using local state');
3701
3702
  const stderr = (result.stderr || '').toString().trim();
3702
3703
  if (stderr && !quiet) {
3703
3704
  console.error(`[wayfind] Team-context pull skipped: ${stderr.split('\n')[0]}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wayfind",
3
- "version": "2.0.73",
3
+ "version": "2.0.75",
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.73",
3
+ "version": "2.0.75",
4
4
  "description": "Team decision trail for AI-assisted development. Session memory, decision journals, and team digests.",
5
5
  "author": {
6
6
  "name": "Wayfind",
@@ -42,25 +42,12 @@ fi
42
42
 
43
43
  # Solo mode: index last session's conversations now
44
44
  # Teams rely on the container's scheduled reindex instead.
45
+ # wayfind reindex handles its own change detection — skips fast if nothing new.
45
46
  if [ "$HAS_CONTAINER" = "false" ]; then
46
- LAST_RUN_FILE="${WAYFIND_DIR:-$HOME/.claude/team-context}/.last-reindex"
47
- SHOULD_REINDEX=true
48
-
49
- if [ -f "$LAST_RUN_FILE" ]; then
50
- CHANGED=$(find "$HOME/.claude/projects" -name "*.jsonl" -newer "$LAST_RUN_FILE" -print -quit 2>/dev/null)
51
- if [ -z "$CHANGED" ]; then
52
- SHOULD_REINDEX=false
53
- fi
54
- fi
55
-
56
- if [ "$SHOULD_REINDEX" = "true" ]; then
57
- echo ""
58
- echo " Indexing last session's conversations..."
59
- echo ""
60
- $WAYFIND reindex --conversations-only --export --write-stats 2>/dev/null || true
61
- mkdir -p "${WAYFIND_DIR:-$HOME/.claude/team-context}"
62
- touch "$LAST_RUN_FILE"
63
- fi
47
+ echo ""
48
+ echo " Indexing last session's conversations..."
49
+ echo ""
50
+ $WAYFIND reindex --conversations-only --export --write-stats 2>/dev/null || true
64
51
  fi
65
52
 
66
53
  # Rebuild Active Projects index (writes to global-state.md)
@@ -1,16 +1,65 @@
1
1
  #!/usr/bin/env bash
2
- # Wayfind — Rebuild Active Projects + version check on session start.
3
- # Rebuilds the Active Projects table from per-repo state files (idempotent,
4
- # concurrent-safe), then checks if the installed version meets the team
5
- # minimum configured in the team-context repo's wayfind.json.
2
+ # Wayfind — SessionStart hook
3
+ # Pulls team context, indexes last session's conversations (solo mode only),
4
+ # rebuilds the Active Projects index, then prompts for the session goal.
5
+ #
6
+ # Runs synchronously so the user sees what Wayfind is doing before they type.
7
+ # Solo mode: no container_endpoint configured — reindex runs here instead of
8
+ # in a background container.
6
9
  #
7
10
  # Install: copy to ~/.claude/hooks/check-global-state.sh
8
11
  # Register: add to ~/.claude/settings.json (see settings.json in this directory)
9
12
 
10
13
  set -euo pipefail
11
14
 
12
- # Use installed wayfind CLI
13
- if command -v wayfind >/dev/null 2>&1; then
14
- wayfind status --write --quiet 2>/dev/null || true
15
- wayfind check-version 2>/dev/null || true
15
+ # Find wayfind binary
16
+ WAYFIND="$(command -v wayfind 2>/dev/null || echo "")"
17
+ if [ -z "$WAYFIND" ]; then
18
+ for candidate in \
19
+ "$HOME/repos/wayfind/bin/team-context.js"; do
20
+ if [ -f "$candidate" ]; then
21
+ WAYFIND="node $candidate"
22
+ break
23
+ fi
24
+ done
25
+ fi
26
+
27
+ if [ -z "$WAYFIND" ]; then
28
+ echo "[wayfind] CLI not found — install for full features: npm install -g wayfind" >&2
29
+ exit 0
30
+ fi
31
+
32
+ echo ""
33
+ echo " ── Wayfind ────────────────────────────────────────"
34
+
35
+ # Pull latest team context (synchronous — start with fresh state)
36
+ echo ""
37
+ $WAYFIND context pull 2>/dev/null || true
38
+
39
+ # Detect solo mode: no container_endpoint means no background container running reindex
40
+ CONTEXT_JSON="${WAYFIND_DIR:-$HOME/.claude/team-context}/context.json"
41
+ HAS_CONTAINER=false
42
+ if [ -f "$CONTEXT_JSON" ] && grep -q '"container_endpoint"' "$CONTEXT_JSON" 2>/dev/null; then
43
+ HAS_CONTAINER=true
44
+ fi
45
+
46
+ # Solo mode: index last session's conversations now
47
+ # Teams rely on the container's scheduled reindex instead.
48
+ # wayfind reindex handles its own change detection — skips fast if nothing new.
49
+ if [ "$HAS_CONTAINER" = "false" ]; then
50
+ echo ""
51
+ echo " Indexing last session's conversations..."
52
+ echo ""
53
+ $WAYFIND reindex --conversations-only --export --write-stats 2>/dev/null || true
16
54
  fi
55
+
56
+ # Rebuild Active Projects index (writes to global-state.md)
57
+ $WAYFIND status --write --quiet 2>/dev/null || true
58
+
59
+ # Version check — silent unless outdated
60
+ $WAYFIND check-version 2>/dev/null || true
61
+
62
+ echo ""
63
+ echo " What's the goal for this session?"
64
+ echo " ───────────────────────────────────────────────────"
65
+ echo ""