@agent-ix/quire-wasm 0.4.0 → 0.6.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/LICENSE +661 -21
- package/package.json +4 -3
- package/pkg/LICENSE +661 -21
- package/pkg/package.json +1 -1
- package/pkg/quire_wasm.d.ts +31 -0
- package/pkg/quire_wasm.js +100 -48
- package/pkg/quire_wasm_bg.wasm +0 -0
- package/pkg/quire_wasm_bg.wasm.d.ts +3 -0
package/pkg/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
],
|
|
7
7
|
"description": "WebAssembly bindings for quire-rs (parse, extract, validate) — powers spec-editor live preview.",
|
|
8
8
|
"version": "0.3.0",
|
|
9
|
-
"license": "
|
|
9
|
+
"license": "AGPL-3.0-only",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/agent-ix/quire-wasm"
|
package/pkg/quire_wasm.d.ts
CHANGED
|
@@ -13,6 +13,34 @@ export function _start(): void;
|
|
|
13
13
|
*/
|
|
14
14
|
export function extract(archetype: string, module_root: string, doc: string): any;
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Compatibility alias for hosts that prefer the core-data naming.
|
|
18
|
+
*/
|
|
19
|
+
export function extractCoreData(request: any): any;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Compatibility alias for hosts migrating from parser-lib wording.
|
|
23
|
+
*/
|
|
24
|
+
export function extractCoreDataFromMarkdown(request: any): any;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Run canonical Filament core-data extraction for one markdown document.
|
|
28
|
+
*
|
|
29
|
+
* Request shape:
|
|
30
|
+
* ```json
|
|
31
|
+
* {
|
|
32
|
+
* "projectId": "project",
|
|
33
|
+
* "documentId": "doc",
|
|
34
|
+
* "artifactId": "artifact-or-null",
|
|
35
|
+
* "relPath": "spec/FR-001.md",
|
|
36
|
+
* "repoName": "repo",
|
|
37
|
+
* "markdown": "---\n...",
|
|
38
|
+
* "objectTypes": [{ "name": "domain", "schema": { "type": "object" } }]
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export function extractFilamentCore(request: any): any;
|
|
43
|
+
|
|
16
44
|
/**
|
|
17
45
|
* Extract from an in-memory module blob.
|
|
18
46
|
*
|
|
@@ -50,10 +78,13 @@ export interface InitOutput {
|
|
|
50
78
|
readonly memory: WebAssembly.Memory;
|
|
51
79
|
readonly _start: () => void;
|
|
52
80
|
readonly extract: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
81
|
+
readonly extractCoreData: (a: any) => [number, number, number];
|
|
53
82
|
readonly extractFromBlob: (a: number, b: number, c: any, d: number, e: number) => [number, number, number];
|
|
54
83
|
readonly parseDocument: (a: number, b: number) => [number, number, number];
|
|
55
84
|
readonly validateFromBlob: (a: number, b: number, c: any, d: any) => [number, number];
|
|
56
85
|
readonly validate_archetype: (a: number, b: number, c: number, d: number, e: any) => [number, number];
|
|
86
|
+
readonly extractCoreDataFromMarkdown: (a: any) => [number, number, number];
|
|
87
|
+
readonly extractFilamentCore: (a: any) => [number, number, number];
|
|
57
88
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
58
89
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
59
90
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/pkg/quire_wasm.js
CHANGED
|
@@ -30,6 +30,58 @@ export function extract(archetype, module_root, doc) {
|
|
|
30
30
|
return takeFromExternrefTable0(ret[0]);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Compatibility alias for hosts that prefer the core-data naming.
|
|
35
|
+
* @param {any} request
|
|
36
|
+
* @returns {any}
|
|
37
|
+
*/
|
|
38
|
+
export function extractCoreData(request) {
|
|
39
|
+
const ret = wasm.extractCoreData(request);
|
|
40
|
+
if (ret[2]) {
|
|
41
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
42
|
+
}
|
|
43
|
+
return takeFromExternrefTable0(ret[0]);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Compatibility alias for hosts migrating from parser-lib wording.
|
|
48
|
+
* @param {any} request
|
|
49
|
+
* @returns {any}
|
|
50
|
+
*/
|
|
51
|
+
export function extractCoreDataFromMarkdown(request) {
|
|
52
|
+
const ret = wasm.extractCoreDataFromMarkdown(request);
|
|
53
|
+
if (ret[2]) {
|
|
54
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
55
|
+
}
|
|
56
|
+
return takeFromExternrefTable0(ret[0]);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Run canonical Filament core-data extraction for one markdown document.
|
|
61
|
+
*
|
|
62
|
+
* Request shape:
|
|
63
|
+
* ```json
|
|
64
|
+
* {
|
|
65
|
+
* "projectId": "project",
|
|
66
|
+
* "documentId": "doc",
|
|
67
|
+
* "artifactId": "artifact-or-null",
|
|
68
|
+
* "relPath": "spec/FR-001.md",
|
|
69
|
+
* "repoName": "repo",
|
|
70
|
+
* "markdown": "---\n...",
|
|
71
|
+
* "objectTypes": [{ "name": "domain", "schema": { "type": "object" } }]
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
74
|
+
* @param {any} request
|
|
75
|
+
* @returns {any}
|
|
76
|
+
*/
|
|
77
|
+
export function extractFilamentCore(request) {
|
|
78
|
+
const ret = wasm.extractFilamentCore(request);
|
|
79
|
+
if (ret[2]) {
|
|
80
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
81
|
+
}
|
|
82
|
+
return takeFromExternrefTable0(ret[0]);
|
|
83
|
+
}
|
|
84
|
+
|
|
33
85
|
/**
|
|
34
86
|
* Extract from an in-memory module blob.
|
|
35
87
|
*
|
|
@@ -109,7 +161,7 @@ export function validate_archetype(archetype, module_root, data) {
|
|
|
109
161
|
function __wbg_get_imports() {
|
|
110
162
|
const import0 = {
|
|
111
163
|
__proto__: null,
|
|
112
|
-
|
|
164
|
+
__wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
|
|
113
165
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
114
166
|
return ret;
|
|
115
167
|
},
|
|
@@ -120,64 +172,64 @@ function __wbg_get_imports() {
|
|
|
120
172
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
121
173
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
122
174
|
},
|
|
123
|
-
|
|
175
|
+
__wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f: function(arg0, arg1) {
|
|
124
176
|
const v = arg1;
|
|
125
177
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
126
178
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
127
179
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
128
180
|
},
|
|
129
|
-
|
|
181
|
+
__wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
|
|
130
182
|
const v = arg0;
|
|
131
183
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
132
184
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
133
185
|
},
|
|
134
|
-
|
|
186
|
+
__wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
|
|
135
187
|
const ret = debugString(arg1);
|
|
136
188
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
137
189
|
const len1 = WASM_VECTOR_LEN;
|
|
138
190
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
139
191
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
140
192
|
},
|
|
141
|
-
|
|
193
|
+
__wbg___wbindgen_in_aca499c5de7ff5e5: function(arg0, arg1) {
|
|
142
194
|
const ret = arg0 in arg1;
|
|
143
195
|
return ret;
|
|
144
196
|
},
|
|
145
|
-
|
|
197
|
+
__wbg___wbindgen_is_bigint_2f76dc55065b4273: function(arg0) {
|
|
146
198
|
const ret = typeof(arg0) === 'bigint';
|
|
147
199
|
return ret;
|
|
148
200
|
},
|
|
149
|
-
|
|
201
|
+
__wbg___wbindgen_is_function_1ff95bcc5517c252: function(arg0) {
|
|
150
202
|
const ret = typeof(arg0) === 'function';
|
|
151
203
|
return ret;
|
|
152
204
|
},
|
|
153
|
-
|
|
205
|
+
__wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
|
|
154
206
|
const val = arg0;
|
|
155
207
|
const ret = typeof(val) === 'object' && val !== null;
|
|
156
208
|
return ret;
|
|
157
209
|
},
|
|
158
|
-
|
|
210
|
+
__wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
|
|
159
211
|
const ret = typeof(arg0) === 'string';
|
|
160
212
|
return ret;
|
|
161
213
|
},
|
|
162
|
-
|
|
214
|
+
__wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
|
|
163
215
|
const ret = arg0 === undefined;
|
|
164
216
|
return ret;
|
|
165
217
|
},
|
|
166
|
-
|
|
218
|
+
__wbg___wbindgen_jsval_eq_e659fcf7b0e32763: function(arg0, arg1) {
|
|
167
219
|
const ret = arg0 === arg1;
|
|
168
220
|
return ret;
|
|
169
221
|
},
|
|
170
|
-
|
|
222
|
+
__wbg___wbindgen_jsval_loose_eq_db4c3b15f63fc170: function(arg0, arg1) {
|
|
171
223
|
const ret = arg0 == arg1;
|
|
172
224
|
return ret;
|
|
173
225
|
},
|
|
174
|
-
|
|
226
|
+
__wbg___wbindgen_number_get_394265ed1e1b84ee: function(arg0, arg1) {
|
|
175
227
|
const obj = arg1;
|
|
176
228
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
177
229
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
178
230
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
179
231
|
},
|
|
180
|
-
|
|
232
|
+
__wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
|
|
181
233
|
const obj = arg1;
|
|
182
234
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
183
235
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -185,18 +237,18 @@ function __wbg_get_imports() {
|
|
|
185
237
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
186
238
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
187
239
|
},
|
|
188
|
-
|
|
240
|
+
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
189
241
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
190
242
|
},
|
|
191
|
-
|
|
243
|
+
__wbg_call_8a2dd23819f8a60a: function() { return handleError(function (arg0, arg1) {
|
|
192
244
|
const ret = arg0.call(arg1);
|
|
193
245
|
return ret;
|
|
194
246
|
}, arguments); },
|
|
195
|
-
|
|
247
|
+
__wbg_done_89b2b13e91a60321: function(arg0) {
|
|
196
248
|
const ret = arg0.done;
|
|
197
249
|
return ret;
|
|
198
250
|
},
|
|
199
|
-
|
|
251
|
+
__wbg_entries_015dc610cd81ede0: function(arg0) {
|
|
200
252
|
const ret = Object.entries(arg0);
|
|
201
253
|
return ret;
|
|
202
254
|
},
|
|
@@ -214,15 +266,15 @@ function __wbg_get_imports() {
|
|
|
214
266
|
__wbg_getRandomValues_3f44b700395062e5: function() { return handleError(function (arg0, arg1) {
|
|
215
267
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
216
268
|
}, arguments); },
|
|
217
|
-
|
|
269
|
+
__wbg_get_507a50627bffa49b: function(arg0, arg1) {
|
|
218
270
|
const ret = arg0[arg1 >>> 0];
|
|
219
271
|
return ret;
|
|
220
272
|
},
|
|
221
|
-
|
|
273
|
+
__wbg_get_c7eb1f358a7654df: function() { return handleError(function (arg0, arg1) {
|
|
222
274
|
const ret = Reflect.get(arg0, arg1);
|
|
223
275
|
return ret;
|
|
224
276
|
}, arguments); },
|
|
225
|
-
|
|
277
|
+
__wbg_get_unchecked_6e0ad6d2a41b06f6: function(arg0, arg1) {
|
|
226
278
|
const ret = arg0[arg1 >>> 0];
|
|
227
279
|
return ret;
|
|
228
280
|
},
|
|
@@ -230,7 +282,7 @@ function __wbg_get_imports() {
|
|
|
230
282
|
const ret = arg0[arg1];
|
|
231
283
|
return ret;
|
|
232
284
|
},
|
|
233
|
-
|
|
285
|
+
__wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
|
|
234
286
|
let result;
|
|
235
287
|
try {
|
|
236
288
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -240,7 +292,7 @@ function __wbg_get_imports() {
|
|
|
240
292
|
const ret = result;
|
|
241
293
|
return ret;
|
|
242
294
|
},
|
|
243
|
-
|
|
295
|
+
__wbg_instanceof_Map_e5b5e3db98422fcc: function(arg0) {
|
|
244
296
|
let result;
|
|
245
297
|
try {
|
|
246
298
|
result = arg0 instanceof Map;
|
|
@@ -250,7 +302,7 @@ function __wbg_get_imports() {
|
|
|
250
302
|
const ret = result;
|
|
251
303
|
return ret;
|
|
252
304
|
},
|
|
253
|
-
|
|
305
|
+
__wbg_instanceof_Uint8Array_309b927aaf7a3fc7: function(arg0) {
|
|
254
306
|
let result;
|
|
255
307
|
try {
|
|
256
308
|
result = arg0 instanceof Uint8Array;
|
|
@@ -260,23 +312,23 @@ function __wbg_get_imports() {
|
|
|
260
312
|
const ret = result;
|
|
261
313
|
return ret;
|
|
262
314
|
},
|
|
263
|
-
|
|
315
|
+
__wbg_isArray_0677c962b281d01a: function(arg0) {
|
|
264
316
|
const ret = Array.isArray(arg0);
|
|
265
317
|
return ret;
|
|
266
318
|
},
|
|
267
|
-
|
|
319
|
+
__wbg_isSafeInteger_04f36e4056f1b851: function(arg0) {
|
|
268
320
|
const ret = Number.isSafeInteger(arg0);
|
|
269
321
|
return ret;
|
|
270
322
|
},
|
|
271
|
-
|
|
323
|
+
__wbg_iterator_6f722e4a93058b71: function() {
|
|
272
324
|
const ret = Symbol.iterator;
|
|
273
325
|
return ret;
|
|
274
326
|
},
|
|
275
|
-
|
|
327
|
+
__wbg_length_1f0964f4a5e2c6d8: function(arg0) {
|
|
276
328
|
const ret = arg0.length;
|
|
277
329
|
return ret;
|
|
278
330
|
},
|
|
279
|
-
|
|
331
|
+
__wbg_length_370319915dc99107: function(arg0) {
|
|
280
332
|
const ret = arg0.length;
|
|
281
333
|
return ret;
|
|
282
334
|
},
|
|
@@ -284,41 +336,41 @@ function __wbg_get_imports() {
|
|
|
284
336
|
const ret = new Error();
|
|
285
337
|
return ret;
|
|
286
338
|
},
|
|
287
|
-
|
|
288
|
-
const ret = new
|
|
339
|
+
__wbg_new_32b398fb48b6d94a: function() {
|
|
340
|
+
const ret = new Array();
|
|
289
341
|
return ret;
|
|
290
342
|
},
|
|
291
|
-
|
|
343
|
+
__wbg_new_7796ffc7ed656783: function() {
|
|
292
344
|
const ret = new Map();
|
|
293
345
|
return ret;
|
|
294
346
|
},
|
|
295
|
-
|
|
296
|
-
const ret = new Array();
|
|
297
|
-
return ret;
|
|
298
|
-
},
|
|
299
|
-
__wbg_new_81880fb5002cb255: function(arg0) {
|
|
347
|
+
__wbg_new_cd45aabdf6073e84: function(arg0) {
|
|
300
348
|
const ret = new Uint8Array(arg0);
|
|
301
349
|
return ret;
|
|
302
350
|
},
|
|
303
|
-
|
|
304
|
-
const ret =
|
|
351
|
+
__wbg_new_da52cf8fe3429cb2: function() {
|
|
352
|
+
const ret = new Object();
|
|
305
353
|
return ret;
|
|
306
|
-
},
|
|
307
|
-
|
|
354
|
+
},
|
|
355
|
+
__wbg_next_6dbf2c0ac8cde20f: function(arg0) {
|
|
308
356
|
const ret = arg0.next;
|
|
309
357
|
return ret;
|
|
310
358
|
},
|
|
311
|
-
|
|
359
|
+
__wbg_next_71f2aa1cb3d1e37e: function() { return handleError(function (arg0) {
|
|
360
|
+
const ret = arg0.next();
|
|
361
|
+
return ret;
|
|
362
|
+
}, arguments); },
|
|
363
|
+
__wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
|
|
312
364
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
313
365
|
},
|
|
314
|
-
|
|
315
|
-
arg0[arg1] = arg2;
|
|
316
|
-
},
|
|
317
|
-
__wbg_set_9a1d61e17de7054c: function(arg0, arg1, arg2) {
|
|
366
|
+
__wbg_set_575dd786d51585f8: function(arg0, arg1, arg2) {
|
|
318
367
|
const ret = arg0.set(arg1, arg2);
|
|
319
368
|
return ret;
|
|
320
369
|
},
|
|
321
|
-
|
|
370
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
371
|
+
arg0[arg1] = arg2;
|
|
372
|
+
},
|
|
373
|
+
__wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
|
|
322
374
|
arg0[arg1 >>> 0] = arg2;
|
|
323
375
|
},
|
|
324
376
|
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
@@ -328,7 +380,7 @@ function __wbg_get_imports() {
|
|
|
328
380
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
329
381
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
330
382
|
},
|
|
331
|
-
|
|
383
|
+
__wbg_value_a5d5488a9589444a: function(arg0) {
|
|
332
384
|
const ret = arg0.value;
|
|
333
385
|
return ret;
|
|
334
386
|
},
|
package/pkg/quire_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const _start: () => void;
|
|
5
5
|
export const extract: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
6
|
+
export const extractCoreData: (a: any) => [number, number, number];
|
|
6
7
|
export const extractFromBlob: (a: number, b: number, c: any, d: number, e: number) => [number, number, number];
|
|
7
8
|
export const parseDocument: (a: number, b: number) => [number, number, number];
|
|
8
9
|
export const validateFromBlob: (a: number, b: number, c: any, d: any) => [number, number];
|
|
9
10
|
export const validate_archetype: (a: number, b: number, c: number, d: number, e: any) => [number, number];
|
|
11
|
+
export const extractCoreDataFromMarkdown: (a: any) => [number, number, number];
|
|
12
|
+
export const extractFilamentCore: (a: any) => [number, number, number];
|
|
10
13
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
11
14
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
12
15
|
export const __wbindgen_exn_store: (a: number) => void;
|