Part requests from the CLI: adom-wiki part request / candidates / status
The wiki can ask Adom's factory (Component Ocean) to build a component page for a part that has none: symbol, footprint and 3D model. The website has offered "Request this part" on search misses since 2026-10-27. The API is live on prod, but the CLI has no command for it, so an AI working from the terminal has to hand-write adom-wiki api calls.
Since 862151b5 (staging now, prod with the next tag), GET /api/search returns a PART_NOT_ON_WIKI hint when an MPN-shaped search finds nothing. Its action currently spells out the raw adom-wiki api command. Once this verb ships I'll switch the action to name it.
Proposed verbs
adom-wiki part request <mpn> [--manufacturer <m>] [--later]
adom-wiki part request --bom <file> [--now] [--ref <board-or-bom-name>]
adom-wiki part candidates <partial-mpn>
adom-wiki part status [<id>] # no id = all of mine
adom-wiki part status --batch <id>
The noun is up to you (part, or under library). These are just the shapes the routes support.
Route contract
All of these need a signed-in caller. The signed-out path accepts only a same-origin browser POST and refuses anything else with 403 PART_REQUEST_CROSS_SITE. For a signed-out CLI, say "sign in first", or point the user at https://wiki.adom.inc/search?q=<mpn>.
Request one part: POST /api/part-request
- body
{mpn, manufacturer?, urgency?: "now" | "later"}, defaultnow lateris the "no rush, anytime today" batch wave, which is cheaper for the factory- reply
{request: {id, mpn, manufacturer, state, page_url, demand, updated_at, reason}, counted, position, already: "built" | "building" | null, eta_seconds, eta_text, urgency, status_url} already: "built"means a page exists, so printrequest.page_url.already: "building"means someone asked first.status_urlis a path, like/part-request/<token>. Prefix the registry origin to print it.
Request a BOM or board: POST /api/part-request/batch
- body
{mpns: [mpn | {mpn, manufacturer}], ref?, source?: "board" | "bom" | "molecule", urgency?} - at most 200 parts; the default urgency for a batch is
later - reply
{batch_id, items: [{mpn_input, request_id, state, message, status_url}]} - a name the factory doesn't recognize comes back as
state: "unknown"with amessage
Batch progress: GET /api/part-request/batch/:id returns the same item shape. Someone else's batch answers as 404.
Candidates: GET /api/part-request/candidates?q=<partial> lists the orderable part numbers behind a partial one. For example, LMR36015 returns LMR36015SFBRNXR and others.
- reply
{q, exact, candidates: [{mpn, alternates, manufacturer, package, description, page_url, mine?}]} mineis{state, status_url}when this caller already asked for that partqmust look like a part number, otherwise 400BAD_PART_REQUEST
One request: GET /api/part-request/:id, for ids this user was handed. Anyone else's id answers as 404.
Mine: GET /api/me/part-requests lists the caller's requests, including any made while signed out with the same email address.
States
queuedandbuilding: showpositionandeta_textwhile queued.needs_footprint: still in progress. The status page words it as "drawing a footprint first, a few minutes more".built: done,page_urlis set.reviewandcannot_build: stopped, andreasonexplains why in plain words.
Error codes worth mapping
| Code | Status | Meaning |
|---|---|---|
BAD_PART_REQUEST |
400 | not a part number, or a malformed batch |
UNKNOWN_PART |
404 | the factory doesn't know the part |
PART_REQUEST_CAP |
429 | daily cap reached |
PART_REQUESTS_OFF |
503 | feature not configured on that registry |
PART_REQUEST_UPSTREAM |
502 | anything else from the factory |
Rate limits: 30 single requests and 5 batches per minute per user.
Nice to have
part requestwith no flags on an MPN thatcandidatesresolves to exactly one orderable part could offer that part.- When
searchgets back thePART_NOT_ON_WIKIhint, it could print thepart requestcommand itself.