velxio/backend/app
David Montero 0b3e165784 feat(intellisense): answer from the local sketchbook, not only the cache
The symbol server assumed one library layout: the content-addressed cache,
where an entry dir name IS its content hash. A host without that cache --
Velxio Desktop's sidecar, and any self-host -- has its libraries where
arduino-cli put them, under plain folder names with the version inside
library.properties, and got a 404 for every request. The editor there falls
back to the engine's embedded catalog, so `client.` on a library the user
installed himself resolves to nothing.

Both layouts are now sources, tried best-first. The only real difference is
mutability: `lib upgrade` rewrites a sketchbook folder in place and keeps its
name, so a scan cannot be keyed by that name. Sketchbook entries are keyed by
a cheap stat-only stamp (file count, total size, newest mtime) in the same
`<norm_name>@<norm_version>-<12 hex>` shape, which makes the disk cache exact
rather than merely long-lived. Cache entries keep their existing keys, so no
deployed scan is invalidated.

Where the sketchbook is: an explicit override, then the sketchbook env vars,
then arduino-cli itself (`config get directories.user`, probed once and
remembered) -- guessing ~/Arduino is wrong on the platforms whose default is
~/Documents/Arduino. A sketchbook that resolves to the cache is dropped: the
pro overlay points arduino-cli at a symlink to the cache root, and scanning
it twice under two shapes buys nothing.

Scans for a sketchbook are written to `<sketchbook>/.velxio-symbols/`, beside
`libraries/` and never inside it, so nothing Velxio writes shows up in
`arduino-cli lib list`.

The type index now keys on a fingerprint of the source's entry keys instead
of the entry count, which is exact for both layouts (an in-place upgrade
changes no count). Deployed indexes rebuild once, ~1s from the cached scans.
2026-08-25 00:06:10 +02:00
..
api feat(intellisense): answer from the local sketchbook, not only the cache 2026-08-25 00:06:10 +02:00
core feat(opencore): extract Pico W WiFi to a pluggable PIO peripheral seam 2026-06-15 08:33:28 +02:00
database refactor(oss-split): remove auth/DB/admin stack from OSS 2026-05-14 13:36:31 -03:00
mcp feat: integrate MCP (Model Context Protocol) for agent compatibility 2026-03-11 15:29:55 +00:00
models refactor(oss-split): remove auth/DB/admin stack from OSS 2026-05-14 13:36:31 -03:00
schemas refactor(oss-split): remove auth/DB/admin stack from OSS 2026-05-14 13:36:31 -03:00
services fix(compile): when the scan-all retry fails too, report ITS error 2026-08-24 22:49:11 +02:00
utils refactor(oss-split): remove auth/DB/admin stack from OSS 2026-05-14 13:36:31 -03:00
__init__.py
…
main.py feat(micropython): install libraries from the micropython-lib index (#214) 2026-08-18 21:50:10 +02:00