Skip to content

tinyService Release v1.0.0 - #3

Open
FacioErgoSum wants to merge 12 commits into
mainfrom
claude-development
Open

tinyService Release v1.0.0#3
FacioErgoSum wants to merge 12 commits into
mainfrom
claude-development

Conversation

@FacioErgoSum

Copy link
Copy Markdown
Contributor

No description provided.

FacioErgoSum and others added 12 commits June 12, 2026 16:50
- Rename package @tinyservice/service -> @mister-industries/tinyservice and
  fix stale @tinyservice/shared imports to @mister-industries/shared
- Export a configurable TinyService class (port, arduinoCliPath,
  allowedOrigins) with start()/stop() that doesn't own the process, so the
  tinyStudio Electron app can embed it via ServiceManager
- Move standalone auto-start + signal handling to src/main.ts (dev/start/pkg
  scripts now use it); wire shared as a file: workspace dep in service+client

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- listBoards now includes USB serial ports arduino-cli can't match outright
  (CH340/CP210x clones), identified heuristically by VID/PID — so an Uno clone
  on a CH340 bridge is detected as arduino:avr:uno instead of being dropped
- New library actions across the protocol: lib-search / lib-list /
  lib-install / lib-uninstall (shared types, constants, factory, validator,
  client) routed to a new LibraryHandler over the existing WebSocket
- arduino-cli service: searchLibraries / listLibraries / installLibrary /
  uninstallLibrary

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- New protocol actions serial-open / serial-close / serial-write across shared
  (types, constants, factory, validator, client)
- SerialHandler spawns `arduino-cli monitor` per connection, streams stdout
  lines back as serial output messages, filters arduino-cli's own banners
- WebSocketService closes the connection's serial monitor before an upload
  (the port is exclusive) and on disconnect, so flashing never hits a busy port

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
arduino-cli monitor spawns a separate pluggable serial-monitor tool that is
the process actually holding the COM port. A plain child.kill() left that
grandchild alive on Windows, so the port stayed busy until the board was
unplugged. Close now kills the whole tree via `taskkill /T /F` (SIGKILL
elsewhere), so the port is released cleanly before an upload and on disconnect.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…watchdog

The monitor was reopening on a 3s/4s interval; each reopen called close()
(async taskkill) then immediately spawned a new monitor that raced the still-
dying one for the exclusive port → "command 'open' failed: Serial port busy",
repeating every few seconds.

Service: close() now returns a promise that resolves when the process actually
exits; serial-open and the pre-upload close await it (+250ms settle) before
spawning. arduino-cli's "Port monitor error / command 'open' failed" lines are
filtered out of the serial stream so they never spam the console.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…card development-branch (turborepo reset) changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant