pikelet-wasm 0.16.0 → 0.17.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.
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * pikelet-wasm/complete — reader for complete .pikelet artifacts
3
- * (spec/COMPLETE_PROFILE.md, profile pikelet-complete-v1). Opens any kind
4
- * (1 student-inline, 2 declared-external, 3 inline-transformer) from a file
5
- * path in Node or a range source anywhere.
3
+ * (spec/COMPLETE_PROFILE.md, profile pikelet-complete-v2). Opens either
4
+ * encoder kind (3 inline-transformer, the default; 2 host-supplied encoder)
5
+ * from a file path in Node or a range source anywhere. Files from before
6
+ * 0.17 (format 1, Pancake-era profiles, the student encoder) are refused.
6
7
  */
7
8
 
8
9
  /** A byte-range source: local file, HTTP, memory, or anything else. */
@@ -138,16 +139,6 @@ export declare const DEFAULT_BLOB_CACHE_BYTES: number;
138
139
  export declare const DEFAULT_SMALL_CACHE_BYTES: number;
139
140
 
140
141
  export interface CompleteQueryResult {
141
- /**
142
- * The pack's calibrated verdict on this retrieval. On packs calibrated
143
- * by pikelet 0.10 or later (evaluation calibration.target 'relevance')
144
- * it measures retrieval relevance: 'none' means the pack does not appear
145
- * to cover the query's topic, 'strong' that it does — not that a
146
- * returned passage states the specific fact asked for. 'unscored': the
147
- * pack ships no fitted calibrator, as every pack compiled after 0.14.0.
148
- */
149
- matchQuality: 'strong' | 'weak' | 'none' | 'unscored';
150
- confidence?: number;
151
142
  /**
152
143
  * Each result is the hydrated corpus record plus the search's `id` and
153
144
  * `distance`. Those two names are reserved: they always come from the
@@ -158,9 +149,8 @@ export interface CompleteQueryResult {
158
149
  /**
159
150
  * Which of the query's content words the best of the top five passages
160
151
  * (the one containing the most of them) contains (covered) and lacks
161
- * (uncovered). Computed for every pack, calibrated or not; absent only
162
- * when the query has no gradable word. An asked-for value in `uncovered`
163
- * is one the best passage does not state, whatever matchQuality says.
152
+ * (uncovered). Absent only when the query has no gradable word. An
153
+ * asked-for value in `uncovered` is one the best passage does not state.
164
154
  */
165
155
  grounding?: {
166
156
  /** Id of the passage that covered the most query words. */
@@ -177,9 +167,9 @@ export interface CompleteQueryResult {
177
167
  export interface CompleteSearch {
178
168
  info(): {
179
169
  identity: string;
180
- /** Container header formatVersion (1 or 2). */
170
+ /** Container header formatVersion (2). */
181
171
  formatVersion: number;
182
- /** Manifest profile: 'pikelet-complete-v1' | 'pikelet-complete-v2'. */
172
+ /** Manifest profile: 'pikelet-complete-v2'. */
183
173
  profile: string;
184
174
  /**
185
175
  * Human-readable pack name from the identity-verified manifest
@@ -209,7 +199,6 @@ export interface CompleteSearch {
209
199
  * unverified; it resolves before the first query completes). While
210
200
  * deferred, `encoder` serves the identity-verified manifest declaration
211
201
  * with `deferred: true`, replaced by the full declaration on arrival.
212
- * Kind 1: null (inline student encoder, nothing external to verify).
213
202
  */
214
203
  encoderVerified: boolean | null;
215
204
  /**
@@ -218,9 +207,9 @@ export interface CompleteSearch {
218
207
  */
219
208
  fusion: Readonly<Required<FusionOptions>>;
220
209
  /**
221
- * 'per-record-sha256' on format 2 (each hydrated record verified on its
222
- * own range read); 'segment-sha256' on format 1 (whole-segment digests
223
- * only, lazy record reads not independently verifiable).
210
+ * 'per-record-sha256': each hydrated record is verified on its own range
211
+ * read ('per-record-sha256 (unverified by option)' with verifyRecords:
212
+ * false).
224
213
  */
225
214
  corpusIntegrity: string;
226
215
  fileBytes: number;
@@ -298,13 +287,6 @@ export interface CompleteSearch {
298
287
  parallelism?: number;
299
288
  gap?: number;
300
289
  maxRangeBytes?: number;
301
- /**
302
- * A matchQuality: 'none' verdict withholds results by default. Set
303
- * true to see the raw retrieval anyway (e.g. to inspect why the
304
- * classifier abstained) — matchQuality and confidence are unaffected,
305
- * this only controls whether results is populated. Default false.
306
- */
307
- showAbstained?: boolean;
308
290
  }): Promise<CompleteQueryResult>;
309
291
  /** Hydrate one corpus record by id (verified per record on format 2). */
310
292
  record(id: number): Promise<Record<string, unknown>>;
@@ -341,8 +323,8 @@ export declare function openPikeletFile(
341
323
  * Kind-3 artifacts open lazily: the ~25 MiB inline-encoder region is not
342
324
  * read at open, and by default starts downloading in the background the
343
325
  * moment open resolves (the first query awaits it; the whole segment is
344
- * digest-verified on arrival, and the header/calibration slices used at
345
- * open are byte-compared against it before any result is returned).
326
+ * digest-verified on arrival, and the header read at open is
327
+ * byte-compared against it before any result is returned).
346
328
  * Set false to defer the transfer entirely to the first query. Default
347
329
  * true.
348
330
  */
@@ -411,7 +393,7 @@ export declare function openPikeletFile(
411
393
  /** Header formatVersion -> manifest profile accepted by this reader. */
412
394
  export declare const SUPPORTED_PROFILES: Readonly<Record<number, string>>;
413
395
 
414
- /** Rank-fusion parameters shared by the reader, the calibrator and the BEIR ladder. */
396
+ /** Rank-fusion parameters shared by the reader, the chain reader and the BEIR ladder. */
415
397
  export interface FusionOptions {
416
398
  /** Reciprocal-rank-fusion constant (default 60). */
417
399
  rrfK?: number;