@equinor/fusion-framework-cli 13.0.0-cli-search-index.1 → 13.0.0-cli-search-index.3

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +3 -0
  3. package/bin/build/bin.mjs +1 -1
  4. package/bin/build/cli.mjs +3 -3
  5. package/dist/esm/lib/ai/fusion-ai.js.map +1 -0
  6. package/dist/esm/lib/ai/index.js +1 -1
  7. package/dist/esm/lib/ai/index.js.map +1 -1
  8. package/dist/esm/version.js +1 -1
  9. package/dist/types/cli/commands/ai/index.d.ts +3 -0
  10. package/dist/types/cli/commands/ai/search.d.ts +48 -0
  11. package/dist/types/cli/commands/ai/utils/generate-cunk-id.d.ts +7 -0
  12. package/dist/types/cli/commands/ai/utils/git/file-changes.d.ts +21 -0
  13. package/dist/types/cli/commands/ai/utils/git/git-client.d.ts +17 -0
  14. package/dist/types/cli/commands/ai/utils/git/index.d.ts +5 -0
  15. package/dist/types/cli/commands/ai/utils/git/metadata.d.ts +7 -0
  16. package/dist/types/cli/commands/ai/utils/git/status.d.ts +12 -0
  17. package/dist/types/cli/commands/ai/utils/git/types.d.ts +33 -0
  18. package/dist/types/cli/commands/ai/utils/markdown/index.d.ts +2 -0
  19. package/dist/types/cli/commands/ai/utils/markdown/parser.d.ts +21 -0
  20. package/dist/types/cli/commands/ai/utils/markdown/types.d.ts +11 -0
  21. package/dist/types/cli/commands/ai/utils/setup-framework.d.ts +9 -5
  22. package/dist/types/cli/commands/ai/utils/ts-doc/constants.d.ts +5 -0
  23. package/dist/types/cli/commands/ai/utils/ts-doc/extractors.d.ts +28 -0
  24. package/dist/types/cli/commands/ai/utils/ts-doc/index.d.ts +2 -0
  25. package/dist/types/cli/commands/ai/utils/{parse-ts-doc.d.ts → ts-doc/parser.d.ts} +2 -12
  26. package/dist/types/cli/commands/ai/utils/ts-doc/types.d.ts +20 -0
  27. package/dist/types/cli/commands/ai/utils/types.d.ts +2 -0
  28. package/dist/types/lib/ai/index.d.ts +1 -1
  29. package/dist/types/version.d.ts +1 -1
  30. package/package.json +6 -6
  31. package/dist/esm/lib/fusion-ai.js.map +0 -1
  32. package/dist/types/cli/commands/ai/utils/extract-git-metadata.d.ts +0 -49
  33. package/dist/types/cli/commands/ai/utils/parse-markdown.d.ts +0 -9
  34. /package/dist/esm/lib/{fusion-ai.js → ai/fusion-ai.js} +0 -0
  35. /package/dist/types/lib/{fusion-ai.d.ts → ai/fusion-ai.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fusion-ai.js","sourceRoot":"","sources":["../../../../src/lib/ai/fusion-ai.ts"],"names":[],"mappings":"AAwBA,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAkD,EAAE,EAAE,CAAC,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- export { configureFusionAI } from '../fusion-ai.js';
1
+ export { configureFusionAI } from './fusion-ai.js';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/ai/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAuB,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/ai/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAuB,MAAM,gBAAgB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '13.0.0-cli-search-index.1';
2
+ export const version = '13.0.0-cli-search-index.3';
3
3
  //# sourceMappingURL=version.js.map
@@ -6,6 +6,7 @@
6
6
  * Features:
7
7
  * - Interactive chat with AI models
8
8
  * - Document embedding and chunking utilities
9
+ * - Vector store search for validating embeddings
9
10
  * - Configure ai clients
10
11
  * - Test model connections
11
12
  * - Manage API keys and settings
@@ -16,12 +17,14 @@
16
17
  * Subcommands:
17
18
  * chat Interactive chat with AI models
18
19
  * embeddings Document embedding utilities for ai processing
20
+ * search Search the vector store to validate embeddings
19
21
  *
20
22
  * Examples:
21
23
  * $ ffc ai chat
22
24
  * $ ffc ai chat --model gpt-4 --api-key sk-...
23
25
  * $ ffc ai embeddings --dry-run ./src
24
26
  * $ ffc ai embeddings --chunk-size 1000 ./docs/readme.md
27
+ * $ ffc ai search "how to use the framework"
25
28
  */
26
29
  export declare const command: import("commander").Command;
27
30
  export default command;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * CLI command: `ai search`
3
+ *
4
+ * Search the vector store to validate embeddings and retrieve relevant documents.
5
+ *
6
+ * Features:
7
+ * - Semantic search using vector embeddings
8
+ * - Configurable result limits
9
+ * - Filter support for metadata-based filtering
10
+ * - JSON output option for programmatic use
11
+ * - Detailed result display with scores and metadata
12
+ *
13
+ * Usage:
14
+ * $ ffc ai search <query> [options]
15
+ *
16
+ * Options:
17
+ * --limit <number> Maximum number of results to return (default: 10)
18
+ * --filter <expression> OData filter expression for metadata filtering
19
+ * --json Output results as JSON
20
+ * --raw Output raw metadata without normalization
21
+ * --verbose Enable verbose output
22
+ * --openai-api-key <key> API key for Azure OpenAI
23
+ * --openai-api-version <version> API version (default: 2024-02-15-preview)
24
+ * --openai-instance <name> Azure OpenAI instance name
25
+ * --openai-embedding-deployment <name> Azure OpenAI embedding deployment name
26
+ * --azure-search-endpoint <url> Azure Search endpoint URL
27
+ * --azure-search-api-key <key> Azure Search API key
28
+ * --azure-search-index-name <name> Azure Search index name
29
+ *
30
+ * Environment Variables:
31
+ * AZURE_OPENAI_API_KEY API key for Azure OpenAI
32
+ * AZURE_OPENAI_API_VERSION API version
33
+ * AZURE_OPENAI_INSTANCE_NAME Instance name
34
+ * AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME Embedding deployment name
35
+ * AZURE_SEARCH_ENDPOINT Azure Search endpoint
36
+ * AZURE_SEARCH_API_KEY Azure Search API key
37
+ * AZURE_SEARCH_INDEX_NAME Azure Search index name
38
+ *
39
+ * Examples:
40
+ * $ ffc ai search "how to use the framework"
41
+ * $ ffc ai search "authentication" --limit 5
42
+ * $ ffc ai search "typescript" --filter "metadata/source eq 'src/index.ts'"
43
+ * $ ffc ai search "documentation" --json
44
+ * $ ffc ai search "documentation" --json --raw
45
+ * $ ffc ai search "API reference" --verbose
46
+ */
47
+ export declare const command: import("commander").Command;
48
+ export default command;
@@ -1 +1,8 @@
1
+ /**
2
+ * Generates a unique identifier for a document chunk based on file path
3
+ * Creates a deterministic, URL-safe hash from the file path for validation and checks
4
+ * @param filePath - The file path to generate an ID from
5
+ * @param chunkIndex - Optional chunk index to append for multi-chunk documents
6
+ * @returns A base64-encoded hash of the file path, optionally suffixed with chunk index
7
+ */
1
8
  export declare const generateChunkId: (filePath: string, chunkIndex?: number) => string;
@@ -0,0 +1,21 @@
1
+ import type { ChangedFile, GitDiffOptions } from './types.js';
2
+ /**
3
+ * Get list of changed files using git diff with status
4
+ * @param options - Git diff configuration options
5
+ * @returns Array of changed files with their status
6
+ */
7
+ export declare const getChangedFiles: (options: GitDiffOptions) => Promise<ChangedFile[]>;
8
+ /**
9
+ * Determine the git status of a file, including handling renames
10
+ * Returns an array of ChangedFile objects - if the file was renamed, returns both old and new paths
11
+ * @param filePath - Absolute file path to check
12
+ * @returns Promise resolving to array of changed files (1 or 2 items if renamed)
13
+ */
14
+ export declare const getFileStatus: (filePath: string) => Promise<ChangedFile[]>;
15
+ /**
16
+ * Check if a file path matches any of the changed files
17
+ * @param filePath - File path to check
18
+ * @param changedFiles - Array of changed file objects
19
+ * @returns True if file has changed
20
+ */
21
+ export declare const isFileChanged: (filePath: string, changedFiles: ChangedFile[]) => boolean;
@@ -0,0 +1,17 @@
1
+ import { type SimpleGit } from 'simple-git';
2
+ /**
3
+ * Resolve the project root (git repository root) for a given file path
4
+ * @param filePath - File path to resolve from
5
+ * @returns Project root path or undefined if not in a git repository
6
+ */
7
+ export declare const resolveProjectRoot: (filePath: string) => string | undefined;
8
+ /**
9
+ * Get or create a SimpleGit instance for a given file path
10
+ * Uses caching to avoid creating multiple instances for the same repository
11
+ * @param filePath - File path to get git instance for
12
+ * @returns Git instance and repository path, or undefined if not in a git repository
13
+ */
14
+ export declare const getGit: (filePath: string) => {
15
+ git: SimpleGit | undefined;
16
+ gitRepoPath: string;
17
+ } | undefined;
@@ -0,0 +1,5 @@
1
+ export type { GitMetadata, GitDiffOptions, FileChangeStatus, ChangedFile, } from './types.js';
2
+ export { resolveProjectRoot, getGit } from './git-client.js';
3
+ export { extractGitMetadata } from './metadata.js';
4
+ export { getChangedFiles, getFileStatus, isFileChanged } from './file-changes.js';
5
+ export { getGitStatus } from './status.js';
@@ -0,0 +1,7 @@
1
+ import type { GitMetadata } from './types.js';
2
+ /**
3
+ * Extract git metadata for a file
4
+ * @param filePath - Absolute file path
5
+ * @returns Git metadata or undefined if not in a git repository
6
+ */
7
+ export declare const extractGitMetadata: (filePath: string) => Promise<GitMetadata | undefined>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Get git status information for debugging
3
+ * @param cwd - Working directory
4
+ * @returns Git status information
5
+ */
6
+ export declare const getGitStatus: (cwd?: string) => Promise<{
7
+ branch: string;
8
+ commit: string;
9
+ hasChanges: boolean;
10
+ stagedFiles: number;
11
+ unstagedFiles: number;
12
+ }>;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Git metadata extracted from repository
3
+ */
4
+ export type GitMetadata = Partial<{
5
+ git_remote_url: string;
6
+ git_commit_hash: string;
7
+ git_commit_date: string;
8
+ git_link: string;
9
+ }>;
10
+ /**
11
+ * Git diff options for filtering changed files
12
+ */
13
+ export interface GitDiffOptions {
14
+ /** Enable diff-based file filtering */
15
+ diff: boolean;
16
+ /** Git reference to compare against (default: HEAD~1) */
17
+ baseRef?: string;
18
+ /** Working directory for git operations */
19
+ cwd?: string;
20
+ }
21
+ /**
22
+ * File change status
23
+ */
24
+ export type FileChangeStatus = 'new' | 'modified' | 'removed';
25
+ /**
26
+ * Changed file information
27
+ */
28
+ export interface ChangedFile {
29
+ /** Absolute file path */
30
+ filepath: string;
31
+ /** Change status: new, modified, or removed */
32
+ status: FileChangeStatus;
33
+ }
@@ -0,0 +1,2 @@
1
+ export type { MarkdownMetadata, MarkdownDocument } from './types.js';
2
+ export { isMarkdownFile, parseMarkdown, parseMarkdownFile } from './parser.js';
@@ -0,0 +1,21 @@
1
+ import type { SourceFile } from '../types.js';
2
+ import type { MarkdownDocument } from './types.js';
3
+ /**
4
+ * Check if a file is a markdown file
5
+ * @param filePath - File path to check
6
+ * @returns True if file has .md extension
7
+ */
8
+ export declare const isMarkdownFile: (filePath: string) => boolean;
9
+ /**
10
+ * Parse markdown content into document chunks
11
+ * @param content - Markdown content string
12
+ * @param source - Source file path
13
+ * @returns Array of markdown documents
14
+ */
15
+ export declare const parseMarkdown: <T extends Record<string, unknown> = Record<string, unknown>>(content: string, source: string) => Promise<MarkdownDocument<T>[]>;
16
+ /**
17
+ * Parse a markdown file into document chunks
18
+ * @param file - Source file object
19
+ * @returns Array of markdown documents with root path metadata
20
+ */
21
+ export declare const parseMarkdownFile: <T extends Record<string, unknown> = Record<string, unknown>>(file: SourceFile) => Promise<MarkdownDocument<T>[]>;
@@ -0,0 +1,11 @@
1
+ import type { VectorStoreDocument, VectorStoreDocumentMetadata } from '@equinor/fusion-framework-module-ai/lib';
2
+ /**
3
+ * Markdown document metadata
4
+ */
5
+ export type MarkdownMetadata<T extends Record<string, unknown> = Record<string, unknown>> = VectorStoreDocumentMetadata<T & {
6
+ type: 'markdown';
7
+ }>;
8
+ /**
9
+ * Markdown document
10
+ */
11
+ export type MarkdownDocument<T extends Record<string, unknown> = Record<string, unknown>> = VectorStoreDocument<MarkdownMetadata<T>>;
@@ -1,6 +1,10 @@
1
- import { type IAIProvider } from '@equinor/fusion-framework-module-ai';
2
- import { type FusionFramework } from '../../../../bin/framework.node.js';
1
+ import { type AIModule } from '@equinor/fusion-framework-module-ai';
3
2
  import type { AiOptions } from '../../../options/ai.js';
4
- export declare const setupFramework: (options: AiOptions) => Promise<FusionFramework & {
5
- ai: IAIProvider;
6
- }>;
3
+ import { type ModulesInstance } from '@equinor/fusion-framework-module';
4
+ /**
5
+ * Initializes and configures the Fusion Framework with AI module capabilities
6
+ * @param options - AI configuration options including API keys, deployments, and vector store settings
7
+ * @returns Promise resolving to an initialized framework instance with AI module
8
+ * @throws {Error} If embedding deployment is required but not provided when configuring vector store
9
+ */
10
+ export declare const setupFramework: (options: AiOptions) => Promise<ModulesInstance<[AIModule]>>;
@@ -0,0 +1,5 @@
1
+ import { SyntaxKind } from 'ts-morph';
2
+ /**
3
+ * Supported TSDoc node kinds for top-level processing
4
+ */
5
+ export declare const nodeKinds: SyntaxKind[];
@@ -0,0 +1,28 @@
1
+ import { type SourceFile as ProjectSourceFile, Node, type ClassDeclaration } from 'ts-morph';
2
+ import type { TypescriptDocument, ParseTsDocOptions } from './types.js';
3
+ /**
4
+ * Extracts a TSDoc document from a class node, including TSDoc, constructor, and public member signatures.
5
+ * @param classNode - The ClassDeclaration node to process.
6
+ * @param sourceFile - The source file containing the node.
7
+ * @param options - Optional parsing configuration.
8
+ * @returns A TypeScript document with TSDoc and class interface, or null if no TSDoc is found.
9
+ */
10
+ export declare const extractDocumentFromClassNode: (classNode: ClassDeclaration, sourceFile: ProjectSourceFile, _options?: ParseTsDocOptions) => TypescriptDocument | null;
11
+ /**
12
+ * Extracts a TSDoc document from a single node.
13
+ * @param node - The TypeScript node to process.
14
+ * @param sourceFile - The source file containing the node.
15
+ * @param options - Optional parsing configuration.
16
+ * @param nodeOptions - Optional node-specific configuration (e.g., skipKindCheck for VariableStatement).
17
+ * @returns A TypeScript document with TSDoc metadata, or null if no TSDoc is found.
18
+ */
19
+ export declare const extractDocumentFromNode: (node: Node, sourceFile: ProjectSourceFile, options?: ParseTsDocOptions, nodeOptions?: {
20
+ skipKindCheck?: boolean;
21
+ }) => TypescriptDocument | null;
22
+ /**
23
+ * Processes a TypeScript source file to extract TSDoc documents.
24
+ * @param sourceFile - The source file to process.
25
+ * @param options - Optional parsing configuration.
26
+ * @returns An array of TypeScript documents with TSDoc metadata.
27
+ */
28
+ export declare const processSourceFile: (sourceFile: ProjectSourceFile, options?: ParseTsDocOptions) => TypescriptDocument[];
@@ -0,0 +1,2 @@
1
+ export type { TypescriptMetadata, TypescriptDocument, ParseTsDocOptions } from './types.js';
2
+ export { isTypescriptFile, parseTsDocSync, parseTsDocFromFileSync } from './parser.js';
@@ -1,15 +1,5 @@
1
- import type { VectorStoreDocument, VectorStoreDocumentMetadata } from '@equinor/fusion-framework-module-ai/lib';
2
- import type { SourceFile } from './types.js';
3
- export type TypescriptMetadata = VectorStoreDocumentMetadata<{
4
- type: 'tsdoc';
5
- ts_kind: string;
6
- ts_name: string;
7
- }>;
8
- export type TypescriptDocument = VectorStoreDocument<TypescriptMetadata>;
9
- export interface ParseTsDocOptions {
10
- /** The project root path for generating relative paths */
11
- projectRoot?: string;
12
- }
1
+ import type { SourceFile } from '../types.js';
2
+ import type { TypescriptDocument, ParseTsDocOptions } from './types.js';
13
3
  /**
14
4
  * Checks if a file is a TypeScript or TSX file based on its extension.
15
5
  * @param filePath - The path to the file.
@@ -0,0 +1,20 @@
1
+ import type { VectorStoreDocument, VectorStoreDocumentMetadata } from '@equinor/fusion-framework-module-ai/lib';
2
+ /**
3
+ * TypeScript document metadata
4
+ */
5
+ export type TypescriptMetadata = VectorStoreDocumentMetadata<{
6
+ type: 'tsdoc';
7
+ ts_kind: string;
8
+ ts_name: string;
9
+ }>;
10
+ /**
11
+ * TypeScript document with TSDoc metadata
12
+ */
13
+ export type TypescriptDocument = VectorStoreDocument<TypescriptMetadata>;
14
+ /**
15
+ * Options for parsing TypeScript documents
16
+ */
17
+ export interface ParseTsDocOptions {
18
+ /** The project root path for generating relative paths */
19
+ projectRoot?: string;
20
+ }
@@ -1,5 +1,7 @@
1
+ export type FileStatus = 'new' | 'modified' | 'removed';
1
2
  export type SourceFile = {
2
3
  path: string;
3
4
  projectRoot?: string;
4
5
  relativePath?: string;
6
+ status: FileStatus;
5
7
  };
@@ -1 +1 @@
1
- export { configureFusionAI, type FusionAIConfig } from '../fusion-ai.js';
1
+ export { configureFusionAI, type FusionAIConfig } from './fusion-ai.js';
@@ -1 +1 @@
1
- export declare const version = "13.0.0-cli-search-index.1";
1
+ export declare const version = "13.0.0-cli-search-index.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-cli",
3
- "version": "13.0.0-cli-search-index.1",
3
+ "version": "13.0.0-cli-search-index.3",
4
4
  "keywords": [
5
5
  "Fusion",
6
6
  "Fusion Framework",
@@ -130,8 +130,8 @@
130
130
  "zod": "^4.1.8",
131
131
  "@equinor/fusion-framework-dev-portal": "1.2.6-cli-search-index.0",
132
132
  "@equinor/fusion-framework-dev-server": "1.1.13-cli-search-index.0",
133
- "@equinor/fusion-imports": "1.1.7-cli-search-index.0",
134
- "@equinor/fusion-framework-module-msal-node": "2.0.1-cli-search-index.0"
133
+ "@equinor/fusion-framework-module-msal-node": "2.0.1-cli-search-index.0",
134
+ "@equinor/fusion-imports": "1.1.7-cli-search-index.0"
135
135
  },
136
136
  "devDependencies": {
137
137
  "@rollup/plugin-commonjs": "^29.0.0",
@@ -154,11 +154,11 @@
154
154
  "type-fest": "^5.0.0",
155
155
  "typescript": "^5.8.2",
156
156
  "vitest": "^3.2.4",
157
+ "@equinor/fusion-framework-module-app": "7.1.1-cli-search-index.0",
158
+ "@equinor/fusion-framework-module-http": "7.0.6-cli-search-index.0",
157
159
  "@equinor/fusion-framework-module": "5.0.6-cli-search-index.0",
158
- "@equinor/fusion-framework-module-ai": "1.1.0-cli-search-index.0",
159
160
  "@equinor/fusion-framework-module-service-discovery": "9.0.5-cli-search-index.0",
160
- "@equinor/fusion-framework-module-app": "7.1.1-cli-search-index.0",
161
- "@equinor/fusion-framework-module-http": "7.0.6-cli-search-index.0"
161
+ "@equinor/fusion-framework-module-ai": "1.1.0-cli-search-index.0"
162
162
  },
163
163
  "peerDependenciesMeta": {
164
164
  "typescript": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"fusion-ai.js","sourceRoot":"","sources":["../../../src/lib/fusion-ai.ts"],"names":[],"mappings":"AAwBA,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAkD,EAAE,EAAE,CAAC,EAAE,CAAC"}
@@ -1,49 +0,0 @@
1
- import { type SimpleGit } from 'simple-git';
2
- export type GitMetadata = Partial<{
3
- git_remote_url: string;
4
- git_commit_hash: string;
5
- git_commit_date: string;
6
- git_link: string;
7
- }>;
8
- /**
9
- * Git diff options for filtering changed files
10
- */
11
- export interface GitDiffOptions {
12
- /** Enable diff-based file filtering */
13
- diff: boolean;
14
- /** Git reference to compare against (default: HEAD~1) */
15
- baseRef?: string;
16
- /** Working directory for git operations */
17
- cwd?: string;
18
- }
19
- export declare const resolveProjectRoot: (filePath: string) => string | undefined;
20
- export declare const getGit: (filePath: string) => {
21
- git: SimpleGit | undefined;
22
- gitRepoPath: string;
23
- } | undefined;
24
- export declare const extractGitMetadata: (filePath: string) => Promise<GitMetadata | undefined>;
25
- /**
26
- * Get list of changed files using git diff
27
- * @param options - Git diff configuration options
28
- * @returns Array of changed file paths
29
- */
30
- export declare const getChangedFiles: (options: GitDiffOptions) => Promise<string[]>;
31
- /**
32
- * Check if a file path matches any of the changed files
33
- * @param filePath - File path to check
34
- * @param changedFiles - Array of changed file paths
35
- * @returns True if file has changed
36
- */
37
- export declare const isFileChanged: (filePath: string, changedFiles: string[]) => boolean;
38
- /**
39
- * Get git status information for debugging
40
- * @param cwd - Working directory
41
- * @returns Git status information
42
- */
43
- export declare const getGitStatus: (cwd?: string) => Promise<{
44
- branch: string;
45
- commit: string;
46
- hasChanges: boolean;
47
- stagedFiles: number;
48
- unstagedFiles: number;
49
- }>;
@@ -1,9 +0,0 @@
1
- import type { VectorStoreDocument, VectorStoreDocumentMetadata } from '@equinor/fusion-framework-module-ai/lib';
2
- import type { SourceFile } from './types.js';
3
- export type MarkdownMetadata<T extends Record<string, unknown> = Record<string, unknown>> = VectorStoreDocumentMetadata<T & {
4
- type: 'markdown';
5
- }>;
6
- export type MarkdownDocument<T extends Record<string, unknown> = Record<string, unknown>> = VectorStoreDocument<MarkdownMetadata<T>>;
7
- export declare const isMarkdownFile: (filePath: string) => boolean;
8
- export declare const parseMarkdown: <T extends Record<string, unknown> = Record<string, unknown>>(content: string, source: string) => Promise<MarkdownDocument<T>[]>;
9
- export declare const parseMarkdownFile: <T extends Record<string, unknown> = Record<string, unknown>>(file: SourceFile) => Promise<MarkdownDocument<T>[]>;
File without changes