mcp-sequential-research 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/README.md +251 -0
- package/dist/compilers.d.ts +12 -0
- package/dist/compilers.d.ts.map +1 -0
- package/dist/compilers.js +871 -0
- package/dist/compilers.js.map +1 -0
- package/dist/format.d.ts +84 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +177 -0
- package/dist/format.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +251 -0
- package/dist/index.js.map +1 -0
- package/dist/planners.d.ts +12 -0
- package/dist/planners.d.ts.map +1 -0
- package/dist/planners.js +608 -0
- package/dist/planners.js.map +1 -0
- package/dist/schema.d.ts +1947 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +232 -0
- package/dist/schema.js.map +1 -0
- package/docs/MCP_GUIDANCE.md +409 -0
- package/docs/TOOL_CONTRACTS.md +431 -0
- package/examples/example_workflow.md +464 -0
- package/package.json +38 -0
- package/src/compilers.ts +1113 -0
- package/src/format.ts +219 -0
- package/src/index.ts +270 -0
- package/src/planners.ts +687 -0
- package/src/schema.ts +303 -0
- package/tsconfig.json +24 -0
package/dist/planners.js
ADDED
|
@@ -0,0 +1,608 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Research Plan Generation
|
|
3
|
+
*
|
|
4
|
+
* Deterministic planner that generates structured research queries
|
|
5
|
+
* and extraction goals without calling external services.
|
|
6
|
+
*/
|
|
7
|
+
import { generateId, isoNow } from "./format.js";
|
|
8
|
+
/**
|
|
9
|
+
* Query templates by type for deterministic generation
|
|
10
|
+
*/
|
|
11
|
+
const QUERY_TEMPLATES = {
|
|
12
|
+
// General query types
|
|
13
|
+
definition: {
|
|
14
|
+
prefixes: ["What is", "Define", "Explain"],
|
|
15
|
+
extractionGoals: [
|
|
16
|
+
"Primary definition",
|
|
17
|
+
"Key characteristics",
|
|
18
|
+
"Common examples",
|
|
19
|
+
"Related terminology",
|
|
20
|
+
],
|
|
21
|
+
resultFields: [
|
|
22
|
+
{ field_name: "definition", field_type: "string", description: "Core definition" },
|
|
23
|
+
{ field_name: "characteristics", field_type: "array", description: "Key characteristics" },
|
|
24
|
+
{ field_name: "examples", field_type: "array", description: "Illustrative examples" },
|
|
25
|
+
],
|
|
26
|
+
family: "general",
|
|
27
|
+
},
|
|
28
|
+
comparison: {
|
|
29
|
+
prefixes: ["Compare", "How does X differ from", "Similarities between"],
|
|
30
|
+
extractionGoals: [
|
|
31
|
+
"Key similarities",
|
|
32
|
+
"Key differences",
|
|
33
|
+
"Trade-offs",
|
|
34
|
+
"Use case recommendations",
|
|
35
|
+
],
|
|
36
|
+
resultFields: [
|
|
37
|
+
{ field_name: "similarities", field_type: "array", description: "Shared characteristics" },
|
|
38
|
+
{ field_name: "differences", field_type: "array", description: "Distinguishing features" },
|
|
39
|
+
{ field_name: "recommendation", field_type: "string", description: "When to use each" },
|
|
40
|
+
],
|
|
41
|
+
family: "general",
|
|
42
|
+
},
|
|
43
|
+
enumeration: {
|
|
44
|
+
prefixes: ["List all", "What are the types of", "Enumerate"],
|
|
45
|
+
extractionGoals: [
|
|
46
|
+
"Complete list of items",
|
|
47
|
+
"Categorization if applicable",
|
|
48
|
+
"Brief description of each",
|
|
49
|
+
],
|
|
50
|
+
resultFields: [
|
|
51
|
+
{ field_name: "items", field_type: "array", description: "Enumerated items" },
|
|
52
|
+
{ field_name: "categories", field_type: "object", description: "Items grouped by category" },
|
|
53
|
+
],
|
|
54
|
+
family: "general",
|
|
55
|
+
},
|
|
56
|
+
procedure: {
|
|
57
|
+
prefixes: ["How to", "Steps to", "Process for"],
|
|
58
|
+
extractionGoals: [
|
|
59
|
+
"Ordered steps",
|
|
60
|
+
"Prerequisites",
|
|
61
|
+
"Common pitfalls",
|
|
62
|
+
"Expected outcomes",
|
|
63
|
+
],
|
|
64
|
+
resultFields: [
|
|
65
|
+
{ field_name: "prerequisites", field_type: "array", description: "Required before starting" },
|
|
66
|
+
{ field_name: "steps", field_type: "array", description: "Ordered procedure steps" },
|
|
67
|
+
{ field_name: "warnings", field_type: "array", description: "Potential issues to avoid" },
|
|
68
|
+
],
|
|
69
|
+
family: "general",
|
|
70
|
+
},
|
|
71
|
+
causation: {
|
|
72
|
+
prefixes: ["Why does", "What causes", "Reasons for"],
|
|
73
|
+
extractionGoals: [
|
|
74
|
+
"Primary causes",
|
|
75
|
+
"Contributing factors",
|
|
76
|
+
"Causal chain if applicable",
|
|
77
|
+
"Evidence strength",
|
|
78
|
+
],
|
|
79
|
+
resultFields: [
|
|
80
|
+
{ field_name: "primary_causes", field_type: "array", description: "Main causal factors" },
|
|
81
|
+
{ field_name: "contributing_factors", field_type: "array", description: "Secondary influences" },
|
|
82
|
+
{ field_name: "evidence_quality", field_type: "string", description: "Strength of causal claims" },
|
|
83
|
+
],
|
|
84
|
+
family: "general",
|
|
85
|
+
},
|
|
86
|
+
evidence: {
|
|
87
|
+
prefixes: ["Evidence for", "Research supporting", "Studies on"],
|
|
88
|
+
extractionGoals: [
|
|
89
|
+
"Key studies or sources",
|
|
90
|
+
"Strength of evidence",
|
|
91
|
+
"Conflicting findings",
|
|
92
|
+
"Consensus view",
|
|
93
|
+
],
|
|
94
|
+
resultFields: [
|
|
95
|
+
{ field_name: "supporting_evidence", field_type: "array", description: "Evidence in favor" },
|
|
96
|
+
{ field_name: "contrary_evidence", field_type: "array", description: "Evidence against" },
|
|
97
|
+
{ field_name: "consensus", field_type: "string", description: "Overall scientific consensus" },
|
|
98
|
+
],
|
|
99
|
+
family: "general",
|
|
100
|
+
},
|
|
101
|
+
current_state: {
|
|
102
|
+
prefixes: ["Current state of", "Latest developments in", "Status of"],
|
|
103
|
+
extractionGoals: [
|
|
104
|
+
"Current status",
|
|
105
|
+
"Recent developments",
|
|
106
|
+
"Key players or stakeholders",
|
|
107
|
+
"Trends",
|
|
108
|
+
],
|
|
109
|
+
resultFields: [
|
|
110
|
+
{ field_name: "current_status", field_type: "string", description: "Present state summary" },
|
|
111
|
+
{ field_name: "recent_developments", field_type: "array", description: "Recent changes" },
|
|
112
|
+
{ field_name: "key_players", field_type: "array", description: "Important actors" },
|
|
113
|
+
],
|
|
114
|
+
family: "general",
|
|
115
|
+
},
|
|
116
|
+
historical: {
|
|
117
|
+
prefixes: ["History of", "Evolution of", "Origins of"],
|
|
118
|
+
extractionGoals: [
|
|
119
|
+
"Timeline of key events",
|
|
120
|
+
"Major milestones",
|
|
121
|
+
"Key figures",
|
|
122
|
+
"Turning points",
|
|
123
|
+
],
|
|
124
|
+
resultFields: [
|
|
125
|
+
{ field_name: "timeline", field_type: "array", description: "Chronological events" },
|
|
126
|
+
{ field_name: "milestones", field_type: "array", description: "Significant achievements" },
|
|
127
|
+
{ field_name: "key_figures", field_type: "array", description: "Important people" },
|
|
128
|
+
],
|
|
129
|
+
family: "general",
|
|
130
|
+
},
|
|
131
|
+
prediction: {
|
|
132
|
+
prefixes: ["Future of", "Predictions for", "Outlook for"],
|
|
133
|
+
extractionGoals: [
|
|
134
|
+
"Short-term predictions",
|
|
135
|
+
"Long-term predictions",
|
|
136
|
+
"Key uncertainties",
|
|
137
|
+
"Expert forecasts",
|
|
138
|
+
],
|
|
139
|
+
resultFields: [
|
|
140
|
+
{ field_name: "short_term", field_type: "array", description: "Near-future predictions" },
|
|
141
|
+
{ field_name: "long_term", field_type: "array", description: "Far-future predictions" },
|
|
142
|
+
{ field_name: "uncertainties", field_type: "array", description: "Major unknowns" },
|
|
143
|
+
],
|
|
144
|
+
family: "general",
|
|
145
|
+
},
|
|
146
|
+
opinion: {
|
|
147
|
+
prefixes: ["Expert views on", "Opinions about", "Perspectives on"],
|
|
148
|
+
extractionGoals: [
|
|
149
|
+
"Range of expert opinions",
|
|
150
|
+
"Majority view",
|
|
151
|
+
"Minority/contrarian views",
|
|
152
|
+
"Key debates",
|
|
153
|
+
],
|
|
154
|
+
resultFields: [
|
|
155
|
+
{ field_name: "majority_view", field_type: "string", description: "Dominant perspective" },
|
|
156
|
+
{ field_name: "alternative_views", field_type: "array", description: "Other perspectives" },
|
|
157
|
+
{ field_name: "key_debates", field_type: "array", description: "Points of contention" },
|
|
158
|
+
],
|
|
159
|
+
family: "general",
|
|
160
|
+
},
|
|
161
|
+
// Patent-grade query types
|
|
162
|
+
patent_broad: {
|
|
163
|
+
prefixes: ["Patents for", "Patent landscape:", "Prior art:"],
|
|
164
|
+
extractionGoals: [
|
|
165
|
+
"Relevant patent numbers",
|
|
166
|
+
"Key claims",
|
|
167
|
+
"Technology classification (CPC/IPC)",
|
|
168
|
+
"Filing date range",
|
|
169
|
+
"Major assignees",
|
|
170
|
+
],
|
|
171
|
+
resultFields: [
|
|
172
|
+
{ field_name: "patents", field_type: "array", description: "List of relevant patents" },
|
|
173
|
+
{ field_name: "key_claims", field_type: "array", description: "Most relevant claim language" },
|
|
174
|
+
{ field_name: "classifications", field_type: "array", description: "CPC/IPC codes" },
|
|
175
|
+
{ field_name: "assignees", field_type: "array", description: "Patent holders" },
|
|
176
|
+
],
|
|
177
|
+
family: "patent",
|
|
178
|
+
},
|
|
179
|
+
patent_synonyms: {
|
|
180
|
+
prefixes: ["Alternative terms:", "Synonyms for:", "Related terminology:"],
|
|
181
|
+
extractionGoals: [
|
|
182
|
+
"Alternative terminology in patents",
|
|
183
|
+
"Synonym mapping to patent language",
|
|
184
|
+
"Technical jargon variations",
|
|
185
|
+
"Cross-reference terms",
|
|
186
|
+
],
|
|
187
|
+
resultFields: [
|
|
188
|
+
{ field_name: "synonyms", field_type: "array", description: "Alternative terms found" },
|
|
189
|
+
{ field_name: "patent_language", field_type: "array", description: "Formal patent terminology" },
|
|
190
|
+
{ field_name: "term_frequency", field_type: "object", description: "Term usage frequency" },
|
|
191
|
+
],
|
|
192
|
+
family: "patent",
|
|
193
|
+
},
|
|
194
|
+
patent_problem_benefit: {
|
|
195
|
+
prefixes: ["Problem solved by", "Benefits of", "Advantages claimed in"],
|
|
196
|
+
extractionGoals: [
|
|
197
|
+
"Problems addressed in claims",
|
|
198
|
+
"Benefits/advantages stated",
|
|
199
|
+
"Technical effects achieved",
|
|
200
|
+
"Improvement over prior art",
|
|
201
|
+
],
|
|
202
|
+
resultFields: [
|
|
203
|
+
{ field_name: "problems", field_type: "array", description: "Problems addressed" },
|
|
204
|
+
{ field_name: "benefits", field_type: "array", description: "Claimed benefits" },
|
|
205
|
+
{ field_name: "technical_effects", field_type: "array", description: "Technical improvements" },
|
|
206
|
+
{ field_name: "prior_art_gap", field_type: "string", description: "Gap in prior art" },
|
|
207
|
+
],
|
|
208
|
+
family: "patent",
|
|
209
|
+
},
|
|
210
|
+
patent_competitor: {
|
|
211
|
+
prefixes: ["Assignee:", "Patents by", "Portfolio:"],
|
|
212
|
+
extractionGoals: [
|
|
213
|
+
"Competitor patent portfolios",
|
|
214
|
+
"Key assignees in space",
|
|
215
|
+
"Filing trends by company",
|
|
216
|
+
"Licensing relationships",
|
|
217
|
+
],
|
|
218
|
+
resultFields: [
|
|
219
|
+
{ field_name: "assignees", field_type: "array", description: "Key patent holders" },
|
|
220
|
+
{ field_name: "portfolio_sizes", field_type: "object", description: "Patent counts by assignee" },
|
|
221
|
+
{ field_name: "recent_filings", field_type: "array", description: "Recent patent activity" },
|
|
222
|
+
{ field_name: "key_patents", field_type: "array", description: "Most cited patents" },
|
|
223
|
+
],
|
|
224
|
+
family: "patent",
|
|
225
|
+
searchModifiers: ["assignee:"],
|
|
226
|
+
},
|
|
227
|
+
patent_limitation: {
|
|
228
|
+
prefixes: ["Specific claim:", "Narrow limitation:", "Component:"],
|
|
229
|
+
extractionGoals: [
|
|
230
|
+
"Specific claim elements",
|
|
231
|
+
"Narrow technical limitations",
|
|
232
|
+
"Component-level details",
|
|
233
|
+
"Parameter ranges",
|
|
234
|
+
],
|
|
235
|
+
resultFields: [
|
|
236
|
+
{ field_name: "claim_elements", field_type: "array", description: "Specific claim components" },
|
|
237
|
+
{ field_name: "limitations", field_type: "array", description: "Technical limitations" },
|
|
238
|
+
{ field_name: "parameters", field_type: "object", description: "Numerical parameters" },
|
|
239
|
+
{ field_name: "dependencies", field_type: "array", description: "Claim dependencies" },
|
|
240
|
+
],
|
|
241
|
+
family: "patent",
|
|
242
|
+
},
|
|
243
|
+
// Web query types for prior art
|
|
244
|
+
web_academic: {
|
|
245
|
+
prefixes: ["Academic research:", "Studies on", "Papers about"],
|
|
246
|
+
extractionGoals: [
|
|
247
|
+
"Peer-reviewed publications",
|
|
248
|
+
"University research",
|
|
249
|
+
"PhD dissertations",
|
|
250
|
+
"Research methodologies",
|
|
251
|
+
],
|
|
252
|
+
resultFields: [
|
|
253
|
+
{ field_name: "papers", field_type: "array", description: "Academic publications" },
|
|
254
|
+
{ field_name: "authors", field_type: "array", description: "Key researchers" },
|
|
255
|
+
{ field_name: "institutions", field_type: "array", description: "Research institutions" },
|
|
256
|
+
{ field_name: "methodologies", field_type: "array", description: "Research methods used" },
|
|
257
|
+
],
|
|
258
|
+
family: "web",
|
|
259
|
+
searchModifiers: ["site:.edu", "filetype:pdf"],
|
|
260
|
+
},
|
|
261
|
+
web_vendor: {
|
|
262
|
+
prefixes: ["Vendor documentation:", "Product specs:", "Commercial implementation:"],
|
|
263
|
+
extractionGoals: [
|
|
264
|
+
"Product specifications",
|
|
265
|
+
"Technical documentation",
|
|
266
|
+
"Implementation details",
|
|
267
|
+
"Commercial availability",
|
|
268
|
+
],
|
|
269
|
+
resultFields: [
|
|
270
|
+
{ field_name: "products", field_type: "array", description: "Commercial products" },
|
|
271
|
+
{ field_name: "specifications", field_type: "object", description: "Technical specs" },
|
|
272
|
+
{ field_name: "vendors", field_type: "array", description: "Vendor names" },
|
|
273
|
+
{ field_name: "availability", field_type: "string", description: "Market availability" },
|
|
274
|
+
],
|
|
275
|
+
family: "web",
|
|
276
|
+
},
|
|
277
|
+
web_opensource: {
|
|
278
|
+
prefixes: ["Open source:", "GitHub:", "OSS implementation:"],
|
|
279
|
+
extractionGoals: [
|
|
280
|
+
"Open source implementations",
|
|
281
|
+
"GitHub repositories",
|
|
282
|
+
"Code examples",
|
|
283
|
+
"Community adoption",
|
|
284
|
+
],
|
|
285
|
+
resultFields: [
|
|
286
|
+
{ field_name: "repositories", field_type: "array", description: "OSS repos" },
|
|
287
|
+
{ field_name: "implementations", field_type: "array", description: "Code implementations" },
|
|
288
|
+
{ field_name: "stars_forks", field_type: "object", description: "Popularity metrics" },
|
|
289
|
+
{ field_name: "licenses", field_type: "array", description: "Open source licenses" },
|
|
290
|
+
],
|
|
291
|
+
family: "web",
|
|
292
|
+
searchModifiers: ["site:github.com", "site:gitlab.com"],
|
|
293
|
+
},
|
|
294
|
+
web_conference: {
|
|
295
|
+
prefixes: ["Conference paper:", "IEEE:", "Proceedings:"],
|
|
296
|
+
extractionGoals: [
|
|
297
|
+
"Conference proceedings",
|
|
298
|
+
"IEEE/ACM papers",
|
|
299
|
+
"arXiv preprints",
|
|
300
|
+
"Technical presentations",
|
|
301
|
+
],
|
|
302
|
+
resultFields: [
|
|
303
|
+
{ field_name: "papers", field_type: "array", description: "Conference papers" },
|
|
304
|
+
{ field_name: "conferences", field_type: "array", description: "Conference names" },
|
|
305
|
+
{ field_name: "preprints", field_type: "array", description: "arXiv/preprint links" },
|
|
306
|
+
{ field_name: "presentation_links", field_type: "array", description: "Slides/videos" },
|
|
307
|
+
],
|
|
308
|
+
family: "web",
|
|
309
|
+
searchModifiers: ["site:ieee.org OR site:acm.org OR site:arxiv.org"],
|
|
310
|
+
},
|
|
311
|
+
};
|
|
312
|
+
/**
|
|
313
|
+
* Depth configurations
|
|
314
|
+
*/
|
|
315
|
+
const DEPTH_CONFIG = {
|
|
316
|
+
shallow: { minQueries: 3, maxQueries: 5, typesPerTopic: 2 },
|
|
317
|
+
standard: { minQueries: 5, maxQueries: 10, typesPerTopic: 4 },
|
|
318
|
+
deep: { minQueries: 10, maxQueries: 20, typesPerTopic: 6 },
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* Analyze topic to determine relevant query types
|
|
322
|
+
*/
|
|
323
|
+
function analyzeTopicForQueryTypes(topic, focusAreas) {
|
|
324
|
+
const types = [];
|
|
325
|
+
// Base types for any topic
|
|
326
|
+
types.push("definition", "current_state");
|
|
327
|
+
// Detect keywords that suggest specific query types
|
|
328
|
+
const topicLower = topic.toLowerCase();
|
|
329
|
+
const combined = (topicLower + " " + focusAreas.join(" ")).toLowerCase();
|
|
330
|
+
if (combined.includes("compar") || combined.includes("vs") || combined.includes("versus")) {
|
|
331
|
+
types.push("comparison");
|
|
332
|
+
}
|
|
333
|
+
if (combined.includes("types") || combined.includes("kinds") || combined.includes("categories")) {
|
|
334
|
+
types.push("enumeration");
|
|
335
|
+
}
|
|
336
|
+
if (combined.includes("how to") || combined.includes("implement") || combined.includes("process")) {
|
|
337
|
+
types.push("procedure");
|
|
338
|
+
}
|
|
339
|
+
if (combined.includes("why") || combined.includes("cause") || combined.includes("reason")) {
|
|
340
|
+
types.push("causation");
|
|
341
|
+
}
|
|
342
|
+
if (combined.includes("evidence") || combined.includes("research") || combined.includes("study")) {
|
|
343
|
+
types.push("evidence");
|
|
344
|
+
}
|
|
345
|
+
if (combined.includes("history") || combined.includes("evolution") || combined.includes("origin")) {
|
|
346
|
+
types.push("historical");
|
|
347
|
+
}
|
|
348
|
+
if (combined.includes("future") || combined.includes("predict") || combined.includes("trend")) {
|
|
349
|
+
types.push("prediction");
|
|
350
|
+
}
|
|
351
|
+
if (combined.includes("opinion") || combined.includes("debate") || combined.includes("perspective")) {
|
|
352
|
+
types.push("opinion");
|
|
353
|
+
}
|
|
354
|
+
// Add enumeration for technical topics
|
|
355
|
+
if (combined.includes("technique") || combined.includes("method") || combined.includes("approach")) {
|
|
356
|
+
types.push("enumeration", "comparison");
|
|
357
|
+
}
|
|
358
|
+
return [...new Set(types)];
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Generate a research query based on type and topic
|
|
362
|
+
*/
|
|
363
|
+
function generateQuery(topic, queryType, index, dependencies) {
|
|
364
|
+
const template = QUERY_TEMPLATES[queryType];
|
|
365
|
+
const queryId = `q${index + 1}`;
|
|
366
|
+
// Build query text from template and topic
|
|
367
|
+
const prefix = template.prefixes[index % template.prefixes.length];
|
|
368
|
+
const queryText = `${prefix} ${topic}`;
|
|
369
|
+
// Determine priority based on type
|
|
370
|
+
let priority;
|
|
371
|
+
switch (queryType) {
|
|
372
|
+
case "definition":
|
|
373
|
+
case "current_state":
|
|
374
|
+
case "patent_broad":
|
|
375
|
+
priority = "critical";
|
|
376
|
+
break;
|
|
377
|
+
case "evidence":
|
|
378
|
+
case "procedure":
|
|
379
|
+
case "patent_problem_benefit":
|
|
380
|
+
case "patent_limitation":
|
|
381
|
+
priority = "high";
|
|
382
|
+
break;
|
|
383
|
+
case "comparison":
|
|
384
|
+
case "enumeration":
|
|
385
|
+
case "patent_synonyms":
|
|
386
|
+
case "patent_competitor":
|
|
387
|
+
case "web_academic":
|
|
388
|
+
case "web_conference":
|
|
389
|
+
priority = "medium";
|
|
390
|
+
break;
|
|
391
|
+
default:
|
|
392
|
+
priority = "medium";
|
|
393
|
+
}
|
|
394
|
+
return {
|
|
395
|
+
query_id: queryId,
|
|
396
|
+
query_text: queryText,
|
|
397
|
+
query_type: queryType,
|
|
398
|
+
query_family: template.family,
|
|
399
|
+
extraction_goals: template.extractionGoals,
|
|
400
|
+
priority,
|
|
401
|
+
depends_on: dependencies.length > 0 ? dependencies : undefined,
|
|
402
|
+
search_modifiers: template.searchModifiers,
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Generate result schema for a query
|
|
407
|
+
*/
|
|
408
|
+
function generateResultSchema(query) {
|
|
409
|
+
const template = QUERY_TEMPLATES[query.query_type];
|
|
410
|
+
return {
|
|
411
|
+
query_id: query.query_id,
|
|
412
|
+
required_fields: template.resultFields.map((field) => ({
|
|
413
|
+
...field,
|
|
414
|
+
required: true,
|
|
415
|
+
})),
|
|
416
|
+
example: Object.fromEntries(template.resultFields.map((field) => [
|
|
417
|
+
field.field_name,
|
|
418
|
+
field.field_type === "array" ? ["example1", "example2"] :
|
|
419
|
+
field.field_type === "object" ? { key: "value" } :
|
|
420
|
+
field.field_type === "number" ? 0 :
|
|
421
|
+
field.field_type === "boolean" ? true :
|
|
422
|
+
"Example value",
|
|
423
|
+
])),
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Determine execution order with parallel groups
|
|
428
|
+
*/
|
|
429
|
+
function computeExecutionOrder(queries) {
|
|
430
|
+
const executed = new Set();
|
|
431
|
+
const groups = [];
|
|
432
|
+
// First pass: queries with no dependencies
|
|
433
|
+
const noDeps = queries.filter((q) => !q.depends_on || q.depends_on.length === 0);
|
|
434
|
+
if (noDeps.length > 0) {
|
|
435
|
+
groups.push(noDeps.map((q) => q.query_id));
|
|
436
|
+
noDeps.forEach((q) => executed.add(q.query_id));
|
|
437
|
+
}
|
|
438
|
+
// Subsequent passes: queries whose dependencies are satisfied
|
|
439
|
+
let remaining = queries.filter((q) => !executed.has(q.query_id));
|
|
440
|
+
while (remaining.length > 0) {
|
|
441
|
+
const canExecute = remaining.filter((q) => !q.depends_on || q.depends_on.every((dep) => executed.has(dep)));
|
|
442
|
+
if (canExecute.length === 0) {
|
|
443
|
+
// Circular dependency or error - just add remaining
|
|
444
|
+
groups.push(remaining.map((q) => q.query_id));
|
|
445
|
+
break;
|
|
446
|
+
}
|
|
447
|
+
groups.push(canExecute.map((q) => q.query_id));
|
|
448
|
+
canExecute.forEach((q) => executed.add(q.query_id));
|
|
449
|
+
remaining = remaining.filter((q) => !executed.has(q.query_id));
|
|
450
|
+
}
|
|
451
|
+
return groups;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Check if patent-focused research is needed
|
|
455
|
+
*/
|
|
456
|
+
function isPatentFocused(constraints, focusAreas) {
|
|
457
|
+
const combined = [...constraints, ...focusAreas].join(" ").toLowerCase();
|
|
458
|
+
return combined.includes("patent") ||
|
|
459
|
+
combined.includes("prior art") ||
|
|
460
|
+
combined.includes("claim") ||
|
|
461
|
+
combined.includes("novelty");
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Patent query family types
|
|
465
|
+
*/
|
|
466
|
+
const PATENT_QUERY_TYPES = [
|
|
467
|
+
"patent_broad",
|
|
468
|
+
"patent_synonyms",
|
|
469
|
+
"patent_problem_benefit",
|
|
470
|
+
"patent_competitor",
|
|
471
|
+
"patent_limitation",
|
|
472
|
+
];
|
|
473
|
+
/**
|
|
474
|
+
* Web query family types
|
|
475
|
+
*/
|
|
476
|
+
const WEB_QUERY_TYPES = [
|
|
477
|
+
"web_academic",
|
|
478
|
+
"web_vendor",
|
|
479
|
+
"web_opensource",
|
|
480
|
+
"web_conference",
|
|
481
|
+
];
|
|
482
|
+
/**
|
|
483
|
+
* Main plan generation function
|
|
484
|
+
*/
|
|
485
|
+
export function generatePlan(input) {
|
|
486
|
+
const planId = generateId("plan");
|
|
487
|
+
const depth = input.depth ?? "standard";
|
|
488
|
+
const focusAreas = input.focus_areas ?? [];
|
|
489
|
+
const constraints = input.constraints ?? [];
|
|
490
|
+
const outputFormat = input.output_format ?? "markdown";
|
|
491
|
+
const depthConfig = DEPTH_CONFIG[depth];
|
|
492
|
+
const patentFocused = isPatentFocused(constraints, focusAreas);
|
|
493
|
+
// Analyze topic to get relevant general query types
|
|
494
|
+
const relevantTypes = analyzeTopicForQueryTypes(input.topic, focusAreas);
|
|
495
|
+
// Limit types based on depth
|
|
496
|
+
const typesToUse = relevantTypes.slice(0, depthConfig.typesPerTopic);
|
|
497
|
+
// Generate queries
|
|
498
|
+
const queries = [];
|
|
499
|
+
let queryIndex = 0;
|
|
500
|
+
// First query is always definition (critical, no dependencies)
|
|
501
|
+
if (typesToUse.includes("definition")) {
|
|
502
|
+
queries.push(generateQuery(input.topic, "definition", queryIndex++, []));
|
|
503
|
+
}
|
|
504
|
+
// If patent-focused, add patent query family
|
|
505
|
+
if (patentFocused) {
|
|
506
|
+
const firstQueryId = queries.length > 0 ? queries[0].query_id : undefined;
|
|
507
|
+
// Add all patent query types
|
|
508
|
+
for (const patentType of PATENT_QUERY_TYPES) {
|
|
509
|
+
if (queryIndex >= depthConfig.maxQueries)
|
|
510
|
+
break;
|
|
511
|
+
const deps = firstQueryId ? [firstQueryId] : [];
|
|
512
|
+
queries.push(generateQuery(input.topic, patentType, queryIndex++, deps));
|
|
513
|
+
}
|
|
514
|
+
// Add web query types for comprehensive prior art
|
|
515
|
+
for (const webType of WEB_QUERY_TYPES) {
|
|
516
|
+
if (queryIndex >= depthConfig.maxQueries)
|
|
517
|
+
break;
|
|
518
|
+
const deps = firstQueryId ? [firstQueryId] : [];
|
|
519
|
+
queries.push(generateQuery(input.topic, webType, queryIndex++, deps));
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
else {
|
|
523
|
+
// Generate general queries with dependencies on definition
|
|
524
|
+
for (const queryType of typesToUse) {
|
|
525
|
+
if (queryType === "definition")
|
|
526
|
+
continue;
|
|
527
|
+
if (queryIndex >= depthConfig.maxQueries)
|
|
528
|
+
break;
|
|
529
|
+
// Depends on definition if it exists
|
|
530
|
+
const deps = queries.length > 0 ? [queries[0].query_id] : [];
|
|
531
|
+
queries.push(generateQuery(input.topic, queryType, queryIndex++, deps));
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
// Add focus-area specific queries if we haven't hit max
|
|
535
|
+
for (const focus of focusAreas) {
|
|
536
|
+
if (queryIndex >= depthConfig.maxQueries)
|
|
537
|
+
break;
|
|
538
|
+
// For patent-focused, make focus queries patent_limitation type
|
|
539
|
+
const focusQueryType = patentFocused
|
|
540
|
+
? "patent_limitation"
|
|
541
|
+
: "current_state";
|
|
542
|
+
const template = QUERY_TEMPLATES[focusQueryType];
|
|
543
|
+
const focusQuery = {
|
|
544
|
+
query_id: `q${queryIndex + 1}`,
|
|
545
|
+
query_text: `${input.topic}: ${focus}`,
|
|
546
|
+
query_type: focusQueryType,
|
|
547
|
+
query_family: template.family,
|
|
548
|
+
extraction_goals: patentFocused
|
|
549
|
+
? [
|
|
550
|
+
`Specific claim limitations for ${focus}`,
|
|
551
|
+
`Component-level novelty in ${focus}`,
|
|
552
|
+
`Parameter ranges for ${focus}`,
|
|
553
|
+
]
|
|
554
|
+
: [
|
|
555
|
+
`Current state of ${focus}`,
|
|
556
|
+
`Key developments in ${focus}`,
|
|
557
|
+
`Challenges and opportunities`,
|
|
558
|
+
],
|
|
559
|
+
priority: "high",
|
|
560
|
+
depends_on: queries.length > 0 ? [queries[0].query_id] : undefined,
|
|
561
|
+
search_modifiers: template.searchModifiers,
|
|
562
|
+
};
|
|
563
|
+
queries.push(focusQuery);
|
|
564
|
+
queryIndex++;
|
|
565
|
+
}
|
|
566
|
+
// Ensure minimum queries
|
|
567
|
+
while (queries.length < depthConfig.minQueries) {
|
|
568
|
+
const unusedTypes = Object.keys(QUERY_TEMPLATES).filter((t) => !typesToUse.includes(t) &&
|
|
569
|
+
!PATENT_QUERY_TYPES.includes(t) &&
|
|
570
|
+
!WEB_QUERY_TYPES.includes(t));
|
|
571
|
+
if (unusedTypes.length === 0)
|
|
572
|
+
break;
|
|
573
|
+
const nextType = unusedTypes[0];
|
|
574
|
+
queries.push(generateQuery(input.topic, nextType, queryIndex++, [queries[0].query_id]));
|
|
575
|
+
}
|
|
576
|
+
// Generate result schemas
|
|
577
|
+
const resultSchemas = queries.map(generateResultSchema);
|
|
578
|
+
// Compute execution order
|
|
579
|
+
const executionOrder = computeExecutionOrder(queries);
|
|
580
|
+
// Count query families
|
|
581
|
+
const patentQueries = queries.filter((q) => q.query_family === "patent").length;
|
|
582
|
+
const webQueries = queries.filter((q) => q.query_family === "web").length;
|
|
583
|
+
const generalQueries = queries.filter((q) => q.query_family === "general").length;
|
|
584
|
+
// Generate summary
|
|
585
|
+
const summary = `Research plan for "${input.topic}" with ${queries.length} queries at ${depth} depth. ` +
|
|
586
|
+
`Focus areas: ${focusAreas.length > 0 ? focusAreas.join(", ") : "general"}. ` +
|
|
587
|
+
(patentFocused
|
|
588
|
+
? `Patent-grade: ${patentQueries} patent queries, ${webQueries} web queries, ${generalQueries} general queries. `
|
|
589
|
+
: "") +
|
|
590
|
+
`Execution in ${executionOrder.length} phases.`;
|
|
591
|
+
return {
|
|
592
|
+
plan_id: planId,
|
|
593
|
+
topic: input.topic,
|
|
594
|
+
created_at: isoNow(),
|
|
595
|
+
summary,
|
|
596
|
+
queries,
|
|
597
|
+
result_schemas: resultSchemas,
|
|
598
|
+
execution_order: executionOrder,
|
|
599
|
+
estimated_sources: queries.length * 3, // Rough estimate
|
|
600
|
+
metadata: {
|
|
601
|
+
depth,
|
|
602
|
+
focus_areas: focusAreas,
|
|
603
|
+
constraints,
|
|
604
|
+
output_format: outputFormat,
|
|
605
|
+
},
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
//# sourceMappingURL=planners.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planners.js","sourceRoot":"","sources":["../src/planners.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAiBjD;;GAEG;AACH,MAAM,eAAe,GAAuD;IAC1E,sBAAsB;IACtB,UAAU,EAAE;QACV,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;QAC1C,eAAe,EAAE;YACf,oBAAoB;YACpB,qBAAqB;YACrB,iBAAiB;YACjB,qBAAqB;SACtB;QACD,YAAY,EAAE;YACZ,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB,EAAE;YAClF,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE;YAC1F,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE;SACtF;QAC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