stellavault 0.4.4 → 0.5.0
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/README.md +52 -16
- package/SECURITY.md +50 -0
- package/dist/stellavault.js +8968 -0
- package/package.json +70 -33
- package/.env.example +0 -12
- package/CHANGELOG.md +0 -106
- package/CLAUDE.md +0 -42
- package/CONTRIBUTING.md +0 -65
- package/index.html +0 -509
- package/packages/cli/bin/ekh.js +0 -2
- package/packages/cli/bin/stellavault.js +0 -2
- package/packages/cli/dist/commands/adr-cmd.d.ts +0 -7
- package/packages/cli/dist/commands/adr-cmd.js +0 -45
- package/packages/cli/dist/commands/ask-cmd.d.ts +0 -5
- package/packages/cli/dist/commands/ask-cmd.js +0 -36
- package/packages/cli/dist/commands/autopilot-cmd.d.ts +0 -4
- package/packages/cli/dist/commands/autopilot-cmd.js +0 -76
- package/packages/cli/dist/commands/brief-cmd.d.ts +0 -2
- package/packages/cli/dist/commands/brief-cmd.js +0 -82
- package/packages/cli/dist/commands/capture-cmd.d.ts +0 -7
- package/packages/cli/dist/commands/capture-cmd.js +0 -31
- package/packages/cli/dist/commands/card-cmd.d.ts +0 -4
- package/packages/cli/dist/commands/card-cmd.js +0 -26
- package/packages/cli/dist/commands/clip-cmd.d.ts +0 -4
- package/packages/cli/dist/commands/clip-cmd.js +0 -151
- package/packages/cli/dist/commands/cloud-cmd.d.ts +0 -4
- package/packages/cli/dist/commands/cloud-cmd.js +0 -64
- package/packages/cli/dist/commands/compile-cmd.d.ts +0 -6
- package/packages/cli/dist/commands/compile-cmd.js +0 -30
- package/packages/cli/dist/commands/contradictions-cmd.d.ts +0 -2
- package/packages/cli/dist/commands/contradictions-cmd.js +0 -34
- package/packages/cli/dist/commands/decay-cmd.d.ts +0 -2
- package/packages/cli/dist/commands/decay-cmd.js +0 -48
- package/packages/cli/dist/commands/digest-cmd.d.ts +0 -5
- package/packages/cli/dist/commands/digest-cmd.js +0 -136
- package/packages/cli/dist/commands/draft-cmd.d.ts +0 -6
- package/packages/cli/dist/commands/draft-cmd.js +0 -110
- package/packages/cli/dist/commands/duplicates-cmd.d.ts +0 -4
- package/packages/cli/dist/commands/duplicates-cmd.js +0 -30
- package/packages/cli/dist/commands/federate-cmd.d.ts +0 -5
- package/packages/cli/dist/commands/federate-cmd.js +0 -247
- package/packages/cli/dist/commands/fleeting-cmd.d.ts +0 -4
- package/packages/cli/dist/commands/fleeting-cmd.js +0 -45
- package/packages/cli/dist/commands/flush-cmd.d.ts +0 -2
- package/packages/cli/dist/commands/flush-cmd.js +0 -58
- package/packages/cli/dist/commands/gaps-cmd.d.ts +0 -2
- package/packages/cli/dist/commands/gaps-cmd.js +0 -33
- package/packages/cli/dist/commands/graph-cmd.d.ts +0 -2
- package/packages/cli/dist/commands/graph-cmd.js +0 -89
- package/packages/cli/dist/commands/index-cmd.d.ts +0 -2
- package/packages/cli/dist/commands/index-cmd.js +0 -57
- package/packages/cli/dist/commands/ingest-cmd.d.ts +0 -9
- package/packages/cli/dist/commands/ingest-cmd.js +0 -195
- package/packages/cli/dist/commands/init-cmd.d.ts +0 -2
- package/packages/cli/dist/commands/init-cmd.js +0 -161
- package/packages/cli/dist/commands/learn-cmd.d.ts +0 -2
- package/packages/cli/dist/commands/learn-cmd.js +0 -48
- package/packages/cli/dist/commands/lint-cmd.d.ts +0 -2
- package/packages/cli/dist/commands/lint-cmd.js +0 -61
- package/packages/cli/dist/commands/pack-cmd.d.ts +0 -15
- package/packages/cli/dist/commands/pack-cmd.js +0 -93
- package/packages/cli/dist/commands/review-cmd.d.ts +0 -4
- package/packages/cli/dist/commands/review-cmd.js +0 -107
- package/packages/cli/dist/commands/search-cmd.d.ts +0 -4
- package/packages/cli/dist/commands/search-cmd.js +0 -38
- package/packages/cli/dist/commands/serve-cmd.d.ts +0 -2
- package/packages/cli/dist/commands/serve-cmd.js +0 -14
- package/packages/cli/dist/commands/session-cmd.d.ts +0 -7
- package/packages/cli/dist/commands/session-cmd.js +0 -95
- package/packages/cli/dist/commands/status-cmd.d.ts +0 -2
- package/packages/cli/dist/commands/status-cmd.js +0 -33
- package/packages/cli/dist/commands/sync-cmd.d.ts +0 -5
- package/packages/cli/dist/commands/sync-cmd.js +0 -62
- package/packages/cli/dist/commands/vault-cmd.d.ts +0 -10
- package/packages/cli/dist/commands/vault-cmd.js +0 -54
- package/packages/cli/dist/index.d.ts +0 -2
- package/packages/cli/dist/index.js +0 -233
- package/packages/cli/package.json +0 -24
- package/packages/core/dist/api/dashboard.d.ts +0 -3
- package/packages/core/dist/api/dashboard.js +0 -135
- package/packages/core/dist/api/graph-data.d.ts +0 -11
- package/packages/core/dist/api/graph-data.js +0 -255
- package/packages/core/dist/api/pwa.d.ts +0 -3
- package/packages/core/dist/api/pwa.js +0 -77
- package/packages/core/dist/api/server.d.ts +0 -16
- package/packages/core/dist/api/server.js +0 -1122
- package/packages/core/dist/capture/voice.d.ts +0 -24
- package/packages/core/dist/capture/voice.js +0 -135
- package/packages/core/dist/cloud/index.d.ts +0 -3
- package/packages/core/dist/cloud/index.js +0 -2
- package/packages/core/dist/cloud/sync.d.ts +0 -29
- package/packages/core/dist/cloud/sync.js +0 -137
- package/packages/core/dist/config.d.ts +0 -35
- package/packages/core/dist/config.js +0 -63
- package/packages/core/dist/federation/credits.d.ts +0 -26
- package/packages/core/dist/federation/credits.js +0 -56
- package/packages/core/dist/federation/identity.d.ts +0 -14
- package/packages/core/dist/federation/identity.js +0 -74
- package/packages/core/dist/federation/index.d.ts +0 -7
- package/packages/core/dist/federation/index.js +0 -5
- package/packages/core/dist/federation/node.d.ts +0 -31
- package/packages/core/dist/federation/node.js +0 -216
- package/packages/core/dist/federation/privacy.d.ts +0 -8
- package/packages/core/dist/federation/privacy.js +0 -40
- package/packages/core/dist/federation/reputation.d.ts +0 -37
- package/packages/core/dist/federation/reputation.js +0 -139
- package/packages/core/dist/federation/search.d.ts +0 -19
- package/packages/core/dist/federation/search.js +0 -101
- package/packages/core/dist/federation/sharing.d.ts +0 -72
- package/packages/core/dist/federation/sharing.js +0 -246
- package/packages/core/dist/federation/trust.d.ts +0 -15
- package/packages/core/dist/federation/trust.js +0 -60
- package/packages/core/dist/federation/types.d.ts +0 -40
- package/packages/core/dist/federation/types.js +0 -3
- package/packages/core/dist/i18n/index.d.ts +0 -6
- package/packages/core/dist/i18n/index.js +0 -81
- package/packages/core/dist/i18n/note-strings.d.ts +0 -5
- package/packages/core/dist/i18n/note-strings.js +0 -94
- package/packages/core/dist/index.d.ts +0 -123
- package/packages/core/dist/index.js +0 -74
- package/packages/core/dist/indexer/chunker.d.ts +0 -14
- package/packages/core/dist/indexer/chunker.js +0 -148
- package/packages/core/dist/indexer/embedder.d.ts +0 -8
- package/packages/core/dist/indexer/embedder.js +0 -3
- package/packages/core/dist/indexer/index.d.ts +0 -28
- package/packages/core/dist/indexer/index.js +0 -74
- package/packages/core/dist/indexer/local-embedder.d.ts +0 -3
- package/packages/core/dist/indexer/local-embedder.js +0 -29
- package/packages/core/dist/indexer/scanner.d.ts +0 -11
- package/packages/core/dist/indexer/scanner.js +0 -148
- package/packages/core/dist/indexer/watcher.d.ts +0 -19
- package/packages/core/dist/indexer/watcher.js +0 -49
- package/packages/core/dist/intelligence/ask-engine.d.ts +0 -24
- package/packages/core/dist/intelligence/ask-engine.js +0 -142
- package/packages/core/dist/intelligence/auto-linker.d.ts +0 -19
- package/packages/core/dist/intelligence/auto-linker.js +0 -126
- package/packages/core/dist/intelligence/code-linker.d.ts +0 -20
- package/packages/core/dist/intelligence/code-linker.js +0 -88
- package/packages/core/dist/intelligence/contradiction-detector.d.ts +0 -20
- package/packages/core/dist/intelligence/contradiction-detector.js +0 -115
- package/packages/core/dist/intelligence/decay-engine.d.ts +0 -27
- package/packages/core/dist/intelligence/decay-engine.js +0 -190
- package/packages/core/dist/intelligence/draft-generator.d.ts +0 -25
- package/packages/core/dist/intelligence/draft-generator.js +0 -277
- package/packages/core/dist/intelligence/duplicate-detector.d.ts +0 -20
- package/packages/core/dist/intelligence/duplicate-detector.js +0 -55
- package/packages/core/dist/intelligence/file-extractors.d.ts +0 -13
- package/packages/core/dist/intelligence/file-extractors.js +0 -155
- package/packages/core/dist/intelligence/fsrs.d.ts +0 -43
- package/packages/core/dist/intelligence/fsrs.js +0 -70
- package/packages/core/dist/intelligence/gap-detector.d.ts +0 -25
- package/packages/core/dist/intelligence/gap-detector.js +0 -78
- package/packages/core/dist/intelligence/ingest-pipeline.d.ts +0 -32
- package/packages/core/dist/intelligence/ingest-pipeline.js +0 -245
- package/packages/core/dist/intelligence/knowledge-lint.d.ts +0 -27
- package/packages/core/dist/intelligence/knowledge-lint.js +0 -132
- package/packages/core/dist/intelligence/learning-path.d.ts +0 -31
- package/packages/core/dist/intelligence/learning-path.js +0 -53
- package/packages/core/dist/intelligence/notifications.d.ts +0 -31
- package/packages/core/dist/intelligence/notifications.js +0 -65
- package/packages/core/dist/intelligence/predictive-gaps.d.ts +0 -14
- package/packages/core/dist/intelligence/predictive-gaps.js +0 -74
- package/packages/core/dist/intelligence/semantic-versioning.d.ts +0 -37
- package/packages/core/dist/intelligence/semantic-versioning.js +0 -68
- package/packages/core/dist/intelligence/types.d.ts +0 -28
- package/packages/core/dist/intelligence/types.js +0 -3
- package/packages/core/dist/intelligence/wiki-compiler.d.ts +0 -30
- package/packages/core/dist/intelligence/wiki-compiler.js +0 -222
- package/packages/core/dist/intelligence/youtube-extractor.d.ts +0 -29
- package/packages/core/dist/intelligence/youtube-extractor.js +0 -321
- package/packages/core/dist/intelligence/zettelkasten.d.ts +0 -59
- package/packages/core/dist/intelligence/zettelkasten.js +0 -234
- package/packages/core/dist/mcp/custom-tools.d.ts +0 -29
- package/packages/core/dist/mcp/custom-tools.js +0 -70
- package/packages/core/dist/mcp/index.d.ts +0 -2
- package/packages/core/dist/mcp/index.js +0 -2
- package/packages/core/dist/mcp/server.d.ts +0 -51
- package/packages/core/dist/mcp/server.js +0 -174
- package/packages/core/dist/mcp/tools/agentic-graph.d.ts +0 -93
- package/packages/core/dist/mcp/tools/agentic-graph.js +0 -116
- package/packages/core/dist/mcp/tools/ask.d.ts +0 -29
- package/packages/core/dist/mcp/tools/ask.js +0 -43
- package/packages/core/dist/mcp/tools/brief.d.ts +0 -31
- package/packages/core/dist/mcp/tools/brief.js +0 -39
- package/packages/core/dist/mcp/tools/decay.d.ts +0 -33
- package/packages/core/dist/mcp/tools/decay.js +0 -32
- package/packages/core/dist/mcp/tools/decision-journal.d.ts +0 -78
- package/packages/core/dist/mcp/tools/decision-journal.js +0 -79
- package/packages/core/dist/mcp/tools/detect-gaps.d.ts +0 -24
- package/packages/core/dist/mcp/tools/detect-gaps.js +0 -47
- package/packages/core/dist/mcp/tools/export.d.ts +0 -29
- package/packages/core/dist/mcp/tools/export.js +0 -60
- package/packages/core/dist/mcp/tools/federated-search.d.ts +0 -29
- package/packages/core/dist/mcp/tools/federated-search.js +0 -36
- package/packages/core/dist/mcp/tools/generate-claude-md.d.ts +0 -35
- package/packages/core/dist/mcp/tools/generate-claude-md.js +0 -107
- package/packages/core/dist/mcp/tools/generate-draft.d.ts +0 -34
- package/packages/core/dist/mcp/tools/generate-draft.js +0 -120
- package/packages/core/dist/mcp/tools/get-document.d.ts +0 -35
- package/packages/core/dist/mcp/tools/get-document.js +0 -25
- package/packages/core/dist/mcp/tools/get-evolution.d.ts +0 -28
- package/packages/core/dist/mcp/tools/get-evolution.js +0 -70
- package/packages/core/dist/mcp/tools/get-related.d.ts +0 -32
- package/packages/core/dist/mcp/tools/get-related.js +0 -33
- package/packages/core/dist/mcp/tools/learning-path.d.ts +0 -23
- package/packages/core/dist/mcp/tools/learning-path.js +0 -45
- package/packages/core/dist/mcp/tools/link-code.d.ts +0 -34
- package/packages/core/dist/mcp/tools/link-code.js +0 -44
- package/packages/core/dist/mcp/tools/list-topics.d.ts +0 -15
- package/packages/core/dist/mcp/tools/list-topics.js +0 -18
- package/packages/core/dist/mcp/tools/search.d.ts +0 -39
- package/packages/core/dist/mcp/tools/search.js +0 -29
- package/packages/core/dist/mcp/tools/snapshot.d.ts +0 -47
- package/packages/core/dist/mcp/tools/snapshot.js +0 -84
- package/packages/core/dist/multi-vault/index.d.ts +0 -26
- package/packages/core/dist/multi-vault/index.js +0 -80
- package/packages/core/dist/pack/creator.d.ts +0 -21
- package/packages/core/dist/pack/creator.js +0 -105
- package/packages/core/dist/pack/exporter.d.ts +0 -4
- package/packages/core/dist/pack/exporter.js +0 -18
- package/packages/core/dist/pack/importer.d.ts +0 -10
- package/packages/core/dist/pack/importer.js +0 -55
- package/packages/core/dist/pack/index.d.ts +0 -6
- package/packages/core/dist/pack/index.js +0 -5
- package/packages/core/dist/pack/marketplace.d.ts +0 -14
- package/packages/core/dist/pack/marketplace.js +0 -90
- package/packages/core/dist/pack/pii-masker.d.ts +0 -7
- package/packages/core/dist/pack/pii-masker.js +0 -29
- package/packages/core/dist/pack/types.d.ts +0 -36
- package/packages/core/dist/pack/types.js +0 -3
- package/packages/core/dist/plugins/index.d.ts +0 -35
- package/packages/core/dist/plugins/index.js +0 -57
- package/packages/core/dist/plugins/webhooks.d.ts +0 -30
- package/packages/core/dist/plugins/webhooks.js +0 -79
- package/packages/core/dist/search/adaptive.d.ts +0 -16
- package/packages/core/dist/search/adaptive.js +0 -67
- package/packages/core/dist/search/bm25.d.ts +0 -4
- package/packages/core/dist/search/bm25.js +0 -10
- package/packages/core/dist/search/index.d.ts +0 -15
- package/packages/core/dist/search/index.js +0 -64
- package/packages/core/dist/search/rrf.d.ts +0 -7
- package/packages/core/dist/search/rrf.js +0 -21
- package/packages/core/dist/search/semantic.d.ts +0 -5
- package/packages/core/dist/search/semantic.js +0 -6
- package/packages/core/dist/store/index.d.ts +0 -3
- package/packages/core/dist/store/index.js +0 -2
- package/packages/core/dist/store/sqlite-vec.d.ts +0 -6
- package/packages/core/dist/store/sqlite-vec.js +0 -251
- package/packages/core/dist/store/types.d.ts +0 -20
- package/packages/core/dist/store/types.js +0 -3
- package/packages/core/dist/team/index.d.ts +0 -25
- package/packages/core/dist/team/index.js +0 -97
- package/packages/core/dist/types/chunk.d.ts +0 -23
- package/packages/core/dist/types/chunk.js +0 -3
- package/packages/core/dist/types/document.d.ts +0 -23
- package/packages/core/dist/types/document.js +0 -3
- package/packages/core/dist/types/graph.d.ts +0 -39
- package/packages/core/dist/types/graph.js +0 -3
- package/packages/core/dist/types/index.d.ts +0 -5
- package/packages/core/dist/types/index.js +0 -2
- package/packages/core/dist/types/search.d.ts +0 -39
- package/packages/core/dist/types/search.js +0 -3
- package/packages/core/dist/utils/retry.d.ts +0 -25
- package/packages/core/dist/utils/retry.js +0 -59
- package/packages/core/package.json +0 -67
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
// MCP Tool: generate-draft — Claude Code에서 직접 초안 생성
|
|
2
|
-
// Claude가 vault 컨텍스트를 받아 직접 글을 쓰도록 구조화된 재료를 반환
|
|
3
|
-
// 비용: $0 (이미 Claude Code 세션 안)
|
|
4
|
-
import { scanRawDirectory, extractConcepts } from '../../intelligence/wiki-compiler.js';
|
|
5
|
-
import { loadConfig, DEFAULT_FOLDERS } from '../../config.js';
|
|
6
|
-
import { resolve } from 'node:path';
|
|
7
|
-
import { existsSync } from 'node:fs';
|
|
8
|
-
export function createGenerateDraftTool(searchEngine, vaultPath) {
|
|
9
|
-
return {
|
|
10
|
-
name: 'generate-draft',
|
|
11
|
-
description: 'Gather knowledge from your vault to write a draft. Returns structured context (notes, concepts, excerpts) so you can compose a blog post, report, or outline. Use this when the user asks you to "write a draft", "blog post from my notes", or "summarize my knowledge about X".',
|
|
12
|
-
inputSchema: {
|
|
13
|
-
type: 'object',
|
|
14
|
-
properties: {
|
|
15
|
-
topic: {
|
|
16
|
-
type: 'string',
|
|
17
|
-
description: 'Topic or keyword to focus on. Leave empty for all knowledge.',
|
|
18
|
-
},
|
|
19
|
-
format: {
|
|
20
|
-
type: 'string',
|
|
21
|
-
enum: ['blog', 'report', 'outline'],
|
|
22
|
-
description: 'Desired output format (default: blog)',
|
|
23
|
-
},
|
|
24
|
-
maxSources: {
|
|
25
|
-
type: 'number',
|
|
26
|
-
description: 'Maximum number of source documents to include (default: 10)',
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
handler: async (args) => {
|
|
31
|
-
const { topic, format = 'blog', maxSources = 10 } = args;
|
|
32
|
-
const config = loadConfig();
|
|
33
|
-
const folders = config.folders ?? DEFAULT_FOLDERS;
|
|
34
|
-
// 1. 토픽 기반 검색 (있으면)
|
|
35
|
-
let searchResults = [];
|
|
36
|
-
if (topic) {
|
|
37
|
-
const results = await searchEngine.search({ query: topic, limit: maxSources });
|
|
38
|
-
searchResults = results.map(r => ({
|
|
39
|
-
title: r.document?.title ?? 'Untitled',
|
|
40
|
-
content: r.chunk?.content ?? '',
|
|
41
|
-
filePath: r.document?.filePath ?? '',
|
|
42
|
-
score: r.score ?? 0,
|
|
43
|
-
}));
|
|
44
|
-
}
|
|
45
|
-
// 2. vault 전체 스캔 (검색 결과가 부족하면)
|
|
46
|
-
const allDocs = [];
|
|
47
|
-
for (const dir of [folders.fleeting, folders.literature, folders.permanent, folders.wiki]) {
|
|
48
|
-
const fullDir = resolve(vaultPath, dir);
|
|
49
|
-
if (existsSync(fullDir)) {
|
|
50
|
-
const docs = scanRawDirectory(fullDir);
|
|
51
|
-
allDocs.push(...docs);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
// 토픽 필터
|
|
55
|
-
const relevantDocs = topic
|
|
56
|
-
? allDocs.filter(d => d.title.toLowerCase().includes(topic.toLowerCase()) ||
|
|
57
|
-
d.tags.some(t => t.toLowerCase().includes(topic.toLowerCase())) ||
|
|
58
|
-
d.content.toLowerCase().includes(topic.toLowerCase()))
|
|
59
|
-
: allDocs;
|
|
60
|
-
// 3. 개념 추출
|
|
61
|
-
const concepts = extractConcepts(relevantDocs.length > 0 ? relevantDocs : allDocs);
|
|
62
|
-
const topConcepts = [...concepts.entries()]
|
|
63
|
-
.sort((a, b) => b[1].length - a[1].length)
|
|
64
|
-
.slice(0, 8)
|
|
65
|
-
.map(([name, docs]) => ({ name, documentCount: docs.length }));
|
|
66
|
-
// 4. 발췌 준비
|
|
67
|
-
const excerpts = (searchResults.length > 0 ? searchResults : relevantDocs.slice(0, maxSources))
|
|
68
|
-
.map(doc => {
|
|
69
|
-
const body = doc.content
|
|
70
|
-
.replace(/^---[\s\S]*?---\n?/, '') // frontmatter 제거
|
|
71
|
-
.replace(/^#+\s+.+\n/m, '') // 첫 heading 제거
|
|
72
|
-
.trim()
|
|
73
|
-
.slice(0, 500);
|
|
74
|
-
return {
|
|
75
|
-
title: doc.title,
|
|
76
|
-
excerpt: body,
|
|
77
|
-
filePath: doc.filePath,
|
|
78
|
-
};
|
|
79
|
-
})
|
|
80
|
-
.filter(e => e.excerpt.length > 20);
|
|
81
|
-
// 5. 구조화된 컨텍스트 반환
|
|
82
|
-
const context = {
|
|
83
|
-
topic: topic ?? 'All Knowledge',
|
|
84
|
-
format,
|
|
85
|
-
totalDocuments: relevantDocs.length || allDocs.length,
|
|
86
|
-
concepts: topConcepts,
|
|
87
|
-
sources: excerpts,
|
|
88
|
-
instruction: `Use the sources above to write a ${format}. Rules:
|
|
89
|
-
- Only use information from the provided sources
|
|
90
|
-
- Cite sources using [[title]] wikilink format
|
|
91
|
-
- Write in the same language as the source material
|
|
92
|
-
- Add your analysis connecting ideas across sources
|
|
93
|
-
- Format: ${format === 'blog' ? 'Engaging blog post with intro, body sections, conclusion' : format === 'report' ? 'Formal report with executive summary, sections, conclusion' : 'Hierarchical outline with numbered sections'}`,
|
|
94
|
-
};
|
|
95
|
-
const text = `# Draft Context: ${context.topic}
|
|
96
|
-
|
|
97
|
-
## Format: ${format}
|
|
98
|
-
## Sources: ${context.totalDocuments} documents, ${excerpts.length} excerpts
|
|
99
|
-
|
|
100
|
-
## Key Concepts
|
|
101
|
-
${topConcepts.map(c => `- **${c.name}** (${c.documentCount} documents)`).join('\n')}
|
|
102
|
-
|
|
103
|
-
## Source Excerpts
|
|
104
|
-
|
|
105
|
-
${excerpts.map(e => `### ${e.title}
|
|
106
|
-
> ${e.excerpt}
|
|
107
|
-
`).join('\n')}
|
|
108
|
-
|
|
109
|
-
## Instructions
|
|
110
|
-
${context.instruction}
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
Please write the ${format} draft based on the context above. Save the result to the vault's _drafts/ folder.`;
|
|
114
|
-
return {
|
|
115
|
-
content: [{ type: 'text', text }],
|
|
116
|
-
};
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
//# sourceMappingURL=generate-draft.js.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { VectorStore } from '../../store/types.js';
|
|
2
|
-
export declare const getDocumentToolDef: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
inputSchema: {
|
|
6
|
-
type: "object";
|
|
7
|
-
properties: {
|
|
8
|
-
id: {
|
|
9
|
-
type: string;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
required: string[];
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export declare function handleGetDocument(store: VectorStore, args: {
|
|
17
|
-
id: string;
|
|
18
|
-
}): Promise<{
|
|
19
|
-
error: string;
|
|
20
|
-
title?: undefined;
|
|
21
|
-
filePath?: undefined;
|
|
22
|
-
content?: undefined;
|
|
23
|
-
tags?: undefined;
|
|
24
|
-
frontmatter?: undefined;
|
|
25
|
-
lastModified?: undefined;
|
|
26
|
-
} | {
|
|
27
|
-
title: string;
|
|
28
|
-
filePath: string;
|
|
29
|
-
content: string;
|
|
30
|
-
tags: string[];
|
|
31
|
-
frontmatter: Record<string, unknown>;
|
|
32
|
-
lastModified: string;
|
|
33
|
-
error?: undefined;
|
|
34
|
-
}>;
|
|
35
|
-
//# sourceMappingURL=get-document.d.ts.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export const getDocumentToolDef = {
|
|
2
|
-
name: 'get-document',
|
|
3
|
-
description: '문서 ID 또는 파일 경로로 전체 문서 내용을 가져옵니다.',
|
|
4
|
-
inputSchema: {
|
|
5
|
-
type: 'object',
|
|
6
|
-
properties: {
|
|
7
|
-
id: { type: 'string', description: '문서 ID 또는 파일 경로' },
|
|
8
|
-
},
|
|
9
|
-
required: ['id'],
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
export async function handleGetDocument(store, args) {
|
|
13
|
-
const doc = await store.getDocument(args.id);
|
|
14
|
-
if (!doc)
|
|
15
|
-
return { error: `Document not found: ${args.id}` };
|
|
16
|
-
return {
|
|
17
|
-
title: doc.title,
|
|
18
|
-
filePath: doc.filePath,
|
|
19
|
-
content: doc.content,
|
|
20
|
-
tags: doc.tags,
|
|
21
|
-
frontmatter: doc.frontmatter,
|
|
22
|
-
lastModified: doc.lastModified,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=get-document.js.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { VectorStore } from '../../store/types.js';
|
|
2
|
-
export declare function createGetEvolutionTool(store: VectorStore): {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
inputSchema: {
|
|
6
|
-
type: "object";
|
|
7
|
-
properties: {
|
|
8
|
-
topic: {
|
|
9
|
-
type: "string";
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
limit: {
|
|
13
|
-
type: "number";
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
handler: (args: {
|
|
19
|
-
topic?: string;
|
|
20
|
-
limit?: number;
|
|
21
|
-
}) => Promise<{
|
|
22
|
-
content: {
|
|
23
|
-
type: "text";
|
|
24
|
-
text: string;
|
|
25
|
-
}[];
|
|
26
|
-
}>;
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=get-evolution.d.ts.map
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
// Design Ref: F02 — 지식 진화 타임라인 MCP tool
|
|
2
|
-
// Plan SC: SC-01 주제별 드리프트 반환
|
|
3
|
-
export function createGetEvolutionTool(store) {
|
|
4
|
-
return {
|
|
5
|
-
name: 'get-evolution',
|
|
6
|
-
description: 'Track semantic evolution of knowledge. Shows which topics have changed the most in meaning over time.',
|
|
7
|
-
inputSchema: {
|
|
8
|
-
type: 'object',
|
|
9
|
-
properties: {
|
|
10
|
-
topic: {
|
|
11
|
-
type: 'string',
|
|
12
|
-
description: 'Optional topic/tag to filter. Omit for vault-wide analysis.',
|
|
13
|
-
},
|
|
14
|
-
limit: {
|
|
15
|
-
type: 'number',
|
|
16
|
-
description: 'Max results to return (default: 10)',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
handler: async (args) => {
|
|
21
|
-
const limit = args.limit ?? 10;
|
|
22
|
-
const docs = await store.getAllDocuments();
|
|
23
|
-
const embeddings = await store.getDocumentEmbeddings();
|
|
24
|
-
// Filter by topic/tag if provided
|
|
25
|
-
let filteredDocs = docs;
|
|
26
|
-
if (args.topic) {
|
|
27
|
-
const topicLower = args.topic.toLowerCase();
|
|
28
|
-
filteredDocs = docs.filter((d) => d.tags.some((t) => t.toLowerCase().includes(topicLower)) ||
|
|
29
|
-
d.title.toLowerCase().includes(topicLower));
|
|
30
|
-
}
|
|
31
|
-
// Build embedding maps (current only — single-point, but foundation for multi-version)
|
|
32
|
-
const currentEmbeddings = new Map();
|
|
33
|
-
const titles = new Map();
|
|
34
|
-
for (const doc of filteredDocs) {
|
|
35
|
-
const emb = embeddings.get(doc.id);
|
|
36
|
-
if (emb) {
|
|
37
|
-
currentEmbeddings.set(doc.id, emb);
|
|
38
|
-
titles.set(doc.id, doc.title);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
// For now, use modification time as proxy for "evolution"
|
|
42
|
-
// Sort by most recently modified with content changes
|
|
43
|
-
const recentlyChanged = filteredDocs
|
|
44
|
-
.filter((d) => d.lastModified)
|
|
45
|
-
.sort((a, b) => new Date(b.lastModified).getTime() - new Date(a.lastModified).getTime())
|
|
46
|
-
.slice(0, limit)
|
|
47
|
-
.map((d) => ({
|
|
48
|
-
documentId: d.id,
|
|
49
|
-
title: d.title,
|
|
50
|
-
lastModified: d.lastModified,
|
|
51
|
-
tags: d.tags.slice(0, 5),
|
|
52
|
-
daysSinceModified: Math.round((Date.now() - new Date(d.lastModified).getTime()) / 86400000),
|
|
53
|
-
}));
|
|
54
|
-
return {
|
|
55
|
-
content: [{
|
|
56
|
-
type: 'text',
|
|
57
|
-
text: JSON.stringify({
|
|
58
|
-
topic: args.topic ?? 'all',
|
|
59
|
-
totalDocuments: filteredDocs.length,
|
|
60
|
-
recentlyEvolved: recentlyChanged,
|
|
61
|
-
summary: recentlyChanged.length > 0
|
|
62
|
-
? `최근 변화가 가장 큰 문서: "${recentlyChanged[0].title}" (${recentlyChanged[0].daysSinceModified}일 전 수정)`
|
|
63
|
-
: '분석할 문서가 없습니다.',
|
|
64
|
-
}, null, 2),
|
|
65
|
-
}],
|
|
66
|
-
};
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=get-evolution.js.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { SearchEngine } from '../../search/index.js';
|
|
2
|
-
import type { VectorStore } from '../../store/types.js';
|
|
3
|
-
export declare const getRelatedToolDef: {
|
|
4
|
-
name: string;
|
|
5
|
-
description: string;
|
|
6
|
-
inputSchema: {
|
|
7
|
-
type: "object";
|
|
8
|
-
properties: {
|
|
9
|
-
id: {
|
|
10
|
-
type: string;
|
|
11
|
-
description: string;
|
|
12
|
-
};
|
|
13
|
-
limit: {
|
|
14
|
-
type: string;
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
required: string[];
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export declare function handleGetRelated(store: VectorStore, searchEngine: SearchEngine, args: {
|
|
22
|
-
id: string;
|
|
23
|
-
limit?: number;
|
|
24
|
-
}): Promise<{
|
|
25
|
-
title: string;
|
|
26
|
-
filePath: string;
|
|
27
|
-
score: number;
|
|
28
|
-
tags: string[];
|
|
29
|
-
}[] | {
|
|
30
|
-
error: string;
|
|
31
|
-
}>;
|
|
32
|
-
//# sourceMappingURL=get-related.d.ts.map
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export const getRelatedToolDef = {
|
|
2
|
-
name: 'get-related',
|
|
3
|
-
description: '특정 문서와 의미적으로 관련된 문서들을 반환합니다.',
|
|
4
|
-
inputSchema: {
|
|
5
|
-
type: 'object',
|
|
6
|
-
properties: {
|
|
7
|
-
id: { type: 'string', description: '기준 문서 ID 또는 파일 경로' },
|
|
8
|
-
limit: { type: 'number', description: '반환할 관련 문서 수 (기본: 5)' },
|
|
9
|
-
},
|
|
10
|
-
required: ['id'],
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
export async function handleGetRelated(store, searchEngine, args) {
|
|
14
|
-
const doc = await store.getDocument(args.id);
|
|
15
|
-
if (!doc)
|
|
16
|
-
return { error: `Document not found: ${args.id}` };
|
|
17
|
-
// 문서 제목+내용 일부를 쿼리로 사용하여 관련 문서 검색
|
|
18
|
-
const query = `${doc.title} ${doc.content.slice(0, 200)}`;
|
|
19
|
-
const results = await searchEngine.search({
|
|
20
|
-
query,
|
|
21
|
-
limit: (args.limit ?? 5) + 1, // 자기 자신 제외용 +1
|
|
22
|
-
});
|
|
23
|
-
return results
|
|
24
|
-
.filter(r => r.document.id !== args.id)
|
|
25
|
-
.slice(0, args.limit ?? 5)
|
|
26
|
-
.map(r => ({
|
|
27
|
-
title: r.document.title,
|
|
28
|
-
filePath: r.document.filePath,
|
|
29
|
-
score: Math.round(r.score * 1000) / 1000,
|
|
30
|
-
tags: r.document.tags,
|
|
31
|
-
}));
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=get-related.js.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { VectorStore } from '../../store/types.js';
|
|
2
|
-
export declare function createLearningPathTool(store: VectorStore): {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
inputSchema: {
|
|
6
|
-
type: "object";
|
|
7
|
-
properties: {
|
|
8
|
-
limit: {
|
|
9
|
-
type: string;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
handler(args: {
|
|
15
|
-
limit?: number;
|
|
16
|
-
}): Promise<{
|
|
17
|
-
content: {
|
|
18
|
-
type: "text";
|
|
19
|
-
text: string;
|
|
20
|
-
}[];
|
|
21
|
-
}>;
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=learning-path.d.ts.map
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// MCP Tool: get-learning-path (F-A11)
|
|
2
|
-
import { DecayEngine } from '../../intelligence/decay-engine.js';
|
|
3
|
-
import { detectKnowledgeGaps } from '../../intelligence/gap-detector.js';
|
|
4
|
-
import { generateLearningPath } from '../../intelligence/learning-path.js';
|
|
5
|
-
export function createLearningPathTool(store) {
|
|
6
|
-
return {
|
|
7
|
-
name: 'get-learning-path',
|
|
8
|
-
description: 'Generate a personalized learning path based on knowledge decay and gaps. Returns prioritized list of what to review, explore, or bridge.',
|
|
9
|
-
inputSchema: {
|
|
10
|
-
type: 'object',
|
|
11
|
-
properties: {
|
|
12
|
-
limit: { type: 'number', description: 'Max items to return (default: 10)' },
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
async handler(args) {
|
|
16
|
-
const limit = args.limit ?? 10;
|
|
17
|
-
const db = store.getDb();
|
|
18
|
-
if (!db)
|
|
19
|
-
return { content: [{ type: 'text', text: 'Database not available' }] };
|
|
20
|
-
const decayEngine = new DecayEngine(db);
|
|
21
|
-
const decayReport = await decayEngine.computeAll();
|
|
22
|
-
let gaps = [];
|
|
23
|
-
try {
|
|
24
|
-
const gapReport = await detectKnowledgeGaps(store);
|
|
25
|
-
gaps = gapReport.gaps ?? [];
|
|
26
|
-
}
|
|
27
|
-
catch { /* ignore */ }
|
|
28
|
-
const path = generateLearningPath({ decayReport, gaps }, limit);
|
|
29
|
-
const lines = [
|
|
30
|
-
`🎯 Learning Path (${path.items.length} items, ~${path.summary.estimatedMinutes}min)`,
|
|
31
|
-
'',
|
|
32
|
-
];
|
|
33
|
-
for (const item of path.items) {
|
|
34
|
-
const icon = item.category === 'review' ? '📖' : item.category === 'bridge' ? '🌉' : '🔭';
|
|
35
|
-
lines.push(`${icon} [${item.priority}] ${item.title} (${item.score}pt)`);
|
|
36
|
-
lines.push(` ${item.reason}`);
|
|
37
|
-
}
|
|
38
|
-
if (path.items.length === 0) {
|
|
39
|
-
lines.push('All clear! Knowledge is in great shape.');
|
|
40
|
-
}
|
|
41
|
-
return { content: [{ type: 'text', text: lines.join('\n') }] };
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=learning-path.js.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { SearchEngine } from '../../search/index.js';
|
|
2
|
-
export declare function createLinkCodeTool(searchEngine: SearchEngine): {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
inputSchema: {
|
|
6
|
-
type: "object";
|
|
7
|
-
properties: {
|
|
8
|
-
filePath: {
|
|
9
|
-
type: "string";
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
content: {
|
|
13
|
-
type: "string";
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
limit: {
|
|
17
|
-
type: "number";
|
|
18
|
-
description: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
required: readonly ["filePath"];
|
|
22
|
-
};
|
|
23
|
-
handler: (args: {
|
|
24
|
-
filePath: string;
|
|
25
|
-
content?: string;
|
|
26
|
-
limit?: number;
|
|
27
|
-
}) => Promise<{
|
|
28
|
-
content: {
|
|
29
|
-
type: "text";
|
|
30
|
-
text: string;
|
|
31
|
-
}[];
|
|
32
|
-
}>;
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=link-code.d.ts.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// Design Ref: F15 — 코드-지식 링커 MCP tool
|
|
2
|
-
// Plan SC: SC-03 코드 파일에서 관련 노트 매칭
|
|
3
|
-
import { linkCodeToKnowledge } from '../../intelligence/code-linker.js';
|
|
4
|
-
export function createLinkCodeTool(searchEngine) {
|
|
5
|
-
return {
|
|
6
|
-
name: 'link-code',
|
|
7
|
-
description: 'Find knowledge notes related to a code file. Extracts keywords from file path and content, then searches the knowledge base.',
|
|
8
|
-
inputSchema: {
|
|
9
|
-
type: 'object',
|
|
10
|
-
properties: {
|
|
11
|
-
filePath: {
|
|
12
|
-
type: 'string',
|
|
13
|
-
description: 'Path to the code file (e.g., src/auth/middleware.ts)',
|
|
14
|
-
},
|
|
15
|
-
content: {
|
|
16
|
-
type: 'string',
|
|
17
|
-
description: 'Optional: code file content for deeper keyword extraction',
|
|
18
|
-
},
|
|
19
|
-
limit: {
|
|
20
|
-
type: 'number',
|
|
21
|
-
description: 'Max related notes to return (default: 5)',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
required: ['filePath'],
|
|
25
|
-
},
|
|
26
|
-
handler: async (args) => {
|
|
27
|
-
const result = await linkCodeToKnowledge(searchEngine, args.filePath, args.content, args.limit ?? 5);
|
|
28
|
-
return {
|
|
29
|
-
content: [{
|
|
30
|
-
type: 'text',
|
|
31
|
-
text: JSON.stringify({
|
|
32
|
-
filePath: result.filePath,
|
|
33
|
-
extractedKeywords: result.keywords,
|
|
34
|
-
relatedNotes: result.relatedNotes,
|
|
35
|
-
summary: result.relatedNotes.length > 0
|
|
36
|
-
? `"${result.filePath}" 관련 노트 ${result.relatedNotes.length}개 발견. 최상위: "${result.relatedNotes[0].title}"`
|
|
37
|
-
: `"${result.filePath}"에 대한 관련 노트를 찾지 못했습니다.`,
|
|
38
|
-
}, null, 2),
|
|
39
|
-
}],
|
|
40
|
-
};
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=link-code.js.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { VectorStore } from '../../store/types.js';
|
|
2
|
-
export declare const listTopicsToolDef: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
inputSchema: {
|
|
6
|
-
type: "object";
|
|
7
|
-
properties: {};
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export declare function handleListTopics(store: VectorStore): Promise<{
|
|
11
|
-
topics: import("../../index.js").TopicInfo[];
|
|
12
|
-
totalDocuments: number;
|
|
13
|
-
totalChunks: number;
|
|
14
|
-
}>;
|
|
15
|
-
//# sourceMappingURL=list-topics.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export const listTopicsToolDef = {
|
|
2
|
-
name: 'list-topics',
|
|
3
|
-
description: '지식 베이스의 전체 토픽/태그 목록과 문서 수를 반환합니다.',
|
|
4
|
-
inputSchema: {
|
|
5
|
-
type: 'object',
|
|
6
|
-
properties: {},
|
|
7
|
-
},
|
|
8
|
-
};
|
|
9
|
-
export async function handleListTopics(store) {
|
|
10
|
-
const topics = await store.getTopics();
|
|
11
|
-
const stats = await store.getStats();
|
|
12
|
-
return {
|
|
13
|
-
topics,
|
|
14
|
-
totalDocuments: stats.documentCount,
|
|
15
|
-
totalChunks: stats.chunkCount,
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=list-topics.js.map
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { SearchEngine } from '../../search/index.js';
|
|
2
|
-
export declare const searchToolDef: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
inputSchema: {
|
|
6
|
-
type: "object";
|
|
7
|
-
properties: {
|
|
8
|
-
query: {
|
|
9
|
-
type: string;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
limit: {
|
|
13
|
-
type: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
tags: {
|
|
17
|
-
type: string;
|
|
18
|
-
items: {
|
|
19
|
-
type: string;
|
|
20
|
-
};
|
|
21
|
-
description: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
required: string[];
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export declare function handleSearch(searchEngine: SearchEngine, args: {
|
|
28
|
-
query: string;
|
|
29
|
-
limit?: number;
|
|
30
|
-
tags?: string[];
|
|
31
|
-
}): Promise<{
|
|
32
|
-
title: string;
|
|
33
|
-
filePath: string;
|
|
34
|
-
heading: string;
|
|
35
|
-
content: string;
|
|
36
|
-
score: number;
|
|
37
|
-
tags: string[];
|
|
38
|
-
}[]>;
|
|
39
|
-
//# sourceMappingURL=search.d.ts.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export const searchToolDef = {
|
|
2
|
-
name: 'search',
|
|
3
|
-
description: '개인 지식 베이스에서 관련 문서/청크를 검색합니다. 자연어 쿼리와 키워드 모두 지원합니다.',
|
|
4
|
-
inputSchema: {
|
|
5
|
-
type: 'object',
|
|
6
|
-
properties: {
|
|
7
|
-
query: { type: 'string', description: '검색 쿼리 (자연어 또는 키워드)' },
|
|
8
|
-
limit: { type: 'number', description: '반환할 결과 수 (기본: 5)' },
|
|
9
|
-
tags: { type: 'array', items: { type: 'string' }, description: '태그 필터' },
|
|
10
|
-
},
|
|
11
|
-
required: ['query'],
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
export async function handleSearch(searchEngine, args) {
|
|
15
|
-
const results = await searchEngine.search({
|
|
16
|
-
query: args.query,
|
|
17
|
-
limit: args.limit ?? 5,
|
|
18
|
-
tags: args.tags,
|
|
19
|
-
});
|
|
20
|
-
return results.map(r => ({
|
|
21
|
-
title: r.document.title,
|
|
22
|
-
filePath: r.document.filePath,
|
|
23
|
-
heading: r.chunk.heading,
|
|
24
|
-
content: r.chunk.content,
|
|
25
|
-
score: Math.round(r.score * 1000) / 1000,
|
|
26
|
-
tags: r.document.tags,
|
|
27
|
-
}));
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=search.js.map
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { SearchEngine } from '../../search/index.js';
|
|
2
|
-
export declare const createSnapshotToolDef: {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
inputSchema: {
|
|
6
|
-
type: "object";
|
|
7
|
-
properties: {
|
|
8
|
-
name: {
|
|
9
|
-
type: string;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
queries: {
|
|
13
|
-
type: string;
|
|
14
|
-
items: {
|
|
15
|
-
type: string;
|
|
16
|
-
};
|
|
17
|
-
description: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
required: string[];
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export declare const loadSnapshotToolDef: {
|
|
24
|
-
name: string;
|
|
25
|
-
description: string;
|
|
26
|
-
inputSchema: {
|
|
27
|
-
type: "object";
|
|
28
|
-
properties: {
|
|
29
|
-
name: {
|
|
30
|
-
type: string;
|
|
31
|
-
description: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
required: string[];
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
export declare function handleCreateSnapshot(searchEngine: SearchEngine, args: {
|
|
38
|
-
name: string;
|
|
39
|
-
queries: string[];
|
|
40
|
-
}): Promise<{
|
|
41
|
-
saved: string;
|
|
42
|
-
resultCount: number;
|
|
43
|
-
}>;
|
|
44
|
-
export declare function handleLoadSnapshot(args: {
|
|
45
|
-
name: string;
|
|
46
|
-
}): Promise<any>;
|
|
47
|
-
//# sourceMappingURL=snapshot.d.ts.map
|