@hegeldev/hegel 0.2.3 → 0.3.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.
Files changed (61) hide show
  1. package/README.md +10 -4
  2. package/dist/cbor.d.ts +15 -0
  3. package/dist/cbor.d.ts.map +1 -0
  4. package/dist/cbor.js +32 -0
  5. package/dist/cbor.js.map +1 -0
  6. package/dist/checksums.d.ts +16 -0
  7. package/dist/checksums.d.ts.map +1 -0
  8. package/dist/checksums.js +26 -0
  9. package/dist/checksums.js.map +1 -0
  10. package/dist/generators/numeric.d.ts.map +1 -1
  11. package/dist/generators/numeric.js +16 -7
  12. package/dist/generators/numeric.js.map +1 -1
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +1 -1
  15. package/dist/libhegel.d.ts +169 -0
  16. package/dist/libhegel.d.ts.map +1 -0
  17. package/dist/libhegel.js +338 -0
  18. package/dist/libhegel.js.map +1 -0
  19. package/dist/locate.d.ts +42 -0
  20. package/dist/locate.d.ts.map +1 -0
  21. package/dist/locate.js +94 -0
  22. package/dist/locate.js.map +1 -0
  23. package/dist/runner.d.ts +30 -22
  24. package/dist/runner.d.ts.map +1 -1
  25. package/dist/runner.js +150 -201
  26. package/dist/runner.js.map +1 -1
  27. package/dist/session.d.ts +16 -13
  28. package/dist/session.d.ts.map +1 -1
  29. package/dist/session.js +32 -145
  30. package/dist/session.js.map +1 -1
  31. package/dist/testCase.d.ts +7 -7
  32. package/dist/testCase.d.ts.map +1 -1
  33. package/dist/testCase.js +1 -5
  34. package/dist/testCase.js.map +1 -1
  35. package/dist/wtf8.d.ts +2 -0
  36. package/dist/wtf8.d.ts.map +1 -1
  37. package/dist/wtf8.js +2 -0
  38. package/dist/wtf8.js.map +1 -1
  39. package/native/libhegel-darwin-arm64.dylib +0 -0
  40. package/native/libhegel-linux-amd64.so +0 -0
  41. package/native/libhegel-linux-arm64.so +0 -0
  42. package/native/libhegel-windows-amd64.dll +0 -0
  43. package/native/libhegel-windows-arm64.dll +0 -0
  44. package/package.json +9 -11
  45. package/dist/connection.d.ts +0 -82
  46. package/dist/connection.d.ts.map +0 -1
  47. package/dist/connection.js +0 -231
  48. package/dist/connection.js.map +0 -1
  49. package/dist/crc32.d.ts +0 -13
  50. package/dist/crc32.d.ts.map +0 -1
  51. package/dist/crc32.js +0 -30
  52. package/dist/crc32.js.map +0 -1
  53. package/dist/protocol.d.ts +0 -25
  54. package/dist/protocol.d.ts.map +0 -1
  55. package/dist/protocol.js +0 -77
  56. package/dist/protocol.js.map +0 -1
  57. package/dist/uv-install.sh +0 -2226
  58. package/dist/uv.d.ts +0 -20
  59. package/dist/uv.d.ts.map +0 -1
  60. package/dist/uv.js +0 -103
  61. package/dist/uv.js.map +0 -1
