okf-search-native 0.3.4 → 0.5.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 +136 -104
- package/dist/index.cjs +126 -15405
- package/dist/index.d.cts +37 -1
- package/dist/index.d.mts +37 -1
- package/dist/index.d.ts +37 -1
- package/dist/index.mjs +105 -15416
- package/native.cjs +54 -54
- package/native.d.cts +50 -5
- package/okf-search-native.darwin-arm64.node +0 -0
- package/okf-search-native.darwin-x64.node +0 -0
- package/okf-search-native.linux-x64-gnu.node +0 -0
- package/okf-search-native.win32-x64-msvc.node +0 -0
- package/package.json +4 -3
package/dist/index.d.cts
CHANGED
|
@@ -89,6 +89,41 @@ interface OkfDegradedDocument {
|
|
|
89
89
|
readonly path: string;
|
|
90
90
|
readonly diagnostics: readonly [OkfDiagnostic, ...OkfDiagnostic[]];
|
|
91
91
|
}
|
|
92
|
+
interface OkfLogicalIndexStats {
|
|
93
|
+
readonly documents: {
|
|
94
|
+
readonly total: number;
|
|
95
|
+
readonly strict: number;
|
|
96
|
+
readonly degraded: number;
|
|
97
|
+
};
|
|
98
|
+
readonly types: readonly {
|
|
99
|
+
readonly type: string;
|
|
100
|
+
readonly documentCount: number;
|
|
101
|
+
}[];
|
|
102
|
+
readonly statuses: {
|
|
103
|
+
readonly draft: number;
|
|
104
|
+
readonly stable: number;
|
|
105
|
+
readonly deprecated: number;
|
|
106
|
+
readonly unclassified: number;
|
|
107
|
+
};
|
|
108
|
+
readonly trustTiers: {
|
|
109
|
+
readonly unverified: number;
|
|
110
|
+
readonly machineConfirmed: number;
|
|
111
|
+
readonly humanReviewed: number;
|
|
112
|
+
readonly unclassified: number;
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
type OkfIndexStorageStats = {
|
|
116
|
+
readonly kind: "in-memory-index-files";
|
|
117
|
+
readonly sizeInBytes: number;
|
|
118
|
+
} | {
|
|
119
|
+
readonly kind: "serialized-index";
|
|
120
|
+
readonly format: "minisearch-json-utf8";
|
|
121
|
+
readonly sizeInBytes: number;
|
|
122
|
+
};
|
|
123
|
+
interface OkfIndexStats {
|
|
124
|
+
readonly logical: OkfLogicalIndexStats;
|
|
125
|
+
readonly storage: OkfIndexStorageStats;
|
|
126
|
+
}
|
|
92
127
|
type OkfConformance = "strict" | "degraded";
|
|
93
128
|
type OkfIngestResult = {
|
|
94
129
|
readonly conformance: "strict";
|
|
@@ -127,6 +162,7 @@ interface OkfSearchHit {
|
|
|
127
162
|
snippet: string;
|
|
128
163
|
}
|
|
129
164
|
interface OkfSearch {
|
|
165
|
+
indexStats(): OkfIndexStats;
|
|
130
166
|
ingest(input: OkfDocumentInput): OkfIngestResult;
|
|
131
167
|
listDegradedDocuments(): readonly OkfDegradedDocument[];
|
|
132
168
|
listTypes(): readonly string[];
|
|
@@ -153,4 +189,4 @@ declare function openOkf(root: string): Promise<OkfSearch>;
|
|
|
153
189
|
declare function validateOkfDocument(input: OkfDocumentInput): OkfValidationResult;
|
|
154
190
|
|
|
155
191
|
export { OkfError, createOkfSearch, openOkf, validateOkfDocument };
|
|
156
|
-
export type { IsoDateTime, OkfAttester, OkfConformance, OkfDegradedDocument, OkfDiagnostic, OkfDiagnosticCode, OkfDocument, OkfDocumentInput, OkfErrorCode, OkfExecutor, OkfGeneration, OkfIngestResult, OkfParameter, OkfSearch, OkfSearchField, OkfSearchHit, OkfSearchOptions, OkfSource, OkfStatus, OkfTimeWindow, OkfTrustTier, OkfValidationResult, OkfVerification };
|
|
192
|
+
export type { IsoDateTime, OkfAttester, OkfConformance, OkfDegradedDocument, OkfDiagnostic, OkfDiagnosticCode, OkfDocument, OkfDocumentInput, OkfErrorCode, OkfExecutor, OkfGeneration, OkfIndexStats, OkfIndexStorageStats, OkfIngestResult, OkfLogicalIndexStats, OkfParameter, OkfSearch, OkfSearchField, OkfSearchHit, OkfSearchOptions, OkfSource, OkfStatus, OkfTimeWindow, OkfTrustTier, OkfValidationResult, OkfVerification };
|
package/dist/index.d.mts
CHANGED
|
@@ -89,6 +89,41 @@ interface OkfDegradedDocument {
|
|
|
89
89
|
readonly path: string;
|
|
90
90
|
readonly diagnostics: readonly [OkfDiagnostic, ...OkfDiagnostic[]];
|
|
91
91
|
}
|
|
92
|
+
interface OkfLogicalIndexStats {
|
|
93
|
+
readonly documents: {
|
|
94
|
+
readonly total: number;
|
|
95
|
+
readonly strict: number;
|
|
96
|
+
readonly degraded: number;
|
|
97
|
+
};
|
|
98
|
+
readonly types: readonly {
|
|
99
|
+
readonly type: string;
|
|
100
|
+
readonly documentCount: number;
|
|
101
|
+
}[];
|
|
102
|
+
readonly statuses: {
|
|
103
|
+
readonly draft: number;
|
|
104
|
+
readonly stable: number;
|
|
105
|
+
readonly deprecated: number;
|
|
106
|
+
readonly unclassified: number;
|
|
107
|
+
};
|
|
108
|
+
readonly trustTiers: {
|
|
109
|
+
readonly unverified: number;
|
|
110
|
+
readonly machineConfirmed: number;
|
|
111
|
+
readonly humanReviewed: number;
|
|
112
|
+
readonly unclassified: number;
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
type OkfIndexStorageStats = {
|
|
116
|
+
readonly kind: "in-memory-index-files";
|
|
117
|
+
readonly sizeInBytes: number;
|
|
118
|
+
} | {
|
|
119
|
+
readonly kind: "serialized-index";
|
|
120
|
+
readonly format: "minisearch-json-utf8";
|
|
121
|
+
readonly sizeInBytes: number;
|
|
122
|
+
};
|
|
123
|
+
interface OkfIndexStats {
|
|
124
|
+
readonly logical: OkfLogicalIndexStats;
|
|
125
|
+
readonly storage: OkfIndexStorageStats;
|
|
126
|
+
}
|
|
92
127
|
type OkfConformance = "strict" | "degraded";
|
|
93
128
|
type OkfIngestResult = {
|
|
94
129
|
readonly conformance: "strict";
|
|
@@ -127,6 +162,7 @@ interface OkfSearchHit {
|
|
|
127
162
|
snippet: string;
|
|
128
163
|
}
|
|
129
164
|
interface OkfSearch {
|
|
165
|
+
indexStats(): OkfIndexStats;
|
|
130
166
|
ingest(input: OkfDocumentInput): OkfIngestResult;
|
|
131
167
|
listDegradedDocuments(): readonly OkfDegradedDocument[];
|
|
132
168
|
listTypes(): readonly string[];
|
|
@@ -153,4 +189,4 @@ declare function openOkf(root: string): Promise<OkfSearch>;
|
|
|
153
189
|
declare function validateOkfDocument(input: OkfDocumentInput): OkfValidationResult;
|
|
154
190
|
|
|
155
191
|
export { OkfError, createOkfSearch, openOkf, validateOkfDocument };
|
|
156
|
-
export type { IsoDateTime, OkfAttester, OkfConformance, OkfDegradedDocument, OkfDiagnostic, OkfDiagnosticCode, OkfDocument, OkfDocumentInput, OkfErrorCode, OkfExecutor, OkfGeneration, OkfIngestResult, OkfParameter, OkfSearch, OkfSearchField, OkfSearchHit, OkfSearchOptions, OkfSource, OkfStatus, OkfTimeWindow, OkfTrustTier, OkfValidationResult, OkfVerification };
|
|
192
|
+
export type { IsoDateTime, OkfAttester, OkfConformance, OkfDegradedDocument, OkfDiagnostic, OkfDiagnosticCode, OkfDocument, OkfDocumentInput, OkfErrorCode, OkfExecutor, OkfGeneration, OkfIndexStats, OkfIndexStorageStats, OkfIngestResult, OkfLogicalIndexStats, OkfParameter, OkfSearch, OkfSearchField, OkfSearchHit, OkfSearchOptions, OkfSource, OkfStatus, OkfTimeWindow, OkfTrustTier, OkfValidationResult, OkfVerification };
|
package/dist/index.d.ts
CHANGED
|
@@ -89,6 +89,41 @@ interface OkfDegradedDocument {
|
|
|
89
89
|
readonly path: string;
|
|
90
90
|
readonly diagnostics: readonly [OkfDiagnostic, ...OkfDiagnostic[]];
|
|
91
91
|
}
|
|
92
|
+
interface OkfLogicalIndexStats {
|
|
93
|
+
readonly documents: {
|
|
94
|
+
readonly total: number;
|
|
95
|
+
readonly strict: number;
|
|
96
|
+
readonly degraded: number;
|
|
97
|
+
};
|
|
98
|
+
readonly types: readonly {
|
|
99
|
+
readonly type: string;
|
|
100
|
+
readonly documentCount: number;
|
|
101
|
+
}[];
|
|
102
|
+
readonly statuses: {
|
|
103
|
+
readonly draft: number;
|
|
104
|
+
readonly stable: number;
|
|
105
|
+
readonly deprecated: number;
|
|
106
|
+
readonly unclassified: number;
|
|
107
|
+
};
|
|
108
|
+
readonly trustTiers: {
|
|
109
|
+
readonly unverified: number;
|
|
110
|
+
readonly machineConfirmed: number;
|
|
111
|
+
readonly humanReviewed: number;
|
|
112
|
+
readonly unclassified: number;
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
type OkfIndexStorageStats = {
|
|
116
|
+
readonly kind: "in-memory-index-files";
|
|
117
|
+
readonly sizeInBytes: number;
|
|
118
|
+
} | {
|
|
119
|
+
readonly kind: "serialized-index";
|
|
120
|
+
readonly format: "minisearch-json-utf8";
|
|
121
|
+
readonly sizeInBytes: number;
|
|
122
|
+
};
|
|
123
|
+
interface OkfIndexStats {
|
|
124
|
+
readonly logical: OkfLogicalIndexStats;
|
|
125
|
+
readonly storage: OkfIndexStorageStats;
|
|
126
|
+
}
|
|
92
127
|
type OkfConformance = "strict" | "degraded";
|
|
93
128
|
type OkfIngestResult = {
|
|
94
129
|
readonly conformance: "strict";
|
|
@@ -127,6 +162,7 @@ interface OkfSearchHit {
|
|
|
127
162
|
snippet: string;
|
|
128
163
|
}
|
|
129
164
|
interface OkfSearch {
|
|
165
|
+
indexStats(): OkfIndexStats;
|
|
130
166
|
ingest(input: OkfDocumentInput): OkfIngestResult;
|
|
131
167
|
listDegradedDocuments(): readonly OkfDegradedDocument[];
|
|
132
168
|
listTypes(): readonly string[];
|
|
@@ -153,4 +189,4 @@ declare function openOkf(root: string): Promise<OkfSearch>;
|
|
|
153
189
|
declare function validateOkfDocument(input: OkfDocumentInput): OkfValidationResult;
|
|
154
190
|
|
|
155
191
|
export { OkfError, createOkfSearch, openOkf, validateOkfDocument };
|
|
156
|
-
export type { IsoDateTime, OkfAttester, OkfConformance, OkfDegradedDocument, OkfDiagnostic, OkfDiagnosticCode, OkfDocument, OkfDocumentInput, OkfErrorCode, OkfExecutor, OkfGeneration, OkfIngestResult, OkfParameter, OkfSearch, OkfSearchField, OkfSearchHit, OkfSearchOptions, OkfSource, OkfStatus, OkfTimeWindow, OkfTrustTier, OkfValidationResult, OkfVerification };
|
|
192
|
+
export type { IsoDateTime, OkfAttester, OkfConformance, OkfDegradedDocument, OkfDiagnostic, OkfDiagnosticCode, OkfDocument, OkfDocumentInput, OkfErrorCode, OkfExecutor, OkfGeneration, OkfIndexStats, OkfIndexStorageStats, OkfIngestResult, OkfLogicalIndexStats, OkfParameter, OkfSearch, OkfSearchField, OkfSearchHit, OkfSearchOptions, OkfSource, OkfStatus, OkfTimeWindow, OkfTrustTier, OkfValidationResult, OkfVerification };
|