@hevmind/ask 0.1.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/src/types.ts ADDED
@@ -0,0 +1,99 @@
1
+ export interface HevAskOptions {
2
+ /**
3
+ * Content collection name(s) to index and search over.
4
+ * @example ['docs']
5
+ */
6
+ collections?: string[];
7
+
8
+ /**
9
+ * Claude model used by the bounded search loop.
10
+ * @default 'claude-haiku-4-5'
11
+ */
12
+ model?: string;
13
+
14
+ /**
15
+ * The route the search endpoint is injected at.
16
+ * @default '/api/ask'
17
+ */
18
+ endpoint?: string;
19
+
20
+ /**
21
+ * Prefix used to turn a document slug into its page URL: `basePath + slug`.
22
+ * @default '/docs/'
23
+ */
24
+ basePath?: string;
25
+
26
+ /**
27
+ * Maximum number of source sections the AI answer may ground in and cite
28
+ * (also the size of the Sources footer). Keyword mode uses it as the result
29
+ * row cap.
30
+ * @default 6
31
+ */
32
+ maxResults?: number;
33
+
34
+ /**
35
+ * Token budget for the streamed AI answer.
36
+ * @default 1024
37
+ */
38
+ answerMaxTokens?: number;
39
+
40
+ /**
41
+ * Model used by the offline digest builder.
42
+ * @default 'claude-opus-4-8'
43
+ */
44
+ digestModel?: string;
45
+
46
+ /**
47
+ * Maximum search tool rounds the model can run before it must present results.
48
+ * @default 4
49
+ */
50
+ maxIterations?: number;
51
+
52
+ /**
53
+ * Highest Markdown heading level used as a chunk boundary.
54
+ * `2` chunks at `##`; `3` chunks at `##` and `###`.
55
+ * @default 3
56
+ */
57
+ chunkHeadingDepth?: number;
58
+
59
+ /**
60
+ * Chunks returned by each search tool call.
61
+ * @default 8
62
+ */
63
+ candidatePerSearch?: number;
64
+
65
+ /**
66
+ * Maximum chunks from the same document returned by one prefilter call.
67
+ * @default 2
68
+ */
69
+ perDocCap?: number;
70
+
71
+ /**
72
+ * Path to the committed ask digest artifact, relative to the site root.
73
+ * @default '.hev-ask/digest.json'
74
+ */
75
+ digestPath?: string;
76
+
77
+ /**
78
+ * Content globs used by the offline digest builder.
79
+ * Defaults to Markdown/MDX files under each configured collection directory.
80
+ */
81
+ digestContentGlobs?: string[];
82
+ }
83
+
84
+ /** The shape the integration serializes into `virtual:hev-ask/config`. */
85
+ export interface ResolvedConfig {
86
+ collections: string[] | null;
87
+ model: string;
88
+ digestModel: string;
89
+ endpoint: string;
90
+ basePath: string;
91
+ maxResults: number;
92
+ answerMaxTokens: number;
93
+ maxIterations: number;
94
+ chunkHeadingDepth: number;
95
+ candidatePerSearch: number;
96
+ perDocCap: number;
97
+ digestPath: string;
98
+ digestContentGlobs?: string[];
99
+ }