@@ -0,0 +1,338 @@
1
+ /**
2
+ * Thin, typed binding to the native `libhegel` C ABI (see
3
+ * `hegel-rust/hegel-c/include/hegel.h`, version 0.23.0) via {@link koffi}.
4
+ *
5
+ * The {@link Libhegel} class owns the loaded library's function pointers and
6
+ * exposes ergonomic wrappers. Every fallible call takes a `hegel_context_t*`
7
+ * first argument and returns a `hegel_result_t` code (`HEGEL_OK` is zero;
8
+ * negatives are errors), writing any value it produces — a handle, a string, a
9
+ * count — through a trailing out-parameter. The wrappers map those codes to
10
+ * thrown errors ({@link StopTestError} / {@link AssumeError} for the
11
+ * choice-budget / rejected-draw cases, otherwise {@link LibhegelError} carrying
12
+ * the diagnostic from `hegel_context_last_error`) and read the out-parameters
13
+ * back into JS values.
14
+ *
15
+ * libhegel frees nothing for you: every handle from a constructor
16
+ * (`hegel_context_new`, `hegel_settings_new`, `hegel_run_start`,
17
+ * `hegel_test_case_from_blob`) must be released by the caller with its matching
18
+ * free (the runner does so in `finally` blocks). Test cases from
19
+ * `hegel_next_test_case` are borrowed and released by `hegel_run_free`.
20
+ *
21
+ * @packageDocumentation
22
+ */
23
+ import koffi from "koffi";
24
+ import { StopTestError, AssumeError } from "./testCase.js";
25
+ /** `hegel_status_t` — outcome of a single test case. */
26
+ export const Status = {
27
+ VALID: 0,
28
+ INVALID: 1,
29
+ OVERRUN: 2,
30
+ INTERESTING: 3,
31
+ };
32
+ /** `hegel_run_status_t` — aggregate outcome of a finished run. */
33
+ export const RunStatus = {
34
+ PASSED: 0,
35
+ FAILED: 1,
36
+ ERROR: 2,
37
+ };
38
+ /** `hegel_verbosity_t`. */
39
+ export const NativeVerbosity = {
40
+ QUIET: 0,
41
+ NORMAL: 1,
42
+ VERBOSE: 2,
43
+ DEBUG: 3,
44
+ };
45
+ /** Relevant `hegel_result_t` codes. */
46
+ const RESULT_OK = 0;
47
+ const RESULT_STOP_TEST = -1;
48
+ const RESULT_ASSUME = -2;
49
+ /** An error returned by a fallible libhegel call. */
50
+ export class LibhegelError extends Error {
51
+ code;
52
+ constructor(message, code) {
53
+ super(message);
54
+ this.name = "LibhegelError";
55
+ this.code = code;
56
+ }
57
+ }
58
+ /**
59
+ * Bind every libhegel function used by the client against a loaded koffi
60
+ * library handle.
61
+ *
62
+ * Calls that cannot fail for the inputs the client gives them (constructors,
63
+ * frees, setters, result getters) pass a NULL context — which the ABI accepts,
64
+ * simply opting out of error messages — and discard the result code here; the
65
+ * genuinely fallible calls return the code for {@link Libhegel} to map to an
66
+ * exception.
67
+ */
68
+ export function bindLibrary(lib) {
69
+ // The koffi FFI boundary is inherently dynamically typed; `Bindings` re-imposes
70
+ // static types on the wrappers below.
71
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
72
+ const f = (proto) => lib.func(proto);
73
+ const contextNew = f("void* hegel_context_new()");
74
+ const contextFree = f("void hegel_context_free(void* ctx)");
75
+ const contextLastError = f("const char* hegel_context_last_error(void* ctx)");
76
+ const settingsNew = f("int hegel_settings_new(void* ctx, _Out_ void** out)");
77
+ const settingsFree = f("void hegel_settings_free(void* ctx, void* s)");
78
+ const settingsTestCases = f("int hegel_settings_set_test_cases(void* ctx, void* s, uint64_t n)");
79
+ const settingsVerbosity = f("int hegel_settings_set_verbosity(void* ctx, void* s, int v)");
80
+ const settingsSeed = f("int hegel_settings_set_seed(void* ctx, void* s, uint64_t seed, bool has_seed)");
81
+ const settingsDerandomize = f("int hegel_settings_set_derandomize(void* ctx, void* s, bool d)");
82
+ const settingsDatabase = f("int hegel_settings_set_database(void* ctx, void* s, const char* db)");
83
+ const settingsDatabaseKey = f("int hegel_settings_set_database_key(void* ctx, void* s, const char* key)");
84
+ const settingsSuppressHealthCheck = f("int hegel_settings_set_suppress_health_check(void* ctx, void* s, uint32_t checks)");
85
+ const runStart = f("int hegel_run_start(void* ctx, void* settings, _Out_ void** out_run)");
86
+ const nextTestCase = f("int hegel_next_test_case(void* ctx, void* run, _Out_ void** out_tc)");
87
+ const runResult = f("int hegel_run_result(void* ctx, void* run, _Out_ void** out_result)");
88
+ const runFree = f("void hegel_run_free(void* ctx, void* run)");
89
+ const testCaseFromBlob = f("int hegel_test_case_from_blob(void* ctx, void* s, const char* blob, _Out_ void** out_tc)");
90
+ const testCaseFree = f("void hegel_test_case_free(void* ctx, void* tc)");
91
+ const generate = f("int hegel_generate(void* ctx, void* tc, uint8_t* schema, size_t schema_len, _Out_ void** out, _Out_ size_t* out_len)");
92
+ const startSpan = f("int hegel_start_span(void* ctx, void* tc, uint64_t label)");
93
+ const stopSpan = f("int hegel_stop_span(void* ctx, void* tc, bool discard)");
94
+ const newCollection = f("int hegel_new_collection(void* ctx, void* tc, uint64_t min, uint64_t max, _Out_ int64_t* out)");
95
+ const collectionMore = f("int hegel_collection_more(void* ctx, void* tc, int64_t id, _Out_ bool* out)");
96
+ const collectionReject = f("int hegel_collection_reject(void* ctx, void* tc, int64_t id, const char* why)");
97
+ const markComplete = f("int hegel_mark_complete(void* ctx, void* tc, int status, const char* origin)");
98
+ const runResultStatus = f("int hegel_run_result_status(void* ctx, void* r, _Out_ int* out)");
99
+ const runResultError = f("int hegel_run_result_error(void* ctx, void* r, _Out_ char** out)");
100
+ const runResultFailureCount = f("int hegel_run_result_failure_count(void* ctx, void* r, _Out_ size_t* out)");
101
+ const runResultFailure = f("int hegel_run_result_failure(void* ctx, void* r, size_t index, _Out_ void** out)");
102
+ const failureOrigin = f("int hegel_failure_origin(void* ctx, void* f, _Out_ char** out)");
103
+ const failureReproductionBlob = f("int hegel_failure_reproduction_blob(void* ctx, void* f, _Out_ char** out)");
104
+ const version = f("int hegel_version(void* ctx, _Out_ char** out)");
105
+ return {
106
+ contextNew: () => contextNew(),
107
+ contextFree: (ctx) => contextFree(ctx),
108
+ contextLastError: (ctx) => contextLastError(ctx),
109
+ settingsNew: () => {
110
+ const out = [null];
111
+ settingsNew(null, out);
112
+ return out[0];
113
+ },
114
+ settingsFree: (s) => settingsFree(null, s),
115
+ settingsTestCases: (s, n) => void settingsTestCases(null, s, n),
116
+ settingsVerbosity: (s, v) => void settingsVerbosity(null, s, v),
117
+ settingsSeed: (s, seed, hasSeed) => void settingsSeed(null, s, seed, hasSeed),
118
+ settingsDerandomize: (s, on) => void settingsDerandomize(null, s, on),
119
+ settingsDatabase: (ctx, s, db) => void settingsDatabase(ctx, s, db),
120
+ settingsDatabaseKey: (ctx, s, key) => void settingsDatabaseKey(ctx, s, key),
121
+ settingsSuppressHealthCheck: (s, checks) => void settingsSuppressHealthCheck(null, s, checks),
122
+ runStart: (ctx, s, out) => runStart(ctx, s, out),
123
+ nextTestCase: (ctx, run, out) => nextTestCase(ctx, run, out),
124
+ runResult: (ctx, run, out) => runResult(ctx, run, out),
125
+ runFree: (run) => runFree(null, run),
126
+ testCaseFromBlob: (ctx, s, blob, out) => testCaseFromBlob(ctx, s, blob, out),
127
+ testCaseFree: (tc) => testCaseFree(null, tc),
128
+ generate: (ctx, tc, schema, schemaLen, out, outLen) => generate(ctx, tc, schema, schemaLen, out, outLen),
129
+ startSpan: (ctx, tc, label) => startSpan(ctx, tc, label),
130
+ stopSpan: (ctx, tc, discard) => stopSpan(ctx, tc, discard),
131
+ newCollection: (ctx, tc, min, max, out) => newCollection(ctx, tc, min, max, out),
132
+ collectionMore: (ctx, tc, id, out) => collectionMore(ctx, tc, id, out),
133
+ collectionReject: (ctx, tc, id, why) => collectionReject(ctx, tc, id, why),
134
+ markComplete: (ctx, tc, status, origin) => markComplete(ctx, tc, status, origin),
135
+ runResultStatus: (r) => {
136
+ const out = [0];
137
+ runResultStatus(null, r, out);
138
+ return out[0];
139
+ },
140
+ runResultError: (r) => {
141
+ const out = [null];
142
+ runResultError(null, r, out);
143
+ return out[0];
144
+ },
145
+ runResultFailureCount: (r) => {
146
+ const out = [0];
147
+ runResultFailureCount(null, r, out);
148
+ return Number(out[0]);
149
+ },
150
+ runResultFailure: (r, index) => {
151
+ const out = [null];
152
+ runResultFailure(null, r, index, out);
153
+ return out[0];
154
+ },
155
+ failureOrigin: (fp) => {
156
+ const out = [null];
157
+ failureOrigin(null, fp, out);
158
+ return out[0];
159
+ },
160
+ failureReproductionBlob: (fp) => {
161
+ const out = [null];
162
+ failureReproductionBlob(null, fp, out);
163
+ return out[0];
164
+ },
165
+ version: () => {
166
+ // `hegel_version` always writes a non-null static string (it only fails on
167
+ // a NULL out-pointer, which we never pass), so the seeded "" is never read.
168
+ const out = [""];
169
+ version(null, out);
170
+ return out[0];
171
+ },
172
+ };
173
+ }
174
+ const UINT64_MAX = 0xffffffffffffffffn;
175
+ /**
176
+ * High-level wrapper over the libhegel C ABI.
177
+ */
178
+ export class Libhegel {
179
+ fns;
180
+ constructor(fns) {
181
+ this.fns = fns;
182
+ }
183
+ /** Load libhegel from a shared-library path. */
184
+ static load(path) {
185
+ return new Libhegel(bindLibrary(koffi.load(path)));
186
+ }
187
+ version() {
188
+ return this.fns.version();
189
+ }
190
+ newContext() {
191
+ return this.fns.contextNew();
192
+ }
193
+ freeContext(ctx) {
194
+ this.fns.contextFree(ctx);
195
+ }
196
+ lastError(ctx) {
197
+ return this.fns.contextLastError(ctx) ?? "";
198
+ }
199
+ newSettings() {
200
+ return this.fns.settingsNew();
201
+ }
202
+ freeSettings(s) {
203
+ this.fns.settingsFree(s);
204
+ }
205
+ setTestCases(s, n) {
206
+ this.fns.settingsTestCases(s, n);
207
+ }
208
+ setVerbosity(s, v) {
209
+ this.fns.settingsVerbosity(s, v);
210
+ }
211
+ setSeed(s, seed) {
212
+ this.fns.settingsSeed(s, seed, true);
213
+ }
214
+ setDerandomize(s, on) {
215
+ this.fns.settingsDerandomize(s, on);
216
+ }
217
+ setDatabase(ctx, s, db) {
218
+ this.fns.settingsDatabase(ctx, s, db);
219
+ }
220
+ setDatabaseKey(ctx, s, key) {
221
+ this.fns.settingsDatabaseKey(ctx, s, key);
222
+ }
223
+ setSuppressHealthCheck(s, checks) {
224
+ this.fns.settingsSuppressHealthCheck(s, checks);
225
+ }
226
+ /** Start a run. Throws {@link LibhegelError} on failure. */
227
+ runStart(ctx, settings) {
228
+ const out = [null];
229
+ this.check(ctx, this.fns.runStart(ctx, settings, out), "hegel_run_start");
230
+ return out[0];
231
+ }
232
+ /**
233
+ * Pull the next test case, or `null` when the run is finished. Throws if the
234
+ * engine reported a mid-run error (e.g. the previous case was not completed).
235
+ */
236
+ nextTestCase(ctx, run) {
237
+ const out = [null];
238
+ this.check(ctx, this.fns.nextTestCase(ctx, run, out), "hegel_next_test_case");
239
+ return out[0] ?? null;
240
+ }
241
+ /** Read the aggregated run result. Throws on failure. */
242
+ runResult(ctx, run) {
243
+ const out = [null];
244
+ this.check(ctx, this.fns.runResult(ctx, run, out), "hegel_run_result");
245
+ return out[0];
246
+ }
247
+ freeRun(run) {
248
+ this.fns.runFree(run);
249
+ }
250
+ /**
251
+ * Build a standalone test case that replays a base64 failure blob (from
252
+ * {@link reproductionBlob}). Owned by the caller — release with
253
+ * {@link freeTestCase}. Throws {@link LibhegelError} on a malformed blob.
254
+ */
255
+ testCaseFromBlob(ctx, settings, blob) {
256
+ const out = [null];
257
+ this.check(ctx, this.fns.testCaseFromBlob(ctx, settings, blob, out), "hegel_test_case_from_blob");
258
+ return out[0];
259
+ }
260
+ freeTestCase(tc) {
261
+ this.fns.testCaseFree(tc);
262
+ }
263
+ /**
264
+ * Map a fallible `int`-returning result code to an exception.
265
+ * `HEGEL_E_STOP_TEST` becomes {@link StopTestError}, `HEGEL_E_ASSUME` becomes
266
+ * {@link AssumeError}; any other non-OK code becomes a {@link LibhegelError}
267
+ * carrying the context diagnostic.
268
+ */
269
+ check(ctx, code, op) {
270
+ if (code === RESULT_OK) {
271
+ return;
272
+ }
273
+ if (code === RESULT_STOP_TEST) {
274
+ throw new StopTestError();
275
+ }
276
+ if (code === RESULT_ASSUME) {
277
+ // The engine rejected this draw (e.g. a format generator's internal
278
+ // precondition failed); discard the test case like a failed assume().
279
+ throw new AssumeError();
280
+ }
281
+ throw new LibhegelError(`${op} failed: ${this.lastError(ctx)}`, code);
282
+ }
283
+ /** Draw a CBOR value for the given CBOR-encoded schema. */
284
+ generate(ctx, tc, schema) {
285
+ const out = [null];
286
+ const outLen = [0];
287
+ const code = this.fns.generate(ctx, tc, schema, schema.length, out, outLen);
288
+ this.check(ctx, code, "hegel_generate");
289
+ const len = Number(outLen[0]);
290
+ return Buffer.from(koffi.decode(out[0], "uint8_t", len));
291
+ }
292
+ startSpan(ctx, tc, label) {
293
+ this.check(ctx, this.fns.startSpan(ctx, tc, label), "hegel_start_span");
294
+ }
295
+ stopSpan(ctx, tc, discard) {
296
+ this.check(ctx, this.fns.stopSpan(ctx, tc, discard), "hegel_stop_span");
297
+ }
298
+ newCollection(ctx, tc, min, max) {
299
+ const out = [0];
300
+ const maxArg = max === undefined ? UINT64_MAX : BigInt(max);
301
+ this.check(ctx, this.fns.newCollection(ctx, tc, min, maxArg, out), "hegel_new_collection");
302
+ return BigInt(out[0]);
303
+ }
304
+ collectionMore(ctx, tc, id) {
305
+ const out = [false];
306
+ this.check(ctx, this.fns.collectionMore(ctx, tc, id, out), "hegel_collection_more");
307
+ return out[0];
308
+ }
309
+ collectionReject(ctx, tc, id, why) {
310
+ this.check(ctx, this.fns.collectionReject(ctx, tc, id, why), "hegel_collection_reject");
311
+ }
312
+ markComplete(ctx, tc, status, origin) {
313
+ this.check(ctx, this.fns.markComplete(ctx, tc, status, origin), "hegel_mark_complete");
314
+ }
315
+ runStatus(r) {
316
+ return this.fns.runResultStatus(r);
317
+ }
318
+ runError(r) {
319
+ return this.fns.runResultError(r);
320
+ }
321
+ failureCount(r) {
322
+ return this.fns.runResultFailureCount(r);
323
+ }
324
+ failure(r, index) {
325
+ return this.fns.runResultFailure(r, index);
326
+ }
327
+ failureOrigin(fp) {
328
+ return this.fns.failureOrigin(fp) ?? "";
329
+ }
330
+ /**
331
+ * The failure's base64 reproduce blob, or `null` if the engine produced none.
332
+ * Replay it via {@link testCaseFromBlob} to surface the test's own error.
333
+ */
334
+ reproductionBlob(fp) {
335
+ return this.fns.failureReproductionBlob(fp);
336
+ }
337
+ }
338
+ //# sourceMappingURL=libhegel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libhegel.js","sourceRoot":"","sources":["../src/libhegel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAK3D,wDAAwD;AACxD,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,CAAC;CACN,CAAC;AAEX,kEAAkE;AAClE,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;CACA,CAAC;AAEX,2BAA2B;AAC3B,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,CAAC;IACV,KAAK,EAAE,CAAC;CACA,CAAC;AAEX,uCAAuC;AACvC,MAAM,SAAS,GAAG,CAAC,CAAC;AACpB,MA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C,EAAE,CAAC,CAAC;IAC9C,CAAC;CACF"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Locates the native `libhegel` shared library for the host platform.
3
+ *
4
+ * The per-platform shared libraries are bundled into the published npm package
5
+ * (under `native/`, fetched at pack time by `scripts/fetch-libhegel.mjs`), so
6
+ * there is nothing to download or cache at runtime. Resolution is:
7
+ *
8
+ * 1. `$HEGEL_LIBHEGEL_PATH`, if set — used directly (a local build / override).
9
+ * 2. The bundled artifact for the host platform under the package's `native/`
10
+ * directory.
11
+ *
12
+ * Resolution is synchronous: the library must be available before the
13
+ * (synchronous) `hegel.test` run loop starts.
14
+ *
15
+ * @packageDocumentation
16
+ */
17
+ /** Env var pinning libhegel to an explicit path (overrides the bundled copy). */
18
+ export declare const LIBRARY_PATH_ENV = "HEGEL_LIBHEGEL_PATH";
19
+ /**
20
+ * Returns the bundled asset filename for the given platform and architecture,
21
+ * e.g. `libhegel-linux-arm64.so`. Throws for an unsupported OS or CPU
22
+ * architecture.
23
+ */
24
+ export declare function libhegelAssetName(platform: NodeJS.Platform, arch: string): string;
25
+ /** Directory holding the bundled shared libraries, relative to this module. */
26
+ export declare function nativeDir(): string;
27
+ /**
28
+ * Resolves a filesystem path to the native libhegel library. The environment,
29
+ * platform, architecture and native directory are passed in so the resolution
30
+ * logic is fully unit-testable.
31
+ */
32
+ export declare function resolveLibrary(opts: {
33
+ env: NodeJS.ProcessEnv;
34
+ platform: NodeJS.Platform;
35
+ arch: string;
36
+ nativeDir: string;
37
+ }): string;
38
+ /**
39
+ * Resolves the libhegel path for the current process environment.
40
+ */
41
+ export declare function locateLibhegel(): string;
42
+ //# sourceMappingURL=locate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locate.d.ts","sourceRoot":"","sources":["../src/locate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAiCjF;AAED,+EAA+E;AAC/E,wBAAgB,SAAS,IAAI,MAAM,CAIlC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,MAAM,CAgBT;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAOvC"}
package/dist/locate.js ADDED
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Locates the native `libhegel` shared library for the host platform.
3
+ *
4
+ * The per-platform shared libraries are bundled into the published npm package
5
+ * (under `native/`, fetched at pack time by `scripts/fetch-libhegel.mjs`), so
6
+ * there is nothing to download or cache at runtime. Resolution is:
7
+ *
8
+ * 1. `$HEGEL_LIBHEGEL_PATH`, if set — used directly (a local build / override).
9
+ * 2. The bundled artifact for the host platform under the package's `native/`
10
+ * directory.
11
+ *
12
+ * Resolution is synchronous: the library must be available before the
13
+ * (synchronous) `hegel.test` run loop starts.
14
+ *
15
+ * @packageDocumentation
16
+ */
17
+ import * as fs from "node:fs";
18
+ import * as path from "node:path";
19
+ /** Env var pinning libhegel to an explicit path (overrides the bundled copy). */
20
+ export const LIBRARY_PATH_ENV = "HEGEL_LIBHEGEL_PATH";
21
+ /**
22
+ * Returns the bundled asset filename for the given platform and architecture,
23
+ * e.g. `libhegel-linux-arm64.so`. Throws for an unsupported OS or CPU
24
+ * architecture.
25
+ */
26
+ export function libhegelAssetName(platform, arch) {
27
+ let osName;
28
+ let ext;
29
+ switch (platform) {
30
+ case "linux":
31
+ osName = "linux";
32
+ ext = "so";
33
+ break;
34
+ case "darwin":
35
+ osName = "darwin";
36
+ ext = "dylib";
37
+ break;
38
+ case "win32":
39
+ osName = "windows";
40
+ ext = "dll";
41
+ break;
42
+ default:
43
+ throw new Error(`Unsupported platform '${platform}' for libhegel`);
44
+ }
45
+ let archName;
46
+ switch (arch) {
47
+ case "x64":
48
+ archName = "amd64";
49
+ break;
50
+ case "arm64":
51
+ archName = "arm64";
52
+ break;
53
+ default:
54
+ throw new Error(`Unsupported architecture '${arch}' for libhegel`);
55
+ }
56
+ return `libhegel-${osName}-${archName}.${ext}`;
57
+ }
58
+ /** Directory holding the bundled shared libraries, relative to this module. */
59
+ export function nativeDir() {
60
+ // At runtime this module is `dist/locate.js`; under tests it is `src/locate.ts`.
61
+ // Either way the bundled `native/` directory sits one level up.
62
+ return path.join(import.meta.dirname, "..", "native");
63
+ }
64
+ /**
65
+ * Resolves a filesystem path to the native libhegel library. The environment,
66
+ * platform, architecture and native directory are passed in so the resolution
67
+ * logic is fully unit-testable.
68
+ */
69
+ export function resolveLibrary(opts) {
70
+ const override = opts.env[LIBRARY_PATH_ENV];
71
+ if (override !== undefined && override !== "") {
72
+ return override;
73
+ }
74
+ const asset = libhegelAssetName(opts.platform, opts.arch);
75
+ const bundled = path.join(opts.nativeDir, asset);
76
+ if (!fs.existsSync(bundled)) {
77
+ throw new Error(`Bundled libhegel not found at ${bundled}. This usually means the package ` +
78
+ `was built without its native libraries; run \`just fetch-libhegel\` (or set ` +
79
+ `${LIBRARY_PATH_ENV} to a local libhegel).`);
80
+ }
81
+ return bundled;
82
+ }
83
+ /**
84
+ * Resolves the libhegel path for the current process environment.
85
+ */
86
+ export function locateLibhegel() {
87
+ return resolveLibrary({
88
+ env: process.env,
89
+ platform: process.platform,
90
+ arch: process.arch,
91
+ nativeDir: nativeDir(),
92
+ });
93
+ }
94
+ //# sourceMappingURL=locate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locate.js","sourceRoot":"","sources":["../src/locate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,MAA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gB,CAAC,CAAC;IAC5C,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,EAAE,EAAE,CAAC;QAC9C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1D,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACjD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACb,iCAAiC,OAAO,mCAAmC;YACzE,8EAA8E;YAC9E,GAAG,gBAAgB,wBAAwB,CAC9C,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,cAAc,CAAC;QACpB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,SAAS,EAAE,SAAS,EAAE;KACvB,CAAC,CAAC;AACL,CAAC"}
package/dist/runner.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  /**
2
- * Test runner: Hegel builder, Settings, and test lifecycle.
2
+ * Test runner: the `hegel.test` / `hegel.testAsync` entry points, Settings, and
3
+ * the test lifecycle driving the native libhegel run loop.
3
4
  *
4
5
  * @packageDocumentation
5
6
  */
