26 lines
1.3 KiB
Markdown
26 lines
1.3 KiB
Markdown
|
|
# mas-js: second, independent MAS implementation
|
||
|
|
|
||
|
|
Written from the specification texts and fixtures only, not ported from
|
||
|
|
`mas_core` (MAS-WP-0009). It uses Node 20+ and has zero dependencies.
|
||
|
|
|
||
|
|
| Module | Covers | Checked by |
|
||
|
|
|---|---|---|
|
||
|
|
| `src/parser.mjs` | canonical grammar, P1/P2 (address spec §4) | `mas-v0.2-spec/conformance/addresses.json` |
|
||
|
|
| `src/statute.mjs` | stand-ins (§6.3), equivalence (§8), destination transforms (§12.1), length (§13) | `mas-v0.2-spec/conformance/statute-aware.json` |
|
||
|
|
| `src/signing.mjs` | peer authentication (mode contract §7) | `mas-modes-v0.1-spec/conformance/auth.json` |
|
||
|
|
| `src/master.mjs` | outside master for email's slave role (mode contract §3.2) | `mas-modes-v0.1-spec/conformance/flows.json`, slave setups, run against the Python email side |
|
||
|
|
|
||
|
|
```bash
|
||
|
|
cd impl/js && node --test # the three bundles, read in place
|
||
|
|
cd ../.. && .venv/bin/pytest tests/test_js_impl.py tests/test_differential.py
|
||
|
|
```
|
||
|
|
|
||
|
|
`src/batch.mjs` evaluates parse, interpret and destination cases in bulk.
|
||
|
|
`tests/test_differential.py` compares it with `mas_core` over 1500
|
||
|
|
generated local-parts per operation. Its first run found two gaps in the
|
||
|
|
spec text (SCP-9).
|
||
|
|
|
||
|
|
Nothing in Python imports this code. The flow runner starts `master.mjs`
|
||
|
|
as a separate process and drives it only through its loopback control API
|
||
|
|
(`mas_modes/external.py`).
|