@thanh01.pmt/research-kit 1.0.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/dist/academic/index.cjs +368 -0
- package/dist/academic/index.cjs.map +1 -0
- package/dist/academic/index.d.cts +35 -0
- package/dist/academic/index.d.ts +35 -0
- package/dist/academic/index.js +4 -0
- package/dist/academic/index.js.map +1 -0
- package/dist/catalogBuilder-8A-Dg_A-.d.ts +30 -0
- package/dist/catalogBuilder-feU79wQQ.d.cts +30 -0
- package/dist/chunk-47L7ZHMY.js +316 -0
- package/dist/chunk-47L7ZHMY.js.map +1 -0
- package/dist/chunk-63X2HPCI.js +47 -0
- package/dist/chunk-63X2HPCI.js.map +1 -0
- package/dist/chunk-67V2GJGK.js +34 -0
- package/dist/chunk-67V2GJGK.js.map +1 -0
- package/dist/chunk-6Q2XCUG7.js +40 -0
- package/dist/chunk-6Q2XCUG7.js.map +1 -0
- package/dist/chunk-KGCDYFFD.js +3 -0
- package/dist/chunk-KGCDYFFD.js.map +1 -0
- package/dist/chunk-MHAYD555.js +239 -0
- package/dist/chunk-MHAYD555.js.map +1 -0
- package/dist/chunk-MPLDSHFM.js +396 -0
- package/dist/chunk-MPLDSHFM.js.map +1 -0
- package/dist/chunk-QZNLB5X4.js +65 -0
- package/dist/chunk-QZNLB5X4.js.map +1 -0
- package/dist/config/index.cjs +37 -0
- package/dist/config/index.cjs.map +1 -0
- package/dist/config/index.d.cts +2 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.js +3 -0
- package/dist/config/index.js.map +1 -0
- package/dist/evidence/index.cjs +106 -0
- package/dist/evidence/index.cjs.map +1 -0
- package/dist/evidence/index.d.cts +45 -0
- package/dist/evidence/index.d.ts +45 -0
- package/dist/evidence/index.js +4 -0
- package/dist/evidence/index.js.map +1 -0
- package/dist/harvester/index.cjs +402 -0
- package/dist/harvester/index.cjs.map +1 -0
- package/dist/harvester/index.d.cts +54 -0
- package/dist/harvester/index.d.ts +54 -0
- package/dist/harvester/index.js +4 -0
- package/dist/harvester/index.js.map +1 -0
- package/dist/index-BU5n1ip_.d.cts +224 -0
- package/dist/index-BU5n1ip_.d.ts +224 -0
- package/dist/index.cjs +1132 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/literatureReview-C4AgVljZ.d.ts +43 -0
- package/dist/literatureReview-Dlods4Aw.d.cts +43 -0
- package/dist/pipeline/index.cjs +999 -0
- package/dist/pipeline/index.cjs.map +1 -0
- package/dist/pipeline/index.d.cts +102 -0
- package/dist/pipeline/index.d.ts +102 -0
- package/dist/pipeline/index.js +6 -0
- package/dist/pipeline/index.js.map +1 -0
- package/dist/provenanceTracker-ct4s5lJV.d.cts +24 -0
- package/dist/provenanceTracker-ct4s5lJV.d.ts +24 -0
- package/dist/webScraper-pKzdXhfI.d.ts +46 -0
- package/dist/webScraper-yBcYOHoL.d.cts +46 -0
- package/package.json +64 -0
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
// src/academic/semanticScholar.ts
|
|
4
|
+
var AcademicPaperSchema = z.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
title: z.string(),
|
|
7
|
+
abstract: z.string().optional(),
|
|
8
|
+
authors: z.array(z.string()).default([]),
|
|
9
|
+
year: z.number().optional(),
|
|
10
|
+
citationCount: z.number().default(0),
|
|
11
|
+
venue: z.string().optional(),
|
|
12
|
+
doi: z.string().optional(),
|
|
13
|
+
url: z.string().optional(),
|
|
14
|
+
pdfUrl: z.string().optional(),
|
|
15
|
+
tldr: z.string().optional(),
|
|
16
|
+
fieldsOfStudy: z.array(z.string()).default([])
|
|
17
|
+
});
|
|
18
|
+
var AcademicSearchEngine = class {
|
|
19
|
+
apiKey;
|
|
20
|
+
customAdapter;
|
|
21
|
+
constructor(options = {}) {
|
|
22
|
+
if (typeof options === "string") {
|
|
23
|
+
this.apiKey = options;
|
|
24
|
+
} else {
|
|
25
|
+
this.apiKey = options.apiKey || process.env.SEMANTIC_SCHOLAR_API_KEY;
|
|
26
|
+
this.customAdapter = options.customAdapter;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
setCustomAdapter(adapter) {
|
|
30
|
+
this.customAdapter = adapter;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Search academic papers across Semantic Scholar with OpenAlex fallback or Custom Adapter
|
|
34
|
+
*/
|
|
35
|
+
async searchPapers(query, options = {}) {
|
|
36
|
+
const adapter = options.customAdapter || this.customAdapter;
|
|
37
|
+
if (adapter) {
|
|
38
|
+
try {
|
|
39
|
+
const customPapers = await adapter.searchPapers(query, { limit: options.limit, yearRange: options.yearRange });
|
|
40
|
+
if (Array.isArray(customPapers) && customPapers.length > 0) {
|
|
41
|
+
return customPapers;
|
|
42
|
+
}
|
|
43
|
+
} catch (e) {
|
|
44
|
+
console.warn("[AcademicSearchEngine] Custom academic adapter failed:", e?.message || e);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const limit = options.limit ?? 5;
|
|
48
|
+
const papers = [];
|
|
49
|
+
try {
|
|
50
|
+
const apiKey = options.apiKey || this.apiKey;
|
|
51
|
+
const headers = { "Content-Type": "application/json" };
|
|
52
|
+
if (apiKey) {
|
|
53
|
+
headers["x-api-key"] = apiKey;
|
|
54
|
+
}
|
|
55
|
+
const params = new URLSearchParams({
|
|
56
|
+
query,
|
|
57
|
+
limit: limit.toString(),
|
|
58
|
+
fields: "paperId,title,abstract,authors,year,citationCount,venue,externalIds,url,openAccessPdf,tldr,fieldsOfStudy"
|
|
59
|
+
});
|
|
60
|
+
if (options.yearRange) {
|
|
61
|
+
params.append("year", options.yearRange);
|
|
62
|
+
}
|
|
63
|
+
const res = await fetch(`https://api.semanticscholar.org/graph/v1/paper/search?${params.toString()}`, {
|
|
64
|
+
headers,
|
|
65
|
+
signal: AbortSignal.timeout(6e3)
|
|
66
|
+
});
|
|
67
|
+
if (res.ok) {
|
|
68
|
+
const data = await res.json();
|
|
69
|
+
if (Array.isArray(data?.data)) {
|
|
70
|
+
for (const item of data.data) {
|
|
71
|
+
papers.push({
|
|
72
|
+
id: item.paperId || `s2-${Math.random().toString(36).slice(2, 8)}`,
|
|
73
|
+
title: item.title || "Untitled",
|
|
74
|
+
abstract: item.abstract,
|
|
75
|
+
authors: Array.isArray(item.authors) ? item.authors.map((a) => a.name) : [],
|
|
76
|
+
year: item.year,
|
|
77
|
+
citationCount: item.citationCount || 0,
|
|
78
|
+
venue: item.venue,
|
|
79
|
+
doi: item.externalIds?.DOI,
|
|
80
|
+
url: item.url,
|
|
81
|
+
pdfUrl: item.openAccessPdf?.url,
|
|
82
|
+
tldr: item.tldr?.text,
|
|
83
|
+
fieldsOfStudy: item.fieldsOfStudy || ["Computer Science"]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
if (papers.length > 0) return papers;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
} catch (e) {
|
|
90
|
+
console.warn("[AcademicSearchEngine] Semantic Scholar failed:", e?.message || e);
|
|
91
|
+
}
|
|
92
|
+
try {
|
|
93
|
+
const res = await fetch(`https://api.openalex.org/works?search=${encodeURIComponent(query)}&per-page=${limit}`, {
|
|
94
|
+
headers: { "User-Agent": "OrchableComposer/1.0 (mailto:team@orchable.app)" },
|
|
95
|
+
signal: AbortSignal.timeout(6e3)
|
|
96
|
+
});
|
|
97
|
+
if (res.ok) {
|
|
98
|
+
const data = await res.json();
|
|
99
|
+
if (Array.isArray(data?.results)) {
|
|
100
|
+
for (const item of data.results) {
|
|
101
|
+
papers.push({
|
|
102
|
+
id: item.id || `oa-${Math.random().toString(36).slice(2, 8)}`,
|
|
103
|
+
title: item.title || "Untitled",
|
|
104
|
+
abstract: item.abstract_inverted_index ? "Abstract indexed" : void 0,
|
|
105
|
+
authors: Array.isArray(item.authorships) ? item.authorships.map((a) => a.author?.display_name).filter(Boolean) : [],
|
|
106
|
+
year: item.publication_year,
|
|
107
|
+
citationCount: item.cited_by_count || 0,
|
|
108
|
+
venue: item.primary_location?.source?.display_name,
|
|
109
|
+
doi: item.doi,
|
|
110
|
+
url: item.doi || item.id,
|
|
111
|
+
pdfUrl: item.open_access?.oa_url,
|
|
112
|
+
fieldsOfStudy: ["Computer Science"]
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
} catch (e) {
|
|
118
|
+
console.warn("[AcademicSearchEngine] OpenAlex failed:", e?.message || e);
|
|
119
|
+
}
|
|
120
|
+
return papers;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
// src/academic/cs2023Taxonomy.ts
|
|
125
|
+
var CS2023_KNOWLEDGE_AREAS = {
|
|
126
|
+
AL: {
|
|
127
|
+
code: "AL",
|
|
128
|
+
name: "Algorithmic Foundations",
|
|
129
|
+
description: "Design and analysis of algorithms, computational complexity, and problem solving.",
|
|
130
|
+
coreTopics: ["Asymptotic Analysis", "Divide-and-Conquer", "Dynamic Programming", "Graph Algorithms", "NP-Completeness"]
|
|
131
|
+
},
|
|
132
|
+
AR: {
|
|
133
|
+
code: "AR",
|
|
134
|
+
name: "Architecture and Organization",
|
|
135
|
+
description: "Hardware architecture, assembly, memory hierarchy, pipelining, and system bus.",
|
|
136
|
+
coreTopics: ["Digital Logic", "Memory Hierarchy & Cache", "Instruction Set Architecture (ISA)", "Interfacing & I/O"]
|
|
137
|
+
},
|
|
138
|
+
AI: {
|
|
139
|
+
code: "AI",
|
|
140
|
+
name: "Artificial Intelligence & Machine Learning",
|
|
141
|
+
description: "Neural networks, search algorithms, knowledge representation, reinforcement learning, and LLMs.",
|
|
142
|
+
coreTopics: ["Supervised Learning", "Deep Learning & Transformers", "Search & Optimization", "AI Ethics & Alignment"]
|
|
143
|
+
},
|
|
144
|
+
OS: {
|
|
145
|
+
code: "OS",
|
|
146
|
+
name: "Operating Systems",
|
|
147
|
+
description: "Process management, concurrency, virtual memory, file systems, and device drivers.",
|
|
148
|
+
coreTopics: ["Concurrency & Synchronization", "Scheduling & Virtual Memory", "File Systems & Storage", "Security & Protection"]
|
|
149
|
+
},
|
|
150
|
+
PDC: {
|
|
151
|
+
code: "PDC",
|
|
152
|
+
name: "Parallel and Distributed Computing",
|
|
153
|
+
description: "Multi-threading, actor model, async programming, distributed consensus, and cloud scaling.",
|
|
154
|
+
coreTopics: ["Async/Await & Futures", "Actor Model & Message Passing", "Shared Memory vs Message Passing", "Distributed Systems & Consistency"]
|
|
155
|
+
},
|
|
156
|
+
PL: {
|
|
157
|
+
code: "PL",
|
|
158
|
+
name: "Programming Languages",
|
|
159
|
+
description: "Language paradigms, type systems, memory safety, compilers, and runtime environments.",
|
|
160
|
+
coreTopics: ["Functional & OOP Paradigms", "Static & Dynamic Typing", "Memory Safety & Ownership", "Language Runtimes"]
|
|
161
|
+
},
|
|
162
|
+
SE: {
|
|
163
|
+
code: "SE",
|
|
164
|
+
name: "Software Engineering",
|
|
165
|
+
description: "Software lifecycle, architecture, design patterns, testing, CI/CD, and agile methodologies.",
|
|
166
|
+
coreTopics: ["Design Patterns", "Refactoring & Clean Code", "Automated Testing (TDD/E2E)", "DevOps & CI/CD"]
|
|
167
|
+
},
|
|
168
|
+
SEC: {
|
|
169
|
+
code: "SEC",
|
|
170
|
+
name: "Security & Cryptography",
|
|
171
|
+
description: "Authentication, cryptography, secure coding, threat modeling, and network defense.",
|
|
172
|
+
coreTopics: ["Symmetric & Asymmetric Encryption", "OAuth & JWT Auth", "Secure Coding & Vulnerabilities", "Identity & Access Management"]
|
|
173
|
+
},
|
|
174
|
+
SDF: {
|
|
175
|
+
code: "SDF",
|
|
176
|
+
name: "Software Development Fundamentals",
|
|
177
|
+
description: "Core programming constructs, data structures, debugging, and modularization.",
|
|
178
|
+
coreTopics: ["Variables, Loops & Control Flow", "Data Structures (Arrays, Lists, Trees)", "Debugging & Version Control", "OOP & Modular Design"]
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
function mapTopicToCS2023(topic) {
|
|
182
|
+
const t = topic.toLowerCase();
|
|
183
|
+
if (t.includes("concurren") || t.includes("async") || t.includes("actor") || t.includes("thread") || t.includes("distributed")) {
|
|
184
|
+
return { area: CS2023_KNOWLEDGE_AREAS.PDC, matchConfidence: 0.95 };
|
|
185
|
+
}
|
|
186
|
+
if (t.includes("ai") || t.includes("machine learning") || t.includes("deep learning") || t.includes("robot") || t.includes("neural")) {
|
|
187
|
+
return { area: CS2023_KNOWLEDGE_AREAS.AI, matchConfidence: 0.95 };
|
|
188
|
+
}
|
|
189
|
+
if (t.includes("os") || t.includes("operating system") || t.includes("kernel") || t.includes("memory") || t.includes("linux")) {
|
|
190
|
+
return { area: CS2023_KNOWLEDGE_AREAS.OS, matchConfidence: 0.9 };
|
|
191
|
+
}
|
|
192
|
+
if (t.includes("security") || t.includes("auth") || t.includes("crypto") || t.includes("cyber")) {
|
|
193
|
+
return { area: CS2023_KNOWLEDGE_AREAS.SEC, matchConfidence: 0.9 };
|
|
194
|
+
}
|
|
195
|
+
if (t.includes("architecture") || t.includes("pattern") || t.includes("software engineer") || t.includes("clean code")) {
|
|
196
|
+
return { area: CS2023_KNOWLEDGE_AREAS.SE, matchConfidence: 0.85 };
|
|
197
|
+
}
|
|
198
|
+
if (t.includes("algorithm") || t.includes("data structure") || t.includes("tree") || t.includes("graph")) {
|
|
199
|
+
return { area: CS2023_KNOWLEDGE_AREAS.AL, matchConfidence: 0.9 };
|
|
200
|
+
}
|
|
201
|
+
if (t.includes("arduino") || t.includes("esp32") || t.includes("raspberry") || t.includes("hardware") || t.includes("circuit")) {
|
|
202
|
+
return { area: CS2023_KNOWLEDGE_AREAS.AR, matchConfidence: 0.9 };
|
|
203
|
+
}
|
|
204
|
+
return { area: CS2023_KNOWLEDGE_AREAS.SDF, matchConfidence: 0.7 };
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// src/academic/citationManager.ts
|
|
208
|
+
var CitationManager = class {
|
|
209
|
+
citations = /* @__PURE__ */ new Map();
|
|
210
|
+
addPaper(paper) {
|
|
211
|
+
const firstAuthor = paper.authors[0]?.split(" ").pop()?.toLowerCase() || "ref";
|
|
212
|
+
const year = paper.year || (/* @__PURE__ */ new Date()).getFullYear();
|
|
213
|
+
const key = `${firstAuthor}${year}${Math.random().toString(36).substring(2, 5)}`;
|
|
214
|
+
this.citations.set(key, {
|
|
215
|
+
key,
|
|
216
|
+
title: paper.title,
|
|
217
|
+
authors: paper.authors,
|
|
218
|
+
year: paper.year,
|
|
219
|
+
url: paper.url,
|
|
220
|
+
doi: paper.doi,
|
|
221
|
+
venue: paper.venue
|
|
222
|
+
});
|
|
223
|
+
return key;
|
|
224
|
+
}
|
|
225
|
+
getBibTeX() {
|
|
226
|
+
const entries = [];
|
|
227
|
+
for (const [key, item] of this.citations.entries()) {
|
|
228
|
+
const authorsStr = item.authors.length > 0 ? item.authors.join(" and ") : "Unknown";
|
|
229
|
+
entries.push(`@article{${key},
|
|
230
|
+
title = {${item.title}},
|
|
231
|
+
author = {${authorsStr}},
|
|
232
|
+
year = {${item.year || "nodate"}},
|
|
233
|
+
journal = {${item.venue || "Technical Reference"}},
|
|
234
|
+
${item.doi ? `doi = {${item.doi}},` : ""}
|
|
235
|
+
${item.url ? `url = {${item.url}},` : ""}
|
|
236
|
+
}`);
|
|
237
|
+
}
|
|
238
|
+
return entries.join("\n\n");
|
|
239
|
+
}
|
|
240
|
+
getMarkdownFootnotes() {
|
|
241
|
+
const lines = ["## References & Academic Citations\n"];
|
|
242
|
+
let idx = 1;
|
|
243
|
+
for (const [, item] of this.citations.entries()) {
|
|
244
|
+
const authorsStr = item.authors.length > 0 ? item.authors.join(", ") : "Unknown Authors";
|
|
245
|
+
const linkStr = item.url ? ` [Link](${item.url})` : "";
|
|
246
|
+
const doiStr = item.doi ? ` (DOI: ${item.doi})` : "";
|
|
247
|
+
lines.push(`[^${idx}]: **${item.title}**. ${authorsStr} (${item.year || "n.d."}). *${item.venue || "Technical Ground Truth"}*${doiStr}.${linkStr}`);
|
|
248
|
+
idx++;
|
|
249
|
+
}
|
|
250
|
+
return lines.join("\n");
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
// src/academic/literatureReview.ts
|
|
255
|
+
var LiteratureReviewSynthesizer = class {
|
|
256
|
+
synthesize(topic, papers, cs2023Area) {
|
|
257
|
+
const citationManager = new CitationManager();
|
|
258
|
+
const sotaMatrix = [];
|
|
259
|
+
for (const paper of papers) {
|
|
260
|
+
citationManager.addPaper(paper);
|
|
261
|
+
sotaMatrix.push({
|
|
262
|
+
approach: paper.title.split(":")[0] || paper.title.slice(0, 30),
|
|
263
|
+
sourcePaper: `${paper.authors[0] || "Unknown"} (${paper.year || "n.d."})`,
|
|
264
|
+
keyStrengths: paper.tldr || (paper.abstract ? paper.abstract.slice(0, 120) + "..." : "Foundational theoretical concept"),
|
|
265
|
+
limitations: "Context-specific or hardware-constrained",
|
|
266
|
+
relevanceToCourse: `Informs pedagogical sequencing and theoretical grounding for ${topic}.`
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
const mdLines = [
|
|
270
|
+
`# \u{1F393} Academic Literature Review & Theoretical Ground Truth`,
|
|
271
|
+
`> **Topic:** ${topic}`,
|
|
272
|
+
cs2023Area ? `> **IEEE/ACM CS2023 Standard Area:** \`${cs2023Area.code}\` \u2014 *${cs2023Area.name}*
|
|
273
|
+
` : "",
|
|
274
|
+
`## 1. Executive Summary`,
|
|
275
|
+
`Synthesized from **${papers.length} peer-reviewed works** and international curricular standards directly relevant to \`${topic}\`.`,
|
|
276
|
+
`
|
|
277
|
+
## 2. State-of-the-Art (SOTA) Comparison Matrix`,
|
|
278
|
+
`| Paradigm / Approach | Source Reference | Core Strengths | Constraints & Limitations | Pedagogical Application |`,
|
|
279
|
+
`|---|---|---|---|---|`,
|
|
280
|
+
...sotaMatrix.map((r) => `| **${r.approach}** | ${r.sourcePaper} | ${r.keyStrengths} | ${r.limitations} | ${r.relevanceToCourse} |`),
|
|
281
|
+
`
|
|
282
|
+
## 3. Core Theoretical Foundations`,
|
|
283
|
+
`- **Academic Rigor:** Curriculum models strictly adhere to peer-reviewed principles.`,
|
|
284
|
+
`- **CS2023 Competency Alignment:** Maps directly to IEEE/ACM recommended graduate competencies.`,
|
|
285
|
+
`- **Theory-to-Practice Bridge:** Direct translational pipeline from formal papers to executable lab operations.`,
|
|
286
|
+
`
|
|
287
|
+
## 4. Open Pedagogical & Research Questions`,
|
|
288
|
+
`- How to distill complex formal mechanisms for high-school / undergraduate learners without diluting accuracy?`,
|
|
289
|
+
`- What automated verification setups validate theoretical guarantees in real-world student code?`,
|
|
290
|
+
`
|
|
291
|
+
${citationManager.getMarkdownFootnotes()}`
|
|
292
|
+
];
|
|
293
|
+
return {
|
|
294
|
+
topic,
|
|
295
|
+
cs2023Area,
|
|
296
|
+
totalPapersFound: papers.length,
|
|
297
|
+
papers,
|
|
298
|
+
sotaMatrix,
|
|
299
|
+
keyTheoreticalFoundations: [
|
|
300
|
+
"Immutable state guarantees and memory safety semantics",
|
|
301
|
+
"Dataflow and message-passing distributed concurrency models",
|
|
302
|
+
"Empirical latency and throughput benchmark validation"
|
|
303
|
+
],
|
|
304
|
+
openResearchQuestions: [
|
|
305
|
+
"How to distill complex formal mechanisms for high-school / undergraduate learners without diluting accuracy?",
|
|
306
|
+
"What automated verification setups validate theoretical guarantees in real-world student code?"
|
|
307
|
+
],
|
|
308
|
+
markdownReport: mdLines.join("\n"),
|
|
309
|
+
bibtex: citationManager.getBibTeX()
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
export { AcademicPaperSchema, AcademicSearchEngine, CS2023_KNOWLEDGE_AREAS, CitationManager, LiteratureReviewSynthesizer, mapTopicToCS2023 };
|
|
315
|
+
//# sourceMappingURL=chunk-47L7ZHMY.js.map
|
|
316
|
+
//# sourceMappingURL=chunk-47L7ZHMY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/academic/semanticScholar.ts","../src/academic/cs2023Taxonomy.ts","../src/academic/citationManager.ts","../src/academic/literatureReview.ts"],"names":[],"mappings":";;;AAGO,IAAM,mBAAA,GAAsB,EAAE,MAAA,CAAO;AAAA,EAC1C,EAAA,EAAI,EAAE,MAAA,EAAO;AAAA,EACb,KAAA,EAAO,EAAE,MAAA,EAAO;AAAA,EAChB,QAAA,EAAU,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC9B,OAAA,EAAS,EAAE,KAAA,CAAM,CAAA,CAAE,QAAQ,CAAA,CAAE,OAAA,CAAQ,EAAE,CAAA;AAAA,EACvC,IAAA,EAAM,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC1B,aAAA,EAAe,CAAA,CAAE,MAAA,EAAO,CAAE,QAAQ,CAAC,CAAA;AAAA,EACnC,KAAA,EAAO,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC3B,GAAA,EAAK,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EACzB,GAAA,EAAK,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EACzB,MAAA,EAAQ,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC5B,IAAA,EAAM,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC1B,aAAA,EAAe,EAAE,KAAA,CAAM,CAAA,CAAE,QAAQ,CAAA,CAAE,OAAA,CAAQ,EAAE;AAC/C,CAAC;AAeM,IAAM,uBAAN,MAA2B;AAAA,EACxB,MAAA;AAAA,EACA,aAAA;AAAA,EAER,WAAA,CAAY,OAAA,GAAqF,EAAC,EAAG;AACnG,IAAA,IAAI,OAAO,YAAY,QAAA,EAAU;AAC/B,MAAA,IAAA,CAAK,MAAA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AAA,CAAA;AAAA,MAChI;AAAA,+CAAA,CAAA;AAAA,MACA,CAAA,iHAAA,CAAA;AAAA,MACA,CAAA,qBAAA,CAAA;AAAA,MACA,GAAG,UAAA,CAAW,GAAA,CAAI,OAAK,CAAA,IAAA,EAAO,CAAA,CAAE,QAAQ,CAAA,KAAA,EAAQ,CAAA,CAAE,WAAW,CAAA,GAAA,EAAM,CAAA,CAAE,YAAY,CAAA,GAAA,EAAM,CAAA,CAAE,WAAW,CAAA,GAAA,EAAM,CAAA,CAAE,iBAAiB,CAAA,EAAA,CAAI,CAAA;AAAA,MACjI;AAAA,kCAAA,CAAA;AAAA,MACA,CAAA,oFAAA,CAAA;AAAA,MACA,CAAA,+FAAA,CAAA;AAAA,MACA,CAAA,+GAAA,CAAA;AAAA,MACA;AAAA,2CAAA,CAAA;AAAA,MACA,CAAA,8GAAA,CAAA;AAAA,MACA,CAAA,gGAAA,CAAA;AAAA,MACA;AAAA,EAAK,eAAA,CAAgB,sBAAsB,CAAA;AAAA,KAC7C;AAEA,IAAA,OAAO;AAAA,MACL,KAAA;AAAA,MACA,UAAA;AAAA,MACA,kBAAkB,MAAA,CAAO,MAAA;AAAA,MACzB,MAAA;AAAA,MACA,UAAA;AAAA,MACA,yBAAA,EAA2B;AAAA,QACzB,wDAAA;AAAA,QACA,6DAAA;AAAA,QACA;AAAA,OACF;AAAA,MACA,qBAAA,EAAuB;AAAA,QACrB,8GAAA;AAAA,QACA;AAAA,OACF;AAAA,MACA,cAAA,EAAgB,OAAA,CAAQ,IAAA,CAAK,IAAI,CAAA;AAAA,MACjC,MAAA,EAAQ,gBAAgB,SAAA;AAAU,KACpC;AAAA,EACF;AACF","file":"chunk-47L7ZHMY.js","sourcesContent":["import { z } from 'zod';\nimport { CustomAcademicSearchAdapter } from '../config/researchConfig';\n\nexport const AcademicPaperSchema = z.object({\n id: z.string(),\n title: z.string(),\n abstract: z.string().optional(),\n authors: z.array(z.string()).default([]),\n year: z.number().optional(),\n citationCount: z.number().default(0),\n venue: z.string().optional(),\n doi: z.string().optional(),\n url: z.string().optional(),\n pdfUrl: z.string().optional(),\n tldr: z.string().optional(),\n fieldsOfStudy: z.array(z.string()).default([]),\n});\n\nexport type AcademicPaper = z.infer<typeof AcademicPaperSchema>;\n\nexport interface AcademicSearchOptions {\n limit?: number;\n yearRange?: string; // e.g. \"2020-2026\"\n fieldsOfStudy?: string[];\n apiKey?: string;\n customAdapter?: CustomAcademicSearchAdapter;\n}\n\n/**\n * Semantic Scholar & OpenAlex Academic Search Engine with Custom Adapter Support\n */\nexport class AcademicSearchEngine {\n private apiKey?: string;\n private customAdapter?: CustomAcademicSearchAdapter;\n\n constructor(options: { apiKey?: string; customAdapter?: CustomAcademicSearchAdapter } | string = {}) {\n if (typeof options === 'string') {\n this.apiKey = options;\n } else {\n this.apiKey = options.apiKey || process.env.SEMANTIC_SCHOLAR_API_KEY;\n this.customAdapter = options.customAdapter;\n }\n }\n\n setCustomAdapter(adapter: CustomAcademicSearchAdapter) {\n this.customAdapter = adapter;\n }\n\n /**\n * Search academic papers across Semantic Scholar with OpenAlex fallback or Custom Adapter\n */\n async searchPapers(query: string, options: AcademicSearchOptions = {}): Promise<AcademicPaper[]> {\n const adapter = options.customAdapter || this.customAdapter;\n\n // 0. Custom Academic Adapter\n if (adapter) {\n try {\n const customPapers = await adapter.searchPapers(query, { limit: options.limit, yearRange: options.yearRange });\n if (Array.isArray(customPapers) && customPapers.length > 0) {\n return customPapers;\n }\n } catch (e: any) {\n console.warn('[AcademicSearchEngine] Custom academic adapter failed:', e?.message || e);\n }\n }\n\n const limit = options.limit ?? 5;\n const papers: AcademicPaper[] = [];\n\n // 1. Try Semantic Scholar API\n try {\n const apiKey = options.apiKey || this.apiKey;\n const headers: Record<string, string> = { 'Content-Type': 'application/json' };\n if (apiKey) {\n headers['x-api-key'] = apiKey;\n }\n\n const params = new URLSearchParams({\n query,\n limit: limit.toString(),\n fields: 'paperId,title,abstract,authors,year,citationCount,venue,externalIds,url,openAccessPdf,tldr,fieldsOfStudy',\n });\n\n if (options.yearRange) {\n params.append('year', options.yearRange);\n }\n\n const res = await fetch(`https://api.semanticscholar.org/graph/v1/paper/search?${params.toString()}`, {\n headers,\n signal: AbortSignal.timeout(6000),\n });\n\n if (res.ok) {\n const data = await res.json();\n if (Array.isArray(data?.data)) {\n for (const item of data.data) {\n papers.push({\n id: item.paperId || `s2-${Math.random().toString(36).slice(2, 8)}`,\n title: item.title || 'Untitled',\n abstract: item.abstract,\n authors: Array.isArray(item.authors) ? item.authors.map((a: any) => a.name) : [],\n year: item.year,\n citationCount: item.citationCount || 0,\n venue: item.venue,\n doi: item.externalIds?.DOI,\n url: item.url,\n pdfUrl: item.openAccessPdf?.url,\n tldr: item.tldr?.text,\n fieldsOfStudy: item.fieldsOfStudy || ['Computer Science'],\n });\n }\n if (papers.length > 0) return papers;\n }\n }\n } catch (e: any) {\n console.warn('[AcademicSearchEngine] Semantic Scholar failed:', e?.message || e);\n }\n\n // 2. OpenAlex Fallback API (Zero-Key Open Academic Database)\n try {\n const res = await fetch(`https://api.openalex.org/works?search=${encodeURIComponent(query)}&per-page=${limit}`, {\n headers: { 'User-Agent': 'OrchableComposer/1.0 (mailto:team@orchable.app)' },\n signal: AbortSignal.timeout(6000),\n });\n\n if (res.ok) {\n const data = await res.json();\n if (Array.isArray(data?.results)) {\n for (const item of data.results) {\n papers.push({\n id: item.id || `oa-${Math.random().toString(36).slice(2, 8)}`,\n title: item.title || 'Untitled',\n abstract: item.abstract_inverted_index ? 'Abstract indexed' : undefined,\n authors: Array.isArray(item.authorships) ? item.authorships.map((a: any) => a.author?.display_name).filter(Boolean) : [],\n year: item.publication_year,\n citationCount: item.cited_by_count || 0,\n venue: item.primary_location?.source?.display_name,\n doi: item.doi,\n url: item.doi || item.id,\n pdfUrl: item.open_access?.oa_url,\n fieldsOfStudy: ['Computer Science'],\n });\n }\n }\n }\n } catch (e: any) {\n console.warn('[AcademicSearchEngine] OpenAlex failed:', e?.message || e);\n }\n\n return papers;\n }\n}\n","export interface CS2023KnowledgeArea {\n code: string;\n name: string;\n description: string;\n coreTopics: string[];\n}\n\nexport const CS2023_KNOWLEDGE_AREAS: Record<string, CS2023KnowledgeArea> = {\n AL: {\n code: 'AL',\n name: 'Algorithmic Foundations',\n description: 'Design and analysis of algorithms, computational complexity, and problem solving.',\n coreTopics: ['Asymptotic Analysis', 'Divide-and-Conquer', 'Dynamic Programming', 'Graph Algorithms', 'NP-Completeness']\n },\n AR: {\n code: 'AR',\n name: 'Architecture and Organization',\n description: 'Hardware architecture, assembly, memory hierarchy, pipelining, and system bus.',\n coreTopics: ['Digital Logic', 'Memory Hierarchy & Cache', 'Instruction Set Architecture (ISA)', 'Interfacing & I/O']\n },\n AI: {\n code: 'AI',\n name: 'Artificial Intelligence & Machine Learning',\n description: 'Neural networks, search algorithms, knowledge representation, reinforcement learning, and LLMs.',\n coreTopics: ['Supervised Learning', 'Deep Learning & Transformers', 'Search & Optimization', 'AI Ethics & Alignment']\n },\n OS: {\n code: 'OS',\n name: 'Operating Systems',\n description: 'Process management, concurrency, virtual memory, file systems, and device drivers.',\n coreTopics: ['Concurrency & Synchronization', 'Scheduling & Virtual Memory', 'File Systems & Storage', 'Security & Protection']\n },\n PDC: {\n code: 'PDC',\n name: 'Parallel and Distributed Computing',\n description: 'Multi-threading, actor model, async programming, distributed consensus, and cloud scaling.',\n coreTopics: ['Async/Await & Futures', 'Actor Model & Message Passing', 'Shared Memory vs Message Passing', 'Distributed Systems & Consistency']\n },\n PL: {\n code: 'PL',\n name: 'Programming Languages',\n description: 'Language paradigms, type systems, memory safety, compilers, and runtime environments.',\n coreTopics: ['Functional & OOP Paradigms', 'Static & Dynamic Typing', 'Memory Safety & Ownership', 'Language Runtimes']\n },\n SE: {\n code: 'SE',\n name: 'Software Engineering',\n description: 'Software lifecycle, architecture, design patterns, testing, CI/CD, and agile methodologies.',\n coreTopics: ['Design Patterns', 'Refactoring & Clean Code', 'Automated Testing (TDD/E2E)', 'DevOps & CI/CD']\n },\n SEC: {\n code: 'SEC',\n name: 'Security & Cryptography',\n description: 'Authentication, cryptography, secure coding, threat modeling, and network defense.',\n coreTopics: ['Symmetric & Asymmetric Encryption', 'OAuth & JWT Auth', 'Secure Coding & Vulnerabilities', 'Identity & Access Management']\n },\n SDF: {\n code: 'SDF',\n name: 'Software Development Fundamentals',\n description: 'Core programming constructs, data structures, debugging, and modularization.',\n coreTopics: ['Variables, Loops & Control Flow', 'Data Structures (Arrays, Lists, Trees)', 'Debugging & Version Control', 'OOP & Modular Design']\n }\n};\n\n/**\n * Maps a course topic or syllabus keyword to IEEE/ACM CS2023 Knowledge Areas\n */\nexport function mapTopicToCS2023(topic: string): { area: CS2023KnowledgeArea; matchConfidence: number } {\n const t = topic.toLowerCase();\n\n if (t.includes('concurren') || t.includes('async') || t.includes('actor') || t.includes('thread') || t.includes('distributed')) {\n return { area: CS2023_KNOWLEDGE_AREAS.PDC!, matchConfidence: 0.95 };\n }\n if (t.includes('ai') || t.includes('machine learning') || t.includes('deep learning') || t.includes('robot') || t.includes('neural')) {\n return { area: CS2023_KNOWLEDGE_AREAS.AI!, matchConfidence: 0.95 };\n }\n if (t.includes('os') || t.includes('operating system') || t.includes('kernel') || t.includes('memory') || t.includes('linux')) {\n return { area: CS2023_KNOWLEDGE_AREAS.OS!, matchConfidence: 0.9 };\n }\n if (t.includes('security') || t.includes('auth') || t.includes('crypto') || t.includes('cyber')) {\n return { area: CS2023_KNOWLEDGE_AREAS.SEC!, matchConfidence: 0.9 };\n }\n if (t.includes('architecture') || t.includes('pattern') || t.includes('software engineer') || t.includes('clean code')) {\n return { area: CS2023_KNOWLEDGE_AREAS.SE!, matchConfidence: 0.85 };\n }\n if (t.includes('algorithm') || t.includes('data structure') || t.includes('tree') || t.includes('graph')) {\n return { area: CS2023_KNOWLEDGE_AREAS.AL!, matchConfidence: 0.9 };\n }\n if (t.includes('arduino') || t.includes('esp32') || t.includes('raspberry') || t.includes('hardware') || t.includes('circuit')) {\n return { area: CS2023_KNOWLEDGE_AREAS.AR!, matchConfidence: 0.9 };\n }\n\n return { area: CS2023_KNOWLEDGE_AREAS.SDF!, matchConfidence: 0.7 };\n}\n","import { AcademicPaper } from './semanticScholar';\n\nexport interface CitationItem {\n key: string;\n title: string;\n authors: string[];\n year?: number;\n url?: string;\n doi?: string;\n venue?: string;\n}\n\n/**\n * Manages academic citations, BibTeX generation, and Markdown inline footnotes\n */\nexport class CitationManager {\n private citations: Map<string, CitationItem> = new Map();\n\n addPaper(paper: AcademicPaper): string {\n const firstAuthor = paper.authors[0]?.split(' ').pop()?.toLowerCase() || 'ref';\n const year = paper.year || new Date().getFullYear();\n const key = `${firstAuthor}${year}${Math.random().toString(36).substring(2, 5)}`;\n\n this.citations.set(key, {\n key,\n title: paper.title,\n authors: paper.authors,\n year: paper.year,\n url: paper.url,\n doi: paper.doi,\n venue: paper.venue,\n });\n\n return key;\n }\n\n getBibTeX(): string {\n const entries: string[] = [];\n\n for (const [key, item] of this.citations.entries()) {\n const authorsStr = item.authors.length > 0 ? item.authors.join(' and ') : 'Unknown';\n entries.push(`@article{${key},\n title = {${item.title}},\n author = {${authorsStr}},\n year = {${item.year || 'nodate'}},\n journal = {${item.venue || 'Technical Reference'}},\n ${item.doi ? `doi = {${item.doi}},` : ''}\n ${item.url ? `url = {${item.url}},` : ''}\n}`);\n }\n\n return entries.join('\\n\\n');\n }\n\n getMarkdownFootnotes(): string {\n const lines: string[] = ['## References & Academic Citations\\n'];\n let idx = 1;\n\n for (const [, item] of this.citations.entries()) {\n const authorsStr = item.authors.length > 0 ? item.authors.join(', ') : 'Unknown Authors';\n const linkStr = item.url ? ` [Link](${item.url})` : '';\n const doiStr = item.doi ? ` (DOI: ${item.doi})` : '';\n lines.push(`[^${idx}]: **${item.title}**. ${authorsStr} (${item.year || 'n.d.'}). *${item.venue || 'Technical Ground Truth'}*${doiStr}.${linkStr}`);\n idx++;\n }\n\n return lines.join('\\n');\n }\n}\n","import { AcademicPaper } from './semanticScholar';\nimport { CitationManager } from './citationManager';\nimport { CS2023KnowledgeArea } from './cs2023Taxonomy';\n\nexport interface SotaComparisonRow {\n approach: string;\n sourcePaper: string;\n keyStrengths: string;\n limitations: string;\n relevanceToCourse: string;\n}\n\nexport interface LiteratureReviewReport {\n topic: string;\n cs2023Area?: CS2023KnowledgeArea;\n totalPapersFound: number;\n papers: AcademicPaper[];\n sotaMatrix: SotaComparisonRow[];\n keyTheoreticalFoundations: string[];\n openResearchQuestions: string[];\n markdownReport: string;\n bibtex: string;\n}\n\n/**\n * Synthesizes academic literature, SOTA matrices, and course theoretical foundations (English Canonical)\n */\nexport class LiteratureReviewSynthesizer {\n synthesize(\n topic: string,\n papers: AcademicPaper[],\n cs2023Area?: CS2023KnowledgeArea\n ): LiteratureReviewReport {\n const citationManager = new CitationManager();\n const sotaMatrix: SotaComparisonRow[] = [];\n\n for (const paper of papers) {\n citationManager.addPaper(paper);\n sotaMatrix.push({\n approach: paper.title.split(':')[0] || paper.title.slice(0, 30),\n sourcePaper: `${paper.authors[0] || 'Unknown'} (${paper.year || 'n.d.'})`,\n keyStrengths: paper.tldr || (paper.abstract ? paper.abstract.slice(0, 120) + '...' : 'Foundational theoretical concept'),\n limitations: 'Context-specific or hardware-constrained',\n relevanceToCourse: `Informs pedagogical sequencing and theoretical grounding for ${topic}.`,\n });\n }\n\n const mdLines: string[] = [\n `# 🎓 Academic Literature Review & Theoretical Ground Truth`,\n `> **Topic:** ${topic}`,\n cs2023Area ? `> **IEEE/ACM CS2023 Standard Area:** \\`${cs2023Area.code}\\` — *${cs2023Area.name}*\\n` : '',\n `## 1. Executive Summary`,\n `Synthesized from **${papers.length} peer-reviewed works** and international curricular standards directly relevant to \\`${topic}\\`.`,\n `\\n## 2. State-of-the-Art (SOTA) Comparison Matrix`,\n `| Paradigm / Approach | Source Reference | Core Strengths | Constraints & Limitations | Pedagogical Application |`,\n `|---|---|---|---|---|`,\n ...sotaMatrix.map(r => `| **${r.approach}** | ${r.sourcePaper} | ${r.keyStrengths} | ${r.limitations} | ${r.relevanceToCourse} |`),\n `\\n## 3. Core Theoretical Foundations`,\n `- **Academic Rigor:** Curriculum models strictly adhere to peer-reviewed principles.`,\n `- **CS2023 Competency Alignment:** Maps directly to IEEE/ACM recommended graduate competencies.`,\n `- **Theory-to-Practice Bridge:** Direct translational pipeline from formal papers to executable lab operations.`,\n `\\n## 4. Open Pedagogical & Research Questions`,\n `- How to distill complex formal mechanisms for high-school / undergraduate learners without diluting accuracy?`,\n `- What automated verification setups validate theoretical guarantees in real-world student code?`,\n `\\n${citationManager.getMarkdownFootnotes()}`\n ];\n\n return {\n topic,\n cs2023Area,\n totalPapersFound: papers.length,\n papers,\n sotaMatrix,\n keyTheoreticalFoundations: [\n 'Immutable state guarantees and memory safety semantics',\n 'Dataflow and message-passing distributed concurrency models',\n 'Empirical latency and throughput benchmark validation'\n ],\n openResearchQuestions: [\n 'How to distill complex formal mechanisms for high-school / undergraduate learners without diluting accuracy?',\n 'What automated verification setups validate theoretical guarantees in real-world student code?'\n ],\n markdownReport: mdLines.join('\\n'),\n bibtex: citationManager.getBibTeX(),\n };\n }\n}\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// src/academic/arxivClient.ts
|
|
2
|
+
var ArXivSearchEngine = class {
|
|
3
|
+
/**
|
|
4
|
+
* Search ArXiv repository using the public atom XML API
|
|
5
|
+
*/
|
|
6
|
+
async search(query, maxResults = 5) {
|
|
7
|
+
const papers = [];
|
|
8
|
+
try {
|
|
9
|
+
const url = `http://export.arxiv.org/api/query?search_query=all:${encodeURIComponent(query)}&start=0&max_results=${maxResults}&sortBy=relevance&sortOrder=descending`;
|
|
10
|
+
const res = await fetch(url, { signal: AbortSignal.timeout(1e4) });
|
|
11
|
+
if (res.ok) {
|
|
12
|
+
const xmlText = await res.text();
|
|
13
|
+
const entryMatches = xmlText.match(/<entry>[\s\S]*?<\/entry>/g) || [];
|
|
14
|
+
for (const entry of entryMatches) {
|
|
15
|
+
const idMatch = entry.match(/<id>([\s\S]*?)<\/id>/);
|
|
16
|
+
const titleMatch = entry.match(/<title>([\s\S]*?)<\/title>/);
|
|
17
|
+
const summaryMatch = entry.match(/<summary>([\s\S]*?)<\/summary>/);
|
|
18
|
+
const publishedMatch = entry.match(/<published>(\d{4})/);
|
|
19
|
+
const authorMatches = [...entry.matchAll(/<author>\s*<name>([\s\S]*?)<\/name>/g)].map((m) => m[1]?.trim()).filter(Boolean);
|
|
20
|
+
const arxivUrl = idMatch ? idMatch[1]?.trim() : "";
|
|
21
|
+
const pdfUrl = arxivUrl ? arxivUrl.replace("/abs/", "/pdf/") + ".pdf" : void 0;
|
|
22
|
+
if (titleMatch) {
|
|
23
|
+
papers.push({
|
|
24
|
+
id: arxivUrl || `arxiv-${Math.random().toString(36).substring(7)}`,
|
|
25
|
+
title: titleMatch[1]?.trim().replace(/\s+/g, " ") || "Untitled ArXiv Paper",
|
|
26
|
+
abstract: summaryMatch ? summaryMatch[1]?.trim().replace(/\s+/g, " ") : "",
|
|
27
|
+
authors: authorMatches,
|
|
28
|
+
year: publishedMatch ? parseInt(publishedMatch[1], 10) : (/* @__PURE__ */ new Date()).getFullYear(),
|
|
29
|
+
citationCount: 0,
|
|
30
|
+
venue: "arXiv preprint",
|
|
31
|
+
url: arxivUrl,
|
|
32
|
+
pdfUrl,
|
|
33
|
+
fieldsOfStudy: ["Computer Science", "AI & Machine Learning"]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
} catch (e) {
|
|
39
|
+
console.warn("[ArXivSearchEngine] ArXiv search failed:", e?.message || e);
|
|
40
|
+
}
|
|
41
|
+
return papers;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { ArXivSearchEngine };
|
|
46
|
+
//# sourceMappingURL=chunk-63X2HPCI.js.map
|
|
47
|
+
//# sourceMappingURL=chunk-63X2HPCI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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AAW,QAAA,CAAS,QAAQ,OAAA,EAAS,OAAO,IAAI,MAAA,GAAS,KAAA,CAAA;AAExE,UAAA,IAAI,UAAA,EAAY;AACd,YAAA,MAAA,CAAO,IAAA,CAAK;AAAA,cACV,EAAA,EAAI,QAAA,IAAY,CAAA,MAAA,EAAS,IAAA,CAAK,MAAA,EAAO,CAAE,QAAA,CAAS,EAAE,CAAA,CAAE,SAAA,CAAU,CAAC,CAAC,CAAA,CAAA;AAAA,cAChE,KAAA,EAAO,WAAW,CAAC,CAAA,EAAG,MAAK,CAAE,OAAA,CAAQ,MAAA,EAAQ,GAAG,CAAA,IAAK,sBAAA;AAAA,cACrD,QAAA,EAAU,YAAA,GAAe,YAAA,CAAa,CAAC,CAAA,EAAG,MAAK,CAAE,OAAA,CAAQ,MAAA,EAAQ,GAAG,CAAA,GAAI,EAAA;AAAA,cACxE,OAAA,EAAS,aAAA;AAAA,cACT,IAAA,EAAM,cAAA,GAAiB,QAAA,CAAS,cAAA,CAAe,CAAC,CAAA,EAAI,EAAE,CAAA,GAAA,iBAAI,IAAI,IAAA,EAAK,EAAE,WAAA,EAAY;AAAA,cACjF,aAAA,EAAe,CAAA;AAAA,cACf,KAAA,EAAO,gBAAA;AAAA,cACP,GAAA,EAAK,QAAA;AAAA,cACL,MAAA;AAAA,cACA,aAAA,EAAe,CAAC,kBAAA,EAAoB,uBAAuB;AAAA,aAC5D,CAAA;AAAA,UACH;AAAA,QACF;AAAA,MACF;AAAA,IACF,SAAS,CAAA,EAAQ;AACf,MAAA,OAAA,CAAQ,IAAA,CAAK,0CAAA,EAA4C,CAAA,EAAG,OAAA,IAAW,CAAC,CAAA;AAAA,IAC1E;AAEA,IAAA,OAAO,MAAA;AAAA,EACT;AACF","file":"chunk-63X2HPCI.js","sourcesContent":["import { AcademicPaper } from './semanticScholar';\n\n/**\n * ArXiv API Client for Deep AI & Computer Science Paper Discovery\n */\nexport class ArXivSearchEngine {\n /**\n * Search ArXiv repository using the public atom XML API\n */\n async search(query: string, maxResults = 5): Promise<AcademicPaper[]> {\n const papers: AcademicPaper[] = [];\n\n try {\n const url = `http://export.arxiv.org/api/query?search_query=all:${encodeURIComponent(query)}&start=0&max_results=${maxResults}&sortBy=relevance&sortOrder=descending`;\n const res = await fetch(url, { signal: AbortSignal.timeout(10000) });\n\n if (res.ok) {\n const xmlText = await res.text();\n const entryMatches = xmlText.match(/<entry>[\\s\\S]*?<\\/entry>/g) || [];\n\n for (const entry of entryMatches) {\n const idMatch = entry.match(/<id>([\\s\\S]*?)<\\/id>/);\n const titleMatch = entry.match(/<title>([\\s\\S]*?)<\\/title>/);\n const summaryMatch = entry.match(/<summary>([\\s\\S]*?)<\\/summary>/);\n const publishedMatch = entry.match(/<published>(\\d{4})/);\n const authorMatches = [...entry.matchAll(/<author>\\s*<name>([\\s\\S]*?)<\\/name>/g)].map(m => m[1]?.trim()).filter(Boolean);\n\n const arxivUrl = idMatch ? idMatch[1]?.trim() : '';\n const pdfUrl = arxivUrl ? arxivUrl.replace('/abs/', '/pdf/') + '.pdf' : undefined;\n\n if (titleMatch) {\n papers.push({\n id: arxivUrl || `arxiv-${Math.random().toString(36).substring(7)}`,\n title: titleMatch[1]?.trim().replace(/\\s+/g, ' ') || 'Untitled ArXiv Paper',\n abstract: summaryMatch ? summaryMatch[1]?.trim().replace(/\\s+/g, ' ') : '',\n authors: authorMatches,\n year: publishedMatch ? parseInt(publishedMatch[1]!, 10) : new Date().getFullYear(),\n citationCount: 0,\n venue: 'arXiv preprint',\n url: arxivUrl,\n pdfUrl,\n fieldsOfStudy: ['Computer Science', 'AI & Machine Learning']\n });\n }\n }\n }\n } catch (e: any) {\n console.warn('[ArXivSearchEngine] ArXiv search failed:', e?.message || e);\n }\n\n return papers;\n }\n}\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
// src/config/researchConfig.ts
|
|
4
|
+
var ResearchConfigSchema = z.object({
|
|
5
|
+
search: z.object({
|
|
6
|
+
preferredProvider: z.enum(["tavily", "exa", "searxng", "duckduckgo", "semantic_scholar", "openalex", "arxiv", "custom"]).default("tavily"),
|
|
7
|
+
fallbackChain: z.array(z.string()).default(["tavily", "exa", "duckduckgo"]),
|
|
8
|
+
apiKeys: z.object({
|
|
9
|
+
tavily: z.string().optional(),
|
|
10
|
+
exa: z.string().optional(),
|
|
11
|
+
semanticScholar: z.string().optional()
|
|
12
|
+
}).default({}),
|
|
13
|
+
searxngHost: z.string().optional(),
|
|
14
|
+
timeoutMs: z.number().default(12e3),
|
|
15
|
+
maxResultsPerQuery: z.number().default(5)
|
|
16
|
+
}).default({}),
|
|
17
|
+
crawler: z.object({
|
|
18
|
+
preferredProvider: z.enum(["jina", "crawl4ai", "defuddle", "direct", "custom"]).default("jina"),
|
|
19
|
+
fallbackChain: z.array(z.string()).default(["jina", "crawl4ai", "direct"]),
|
|
20
|
+
crawl4aiHost: z.string().default("http://localhost:11235"),
|
|
21
|
+
timeoutMs: z.number().default(15e3),
|
|
22
|
+
maxContentLength: z.number().default(1e5)
|
|
23
|
+
}).default({}),
|
|
24
|
+
quality: z.object({
|
|
25
|
+
minRelevanceScore: z.number().min(1).max(10).default(6),
|
|
26
|
+
requireCodeSnippets: z.boolean().default(false),
|
|
27
|
+
enableAntiHallucinationSweep: z.boolean().default(true)
|
|
28
|
+
}).default({})
|
|
29
|
+
});
|
|
30
|
+
var DEFAULT_RESEARCH_CONFIG = ResearchConfigSchema.parse({});
|
|
31
|
+
|
|
32
|
+
export { DEFAULT_RESEARCH_CONFIG, ResearchConfigSchema };
|
|
33
|
+
//# sourceMappingURL=chunk-67V2GJGK.js.map
|
|
34
|
+
//# sourceMappingURL=chunk-67V2GJGK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/config/researchConfig.ts"],"names":[],"mappings":";;;AAkBO,IAAM,oBAAA,GAAuB,EAAE,MAAA,CAAO;AAAA,EAC3C,MAAA,EAAQ,EAA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AAA,IACzE,YAAA,EAAc,CAAA,CAAE,MAAA,EAAO,CAAE,QAAQ,wBAAwB,CAAA;AAAA,IACzD,SAAA,EAAW,CAAA,CAAE,MAAA,EAAO,CAAE,QAAQ,IAAK,CAAA;AAAA,IACnC,gBAAA,EAAkB,CAAA,CAAE,MAAA,EAAO,CAAE,QAAQ,GAAM;AAAA,GAC5C,CAAA,CAAE,OAAA,CAAQ,EAAE,CAAA;AAAA,EACb,OAAA,EAAS,EAAE,MAAA,CAAO;AAAA,IAChB,iBAAA,EAAmB,CAAA,CAAE,MAAA,EAAO,CAAE,GAAA,CAAI,CAAC,CAAA,CAAE,GAAA,CAAI,EAAE,CAAA,CAAE,OAAA,CAAQ,CAAC,CAAA;AAAA,IACtD,mBAAA,EAAqB,CAAA,CAAE,OAAA,EAAQ,CAAE,QAAQ,KAAK,CAAA;AAAA,IAC9C,4BAAA,EAA8B,CAAA,CAAE,OAAA,EAAQ,CAAE,QAAQ,IAAI;AAAA,GACvD,CAAA,CAAE,OAAA,CAAQ,EAAE;AACf,CAAC;AAIM,IAAM,uBAAA,GAA0C,oBAAA,CAAqB,KAAA,CAAM,EAAE","file":"chunk-67V2GJGK.js","sourcesContent":["import { z } from 'zod';\nimport { AcademicPaper } from '../academic/semanticScholar';\n\nexport type SearchProviderType = 'tavily' | 'exa' | 'searxng' | 'duckduckgo' | 'semantic_scholar' | 'openalex' | 'arxiv' | 'custom';\nexport type CrawlerProviderType = 'jina' | 'crawl4ai' | 'defuddle' | 'direct' | 'custom';\n\nexport interface CustomSearchAdapter {\n search(query: string, options?: { limit?: number; domainFilter?: string[] }): Promise<Array<{ title: string; url: string; content: string; score?: number }>>;\n}\n\nexport interface CustomCrawlerAdapter {\n crawl(url: string): Promise<{ url: string; title: string; markdownContent: string; byteSize: number }>;\n}\n\nexport interface CustomAcademicSearchAdapter {\n searchPapers(query: string, options?: { limit?: number; yearRange?: string }): Promise<AcademicPaper[]>;\n}\n\nexport const ResearchConfigSchema = z.object({\n search: z.object({\n preferredProvider: z.enum(['tavily', 'exa', 'searxng', 'duckduckgo', 'semantic_scholar', 'openalex', 'arxiv', 'custom']).default('tavily'),\n fallbackChain: z.array(z.string()).default(['tavily', 'exa', 'duckduckgo']),\n apiKeys: z.object({\n tavily: z.string().optional(),\n exa: z.string().optional(),\n semanticScholar: z.string().optional(),\n }).default({}),\n searxngHost: z.string().optional(),\n timeoutMs: z.number().default(12000),\n maxResultsPerQuery: z.number().default(5),\n }).default({}),\n crawler: z.object({\n preferredProvider: z.enum(['jina', 'crawl4ai', 'defuddle', 'direct', 'custom']).default('jina'),\n fallbackChain: z.array(z.string()).default(['jina', 'crawl4ai', 'direct']),\n crawl4aiHost: z.string().default('http://localhost:11235'),\n timeoutMs: z.number().default(15000),\n maxContentLength: z.number().default(100000),\n }).default({}),\n quality: z.object({\n minRelevanceScore: z.number().min(1).max(10).default(6),\n requireCodeSnippets: z.boolean().default(false),\n enableAntiHallucinationSweep: z.boolean().default(true),\n }).default({}),\n});\n\nexport type ResearchConfig = z.infer<typeof ResearchConfigSchema>;\n\nexport const DEFAULT_RESEARCH_CONFIG: ResearchConfig = ResearchConfigSchema.parse({});\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// src/evidence/claimVerifier.ts
|
|
2
|
+
var ClaimVerifier = class {
|
|
3
|
+
verifyClaims(claims, sourceCorpus) {
|
|
4
|
+
const verifiedList = [];
|
|
5
|
+
const lowerCorpus = sourceCorpus.toLowerCase();
|
|
6
|
+
for (const claim of claims) {
|
|
7
|
+
const claimKeywords = claim.toLowerCase().split(/\s+/).filter((w) => w.length > 4);
|
|
8
|
+
const matchCount = claimKeywords.filter((k) => lowerCorpus.includes(k)).length;
|
|
9
|
+
const matchRatio = claimKeywords.length > 0 ? matchCount / claimKeywords.length : 0;
|
|
10
|
+
const isSupported = matchRatio >= 0.6;
|
|
11
|
+
verifiedList.push({
|
|
12
|
+
claimText: claim,
|
|
13
|
+
isSupported,
|
|
14
|
+
confidenceScore: Math.round(matchRatio * 100)
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
const supportedCount = verifiedList.filter((c) => c.isSupported).length;
|
|
18
|
+
const supportPct = claims.length > 0 ? supportedCount / claims.length * 100 : 100;
|
|
19
|
+
const hallucinationRisk = supportPct >= 80 ? "low" : supportPct >= 50 ? "medium" : "high";
|
|
20
|
+
const mdLines = [
|
|
21
|
+
`# \u{1F50D} Claim-Support Sweep & Verification Report`,
|
|
22
|
+
`> **Verification Rate:** \`${supportPct.toFixed(1)}%\` (${supportedCount}/${claims.length} claims supported) | **Hallucination Risk:** \`${hallucinationRisk.toUpperCase()}\``,
|
|
23
|
+
`
|
|
24
|
+
| Pedagogical / Technical Claim | Evidence Status | Confidence Match |`,
|
|
25
|
+
`|---|---|---|`,
|
|
26
|
+
...verifiedList.map((c) => `| ${c.claimText} | ${c.isSupported ? "\u2705 **SUPPORTED**" : "\u26A0\uFE0F *UNVERIFIED / GAP*"} | \`${c.confidenceScore}%\` |`)
|
|
27
|
+
];
|
|
28
|
+
return {
|
|
29
|
+
totalClaimsChecked: claims.length,
|
|
30
|
+
supportedClaimsCount: supportedCount,
|
|
31
|
+
hallucinationRisk,
|
|
32
|
+
claims: verifiedList,
|
|
33
|
+
reportMd: mdLines.join("\n")
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { ClaimVerifier };
|
|
39
|
+
//# sourceMappingURL=chunk-6Q2XCUG7.js.map
|
|
40
|
+
//# sourceMappingURL=chunk-6Q2XCUG7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/evidence/claimVerifier.ts"],"names":[],"mappings":";AAmBO,IAAM,gBAAN,MAAoB;AAAA,EACzB,YAAA,CAAa,QAAkB,YAAA,EAAwC;AACrE,IAAA,MAAM,eAAgC,EAAC;AACvC,IAAA,MAAM,WAAA,GAAc,aAAa,WAAA,EAAY;AAE7C,IAAA,KAAA,MAAW,SA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AA,MACA,GAAG,YAAA,CAAa,GAAA,CAAI,CAAA,CAAA,KAAK,KAAK,CAAA,CAAE,SAAS,CAAA,GAAA,EAAM,CAAA,CAAE,cAAc,sBAAA,GAAoB,iCAAuB,CAAA,KAAA,EAAQ,CAAA,CAAE,eAAe,CAAA,KAAA,CAAO;AAAA,KAC5I;AAEA,IAAA,OAAO;AAAA,MACL,oBAAoB,MAAA,CAAO,MAAA;AAAA,MAC3B,oBAAA,EAAsB,cAAA;AAAA,MACtB,iBAAA;AAAA,MACA,MAAA,EAAQ,YAAA;AAAA,MACR,QAAA,EAAU,OAAA,CAAQ,IAAA,CAAK,IAAI;AAAA,KAC7B;AAAA,EACF;AACF","file":"chunk-6Q2XCUG7.js","sourcesContent":["export interface VerifiedClaim {\n claimText: string;\n sourceUrl?: string;\n isSupported: boolean;\n confidenceScore: number;\n extractedQuote?: string;\n}\n\nexport interface ClaimSweepReport {\n totalClaimsChecked: number;\n supportedClaimsCount: number;\n hallucinationRisk: 'low' | 'medium' | 'high';\n claims: VerifiedClaim[];\n reportMd: string;\n}\n\n/**\n * Claim-Support Sweep & Fact Checker (Anti-Hallucination Gate - English Canonical)\n */\nexport class ClaimVerifier {\n verifyClaims(claims: string[], sourceCorpus: string): ClaimSweepReport {\n const verifiedList: VerifiedClaim[] = [];\n const lowerCorpus = sourceCorpus.toLowerCase();\n\n for (const claim of claims) {\n const claimKeywords = claim.toLowerCase().split(/\\s+/).filter(w => w.length > 4);\n const matchCount = claimKeywords.filter(k => lowerCorpus.includes(k)).length;\n const matchRatio = claimKeywords.length > 0 ? matchCount / claimKeywords.length : 0;\n\n const isSupported = matchRatio >= 0.6;\n verifiedList.push({\n claimText: claim,\n isSupported,\n confidenceScore: Math.round(matchRatio * 100),\n });\n }\n\n const supportedCount = verifiedList.filter(c => c.isSupported).length;\n const supportPct = claims.length > 0 ? (supportedCount / claims.length) * 100 : 100;\n const hallucinationRisk = supportPct >= 80 ? 'low' : supportPct >= 50 ? 'medium' : 'high';\n\n const mdLines = [\n `# 🔍 Claim-Support Sweep & Verification Report`,\n `> **Verification Rate:** \\`${supportPct.toFixed(1)}%\\` (${supportedCount}/${claims.length} claims supported) | **Hallucination Risk:** \\`${hallucinationRisk.toUpperCase()}\\``,\n `\\n| Pedagogical / Technical Claim | Evidence Status | Confidence Match |`,\n `|---|---|---|`,\n ...verifiedList.map(c => `| ${c.claimText} | ${c.isSupported ? '✅ **SUPPORTED**' : '⚠️ *UNVERIFIED / GAP*'} | \\`${c.confidenceScore}%\\` |`)\n ];\n\n return {\n totalClaimsChecked: claims.length,\n supportedClaimsCount: supportedCount,\n hallucinationRisk,\n claims: verifiedList,\n reportMd: mdLines.join('\\n'),\n };\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-KGCDYFFD.js"}
|