6
7
  import { TestCase, type DataSource } from "./testCase.js";
7
- import type { Connection, Stream } from "./connection.js";
8
+ import { Libhegel, type Ptr } from "./libhegel.js";
8
9
  export declare enum Verbosity {
9
10
  Quiet = "quiet",
10
11
  Normal = "normal",
@@ -40,28 +41,29 @@ export interface Settings {
40
41
  }
41
42
  export declare function defaultSettings(): Settings;
42
43
  /**
43
- * DataSource implementation that communicates with the hegel server
44
- * over a multiplexed stream connection.
44
+ * {@link DataSource} backed by a native libhegel test case. All draws, spans
45
+ * and collection operations dispatch to the engine via the {@link Libhegel}
46
+ * C-ABI wrapper.
45
47
  */
46
- export declare class ServerDataSource implements DataSource {
47
- private stream;
48
- private connection;
49
- private _aborted;
50
- constructor(connection: Connection, stream: Stream);
51
- private sendRequest;
48
+ export declare class NativeDataSource implements DataSource {
49
+ private readonly lib;
50
+ private readonly ctx;
51
+ private readonly tc;
52
+ constructor(lib: Libhegel, ctx: Ptr, tc: Ptr);
52
53
  generate(schema: Record<string, unknown>): unknown;
53
54
  startSpan(label: number): void;
54
55
  stopSpan(discard: boolean): void;
55
56
  newCollection(minSize: number, maxSize?: number): number;
56
57
  collectionMore(collectionId: number): boolean;
57
58
  collectionReject(collectionId: number, why?: string): void;
58
- markComplete(status: string, origin: string | null): void;
59
- testAborted(): boolean;
59
+ markComplete(status: number, origin: string | null): void;
60
60
  }
61
61
  export type TestCaseResult = {
62
62
  status: "valid";
63
63
  } | {
64
64
  status: "invalid";
65
+ } | {
66
+ status: "overrun";
65
67
  } | {
66
68
  status: "interesting";
67
69
  error: unknown;
@@ -84,12 +86,18 @@ export declare class Hegel {
84
86
  /** Set the test location for Antithesis integration. */
85
87
  testLocation(location: TestLocation): this;
86
88
  /**
87
- * Generator that drives the wire protocol but yields a `ServerDataSource`
88
- * (plus an `isFinal` flag) each time a test case needs to be executed.
89
- * The driver ({@link run} or {@link runSync}) calls the user's test body
90
- * and resumes the generator with the resulting {@link TestCaseResult}.
91
- * This factoring lets the sync and async drivers share one implementation
92
- * of the protocol loop.
89
+ * Generator that drives the libhegel run loop, yielding a
90
+ * {@link NativeDataSource} (plus an `isFinal` flag) for each test case the
91
+ * driver ({@link run} or {@link runSync}) should execute the body against. The
92
+ * driver runs the user's body and resumes the generator with the
93
+ * {@link TestCaseResult}. This factoring lets the sync and async drivers share
94
+ * one loop implementation.
95
+ *
96
+ * The engine only *explores* (generate / shrink), so every pumped case is
97
+ * non-final. The client owns the final replays: once the loop drains and the
98
+ * run has failed, each discovered counterexample's reproduce blob is replayed
99
+ * (via `hegel_test_case_from_blob`) as a final case to surface the test's own
100
+ * error for the thrown message.
93
101
  */
94
102
  private runSteps;
95
103
  run(): Promise<void>;
@@ -103,8 +111,8 @@ export declare class Hegel {
103
111
  * @example
104
112
  * ```ts
105
113
  * import { test } from 'vitest';
106
- * import * as hegel from 'hegel';
107
- * import * as gs from 'hegel/generators';
114
+ * import * as hegel from '@hegeldev/hegel';
115
+ * import * as gs from '@hegeldev/hegel/generators';
108
116
  *
109
117
  * test('addition is commutative', () =>
110
118
  * hegel.test((tc) => {
@@ -125,8 +133,8 @@ export declare function test(testFn: (tc: TestCase) => void, settings?: Partial<
125
133
  * @example
126
134
  * ```ts
127
135
  * import { test } from 'vitest';
128
- * import * as hegel from 'hegel';
129
- * import * as gs from 'hegel/generators';
136
+ * import * as hegel from '@hegeldev/hegel';
137
+ * import * as gs from '@hegeldev/hegel/generators';
130
138
  *
131
139
  * test('my async test', () =>
132
140
  * hegel.testAsync(async (tc) => {
@@ -1 +1 @@
1
- {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,QAAQ,EAA8B,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAEtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE1D,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAED,oBAAY,WAAW;IACrB,aAAa,oBAAoB;IACjC,OAAO,aAAa;IACpB,iBAAiB,yBAAyB;IAC1C,oBAAoB,4BAA4B;CACjD;AAED,MAAM,MAAM,QAAQ,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAA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