MAS v0.2 final (MAS-WP-0009 finished); residual MAS-WP-0014
Founder decision after the second implementation: close the two open gaps, then declare v0.2 final. Section 13: parsers MUST reject over 64 octets (fixtures p1-050/051); section 8: equivalence is between targets, key format not normative. Draft markers removed, CHANGELOG dated 2026-10-19, MAS_VERSION 0.2, mas_conformance vendors the v0.2 addresses.json. Mode contract v0.1 stays draft: MAS-WP-0014 (independent email side). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 5787@bnt-lap001 Assistant-Session: 5db26b82-138b-40cc-9856-4d5eb0f752fd
This commit is contained in:
parent
a841ceec73
commit
f07576451a
16 changed files with 178 additions and 40 deletions
|
|
@ -26,6 +26,7 @@ export class MasSyntaxError extends Error {
|
|||
*/
|
||||
export function parseLocalPart(local, profile = "p2") {
|
||||
if (typeof local !== "string" || local.length === 0) throw new MasSyntaxError("empty");
|
||||
if (octets(local) > MAX_OCTETS) throw new MasSyntaxError("too-long", "over 64 octets (section 13)");
|
||||
if (/[^\x21-\x7e]/.test(local)) throw new MasSyntaxError("non-ascii", "outside the ASCII grammar");
|
||||
if (/[$^]/.test(local)) throw new MasSyntaxError("reserved-operator");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue