bilmem 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/README.md +439 -0
- package/dist/canonical-CglQQ0xc.d.ts +262 -0
- package/dist/cli/index.js +7601 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/index.d.ts +311 -0
- package/dist/core/index.js +1975 -0
- package/dist/core/index.js.map +1 -0
- package/dist/filesystem-B3qAej0l.d.ts +69 -0
- package/dist/index.d.ts +163 -0
- package/dist/index.js +7765 -0
- package/dist/index.js.map +1 -0
- package/dist/install/index.d.ts +373 -0
- package/dist/install/index.js +6632 -0
- package/dist/install/index.js.map +1 -0
- package/dist/jev/index.d.ts +32 -0
- package/dist/jev/index.js +269 -0
- package/dist/jev/index.js.map +1 -0
- package/dist/mcp/index.d.ts +13 -0
- package/dist/mcp/index.js +5479 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/rules/index.d.ts +59 -0
- package/dist/rules/index.js +388 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/scanner/index.d.ts +169 -0
- package/dist/scanner/index.js +3829 -0
- package/dist/scanner/index.js.map +1 -0
- package/dist/search/index.d.ts +44 -0
- package/dist/search/index.js +301 -0
- package/dist/search/index.js.map +1 -0
- package/dist/stats/index.d.ts +60 -0
- package/dist/stats/index.js +1373 -0
- package/dist/stats/index.js.map +1 -0
- package/dist/storage/index.d.ts +82 -0
- package/dist/storage/index.js +1748 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/types-Nxq5Gzay.d.ts +390 -0
- package/package.json +71 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
export { B as BUILTIN_DETECTORS, C as ConventionDetector, a as ConventionRegistry, D as DetectorCategory, P as ProjectContext, S as ScannedFileInfo, W as WalkOptions, b as analyzeProjectStructure, d as defaultRegistry, r as registerConventionDetector, w as walkDirectory } from '../filesystem-B3qAej0l.js';
|
|
2
|
+
import { o as Observation, d as EvidenceRelation } from '../types-Nxq5Gzay.js';
|
|
3
|
+
|
|
4
|
+
interface MarkdownEvidenceResult {
|
|
5
|
+
observations: Observation[];
|
|
6
|
+
relations?: EvidenceRelation[];
|
|
7
|
+
}
|
|
8
|
+
interface MarkdownHeading {
|
|
9
|
+
level: number;
|
|
10
|
+
text: string;
|
|
11
|
+
line: number;
|
|
12
|
+
}
|
|
13
|
+
interface MarkdownAlert {
|
|
14
|
+
type: 'WARNING' | 'CAUTION' | 'IMPORTANT' | 'NOTE' | 'TIP';
|
|
15
|
+
body: string;
|
|
16
|
+
line: number;
|
|
17
|
+
heading?: string;
|
|
18
|
+
}
|
|
19
|
+
interface MarkdownCodeBlock {
|
|
20
|
+
language: string;
|
|
21
|
+
code: string;
|
|
22
|
+
startLine: number;
|
|
23
|
+
endLine: number;
|
|
24
|
+
heading?: string;
|
|
25
|
+
}
|
|
26
|
+
interface MarkdownTable {
|
|
27
|
+
headers: string[];
|
|
28
|
+
rows: string[][];
|
|
29
|
+
line: number;
|
|
30
|
+
heading?: string;
|
|
31
|
+
}
|
|
32
|
+
interface MarkdownTaskItem {
|
|
33
|
+
completed: boolean;
|
|
34
|
+
text: string;
|
|
35
|
+
line: number;
|
|
36
|
+
heading?: string;
|
|
37
|
+
}
|
|
38
|
+
interface MarkdownLink {
|
|
39
|
+
text: string;
|
|
40
|
+
target: string;
|
|
41
|
+
line: number;
|
|
42
|
+
}
|
|
43
|
+
interface MarkdownSection {
|
|
44
|
+
heading: MarkdownHeading;
|
|
45
|
+
content: string;
|
|
46
|
+
lines: string[];
|
|
47
|
+
startLine: number;
|
|
48
|
+
endLine: number;
|
|
49
|
+
}
|
|
50
|
+
interface MarkdownDocument {
|
|
51
|
+
filePath: string;
|
|
52
|
+
relativePath: string;
|
|
53
|
+
baseName: string;
|
|
54
|
+
raw: string;
|
|
55
|
+
lines: string[];
|
|
56
|
+
frontmatter: Record<string, unknown>;
|
|
57
|
+
headings: MarkdownHeading[];
|
|
58
|
+
sections: MarkdownSection[];
|
|
59
|
+
alerts: MarkdownAlert[];
|
|
60
|
+
codeBlocks: MarkdownCodeBlock[];
|
|
61
|
+
tables: MarkdownTable[];
|
|
62
|
+
taskItems: MarkdownTaskItem[];
|
|
63
|
+
links: MarkdownLink[];
|
|
64
|
+
prohibitions: {
|
|
65
|
+
rule: string;
|
|
66
|
+
line: number;
|
|
67
|
+
heading?: string;
|
|
68
|
+
}[];
|
|
69
|
+
}
|
|
70
|
+
interface MarkdownExtractorResult {
|
|
71
|
+
observations: Observation[];
|
|
72
|
+
relations?: EvidenceRelation[];
|
|
73
|
+
}
|
|
74
|
+
interface MarkdownExtractor {
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
description?: string;
|
|
78
|
+
extract(doc: MarkdownDocument): MarkdownExtractorResult | Promise<MarkdownExtractorResult>;
|
|
79
|
+
}
|
|
80
|
+
declare function parseMarkdownDocument(content: string, filePath: string, relativePath: string): MarkdownDocument;
|
|
81
|
+
declare const BUILTIN_MARKDOWN_EXTRACTORS: MarkdownExtractor[];
|
|
82
|
+
declare class MarkdownRegistry {
|
|
83
|
+
private extractors;
|
|
84
|
+
register(extractor: MarkdownExtractor): this;
|
|
85
|
+
unregister(id: string): boolean;
|
|
86
|
+
get(id: string): MarkdownExtractor | undefined;
|
|
87
|
+
list(): MarkdownExtractor[];
|
|
88
|
+
run(doc: MarkdownDocument): Promise<MarkdownEvidenceResult>;
|
|
89
|
+
}
|
|
90
|
+
declare const defaultMarkdownRegistry: MarkdownRegistry;
|
|
91
|
+
/**
|
|
92
|
+
* Convenience helper to register a new Markdown extractor globally.
|
|
93
|
+
*/
|
|
94
|
+
declare function registerMarkdownExtractor(extractor: MarkdownExtractor): void;
|
|
95
|
+
/**
|
|
96
|
+
* Parses markdown files into structured evidence without dumping entire documents.
|
|
97
|
+
* Extracts: Frontmatter, ADRs, GitHub alerts, code blocks, tables, task lists, and cross-references.
|
|
98
|
+
*/
|
|
99
|
+
declare function parseMarkdownFile(filePath: string, relativePath: string, registry?: MarkdownRegistry): Promise<MarkdownEvidenceResult>;
|
|
100
|
+
|
|
101
|
+
interface GitCommit {
|
|
102
|
+
hash: string;
|
|
103
|
+
author: string;
|
|
104
|
+
date: string;
|
|
105
|
+
subject: string;
|
|
106
|
+
files: string[];
|
|
107
|
+
isMerge: boolean;
|
|
108
|
+
}
|
|
109
|
+
interface GitScanResult {
|
|
110
|
+
isGitRepo: boolean;
|
|
111
|
+
headCommit?: string;
|
|
112
|
+
commitsScanned: number;
|
|
113
|
+
observations: Observation[];
|
|
114
|
+
relations: EvidenceRelation[];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Checks if directory is inside a valid git repository.
|
|
118
|
+
*/
|
|
119
|
+
declare function isGitRepository(cwd: string): Promise<boolean>;
|
|
120
|
+
/**
|
|
121
|
+
* Inspects Git history for lessons, reverts, hotfixes, and co-changing file relationships.
|
|
122
|
+
* Supports incremental scanning via lastScanCommit.
|
|
123
|
+
*/
|
|
124
|
+
declare function scanGitHistory(cwd: string, options?: {
|
|
125
|
+
lastScanCommit?: string;
|
|
126
|
+
maxCommits?: number;
|
|
127
|
+
}): Promise<GitScanResult>;
|
|
128
|
+
|
|
129
|
+
interface SourceScanResult {
|
|
130
|
+
observations: Observation[];
|
|
131
|
+
relations: EvidenceRelation[];
|
|
132
|
+
}
|
|
133
|
+
declare function isSourceFile(ext: string): boolean;
|
|
134
|
+
/**
|
|
135
|
+
* High-performance source code analyzer powered by web-tree-sitter (WASM)
|
|
136
|
+
* with robust lexical fallback. Extracts AST symbols, imports, definitions,
|
|
137
|
+
* and scoped actionable comments without requiring language toolchains.
|
|
138
|
+
*/
|
|
139
|
+
declare function analyzeSourceFile(filePath: string, relativePath: string): Promise<SourceScanResult>;
|
|
140
|
+
|
|
141
|
+
interface ScanOptions {
|
|
142
|
+
incremental?: boolean;
|
|
143
|
+
maxCommits?: number;
|
|
144
|
+
dryRun?: boolean;
|
|
145
|
+
}
|
|
146
|
+
interface ScanReport {
|
|
147
|
+
filesScanned: number;
|
|
148
|
+
observationsCreated: number;
|
|
149
|
+
evidenceCreated: number;
|
|
150
|
+
knowledgeCreated: number;
|
|
151
|
+
knowledgeUpdated: number;
|
|
152
|
+
unknownsCount: number;
|
|
153
|
+
gitCommitsScanned: number;
|
|
154
|
+
headCommit?: string;
|
|
155
|
+
incremental: boolean;
|
|
156
|
+
dryRun: boolean;
|
|
157
|
+
plannedActions?: string[];
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Executes a comprehensive, conservative repository scan:
|
|
161
|
+
* Sources -> Observations -> Evidence Graph -> Explicit Rule/ADR Candidates -> Reconcile -> Knowledge
|
|
162
|
+
*
|
|
163
|
+
* Core philosophy: Deterministik scan'in esas çıktısı observation/evidence'tır.
|
|
164
|
+
* Scan her şeyden zoraki knowledge üretmez. Semantik olarak kesin olmayan sinyaller
|
|
165
|
+
* gözlem ve kanıt olarak kalır ("ederinden fazlasını vaat etmeme").
|
|
166
|
+
*/
|
|
167
|
+
declare function scanRepository(rootDir?: string, options?: ScanOptions): Promise<ScanReport>;
|
|
168
|
+
|
|
169
|
+
export { BUILTIN_MARKDOWN_EXTRACTORS, type GitCommit, type GitScanResult, type MarkdownAlert, type MarkdownCodeBlock, type MarkdownDocument, type MarkdownEvidenceResult, type MarkdownExtractor, type MarkdownExtractorResult, type MarkdownHeading, type MarkdownLink, MarkdownRegistry, type MarkdownSection, type MarkdownTable, type MarkdownTaskItem, type ScanOptions, type ScanReport, type SourceScanResult, analyzeSourceFile, defaultMarkdownRegistry, isGitRepository, isSourceFile, parseMarkdownDocument, parseMarkdownFile, registerMarkdownExtractor, scanGitHistory, scanRepository };
|