@nirs4all/preflight 0.1.6 → 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.
package/README.md CHANGED
@@ -8,4 +8,4 @@ const runtime = await createQualificationRuntime();
8
8
  const report = runtime.analyze(alreadyAssembledDataset);
9
9
  ```
10
10
 
11
- Use a dedicated worker for large inputs. Cancel by terminating that worker; stale responses must be discarded by the host. No input is sent to a server. This alpha profile is exploratory; advanced validation, clustering qualification and five-language qualification gates remain open. Requires `@nirs4all/methods` with ABI 2.20 (HDBSCAN, ARI, cluster Jaccard, linear sum assignment, PCG64 permutations and Gaussian draws, correlation, exact permutation, Benjamini–Hochberg, PERMANOVA, PERMDISP, energy distance, PCA monitoring and one-way variance components kernels). Root seeds above 2^53 must be passed as a bigint or a decimal string. `analyzeJson(text)` and `validateJson(text)` hand JSON text to the engine unchanged, so no number is rounded or decoded by JavaScript. See the capabilities and limitations in each report.
11
+ Use a dedicated worker for large inputs. Cancel by terminating that worker; stale responses must be discarded by the host. No input is sent to a server. This alpha profile is exploratory; advanced validation, clustering qualification and five-language qualification gates remain open. Requires `@nirs4all/methods` 1.5.0 or newer within 1.5 (corrected wide PCA scores) with ABI 2.20 (HDBSCAN, ARI, cluster Jaccard, linear sum assignment, PCG64 permutations and Gaussian draws, correlation, exact permutation, Benjamini–Hochberg, PERMANOVA, PERMDISP, energy distance, PCA monitoring and one-way variance components kernels). Root seeds above 2^53 must be passed as a bigint or a decimal string. `analyzeJson(text)` and `validateJson(text)` hand JSON text to the engine unchanged, so no number is rounded or decoded by JavaScript. See the capabilities and limitations in each report.
@@ -4,11 +4,12 @@ nirs4all-preflight's Rust contracts and protocols are offered under CECILL-2.1 O
4
4
 
5
5
  | Component | Purpose | License |
6
6
  | --- | --- | --- |
7
- | nirs4all-methods / libn4m | Reusable native and WASM scientific diagnostics | CECILL-2.1 |
7
+ | nirs4all-methods / libn4m | Reusable native and WASM scientific diagnostics | CECILL-2.1 OR AGPL-3.0-or-later |
8
+ | dag-ml-core / dag-ml-wasm | Generic execution and Methods host transport | CECILL-2.1 OR AGPL-3.0-or-later |
8
9
  | nirs4all-ui | Shared React presentation and existing scientific charts | CECILL-2.1 OR AGPL-3.0-or-later |
9
10
  | serde / serde_json | Rust JSON contracts | MIT OR Apache-2.0 |
10
11
  | libloading | Native Methods ABI adapter | ISC |
11
12
  | wasm-bindgen / js-sys | WASM host transport | MIT OR Apache-2.0 |
12
13
  | React / React DOM | Browser demo | MIT |
13
14
 
14
- Source repositories and exact dependency versions are recorded by Cargo.lock and npm lockfiles. The Linux Python wheel bundles libn4m, whose CECILL-2.1 terms apply to that library. The npm binding depends on the separately distributed Methods package. Relevant license texts accompany each distribution; build tools are not runtime components. No vendor parser, private dataset or proprietary input is bundled.
15
+ Source repositories and exact dependency versions are recorded by Cargo.lock and npm lockfiles. The Python wheels bundle the Preflight C ABI and depend on the separately distributed nirs4all-methods wheel, which carries its own license texts. The npm binding depends on the separately distributed Methods package. Relevant license texts accompany each distribution; build tools are not runtime components. No vendor parser, private dataset or proprietary input is bundled.
package/index.js CHANGED
@@ -138,6 +138,20 @@ export async function createQualificationRuntime(options = {}) {
138
138
  result = { outputs, backend_version };
139
139
  break;
140
140
  }
141
+ case 'preprocess': {
142
+ const x = matrix(request.matrix);
143
+ const ctx = methods.Context.create();
144
+ let pipeline;
145
+ try {
146
+ pipeline = methods.NativePreprocessingPipeline.fit(ctx, request.steps, x);
147
+ const out = pipeline.transform(x);
148
+ result = { matrix: nested(out.data, out.cols), backend_version };
149
+ } finally {
150
+ pipeline?.destroy();
151
+ ctx.destroy();
152
+ }
153
+ break;
154
+ }
141
155
  case 'pca': {
142
156
  const output = methods.preflightPca(matrix(request.matrix), request.n_components);
143
157
  result = { eigenvalues: Array.from(output.eigenvalues), scores: nested(output.scores.data, output.scores.cols), full_moments: output.fullMoments, resolution: output.resolution, unresolved: Array.from(output.unresolved, Boolean), backend_version };
package/native/README.md CHANGED
@@ -8,4 +8,4 @@ const runtime = await createQualificationRuntime();
8
8
  const report = runtime.analyze(alreadyAssembledDataset);
9
9
  ```
