@mantra-ai/core 0.6.0 → 0.7.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/analysis/generate-discovery-queries.d.ts +30 -0
- package/dist/analysis/generate-discovery-queries.d.ts.map +1 -0
- package/dist/analysis/generate-discovery-queries.js +26 -0
- package/dist/analysis/generate-discovery-queries.js.map +1 -0
- package/dist/analysis/generate-hypotheses.d.ts +6 -4
- package/dist/analysis/generate-hypotheses.d.ts.map +1 -1
- package/dist/analysis/generate-hypotheses.js +7 -6
- package/dist/analysis/generate-hypotheses.js.map +1 -1
- package/dist/analysis/generate-landscape.d.ts +20 -0
- package/dist/analysis/generate-landscape.d.ts.map +1 -0
- package/dist/analysis/generate-landscape.js +28 -0
- package/dist/analysis/generate-landscape.js.map +1 -0
- package/dist/analysis/index.d.ts +8 -3
- package/dist/analysis/index.d.ts.map +1 -1
- package/dist/analysis/index.js +4 -2
- package/dist/analysis/index.js.map +1 -1
- package/dist/analysis/prompts.d.ts +11 -1
- package/dist/analysis/prompts.d.ts.map +1 -1
- package/dist/analysis/prompts.js +183 -0
- package/dist/analysis/prompts.js.map +1 -1
- package/dist/analysis/schemas.d.ts +353 -27
- package/dist/analysis/schemas.d.ts.map +1 -1
- package/dist/analysis/schemas.js +66 -4
- package/dist/analysis/schemas.js.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { LLMResult } from "../ai/types";
|
|
2
|
+
import { type DiscoveryQuerySet } from "./schemas";
|
|
3
|
+
/** Bounded seed context for discovery query generation. */
|
|
4
|
+
export interface SeedContext {
|
|
5
|
+
title: string;
|
|
6
|
+
doi?: string;
|
|
7
|
+
abstract?: string;
|
|
8
|
+
keywords?: string[];
|
|
9
|
+
/** Truncated excerpt from methods sections. */
|
|
10
|
+
methodsExcerpt?: string;
|
|
11
|
+
/** Truncated excerpt from results sections. */
|
|
12
|
+
resultsExcerpt?: string;
|
|
13
|
+
/** Truncated excerpt from limitations/discussion sections. */
|
|
14
|
+
limitationsExcerpt?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface GenerateDiscoveryQueriesOptions {
|
|
17
|
+
model?: string;
|
|
18
|
+
temperature?: number;
|
|
19
|
+
maxOutputTokens?: number;
|
|
20
|
+
maxAttempts?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Generate 2–3 targeted search queries from seed paper context.
|
|
24
|
+
*
|
|
25
|
+
* Uses Claude to reason about methods, systems, gaps, and adjacent fields
|
|
26
|
+
* in the seed papers and produce queries that would surface complementary
|
|
27
|
+
* work not reachable via citation graph alone.
|
|
28
|
+
*/
|
|
29
|
+
export declare function generateDiscoveryQueries(seeds: SeedContext[], opts?: GenerateDiscoveryQueriesOptions): Promise<LLMResult<DiscoveryQuerySet>>;
|
|
30
|
+
//# sourceMappingURL=generate-discovery-queries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-discovery-queries.d.ts","sourceRoot":"","sources":["../../src/analysis/generate-discovery-queries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAA2B,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAG5E,2DAA2D;AAC3D,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8DAA8D;IAC9D,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,+BAA+B;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,WAAW,EAAE,EACpB,IAAI,CAAC,EAAE,+BAA+B,GACrC,OAAO,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,CAevC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { generateWithSchema } from "../ai/claude/generate";
|
|
2
|
+
import { DiscoveryQuerySetSchema } from "./schemas";
|
|
3
|
+
import { buildDiscoveryQueryPrompt } from "./prompts";
|
|
4
|
+
/**
|
|
5
|
+
* Generate 2–3 targeted search queries from seed paper context.
|
|
6
|
+
*
|
|
7
|
+
* Uses Claude to reason about methods, systems, gaps, and adjacent fields
|
|
8
|
+
* in the seed papers and produce queries that would surface complementary
|
|
9
|
+
* work not reachable via citation graph alone.
|
|
10
|
+
*/
|
|
11
|
+
export async function generateDiscoveryQueries(seeds, opts) {
|
|
12
|
+
const messages = buildDiscoveryQueryPrompt(seeds);
|
|
13
|
+
return generateWithSchema({
|
|
14
|
+
messages,
|
|
15
|
+
schema: DiscoveryQuerySetSchema,
|
|
16
|
+
options: {
|
|
17
|
+
model: opts?.model ?? "sonnet",
|
|
18
|
+
temperature: opts?.temperature ?? 0.6,
|
|
19
|
+
maxOutputTokens: opts?.maxOutputTokens ?? 2048,
|
|
20
|
+
},
|
|
21
|
+
retry: {
|
|
22
|
+
maxAttempts: opts?.maxAttempts ?? 2,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=generate-discovery-queries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-discovery-queries.js","sourceRoot":"","sources":["../../src/analysis/generate-discovery-queries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAA0B,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAuBtD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,KAAoB,EACpB,IAAsC;IAEtC,MAAM,QAAQ,GAAG,yBAAyB,CAAC,KAAK,CAAC,CAAC;IAElD,OAAO,kBAAkB,CAAoB;QAC3C,QAAQ;QACR,MAAM,EAAE,uBAAuB;QAC/B,OAAO,EAAE;YACP,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,QAAQ;YAC9B,WAAW,EAAE,IAAI,EAAE,WAAW,IAAI,GAAG;YACrC,eAAe,EAAE,IAAI,EAAE,eAAe,IAAI,IAAI;SAC/C;QACD,KAAK,EAAE;YACL,WAAW,EAAE,IAAI,EAAE,WAAW,IAAI,CAAC;SACpC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { LLMResult } from "../ai/types";
|
|
2
|
-
import { type HypothesisSet, type
|
|
2
|
+
import { type HypothesisSet, type Landscape } from "./schemas";
|
|
3
|
+
import { type PreparedPaper } from "./prompts";
|
|
3
4
|
export interface GenerateHypothesesOptions {
|
|
4
5
|
model?: string;
|
|
5
6
|
temperature?: number;
|
|
@@ -8,9 +9,10 @@ export interface GenerateHypothesesOptions {
|
|
|
8
9
|
minPerType?: number;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
+
* Generate hypotheses from prepared paper texts and a landscape map.
|
|
12
13
|
*
|
|
13
|
-
*
|
|
14
|
+
* Takes full paper text (from `mantra prep`) and a structured landscape
|
|
15
|
+
* (from `mantra map`) as dual inputs. Requires at least 2 papers.
|
|
14
16
|
*/
|
|
15
|
-
export declare function generateHypotheses(
|
|
17
|
+
export declare function generateHypotheses(papers: PreparedPaper[], landscape: Landscape, opts?: GenerateHypothesesOptions): Promise<LLMResult<HypothesisSet>>;
|
|
16
18
|
//# sourceMappingURL=generate-hypotheses.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-hypotheses.d.ts","sourceRoot":"","sources":["../../src/analysis/generate-hypotheses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAuB,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"generate-hypotheses.d.ts","sourceRoot":"","sources":["../../src/analysis/generate-hypotheses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAuB,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACpF,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AAEvE,MAAM,WAAW,yBAAyB;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,aAAa,EAAE,EACvB,SAAS,EAAE,SAAS,EACpB,IAAI,CAAC,EAAE,yBAAyB,GAC/B,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAgBnC"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { generateWithSchema } from "../ai/claude/generate";
|
|
2
2
|
import { HypothesisSetSchema } from "./schemas";
|
|
3
|
-
import {
|
|
3
|
+
import { buildHypothesizePrompt } from "./prompts";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Generate hypotheses from prepared paper texts and a landscape map.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* Takes full paper text (from `mantra prep`) and a structured landscape
|
|
8
|
+
* (from `mantra map`) as dual inputs. Requires at least 2 papers.
|
|
8
9
|
*/
|
|
9
|
-
export async function generateHypotheses(
|
|
10
|
+
export async function generateHypotheses(papers, landscape, opts) {
|
|
10
11
|
const minPerType = opts?.minPerType ?? 1;
|
|
11
|
-
const messages =
|
|
12
|
+
const messages = buildHypothesizePrompt(papers, landscape, { minPerType });
|
|
12
13
|
return generateWithSchema({
|
|
13
14
|
messages,
|
|
14
15
|
schema: HypothesisSetSchema,
|
|
15
16
|
options: {
|
|
16
17
|
model: opts?.model ?? "sonnet",
|
|
17
18
|
temperature: opts?.temperature ?? 0.4,
|
|
18
|
-
maxOutputTokens: opts?.maxOutputTokens ??
|
|
19
|
+
maxOutputTokens: opts?.maxOutputTokens ?? 16384,
|
|
19
20
|
},
|
|
20
21
|
retry: {
|
|
21
22
|
maxAttempts: opts?.maxAttempts ?? 3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-hypotheses.js","sourceRoot":"","sources":["../../src/analysis/generate-hypotheses.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"generate-hypotheses.js","sourceRoot":"","sources":["../../src/analysis/generate-hypotheses.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAsC,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAsB,MAAM,WAAW,CAAC;AAUvE;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,MAAuB,EACvB,SAAoB,EACpB,IAAgC;IAEhC,MAAM,UAAU,GAAG,IAAI,EAAE,UAAU,IAAI,CAAC,CAAC;IACzC,MAAM,QAAQ,GAAG,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;IAE3E,OAAO,kBAAkB,CAAgB;QACvC,QAAQ;QACR,MAAM,EAAE,mBAAmB;QAC3B,OAAO,EAAE;YACP,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,QAAQ;YAC9B,WAAW,EAAE,IAAI,EAAE,WAAW,IAAI,GAAG;YACrC,eAAe,EAAE,IAAI,EAAE,eAAe,IAAI,KAAK;SAChD;QACD,KAAK,EAAE;YACL,WAAW,EAAE,IAAI,EAAE,WAAW,IAAI,CAAC;SACpC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { LLMResult } from "../ai/types";
|
|
2
|
+
import { type Landscape } from "./schemas";
|
|
3
|
+
import { type PreparedPaper } from "./prompts";
|
|
4
|
+
export interface GenerateLandscapeOptions {
|
|
5
|
+
model?: string;
|
|
6
|
+
temperature?: number;
|
|
7
|
+
maxOutputTokens?: number;
|
|
8
|
+
maxAttempts?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Generate a research landscape map from prepared paper texts.
|
|
12
|
+
*
|
|
13
|
+
* Reads the full text of each paper (as produced by `mantra prep`)
|
|
14
|
+
* and produces a structured landscape: domain summary, per-paper roles,
|
|
15
|
+
* cross-paper technique/system indices, connections, and gaps.
|
|
16
|
+
*
|
|
17
|
+
* Requires at least 2 papers for meaningful cross-paper analysis.
|
|
18
|
+
*/
|
|
19
|
+
export declare function generateLandscape(papers: PreparedPaper[], opts?: GenerateLandscapeOptions): Promise<LLMResult<Landscape>>;
|
|
20
|
+
//# sourceMappingURL=generate-landscape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-landscape.d.ts","sourceRoot":"","sources":["../../src/analysis/generate-landscape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/D,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,aAAa,EAAE,EACvB,IAAI,CAAC,EAAE,wBAAwB,GAC9B,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAe/B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { generateWithSchema } from "../ai/claude/generate";
|
|
2
|
+
import { LandscapeSchema } from "./schemas";
|
|
3
|
+
import { buildMapPrompt } from "./prompts";
|
|
4
|
+
/**
|
|
5
|
+
* Generate a research landscape map from prepared paper texts.
|
|
6
|
+
*
|
|
7
|
+
* Reads the full text of each paper (as produced by `mantra prep`)
|
|
8
|
+
* and produces a structured landscape: domain summary, per-paper roles,
|
|
9
|
+
* cross-paper technique/system indices, connections, and gaps.
|
|
10
|
+
*
|
|
11
|
+
* Requires at least 2 papers for meaningful cross-paper analysis.
|
|
12
|
+
*/
|
|
13
|
+
export async function generateLandscape(papers, opts) {
|
|
14
|
+
const messages = buildMapPrompt(papers);
|
|
15
|
+
return generateWithSchema({
|
|
16
|
+
messages,
|
|
17
|
+
schema: LandscapeSchema,
|
|
18
|
+
options: {
|
|
19
|
+
model: opts?.model ?? "sonnet",
|
|
20
|
+
temperature: opts?.temperature ?? 0.2,
|
|
21
|
+
maxOutputTokens: opts?.maxOutputTokens ?? 8192,
|
|
22
|
+
},
|
|
23
|
+
retry: {
|
|
24
|
+
maxAttempts: opts?.maxAttempts ?? 3,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=generate-landscape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-landscape.js","sourceRoot":"","sources":["../../src/analysis/generate-landscape.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAkB,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAsB,MAAM,WAAW,CAAC;AAS/D;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,MAAuB,EACvB,IAA+B;IAE/B,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IAExC,OAAO,kBAAkB,CAAY;QACnC,QAAQ;QACR,MAAM,EAAE,eAAe;QACvB,OAAO,EAAE;YACP,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,QAAQ;YAC9B,WAAW,EAAE,IAAI,EAAE,WAAW,IAAI,GAAG;YACrC,eAAe,EAAE,IAAI,EAAE,eAAe,IAAI,IAAI;SAC/C;QACD,KAAK,EAAE;YACL,WAAW,EAAE,IAAI,EAAE,WAAW,IAAI,CAAC;SACpC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/dist/analysis/index.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
export { getBlocksByCategory } from "./block-filter";
|
|
2
2
|
export type { FilteredBlock } from "./block-filter";
|
|
3
|
-
export { PaperDigestSchema, HypothesisSetSchema, } from "./schemas";
|
|
4
|
-
export type { PaperDigest, Hypothesis, HypothesisSet } from "./schemas";
|
|
5
|
-
export { buildExtractionPrompt, buildHypothesisPrompt } from "./prompts";
|
|
3
|
+
export { PaperDigestSchema, HypothesisSetSchema, LandscapeSchema, DiscoveryQuerySetSchema, } from "./schemas";
|
|
4
|
+
export type { PaperDigest, Hypothesis, HypothesisSet, PursueBy, Landscape, PaperRole, DiscoveryQuery, DiscoveryQuerySet } from "./schemas";
|
|
5
|
+
export { buildExtractionPrompt, buildHypothesisPrompt, buildHypothesizePrompt, buildMapPrompt, buildDiscoveryQueryPrompt } from "./prompts";
|
|
6
|
+
export type { PreparedPaper } from "./prompts";
|
|
6
7
|
export { extractFindings } from "./extract-findings";
|
|
7
8
|
export type { ExtractFindingsOptions } from "./extract-findings";
|
|
8
9
|
export { generateHypotheses } from "./generate-hypotheses";
|
|
9
10
|
export type { GenerateHypothesesOptions } from "./generate-hypotheses";
|
|
11
|
+
export { generateLandscape } from "./generate-landscape";
|
|
12
|
+
export type { GenerateLandscapeOptions } from "./generate-landscape";
|
|
13
|
+
export { generateDiscoveryQueries } from "./generate-discovery-queries";
|
|
14
|
+
export type { GenerateDiscoveryQueriesOptions, SeedContext } from "./generate-discovery-queries";
|
|
10
15
|
export type { SectionCategory } from "./types";
|
|
11
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EACL,iBAAiB,EACjB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,uBAAuB,GACxB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE3I,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAC5I,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,YAAY,EAAE,+BAA+B,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEjG,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/analysis/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { getBlocksByCategory } from "./block-filter";
|
|
2
|
-
export { PaperDigestSchema, HypothesisSetSchema, } from "./schemas";
|
|
3
|
-
export { buildExtractionPrompt, buildHypothesisPrompt } from "./prompts";
|
|
2
|
+
export { PaperDigestSchema, HypothesisSetSchema, LandscapeSchema, DiscoveryQuerySetSchema, } from "./schemas";
|
|
3
|
+
export { buildExtractionPrompt, buildHypothesisPrompt, buildHypothesizePrompt, buildMapPrompt, buildDiscoveryQueryPrompt } from "./prompts";
|
|
4
4
|
export { extractFindings } from "./extract-findings";
|
|
5
5
|
export { generateHypotheses } from "./generate-hypotheses";
|
|
6
|
+
export { generateLandscape } from "./generate-landscape";
|
|
7
|
+
export { generateDiscoveryQueries } from "./generate-discovery-queries";
|
|
6
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OAAO,EACL,iBAAiB,EACjB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,uBAAuB,GACxB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAG5I,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ChatMessage } from "../ai/types";
|
|
2
2
|
import type { FilteredBlock } from "./block-filter";
|
|
3
|
-
import type { PaperDigest } from "./schemas";
|
|
3
|
+
import type { PaperDigest, Landscape } from "./schemas";
|
|
4
|
+
import type { SeedContext } from "./generate-discovery-queries";
|
|
4
5
|
interface PaperMetadata {
|
|
5
6
|
title?: string;
|
|
6
7
|
doi?: string;
|
|
@@ -11,5 +12,14 @@ interface PaperMetadata {
|
|
|
11
12
|
}
|
|
12
13
|
export declare function buildExtractionPrompt(metadata: PaperMetadata, blocks: FilteredBlock[]): ChatMessage[];
|
|
13
14
|
export declare function buildHypothesisPrompt(digests: PaperDigest[], minPerType?: number): ChatMessage[];
|
|
15
|
+
export interface PreparedPaper {
|
|
16
|
+
id: string;
|
|
17
|
+
content: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function buildMapPrompt(papers: PreparedPaper[]): ChatMessage[];
|
|
20
|
+
export declare function buildHypothesizePrompt(papers: PreparedPaper[], landscape: Landscape, opts?: {
|
|
21
|
+
minPerType?: number;
|
|
22
|
+
}): ChatMessage[];
|
|
23
|
+
export declare function buildDiscoveryQueryPrompt(seeds: SeedContext[]): ChatMessage[];
|
|
14
24
|
export {};
|
|
15
25
|
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/analysis/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/analysis/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAIhE,UAAU,aAAa;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,aAAa,EAAE,GACtB,WAAW,EAAE,CAsEf;AAID,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,EAAE,EACtB,UAAU,SAAI,GACb,WAAW,EAAE,CAwEf;AAID,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,WAAW,EAAE,CA2DrE;AAID,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,aAAa,EAAE,EACvB,SAAS,EAAE,SAAS,EACpB,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7B,WAAW,EAAE,CAkFf;AAID,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CA4C7E"}
|
package/dist/analysis/prompts.js
CHANGED
|
@@ -139,4 +139,187 @@ export function buildHypothesisPrompt(digests, minPerType = 1) {
|
|
|
139
139
|
};
|
|
140
140
|
return [system, user];
|
|
141
141
|
}
|
|
142
|
+
export function buildMapPrompt(papers) {
|
|
143
|
+
const system = {
|
|
144
|
+
role: "system",
|
|
145
|
+
content: [
|
|
146
|
+
"You are a scientific research analyst. Given the full text of multiple research papers, produce a structured landscape map of the research space they collectively cover.",
|
|
147
|
+
"",
|
|
148
|
+
"Your task is to analyse these papers and produce:",
|
|
149
|
+
"",
|
|
150
|
+
"DOMAIN SUMMARY: A 1-2 sentence description of the shared scientific landscape across all papers.",
|
|
151
|
+
"",
|
|
152
|
+
"PAPERS: For each paper, summarise its role in the landscape:",
|
|
153
|
+
"- role: one sentence on what this paper contributes",
|
|
154
|
+
"- key_findings: the most important findings (use specific quantitative details when available)",
|
|
155
|
+
"- techniques: key experimental/computational methods used",
|
|
156
|
+
"- systems: key biological systems, organisms, cell lines, proteins, pathways studied",
|
|
157
|
+
"",
|
|
158
|
+
"TECHNIQUES: A cross-paper index of techniques. For each technique, list which papers use it.",
|
|
159
|
+
"",
|
|
160
|
+
"SYSTEMS: A cross-paper index of biological systems. For each system, list which papers study it.",
|
|
161
|
+
"",
|
|
162
|
+
"CONNECTIONS: Identify meaningful connections between papers. Each connection links 2+ papers and has a type:",
|
|
163
|
+
"- complementary_systems: same question, different biological models",
|
|
164
|
+
"- shared_technique: same method applied in different contexts",
|
|
165
|
+
"- shared_system: same biological system studied from different angles",
|
|
166
|
+
"- contradictory_findings: conflicting results or interpretations",
|
|
167
|
+
"- builds_upon: one paper's findings directly extend another's",
|
|
168
|
+
"- methodological_transfer: a technique from one paper could be applied to another's system",
|
|
169
|
+
"- other: connection that doesn't fit the above",
|
|
170
|
+
"",
|
|
171
|
+
"GAPS: Identify knowledge gaps revealed by comparing papers. Each gap has a type:",
|
|
172
|
+
"- unexplored_intersection: a combination of systems/techniques across papers that nobody has tried",
|
|
173
|
+
"- contradiction: conflicting findings that need resolution",
|
|
174
|
+
"- missing_validation: a finding in one paper that lacks validation in a related context",
|
|
175
|
+
"- methodological: a technique from one paper that should have been applied in another",
|
|
176
|
+
"- other: gap that doesn't fit the above",
|
|
177
|
+
"",
|
|
178
|
+
"Rules:",
|
|
179
|
+
"- Use the paper IDs as provided (e.g. '1', '3'). Do not invent new identifiers.",
|
|
180
|
+
"- Extract faithfully from the text. Do not hallucinate findings or connections.",
|
|
181
|
+
"- Focus on connections and gaps that could lead to new research directions.",
|
|
182
|
+
"- Be specific: 'both study kinase inhibitors' is better than 'related topics'.",
|
|
183
|
+
"- Include quantitative details in key_findings when present (effect sizes, p-values, fold changes).",
|
|
184
|
+
].join("\n"),
|
|
185
|
+
};
|
|
186
|
+
const paperTexts = papers.map((p) => {
|
|
187
|
+
return `--- PAPER ${p.id} ---\n\n${p.content}`;
|
|
188
|
+
});
|
|
189
|
+
const user = {
|
|
190
|
+
role: "user",
|
|
191
|
+
content: [
|
|
192
|
+
`# Research Papers (${papers.length})`,
|
|
193
|
+
"",
|
|
194
|
+
paperTexts.join("\n\n"),
|
|
195
|
+
].join("\n"),
|
|
196
|
+
};
|
|
197
|
+
return [system, user];
|
|
198
|
+
}
|
|
199
|
+
// ── Hypothesis generation prompt (paper text + landscape) ────────
|
|
200
|
+
export function buildHypothesizePrompt(papers, landscape, opts) {
|
|
201
|
+
const minPerType = opts?.minPerType ?? 1;
|
|
202
|
+
const system = {
|
|
203
|
+
role: "system",
|
|
204
|
+
content: [
|
|
205
|
+
"You are a scientific hypothesis generator. You are given:",
|
|
206
|
+
"1. A structured landscape map summarising the research space (domain, papers, connections, gaps)",
|
|
207
|
+
"2. The full text of each paper (abstract, methods, results, discussion)",
|
|
208
|
+
"",
|
|
209
|
+
"Use the landscape as your analytical framework — it shows you where the connections and gaps are. Use the full paper text as your primary evidence — it has the detail and nuance you need to form specific, well-grounded hypotheses.",
|
|
210
|
+
"",
|
|
211
|
+
"Generate hypotheses in three categories:",
|
|
212
|
+
"",
|
|
213
|
+
"MECHANISTIC: Propose causal mechanisms that connect findings across papers. These should explain how observed phenomena relate or predict interactions between systems/pathways studied in different papers.",
|
|
214
|
+
"",
|
|
215
|
+
"METHODOLOGICAL: Propose novel combinations of techniques from different papers that could yield new insights, or identify methodological improvements suggested by comparing approaches across papers.",
|
|
216
|
+
"",
|
|
217
|
+
"GAP: Identify knowledge gaps revealed by contradictions, unexplored intersections, or limitations shared across papers, and formulate hypotheses that address them.",
|
|
218
|
+
"",
|
|
219
|
+
`Generate at least ${minPerType} hypothesis per category (${minPerType * 3} total minimum).`,
|
|
220
|
+
"",
|
|
221
|
+
"For each hypothesis, you MUST include a pursue_by section that describes how to find more evidence:",
|
|
222
|
+
"- search_queries: 1-4 targeted academic search queries (3-8 words each) that would find papers to confirm, refute, or refine the hypothesis",
|
|
223
|
+
"- look_for: a guiding question — what kind of evidence are we seeking?",
|
|
224
|
+
"- expand_systems: biological systems worth exploring further in the context of this hypothesis",
|
|
225
|
+
"- expand_techniques: techniques worth exploring further",
|
|
226
|
+
"",
|
|
227
|
+
"Rules:",
|
|
228
|
+
"- Each hypothesis must cite at least 2 papers by their paper_id.",
|
|
229
|
+
"- Each hypothesis must be testable and falsifiable.",
|
|
230
|
+
"- Each hypothesis must be novel: it should go beyond what any single paper concludes.",
|
|
231
|
+
"- Do not propose experiments requiring technology that does not currently exist.",
|
|
232
|
+
"- Provide a concrete testability assessment: the experimental approach and key techniques needed.",
|
|
233
|
+
"- Assign confidence (high, moderate, low) based on strength of supporting evidence.",
|
|
234
|
+
"- Use H1, H2, H3... as hypothesis IDs.",
|
|
235
|
+
"- Ground your hypotheses in specific quantitative findings from the papers when possible.",
|
|
236
|
+
"- The pursue_by search queries should find papers the citation graph would miss — target different angles, not just the same keywords.",
|
|
237
|
+
].join("\n"),
|
|
238
|
+
};
|
|
239
|
+
// Serialize landscape as structured context
|
|
240
|
+
const landscapeParts = [
|
|
241
|
+
"# Research Landscape",
|
|
242
|
+
"",
|
|
243
|
+
`Domain: ${landscape.domain_summary}`,
|
|
244
|
+
"",
|
|
245
|
+
];
|
|
246
|
+
if (landscape.connections.length > 0) {
|
|
247
|
+
landscapeParts.push("## Cross-Paper Connections");
|
|
248
|
+
for (const c of landscape.connections) {
|
|
249
|
+
landscapeParts.push(`- Papers ${c.papers.join(", ")} [${c.type}]: ${c.description}`);
|
|
250
|
+
}
|
|
251
|
+
landscapeParts.push("");
|
|
252
|
+
}
|
|
253
|
+
if (landscape.gaps.length > 0) {
|
|
254
|
+
landscapeParts.push("## Knowledge Gaps");
|
|
255
|
+
for (const g of landscape.gaps) {
|
|
256
|
+
landscapeParts.push(`- [${g.type}] (papers ${g.between.join(", ")}): ${g.description}`);
|
|
257
|
+
}
|
|
258
|
+
landscapeParts.push("");
|
|
259
|
+
}
|
|
260
|
+
// Full paper texts
|
|
261
|
+
const paperTexts = papers.map((p) => {
|
|
262
|
+
return `--- PAPER ${p.id} ---\n\n${p.content}`;
|
|
263
|
+
});
|
|
264
|
+
const user = {
|
|
265
|
+
role: "user",
|
|
266
|
+
content: [
|
|
267
|
+
landscapeParts.join("\n"),
|
|
268
|
+
"",
|
|
269
|
+
`# Full Paper Texts (${papers.length} papers)`,
|
|
270
|
+
"",
|
|
271
|
+
paperTexts.join("\n\n"),
|
|
272
|
+
].join("\n"),
|
|
273
|
+
};
|
|
274
|
+
return [system, user];
|
|
275
|
+
}
|
|
276
|
+
// ── Discovery query generation prompt (seed-based) ──────────────
|
|
277
|
+
export function buildDiscoveryQueryPrompt(seeds) {
|
|
278
|
+
const system = {
|
|
279
|
+
role: "system",
|
|
280
|
+
content: [
|
|
281
|
+
"You are a scientific literature discovery strategist. Given context from one or more seed papers, generate 2–3 targeted search queries for finding complementary research papers.",
|
|
282
|
+
"",
|
|
283
|
+
"Your queries should find papers that would NOT appear in a citation graph of the seeds. Specifically:",
|
|
284
|
+
"",
|
|
285
|
+
"- METHODS: Search for other applications of key techniques used in the seeds, in different biological systems or domains.",
|
|
286
|
+
"- SYSTEM: Search for alternative experimental or computational approaches applied to the same biological system or phenomenon.",
|
|
287
|
+
"- GAP: Search for work that addresses limitations, open questions, or gaps identified in the seeds.",
|
|
288
|
+
"- ADJACENT-FIELD: Search for work in neighboring fields that could inform or be informed by the seeds' findings.",
|
|
289
|
+
"",
|
|
290
|
+
"Rules:",
|
|
291
|
+
"- Do NOT restate seed titles as queries. Queries should surface NEW, complementary work.",
|
|
292
|
+
"- Each query should be 3–8 words, suitable for an academic search engine (Crossref, Google Scholar).",
|
|
293
|
+
"- Prefer specific, precise terms over broad ones.",
|
|
294
|
+
"- Cover different angles — do not generate overlapping queries.",
|
|
295
|
+
"- Label each query with the angle it targets (methods, system, gap, adjacent-field).",
|
|
296
|
+
"- Provide a brief rationale explaining why this query would find papers the citation graph misses.",
|
|
297
|
+
].join("\n"),
|
|
298
|
+
};
|
|
299
|
+
const seedTexts = seeds.map((s, i) => {
|
|
300
|
+
const parts = [`### Seed ${i + 1}: ${s.title}`];
|
|
301
|
+
if (s.doi)
|
|
302
|
+
parts.push(`DOI: ${s.doi}`);
|
|
303
|
+
if (s.abstract)
|
|
304
|
+
parts.push(`Abstract: ${s.abstract}`);
|
|
305
|
+
if (s.keywords?.length)
|
|
306
|
+
parts.push(`Keywords: ${s.keywords.join(", ")}`);
|
|
307
|
+
if (s.methodsExcerpt)
|
|
308
|
+
parts.push(`Methods excerpt: ${s.methodsExcerpt}`);
|
|
309
|
+
if (s.resultsExcerpt)
|
|
310
|
+
parts.push(`Results excerpt: ${s.resultsExcerpt}`);
|
|
311
|
+
if (s.limitationsExcerpt)
|
|
312
|
+
parts.push(`Limitations excerpt: ${s.limitationsExcerpt}`);
|
|
313
|
+
return parts.join("\n");
|
|
314
|
+
});
|
|
315
|
+
const user = {
|
|
316
|
+
role: "user",
|
|
317
|
+
content: [
|
|
318
|
+
`# Seed Papers (${seeds.length})`,
|
|
319
|
+
"",
|
|
320
|
+
seedTexts.join("\n\n"),
|
|
321
|
+
].join("\n"),
|
|
322
|
+
};
|
|
323
|
+
return [system, user];
|
|
324
|
+
}
|
|
142
325
|
//# sourceMappingURL=prompts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/analysis/prompts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/analysis/prompts.ts"],"names":[],"mappings":"AAgBA,MAAM,UAAU,qBAAqB,CACnC,QAAuB,EACvB,MAAuB;IAEvB,MAAM,MAAM,GAAgB;QAC1B,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE;YACP,kHAAkH;YAClH,EAAE;YACF,qDAAqD;YACrD,EAAE;YACF,4NAA4N;YAC5N,EAAE;YACF,0NAA0N;YAC1N,EAAE;YACF,8JAA8J;YAC9J,EAAE;YACF,uTAAuT;YACvT,EAAE;YACF,wKAAwK;YACxK,EAAE;YACF,sHAAsH;YACtH,EAAE;YACF,QAAQ;YACR,gGAAgG;YAChG,qDAAqD;YACrD,gGAAgG;YAChG,4IAA4I;YAC5I,gIAAgI;SACjI,CAAC,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AI,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -141,6 +141,37 @@ export declare const PaperDigestSchema: z.ZodObject<{
|
|
|
141
141
|
}[];
|
|
142
142
|
}>;
|
|
143
143
|
export type PaperDigest = z.infer<typeof PaperDigestSchema>;
|
|
144
|
+
declare const PursueBySchema: z.ZodObject<{
|
|
145
|
+
search_queries: z.ZodArray<z.ZodObject<{
|
|
146
|
+
query: z.ZodString;
|
|
147
|
+
rationale: z.ZodString;
|
|
148
|
+
}, "strip", z.ZodTypeAny, {
|
|
149
|
+
query: string;
|
|
150
|
+
rationale: string;
|
|
151
|
+
}, {
|
|
152
|
+
query: string;
|
|
153
|
+
rationale: string;
|
|
154
|
+
}>, "many">;
|
|
155
|
+
look_for: z.ZodString;
|
|
156
|
+
expand_systems: z.ZodArray<z.ZodString, "many">;
|
|
157
|
+
expand_techniques: z.ZodArray<z.ZodString, "many">;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
search_queries: {
|
|
160
|
+
query: string;
|
|
161
|
+
rationale: string;
|
|
162
|
+
}[];
|
|
163
|
+
look_for: string;
|
|
164
|
+
expand_systems: string[];
|
|
165
|
+
expand_techniques: string[];
|
|
166
|
+
}, {
|
|
167
|
+
search_queries: {
|
|
168
|
+
query: string;
|
|
169
|
+
rationale: string;
|
|
170
|
+
}[];
|
|
171
|
+
look_for: string;
|
|
172
|
+
expand_systems: string[];
|
|
173
|
+
expand_techniques: string[];
|
|
174
|
+
}>;
|
|
144
175
|
declare const HypothesisSchema: z.ZodObject<{
|
|
145
176
|
id: z.ZodString;
|
|
146
177
|
type: z.ZodEnum<["mechanistic", "methodological", "gap"]>;
|
|
@@ -152,50 +183,92 @@ declare const HypothesisSchema: z.ZodObject<{
|
|
|
152
183
|
novelty: z.ZodString;
|
|
153
184
|
testability: z.ZodObject<{
|
|
154
185
|
approach: z.ZodString;
|
|
155
|
-
feasibility: z.ZodEnum<["straightforward", "moderate", "challenging"]>;
|
|
156
186
|
key_techniques: z.ZodArray<z.ZodString, "many">;
|
|
157
187
|
}, "strip", z.ZodTypeAny, {
|
|
158
188
|
approach: string;
|
|
159
|
-
feasibility: "moderate" | "straightforward" | "challenging";
|
|
160
189
|
key_techniques: string[];
|
|
161
190
|
}, {
|
|
162
191
|
approach: string;
|
|
163
|
-
feasibility: "moderate" | "straightforward" | "challenging";
|
|
164
192
|
key_techniques: string[];
|
|
165
193
|
}>;
|
|
194
|
+
pursue_by: z.ZodObject<{
|
|
195
|
+
search_queries: z.ZodArray<z.ZodObject<{
|
|
196
|
+
query: z.ZodString;
|
|
197
|
+
rationale: z.ZodString;
|
|
198
|
+
}, "strip", z.ZodTypeAny, {
|
|
199
|
+
query: string;
|
|
200
|
+
rationale: string;
|
|
201
|
+
}, {
|
|
202
|
+
query: string;
|
|
203
|
+
rationale: string;
|
|
204
|
+
}>, "many">;
|
|
205
|
+
look_for: z.ZodString;
|
|
206
|
+
expand_systems: z.ZodArray<z.ZodString, "many">;
|
|
207
|
+
expand_techniques: z.ZodArray<z.ZodString, "many">;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
search_queries: {
|
|
210
|
+
query: string;
|
|
211
|
+
rationale: string;
|
|
212
|
+
}[];
|
|
213
|
+
look_for: string;
|
|
214
|
+
expand_systems: string[];
|
|
215
|
+
expand_techniques: string[];
|
|
216
|
+
}, {
|
|
217
|
+
search_queries: {
|
|
218
|
+
query: string;
|
|
219
|
+
rationale: string;
|
|
220
|
+
}[];
|
|
221
|
+
look_for: string;
|
|
222
|
+
expand_systems: string[];
|
|
223
|
+
expand_techniques: string[];
|
|
224
|
+
}>;
|
|
166
225
|
}, "strip", z.ZodTypeAny, {
|
|
167
226
|
type: "mechanistic" | "methodological" | "gap";
|
|
168
227
|
id: string;
|
|
169
|
-
statement: string;
|
|
170
228
|
rationale: string;
|
|
229
|
+
statement: string;
|
|
171
230
|
supporting_papers: string[];
|
|
172
231
|
supporting_findings: string[];
|
|
173
232
|
confidence: "moderate" | "high" | "low";
|
|
174
233
|
novelty: string;
|
|
175
234
|
testability: {
|
|
176
235
|
approach: string;
|
|
177
|
-
feasibility: "moderate" | "straightforward" | "challenging";
|
|
178
236
|
key_techniques: string[];
|
|
179
237
|
};
|
|
238
|
+
pursue_by: {
|
|
239
|
+
search_queries: {
|
|
240
|
+
query: string;
|
|
241
|
+
rationale: string;
|
|
242
|
+
}[];
|
|
243
|
+
look_for: string;
|
|
244
|
+
expand_systems: string[];
|
|
245
|
+
expand_techniques: string[];
|
|
246
|
+
};
|
|
180
247
|
}, {
|
|
181
248
|
type: "mechanistic" | "methodological" | "gap";
|
|
182
249
|
id: string;
|
|
183
|
-
statement: string;
|
|
184
250
|
rationale: string;
|
|
251
|
+
statement: string;
|
|
185
252
|
supporting_papers: string[];
|
|
186
253
|
supporting_findings: string[];
|
|
187
254
|
confidence: "moderate" | "high" | "low";
|
|
188
255
|
novelty: string;
|
|
189
256
|
testability: {
|
|
190
257
|
approach: string;
|
|
191
|
-
feasibility: "moderate" | "straightforward" | "challenging";
|
|
192
258
|
key_techniques: string[];
|
|
193
259
|
};
|
|
260
|
+
pursue_by: {
|
|
261
|
+
search_queries: {
|
|
262
|
+
query: string;
|
|
263
|
+
rationale: string;
|
|
264
|
+
}[];
|
|
265
|
+
look_for: string;
|
|
266
|
+
expand_systems: string[];
|
|
267
|
+
expand_techniques: string[];
|
|
268
|
+
};
|
|
194
269
|
}>;
|
|
195
270
|
export declare const HypothesisSetSchema: z.ZodObject<{
|
|
196
|
-
|
|
197
|
-
domain_summary: z.ZodString;
|
|
198
|
-
cross_cutting_themes: z.ZodArray<z.ZodString, "many">;
|
|
271
|
+
paper_count: z.ZodNumber;
|
|
199
272
|
hypotheses: z.ZodArray<z.ZodObject<{
|
|
200
273
|
id: z.ZodString;
|
|
201
274
|
type: z.ZodEnum<["mechanistic", "methodological", "gap"]>;
|
|
@@ -207,86 +280,339 @@ export declare const HypothesisSetSchema: z.ZodObject<{
|
|
|
207
280
|
novelty: z.ZodString;
|
|
208
281
|
testability: z.ZodObject<{
|
|
209
282
|
approach: z.ZodString;
|
|
210
|
-
feasibility: z.ZodEnum<["straightforward", "moderate", "challenging"]>;
|
|
211
283
|
key_techniques: z.ZodArray<z.ZodString, "many">;
|
|
212
284
|
}, "strip", z.ZodTypeAny, {
|
|
213
285
|
approach: string;
|
|
214
|
-
feasibility: "moderate" | "straightforward" | "challenging";
|
|
215
286
|
key_techniques: string[];
|
|
216
287
|
}, {
|
|
217
288
|
approach: string;
|
|
218
|
-
feasibility: "moderate" | "straightforward" | "challenging";
|
|
219
289
|
key_techniques: string[];
|
|
220
290
|
}>;
|
|
291
|
+
pursue_by: z.ZodObject<{
|
|
292
|
+
search_queries: z.ZodArray<z.ZodObject<{
|
|
293
|
+
query: z.ZodString;
|
|
294
|
+
rationale: z.ZodString;
|
|
295
|
+
}, "strip", z.ZodTypeAny, {
|
|
296
|
+
query: string;
|
|
297
|
+
rationale: string;
|
|
298
|
+
}, {
|
|
299
|
+
query: string;
|
|
300
|
+
rationale: string;
|
|
301
|
+
}>, "many">;
|
|
302
|
+
look_for: z.ZodString;
|
|
303
|
+
expand_systems: z.ZodArray<z.ZodString, "many">;
|
|
304
|
+
expand_techniques: z.ZodArray<z.ZodString, "many">;
|
|
305
|
+
}, "strip", z.ZodTypeAny, {
|
|
306
|
+
search_queries: {
|
|
307
|
+
query: string;
|
|
308
|
+
rationale: string;
|
|
309
|
+
}[];
|
|
310
|
+
look_for: string;
|
|
311
|
+
expand_systems: string[];
|
|
312
|
+
expand_techniques: string[];
|
|
313
|
+
}, {
|
|
314
|
+
search_queries: {
|
|
315
|
+
query: string;
|
|
316
|
+
rationale: string;
|
|
317
|
+
}[];
|
|
318
|
+
look_for: string;
|
|
319
|
+
expand_systems: string[];
|
|
320
|
+
expand_techniques: string[];
|
|
321
|
+
}>;
|
|
221
322
|
}, "strip", z.ZodTypeAny, {
|
|
222
323
|
type: "mechanistic" | "methodological" | "gap";
|
|
223
324
|
id: string;
|
|
224
|
-
statement: string;
|
|
225
325
|
rationale: string;
|
|
326
|
+
statement: string;
|
|
226
327
|
supporting_papers: string[];
|
|
227
328
|
supporting_findings: string[];
|
|
228
329
|
confidence: "moderate" | "high" | "low";
|
|
229
330
|
novelty: string;
|
|
230
331
|
testability: {
|
|
231
332
|
approach: string;
|
|
232
|
-
feasibility: "moderate" | "straightforward" | "challenging";
|
|
233
333
|
key_techniques: string[];
|
|
234
334
|
};
|
|
335
|
+
pursue_by: {
|
|
336
|
+
search_queries: {
|
|
337
|
+
query: string;
|
|
338
|
+
rationale: string;
|
|
339
|
+
}[];
|
|
340
|
+
look_for: string;
|
|
341
|
+
expand_systems: string[];
|
|
342
|
+
expand_techniques: string[];
|
|
343
|
+
};
|
|
235
344
|
}, {
|
|
236
345
|
type: "mechanistic" | "methodological" | "gap";
|
|
237
346
|
id: string;
|
|
238
|
-
statement: string;
|
|
239
347
|
rationale: string;
|
|
348
|
+
statement: string;
|
|
240
349
|
supporting_papers: string[];
|
|
241
350
|
supporting_findings: string[];
|
|
242
351
|
confidence: "moderate" | "high" | "low";
|
|
243
352
|
novelty: string;
|
|
244
353
|
testability: {
|
|
245
354
|
approach: string;
|
|
246
|
-
feasibility: "moderate" | "straightforward" | "challenging";
|
|
247
355
|
key_techniques: string[];
|
|
248
356
|
};
|
|
357
|
+
pursue_by: {
|
|
358
|
+
search_queries: {
|
|
359
|
+
query: string;
|
|
360
|
+
rationale: string;
|
|
361
|
+
}[];
|
|
362
|
+
look_for: string;
|
|
363
|
+
expand_systems: string[];
|
|
364
|
+
expand_techniques: string[];
|
|
365
|
+
};
|
|
249
366
|
}>, "many">;
|
|
250
367
|
}, "strip", z.ZodTypeAny, {
|
|
251
|
-
|
|
252
|
-
domain_summary: string;
|
|
253
|
-
cross_cutting_themes: string[];
|
|
368
|
+
paper_count: number;
|
|
254
369
|
hypotheses: {
|
|
255
370
|
type: "mechanistic" | "methodological" | "gap";
|
|
256
371
|
id: string;
|
|
257
|
-
statement: string;
|
|
258
372
|
rationale: string;
|
|
373
|
+
statement: string;
|
|
259
374
|
supporting_papers: string[];
|
|
260
375
|
supporting_findings: string[];
|
|
261
376
|
confidence: "moderate" | "high" | "low";
|
|
262
377
|
novelty: string;
|
|
263
378
|
testability: {
|
|
264
379
|
approach: string;
|
|
265
|
-
feasibility: "moderate" | "straightforward" | "challenging";
|
|
266
380
|
key_techniques: string[];
|
|
267
381
|
};
|
|
382
|
+
pursue_by: {
|
|
383
|
+
search_queries: {
|
|
384
|
+
query: string;
|
|
385
|
+
rationale: string;
|
|
386
|
+
}[];
|
|
387
|
+
look_for: string;
|
|
388
|
+
expand_systems: string[];
|
|
389
|
+
expand_techniques: string[];
|
|
390
|
+
};
|
|
268
391
|
}[];
|
|
269
392
|
}, {
|
|
270
|
-
|
|
271
|
-
domain_summary: string;
|
|
272
|
-
cross_cutting_themes: string[];
|
|
393
|
+
paper_count: number;
|
|
273
394
|
hypotheses: {
|
|
274
395
|
type: "mechanistic" | "methodological" | "gap";
|
|
275
396
|
id: string;
|
|
276
|
-
statement: string;
|
|
277
397
|
rationale: string;
|
|
398
|
+
statement: string;
|
|
278
399
|
supporting_papers: string[];
|
|
279
400
|
supporting_findings: string[];
|
|
280
401
|
confidence: "moderate" | "high" | "low";
|
|
281
402
|
novelty: string;
|
|
282
403
|
testability: {
|
|
283
404
|
approach: string;
|
|
284
|
-
feasibility: "moderate" | "straightforward" | "challenging";
|
|
285
405
|
key_techniques: string[];
|
|
286
406
|
};
|
|
407
|
+
pursue_by: {
|
|
408
|
+
search_queries: {
|
|
409
|
+
query: string;
|
|
410
|
+
rationale: string;
|
|
411
|
+
}[];
|
|
412
|
+
look_for: string;
|
|
413
|
+
expand_systems: string[];
|
|
414
|
+
expand_techniques: string[];
|
|
415
|
+
};
|
|
287
416
|
}[];
|
|
288
417
|
}>;
|
|
289
418
|
export type Hypothesis = z.infer<typeof HypothesisSchema>;
|
|
290
419
|
export type HypothesisSet = z.infer<typeof HypothesisSetSchema>;
|
|
420
|
+
export type PursueBy = z.infer<typeof PursueBySchema>;
|
|
421
|
+
declare const PaperRoleSchema: z.ZodObject<{
|
|
422
|
+
paper_id: z.ZodString;
|
|
423
|
+
title: z.ZodString;
|
|
424
|
+
role: z.ZodString;
|
|
425
|
+
key_findings: z.ZodArray<z.ZodString, "many">;
|
|
426
|
+
techniques: z.ZodArray<z.ZodString, "many">;
|
|
427
|
+
systems: z.ZodArray<z.ZodString, "many">;
|
|
428
|
+
}, "strip", z.ZodTypeAny, {
|
|
429
|
+
title: string;
|
|
430
|
+
role: string;
|
|
431
|
+
paper_id: string;
|
|
432
|
+
techniques: string[];
|
|
433
|
+
systems: string[];
|
|
434
|
+
key_findings: string[];
|
|
435
|
+
}, {
|
|
436
|
+
title: string;
|
|
437
|
+
role: string;
|
|
438
|
+
paper_id: string;
|
|
439
|
+
techniques: string[];
|
|
440
|
+
systems: string[];
|
|
441
|
+
key_findings: string[];
|
|
442
|
+
}>;
|
|
443
|
+
export declare const LandscapeSchema: z.ZodObject<{
|
|
444
|
+
domain_summary: z.ZodString;
|
|
445
|
+
paper_count: z.ZodNumber;
|
|
446
|
+
papers: z.ZodArray<z.ZodObject<{
|
|
447
|
+
paper_id: z.ZodString;
|
|
448
|
+
title: z.ZodString;
|
|
449
|
+
role: z.ZodString;
|
|
450
|
+
key_findings: z.ZodArray<z.ZodString, "many">;
|
|
451
|
+
techniques: z.ZodArray<z.ZodString, "many">;
|
|
452
|
+
systems: z.ZodArray<z.ZodString, "many">;
|
|
453
|
+
}, "strip", z.ZodTypeAny, {
|
|
454
|
+
title: string;
|
|
455
|
+
role: string;
|
|
456
|
+
paper_id: string;
|
|
457
|
+
techniques: string[];
|
|
458
|
+
systems: string[];
|
|
459
|
+
key_findings: string[];
|
|
460
|
+
}, {
|
|
461
|
+
title: string;
|
|
462
|
+
role: string;
|
|
463
|
+
paper_id: string;
|
|
464
|
+
techniques: string[];
|
|
465
|
+
systems: string[];
|
|
466
|
+
key_findings: string[];
|
|
467
|
+
}>, "many">;
|
|
468
|
+
techniques: z.ZodArray<z.ZodObject<{
|
|
469
|
+
name: z.ZodString;
|
|
470
|
+
papers: z.ZodArray<z.ZodString, "many">;
|
|
471
|
+
}, "strip", z.ZodTypeAny, {
|
|
472
|
+
name: string;
|
|
473
|
+
papers: string[];
|
|
474
|
+
}, {
|
|
475
|
+
name: string;
|
|
476
|
+
papers: string[];
|
|
477
|
+
}>, "many">;
|
|
478
|
+
systems: z.ZodArray<z.ZodObject<{
|
|
479
|
+
name: z.ZodString;
|
|
480
|
+
papers: z.ZodArray<z.ZodString, "many">;
|
|
481
|
+
}, "strip", z.ZodTypeAny, {
|
|
482
|
+
name: string;
|
|
483
|
+
papers: string[];
|
|
484
|
+
}, {
|
|
485
|
+
name: string;
|
|
486
|
+
papers: string[];
|
|
487
|
+
}>, "many">;
|
|
488
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
489
|
+
papers: z.ZodArray<z.ZodString, "many">;
|
|
490
|
+
type: z.ZodEnum<["complementary_systems", "shared_technique", "shared_system", "contradictory_findings", "builds_upon", "methodological_transfer", "other"]>;
|
|
491
|
+
description: z.ZodString;
|
|
492
|
+
}, "strip", z.ZodTypeAny, {
|
|
493
|
+
type: "other" | "complementary_systems" | "shared_technique" | "shared_system" | "contradictory_findings" | "builds_upon" | "methodological_transfer";
|
|
494
|
+
description: string;
|
|
495
|
+
papers: string[];
|
|
496
|
+
}, {
|
|
497
|
+
type: "other" | "complementary_systems" | "shared_technique" | "shared_system" | "contradictory_findings" | "builds_upon" | "methodological_transfer";
|
|
498
|
+
description: string;
|
|
499
|
+
papers: string[];
|
|
500
|
+
}>, "many">;
|
|
501
|
+
gaps: z.ZodArray<z.ZodObject<{
|
|
502
|
+
description: z.ZodString;
|
|
503
|
+
between: z.ZodArray<z.ZodString, "many">;
|
|
504
|
+
type: z.ZodEnum<["unexplored_intersection", "contradiction", "missing_validation", "methodological", "other"]>;
|
|
505
|
+
}, "strip", z.ZodTypeAny, {
|
|
506
|
+
type: "other" | "methodological" | "unexplored_intersection" | "contradiction" | "missing_validation";
|
|
507
|
+
description: string;
|
|
508
|
+
between: string[];
|
|
509
|
+
}, {
|
|
510
|
+
type: "other" | "methodological" | "unexplored_intersection" | "contradiction" | "missing_validation";
|
|
511
|
+
description: string;
|
|
512
|
+
between: string[];
|
|
513
|
+
}>, "many">;
|
|
514
|
+
}, "strip", z.ZodTypeAny, {
|
|
515
|
+
techniques: {
|
|
516
|
+
name: string;
|
|
517
|
+
papers: string[];
|
|
518
|
+
}[];
|
|
519
|
+
systems: {
|
|
520
|
+
name: string;
|
|
521
|
+
papers: string[];
|
|
522
|
+
}[];
|
|
523
|
+
paper_count: number;
|
|
524
|
+
papers: {
|
|
525
|
+
title: string;
|
|
526
|
+
role: string;
|
|
527
|
+
paper_id: string;
|
|
528
|
+
techniques: string[];
|
|
529
|
+
systems: string[];
|
|
530
|
+
key_findings: string[];
|
|
531
|
+
}[];
|
|
532
|
+
domain_summary: string;
|
|
533
|
+
connections: {
|
|
534
|
+
type: "other" | "complementary_systems" | "shared_technique" | "shared_system" | "contradictory_findings" | "builds_upon" | "methodological_transfer";
|
|
535
|
+
description: string;
|
|
536
|
+
papers: string[];
|
|
537
|
+
}[];
|
|
538
|
+
gaps: {
|
|
539
|
+
type: "other" | "methodological" | "unexplored_intersection" | "contradiction" | "missing_validation";
|
|
540
|
+
description: string;
|
|
541
|
+
between: string[];
|
|
542
|
+
}[];
|
|
543
|
+
}, {
|
|
544
|
+
techniques: {
|
|
545
|
+
name: string;
|
|
546
|
+
papers: string[];
|
|
547
|
+
}[];
|
|
548
|
+
systems: {
|
|
549
|
+
name: string;
|
|
550
|
+
papers: string[];
|
|
551
|
+
}[];
|
|
552
|
+
paper_count: number;
|
|
553
|
+
papers: {
|
|
554
|
+
title: string;
|
|
555
|
+
role: string;
|
|
556
|
+
paper_id: string;
|
|
557
|
+
techniques: string[];
|
|
558
|
+
systems: string[];
|
|
559
|
+
key_findings: string[];
|
|
560
|
+
}[];
|
|
561
|
+
domain_summary: string;
|
|
562
|
+
connections: {
|
|
563
|
+
type: "other" | "complementary_systems" | "shared_technique" | "shared_system" | "contradictory_findings" | "builds_upon" | "methodological_transfer";
|
|
564
|
+
description: string;
|
|
565
|
+
papers: string[];
|
|
566
|
+
}[];
|
|
567
|
+
gaps: {
|
|
568
|
+
type: "other" | "methodological" | "unexplored_intersection" | "contradiction" | "missing_validation";
|
|
569
|
+
description: string;
|
|
570
|
+
between: string[];
|
|
571
|
+
}[];
|
|
572
|
+
}>;
|
|
573
|
+
export type Landscape = z.infer<typeof LandscapeSchema>;
|
|
574
|
+
export type PaperRole = z.infer<typeof PaperRoleSchema>;
|
|
575
|
+
declare const DiscoveryQuerySchema: z.ZodObject<{
|
|
576
|
+
query: z.ZodString;
|
|
577
|
+
rationale: z.ZodString;
|
|
578
|
+
angle: z.ZodEnum<["methods", "system", "gap", "adjacent-field"]>;
|
|
579
|
+
}, "strip", z.ZodTypeAny, {
|
|
580
|
+
query: string;
|
|
581
|
+
rationale: string;
|
|
582
|
+
angle: "methods" | "gap" | "system" | "adjacent-field";
|
|
583
|
+
}, {
|
|
584
|
+
query: string;
|
|
585
|
+
rationale: string;
|
|
586
|
+
angle: "methods" | "gap" | "system" | "adjacent-field";
|
|
587
|
+
}>;
|
|
588
|
+
export declare const DiscoveryQuerySetSchema: z.ZodObject<{
|
|
589
|
+
queries: z.ZodArray<z.ZodObject<{
|
|
590
|
+
query: z.ZodString;
|
|
591
|
+
rationale: z.ZodString;
|
|
592
|
+
angle: z.ZodEnum<["methods", "system", "gap", "adjacent-field"]>;
|
|
593
|
+
}, "strip", z.ZodTypeAny, {
|
|
594
|
+
query: string;
|
|
595
|
+
rationale: string;
|
|
596
|
+
angle: "methods" | "gap" | "system" | "adjacent-field";
|
|
597
|
+
}, {
|
|
598
|
+
query: string;
|
|
599
|
+
rationale: string;
|
|
600
|
+
angle: "methods" | "gap" | "system" | "adjacent-field";
|
|
601
|
+
}>, "many">;
|
|
602
|
+
}, "strip", z.ZodTypeAny, {
|
|
603
|
+
queries: {
|
|
604
|
+
query: string;
|
|
605
|
+
rationale: string;
|
|
606
|
+
angle: "methods" | "gap" | "system" | "adjacent-field";
|
|
607
|
+
}[];
|
|
608
|
+
}, {
|
|
609
|
+
queries: {
|
|
610
|
+
query: string;
|
|
611
|
+
rationale: string;
|
|
612
|
+
angle: "methods" | "gap" | "system" | "adjacent-field";
|
|
613
|
+
}[];
|
|
614
|
+
}>;
|
|
615
|
+
export type DiscoveryQuery = z.infer<typeof DiscoveryQuerySchema>;
|
|
616
|
+
export type DiscoveryQuerySet = z.infer<typeof DiscoveryQuerySetSchema>;
|
|
291
617
|
export {};
|
|
292
618
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/analysis/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwExB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/analysis/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwExB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AMxB,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;EAMlC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
package/dist/analysis/schemas.js
CHANGED
|
@@ -76,9 +76,17 @@ export const PaperDigestSchema = z.object({
|
|
|
76
76
|
// ── Cross-paper hypothesis synthesis ────────────────────────────────
|
|
77
77
|
const TestabilitySchema = z.object({
|
|
78
78
|
approach: z.string(),
|
|
79
|
-
feasibility: z.enum(["straightforward", "moderate", "challenging"]),
|
|
80
79
|
key_techniques: z.array(z.string()),
|
|
81
80
|
});
|
|
81
|
+
const PursueBySchema = z.object({
|
|
82
|
+
search_queries: z.array(z.object({
|
|
83
|
+
query: z.string().describe("Academic search query (3-8 words)"),
|
|
84
|
+
rationale: z.string().describe("Why this query would find relevant papers"),
|
|
85
|
+
})).min(1).max(4),
|
|
86
|
+
look_for: z.string().describe("What kind of evidence to seek — a guiding question"),
|
|
87
|
+
expand_systems: z.array(z.string()).describe("Biological systems to explore further"),
|
|
88
|
+
expand_techniques: z.array(z.string()).describe("Techniques to explore further"),
|
|
89
|
+
});
|
|
82
90
|
const HypothesisSchema = z.object({
|
|
83
91
|
id: z.string().describe("Hypothesis ID (H1, H2, ...)"),
|
|
84
92
|
type: z.enum(["mechanistic", "methodological", "gap"]),
|
|
@@ -89,11 +97,65 @@ const HypothesisSchema = z.object({
|
|
|
89
97
|
confidence: z.enum(["high", "moderate", "low"]),
|
|
90
98
|
novelty: z.string().describe("What makes this hypothesis novel"),
|
|
91
99
|
testability: TestabilitySchema,
|
|
100
|
+
pursue_by: PursueBySchema,
|
|
92
101
|
});
|
|
93
102
|
export const HypothesisSetSchema = z.object({
|
|
94
|
-
|
|
95
|
-
domain_summary: z.string(),
|
|
96
|
-
cross_cutting_themes: z.array(z.string()),
|
|
103
|
+
paper_count: z.number().int().describe("Number of papers analysed"),
|
|
97
104
|
hypotheses: z.array(HypothesisSchema),
|
|
98
105
|
});
|
|
106
|
+
// ── Research landscape mapping ───────────────────────────────────
|
|
107
|
+
const PaperRoleSchema = z.object({
|
|
108
|
+
paper_id: z.string().describe("Paper identifier matching the input (e.g. '1', '3')"),
|
|
109
|
+
title: z.string(),
|
|
110
|
+
role: z.string().describe("One-sentence summary of this paper's contribution to the landscape"),
|
|
111
|
+
key_findings: z.array(z.string()).describe("Most important findings from this paper"),
|
|
112
|
+
techniques: z.array(z.string()).describe("Key techniques used"),
|
|
113
|
+
systems: z.array(z.string()).describe("Key biological systems studied"),
|
|
114
|
+
});
|
|
115
|
+
const ConnectionSchema = z.object({
|
|
116
|
+
papers: z.array(z.string()).min(2).describe("Paper IDs involved in this connection"),
|
|
117
|
+
type: z.enum([
|
|
118
|
+
"complementary_systems",
|
|
119
|
+
"shared_technique",
|
|
120
|
+
"shared_system",
|
|
121
|
+
"contradictory_findings",
|
|
122
|
+
"builds_upon",
|
|
123
|
+
"methodological_transfer",
|
|
124
|
+
"other",
|
|
125
|
+
]),
|
|
126
|
+
description: z.string().describe("What connects these papers"),
|
|
127
|
+
});
|
|
128
|
+
const GapSchema = z.object({
|
|
129
|
+
description: z.string().describe("What is missing or unexplored"),
|
|
130
|
+
between: z.array(z.string()).describe("Paper IDs that reveal this gap"),
|
|
131
|
+
type: z.enum(["unexplored_intersection", "contradiction", "missing_validation", "methodological", "other"]),
|
|
132
|
+
});
|
|
133
|
+
export const LandscapeSchema = z.object({
|
|
134
|
+
domain_summary: z.string().describe("1-2 sentence description of the shared scientific landscape"),
|
|
135
|
+
paper_count: z.number().int().describe("Number of papers analysed"),
|
|
136
|
+
papers: z.array(PaperRoleSchema).describe("Per-paper analytical summary"),
|
|
137
|
+
techniques: z.array(z.object({
|
|
138
|
+
name: z.string(),
|
|
139
|
+
papers: z.array(z.string()).describe("Paper IDs using this technique"),
|
|
140
|
+
})).describe("Techniques across papers"),
|
|
141
|
+
systems: z.array(z.object({
|
|
142
|
+
name: z.string(),
|
|
143
|
+
papers: z.array(z.string()).describe("Paper IDs studying this system"),
|
|
144
|
+
})).describe("Biological systems across papers"),
|
|
145
|
+
connections: z.array(ConnectionSchema).describe("Cross-paper connections"),
|
|
146
|
+
gaps: z.array(GapSchema).describe("Knowledge gaps revealed by comparing papers"),
|
|
147
|
+
});
|
|
148
|
+
// ── Seed-based discovery query generation ────────────────────────
|
|
149
|
+
const DiscoveryQuerySchema = z.object({
|
|
150
|
+
query: z.string().min(3).describe("Search query string for academic paper discovery"),
|
|
151
|
+
rationale: z.string().describe("Why this query targets complementary work the citation graph would miss"),
|
|
152
|
+
angle: z.enum(["methods", "system", "gap", "adjacent-field"]).describe("What aspect of the seed this query explores"),
|
|
153
|
+
});
|
|
154
|
+
export const DiscoveryQuerySetSchema = z.object({
|
|
155
|
+
queries: z
|
|
156
|
+
.array(DiscoveryQuerySchema)
|
|
157
|
+
.min(2)
|
|
158
|
+
.max(4)
|
|
159
|
+
.describe("2–3 targeted discovery queries derived from seed papers"),
|
|
160
|
+
});
|
|
99
161
|
//# sourceMappingURL=schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/analysis/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,uEAAuE;AAEvE,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC;QACf,OAAO;QACP,SAAS;QACT,YAAY;QACZ,eAAe;QACf,aAAa;QACb,WAAW;QACX,cAAc;QACd,OAAO;KACR,CAAC;IACF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAEH,MAA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AAQ,CAAC,gCAAgC,CAAC;KACvE,CAAC,CACH,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAC9C,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IAC1E,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,6CAA6C,CAAC;CACjF,CAAC,CAAC;AAKH,oEAAoE;AAEpE,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,kDAAkD,CAAC;IACrF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yEAAyE,CAAC;IACzG,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,QAAQ,CACpE,6CAA6C,CAC9C;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,CAAC;SACP,KAAK,CAAC,oBAAoB,CAAC;SAC3B,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,yDAAyD,CAAC;CACvE,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -30,9 +30,15 @@ export { OpenCitationsCitationGraphProvider } from "./sources/opencitations/cita
|
|
|
30
30
|
export { getReferences as cociGetReferences, getCitations as cociGetCitations, } from "./sources/opencitations/client";
|
|
31
31
|
export { searchPapers as s2SearchPapers, getPaperDetails as s2GetPaperDetails, getPaperReferences as s2GetPaperReferences, getPaperCitations as s2GetPaperCitations, } from "./sources/semantic-scholar/client";
|
|
32
32
|
export type { S2Paper, S2Author, S2ExternalIds, S2SearchResponse, S2CitationEdge, S2CitationResponse, S2ClientOpts, } from "./sources/semantic-scholar/client";
|
|
33
|
-
export type { PaperDigest, HypothesisSet, Hypothesis } from "./analysis/schemas";
|
|
34
|
-
export { PaperDigestSchema, HypothesisSetSchema } from "./analysis/schemas";
|
|
33
|
+
export type { PaperDigest, HypothesisSet, Hypothesis, PursueBy, Landscape, PaperRole, DiscoveryQuery, DiscoveryQuerySet } from "./analysis/schemas";
|
|
34
|
+
export { PaperDigestSchema, HypothesisSetSchema, LandscapeSchema, DiscoveryQuerySetSchema } from "./analysis/schemas";
|
|
35
35
|
export { extractFindings } from "./analysis/extract-findings";
|
|
36
36
|
export { generateHypotheses } from "./analysis/generate-hypotheses";
|
|
37
|
+
export { generateLandscape } from "./analysis/generate-landscape";
|
|
38
|
+
export type { GenerateLandscapeOptions } from "./analysis/generate-landscape";
|
|
39
|
+
export { buildMapPrompt } from "./analysis/prompts";
|
|
40
|
+
export type { PreparedPaper } from "./analysis/prompts";
|
|
41
|
+
export { generateDiscoveryQueries } from "./analysis/generate-discovery-queries";
|
|
42
|
+
export type { SeedContext, GenerateDiscoveryQueriesOptions } from "./analysis/generate-discovery-queries";
|
|
37
43
|
export { getBlocksByCategory } from "./analysis/block-filter";
|
|
38
44
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACrE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,YAAY,EACV,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,UAAU,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EACd,WAAW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Y,GACb,MAAM,mCAAmC,CAAC;AAG3C,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACpJ,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AACtH,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,YAAY,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,YAAY,EAAE,WAAW,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AAC1G,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -29,8 +29,11 @@ export { OpenCitationsCitationGraphProvider } from "./sources/opencitations/cita
|
|
|
29
29
|
export { getReferences as cociGetReferences, getCitations as cociGetCitations, } from "./sources/opencitations/client";
|
|
30
30
|
// ── Sources: Semantic Scholar (legacy, retained for ingest paths) ──
|
|
31
31
|
export { searchPapers as s2SearchPapers, getPaperDetails as s2GetPaperDetails, getPaperReferences as s2GetPaperReferences, getPaperCitations as s2GetPaperCitations, } from "./sources/semantic-scholar/client";
|
|
32
|
-
export { PaperDigestSchema, HypothesisSetSchema } from "./analysis/schemas";
|
|
32
|
+
export { PaperDigestSchema, HypothesisSetSchema, LandscapeSchema, DiscoveryQuerySetSchema } from "./analysis/schemas";
|
|
33
33
|
export { extractFindings } from "./analysis/extract-findings";
|
|
34
34
|
export { generateHypotheses } from "./analysis/generate-hypotheses";
|
|
35
|
+
export { generateLandscape } from "./analysis/generate-landscape";
|
|
36
|
+
export { buildMapPrompt } from "./analysis/prompts";
|
|
37
|
+
export { generateDiscoveryQueries } from "./analysis/generate-discovery-queries";
|
|
35
38
|
export { getBlocksByCategory } from "./analysis/block-filter";
|
|
36
39
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,sEAAsE;AACtE,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAEjC,sEAAsE;AACtE,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAsCrE,sEAAsE;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,OAAO,EACL,YAAY,EACZ,SAAS,EACT,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,sEAAsE;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,sEAAsE;AACtE,OAA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