Skip to main content

urirun-service-scanner

Standalone phone scanner service for urirun.

This package moves the scanner runtime behind a service package boundary, while still reusing the existing scanner page and capture API from urirun.host.host_dashboard. It is intended to run beside urirun-service-chat, not inside it.

The scanner participates in the dashboard chat flow described in /home/tom/github/if-uri/urirun/docs/HOST_DASHBOARD_CHAT.md. The resulting document archive, index.json and scanned.id.jsonl are documented in /home/tom/github/if-uri/urirun/docs/DOCUMENT_ARCHIVE.md.

Defaults

  • service id: scanner
  • default port: 8196
  • default bind: 0.0.0.0
  • default scheme: HTTPS, because phone camera access normally requires a secure browser context
  • env port override: URIRUN_PHONE_SCANNER_PORT
  • env host override: URIRUN_PHONE_SCANNER_HOST

The scanner URL includes the existing autonomous defaults:

autostart=1&auto=1&best=1&count=6&minScore=45&interval=3

Run

urirun-service-scanner serve --project /home/tom/github/if-uri/urirun --db ~/.urirun/host.db

Then open the printed /scanner URL from a phone on the same LAN.

serve replaces an older urirun-service-scanner process that is still listening on the same port, so a stale 8196 holder does not fail with Address already in use. Use --no-replace to disable that behavior, or --force-replace only in a controlled development environment when the port is known to be disposable.

You can also spell the intent explicitly:

urirun-service-scanner restart --project /home/tom/github/if-uri/urirun --db ~/.urirun/host.db --port 8196

For local HTTP-only testing:

urirun-service-scanner serve --http --host 127.0.0.1

URI surface

The scanner service exposes the same scanner API as the current host dashboard:

  • /scanner
  • /api/scanner/capture
  • /api/scanner/best/finish
  • /api/scanner/session
  • /api/scanner/live
  • /api/page/actions/poll
  • /api/page/actions/result
  • /api/uri/invoke

Page-level camera actions are intentionally queued. The browser page polls them and reports completion. This lets chat send URI actions such as autonomous scan or torch toggle while still respecting browser camera permissions.

The host dashboard can also restart the scanner service through URI:

dashboard://host/service/phone-scanner/command/restart
service://host/phone-scanner/command/restart

For a supervised service, configure one of:

export URIRUN_PHONE_SCANNER_RESTART_MANAGER=systemd
export URIRUN_PHONE_SCANNER_SYSTEMD_UNIT=urirun-service-scanner.service

or:

export URIRUN_PHONE_SCANNER_RESTART_CMD='systemctl --user restart urirun-service-scanner.service'

Then invoke from the chat dashboard:

curl -s http://127.0.0.1:8194/api/uri/invoke \
  -H 'content-type: application/json' \
  -d '{"uri":"service://host/phone-scanner/command/restart","mode":"execute"}'

If the scanner was started in-process by dashboard://host/phone-scanner/command/start, the dashboard can restart that in-process server directly. If port 8196 is held by an older urirun-service-scanner process, urirun terminates that old scanner and starts a fresh one. If the port is owned by an unrelated process, urirun refuses unless the URI payload explicitly includes "forcePortKill": true.

The service manifest is available from Python:

from urirun_service_scanner import urirun_service

print(urirun_service())

Metadata

Release files for urirun-service-scanner 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for urirun-service-scanner 0.1.1
File Size Uploaded Provenance Actions
urirun_service_scanner-0.1.1.tar.gz 8.8 kB Without provenance Details for urirun_service_scanner-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for urirun-service-scanner 0.1.1
File Interpreter ABI Platform Actions
urirun_service_scanner-0.1.1-py3-none-any.whl Python 3 none any Details for urirun_service_scanner-0.1.1-py3-none-any.whl

Total release size: 15.7 kB

Release files / urirun_service_scanner-0.1.1.tar.gz

Download URL urirun_service_scanner-0.1.1.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2bcd0cc09a6f9cc7cc37840562af788705e364a5a96bf39e12ec3d67f69dcd56
BLAKE2b-256 checksum
How to use checksums
e8df12ebea28d686b8af79752147348ab68d45f23d87dfa22e444e9b6251840e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / urirun_service_scanner-0.1.1-py3-none-any.whl

Download URL urirun_service_scanner-0.1.1-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd202592cba9dd0f014c89cac302686e26d2ba9929f71402d88fc50f72309b78
BLAKE2b-256 checksum
How to use checksums
1e2d9ac273992bfa65318e95e0dbed5c29773edfa2bfe5d5cc957bb57da55b09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Security for urirun-service-scanner 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page