renkin 0.28.0 → 0.29.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 +2 -1
- package/package.json +1 -1
- package/renkin.d.ts +14 -0
- package/renkin.js +37 -0
- package/renkin_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ Use RENKIN as an independent audit layer for retrosynthesis routes generated by
|
|
|
36
36
|
```bash
|
|
37
37
|
pip install renkin # Python
|
|
38
38
|
cargo add renkin # Rust
|
|
39
|
-
npm install renkin # JavaScript /
|
|
39
|
+
npm install renkin # JavaScript (browser / bundler -- see docs/api/wasm.md)
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
---
|
|
@@ -622,6 +622,7 @@ see "Earlier milestones" below for older shipped work.
|
|
|
622
622
|
|
|
623
623
|
### Recently shipped
|
|
624
624
|
|
|
625
|
+
- [x] **Audit Policy Profiles** (`--policy informational|standard|strict`, shipped v0.29.0) — *One set of findings. Three ways to derive the verdict.* Audit the same route under `informational`, `standard`, or `strict` policy without ever hiding or changing the underlying findings — policy only changes how the overall pass/fail/partial verdict is derived from findings already collected, recorded in `audit_manifest.policy`. Consistent across every surface: `renkin audit-route --policy`, the Rust API, the first Python binding for route auditing (`renkin.audit_route()`), and a new WASM `audit_route_v2()` (the existing `audit_route()` stays as a `standard`-policy wrapper). The [browser playground](https://kent-tokyo.github.io/renkin/playground/)'s Audit tab gained a policy selector.
|
|
625
626
|
- [x] **Audit Playground** (`[ Audit a Route ]` tab, shipped v0.28.0) — *Audit a route in your browser — the same pipeline, the same verdict, zero network calls.* The [browser playground](https://kent-tokyo.github.io/renkin/playground/) now audits a RENKIN or AiZynthFinder route export (single-route or Pandas batch) and an optional stock list entirely client-side, via a new `audit_route` WASM export that calls the identical report-building pipeline `renkin audit-route` uses — the same pass/fail/partial verdict either way, not a separately-maintained copy. Paste or upload, run off the main thread, download the JSON report.
|
|
626
627
|
- [x] **Reproducible Route Audit** (`audit_manifest` on `renkin audit-route --output json`, shipped v0.27.0) — *Reproduce what was audited, from which input, with which stock and policy.* Every audit report now records RENKIN version, report schema version, source format/version, input/stock content SHA-256 hashes, and audit policy — tested for byte-identical determinism (auditing the same input twice), not just claimed. Adds a shared adapter conformance suite across RENKIN-native and AiZynthFinder route inputs, plus a written [reproducibility/compatibility contract](https://kent-tokyo.github.io/renkin/guides/audit-reproducibility-contract/) (verified-vs-supported versions, unknown-field tolerance, report-schema rules, adapter-fixture runbook). The [browser playground](https://kent-tokyo.github.io/renkin/playground/) also got a safety/UX pass this release: search runs off the main thread with cancel/time-budget support, structure rendering stays local by default (no third-party SMILES transmission), and search settings round-trip exactly through Copy CLI/Python.
|
|
627
628
|
- [x] **RENKIN Bridge — Cross-Tool Route Audit** (`renkin audit-route`, RENKIN-native adapter shipped v0.25.0, AiZynthFinder adapter shipped v0.26.0) — *Keep AiZynthFinder. Audit its routes with RENKIN.* A tool-neutral route audit model: structural-integrity, stock, and declared-reaction forward-replay validation, each reported independently as `pass`/`fail`/`not_evaluable`, rolled up into a route-level `pass`/`fail`/`partial` verdict — never a silently force-passed boolean. v0.26.0 adds a real AiZynthFinder adapter (single-target and gzip batch JSON, verified against captured v4.4.1 output — see [`PROVENANCE.md`](tests/fixtures/aizynthfinder/v4.4.1/PROVENANCE.md)) plus `--format auto` detection, so both tools' routes run through the exact same audit pipeline; auditing the real fixtures also surfaced and fixed a shared forward-replay bug where precursor ordering, not just chemistry, affected the verdict. `renkin audit-route route.json --stock stock.smi --output json` audits every route in a file and aggregates the results into one machine-readable report, regardless of which tool produced it.
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"kent-tokyo <kent-tokyo@users.noreply.github.com>"
|
|
6
6
|
],
|
|
7
7
|
"description": "Ultra-fast retrosynthesis engine for computer-aided synthesis planning (CASP) — pure Rust, WASM-ready, Python bindings via PyO3",
|
|
8
|
-
"version": "0.
|
|
8
|
+
"version": "0.29.0",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
package/renkin.d.ts
CHANGED
|
@@ -25,6 +25,19 @@
|
|
|
25
25
|
*/
|
|
26
26
|
export function audit_route(content: string, format: string, stock_text: string): string;
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Same as [`audit_route`], plus `policy` (v0.29.0 Audit Policy Profiles):
|
|
30
|
+
* `"informational" | "standard" | "strict"`, same vocabulary as the CLI's
|
|
31
|
+
* `--policy` flag -- controls only how each route's `status` is derived
|
|
32
|
+
* from findings already collected, never which findings are detected or
|
|
33
|
+
* reported. A distinct function name rather than a 4th parameter on
|
|
34
|
+
* `audit_route`, so a caller on a pre-v0.29.0 build gets a real "no such
|
|
35
|
+
* export" `TypeError` instead of a silently-ignored argument -- the same
|
|
36
|
+
* reasoning `find_routes_v2` already established in this codebase.
|
|
37
|
+
* `audit_route` itself is now a thin `"standard"` wrapper around this.
|
|
38
|
+
*/
|
|
39
|
+
export function audit_route_v2(content: string, format: string, stock_text: string, policy: string): string;
|
|
40
|
+
|
|
28
41
|
/**
|
|
29
42
|
* Static capabilities of this WASM build (browser edition), as a JSON
|
|
30
43
|
* string -- real counts read from the same compiled-in data `find_routes`
|
|
@@ -81,6 +94,7 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
81
94
|
export interface InitOutput {
|
|
82
95
|
readonly memory: WebAssembly.Memory;
|
|
83
96
|
readonly audit_route: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
97
|
+
readonly audit_route_v2: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
84
98
|
readonly capabilities: () => [number, number];
|
|
85
99
|
readonly find_routes: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
86
100
|
readonly find_routes_v2: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number];
|
package/renkin.js
CHANGED
|
@@ -45,6 +45,43 @@ export function audit_route(content, format, stock_text) {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Same as [`audit_route`], plus `policy` (v0.29.0 Audit Policy Profiles):
|
|
50
|
+
* `"informational" | "standard" | "strict"`, same vocabulary as the CLI's
|
|
51
|
+
* `--policy` flag -- controls only how each route's `status` is derived
|
|
52
|
+
* from findings already collected, never which findings are detected or
|
|
53
|
+
* reported. A distinct function name rather than a 4th parameter on
|
|
54
|
+
* `audit_route`, so a caller on a pre-v0.29.0 build gets a real "no such
|
|
55
|
+
* export" `TypeError` instead of a silently-ignored argument -- the same
|
|
56
|
+
* reasoning `find_routes_v2` already established in this codebase.
|
|
57
|
+
* `audit_route` itself is now a thin `"standard"` wrapper around this.
|
|
58
|
+
* @param {string} content
|
|
59
|
+
* @param {string} format
|
|
60
|
+
* @param {string} stock_text
|
|
61
|
+
* @param {string} policy
|
|
62
|
+
* @returns {string}
|
|
63
|
+
*/
|
|
64
|
+
export function audit_route_v2(content, format, stock_text, policy) {
|
|
65
|
+
let deferred5_0;
|
|
66
|
+
let deferred5_1;
|
|
67
|
+
try {
|
|
68
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
69
|
+
const len0 = WASM_VECTOR_LEN;
|
|
70
|
+
const ptr1 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
71
|
+
const len1 = WASM_VECTOR_LEN;
|
|
72
|
+
const ptr2 = passStringToWasm0(stock_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
73
|
+
const len2 = WASM_VECTOR_LEN;
|
|
74
|
+
const ptr3 = passStringToWasm0(policy, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
75
|
+
const len3 = WASM_VECTOR_LEN;
|
|
76
|
+
const ret = wasm.audit_route_v2(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
77
|
+
deferred5_0 = ret[0];
|
|
78
|
+
deferred5_1 = ret[1];
|
|
79
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
80
|
+
} finally {
|
|
81
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
48
85
|
/**
|
|
49
86
|
* Static capabilities of this WASM build (browser edition), as a JSON
|
|
50
87
|
* string -- real counts read from the same compiled-in data `find_routes`
|
package/renkin_bg.wasm
CHANGED
|
Binary file
|