@moss-dev/moss-wasm 0.16.0 → 0.18.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/moss_wasm.d.ts CHANGED
@@ -1,18 +1,46 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
 
4
+ /** What Web Crypto needs to decrypt the payload of a sealed model. */
5
+ export interface SealedModelDecryptParams {
6
+ iv: Uint8Array;
7
+ tag: Uint8Array;
8
+ additionalData: Uint8Array;
9
+ payloadOffset: number;
10
+ payloadLength: number;
11
+ }
12
+
13
+ /** Where the tokenizer and graph lie in a decrypted sealed model payload. */
14
+ export interface SealedModelSections {
15
+ tokenizerOffset: number;
16
+ tokenizerLength: number;
17
+ graphOffset: number;
18
+ graphLength: number;
19
+ }
20
+
21
+
22
+
4
23
  export class IndexManager {
5
24
  free(): void;
6
25
  [Symbol.dispose](): void;
26
+ /**
27
+ * Sends the pending usage counts now.
28
+ * They also go out every 3 seconds, on `pagehide` and when the manager is freed.
29
+ */
30
+ flushUsageTelemetry(): Promise<any>;
7
31
  getIndexInfo(index_name: string): Promise<any>;
8
32
  hasIndex(index_name: string): Promise<any>;
9
33
  loadIndex(index_name: string): Promise<any>;
10
34
  constructor(project_id: string, project_key: string);
11
- query(index_name: string, query_text: string, query_embedding: Float32Array, top_k: number | null | undefined, alpha: number | null | undefined, filter: any, tuning: any): Promise<any>;
12
- queryMultiIndex(index_names: string[], query_text: string, query_embedding: Float32Array, top_k: number | null | undefined, alpha: number | null | undefined, filter: any, tuning: any): Promise<any>;
13
- queryMultiIndexWithModelIdentity(index_names: string[], query_text: string, query_embedding: Float32Array, model_id: string, model_artifact_version: string, manifest_sha256: string, top_k: number | null | undefined, alpha: number | null | undefined, filter: any, tuning: any): Promise<any>;
14
- queryWithModelIdentity(index_name: string, query_text: string, query_embedding: Float32Array, model_id: string, model_artifact_version: string, manifest_sha256: string, top_k: number | null | undefined, alpha: number | null | undefined, filter: any, tuning: any): Promise<any>;
35
+ query(index_name: string, query_text: string, query_embedding: Float32Array | null | undefined, top_k: number | null | undefined, alpha: number | null | undefined, filter: any, tuning: any): Promise<any>;
36
+ queryMultiIndex(index_names: string[], query_text: string, query_embedding: Float32Array | null | undefined, top_k: number | null | undefined, alpha: number | null | undefined, filter: any, tuning: any): Promise<any>;
37
+ queryMultiIndexWithModelIdentity(index_names: string[], query_text: string, query_embedding: Float32Array | null | undefined, model_id: string, model_artifact_version: string, manifest_sha256: string, top_k: number | null | undefined, alpha: number | null | undefined, filter: any, tuning: any): Promise<any>;
38
+ queryWithModelIdentity(index_name: string, query_text: string, query_embedding: Float32Array | null | undefined, model_id: string, model_artifact_version: string, manifest_sha256: string, top_k: number | null | undefined, alpha: number | null | undefined, filter: any, tuning: any): Promise<any>;
15
39
  refreshIndex(index_name: string): Promise<any>;
40
+ /**
41
+ * Always true. Its presence tells the browser SDK that `refreshIndex` skips an unchanged snapshot.
42
+ */
43
+ refreshSkipsUnchanged(): boolean;
16
44
  unloadIndex(index_name: string): Promise<any>;
17
45
  unloadIndexes(index_names: string[]): Promise<any>;
18
46
  static withAuthenticator(project_id: string, get_auth_header: Function, invalidate_cache?: Function | null, base_url?: string | null): IndexManager;
@@ -23,10 +51,10 @@ export class IndexManager {
23
51
  export class ManageClient {
24
52
  free(): void;
25
53
  [Symbol.dispose](): void;
26
- addDocs(name: string, docs: any, upsert?: boolean | null): Promise<any>;
27
- createIndex(name: string, docs: any, model_id: string): Promise<any>;
28
- createIndexFromFiles(name: string, files: any, model_id: string): Promise<any>;
29
- deleteDocs(name: string, doc_ids: string[]): Promise<any>;
54
+ addDocs(name: string, docs: any, upsert?: boolean | null, on_progress?: Function | null): Promise<any>;
55
+ createIndex(name: string, docs: any, model_id: string, on_progress?: Function | null): Promise<any>;
56
+ createIndexFromFiles(name: string, files: any, model_id: string, on_progress?: Function | null): Promise<any>;
57
+ deleteDocs(name: string, doc_ids: string[], on_progress?: Function | null): Promise<any>;
30
58
  deleteIndex(name: string): Promise<any>;
31
59
  getDocs(name: string, doc_ids?: string[] | null): Promise<any>;
32
60
  getIndex(name: string): Promise<any>;
@@ -41,6 +69,12 @@ export class ModelContentKeys {
41
69
  private constructor();
42
70
  free(): void;
43
71
  [Symbol.dispose](): void;
72
+ /**
73
+ * Imports the content key into Web Crypto as an AES-GCM key that only decrypts.
74
+ * It cannot be exported, and the buffer `importKey` copies it from is then zeroed.
75
+ * The promise rejects when the global `crypto.subtle` is missing, as in an insecure context.
76
+ */
77
+ importWebCryptoKey(): Promise<CryptoKey>;
44
78
  readonly keyId: number;
45
79
  }
46
80
 
@@ -56,7 +90,10 @@ export class ProjectKeyAuthenticator {
56
90
  free(): void;
57
91
  [Symbol.dispose](): void;
58
92
  getAuthHeader(): Promise<any>;
59
- invalidate(): Promise<any>;
93
+ /**
94
+ * Drops the cached token when `rejected`, the header a refused request sent, carries it.
95
+ */
96
+ invalidate(rejected: string): Promise<any>;
60
97
  constructor(project_id: string, project_key: string);
61
98
  }
62
99
 
@@ -75,12 +112,41 @@ export class Tokenizer {
75
112
  tokenize(text: string): any;
76
113
  }
77
114
 
115
+ /**
116
+ * Opens a sealed model whose raw SHA-256 already matched the release entry.
117
+ *
118
+ * The envelope digest is read from the header instead of recomputed. The
119
+ * match pins every byte, and GCM still authenticates the digest through the
120
+ * AAD, so bytes that were never matched still fail closed, only later.
121
+ */
122
+ export function openMatchedSealedModel(bytes: Uint8Array, keys: ModelContentKeys, sku: string): SealedModel;
123
+
78
124
  export function openSealedModel(bytes: Uint8Array, keys: ModelContentKeys, sku: string): SealedModel;
79
125
 
80
126
  export function poolAndNormalize(token_embeddings: Float32Array, attention_mask: Int32Array, hidden_dim: number): Float32Array;
81
127
 
82
128
  export function sdk_version(): string;
83
129
 
130
+ /**
131
+ * Returns the nonce, tag, AAD and payload range Web Crypto needs to open a sealed model.
132
+ * Only its header is copied out of `bytes`, whose raw SHA-256 already matched the release entry.
133
+ * The header gets the checks of `openMatchedSealedModel`, and its key id must be the granted one.
134
+ */
135
+ export function sealedModelDecryptParams(bytes: Uint8Array, keys: ModelContentKeys, sku: string): SealedModelDecryptParams;
136
+
137
+ /**
138
+ * Returns where the tokenizer and graph lie in a sealed model payload Web Crypto decrypted.
139
+ * Only the inner header, the sku and the first bytes of the graph are copied out of `plaintext`.
140
+ * They get the checks `openSealedModel` runs after decrypting: the sku, an ORT graph, no gate op.
141
+ */
142
+ export function sealedModelSections(plaintext: Uint8Array, sku: string): SealedModelSections;
143
+
144
+ /**
145
+ * Builds a tokenizer from the tokenizer section of a payload that Web Crypto decrypted,
146
+ * as `takeTokenizer` does, and wipes the copy of the bytes it parsed once the tokenizer is built.
147
+ */
148
+ export function sealedModelTokenizer(tokenizer_json: Uint8Array): Tokenizer;
149
+
84
150
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
85
151
 
86
152
  export interface InitOutput {
@@ -92,6 +158,7 @@ export interface InitOutput {
92
158
  readonly __wbg_projectkeyauthenticator_free: (a: number, b: number) => void;
93
159
  readonly __wbg_sealedmodel_free: (a: number, b: number) => void;
94
160
  readonly __wbg_tokenizer_free: (a: number, b: number) => void;
161
+ readonly indexmanager_flushUsageTelemetry: (a: number) => any;
95
162
  readonly indexmanager_getIndexInfo: (a: number, b: number, c: number) => any;
96
163
  readonly indexmanager_hasIndex: (a: number, b: number, c: number) => any;
97
164
  readonly indexmanager_loadIndex: (a: number, b: number, c: number) => any;
@@ -101,15 +168,16 @@ export interface InitOutput {
101
168
  readonly indexmanager_queryMultiIndexWithModelIdentity: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: any, q: any) => any;
102
169
  readonly indexmanager_queryWithModelIdentity: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: any, q: any) => any;
103
170
  readonly indexmanager_refreshIndex: (a: number, b: number, c: number) => any;
171
+ readonly indexmanager_refreshSkipsUnchanged: (a: number) => number;
104
172
  readonly indexmanager_unloadIndex: (a: number, b: number, c: number) => any;
105
173
  readonly indexmanager_unloadIndexes: (a: number, b: number, c: number) => any;
106
174
  readonly indexmanager_withAuthenticator: (a: number, b: number, c: any, d: number, e: number, f: number) => number;
107
175
  readonly indexmanager_withBaseUrl: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
108
176
  readonly indexmanager_withBaseUrls: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
109
- readonly manageclient_addDocs: (a: number, b: number, c: number, d: any, e: number) => any;
110
- readonly manageclient_createIndex: (a: number, b: number, c: number, d: any, e: number, f: number) => any;
111
- readonly manageclient_createIndexFromFiles: (a: number, b: number, c: number, d: any, e: number, f: number) => any;
112
- readonly manageclient_deleteDocs: (a: number, b: number, c: number, d: number, e: number) => any;
177
+ readonly manageclient_addDocs: (a: number, b: number, c: number, d: any, e: number, f: number) => any;
178
+ readonly manageclient_createIndex: (a: number, b: number, c: number, d: any, e: number, f: number, g: number) => any;
179
+ readonly manageclient_createIndexFromFiles: (a: number, b: number, c: number, d: any, e: number, f: number, g: number) => any;
180
+ readonly manageclient_deleteDocs: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
113
181
  readonly manageclient_deleteIndex: (a: number, b: number, c: number) => any;
114
182
  readonly manageclient_getDocs: (a: number, b: number, c: number, d: number, e: number) => any;
115
183
  readonly manageclient_getIndex: (a: number, b: number, c: number) => any;
@@ -118,23 +186,28 @@ export interface InitOutput {
118
186
  readonly manageclient_new: (a: number, b: number, c: number, d: number) => number;
119
187
  readonly manageclient_withAuthenticator: (a: number, b: number, c: any, d: number, e: number, f: number) => number;
120
188
  readonly manageclient_withBaseUrl: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
189
+ readonly modelcontentkeys_importWebCryptoKey: (a: number) => any;
121
190
  readonly modelcontentkeys_keyId: (a: number) => number;
122
191
  readonly modelkeyexchange_capabilityQuery: (a: number, b: number, c: number) => [number, number];
123
192
  readonly modelkeyexchange_new: () => [number, number, number];
124
193
  readonly modelkeyexchange_unwrap: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
194
+ readonly openMatchedSealedModel: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
125
195
  readonly openSealedModel: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
126
196
  readonly poolAndNormalize: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
127
197
  readonly projectkeyauthenticator_getAuthHeader: (a: number) => any;
128
- readonly projectkeyauthenticator_invalidate: (a: number) => any;
198
+ readonly projectkeyauthenticator_invalidate: (a: number, b: number, c: number) => any;
129
199
  readonly projectkeyauthenticator_new: (a: number, b: number, c: number, d: number) => number;
130
200
  readonly sdk_version: () => [number, number];
201
+ readonly sealedModelDecryptParams: (a: any, b: number, c: number, d: number) => [number, number, number];
202
+ readonly sealedModelSections: (a: any, b: number, c: number) => [number, number, number];
203
+ readonly sealedModelTokenizer: (a: any) => [number, number, number];
131
204
  readonly sealedmodel_takeGraph: (a: number) => [number, number, number];
132
205
  readonly sealedmodel_takeTokenizer: (a: number) => [number, number, number];
133
206
  readonly tokenizer_new: (a: number, b: number) => [number, number, number];
134
207
  readonly tokenizer_tokenize: (a: number, b: number, c: number) => [number, number, number];
135
- readonly wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___wasm_bindgen_9e362b674ca4cea___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_9e362b674ca4cea___JsError___true_: (a: number, b: number, c: any) => [number, number];
136
- readonly wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
137
- readonly wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke_______true_: (a: number, b: number) => void;
208
+ readonly wasm_bindgen_79e945b5d148b8ef___convert__closures_____invoke___wasm_bindgen_79e945b5d148b8ef___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_79e945b5d148b8ef___JsError___true_: (a: number, b: number, c: any) => [number, number];
209
+ readonly wasm_bindgen_79e945b5d148b8ef___convert__closures_____invoke___js_sys_47ef7e31b3f1968c___Function_fn_wasm_bindgen_79e945b5d148b8ef___JsValue_____wasm_bindgen_79e945b5d148b8ef___sys__Undefined___js_sys_47ef7e31b3f1968c___Function_fn_wasm_bindgen_79e945b5d148b8ef___JsValue_____wasm_bindgen_79e945b5d148b8ef___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
210
+ readonly wasm_bindgen_79e945b5d148b8ef___convert__closures_____invoke_______true_: (a: number, b: number) => void;
138
211
  readonly __wbindgen_malloc: (a: number, b: number) => number;
139
212
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
140
213
  readonly __wbindgen_exn_store: (a: number) => void;
package/moss_wasm.js CHANGED
@@ -17,6 +17,15 @@ export class IndexManager {
17
17
  const ptr = this.__destroy_into_raw();
18
18
  wasm.__wbg_indexmanager_free(ptr, 0);
19
19
  }
20
+ /**
21
+ * Sends the pending usage counts now.
22
+ * They also go out every 3 seconds, on `pagehide` and when the manager is freed.
23
+ * @returns {Promise<any>}
24
+ */
25
+ flushUsageTelemetry() {
26
+ const ret = wasm.indexmanager_flushUsageTelemetry(this.__wbg_ptr);
27
+ return ret;
28
+ }
20
29
  /**
21
30
  * @param {string} index_name
22
31
  * @returns {Promise<any>}
@@ -64,7 +73,7 @@ export class IndexManager {
64
73
  /**
65
74
  * @param {string} index_name
66
75
  * @param {string} query_text
67
- * @param {Float32Array} query_embedding
76
+ * @param {Float32Array | null | undefined} query_embedding
68
77
  * @param {number | null | undefined} top_k
69
78
  * @param {number | null | undefined} alpha
70
79
  * @param {any} filter
@@ -76,15 +85,15 @@ export class IndexManager {
76
85
  const len0 = WASM_VECTOR_LEN;
77
86
  const ptr1 = passStringToWasm0(query_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
78
87
  const len1 = WASM_VECTOR_LEN;
79
- const ptr2 = passArrayF32ToWasm0(query_embedding, wasm.__wbindgen_malloc);
80
- const len2 = WASM_VECTOR_LEN;
88
+ var ptr2 = isLikeNone(query_embedding) ? 0 : passArrayF32ToWasm0(query_embedding, wasm.__wbindgen_malloc);
89
+ var len2 = WASM_VECTOR_LEN;
81
90
  const ret = wasm.indexmanager_query(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(top_k) ? Number.MAX_SAFE_INTEGER : (top_k) >>> 0, isLikeNone(alpha) ? Number.MAX_SAFE_INTEGER : Math.fround(alpha), filter, tuning);
82
91
  return ret;
83
92
  }
84
93
  /**
85
94
  * @param {string[]} index_names
86
95
  * @param {string} query_text
87
- * @param {Float32Array} query_embedding
96
+ * @param {Float32Array | null | undefined} query_embedding
88
97
  * @param {number | null | undefined} top_k
89
98
  * @param {number | null | undefined} alpha
90
99
  * @param {any} filter
@@ -96,15 +105,15 @@ export class IndexManager {
96
105
  const len0 = WASM_VECTOR_LEN;
97
106
  const ptr1 = passStringToWasm0(query_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
98
107
  const len1 = WASM_VECTOR_LEN;
99
- const ptr2 = passArrayF32ToWasm0(query_embedding, wasm.__wbindgen_malloc);
100
- const len2 = WASM_VECTOR_LEN;
108
+ var ptr2 = isLikeNone(query_embedding) ? 0 : passArrayF32ToWasm0(query_embedding, wasm.__wbindgen_malloc);
109
+ var len2 = WASM_VECTOR_LEN;
101
110
  const ret = wasm.indexmanager_queryMultiIndex(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(top_k) ? Number.MAX_SAFE_INTEGER : (top_k) >>> 0, isLikeNone(alpha) ? Number.MAX_SAFE_INTEGER : Math.fround(alpha), filter, tuning);
102
111
  return ret;
103
112
  }
104
113
  /**
105
114
  * @param {string[]} index_names
106
115
  * @param {string} query_text
107
- * @param {Float32Array} query_embedding
116
+ * @param {Float32Array | null | undefined} query_embedding
108
117
  * @param {string} model_id
109
118
  * @param {string} model_artifact_version
110
119
  * @param {string} manifest_sha256
@@ -119,8 +128,8 @@ export class IndexManager {
119
128
  const len0 = WASM_VECTOR_LEN;
120
129
  const ptr1 = passStringToWasm0(query_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
121
130
  const len1 = WASM_VECTOR_LEN;
122
- const ptr2 = passArrayF32ToWasm0(query_embedding, wasm.__wbindgen_malloc);
123
- const len2 = WASM_VECTOR_LEN;
131
+ var ptr2 = isLikeNone(query_embedding) ? 0 : passArrayF32ToWasm0(query_embedding, wasm.__wbindgen_malloc);
132
+ var len2 = WASM_VECTOR_LEN;
124
133
  const ptr3 = passStringToWasm0(model_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
125
134
  const len3 = WASM_VECTOR_LEN;
126
135
  const ptr4 = passStringToWasm0(model_artifact_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -133,7 +142,7 @@ export class IndexManager {
133
142
  /**
134
143
  * @param {string} index_name
135
144
  * @param {string} query_text
136
- * @param {Float32Array} query_embedding
145
+ * @param {Float32Array | null | undefined} query_embedding
137
146
  * @param {string} model_id
138
147
  * @param {string} model_artifact_version
139
148
  * @param {string} manifest_sha256
@@ -148,8 +157,8 @@ export class IndexManager {
148
157
  const len0 = WASM_VECTOR_LEN;
149
158
  const ptr1 = passStringToWasm0(query_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
150
159
  const len1 = WASM_VECTOR_LEN;
151
- const ptr2 = passArrayF32ToWasm0(query_embedding, wasm.__wbindgen_malloc);
152
- const len2 = WASM_VECTOR_LEN;
160
+ var ptr2 = isLikeNone(query_embedding) ? 0 : passArrayF32ToWasm0(query_embedding, wasm.__wbindgen_malloc);
161
+ var len2 = WASM_VECTOR_LEN;
153
162
  const ptr3 = passStringToWasm0(model_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
154
163
  const len3 = WASM_VECTOR_LEN;
155
164
  const ptr4 = passStringToWasm0(model_artifact_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -169,6 +178,14 @@ export class IndexManager {
169
178
  const ret = wasm.indexmanager_refreshIndex(this.__wbg_ptr, ptr0, len0);
170
179
  return ret;
171
180
  }
181
+ /**
182
+ * Always true. Its presence tells the browser SDK that `refreshIndex` skips an unchanged snapshot.
183
+ * @returns {boolean}
184
+ */
185
+ refreshSkipsUnchanged() {
186
+ const ret = wasm.indexmanager_refreshSkipsUnchanged(this.__wbg_ptr);
187
+ return ret !== 0;
188
+ }
172
189
  /**
173
190
  * @param {string} index_name
174
191
  * @returns {Promise<any>}
@@ -263,53 +280,57 @@ export class ManageClient {
263
280
  * @param {string} name
264
281
  * @param {any} docs
265
282
  * @param {boolean | null} [upsert]
283
+ * @param {Function | null} [on_progress]
266
284
  * @returns {Promise<any>}
267
285
  */
268
- addDocs(name, docs, upsert) {
286
+ addDocs(name, docs, upsert, on_progress) {
269
287
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
270
288
  const len0 = WASM_VECTOR_LEN;
271
- const ret = wasm.manageclient_addDocs(this.__wbg_ptr, ptr0, len0, docs, isLikeNone(upsert) ? 0xFFFFFF : upsert ? 1 : 0);
289
+ const ret = wasm.manageclient_addDocs(this.__wbg_ptr, ptr0, len0, docs, isLikeNone(upsert) ? 0xFFFFFF : upsert ? 1 : 0, isLikeNone(on_progress) ? 0 : addToExternrefTable0(on_progress));
272
290
  return ret;
273
291
  }
274
292
  /**
275
293
  * @param {string} name
276
294
  * @param {any} docs
277
295
  * @param {string} model_id
296
+ * @param {Function | null} [on_progress]
278
297
  * @returns {Promise<any>}
279
298
  */
280
- createIndex(name, docs, model_id) {
299
+ createIndex(name, docs, model_id, on_progress) {
281
300
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
282
301
  const len0 = WASM_VECTOR_LEN;
283
302
  const ptr1 = passStringToWasm0(model_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
284
303
  const len1 = WASM_VECTOR_LEN;
285
- const ret = wasm.manageclient_createIndex(this.__wbg_ptr, ptr0, len0, docs, ptr1, len1);
304
+ const ret = wasm.manageclient_createIndex(this.__wbg_ptr, ptr0, len0, docs, ptr1, len1, isLikeNone(on_progress) ? 0 : addToExternrefTable0(on_progress));
286
305
  return ret;
287
306
  }
288
307
  /**
289
308
  * @param {string} name
290
309
  * @param {any} files
291
310
  * @param {string} model_id
311
+ * @param {Function | null} [on_progress]
292
312
  * @returns {Promise<any>}
293
313
  */
294
- createIndexFromFiles(name, files, model_id) {
314
+ createIndexFromFiles(name, files, model_id, on_progress) {
295
315
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
296
316
  const len0 = WASM_VECTOR_LEN;
297
317
  const ptr1 = passStringToWasm0(model_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
298
318
  const len1 = WASM_VECTOR_LEN;
299
- const ret = wasm.manageclient_createIndexFromFiles(this.__wbg_ptr, ptr0, len0, files, ptr1, len1);
319
+ const ret = wasm.manageclient_createIndexFromFiles(this.__wbg_ptr, ptr0, len0, files, ptr1, len1, isLikeNone(on_progress) ? 0 : addToExternrefTable0(on_progress));
300
320
  return ret;
301
321
  }
302
322
  /**
303
323
  * @param {string} name
304
324
  * @param {string[]} doc_ids
325
+ * @param {Function | null} [on_progress]
305
326
  * @returns {Promise<any>}
306
327
  */
307
- deleteDocs(name, doc_ids) {
328
+ deleteDocs(name, doc_ids, on_progress) {
308
329
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
309
330
  const len0 = WASM_VECTOR_LEN;
310
331
  const ptr1 = passArrayJsValueToWasm0(doc_ids, wasm.__wbindgen_malloc);
311
332
  const len1 = WASM_VECTOR_LEN;
312
- const ret = wasm.manageclient_deleteDocs(this.__wbg_ptr, ptr0, len0, ptr1, len1);
333
+ const ret = wasm.manageclient_deleteDocs(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(on_progress) ? 0 : addToExternrefTable0(on_progress));
313
334
  return ret;
314
335
  }
315
336
  /**
@@ -427,6 +448,16 @@ export class ModelContentKeys {
427
448
  const ptr = this.__destroy_into_raw();
428
449
  wasm.__wbg_modelcontentkeys_free(ptr, 0);
429
450
  }
451
+ /**
452
+ * Imports the content key into Web Crypto as an AES-GCM key that only decrypts.
453
+ * It cannot be exported, and the buffer `importKey` copies it from is then zeroed.
454
+ * The promise rejects when the global `crypto.subtle` is missing, as in an insecure context.
455
+ * @returns {Promise<CryptoKey>}
456
+ */
457
+ importWebCryptoKey() {
458
+ const ret = wasm.modelcontentkeys_importWebCryptoKey(this.__wbg_ptr);
459
+ return ret;
460
+ }
430
461
  /**
431
462
  * @returns {number}
432
463
  */
@@ -517,10 +548,14 @@ export class ProjectKeyAuthenticator {
517
548
  return ret;
518
549
  }
519
550
  /**
551
+ * Drops the cached token when `rejected`, the header a refused request sent, carries it.
552
+ * @param {string} rejected
520
553
  * @returns {Promise<any>}
521
554
  */
522
- invalidate() {
523
- const ret = wasm.projectkeyauthenticator_invalidate(this.__wbg_ptr);
555
+ invalidate(rejected) {
556
+ const ptr0 = passStringToWasm0(rejected, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
557
+ const len0 = WASM_VECTOR_LEN;
558
+ const ret = wasm.projectkeyauthenticator_invalidate(this.__wbg_ptr, ptr0, len0);
524
559
  return ret;
525
560
  }
526
561
  /**
@@ -627,6 +662,30 @@ export class Tokenizer {
627
662
  }
628
663
  if (Symbol.dispose) Tokenizer.prototype[Symbol.dispose] = Tokenizer.prototype.free;
629
664
 
665
+ /**
666
+ * Opens a sealed model whose raw SHA-256 already matched the release entry.
667
+ *
668
+ * The envelope digest is read from the header instead of recomputed. The
669
+ * match pins every byte, and GCM still authenticates the digest through the
670
+ * AAD, so bytes that were never matched still fail closed, only later.
671
+ * @param {Uint8Array} bytes
672
+ * @param {ModelContentKeys} keys
673
+ * @param {string} sku
674
+ * @returns {SealedModel}
675
+ */
676
+ export function openMatchedSealedModel(bytes, keys, sku) {
677
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
678
+ const len0 = WASM_VECTOR_LEN;
679
+ _assertClass(keys, ModelContentKeys);
680
+ const ptr1 = passStringToWasm0(sku, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
681
+ const len1 = WASM_VECTOR_LEN;
682
+ const ret = wasm.openMatchedSealedModel(ptr0, len0, keys.__wbg_ptr, ptr1, len1);
683
+ if (ret[2]) {
684
+ throw takeFromExternrefTable0(ret[1]);
685
+ }
686
+ return SealedModel.__wrap(ret[0]);
687
+ }
688
+
630
689
  /**
631
690
  * @param {Uint8Array} bytes
632
691
  * @param {ModelContentKeys} keys
@@ -681,6 +740,58 @@ export function sdk_version() {
681
740
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
682
741
  }
683
742
  }
743
+
744
+ /**
745
+ * Returns the nonce, tag, AAD and payload range Web Crypto needs to open a sealed model.
746
+ * Only its header is copied out of `bytes`, whose raw SHA-256 already matched the release entry.
747
+ * The header gets the checks of `openMatchedSealedModel`, and its key id must be the granted one.
748
+ * @param {Uint8Array} bytes
749
+ * @param {ModelContentKeys} keys
750
+ * @param {string} sku
751
+ * @returns {SealedModelDecryptParams}
752
+ */
753
+ export function sealedModelDecryptParams(bytes, keys, sku) {
754
+ _assertClass(keys, ModelContentKeys);
755
+ const ptr0 = passStringToWasm0(sku, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
756
+ const len0 = WASM_VECTOR_LEN;
757
+ const ret = wasm.sealedModelDecryptParams(bytes, keys.__wbg_ptr, ptr0, len0);
758
+ if (ret[2]) {
759
+ throw takeFromExternrefTable0(ret[1]);
760
+ }
761
+ return takeFromExternrefTable0(ret[0]);
762
+ }
763
+
764
+ /**
765
+ * Returns where the tokenizer and graph lie in a sealed model payload Web Crypto decrypted.
766
+ * Only the inner header, the sku and the first bytes of the graph are copied out of `plaintext`.
767
+ * They get the checks `openSealedModel` runs after decrypting: the sku, an ORT graph, no gate op.
768
+ * @param {Uint8Array} plaintext
769
+ * @param {string} sku
770
+ * @returns {SealedModelSections}
771
+ */
772
+ export function sealedModelSections(plaintext, sku) {
773
+ const ptr0 = passStringToWasm0(sku, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
774
+ const len0 = WASM_VECTOR_LEN;
775
+ const ret = wasm.sealedModelSections(plaintext, ptr0, len0);
776
+ if (ret[2]) {
777
+ throw takeFromExternrefTable0(ret[1]);
778
+ }
779
+ return takeFromExternrefTable0(ret[0]);
780
+ }
781
+
782
+ /**
783
+ * Builds a tokenizer from the tokenizer section of a payload that Web Crypto decrypted,
784
+ * as `takeTokenizer` does, and wipes the copy of the bytes it parsed once the tokenizer is built.
785
+ * @param {Uint8Array} tokenizer_json
786
+ * @returns {Tokenizer}
787
+ */
788
+ export function sealedModelTokenizer(tokenizer_json) {
789
+ const ret = wasm.sealedModelTokenizer(tokenizer_json);
790
+ if (ret[2]) {
791
+ throw takeFromExternrefTable0(ret[1]);
792
+ }
793
+ return Tokenizer.__wrap(ret[0]);
794
+ }
684
795
  function __wbg_get_imports() {
685
796
  const import0 = {
686
797
  __proto__: null,
@@ -780,6 +891,9 @@ function __wbg_get_imports() {
780
891
  __wbg_abort_eee9248a6d680839: function(arg0, arg1) {
781
892
  arg0.abort(arg1);
782
893
  },
894
+ __wbg_addEventListener_d85450ee1320c989: function() { return handleError(function (arg0, arg1, arg2, arg3) {
895
+ arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
896
+ }, arguments); },
783
897
  __wbg_append_01c74e5c6b58aa64: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
784
898
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
785
899
  }, arguments); },
@@ -811,6 +925,10 @@ function __wbg_get_imports() {
811
925
  const ret = Object.entries(arg0);
812
926
  return ret;
813
927
  },
928
+ __wbg_fetch_5a3c2ce892fcedbd: function() { return handleError(function (arg0, arg1, arg2) {
929
+ const ret = fetch(getStringFromWasm0(arg0, arg1), arg2);
930
+ return ret;
931
+ }, arguments); },
814
932
  __wbg_fetch_9dad4fe911207b37: function(arg0) {
815
933
  const ret = fetch(arg0);
816
934
  return ret;
@@ -819,6 +937,17 @@ function __wbg_get_imports() {
819
937
  const ret = arg0.fetch(arg1);
820
938
  return ret;
821
939
  },
940
+ __wbg_fill_5663f5c647107cce: function(arg0, arg1, arg2, arg3) {
941
+ const ret = arg0.fill(arg1, arg2 >>> 0, arg3 >>> 0);
942
+ return ret;
943
+ },
944
+ __wbg_getItem_b96269ddc16cf24a: function() { return handleError(function (arg0, arg1, arg2, arg3) {
945
+ const ret = arg1.getItem(getStringFromWasm0(arg2, arg3));
946
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
947
+ var len1 = WASM_VECTOR_LEN;
948
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
949
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
950
+ }, arguments); },
822
951
  __wbg_getRandomValues_3f44b700395062e5: function() { return handleError(function (arg0, arg1) {
823
952
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
824
953
  }, arguments); },
@@ -857,6 +986,10 @@ function __wbg_get_imports() {
857
986
  const ret = arg0.headers;
858
987
  return ret;
859
988
  },
989
+ __wbg_importKey_10a137b5a53c66ba: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
990
+ const ret = arg0.importKey(getStringFromWasm0(arg1, arg2), arg3, getStringFromWasm0(arg4, arg5), arg6 !== 0, arg7);
991
+ return ret;
992
+ }, arguments); },
860
993
  __wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
861
994
  let result;
862
995
  try {
@@ -968,7 +1101,7 @@ function __wbg_get_imports() {
968
1101
  const a = state0.a;
969
1102
  state0.a = 0;
970
1103
  try {
971
- return wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined_______true_(a, state0.b, arg0, arg1);
1104
+ return wasm_bindgen_79e945b5d148b8ef___convert__closures_____invoke___js_sys_47ef7e31b3f1968c___Function_fn_wasm_bindgen_79e945b5d148b8ef___JsValue_____wasm_bindgen_79e945b5d148b8ef___sys__Undefined___js_sys_47ef7e31b3f1968c___Function_fn_wasm_bindgen_79e945b5d148b8ef___JsValue_____wasm_bindgen_79e945b5d148b8ef___sys__Undefined_______true_(a, state0.b, arg0, arg1);
972
1105
  } finally {
973
1106
  state0.a = a;
974
1107
  }
@@ -979,6 +1112,10 @@ function __wbg_get_imports() {
979
1112
  state0.a = 0;
980
1113
  }
981
1114
  },
1115
+ __wbg_new_b667d279fd5aa943: function(arg0, arg1) {
1116
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1117
+ return ret;
1118
+ },
982
1119
  __wbg_new_cd45aabdf6073e84: function(arg0) {
983
1120
  const ret = new Uint8Array(arg0);
984
1121
  return ret;
@@ -998,7 +1135,7 @@ function __wbg_get_imports() {
998
1135
  const a = state0.a;
999
1136
  state0.a = 0;
1000
1137
  try {
1001
- return wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined_______true_(a, state0.b, arg0, arg1);
1138
+ return wasm_bindgen_79e945b5d148b8ef___convert__closures_____invoke___js_sys_47ef7e31b3f1968c___Function_fn_wasm_bindgen_79e945b5d148b8ef___JsValue_____wasm_bindgen_79e945b5d148b8ef___sys__Undefined___js_sys_47ef7e31b3f1968c___Function_fn_wasm_bindgen_79e945b5d148b8ef___JsValue_____wasm_bindgen_79e945b5d148b8ef___sys__Undefined_______true_(a, state0.b, arg0, arg1);
1002
1139
  } finally {
1003
1140
  state0.a = a;
1004
1141
  }
@@ -1025,6 +1162,10 @@ function __wbg_get_imports() {
1025
1162
  const ret = Date.now();
1026
1163
  return ret;
1027
1164
  },
1165
+ __wbg_of_85f52f8b6491a7ca: function(arg0) {
1166
+ const ret = Array.of(arg0);
1167
+ return ret;
1168
+ },
1028
1169
  __wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
1029
1170
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1030
1171
  },
@@ -1035,10 +1176,24 @@ function __wbg_get_imports() {
1035
1176
  __wbg_queueMicrotask_6a09b7bc46549209: function(arg0) {
1036
1177
  queueMicrotask(arg0);
1037
1178
  },
1179
+ __wbg_reject_90df95b492dd8563: function(arg0) {
1180
+ const ret = Promise.reject(arg0);
1181
+ return ret;
1182
+ },
1183
+ __wbg_removeEventListener_a3f23c70077bdcc1: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1184
+ arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3);
1185
+ }, arguments); },
1038
1186
  __wbg_resolve_2191a4dfe481c25b: function(arg0) {
1039
1187
  const ret = Promise.resolve(arg0);
1040
1188
  return ret;
1041
1189
  },
1190
+ __wbg_setItem_364a11cf21db9039: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1191
+ arg0.setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1192
+ }, arguments); },
1193
+ __wbg_setTimeout_178fd64c2be7ab78: function(arg0, arg1) {
1194
+ const ret = setTimeout(arg0, arg1);
1195
+ return ret;
1196
+ },
1042
1197
  __wbg_setTimeout_f757f00851f76c42: function(arg0, arg1) {
1043
1198
  const ret = setTimeout(arg0, arg1);
1044
1199
  return ret;
@@ -1050,6 +1205,10 @@ function __wbg_get_imports() {
1050
1205
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
1051
1206
  arg0[arg1] = arg2;
1052
1207
  },
1208
+ __wbg_set_8535240470bf2500: function() { return handleError(function (arg0, arg1, arg2) {
1209
+ const ret = Reflect.set(arg0, arg1, arg2);
1210
+ return ret;
1211
+ }, arguments); },
1053
1212
  __wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
1054
1213
  arg0[arg1 >>> 0] = arg2;
1055
1214
  },
@@ -1102,6 +1261,10 @@ function __wbg_get_imports() {
1102
1261
  const ret = JSON.stringify(arg0);
1103
1262
  return ret;
1104
1263
  }, arguments); },
1264
+ __wbg_subarray_3ed232c8a6baee09: function(arg0, arg1, arg2) {
1265
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1266
+ return ret;
1267
+ },
1105
1268
  __wbg_text_d3a29f7525a132c3: function() { return handleError(function (arg0) {
1106
1269
  const ret = arg0.text();
1107
1270
  return ret;
@@ -1126,13 +1289,13 @@ function __wbg_get_imports() {
1126
1289
  return ret;
1127
1290
  },
1128
1291
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1129
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 156, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1130
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___wasm_bindgen_9e362b674ca4cea___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_9e362b674ca4cea___JsError___true_);
1292
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 153, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1293
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_79e945b5d148b8ef___convert__closures_____invoke___wasm_bindgen_79e945b5d148b8ef___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_79e945b5d148b8ef___JsError___true_);
1131
1294
  return ret;
1132
1295
  },
1133
1296
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1134
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 306, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1135
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke_______true_);
1297
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 48, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1298
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_79e945b5d148b8ef___convert__closures_____invoke_______true_);
1136
1299
  return ret;
1137
1300
  },
1138
1301
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -1171,19 +1334,19 @@ function __wbg_get_imports() {
1171
1334
  };
1172
1335
  }
1173
1336
 
1174
- function wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke_______true_(arg0, arg1) {
1175
- wasm.wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke_______true_(arg0, arg1);
1337
+ function wasm_bindgen_79e945b5d148b8ef___convert__closures_____invoke_______true_(arg0, arg1) {
1338
+ wasm.wasm_bindgen_79e945b5d148b8ef___convert__closures_____invoke_______true_(arg0, arg1);
1176
1339
  }
1177
1340
 
1178
- function wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___wasm_bindgen_9e362b674ca4cea___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_9e362b674ca4cea___JsError___true_(arg0, arg1, arg2) {
1179
- const ret = wasm.wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___wasm_bindgen_9e362b674ca4cea___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_9e362b674ca4cea___JsError___true_(arg0, arg1, arg2);
1341
+ function wasm_bindgen_79e945b5d148b8ef___convert__closures_____invoke___wasm_bindgen_79e945b5d148b8ef___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_79e945b5d148b8ef___JsError___true_(arg0, arg1, arg2) {
1342
+ const ret = wasm.wasm_bindgen_79e945b5d148b8ef___convert__closures_____invoke___wasm_bindgen_79e945b5d148b8ef___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_79e945b5d148b8ef___JsError___true_(arg0, arg1, arg2);
1180
1343
  if (ret[1]) {
1181
1344
  throw takeFromExternrefTable0(ret[0]);
1182
1345
  }
1183
1346
  }
1184
1347
 
1185
- function wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
1186
- wasm.wasm_bindgen_9e362b674ca4cea___convert__closures_____invoke___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined___js_sys_77b4e3062c519671___Function_fn_wasm_bindgen_9e362b674ca4cea___JsValue_____wasm_bindgen_9e362b674ca4cea___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
1348
+ function wasm_bindgen_79e945b5d148b8ef___convert__closures_____invoke___js_sys_47ef7e31b3f1968c___Function_fn_wasm_bindgen_79e945b5d148b8ef___JsValue_____wasm_bindgen_79e945b5d148b8ef___sys__Undefined___js_sys_47ef7e31b3f1968c___Function_fn_wasm_bindgen_79e945b5d148b8ef___JsValue_____wasm_bindgen_79e945b5d148b8ef___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
1349
+ wasm.wasm_bindgen_79e945b5d148b8ef___convert__closures_____invoke___js_sys_47ef7e31b3f1968c___Function_fn_wasm_bindgen_79e945b5d148b8ef___JsValue_____wasm_bindgen_79e945b5d148b8ef___sys__Undefined___js_sys_47ef7e31b3f1968c___Function_fn_wasm_bindgen_79e945b5d148b8ef___JsValue_____wasm_bindgen_79e945b5d148b8ef___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
1187
1350
  }
1188
1351
 
1189
1352
 
package/moss_wasm_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@moss-dev/moss-wasm",
3
3
  "type": "module",
4
4
  "description": "Moss WASM bindings for in-browser semantic search",
5
- "version": "0.16.0",
5
+ "version": "0.18.0",
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "repository": {
8
8
  "type": "git",