wayfind 2.0.56 → 2.0.58

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/distill.js CHANGED
@@ -154,7 +154,7 @@ Format: A compact markdown summary, max 500 words.`,
154
154
  * @returns {Promise<{content: string, title: string}>}
155
155
  */
156
156
  async function mergeEntries(entries, llmConfig, tier) {
157
- const storePath = contentStore.DEFAULT_STORE_PATH;
157
+ const storePath = contentStore.resolveStorePath();
158
158
  const journalDir = contentStore.DEFAULT_JOURNAL_DIR;
159
159
  const signalsDir = contentStore.DEFAULT_SIGNALS_DIR;
160
160
 
@@ -195,7 +195,7 @@ async function mergeEntries(entries, llmConfig, tier) {
195
195
  async function distillEntries(options = {}) {
196
196
  const tierName = options.tier || 'daily';
197
197
  const dryRun = options.dryRun || false;
198
- const storePath = options.storePath || contentStore.DEFAULT_STORE_PATH;
198
+ const storePath = options.storePath || contentStore.resolveStorePath();
199
199
 
200
200
  const tiersToRun = tierName === 'all'
201
201
  ? ['daily', 'weekly', 'archive']
@@ -1411,7 +1411,7 @@ async function runDistill(args) {
1411
1411
 
1412
1412
  console.log(`Distilling content (tier: ${tier}${dryRun ? ', dry run' : ''})...`);
1413
1413
 
1414
- // Build LLM config from connectors
1414
+ // Build LLM config from connectors, falling back to env vars (for GHA / CI)
1415
1415
  let llmConfig = null;
1416
1416
  if (!dryRun) {
1417
1417
  const config = readConnectorsConfig();
@@ -1421,6 +1421,8 @@ async function runDistill(args) {
1421
1421
  model: config.digest.llm.intelligence?.model || 'claude-haiku-4-5-20251001',
1422
1422
  api_key_env: config.digest.llm.api_key_env,
1423
1423
  };
1424
+ } else if (process.env.ANTHROPIC_API_KEY) {
1425
+ llmConfig = { provider: 'anthropic', model: 'claude-haiku-4-5-20251001', api_key_env: 'ANTHROPIC_API_KEY' };
1424
1426
  }
1425
1427
  }
1426
1428
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wayfind",
3
- "version": "2.0.56",
3
+ "version": "2.0.58",
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.56",
3
+ "version": "2.0.58",
4
4
  "description": "Team decision trail for AI-assisted development. Session memory, decision journals, and team digests.",
5
5
  "author": {
6
6
  "name": "Wayfind",
@@ -3,18 +3,14 @@
3
3
  # Copy this file to .github/workflows/wayfind-distill.yml in your team-context repo.
4
4
  #
5
5
  # What it does:
6
- # - Runs on every push that touches journals/
7
- # - Indexes all journals into a fresh content store
8
- # - Runs the distillation pipeline (dedup + LLM merge for daily/weekly/archive tiers)
9
- # - Exports distilled entries to .wayfind/distilled.json
10
- # - Commits the result back to the repo
6
+ # - On journal pushes: indexes journals and runs daily-tier distillation (3–14 day old content)
7
+ # - On weekly schedule (Sunday midnight): also runs weekly + archive tiers
8
+ # - Exports distilled entries to .wayfind/distilled.json and commits back
11
9
  #
12
10
  # Team members get the distilled entries automatically on their next `wayfind context pull`.
13
11
  #
14
12
  # Required secrets:
15
13
  # ANTHROPIC_API_KEY — for LLM merge calls during distillation
16
- #
17
- # Optional: set WAYFIND_DISTILL_TIER to 'daily', 'weekly', 'archive', or 'all' (default: all)
18
14
 
19
15
  name: Wayfind Distillation
20
16
 
@@ -22,7 +18,19 @@ on:
22
18
  push:
23
19
  paths:
24
20
  - 'journals/**'
21
+ schedule:
22
+ - cron: '0 0 * * 0' # Weekly: Sunday midnight UTC (weekly + archive tiers)
25
23
  workflow_dispatch:
24
+ inputs:
25
+ tier:
26
+ description: 'Distillation tier (daily, weekly, archive, all)'
27
+ default: 'all'
28
+
29
+ # Serialize runs — cancel in-progress when a newer push comes in.
30
+ # Safe because each run indexes all current journals; the latest run is always authoritative.
31
+ concurrency:
32
+ group: wayfind-distill
33
+ cancel-in-progress: true
26
34
 
27
35
  jobs:
28
36
  distill:
@@ -45,14 +53,20 @@ jobs:
45
53
  - name: Index journals
46
54
  env:
47
55
  TEAM_CONTEXT_STORE_PATH: ${{ github.workspace }}/.wayfind/store
48
- ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
49
56
  run: wayfind index-journals --dir ./journals --no-embeddings
50
57
 
51
58
  - name: Distill
52
59
  env:
53
60
  TEAM_CONTEXT_STORE_PATH: ${{ github.workspace }}/.wayfind/store
54
61
  ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
55
- run: wayfind distill --tier ${{ vars.WAYFIND_DISTILL_TIER || 'all' }}
62
+ run: |
63
+ if [ "${{ github.event_name }}" = "schedule" ]; then
64
+ wayfind distill --tier all
65
+ elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
66
+ wayfind distill --tier ${{ github.event.inputs.tier || 'all' }}
67
+ else
68
+ wayfind distill --tier daily
69
+ fi
56
70
 
57
71
  - name: Export distilled entries
58
72
  env: