app
Chip Fetcher (cf)
Public Made by Adomby adom
Crawls the web on your behalf to gather everything about the chips you care about: datasheets, symbols, footprints, 3D models, stock and pricing, straight from the manufacturer first, into your EDA tool. Say "cf" to your AI.
← Commit history
Publish 1.3.5
9 files changed
+143−8
README.md+9−1@@ -28,7 +28,15 @@ chip-fetcher install # deploys SKILL.md to ~/.claude/skills/a ## In the Hydrogen dock -Chip Fetcher is dock-ready: click the card in the Hydrogen Dock Bar and it installs itself (once), starts the dashboard, and opens it in the dock's tab. The dashboard leads with a **Say it** strip, the phrases you say to your AI to drive it ("fetch STM32F103C8T6 with chip fetcher"), then a component LED row (dashboard, AI skill, sister tools, desktop, library) so a first run shows exactly what is missing and how to fix it. The settings cog (upper right) opens the shared Adom settings modal: component Install / Update rows with live consoles, the taskbar-progress choice (an indeterminate Windows taskbar bar on the dashboard window for the whole lookup), dashboard toggles, and your vendor logins, which live in pup's OS-keychain vault and never in chip-fetcher.+Chip Fetcher is a card on the Hydrogen Dock Bar, the app-launcher rail on the right edge of the workspace. Here it is running in ah, between the Fusion and Pup bridges:++++One click on the card installs the CLI and its thirteen sister tools into your container (skipped when already present), starts the dashboard with `adom-chip-fetcher serve --print-url`, and opens the MAIN dashboard in the dock's webview tab; there is no separate launcher page. While the rail is open the dock polls `GET /api/status` every 15 seconds and paints the card's LED from it: dashboard, AI skill, sister tools, desktop bridge and library, each facet with a hint naming the exact fix.++The dashboard leads with a **Say it** strip, the phrases you say to your AI to drive it ("fetch STM32F103C8T6 with chip fetcher"), then the component LED row, and a Welcome card on an empty library so a first run shows exactly what to do next. The settings cog (upper right) opens the shared Adom settings modal: component Install / Update rows with live consoles, the taskbar-progress choice (an indeterminate Windows taskbar bar on the dashboard window for the whole lookup), dashboard toggles, and your vendor logins, which live in pup's OS-keychain vault and never in chip-fetcher.++Not on your dock yet? Dock settings (the gear at the top of the rail), Add app, `adom/adom-chip-fetcher`. The full mechanics live in the `adom-chip-fetcher-dock` skill. Your AI drives the page the same way you do: `chip-fetcher ui toast "downloading STEP"`, `ui select <MPN>`, `ui settings open`, `ui state`, `ui console`.
SKILL.md+1−1@@ -61,7 +61,7 @@ chip-fetcher ui state | console # what the page is showing / its console rin chip-fetcher settings get | set <key> <value> | reset # taskbar_progress (indeterminate|off), auto_zoom, auto_select_active, show_stock_badges, activity_stale_seconds ``` -A newbie who clicks the Chip Fetcher card in the Hydrogen dock gets: install+The full dock story (what a click does, the contract, first run, diagnosis) lives in the **adom-chip-fetcher-dock** skill. A newbie who clicks the Chip Fetcher card in the Hydrogen dock gets: install (skip_if the CLI exists), `serve --print-url`, the main dashboard in the dock's tab, a "Say it" strip at the top with the phrases above, a component LED row, and a Welcome card when the library is empty. The dock polls `/api/status`
bin/adom-chip-fetcher⋯ 1 unchanged line ⋯
docs/img/dock-rail-ah.pngadded⋯ 1 unchanged line ⋯
install.sh+7@@ -48,4 +48,11 @@ for d in "$DIR"/skills/sites/*/; do done echo "Installed skill chip-fetcher-sites ($(ls -d "$SITES"/sites/*/ | wc -l | tr -d ' ') vendor sites) -> $SITES" +# 5) the dock sub-skill (how Chip Fetcher lives in the Hydrogen Dock Bar)+if [ -f "$DIR/skills/adom-chip-fetcher-dock/SKILL.md" ]; then+ mkdir -p "$SKILLS/adom-chip-fetcher-dock"+ cp "$DIR/skills/adom-chip-fetcher-dock/SKILL.md" "$SKILLS/adom-chip-fetcher-dock/SKILL.md"+ echo "Installed skill adom-chip-fetcher-dock -> $SKILLS/adom-chip-fetcher-dock"+fi+ echo "OK: adom-chip-fetcher + 2 skills installed. Next: adom-chip-fetcher doctor"
package.json+4−2@@ -1,6 +1,6 @@ { "slug": "adom-chip-fetcher",- "version": "1.3.4",+ "version": "1.3.5", "type": "app", "description": "Crawls the web on your behalf to gather everything about the chips you care about: datasheets, symbols, footprints, 3D models, stock and pricing, straight from the manufacturer first, into your EDA tool.", "dependencies": {@@ -77,7 +77,9 @@ "chip-fetcher-flow-v2.png", "chip-fetcher-stack.png", "dashboard-pin1.png",- "adom-chip-fetcher-hero-v6.png"+ "adom-chip-fetcher-hero-v6.png",+ "skills/adom-chip-fetcher-dock/SKILL.md",+ "docs/img/dock-rail-ah.png" ], "license": "MIT", "discovery_triggers": [
page.json+5−3@@ -1,6 +1,6 @@ { "slug": "adom-chip-fetcher",- "version": "1.3.4",+ "version": "1.3.5", "type": "app", "description": "Crawls the web on your behalf to gather everything about the chips you care about: datasheets, symbols, footprints, 3D models, stock and pricing, straight from the manufacturer first, into your EDA tool.", "dependencies": {@@ -85,7 +85,9 @@ "chip-fetcher-flow-v2.png", "chip-fetcher-stack.png", "dashboard-pin1.png",- "adom-chip-fetcher-hero-v6.png"+ "adom-chip-fetcher-hero-v6.png",+ "skills/adom-chip-fetcher-dock/SKILL.md",+ "docs/img/dock-rail-ah.png" ], "license": "MIT", "discovery_triggers": [@@ -130,4 +132,4 @@ } ], "brief": "Crawls the web on your behalf to gather everything about the chips you care about: datasheets, symbols, footprints, 3D models, stock and pricing, straight from the manufacturer first, into your EDA tool."-}+}
skills/adom-chip-fetcher-dock/SKILL.mdadded+116@@ -0,0 +1,116 @@+---+name: adom-chip-fetcher-dock+description: How Chip Fetcher lives in the Hydrogen Dock Bar (the app-launcher rail on the right edge of ah). What the dock card does when clicked, the contract this app implements (version-aware serve --print-url, direct 127.0.0.1 URL, /api/status LEDs with CORS, webview ownership via ADOM_DOCK_WEBVIEW, the Say it strip, the settings modal, taskbar progress), where dockbar.json lives and why it is in the PAGE REPO, the first-run path for a brand-new user, and how to diagnose a red LED or a launch that never answers. Parent skill: adom-chip-fetcher. Trigger words: chip fetcher dock, dock bar chip fetcher, add chip fetcher to my dock, chip fetcher card, chip fetcher LED red, chip fetcher not answering, dockbar.json chip fetcher, chip fetcher serve print-url, chip fetcher dock webview, chip fetcher say it, chip fetcher first run, chip fetcher doctor.+---++# Chip Fetcher in the Dock Bar++Parent skill: **adom-chip-fetcher**. Read that one for sourcing chips; read this one for the launcher.++## Purpose++The Dock Bar is Hydrogen's app launcher: a rail of cards on the right edge of the+workspace, one card per wiki app. The Chip Fetcher card is the zero-setup way in for a+brand-new Adom user: one click installs the CLI and its thirteen sister tools into their+container, starts the dashboard server, and shows the MAIN dashboard in the dock's webview+tab. There is no separate launcher or status page: the dock click lands on the same+dashboard `chip-fetcher app` opens in pup.++The card's LED is live health read from `/api/status` every 15 seconds while the rail is+open, so a user sees at a glance whether the app, its sister tools, the desktop bridge and+pup are ready before they ask for their first part.++## What a click does, step by step++1. Hydrogen opens a webview tab named **Chip Fetcher** (from `webview.title` in+ `dockbar.json`) showing the launch interstitial, with this app's favicon+ (`docs/img/dock-chip-fetcher.svg`) from the first frame and the `say` phrases on it.+2. It runs the manifest's `container_command` steps in the user's workspace container:+ - **Installing Chip Fetcher**: `adom-wiki pkg install adom/adom-chip-fetcher`, skipped+ when `command -v adom-chip-fetcher` already succeeds (the `skip_if`). PATH is+ prefixed with `~/.local/bin`, where wiki CLIs land. The install pulls every+ dependency (adom-symbol, adom-footprint, adom-step, adom-lbr, adom-chipsmith,+ adom-chip-thumbnailer, adom-concur, adom-ds2sf, adom-sfconvert, adom-parts-search,+ adom-mouser, adom-digikey, adom-jlcpcb), the binary under both names+ (`adom-chip-fetcher` + `chip-fetcher`), the UI assets, and both AI skills.+ - **Starting the Chip Fetcher dashboard**: `adom-chip-fetcher serve --print-url` with+ `await: "url"`; the dock scrapes the printed URL and polls it until it answers.+3. `serve` takes over the interstitial tab itself: the dock sets `ADOM_DOCK_WEBVIEW` (the+ tab name) and `ADOM_DOCK_APP` in each step's environment, and the detached server calls+ `adom-cli hydrogen webview open-or-refresh --name "$ADOM_DOCK_WEBVIEW" --url+ http://127.0.0.1:8786/`. Re-running with the same name just renavigates the tab: that+ idempotence is the ownership handle. Unset variable (a hand-run serve) touches nothing.+4. The dock polls `GET /api/status` every 15 seconds and paints the card's LED from the+ payload's top-level `state`.++## The contract, as implemented here++| Rule | Where | How |+|---|---|---|+| Serve self-backgrounds | `src/serve.rs` + `src/dock.rs` | spawns a detached copy of itself (`serve --detached-child`, own session via setsid), waits up to 15 s for `/health`, prints the URL, exits 0. The dock's exec returns in ~100 ms |+| Serve is idempotent and version-aware | `src/dock.rs` | an instance of OURS at the same version is reused (URL printed, webview reclaimed). A DIFFERENT version is retired first: victims matched by EXACT argv (`adom-chip-fetcher serve ...` or the `chip-fetcher` alias), never by substring, because a substring match kills the shell that invoked it |+| Direct URL | `src/dock.rs` | prints `http://127.0.0.1:8786/`, never the `/proxy/<port>/` form and never the name `localhost` (Windows resolves it IPv6-first while WSL binds IPv4; ~800 ms per request vs 13) |+| Health with CORS | `src/serve.rs` + `src/dock.rs` | `GET /health` = `{ok, app, version}`. `GET /api/status` is cached 10 s so the dock's 2 s probe budget always lands. EVERY response carries `Access-Control-Allow-Origin: *` and `OPTIONS` answers 204: the dock probes cross-origin from the shell page, and without the header the card reads "not answering" while curl says 200 |+| Per-facet LEDs + owned rollup | `src/dock.rs` (`build_facets`) | facets: Dashboard, AI skill, Sister tools (13 binaries on PATH), Desktop (`adom-bridge targets`), Library (parts + completeness; an incomplete library is work in progress, never a warning). Top-level `state` is our own rollup and wins; each facet carries a `_hint` naming the exact fix |+| Say it | `dockbar.json` + the page | six phrases in the user's noun ("fetch STM32F103C8T6 with **chip fetcher**"), shown on the interstitial and as the FIRST strip on the dashboard: copy on click, Try it stages into this app's own AI thread (census first, history second, copy fallback; `src/dock.rs::try_phrase`) |+| Settings window | the page | the cog at the right end of the 44px header opens the settings-layout modal: Components (Install / Update rows with a live console), Taskbar, Dashboard, Logins (pup's vault), two-click Restore defaults |+| Taskbar progress | `src/taskbar.rs` | the whole lookup paints an INDETERMINATE bar on the dashboard pup window's taskbar button (`pup_progress`), driven by the heartbeat protocol; short verbs (cse, ds2sf) fill a determinate bar from persisted running averages (`~/.config/adom-chip-fetcher/durations.json`). Toggle: `chip-fetcher settings set taskbar_progress off` |++## The first-run path (what a newbie sees)++The dock click is designed to work on a container that has NEVER seen chip-fetcher:++1. The install step runs in the interstitial's console, line by line.+2. The dashboard opens with the **Say it** strip first, the **component LED row** under it,+ and (library empty) a **Welcome card** with three numbered steps: check the LEDs, say a+ phrase to your AI, watch the cards land.+3. `adom-chip-fetcher doctor` prints the same facets in the terminal, one line each with a+ Hint per problem; `doctor --fix` installs whatever is missing. Run it before the first+ fetch on any new container.+4. The dock's staged AI prompt (dockbar.json `ai`) tells the AI to read the skill, run+ doctor, and ask which part numbers to source.++## Where the files live++- `dockbar.json` (manifest 1.2.0) is at the ROOT of the wiki **page repo**+ (`adom-wiki repo show adom/adom-chip-fetcher dockbar.json`). The dock reads the page+ repo, NOT the registry tarball; the two stores are separate. Any edit must be pushed+ with `adom-wiki repo push` or the dock never sees it. The `say` list in it is the single+ source both the interstitial and the dashboard strip read (`GET /api/say`).+- `docs/img/dock-chip-fetcher.svg` (the favicon the manifest names) must exist at that+ path in the page repo, monochrome white.+- The card's artwork is the page's hero + one-line brief, rendered from the wiki page on+ the dock's next poll; nothing ships in the app for it.++## Add the card to a dock++Dock settings (the gear at the top of the rail), **Add app**, `adom/adom-chip-fetcher`.+Being in the curated list is not required. A card with no LED means the app is not+running; that is the honest state.++## Diagnose++Read the LED payload first; every facet carries a `_hint`:++```bash+adom-chip-fetcher health # {ok, app, version} or a Hint to start serve+adom-chip-fetcher doctor # one line per facet + Hints; exit 1 while anything needs attention+curl -s http://127.0.0.1:8786/api/status | python3 -m json.tool+```++| Symptom | Cause | Fix |+|---|---|---|+| Card reads "not answering" while the page works | CORS stripped from `/api/status` | `curl -si http://127.0.0.1:8786/api/status \| grep -i access-control` must show `*`; update the package if missing |+| Launch fails "never answered" | serve ran in the foreground (dock killed it at timeout) or the port is held by something that is not us | `adom-chip-fetcher serve --print-url` by hand prints the error and a Hint |+| Works for the author, fails for users | binary not on PATH in the exec shell | the manifest steps prefix `PATH="$HOME/.local/bin:$PATH"`; check `~/.local/bin/adom-chip-fetcher` exists |+| Yellow LED | a facet's detail says which: skill missing, sister tools missing, no desktop on the bridge | `adom-chip-fetcher doctor --fix`, or open Adom Hydrogen on the desktop |+| Users pinned to an old dashboard after an update | an old server kept the port | `serve` retires a running instance whose version differs; relaunch from the card or run `adom-chip-fetcher serve --print-url` once |+| The tab did not get taken over | `ADOM_DOCK_WEBVIEW` unset (hand-run) or `adom-cli` missing | expected for a hand-run; the dock navigates the interstitial itself as a fallback |+| Say it strip empty | `dockbar.json` missing from the page repo copy the server reads | reinstall the package (`~/.local/share/adom-chip-fetcher/dockbar.json`), or push dockbar.json to the page repo |++## Cold verify (what the dock thread checks)++On a box that has never had the CLI: add the card, click it, watch the console run the+install step (every sister tool lands), then the serve step print+`http://127.0.0.1:8786/`, then the tab navigate to the dashboard with the Say it strip on+top, the LED row populated, the Welcome card up, and the card's LED green within 15 s.
uninstall.sh+1−1@@ -1,6 +1,6 @@ #!/bin/bash set -euo pipefail rm -f "${HOME}/.local/bin/adom-chip-fetcher" "${HOME}/.local/bin/chip-fetcher"-rm -rf "${HOME}/.claude/skills/adom-chip-fetcher" "${HOME}/.claude/skills/chip-fetcher" "${HOME}/.claude/skills/chip-fetcher-sites"+rm -rf "${HOME}/.claude/skills/adom-chip-fetcher" "${HOME}/.claude/skills/chip-fetcher" "${HOME}/.claude/skills/chip-fetcher-sites" "${HOME}/.claude/skills/adom-chip-fetcher-dock" rm -rf "${HOME}/.local/share/adom-chip-fetcher" echo "Uninstalled adom-chip-fetcher (binary, alias, UI assets, adom-chip-fetcher + chip-fetcher-sites skills). Settings in ~/.config/adom-chip-fetcher were kept."