10
10
 
11
- Use a dedicated worker for large inputs. Cancel by terminating that worker; stale responses must be discarded by the host. No input is sent to a server. This alpha profile is exploratory; advanced validation, clustering qualification and five-language qualification gates remain open. Requires `@nirs4all/methods` with ABI 2.20 (HDBSCAN, ARI, cluster Jaccard, linear sum assignment, PCG64 permutations and Gaussian draws, correlation, exact permutation, Benjamini–Hochberg, PERMANOVA, PERMDISP, energy distance, PCA monitoring and one-way variance components kernels). Root seeds above 2^53 must be passed as a bigint or a decimal string. `analyzeJson(text)` and `validateJson(text)` hand JSON text to the engine unchanged, so no number is rounded or decoded by JavaScript. See the capabilities and limitations in each report.
11
+ Use a dedicated worker for large inputs. Cancel by terminating that worker; stale responses must be discarded by the host. No input is sent to a server. This alpha profile is exploratory; advanced validation, clustering qualification and five-language qualification gates remain open. Requires `@nirs4all/methods` 1.5.0 or newer within 1.5 (corrected wide PCA scores) with ABI 2.20 (HDBSCAN, ARI, cluster Jaccard, linear sum assignment, PCG64 permutations and Gaussian draws, correlation, exact permutation, Benjamini–Hochberg, PERMANOVA, PERMDISP, energy distance, PCA monitoring and one-way variance components kernels). Root seeds above 2^53 must be passed as a bigint or a decimal string. `analyzeJson(text)` and `validateJson(text)` hand JSON text to the engine unchanged, so no number is rounded or decoded by JavaScript. See the capabilities and limitations in each report.
@@ -2,7 +2,7 @@
2
2
  "name": "nirs4all-preflight-wasm",
3
3
  "type": "module",
4
4
  "description": "WebAssembly binding for nirs4all qualification protocols",
5
- "version": "0.1.6",
5
+ "version": "0.3.0",
6
6
  "license": "CECILL-2.1 OR AGPL-3.0-or-later",
7
7
  "repository": {
8
8
  "type": "git",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nirs4all/preflight",
3
- "version": "0.1.6",
3
+ "version": "0.3.0",
4
4
  "description": "Rust NIRS dataset qualification with reusable Methods diagnostics",
5
5
  "type": "module",
6
6
  "license": "(CECILL-2.1 OR AGPL-3.0-or-later)",
@@ -27,8 +27,8 @@
27
27
  "THIRD_PARTY_NOTICES.md"
28
28
  ],
29
29
  "dependencies": {
30
- "@nirs4all/methods": "1.3.13",
31
- "dag-ml-wasm": "0.3.44"
30
+ "@nirs4all/methods": "~1.5.0",
31
+ "dag-ml-wasm": "^0.5.0"
32
32
  },
33
33
  "scripts": {
34
34
  "build:native": "wasm-pack build . --target web --out-dir native --release && node scripts/prepare-native.mjs",