wayfind 2.0.34 → 2.0.35

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.
@@ -4322,17 +4322,17 @@ function ensureContainerConfig() {
4322
4322
  changed = true;
4323
4323
  }
4324
4324
 
4325
- // Backfill container-specific paths into existing digest config (fixes configs
4326
- // created before store_path/journal_dir/signals_dir were added)
4325
+ // Override container-specific paths in digest config the mounted connectors.json
4326
+ // may have host paths that don't exist inside the container
4327
4327
  if (config.digest) {
4328
- const defaults = {
4328
+ const containerPaths = {
4329
4329
  store_path: process.env.TEAM_CONTEXT_STORE_PATH || contentStore.DEFAULT_STORE_PATH,
4330
4330
  journal_dir: process.env.TEAM_CONTEXT_JOURNALS_DIR || '/data/journals',
4331
4331
  signals_dir: process.env.TEAM_CONTEXT_SIGNALS_DIR || contentStore.DEFAULT_SIGNALS_DIR,
4332
4332
  team_context_dir: process.env.TEAM_CONTEXT_TEAM_CONTEXT_DIR || '',
4333
4333
  };
4334
- for (const [key, val] of Object.entries(defaults)) {
4335
- if (!config.digest[key]) {
4334
+ for (const [key, val] of Object.entries(containerPaths)) {
4335
+ if (config.digest[key] !== val) {
4336
4336
  config.digest[key] = val;
4337
4337
  changed = true;
4338
4338
  }
@@ -4356,14 +4356,14 @@ function ensureContainerConfig() {
4356
4356
  changed = true;
4357
4357
  }
4358
4358
 
4359
- // Backfill container-specific paths into existing bot config
4359
+ // Override container-specific paths in bot config (same reason as digest above)
4360
4360
  if (config.slack_bot) {
4361
- const botDefaults = {
4361
+ const botPaths = {
4362
4362
  store_path: process.env.TEAM_CONTEXT_STORE_PATH || contentStore.DEFAULT_STORE_PATH,
4363
4363
  journal_dir: process.env.TEAM_CONTEXT_JOURNALS_DIR || '/data/journals',
4364
4364
  };
4365
- for (const [key, val] of Object.entries(botDefaults)) {
4366
- if (!config.slack_bot[key]) {
4365
+ for (const [key, val] of Object.entries(botPaths)) {
4366
+ if (config.slack_bot[key] !== val) {
4367
4367
  config.slack_bot[key] = val;
4368
4368
  changed = true;
4369
4369
  }
package/doctor.sh CHANGED
@@ -466,6 +466,52 @@ check_storage_backend() {
466
466
  else
467
467
  [ "$VERBOSE" = true ] && info "No connectors.json — signal freshness check skipped"
468
468
  fi
469
+
470
+ # ── 4. Embedding coverage ───────────────────────────────────────────────
471
+ local EMBED_RESULT
472
+ EMBED_RESULT=$(node -e "
473
+ try {
474
+ const storage = require('$SCRIPT_DIR/bin/storage/index.js');
475
+ const storePath = '$WAYFIND_DIR/content-store';
476
+ const backend = storage.getBackend(storePath);
477
+ const idx = backend.loadIndex();
478
+ if (!idx || !idx.entries) { console.log('SKIP'); process.exit(0); }
479
+ let total = 0, embedded = 0;
480
+ for (const e of Object.values(idx.entries)) { total++; if (e.hasEmbedding) embedded++; }
481
+ if (total === 0) { console.log('SKIP'); process.exit(0); }
482
+ const pct = Math.round(100 * embedded / total);
483
+ const hasKey = !!(process.env.OPENAI_API_KEY || process.env.AZURE_OPENAI_EMBEDDING_ENDPOINT);
484
+ console.log(pct + ':' + embedded + ':' + total + ':' + hasKey);
485
+ } catch (e) {
486
+ console.log('SKIP:' + e.message.split('\n')[0]);
487
+ }
488
+ " 2>/dev/null) || EMBED_RESULT="SKIP"
489
+
490
+ if [[ "$EMBED_RESULT" != SKIP* ]]; then
491
+ IFS=':' read -r PCT EMBEDDED TOTAL HAS_KEY <<< "$EMBED_RESULT"
492
+ if [ "$PCT" -ge 90 ]; then
493
+ ok "Embeddings: $EMBEDDED/$TOTAL entries ($PCT%)"
494
+ elif [ "$PCT" -ge 50 ]; then
495
+ warn "Embeddings: only $EMBEDDED/$TOTAL entries ($PCT%) — search quality degraded"
496
+ info "Run: wayfind reindex (with OPENAI_API_KEY or AZURE_OPENAI_EMBEDDING_* set)"
497
+ ISSUES=$((ISSUES + 1))
498
+ elif [ "$PCT" -gt 0 ]; then
499
+ err "Embeddings: $EMBEDDED/$TOTAL entries ($PCT%) — semantic search mostly broken"
500
+ info "Run: wayfind reindex (with OPENAI_API_KEY or AZURE_OPENAI_EMBEDDING_* set)"
501
+ ISSUES=$((ISSUES + 1))
502
+ else
503
+ if [ "$HAS_KEY" = "true" ]; then
504
+ err "Embeddings: 0/$TOTAL entries — embedding API key is set but no embeddings generated"
505
+ info "Run: wayfind reindex to generate embeddings"
506
+ ISSUES=$((ISSUES + 1))
507
+ else
508
+ warn "Embeddings: 0/$TOTAL entries — no embedding API key configured"
509
+ info "Set OPENAI_API_KEY or AZURE_OPENAI_EMBEDDING_* then run: wayfind reindex"
510
+ ISSUES=$((ISSUES + 1))
511
+ fi
512
+ fi
513
+ fi
514
+
469
515
  set -e # Restore errexit
470
516
  }
471
517
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wayfind",
3
- "version": "2.0.34",
3
+ "version": "2.0.35",
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"