wayfind 2.0.68 → 2.0.70
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/connectors/llm.js +87 -0
- package/bin/content-store.js +13 -143
- package/bin/mcp-server.js +47 -50
- package/bin/slack-bot.js +136 -1060
- package/bin/team-context.js +41 -31
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
package/bin/team-context.js
CHANGED
|
@@ -1672,7 +1672,7 @@ async function runSearchJournals(args) {
|
|
|
1672
1672
|
const query = positional.join(' ');
|
|
1673
1673
|
|
|
1674
1674
|
if (!query) {
|
|
1675
|
-
console.error('Usage: wayfind search-journals <query> [--
|
|
1675
|
+
console.error('Usage: wayfind search-journals <query> [--limit N] [--repo <name>] [--since YYYY-MM-DD] [--until YYYY-MM-DD] [--drifted]');
|
|
1676
1676
|
process.exit(1);
|
|
1677
1677
|
}
|
|
1678
1678
|
|
|
@@ -1686,12 +1686,7 @@ async function runSearchJournals(args) {
|
|
|
1686
1686
|
};
|
|
1687
1687
|
|
|
1688
1688
|
try {
|
|
1689
|
-
|
|
1690
|
-
if (opts.text) {
|
|
1691
|
-
results = contentStore.searchText(query, searchOpts);
|
|
1692
|
-
} else {
|
|
1693
|
-
results = await contentStore.searchJournals(query, searchOpts);
|
|
1694
|
-
}
|
|
1689
|
+
const results = await contentStore.searchJournals(query, searchOpts);
|
|
1695
1690
|
|
|
1696
1691
|
if (results.length === 0) {
|
|
1697
1692
|
console.log('No results found.');
|
|
@@ -4619,32 +4614,48 @@ function startHealthServer() {
|
|
|
4619
4614
|
if (!checkApiAuth(req, res)) return;
|
|
4620
4615
|
try {
|
|
4621
4616
|
const body = await parseJsonBody(req);
|
|
4622
|
-
const { query, limit = 10, repo, since, mode } = body;
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4617
|
+
const { query, limit = 10, repo, since, until, user, source, mode: rawMode } = body;
|
|
4618
|
+
|
|
4619
|
+
// Auto-switch to browse if no query provided
|
|
4620
|
+
const mode = (!query && rawMode !== 'browse') ? 'browse' : (rawMode || 'semantic');
|
|
4621
|
+
|
|
4622
|
+
let mapped;
|
|
4623
|
+
if (mode === 'browse') {
|
|
4624
|
+
// Browse mode — return entries sorted by date
|
|
4625
|
+
const results = contentStore.queryMetadata({ limit, repo, since, until, user, source });
|
|
4626
|
+
const top = results.slice(0, limit);
|
|
4627
|
+
mapped = top.map(r => ({
|
|
4628
|
+
id: r.id,
|
|
4629
|
+
date: r.entry.date,
|
|
4630
|
+
repo: r.entry.repo,
|
|
4631
|
+
title: r.entry.title,
|
|
4632
|
+
source: r.entry.source,
|
|
4633
|
+
user: r.entry.user || null,
|
|
4634
|
+
tags: r.entry.tags || [],
|
|
4635
|
+
summary: r.entry.summary || null,
|
|
4636
|
+
}));
|
|
4633
4637
|
} else {
|
|
4634
|
-
|
|
4638
|
+
// Semantic mode — requires query
|
|
4639
|
+
if (!query) {
|
|
4640
|
+
res.writeHead(400, { 'Content-Type': 'application/json' });
|
|
4641
|
+
res.end(JSON.stringify({ error: 'query is required for semantic mode' }));
|
|
4642
|
+
return;
|
|
4643
|
+
}
|
|
4644
|
+
const opts = { limit, repo, since, until, user, source };
|
|
4645
|
+
const results = await contentStore.searchJournals(query, opts);
|
|
4646
|
+
mapped = (results || []).map(r => ({
|
|
4647
|
+
id: r.id,
|
|
4648
|
+
score: r.score ? Math.round(r.score * 1000) / 1000 : null,
|
|
4649
|
+
date: r.entry.date,
|
|
4650
|
+
repo: r.entry.repo,
|
|
4651
|
+
title: r.entry.title,
|
|
4652
|
+
source: r.entry.source,
|
|
4653
|
+
user: r.entry.user || null,
|
|
4654
|
+
tags: r.entry.tags || [],
|
|
4655
|
+
summary: r.entry.summary || null,
|
|
4656
|
+
}));
|
|
4635
4657
|
}
|
|
4636
4658
|
|
|
4637
|
-
const mapped = (results || []).map(r => ({
|
|
4638
|
-
id: r.id,
|
|
4639
|
-
score: r.score ? Math.round(r.score * 1000) / 1000 : null,
|
|
4640
|
-
date: r.entry.date,
|
|
4641
|
-
repo: r.entry.repo,
|
|
4642
|
-
title: r.entry.title,
|
|
4643
|
-
source: r.entry.source,
|
|
4644
|
-
tags: r.entry.tags || [],
|
|
4645
|
-
summary: r.entry.summary || null,
|
|
4646
|
-
}));
|
|
4647
|
-
|
|
4648
4659
|
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
4649
4660
|
res.end(JSON.stringify({ found: mapped.length, results: mapped }));
|
|
4650
4661
|
} catch (err) {
|
|
@@ -6304,7 +6315,6 @@ function showHelp() {
|
|
|
6304
6315
|
console.log(' wayfind index-journals --dir <path> Custom journal directory');
|
|
6305
6316
|
console.log(' wayfind index-journals --no-embeddings Skip embedding generation');
|
|
6306
6317
|
console.log(' wayfind search-journals <query> Semantic search (needs OPENAI_API_KEY)');
|
|
6307
|
-
console.log(' wayfind search-journals <query> --text Full-text search (no API key)');
|
|
6308
6318
|
console.log(' wayfind search-journals <query> --repo wayfind --since 2026-02-01');
|
|
6309
6319
|
console.log(' wayfind insights Show journal insights');
|
|
6310
6320
|
console.log(' wayfind insights --json JSON output');
|
package/package.json
CHANGED