@glossic/core 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/LICENSE +21 -0
- package/dist/index.d.ts +360 -0
- package/dist/index.js +1136 -0
- package/dist/index.js.map +1 -0
- package/package.json +62 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rody Huancas
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Adapter, GlossicConfig, Manifest, Workspace, GlossicUserConfig, Provider, ExtractResult, Unit, Project, CompletionRequest } from '@glossic/schema';
|
|
3
|
+
export { compareStrings, joinPosix, relativePosix, sortBy, toPosix } from '@glossic/schema';
|
|
4
|
+
|
|
5
|
+
declare const DEFAULT_CACHE_PATH = ".glossic/cache.json";
|
|
6
|
+
/** Bumped by hand when the entry shape changes; a mismatch discards the whole file. */
|
|
7
|
+
declare const CACHE_VERSION = "1";
|
|
8
|
+
/** What a unit was documented from, so the next run can tell whether anything moved. */
|
|
9
|
+
declare const CacheEntrySchema: z.ZodObject<{
|
|
10
|
+
unitId: z.ZodString;
|
|
11
|
+
unitHash: z.ZodString;
|
|
12
|
+
promptVersion: z.ZodString;
|
|
13
|
+
model: z.ZodString;
|
|
14
|
+
lang: z.ZodString;
|
|
15
|
+
outputPath: z.ZodString;
|
|
16
|
+
generatedAt: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
type CacheEntry = z.infer<typeof CacheEntrySchema>;
|
|
19
|
+
declare const CacheFileSchema: z.ZodObject<{
|
|
20
|
+
version: z.ZodString;
|
|
21
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
22
|
+
unitId: z.ZodString;
|
|
23
|
+
unitHash: z.ZodString;
|
|
24
|
+
promptVersion: z.ZodString;
|
|
25
|
+
model: z.ZodString;
|
|
26
|
+
lang: z.ZodString;
|
|
27
|
+
outputPath: z.ZodString;
|
|
28
|
+
generatedAt: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
type CacheFile = z.infer<typeof CacheFileSchema>;
|
|
32
|
+
declare const emptyCache: () => CacheFile;
|
|
33
|
+
/** Reads the cache, returning an empty one for a missing, corrupt or outdated file. */
|
|
34
|
+
declare const readCache: (target: string) => Promise<CacheFile>;
|
|
35
|
+
/** JSON with the entries sorted by unit id, so the file does not churn between runs. */
|
|
36
|
+
declare const serializeCache: (cache: CacheFile) => string;
|
|
37
|
+
/** Writes the cache, creating its directory. Returns the absolute path written. */
|
|
38
|
+
declare const writeCache: (cache: CacheFile, target: string) => Promise<string>;
|
|
39
|
+
/** Entries keyed by unit id, for lookups while deciding what to regenerate. */
|
|
40
|
+
declare const indexCache: (cache: CacheFile) => Map<string, CacheEntry>;
|
|
41
|
+
|
|
42
|
+
/** What every pipeline stage needs: where to scan, with which adapters and config. */
|
|
43
|
+
interface PipelineContext {
|
|
44
|
+
root: string;
|
|
45
|
+
adapters: readonly Adapter[];
|
|
46
|
+
config?: GlossicConfig;
|
|
47
|
+
generatedAt?: string;
|
|
48
|
+
}
|
|
49
|
+
interface ScanResult {
|
|
50
|
+
manifest: Manifest;
|
|
51
|
+
workspace: Workspace;
|
|
52
|
+
adapterByProject: Record<string, string>;
|
|
53
|
+
}
|
|
54
|
+
/** Puts the adapters in the order the config asks for, dropping the ones it omits. */
|
|
55
|
+
declare const orderAdapters: (adapters: readonly Adapter[], wanted: readonly string[]) => Adapter[];
|
|
56
|
+
/** Walks the workspace and turns it into a manifest, calling no provider. */
|
|
57
|
+
declare const scan: (ctx: PipelineContext) => Promise<ScanResult>;
|
|
58
|
+
|
|
59
|
+
interface CheckContext extends PipelineContext {
|
|
60
|
+
outDir: string;
|
|
61
|
+
}
|
|
62
|
+
/** One unit weighed against its page: the hash expected against the one on disk. */
|
|
63
|
+
interface CheckEntry {
|
|
64
|
+
unitId: string;
|
|
65
|
+
docPath: string;
|
|
66
|
+
expectedHash: string;
|
|
67
|
+
documentedHash: string | undefined;
|
|
68
|
+
}
|
|
69
|
+
interface CheckResult {
|
|
70
|
+
outDir: string;
|
|
71
|
+
upToDate: CheckEntry[];
|
|
72
|
+
missing: CheckEntry[];
|
|
73
|
+
stale: CheckEntry[];
|
|
74
|
+
orphaned: string[];
|
|
75
|
+
ok: boolean;
|
|
76
|
+
}
|
|
77
|
+
interface DocumentFrontmatter {
|
|
78
|
+
unit: string | undefined;
|
|
79
|
+
hash: string | undefined;
|
|
80
|
+
}
|
|
81
|
+
/** The frontmatter of a generated page, empty when the file carries none. */
|
|
82
|
+
declare const readDocFrontmatter: (file: string) => Promise<DocumentFrontmatter>;
|
|
83
|
+
/**
|
|
84
|
+
* Compares the pages on disk against a fresh scan, calling no provider. This
|
|
85
|
+
* is what a CI job runs to fail on documentation nobody regenerated.
|
|
86
|
+
*/
|
|
87
|
+
declare const check: (ctx: CheckContext) => Promise<CheckResult>;
|
|
88
|
+
|
|
89
|
+
/** Config filenames, in the order they are looked for. */
|
|
90
|
+
declare const CONFIG_FILENAMES: string[];
|
|
91
|
+
/** Posix path of the project's config file, when it has one. */
|
|
92
|
+
declare const findConfigFile: (root: string) => Promise<string | undefined>;
|
|
93
|
+
interface LoadedConfig {
|
|
94
|
+
file: string;
|
|
95
|
+
values: GlossicUserConfig;
|
|
96
|
+
}
|
|
97
|
+
/** Loads and validates glossic.config.ts, ignoring a file that exports nothing usable. */
|
|
98
|
+
declare const loadProjectConfig: (root: string) => Promise<LoadedConfig | undefined>;
|
|
99
|
+
|
|
100
|
+
/** Which source decided one option's value; `glossic doctor` prints it. */
|
|
101
|
+
type ConfigOrigin = "flag" | "project" | "preference" | "default";
|
|
102
|
+
type ConfigOrigins = Record<string, ConfigOrigin>;
|
|
103
|
+
interface ConfigSources {
|
|
104
|
+
flags?: GlossicUserConfig | undefined;
|
|
105
|
+
project?: GlossicUserConfig | undefined;
|
|
106
|
+
preference?: GlossicUserConfig | undefined;
|
|
107
|
+
}
|
|
108
|
+
interface ResolvedConfig {
|
|
109
|
+
config: GlossicConfig;
|
|
110
|
+
origins: ConfigOrigins;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Merges the sources under one precedence chain (flags, project config, saved
|
|
114
|
+
* preference, schema defaults) and records which one won each key.
|
|
115
|
+
*/
|
|
116
|
+
declare const resolveConfig: (sources?: ConfigSources) => ResolvedConfig;
|
|
117
|
+
/** The options that change how files become units, and so invalidate a scan. */
|
|
118
|
+
declare const GROUPING_KEYS: readonly ["include", "exclude", "ignoreUnits", "excludeFromContent", "mergeChildrenInto", "minUnitFiles", "maxUnitFiles"];
|
|
119
|
+
|
|
120
|
+
/** Placeholder for a code path that is scaffolded but not written yet. */
|
|
121
|
+
declare class NotImplementedError extends Error {
|
|
122
|
+
constructor(what: string);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Nothing on this machine can write prose. The message is the install
|
|
126
|
+
* instructions, because this is the first wall a new user hits.
|
|
127
|
+
*/
|
|
128
|
+
declare class NoProviderAvailableError extends Error {
|
|
129
|
+
readonly tried: string[];
|
|
130
|
+
constructor(tried: readonly string[]);
|
|
131
|
+
}
|
|
132
|
+
/** The provider named by a flag or by the config does not exist. */
|
|
133
|
+
declare class UnknownProviderError extends Error {
|
|
134
|
+
constructor(requested: string, known: readonly string[]);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** `sleep` and `onRetry` exist so a test can drive the loop without waiting. */
|
|
138
|
+
interface RetryOptions {
|
|
139
|
+
attempts?: number;
|
|
140
|
+
baseDelayMs?: number;
|
|
141
|
+
sleep?: (ms: number) => Promise<void>;
|
|
142
|
+
onRetry?: (attempt: number, error: unknown) => void;
|
|
143
|
+
}
|
|
144
|
+
/** Exponential backoff: the delay doubles with every attempt. */
|
|
145
|
+
declare const backoffDelay: (attempt: number, baseDelayMs: number) => number;
|
|
146
|
+
/** Runs a task again while it fails with a retryable provider error. */
|
|
147
|
+
declare const withRetry: <T>(task: () => Promise<T>, options?: RetryOptions) => Promise<T>;
|
|
148
|
+
|
|
149
|
+
interface GenerateContext extends PipelineContext {
|
|
150
|
+
outDir: string;
|
|
151
|
+
provider?: Provider;
|
|
152
|
+
dryRun?: boolean;
|
|
153
|
+
force?: boolean;
|
|
154
|
+
only?: string;
|
|
155
|
+
cachePath?: string;
|
|
156
|
+
retry?: RetryOptions;
|
|
157
|
+
onEvent?: (event: GenerateEvent) => void;
|
|
158
|
+
}
|
|
159
|
+
type UnitOutcome = "generated" | "cached" | "failed";
|
|
160
|
+
type GenerateEvent = {
|
|
161
|
+
type: "unit-start";
|
|
162
|
+
unitId: string;
|
|
163
|
+
index: number;
|
|
164
|
+
total: number;
|
|
165
|
+
} | {
|
|
166
|
+
type: "unit-done";
|
|
167
|
+
unitId: string;
|
|
168
|
+
index: number;
|
|
169
|
+
total: number;
|
|
170
|
+
outcome: UnitOutcome;
|
|
171
|
+
durationMs: number;
|
|
172
|
+
};
|
|
173
|
+
type GenerateReason = "cached" | "new" | "content-changed" | "prompt-version-changed" | "model-changed" | "lang-changed" | "output-missing" | "forced";
|
|
174
|
+
interface GeneratePlanEntry {
|
|
175
|
+
unitId: string;
|
|
176
|
+
docPath: string;
|
|
177
|
+
files: number;
|
|
178
|
+
estimatedTokens: number;
|
|
179
|
+
reason: GenerateReason;
|
|
180
|
+
regenerate: boolean;
|
|
181
|
+
}
|
|
182
|
+
interface GenerateWarning {
|
|
183
|
+
unitId: string;
|
|
184
|
+
message: string;
|
|
185
|
+
}
|
|
186
|
+
interface GenerateFailure {
|
|
187
|
+
unitId: string;
|
|
188
|
+
reason: string;
|
|
189
|
+
code: string | undefined;
|
|
190
|
+
detail: string | undefined;
|
|
191
|
+
}
|
|
192
|
+
interface GenerateResult {
|
|
193
|
+
manifest: Manifest;
|
|
194
|
+
written: string[];
|
|
195
|
+
plan: GeneratePlanEntry[];
|
|
196
|
+
failures: GenerateFailure[];
|
|
197
|
+
warnings: GenerateWarning[];
|
|
198
|
+
filteredOut: string[];
|
|
199
|
+
estimatedTokens: number;
|
|
200
|
+
savedTokens: number;
|
|
201
|
+
generated: number;
|
|
202
|
+
fromCache: number;
|
|
203
|
+
dryRun: boolean;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** The model a cache entry was written under, with a name for the unset case. */
|
|
207
|
+
declare const modelCacheKey: (config: GlossicConfig) => string;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Scans, works out what the cache still covers, and writes a page for the
|
|
211
|
+
* rest. With no provider, or with dryRun, it stops at the plan and spends nothing.
|
|
212
|
+
*/
|
|
213
|
+
declare const generate: (ctx: GenerateContext) => Promise<GenerateResult>;
|
|
214
|
+
|
|
215
|
+
declare const DEFAULT_MANIFEST_PATH = ".glossic/manifest.json";
|
|
216
|
+
interface BuildManifestOptions {
|
|
217
|
+
generatedAt?: string;
|
|
218
|
+
}
|
|
219
|
+
/** Assembles the manifest, sorting every list so two runs over the same code match. */
|
|
220
|
+
declare const buildManifest: (workspace: Workspace, results: readonly ExtractResult[], options?: BuildManifestOptions) => Manifest;
|
|
221
|
+
/** The manifest as it lands on disk: JSON, two-space indent, trailing newline. */
|
|
222
|
+
declare const serializeManifest: (manifest: Manifest) => string;
|
|
223
|
+
/** Writes the manifest, creating its directory. Returns the absolute path written. */
|
|
224
|
+
declare const writeManifest: (manifest: Manifest, target: string) => Promise<string>;
|
|
225
|
+
/** Reads and validates a manifest, or undefined when it is missing or invalid. */
|
|
226
|
+
declare const readManifest: (target: string) => Promise<Manifest | undefined>;
|
|
227
|
+
|
|
228
|
+
/** Where a unit's page goes, relative to the output directory. */
|
|
229
|
+
declare const unitDocPath: (unit: Unit) => string;
|
|
230
|
+
declare const INDEX_DOC_PATH = "index.md";
|
|
231
|
+
interface RenderUnitDocInput {
|
|
232
|
+
unit: Unit;
|
|
233
|
+
project: Project;
|
|
234
|
+
body: string;
|
|
235
|
+
generatedAt: string;
|
|
236
|
+
}
|
|
237
|
+
/** One unit's page: frontmatter carrying the hash, then the prose the provider wrote. */
|
|
238
|
+
declare const renderUnitDoc: (input: RenderUnitDocInput) => string;
|
|
239
|
+
interface RenderIndexDocInput {
|
|
240
|
+
manifest: Manifest;
|
|
241
|
+
generatedAt: string;
|
|
242
|
+
}
|
|
243
|
+
/** The index page listing every unit in the workspace. */
|
|
244
|
+
declare const renderIndexDoc: (input: RenderIndexDocInput) => string;
|
|
245
|
+
|
|
246
|
+
/** A file longer than this is truncated before it goes into a prompt. */
|
|
247
|
+
declare const MAX_FILE_BYTES = 24000;
|
|
248
|
+
interface UnitSource {
|
|
249
|
+
path: string;
|
|
250
|
+
language: string;
|
|
251
|
+
content: string;
|
|
252
|
+
truncated: boolean;
|
|
253
|
+
}
|
|
254
|
+
interface BuildPromptInput {
|
|
255
|
+
unit: Unit;
|
|
256
|
+
project: Project;
|
|
257
|
+
workspaceName: string;
|
|
258
|
+
sources: readonly UnitSource[];
|
|
259
|
+
lang: string;
|
|
260
|
+
model?: string | undefined;
|
|
261
|
+
temperature?: number | undefined;
|
|
262
|
+
}
|
|
263
|
+
/** Bumped by hand when the prompt changes, which invalidates every cached unit. */
|
|
264
|
+
declare const PROMPT_VERSION = "3";
|
|
265
|
+
/** The rules the model is held to; assertDocumentContent checks the answer against them. */
|
|
266
|
+
declare const SYSTEM_PROMPT: string;
|
|
267
|
+
/** Turns a unit and its sources into the one request a provider will answer. */
|
|
268
|
+
declare const buildUnitPrompt: (input: BuildPromptInput) => CompletionRequest;
|
|
269
|
+
/** Reads a unit's documentable files, truncating any that run too long. */
|
|
270
|
+
declare const readUnitSources: (root: string, unit: Unit) => Promise<UnitSource[]>;
|
|
271
|
+
/** Rough token count, for the estimate a dry run prints before anything is spent. */
|
|
272
|
+
declare const estimateTokens: (request: CompletionRequest) => number;
|
|
273
|
+
|
|
274
|
+
/** Auto-detection order: the local CLI first, the paid API second. */
|
|
275
|
+
declare const PROVIDER_PREFERENCE: string[];
|
|
276
|
+
interface ResolveProviderOptions {
|
|
277
|
+
providers: readonly Provider[];
|
|
278
|
+
config?: Pick<GlossicConfig, "provider"> | undefined;
|
|
279
|
+
requested?: string | undefined;
|
|
280
|
+
}
|
|
281
|
+
interface ProviderStatus {
|
|
282
|
+
name: string;
|
|
283
|
+
available: boolean;
|
|
284
|
+
}
|
|
285
|
+
/** Asks every provider whether it can run, in preference order. Never throws. */
|
|
286
|
+
declare const probeProviders: (providers: readonly Provider[]) => Promise<ProviderStatus[]>;
|
|
287
|
+
/**
|
|
288
|
+
* The provider to use: the one named by a flag or the config, otherwise the
|
|
289
|
+
* first one available in preference order.
|
|
290
|
+
*/
|
|
291
|
+
declare const resolveProvider: (options: ResolveProviderOptions) => Promise<Provider>;
|
|
292
|
+
|
|
293
|
+
/** A name-keyed collection of adapters or providers, kept in insertion order. */
|
|
294
|
+
declare class Registry<T extends {
|
|
295
|
+
name: string;
|
|
296
|
+
}> {
|
|
297
|
+
#private;
|
|
298
|
+
register(item: T): this;
|
|
299
|
+
get(name: string): T | undefined;
|
|
300
|
+
has(name: string): boolean;
|
|
301
|
+
list(): T[];
|
|
302
|
+
get size(): number;
|
|
303
|
+
}
|
|
304
|
+
type AdapterRegistry = Registry<Adapter>;
|
|
305
|
+
type ProviderRegistry = Registry<Provider>;
|
|
306
|
+
declare const createAdapterRegistry: (adapters?: Adapter[]) => AdapterRegistry;
|
|
307
|
+
declare const createProviderRegistry: (providers?: Provider[]) => ProviderRegistry;
|
|
308
|
+
|
|
309
|
+
/** A provider that records what it was asked, for assertions. */
|
|
310
|
+
interface FakeProvider extends Provider {
|
|
311
|
+
readonly calls: CompletionRequest[];
|
|
312
|
+
}
|
|
313
|
+
interface FakeProviderOptions {
|
|
314
|
+
name?: string;
|
|
315
|
+
available?: boolean;
|
|
316
|
+
respond?: (request: CompletionRequest, index: number) => string;
|
|
317
|
+
}
|
|
318
|
+
/** A provider that answers from memory, so a test can drive the pipeline end to end. */
|
|
319
|
+
declare const createFakeProvider: (options?: FakeProviderOptions) => FakeProvider;
|
|
320
|
+
|
|
321
|
+
/** True when the path can be reached; never throws. */
|
|
322
|
+
declare const pathExists: (target: string) => Promise<boolean>;
|
|
323
|
+
/** File contents, or undefined when it cannot be read. */
|
|
324
|
+
declare const readText: (target: string) => Promise<string | undefined>;
|
|
325
|
+
/** Parsed JSON, or undefined when the file is missing or malformed. */
|
|
326
|
+
declare const readJson: <T>(target: string) => Promise<T | undefined>;
|
|
327
|
+
|
|
328
|
+
/** Under this many characters the answer reads as a refusal, not as a document. */
|
|
329
|
+
declare const MIN_DOCUMENT_LENGTH = 200;
|
|
330
|
+
/** Over this, what precedes the first heading is an answer rather than a preamble. */
|
|
331
|
+
declare const MAX_PREAMBLE_LENGTH = 500;
|
|
332
|
+
interface NormalizedDocument {
|
|
333
|
+
body: string;
|
|
334
|
+
preamble: string | undefined;
|
|
335
|
+
}
|
|
336
|
+
/** Shortens text for an error message, onto a single line. */
|
|
337
|
+
declare const excerpt: (text: string, limit: number) => string;
|
|
338
|
+
/** Splits a response into the document and whatever the model said before it. */
|
|
339
|
+
declare const normalizeDocument: (providerName: string, text: string) => NormalizedDocument;
|
|
340
|
+
interface ContentProblem {
|
|
341
|
+
reason: string;
|
|
342
|
+
excerpt: string;
|
|
343
|
+
}
|
|
344
|
+
/** The first conversational tell in the text, ignoring fenced code. */
|
|
345
|
+
declare const findContentProblem: (text: string) => ContentProblem | undefined;
|
|
346
|
+
/** Throws a ProviderError when the response reads as conversation, not documentation. */
|
|
347
|
+
declare const assertDocumentContent: (providerName: string, text: string) => void;
|
|
348
|
+
interface PreparedDocument {
|
|
349
|
+
body: string;
|
|
350
|
+
droppedPreamble: string | undefined;
|
|
351
|
+
}
|
|
352
|
+
/** Normalises and validates in one pass: what generate writes is what survives this. */
|
|
353
|
+
declare const prepareDocument: (providerName: string, text: string) => PreparedDocument;
|
|
354
|
+
|
|
355
|
+
/** Identifies the repository and lists its projects, monorepo or not. */
|
|
356
|
+
declare const resolveWorkspace: (root: string) => Promise<Workspace>;
|
|
357
|
+
|
|
358
|
+
declare const CORE_VERSION: string;
|
|
359
|
+
|
|
360
|
+
export { type AdapterRegistry, type BuildManifestOptions, type BuildPromptInput, CACHE_VERSION, CONFIG_FILENAMES, CORE_VERSION, type CacheEntry, CacheEntrySchema, type CacheFile, CacheFileSchema, type CheckContext, type CheckEntry, type CheckResult, type ConfigOrigin, type ConfigOrigins, type ConfigSources, type ContentProblem, DEFAULT_CACHE_PATH, DEFAULT_MANIFEST_PATH, type FakeProvider, type FakeProviderOptions, GROUPING_KEYS, type GenerateContext, type GenerateEvent, type GenerateFailure, type GeneratePlanEntry, type GenerateReason, type GenerateResult, type GenerateWarning, INDEX_DOC_PATH, type LoadedConfig, MAX_FILE_BYTES, MAX_PREAMBLE_LENGTH, MIN_DOCUMENT_LENGTH, NoProviderAvailableError, type NormalizedDocument, NotImplementedError, PROMPT_VERSION, PROVIDER_PREFERENCE, type PipelineContext, type PreparedDocument, type ProviderRegistry, type ProviderStatus, Registry, type RenderIndexDocInput, type RenderUnitDocInput, type ResolveProviderOptions, type ResolvedConfig, type RetryOptions, SYSTEM_PROMPT, type ScanResult, type UnitOutcome, type UnitSource, UnknownProviderError, assertDocumentContent, backoffDelay, buildManifest, buildUnitPrompt, check, createAdapterRegistry, createFakeProvider, createProviderRegistry, emptyCache, estimateTokens, excerpt, findConfigFile, findContentProblem, generate, indexCache, loadProjectConfig, modelCacheKey, normalizeDocument, orderAdapters, pathExists, prepareDocument, probeProviders, readCache, readDocFrontmatter, readJson, readManifest, readText, readUnitSources, renderIndexDoc, renderUnitDoc, resolveConfig, resolveProvider, resolveWorkspace, scan, serializeCache, serializeManifest, unitDocPath, withRetry, writeCache, writeManifest };
|