Expand description
Parse CLI references back into core types. The primary case is the canonical EventId string the
engine prints (EventId::canonical()): import|<src>|<source_ref…>, conflict|<src>|<source_ref…>|<fp>,
decision|<seq>. source_ref itself may contain | (adapters mint direction-scoped refs like
out|cb-send), so import rejoins parts[2..] and conflict takes the LAST part as the fingerprint.
Functions§
- parse_
date_ arg - parse_
dispose_ kind - Parse a bulk-reclassify-outflow
--kindargument. Accepts ONLYsell/spend; REJECTSgiftanddonate(and any other value) — the structural scope-lock [Q2]:GiftOut/Donateneed a per-rowdoneeand (for Donate) a qualified-appraisal FMV, so a uniform-across-many-rows bulk substitution of a market close price is semantically wrong. Those stay single-item (reclassify-outflow). - parse_
event_ id - parse_
income_ kind - parse_
lot_ id <event-id-canonical>#<split-sequence>→LotId.- parse_
lot_ pick <lot-id>:<sat>→LotPick.- parse_
nonneg_ usd_ arg - Parse a USD amount that must be >= 0 — a cost basis, FMV, proceeds, fee, or price (UX-P4-4a). A
DISTINCT helper (NOT
parse_usd_arg), so the legitimately-signed flags — MAGI,--other-net-capital-gain, the ad-hoc--income/--magi— keep the unguarded parser (guard per-flag, never in the shared parser; SPEC §3.3(a)[G-I5, T-M1]). No legitimate negative exists: §1012 basis, §1016 adjustments floor at zero, §301(c)(2)-(3)/§733 excess-of-basis is gain — never negative basis. Zero stays allowed (the app’s conservative self-transfer default). This ALSO closes the--basis=-Nclap=-form bypass, since the guard is on the parsed value, not clap’s--prefix detection.fieldnames the flag in the refusal. - parse_
pos_ sell_ arg - Parse a
--sellsats amount that must be > 0 (UX-P4-4a[G2-1]): a<= 0sell survives the pool coverage check and renders a fictional LOSS estimate. Wraps the coreparse_sell_arg(no sign guard). - parse_
usd_ arg - Exact USD (NFR5): string → Decimal, never float.
- parse_
wallet_ id exchange:PROVIDER:ACCOUNT|self:LABEL.