wirestudio 0.43.0__tar.gz → 0.44.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wirestudio-0.43.0/wirestudio.egg-info → wirestudio-0.44.0}/PKG-INFO +2 -1
- {wirestudio-0.43.0 → wirestudio-0.44.0}/pyproject.toml +1 -0
- wirestudio-0.44.0/tests/test_community.py +191 -0
- wirestudio-0.44.0/tests/test_rf_ook.py +100 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/__init__.py +1 -1
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/agent/tools.py +11 -1
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/api/app.py +5 -0
- wirestudio-0.44.0/wirestudio/api/community.py +268 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/generate/yaml_gen.py +35 -4
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/remote_receiver.yaml +26 -4
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/sx127x.yaml +22 -1
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/model.py +11 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/schema/design.schema.json +13 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0/wirestudio.egg-info}/PKG-INFO +2 -1
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio.egg-info/SOURCES.txt +3 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio.egg-info/requires.txt +1 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/LICENSE +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/LICENSES.md +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/README.md +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/setup.cfg +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_active_design.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_agent.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_agent_eval.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_agent_stream.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_api.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_api_auth.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_api_route.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_ascii_gen.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_build_backend.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_check_upgrade.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_chirpstack.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_circuitpython.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_codec.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_compatibility.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_compile.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_component_corpus.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_connectors.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_coverage_baseline.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_design_events.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_designs.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_designs_seed.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_display_intent.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_electrical.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_enclosure.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_enclosure_gate.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_enclosure_search.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_errors.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_esphome_dashboard.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_esphome_support.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_firmware_gen.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_fleet.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_footprints.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_framework_baseline.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_hardware_gate.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_intent.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_inventory.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_jlcpcb.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_kicad.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_kicad_erc.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_kicad_fab.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_kicad_import.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_kicad_pcb.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_kicad_render.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_kicad_route.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_kicad_sch.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_library_check.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_library_hbridge.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_library_rtttl.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_lorawan.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_lorawan_api.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_lorawan_sugar_migration.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_mcp_auth.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_mcp_client.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_mcp_hardware.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_mcp_jobs.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_mcp_resources.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_mcp_server.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_meshtastic.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_micropython.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_micropython_registers.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_migrate.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_modules.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_pin_protocols.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_pin_solver.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_printwarden.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_python_blocks.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_recommend.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_register_code.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_schema.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_schema_doc.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_schematics_gate.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_security_cors.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_seed_onboard.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_serve.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_sqlite_store.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_sqlite_stores.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_strict.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_targets.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_tasmota.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_tbeam_lorawan_example.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_tools_add_bus.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_tools_add_component.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_tools_solve_pins.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_uart_frames.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_validate.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_wled.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_workbench.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_workbench_boot.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_workbench_images.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_workbench_provision.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_workbench_serial.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_ws2812_method.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/tests/test_yaml_gen.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/agent/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/agent/agent.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/agent/eval.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/agent/eval_tasks.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/agent/session.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/api/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/api/__main__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/api/auth.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/api/circuitpython.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/api/design_input.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/api/meshtastic.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/api/micropython.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/api/schemas.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/api/serve.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/api/workbench.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/csp/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/csp/compatibility.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/csp/pin_solver.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/designs/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/designs/active.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/designs/events.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/designs/seed.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/designs/store.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/enclosure/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/enclosure/openscad.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/enclosure/search.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/enclosure/yapp/LICENSE +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/enclosure/yapp/YAPPgenerator_v3.scad +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/errors.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/esphome_dashboard/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/access-panel.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/actuator-harness.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/air-quality-station.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/analog-node.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/atom-echo.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/atom-lite.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/atom-matrix.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/atoms3-lcd.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/atoms3-lite.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/atoms3-onboard.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/atomu-onboard.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/atomu.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/attic-logger.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/awning-control.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/bench-io.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/bl0906-mainmeter.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/blind-stepper.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/bluemotion.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/bluesonoff.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/button-toggles-light.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/c3-supermini.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/c6-supermini.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/co2-display.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/desk-climate.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/desk-matrix.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/distance-sensor.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/encoder-drives-stepper.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/energy-monitor.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/esp32-audio.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/esp32cam-wrover.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/esp32cam.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/flow-meter.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/garage-motion.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/grill-probe.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/guarded-button-light.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/heltec-v4-gnss-tracker.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/keypad.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/kitchen-scale.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/led-display.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/lorawan-battery-uplink.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/motion-turns-on-light.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/motor-position.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/multi-temp.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/nextion-thermostat.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/oled-knob.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/oled.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/output-hub.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/parking-distance.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/presence-media-node.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/presence-rf.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/rc522.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/room-climate.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/rs485-energy.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/s3-devkitc.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/s3-supermini.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/securitypanel.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/smart-plug-v1.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/smart-plug.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/solder-fan.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/spi-io-node.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/subghz-rfid.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/t-beam-lorawan.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/t-beam.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/temp-above-turns-on-fan.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/temp-turns-on-fan.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/tft-touch.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/ttgo-lora32.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/tuya-smart-plug.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/usbc-led-strip.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/vent-damper.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/wasserpir.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/weather-station.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/wemosgps.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/wled-sensor-strip.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/examples/xiao-grove-climate.json +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/fleet/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/fleet/client.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/generate/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/generate/__main__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/generate/ascii_gen.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/generate/circuitpython_gen.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/generate/display_intent.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/generate/micropython_gen.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/intent.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/inventory/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/inventory/buy.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/inventory/check.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/inventory/csv_io.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/inventory/match.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/inventory/store.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/jlcpcb/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/jlcpcb/__main__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/jlcpcb/check.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/jlcpcb/client.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/kicad/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/kicad/erc.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/kicad/fab.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/kicad/generator.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/kicad/import.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/kicad/importer.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/kicad/netlist.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/kicad/pcb.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/kicad/pcbnew_bridge.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/kicad/render.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/kicad/route.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/kicad/schematic.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/kicad/symbol_parser.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/esp01_1m.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/esp32-c3-devkitm-1.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/esp32-c3-supermini.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/esp32-c6-supermini.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/esp32-devkitc-v4.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/esp32-s3-devkitc-1.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/esp32-s3-supermini.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/esp32-wrover-cam.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/esp32cam-ai-thinker.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/esp8285-1m.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/heltec-wifi-lora32-v2.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/heltec-wifi-lora32-v3.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/heltec-wifi-lora32-v4.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/m5stack-atom-echo.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/m5stack-atom-matrix.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/m5stack-atom.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/m5stack-atoms3-lite.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/m5stack-atoms3.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/m5stack-atomu.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/nodemcu-32s.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/nodemcu-v2.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/seeed-xiao-esp32c3.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/ttgo-lora32-v1.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/ttgo-lora32-v2.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/ttgo-t-beam.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/boards/wemos-d1-mini.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/check.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/adc.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/ads1115.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/ads1115_channel.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/aht10.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/apa102.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/axp192.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/battery_adc.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/bh1750.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/bl0906.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/bme280.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/bme680.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/bmp180.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/bmp280.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/cc1101.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/connector_1x02.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/connector_1x03.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/connector_1x04.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/connector_1x05.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/connector_1x06.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/connector_1x07.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/connector_1x08.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/connector_2x05_idc.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/cse7766.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/ct_clamp.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/dht.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/ds18b20.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/esp32_camera.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/esp32_rmt_led_strip.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/gpio_input.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/gpio_output.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/grove-aht20.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/hbridge.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/hbridge_mosfet.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/hc-sr04.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/hc-sr501.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/hlw8012.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/htu21d.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/hx711.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/i2s_microphone.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/ili9xxx.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/ina219.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/lcd_pcf8574.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/ld2410.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/ld2420.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/led_indicator.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/level_shifter.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/max31855.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/max7219.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/max98357a.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/mcp23008.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/mcp23017.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/mcp23s17.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/mcp3008.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/mcp3008_channel.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/mhz19.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/modbus.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/mosfet_low_side_driver.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/mpu6050.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/mpu6886.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/nextion.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/npn_low_side_driver.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/pca9685.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/pcf8574.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/pmsx003.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/pn532.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/potentiometer.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/pulse_counter.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/pwm_fan.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/pzemac.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/rc522.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/rcwl-0516.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/rdm6300.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/remote_transmitter.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/rf_bridge.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/rotary_encoder.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/rtttl.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/scd4x.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/sdm_meter.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/servo.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/sgp4x.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/sht3xd.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/sht4x.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/sn74hc595.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/ssd1306.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/st7789.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/tm1637.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/tm1638.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/tsl2561.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/tuya.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/tuya_sensor.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/tuya_switch.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/uart_gps.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/uln2003.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/usb_c_power_in.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/veml7700.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/vl53l0x.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/voltage_divider.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/wiegand.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/ws2812b.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/components/xpt2046.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/electrical.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/modules/env-display.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/modules/fan-controller.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/modules/motion-light.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/modules/oled-knob-13.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/library/modules/relay-4ch.yaml +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/mcp/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/mcp/auth.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/mcp/hardware.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/mcp/jobs.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/mcp/server.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/migrate.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/printwarden/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/printwarden/client.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/recommend/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/recommend/recommender.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/schema/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/seed.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/sqlite_store.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/base.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/build_backend.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/esphome.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/lorawan/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/lorawan/__main__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/lorawan/api.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/lorawan/build_local.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/lorawan/chirpstack.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/lorawan/codec.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/lorawan/compile.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/lorawan/firmware_gen.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/lorawan/templates/main.cpp.j2 +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/lorawan/templates/platformio.ini.j2 +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/lorawan/workbench_provision.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/tasmota.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/wled.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/targets/wled_build.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/validate.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/workbench/__init__.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/workbench/boot.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/workbench/client.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/workbench/gate.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/workbench/images.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio/workbench/serial.py +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio.egg-info/dependency_links.txt +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio.egg-info/entry_points.txt +0 -0
- {wirestudio-0.43.0 → wirestudio-0.44.0}/wirestudio.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: wirestudio
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.44.0
|
|
4
4
|
Summary: Agent-driven IoT device design tool that produces ESPHome YAML.
|
|
5
5
|
Author: wirestudio contributors
|
|
6
6
|
License: MIT
|
|
@@ -19,6 +19,7 @@ Requires-Dist: httpx>=0.27
|
|
|
19
19
|
Requires-Dist: slowapi>=0.1.9
|
|
20
20
|
Requires-Dist: mcp<3,>=2.0
|
|
21
21
|
Requires-Dist: websockets>=12
|
|
22
|
+
Requires-Dist: pillow>=10
|
|
22
23
|
Provides-Extra: dev
|
|
23
24
|
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
24
25
|
Requires-Dist: ruff>=0.4; extra == "dev"
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"""Community designs: browse and import go through the catalogue's index
|
|
2
|
+
only, and share refuses what the catalogue's CI would."""
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import io
|
|
6
|
+
import json
|
|
7
|
+
import zipfile
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
import pytest
|
|
11
|
+
import yaml
|
|
12
|
+
from fastapi.testclient import TestClient
|
|
13
|
+
|
|
14
|
+
from wirestudio.api.app import create_app
|
|
15
|
+
|
|
16
|
+
REPO = "moellere/wirestudio-designs"
|
|
17
|
+
RAW = f"https://raw.githubusercontent.com/{REPO}"
|
|
18
|
+
EXAMPLE = json.loads((Path(__file__).resolve().parent.parent / "wirestudio" / "examples"
|
|
19
|
+
/ "garage-motion.json").read_text())
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _entry(slug, **over):
|
|
23
|
+
return {"slug": slug, "name": "Porch motion", "author": "octocat", "license": "CC-BY-4.0",
|
|
24
|
+
"design_url": f"{RAW}/main/designs/{slug}/design.json", **over}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@pytest.fixture
|
|
28
|
+
def studio(monkeypatch):
|
|
29
|
+
monkeypatch.delenv("WIRESTUDIO_DESIGNS_REPO", raising=False)
|
|
30
|
+
files: dict[str, bytes] = {}
|
|
31
|
+
fetched: list[str] = []
|
|
32
|
+
|
|
33
|
+
async def fetch(url):
|
|
34
|
+
fetched.append(url)
|
|
35
|
+
if url not in files:
|
|
36
|
+
raise RuntimeError(f"404 {url}")
|
|
37
|
+
return files[url]
|
|
38
|
+
|
|
39
|
+
def publish(*entries, designs=None):
|
|
40
|
+
files[f"{RAW}/index/index.json"] = json.dumps(
|
|
41
|
+
{"version": 1, "generated": "2026-10-23T00:00:00+00:00", "designs": list(entries)}).encode()
|
|
42
|
+
for slug, doc in (designs or {}).items():
|
|
43
|
+
files[f"{RAW}/main/designs/{slug}/design.json"] = json.dumps(doc).encode()
|
|
44
|
+
|
|
45
|
+
app = TestClient(create_app(community_fetch=fetch))
|
|
46
|
+
return app, publish, fetched
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def test_status_names_the_catalogue(studio):
|
|
50
|
+
app, _, _ = studio
|
|
51
|
+
s = app.get("/community/status").json()
|
|
52
|
+
assert s["enabled"] and s["repo"] == REPO
|
|
53
|
+
assert s["upload_url"] == f"https://github.com/{REPO}/upload/main/designs"
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def test_empty_repo_setting_turns_it_off(studio, monkeypatch):
|
|
57
|
+
app, _, _ = studio
|
|
58
|
+
monkeypatch.setenv("WIRESTUDIO_DESIGNS_REPO", "")
|
|
59
|
+
assert app.get("/community/status").json() == {"enabled": False}
|
|
60
|
+
assert app.get("/community/designs").status_code == 503
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def test_browse_lists_the_index_and_caches_it(studio):
|
|
64
|
+
app, publish, fetched = studio
|
|
65
|
+
publish(_entry("porch-motion"))
|
|
66
|
+
assert [d["slug"] for d in app.get("/community/designs").json()["designs"]] == ["porch-motion"]
|
|
67
|
+
app.get("/community/designs")
|
|
68
|
+
assert fetched.count(f"{RAW}/index/index.json") == 1
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def test_an_unreachable_index_is_a_502(studio):
|
|
72
|
+
app, _, _ = studio
|
|
73
|
+
r = app.get("/community/designs")
|
|
74
|
+
assert r.status_code == 502 and "index unavailable" in r.json()["detail"]
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def test_import_stamps_the_origin(studio):
|
|
78
|
+
app, publish, _ = studio
|
|
79
|
+
publish(_entry("porch-motion"), designs={"porch-motion": {**EXAMPLE, "id": "porch-motion"}})
|
|
80
|
+
body = app.get("/community/designs/porch-motion").json()
|
|
81
|
+
assert body["design"]["origin"] == {"catalogue": REPO, "slug": "porch-motion",
|
|
82
|
+
"author": "octocat", "license": "CC-BY-4.0"}
|
|
83
|
+
assert app.post("/design/validate", json=body["design"]).status_code == 200
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def test_import_only_follows_urls_inside_the_catalogue(studio):
|
|
87
|
+
app, publish, fetched = studio
|
|
88
|
+
publish(_entry("evil", design_url="http://169.254.169.254/latest/meta-data"))
|
|
89
|
+
assert app.get("/community/designs/evil").status_code == 502
|
|
90
|
+
assert not any("169.254" in u for u in fetched)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def test_import_of_an_unknown_slug_is_a_404(studio):
|
|
94
|
+
app, publish, _ = studio
|
|
95
|
+
publish()
|
|
96
|
+
assert app.get("/community/designs/nope").status_code == 404
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def _share(app, **over):
|
|
100
|
+
body = {"design": {**EXAMPLE, "id": "Porch Motion v2"}, "author": "@octocat", "tags": ["motion"], **over}
|
|
101
|
+
return app.post("/community/share", json=body)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def test_share_packs_the_folder_the_catalogue_expects(studio):
|
|
105
|
+
app, _, _ = studio
|
|
106
|
+
r = _share(app, notes="Built on a DevKitC.")
|
|
107
|
+
assert r.status_code == 200 and r.headers["content-type"] == "application/zip"
|
|
108
|
+
z = zipfile.ZipFile(io.BytesIO(r.content))
|
|
109
|
+
assert sorted(z.namelist()) == ["porch-motion-v2/README.md", "porch-motion-v2/design.json",
|
|
110
|
+
"porch-motion-v2/meta.yaml"]
|
|
111
|
+
assert json.loads(z.read("porch-motion-v2/design.json"))["id"] == "porch-motion-v2"
|
|
112
|
+
assert yaml.safe_load(z.read("porch-motion-v2/meta.yaml")) == {"author": "octocat", "tags": ["motion"]}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def test_share_credits_the_design_it_was_imported_from(studio):
|
|
116
|
+
app, _, _ = studio
|
|
117
|
+
origin = {"catalogue": REPO, "slug": "porch-motion", "author": "someone", "license": "CC-BY-4.0"}
|
|
118
|
+
r = _share(app, design={**EXAMPLE, "id": "porch-motion-v2", "origin": origin})
|
|
119
|
+
z = zipfile.ZipFile(io.BytesIO(r.content))
|
|
120
|
+
assert yaml.safe_load(z.read("porch-motion-v2/meta.yaml"))["derived_from"] == "porch-motion"
|
|
121
|
+
assert "origin" not in json.loads(z.read("porch-motion-v2/design.json"))
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def test_resharing_your_own_design_does_not_derive_from_itself(studio):
|
|
125
|
+
app, _, _ = studio
|
|
126
|
+
origin = {"catalogue": REPO, "slug": "porch-motion", "author": "octocat", "license": "CC-BY-4.0"}
|
|
127
|
+
r = _share(app, design={**EXAMPLE, "id": "porch-motion", "origin": origin})
|
|
128
|
+
z = zipfile.ZipFile(io.BytesIO(r.content))
|
|
129
|
+
assert "derived_from" not in yaml.safe_load(z.read("porch-motion/meta.yaml"))
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def test_share_refuses_a_literal_credential(studio):
|
|
133
|
+
app, _, _ = studio
|
|
134
|
+
design = json.loads(json.dumps(EXAMPLE))
|
|
135
|
+
design["fleet"]["secrets_ref"]["wifi_password"] = "hunter22"
|
|
136
|
+
r = _share(app, design=design)
|
|
137
|
+
assert r.status_code == 422 and "fleet.secrets_ref.wifi_password" in r.json()["detail"]
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
@pytest.mark.parametrize("over, match", [
|
|
141
|
+
({"author": "not a handle"}, "GitHub handle"),
|
|
142
|
+
({"tags": ["Has Space"]}, "tags"),
|
|
143
|
+
({"slug": "Bad_Slug"}, "not a usable name"),
|
|
144
|
+
])
|
|
145
|
+
def test_share_refuses_what_the_catalogue_would(studio, over, match):
|
|
146
|
+
app, _, _ = studio
|
|
147
|
+
r = _share(app, **over)
|
|
148
|
+
assert r.status_code == 422 and match in r.json()["detail"]
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def _jpeg(size=(3000, 2000), exif=True, fmt="JPEG") -> str:
|
|
152
|
+
import base64
|
|
153
|
+
|
|
154
|
+
from PIL import Image
|
|
155
|
+
|
|
156
|
+
img = Image.new("RGB", size, (200, 80, 40))
|
|
157
|
+
kwargs = {}
|
|
158
|
+
if exif:
|
|
159
|
+
e = Image.Exif()
|
|
160
|
+
e[0x010F] = "PhoneMaker"
|
|
161
|
+
e[0x0112] = 6 # Orientation: rotate 90 CW on display
|
|
162
|
+
kwargs["exif"] = e
|
|
163
|
+
buf = io.BytesIO()
|
|
164
|
+
img.save(buf, fmt, **kwargs)
|
|
165
|
+
return base64.b64encode(buf.getvalue()).decode()
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def test_share_re_encodes_photos_without_metadata(studio):
|
|
169
|
+
from PIL import Image
|
|
170
|
+
|
|
171
|
+
app, _, _ = studio
|
|
172
|
+
r = _share(app, photos=[{"name": "IMG_0042.JPG", "data": _jpeg()},
|
|
173
|
+
{"name": "IMG_0042.JPG", "data": _jpeg(fmt="PNG", exif=False)}])
|
|
174
|
+
assert r.status_code == 200, r.text
|
|
175
|
+
z = zipfile.ZipFile(io.BytesIO(r.content))
|
|
176
|
+
names = sorted(n for n in z.namelist() if "/photos/" in n)
|
|
177
|
+
assert names == ["porch-motion-v2/photos/img-0042-2.jpg", "porch-motion-v2/photos/img-0042.jpg"]
|
|
178
|
+
with Image.open(io.BytesIO(z.read("porch-motion-v2/photos/img-0042.jpg"))) as img:
|
|
179
|
+
assert img.format == "JPEG" and not img.getexif()
|
|
180
|
+
assert img.size == (1365, 2048), "the EXIF rotation is applied before EXIF is dropped"
|
|
181
|
+
assert all(z.getinfo(n).file_size <= 1024 * 1024 for n in names)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
def test_share_refuses_what_is_not_a_photo(studio):
|
|
185
|
+
import base64
|
|
186
|
+
|
|
187
|
+
app, _, _ = studio
|
|
188
|
+
r = _share(app, photos=[{"name": "notes.txt", "data": base64.b64encode(b"hello").decode()}])
|
|
189
|
+
assert r.status_code == 422 and "not a readable image" in r.json()["detail"]
|
|
190
|
+
r = _share(app, photos=[{"name": f"p{i}.jpg", "data": _jpeg((10, 10))} for i in range(5)])
|
|
191
|
+
assert r.status_code == 422 and "at most 4" in r.json()["detail"]
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"""433 MHz OOK receive on an SX127x, `!lambda` strings anywhere in the
|
|
2
|
+
document, and multi-word component search -- the gaps a real
|
|
3
|
+
lora32-433-receiver design ran into."""
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import copy
|
|
7
|
+
import json
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
import pytest
|
|
11
|
+
import yaml
|
|
12
|
+
|
|
13
|
+
from wirestudio.agent.tools import _run_search_components
|
|
14
|
+
from wirestudio.generate.yaml_gen import render_yaml
|
|
15
|
+
from wirestudio.model import Design
|
|
16
|
+
|
|
17
|
+
EXAMPLES = Path(__file__).resolve().parent.parent / "wirestudio" / "examples"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class _Tagged(yaml.SafeLoader):
|
|
21
|
+
pass
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
_Tagged.add_constructor("!lambda", lambda loader, node: ("lambda", loader.construct_scalar(node)))
|
|
25
|
+
_Tagged.add_constructor("!secret", lambda loader, node: ("secret", loader.construct_scalar(node)))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _render(doc: dict, library) -> dict:
|
|
29
|
+
return yaml.load(render_yaml(Design.model_validate(doc), library), Loader=_Tagged)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@pytest.fixture
|
|
33
|
+
def lora32():
|
|
34
|
+
return json.loads((EXAMPLES / "ttgo-lora32.json").read_text())
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _radio(doc: dict) -> dict:
|
|
38
|
+
return next(c for c in doc["components"] if c["library_id"] == "sx127x")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@pytest.mark.parametrize("modulation, expected", [("OOK", False), ("FSK", True)])
|
|
42
|
+
def test_fsk_ook_get_the_settings_esphome_requires(lora32, library, modulation, expected):
|
|
43
|
+
_radio(lora32)["params"].update(modulation=modulation, rx_floor=-90)
|
|
44
|
+
radio = _render(lora32, library)["sx127x"]
|
|
45
|
+
assert radio["bitsync"] is expected and radio["packet_mode"] is expected
|
|
46
|
+
assert radio["rx_floor"] == -90
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def test_lora_output_is_unchanged(lora32, library):
|
|
50
|
+
radio = _render(lora32, library)["sx127x"]
|
|
51
|
+
assert not {"bitsync", "packet_mode", "rx_floor"} & set(radio)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def test_explicit_bitsync_wins(lora32, library):
|
|
55
|
+
_radio(lora32)["params"].update(modulation="OOK", bitsync=True)
|
|
56
|
+
assert _render(lora32, library)["sx127x"]["bitsync"] is True
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def test_remote_receiver_takes_rf_timing_and_rc_switch(lora32, library):
|
|
60
|
+
lora32["components"].append({
|
|
61
|
+
"id": "rf_rx", "library_id": "remote_receiver", "label": "433 MHz receiver",
|
|
62
|
+
"params": {"inverted": False, "dump": "rc_switch", "tolerance": "25%", "filter": "250us",
|
|
63
|
+
"idle": "4ms", "buffer_size": "2kb",
|
|
64
|
+
"on_rc_switch": {"code": "100010000000000010111110", "then": [{"logger.log": "rc"}]}},
|
|
65
|
+
})
|
|
66
|
+
lora32["connections"] += [
|
|
67
|
+
{"component_id": "rf_rx", "pin_role": "VCC", "target": {"kind": "rail", "rail": "3V3"}},
|
|
68
|
+
{"component_id": "rf_rx", "pin_role": "GND", "target": {"kind": "rail", "rail": "GND"}},
|
|
69
|
+
{"component_id": "rf_rx", "pin_role": "OUT", "target": {"kind": "gpio", "pin": "GPIO32"}},
|
|
70
|
+
]
|
|
71
|
+
rx = _render(lora32, library)["remote_receiver"]
|
|
72
|
+
assert rx["pin"]["inverted"] is False
|
|
73
|
+
assert (rx["tolerance"], rx["filter"], rx["idle"], rx["buffer_size"]) == ("25%", "250us", "4ms", "2kb")
|
|
74
|
+
assert rx["on_rc_switch"]["code"] == "100010000000000010111110"
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
@pytest.mark.parametrize("raw, body", [
|
|
78
|
+
("!lambda 'return id(x).state;'", "return id(x).state;"),
|
|
79
|
+
("!lambda return id(x).state;", "return id(x).state;"),
|
|
80
|
+
("!lambda return a: b;", "return a: b;"),
|
|
81
|
+
("!lambda 'return \"it''s\";'", 'return "it\'s";'),
|
|
82
|
+
('!lambda "return {\\"x\\"};"', 'return {"x"};'),
|
|
83
|
+
])
|
|
84
|
+
def test_extras_lambdas_render_as_tags(lora32, library, raw, body):
|
|
85
|
+
doc = copy.deepcopy(lora32)
|
|
86
|
+
doc["esphome_extras"] = {"interval": [{"interval": "1s", "then": [{"lambda": raw}]}]}
|
|
87
|
+
out = _render(doc, library)
|
|
88
|
+
assert out["interval"][0]["then"][0]["lambda"] == ("lambda", body)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def test_a_lambda_in_an_automation_param_is_a_tag(lora32, library):
|
|
92
|
+
"""The ttgo-lora32 example's on_packet lambda contains `: `, which used to
|
|
93
|
+
leave it a quoted string that ESPHome would compile as `!lambda ESP_LOGD`."""
|
|
94
|
+
then = _render(lora32, library)["sx127x"]["on_packet"]["then"][0]["lambda"]
|
|
95
|
+
assert then[0] == "lambda" and then[1].startswith("ESP_LOGD(")
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def test_multi_word_search_matches_by_word(library):
|
|
99
|
+
ids = [m["library_id"] for m in _run_search_components({}, library, query="remote receiver 433 rf")["matches"]]
|
|
100
|
+
assert ids[0] == "remote_receiver" and "rf_bridge" in ids[:3]
|
|
@@ -478,9 +478,19 @@ def _search_score(c, q: str) -> int:
|
|
|
478
478
|
return 0
|
|
479
479
|
|
|
480
480
|
|
|
481
|
+
def _query_score(c, q: str) -> int:
|
|
482
|
+
"""The whole query's score, or else the sum over its words -- "remote
|
|
483
|
+
receiver 433 rf" matches no single field, but each word matches some."""
|
|
484
|
+
whole = _search_score(c, q)
|
|
485
|
+
words = q.split()
|
|
486
|
+
if whole or len(words) < 2:
|
|
487
|
+
return whole
|
|
488
|
+
return sum(_search_score(c, w) for w in words)
|
|
489
|
+
|
|
490
|
+
|
|
481
491
|
def _run_search_components(design: dict, library: Library, *, query: str) -> dict:
|
|
482
492
|
q = query.strip().lower()
|
|
483
|
-
scored = [(
|
|
493
|
+
scored = [(_query_score(c, q), c) for c in library.list_components()]
|
|
484
494
|
hits = sorted(((s, c) for s, c in scored if s), key=lambda sc: (-sc[0], sc[1].id))
|
|
485
495
|
return {
|
|
486
496
|
"matches": [
|
|
@@ -257,6 +257,7 @@ def create_app(
|
|
|
257
257
|
inventory: Optional[InventoryStore] = None,
|
|
258
258
|
workbench_client_factory=None,
|
|
259
259
|
printwarden_client_factory=None,
|
|
260
|
+
community_fetch=None,
|
|
260
261
|
api_token: Optional[str] = None,
|
|
261
262
|
) -> FastAPI:
|
|
262
263
|
import os as _os
|
|
@@ -1980,6 +1981,10 @@ def create_app(
|
|
|
1980
1981
|
|
|
1981
1982
|
app.include_router(workbench_router(workbench_client_factory), prefix="/workbench")
|
|
1982
1983
|
|
|
1984
|
+
from wirestudio.api.community import router as community_router
|
|
1985
|
+
|
|
1986
|
+
app.include_router(community_router(lib, community_fetch), prefix="/community")
|
|
1987
|
+
|
|
1983
1988
|
if mcp_server is not None:
|
|
1984
1989
|
# Streamable HTTP transport. mcp_server.streamable_http_app() registers
|
|
1985
1990
|
# `/mcp` on its own Starlette app; we wrap it in BearerTokenMiddleware
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
"""Community designs: browse, import and share through the catalogue repo.
|
|
2
|
+
|
|
3
|
+
The catalogue is a GitHub repository (moellere/wirestudio-designs unless
|
|
4
|
+
WIRESTUDIO_DESIGNS_REPO says otherwise; set it empty to turn this off).
|
|
5
|
+
Its CI publishes index.json to an `index` branch; browse reads that.
|
|
6
|
+
Import fetches a design only through an index entry, never a caller's
|
|
7
|
+
URL. Share packs a design as the folder the catalogue's CI expects and
|
|
8
|
+
leaves the upload and pull request to the user, so the studio holds no
|
|
9
|
+
GitHub token.
|
|
10
|
+
"""
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import base64
|
|
14
|
+
import io
|
|
15
|
+
import json
|
|
16
|
+
import os
|
|
17
|
+
import re
|
|
18
|
+
import time
|
|
19
|
+
import zipfile
|
|
20
|
+
from typing import Awaitable, Callable, Optional
|
|
21
|
+
|
|
22
|
+
import yaml
|
|
23
|
+
from fastapi import APIRouter, Body, HTTPException
|
|
24
|
+
from fastapi.responses import Response
|
|
25
|
+
|
|
26
|
+
from wirestudio.api.design_input import migrate_document, validate_document
|
|
27
|
+
|
|
28
|
+
DEFAULT_REPO = "moellere/wirestudio-designs"
|
|
29
|
+
LICENSE = "CC-BY-4.0"
|
|
30
|
+
INDEX_TTL_S = 300.0
|
|
31
|
+
|
|
32
|
+
_REPO = re.compile(r"^[A-Za-z0-9-]+/[A-Za-z0-9._-]+$")
|
|
33
|
+
_SLUG = re.compile(r"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$")
|
|
34
|
+
_HANDLE = re.compile(r"^[A-Za-z0-9](?:-?[A-Za-z0-9]){0,38}$")
|
|
35
|
+
_TAG = re.compile(r"^[a-z0-9][a-z0-9-]{0,31}$")
|
|
36
|
+
_MAX_TAGS = 8
|
|
37
|
+
# What the catalogue's CI accepts; photos are re-encoded to fit.
|
|
38
|
+
MAX_PHOTOS = 4
|
|
39
|
+
PHOTO_PX = 2048
|
|
40
|
+
PHOTO_BYTES = 1024 * 1024
|
|
41
|
+
_MAX_UPLOAD_BYTES = 20 * 1024 * 1024
|
|
42
|
+
# The catalogue's CI refuses a literal value under any of these keys; refusing
|
|
43
|
+
# here first keeps a secret out of a public pull request.
|
|
44
|
+
_SECRET_KEY = re.compile(r"pass(word|phrase)?|secret|token|api_?key|app_?key|nwk_?key|psk|encryption",
|
|
45
|
+
re.IGNORECASE)
|
|
46
|
+
|
|
47
|
+
Fetch = Callable[[str], Awaitable[bytes]]
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def catalogue_repo() -> Optional[str]:
|
|
51
|
+
repo = os.environ.get("WIRESTUDIO_DESIGNS_REPO", DEFAULT_REPO).strip()
|
|
52
|
+
return repo if _REPO.match(repo) else None
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _urls(repo: str) -> dict:
|
|
56
|
+
return {
|
|
57
|
+
"index_url": f"https://raw.githubusercontent.com/{repo}/index/index.json",
|
|
58
|
+
"upload_url": f"https://github.com/{repo}/upload/main/designs",
|
|
59
|
+
"contributing_url": f"https://github.com/{repo}/blob/main/CONTRIBUTING.md",
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def slugify(text: str) -> str:
|
|
64
|
+
slug = re.sub(r"[^a-z0-9]+", "-", text.lower()).strip("-")
|
|
65
|
+
return slug[:64].rstrip("-")
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def leaked_secrets(node, where: str = "") -> list[str]:
|
|
69
|
+
found: list[str] = []
|
|
70
|
+
if isinstance(node, dict):
|
|
71
|
+
for k, v in node.items():
|
|
72
|
+
at = f"{where}.{k}" if where else str(k)
|
|
73
|
+
if isinstance(v, str) and v and _SECRET_KEY.search(str(k)) and not v.startswith("!secret "):
|
|
74
|
+
found.append(at)
|
|
75
|
+
else:
|
|
76
|
+
found += leaked_secrets(v, at)
|
|
77
|
+
elif isinstance(node, list):
|
|
78
|
+
for i, v in enumerate(node):
|
|
79
|
+
found += leaked_secrets(v, f"{where}[{i}]")
|
|
80
|
+
return found
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def clean_photo(data: bytes) -> bytes:
|
|
84
|
+
"""A JPEG the catalogue accepts: EXIF rotation applied, at most PHOTO_PX
|
|
85
|
+
on the long side, under PHOTO_BYTES, and no metadata at all -- a phone
|
|
86
|
+
photo's EXIF usually records where it was taken. Raises ValueError for
|
|
87
|
+
anything that is not a still image."""
|
|
88
|
+
from PIL import Image, ImageOps
|
|
89
|
+
|
|
90
|
+
try:
|
|
91
|
+
with Image.open(io.BytesIO(data)) as img:
|
|
92
|
+
if getattr(img, "is_animated", False):
|
|
93
|
+
raise ValueError("animated images are not accepted")
|
|
94
|
+
img = ImageOps.exif_transpose(img).convert("RGB")
|
|
95
|
+
except (OSError, Image.DecompressionBombError) as e:
|
|
96
|
+
raise ValueError(f"not a readable image ({e})") from e
|
|
97
|
+
img.thumbnail((PHOTO_PX, PHOTO_PX))
|
|
98
|
+
for quality in (85, 75, 65, 55, 45):
|
|
99
|
+
out = io.BytesIO()
|
|
100
|
+
img.save(out, "JPEG", quality=quality, optimize=True)
|
|
101
|
+
if out.tell() <= PHOTO_BYTES:
|
|
102
|
+
return out.getvalue()
|
|
103
|
+
raise ValueError("too detailed to fit 1 MB")
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def _photos(raw) -> list[tuple[str, bytes]]:
|
|
107
|
+
"""[{name, data(base64)}] -> [(catalogue file name, cleaned JPEG)]."""
|
|
108
|
+
if not raw:
|
|
109
|
+
return []
|
|
110
|
+
if not isinstance(raw, list) or len(raw) > MAX_PHOTOS:
|
|
111
|
+
raise HTTPException(status_code=422, detail=f"`photos`: at most {MAX_PHOTOS}")
|
|
112
|
+
out: list[tuple[str, bytes]] = []
|
|
113
|
+
for i, p in enumerate(raw):
|
|
114
|
+
label = str(p.get("name") or f"photo {i + 1}") if isinstance(p, dict) else f"photo {i + 1}"
|
|
115
|
+
try:
|
|
116
|
+
data = base64.b64decode(p["data"], validate=True)
|
|
117
|
+
except (KeyError, TypeError, ValueError) as e:
|
|
118
|
+
raise HTTPException(status_code=422, detail=f"{label}: not base64 image data") from e
|
|
119
|
+
if len(data) > _MAX_UPLOAD_BYTES:
|
|
120
|
+
raise HTTPException(status_code=422, detail=f"{label}: over 20 MB")
|
|
121
|
+
try:
|
|
122
|
+
jpeg = clean_photo(data)
|
|
123
|
+
except ValueError as e:
|
|
124
|
+
raise HTTPException(status_code=422, detail=f"{label}: {e}") from e
|
|
125
|
+
stem = slugify(label.rsplit(".", 1)[0])[:60] or "photo"
|
|
126
|
+
taken = {n for n, _ in out}
|
|
127
|
+
name, n = f"{stem}.jpg", 2
|
|
128
|
+
while name in taken:
|
|
129
|
+
name, n = f"{stem}-{n}.jpg", n + 1
|
|
130
|
+
out.append((name, jpeg))
|
|
131
|
+
return out
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
async def _http_fetch(url: str) -> bytes:
|
|
135
|
+
import httpx
|
|
136
|
+
|
|
137
|
+
async with httpx.AsyncClient(timeout=20.0, follow_redirects=True) as c:
|
|
138
|
+
r = await c.get(url)
|
|
139
|
+
r.raise_for_status()
|
|
140
|
+
return r.content
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def router(library, fetch: Optional[Fetch] = None) -> APIRouter:
|
|
144
|
+
fetch = fetch or _http_fetch
|
|
145
|
+
api = APIRouter(tags=["community"])
|
|
146
|
+
cache: dict = {}
|
|
147
|
+
|
|
148
|
+
def require_repo() -> str:
|
|
149
|
+
repo = catalogue_repo()
|
|
150
|
+
if repo is None:
|
|
151
|
+
raise HTTPException(status_code=503,
|
|
152
|
+
detail="community designs are off (WIRESTUDIO_DESIGNS_REPO is empty or invalid)")
|
|
153
|
+
return repo
|
|
154
|
+
|
|
155
|
+
async def load_index(repo: str) -> dict:
|
|
156
|
+
hit = cache.get(repo)
|
|
157
|
+
if hit and time.monotonic() - hit[0] < INDEX_TTL_S:
|
|
158
|
+
return hit[1]
|
|
159
|
+
from wirestudio.errors import describe
|
|
160
|
+
|
|
161
|
+
try:
|
|
162
|
+
index = json.loads(await fetch(_urls(repo)["index_url"]))
|
|
163
|
+
except Exception as e:
|
|
164
|
+
raise HTTPException(status_code=502, detail=f"catalogue index unavailable: {describe(e)}") from e
|
|
165
|
+
if not isinstance(index, dict) or not isinstance(index.get("designs"), list):
|
|
166
|
+
raise HTTPException(status_code=502, detail="catalogue index is malformed")
|
|
167
|
+
cache[repo] = (time.monotonic(), index)
|
|
168
|
+
return index
|
|
169
|
+
|
|
170
|
+
@api.get("/status")
|
|
171
|
+
def status() -> dict:
|
|
172
|
+
repo = catalogue_repo()
|
|
173
|
+
if repo is None:
|
|
174
|
+
return {"enabled": False}
|
|
175
|
+
return {"enabled": True, "repo": repo, "license": LICENSE, **_urls(repo)}
|
|
176
|
+
|
|
177
|
+
@api.get("/designs")
|
|
178
|
+
async def list_designs() -> dict:
|
|
179
|
+
repo = require_repo()
|
|
180
|
+
index = await load_index(repo)
|
|
181
|
+
return {"repo": repo, "generated": index.get("generated"), "designs": index["designs"]}
|
|
182
|
+
|
|
183
|
+
@api.get("/designs/{slug}")
|
|
184
|
+
async def get_design(slug: str) -> dict:
|
|
185
|
+
"""The design, migrated to this studio's schema, with `origin`
|
|
186
|
+
stamped so its author stays credited after it is edited."""
|
|
187
|
+
from wirestudio.errors import describe
|
|
188
|
+
|
|
189
|
+
repo = require_repo()
|
|
190
|
+
index = await load_index(repo)
|
|
191
|
+
entry = next((d for d in index["designs"] if isinstance(d, dict) and d.get("slug") == slug), None)
|
|
192
|
+
if entry is None:
|
|
193
|
+
raise HTTPException(status_code=404, detail=f"no design '{slug}' in {repo}")
|
|
194
|
+
url = str(entry.get("design_url") or "")
|
|
195
|
+
if not url.startswith(f"https://raw.githubusercontent.com/{repo}/"):
|
|
196
|
+
raise HTTPException(status_code=502, detail=f"index entry '{slug}' points outside {repo}")
|
|
197
|
+
try:
|
|
198
|
+
raw = json.loads(await fetch(url))
|
|
199
|
+
except Exception as e:
|
|
200
|
+
raise HTTPException(status_code=502, detail=f"could not fetch '{slug}': {describe(e)}") from e
|
|
201
|
+
try:
|
|
202
|
+
document = migrate_document(raw, library)
|
|
203
|
+
validate_document(document, library)
|
|
204
|
+
except HTTPException as e:
|
|
205
|
+
raise HTTPException(status_code=502, detail=f"'{slug}' does not load here: {e.detail}") from e
|
|
206
|
+
document["origin"] = {
|
|
207
|
+
"catalogue": repo,
|
|
208
|
+
"slug": slug,
|
|
209
|
+
"author": str(entry.get("author", "")),
|
|
210
|
+
"license": str(entry.get("license", LICENSE)),
|
|
211
|
+
}
|
|
212
|
+
return {"design": document, "entry": entry}
|
|
213
|
+
|
|
214
|
+
@api.post("/share")
|
|
215
|
+
def share(body: dict = Body(...)) -> Response:
|
|
216
|
+
"""A zip of `<slug>/design.json` + `meta.yaml` (+ `README.md`, + up to
|
|
217
|
+
four `photos/*.jpg`, re-encoded without metadata), ready to drag onto
|
|
218
|
+
the catalogue's upload page."""
|
|
219
|
+
repo = require_repo()
|
|
220
|
+
design = body.get("design")
|
|
221
|
+
if not isinstance(design, dict):
|
|
222
|
+
raise HTTPException(status_code=422, detail="`design` is required")
|
|
223
|
+
author = str(body.get("author") or "").strip().lstrip("@")
|
|
224
|
+
if not _HANDLE.match(author):
|
|
225
|
+
raise HTTPException(status_code=422, detail="`author` must be your GitHub handle")
|
|
226
|
+
tags = body.get("tags") or []
|
|
227
|
+
if (not isinstance(tags, list) or len(tags) > _MAX_TAGS
|
|
228
|
+
or not all(isinstance(t, str) and _TAG.match(t) for t in tags)):
|
|
229
|
+
raise HTTPException(status_code=422,
|
|
230
|
+
detail=f"`tags`: at most {_MAX_TAGS} lowercase words (a-z, 0-9, -)")
|
|
231
|
+
slug = str(body.get("slug") or "") or slugify(str(design.get("id") or design.get("name") or ""))
|
|
232
|
+
if not _SLUG.match(slug):
|
|
233
|
+
raise HTTPException(status_code=422,
|
|
234
|
+
detail=f"'{slug}' is not a usable name: lowercase a-z, 0-9 and -, at most 64")
|
|
235
|
+
|
|
236
|
+
document = migrate_document(design, library)
|
|
237
|
+
validate_document(document, library)
|
|
238
|
+
leaked = leaked_secrets(document)
|
|
239
|
+
if leaked:
|
|
240
|
+
raise HTTPException(status_code=422,
|
|
241
|
+
detail="literal credentials at " + ", ".join(leaked)
|
|
242
|
+
+ " -- replace them with `!secret name` references before sharing")
|
|
243
|
+
photos = _photos(body.get("photos"))
|
|
244
|
+
origin = document.pop("origin", None) or {}
|
|
245
|
+
document["id"] = slug
|
|
246
|
+
|
|
247
|
+
meta: dict = {"author": author}
|
|
248
|
+
if tags:
|
|
249
|
+
meta["tags"] = tags
|
|
250
|
+
if origin.get("catalogue") == repo and origin.get("slug") not in (None, slug):
|
|
251
|
+
meta["derived_from"] = origin["slug"]
|
|
252
|
+
|
|
253
|
+
buf = io.BytesIO()
|
|
254
|
+
with zipfile.ZipFile(buf, "w", zipfile.ZIP_DEFLATED) as z:
|
|
255
|
+
z.writestr(f"{slug}/design.json", json.dumps(document, indent=2) + "\n")
|
|
256
|
+
z.writestr(f"{slug}/meta.yaml", yaml.safe_dump(meta, sort_keys=False))
|
|
257
|
+
notes = str(body.get("notes") or "").strip()
|
|
258
|
+
if notes:
|
|
259
|
+
z.writestr(f"{slug}/README.md", notes + "\n")
|
|
260
|
+
for name, jpeg in photos:
|
|
261
|
+
z.writestr(f"{slug}/photos/{name}", jpeg)
|
|
262
|
+
return Response(
|
|
263
|
+
content=buf.getvalue(),
|
|
264
|
+
media_type="application/zip",
|
|
265
|
+
headers={"Content-Disposition": f'attachment; filename="{slug}.zip"'},
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
return api
|