@c3-oss/prosa 0.2.0 → 0.3.1
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/bin/prosa.js +368 -216
- package/dist/bin/prosa.js.map +1 -1
- package/dist/cli/main.js +368 -216
- package/dist/cli/main.js.map +1 -1
- package/dist/index.d.ts +59 -7
- package/dist/index.js +2273 -2136
- package/dist/index.js.map +1 -1
- package/package.json +18 -2
package/dist/index.d.ts
CHANGED
|
@@ -84,7 +84,8 @@ declare function getText(bundle: Bundle, objectId: ObjectId): Promise<string>;
|
|
|
84
84
|
declare function getJson<T = unknown>(bundle: Bundle, objectId: ObjectId): Promise<T>;
|
|
85
85
|
declare function getObjectMeta(bundle: Bundle, objectId: ObjectId): ObjectMeta | null;
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
declare const SOURCE_TOOLS: readonly ["cursor", "codex", "claude", "gemini"];
|
|
88
|
+
type SourceTool = (typeof SOURCE_TOOLS)[number];
|
|
88
89
|
type Confidence = 'high' | 'medium' | 'low';
|
|
89
90
|
type MessageRole = 'system_prompt' | 'developer' | 'user' | 'assistant' | 'tool' | 'operational';
|
|
90
91
|
type CanonicalToolType = 'shell' | 'read_file' | 'write_file' | 'edit_file' | 'search_file' | 'web_search' | 'mcp' | 'subagent' | 'patch' | 'other';
|
|
@@ -274,6 +275,62 @@ interface SearchOptions {
|
|
|
274
275
|
*/
|
|
275
276
|
declare function searchFullText(bundle: Bundle, options: SearchOptions): SearchHit[];
|
|
276
277
|
|
|
278
|
+
type CompileLogger = Pick<Logger, 'child' | 'debug' | 'error' | 'info' | 'warn'>;
|
|
279
|
+
interface CompileOptions {
|
|
280
|
+
logger?: CompileLogger;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
interface CompileResult$4 {
|
|
284
|
+
batch: ImportBatch;
|
|
285
|
+
counts: ImportCounts;
|
|
286
|
+
}
|
|
287
|
+
interface CompileProviderConfig {
|
|
288
|
+
name: SourceTool;
|
|
289
|
+
description: string;
|
|
290
|
+
pathHelp: string;
|
|
291
|
+
defaultSessionsPath: () => string;
|
|
292
|
+
compile: (bundle: Bundle, root: string, options?: CompileOptions) => Promise<CompileResult$4>;
|
|
293
|
+
}
|
|
294
|
+
interface ProviderCompileSummary {
|
|
295
|
+
source: SourceTool;
|
|
296
|
+
sourcePath: string;
|
|
297
|
+
batchId: string;
|
|
298
|
+
batch: ImportBatch;
|
|
299
|
+
counts: ImportCounts;
|
|
300
|
+
}
|
|
301
|
+
interface TantivyCompileSummary {
|
|
302
|
+
indexedDocCount: number;
|
|
303
|
+
}
|
|
304
|
+
interface CompileImportSummary {
|
|
305
|
+
providers: ProviderCompileSummary[];
|
|
306
|
+
importedAny: boolean;
|
|
307
|
+
tantivy: TantivyCompileSummary | null;
|
|
308
|
+
tantivyError: string | null;
|
|
309
|
+
}
|
|
310
|
+
interface ParquetCompileSummary {
|
|
311
|
+
outDir: string;
|
|
312
|
+
manifestPath: string;
|
|
313
|
+
tableCount: number;
|
|
314
|
+
files: Record<string, string>;
|
|
315
|
+
counts: Record<string, number>;
|
|
316
|
+
}
|
|
317
|
+
declare const COMPILE_PROVIDERS: CompileProviderConfig[];
|
|
318
|
+
declare function getCompileProvider(source: SourceTool): CompileProviderConfig;
|
|
319
|
+
declare function resolveCompilePath(p: string): string;
|
|
320
|
+
declare function runCompileImports(options: {
|
|
321
|
+
bundle: Bundle;
|
|
322
|
+
providers: CompileProviderConfig[];
|
|
323
|
+
deferIndex: boolean;
|
|
324
|
+
sessionsPath?: string;
|
|
325
|
+
logger?: CompileLogger;
|
|
326
|
+
onProviderComplete?: (summary: ProviderCompileSummary) => void;
|
|
327
|
+
onTantivyComplete?: (summary: TantivyCompileSummary) => void;
|
|
328
|
+
}): Promise<CompileImportSummary>;
|
|
329
|
+
declare function exportCompileParquet(options: {
|
|
330
|
+
storePath: string;
|
|
331
|
+
logger?: CompileLogger;
|
|
332
|
+
}): Promise<ParquetCompileSummary>;
|
|
333
|
+
|
|
277
334
|
/**
|
|
278
335
|
* Render a session into Markdown. Big tool outputs aren't dumped inline:
|
|
279
336
|
* we show a preview line plus a `[object: blake3:…]` reference, leaving the
|
|
@@ -304,11 +361,6 @@ interface DuckDbQueryResult {
|
|
|
304
361
|
declare function exportBundleParquet(options: ParquetExportOptions): Promise<ParquetExportResult>;
|
|
305
362
|
declare function queryDuckDbParquet(options: DuckDbQueryOptions): Promise<DuckDbQueryResult>;
|
|
306
363
|
|
|
307
|
-
type CompileLogger = Pick<Logger, 'child' | 'debug' | 'error' | 'info' | 'warn'>;
|
|
308
|
-
interface CompileOptions {
|
|
309
|
-
logger?: CompileLogger;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
364
|
interface CompileResult$3 {
|
|
313
365
|
batch: ImportBatch;
|
|
314
366
|
counts: ImportCounts;
|
|
@@ -333,4 +385,4 @@ interface CompileResult {
|
|
|
333
385
|
}
|
|
334
386
|
declare function compileCursor(bundle: Bundle, root: string, options?: CompileOptions): Promise<CompileResult>;
|
|
335
387
|
|
|
336
|
-
export { type Bundle, type BundleManifest, type CanonicalToolType, type CompileResult$2 as ClaudeCompileResult, type CompileResult$3 as CodexCompileResult, type CompileLogger, type CompileOptions, type Confidence, type CompileResult as CursorCompileResult, type DuckDbQueryOptions, type DuckDbQueryResult, type EdgeType, type CompileResult$1 as GeminiCompileResult, type ImportBatch, type ImportCounts, type MessageRole, type ObjectId, type ObjectMeta, PARQUET_TABLES, PROSA_PARSER_VERSION, PROSA_SCHEMA_VERSION, type ParquetExportOptions, type ParquetExportResult, type ParquetTable, type RegisterResult, type SearchEngine, type SearchHit, type SearchIndexStatus, type SearchOptions, type SessionDetail, type SessionDetailEvent, type SessionListFilters, type SessionRow, type SessionRowFull, type SourceFileRow, type SourceTool, type ToolCallStatus, closeBundle, compileClaude, compileCodex, compileCursor, compileGemini, countSessions, currentSchemaVersion, defaultBundlePath, disableFts5Triggers, emptyCounts, enableFts5Triggers, exportBundleParquet, exportSessionMarkdown, finishBatch, getBytes, getJson, getObjectMeta, getSearchIndexStatus, getSearchIndexStatuses, getSession, getText, initBundle, listSessions, markIndexesAfterImport, openBundle, putBytes, putJson, putText, queryDuckDbParquet, rebuildFts5Index, rebuildTantivyIndex, recordError, registerSourceFile, runMigrations, searchFullText, startBatch };
|
|
388
|
+
export { type Bundle, type BundleManifest, COMPILE_PROVIDERS, type CanonicalToolType, type CompileResult$2 as ClaudeCompileResult, type CompileResult$3 as CodexCompileResult, type CompileImportSummary, type CompileLogger, type CompileOptions, type CompileProviderConfig, type Confidence, type CompileResult as CursorCompileResult, type DuckDbQueryOptions, type DuckDbQueryResult, type EdgeType, type CompileResult$1 as GeminiCompileResult, type ImportBatch, type ImportCounts, type MessageRole, type ObjectId, type ObjectMeta, PARQUET_TABLES, PROSA_PARSER_VERSION, PROSA_SCHEMA_VERSION, type ParquetCompileSummary, type ParquetExportOptions, type ParquetExportResult, type ParquetTable, type ProviderCompileSummary, type RegisterResult, type SearchEngine, type SearchHit, type SearchIndexStatus, type SearchOptions, type SessionDetail, type SessionDetailEvent, type SessionListFilters, type SessionRow, type SessionRowFull, type SourceFileRow, type SourceTool, type TantivyCompileSummary, type ToolCallStatus, closeBundle, compileClaude, compileCodex, compileCursor, compileGemini, countSessions, currentSchemaVersion, defaultBundlePath, disableFts5Triggers, emptyCounts, enableFts5Triggers, exportBundleParquet, exportCompileParquet, exportSessionMarkdown, finishBatch, getBytes, getCompileProvider, getJson, getObjectMeta, getSearchIndexStatus, getSearchIndexStatuses, getSession, getText, initBundle, listSessions, markIndexesAfterImport, openBundle, putBytes, putJson, putText, queryDuckDbParquet, rebuildFts5Index, rebuildTantivyIndex, recordError, registerSourceFile, resolveCompilePath, runCompileImports, runMigrations, searchFullText, startBatch };
|