composeio 0.0.0__tar.gz → 0.1.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.
- composeio-0.1.0/CHANGELOG.md +61 -0
- composeio-0.1.0/MANIFEST.in +5 -0
- composeio-0.1.0/PKG-INFO +171 -0
- composeio-0.1.0/README.md +98 -0
- composeio-0.1.0/composeio/__init__.py +167 -0
- composeio-0.1.0/composeio/_overlay.py +135 -0
- composeio-0.1.0/composeio/adaptors/__init__.py +8 -0
- composeio-0.1.0/composeio/adaptors/wled/__init__.py +51 -0
- composeio-0.1.0/composeio/adaptors/wled/__main__.py +32 -0
- composeio-0.1.0/composeio/adaptors/wled/adaptor.py +140 -0
- composeio-0.1.0/composeio/adaptors/wled/mapping.py +208 -0
- composeio-0.1.0/composeio/adaptors/wled/selftest.py +205 -0
- composeio-0.1.0/composeio/adaptors/wled/senders.py +185 -0
- composeio-0.1.0/composeio/app.py +1117 -0
- composeio-0.1.0/composeio/app_singleton.py +133 -0
- composeio-0.1.0/composeio/app_topics.py +54 -0
- composeio-0.1.0/composeio/audio/__init__.py +54 -0
- composeio-0.1.0/composeio/audio/__main__.py +22 -0
- composeio-0.1.0/composeio/audio/binding.py +188 -0
- composeio-0.1.0/composeio/audio/contract.py +159 -0
- composeio-0.1.0/composeio/audio/hardware.py +121 -0
- composeio-0.1.0/composeio/audio/selftest.py +260 -0
- composeio-0.1.0/composeio/audio/software_backend.py +304 -0
- composeio-0.1.0/composeio/audio/tone.py +69 -0
- composeio-0.1.0/composeio/bootstrap_paths.py +175 -0
- composeio-0.1.0/composeio/bus_client.py +617 -0
- composeio-0.1.0/composeio/capture.py +277 -0
- composeio-0.1.0/composeio/cli.py +337 -0
- composeio-0.1.0/composeio/compact_summary.py +286 -0
- composeio-0.1.0/composeio/composer/__init__.py +14 -0
- composeio-0.1.0/composeio/composer/__main__.py +3 -0
- composeio-0.1.0/composeio/composer/app.py +133 -0
- composeio-0.1.0/composeio/composer/bindpanel.py +1210 -0
- composeio-0.1.0/composeio/composer/catalog.py +122 -0
- composeio-0.1.0/composeio/composer/chrome.py +1270 -0
- composeio-0.1.0/composeio/composer/core.py +877 -0
- composeio-0.1.0/composeio/composer/deploy.py +111 -0
- composeio-0.1.0/composeio/composer/discovery.py +398 -0
- composeio-0.1.0/composeio/composer/document.py +379 -0
- composeio-0.1.0/composeio/composer/flowpanel.py +2268 -0
- composeio-0.1.0/composeio/composer/monitor.py +858 -0
- composeio-0.1.0/composeio/composer/source_panel.py +446 -0
- composeio-0.1.0/composeio/composer/ui.py +455 -0
- composeio-0.1.0/composeio/composeserver.py +670 -0
- composeio-0.1.0/composeio/composeserver_host.py +362 -0
- composeio-0.1.0/composeio/composeserver_loader.py +303 -0
- composeio-0.1.0/composeio/composeserver_plugins.py +255 -0
- composeio-0.1.0/composeio/config.py +587 -0
- composeio-0.1.0/composeio/config_chunk.py +682 -0
- composeio-0.1.0/composeio/connector_replay.py +80 -0
- composeio-0.1.0/composeio/countdown.py +446 -0
- composeio-0.1.0/composeio/device_announce.py +455 -0
- composeio-0.1.0/composeio/device_control.py +262 -0
- composeio-0.1.0/composeio/docstore.py +159 -0
- composeio-0.1.0/composeio/flash_guard.py +247 -0
- composeio-0.1.0/composeio/fleet.py +418 -0
- composeio-0.1.0/composeio/generate.py +318 -0
- composeio-0.1.0/composeio/hal/__init__.py +68 -0
- composeio-0.1.0/composeio/hal/__main__.py +24 -0
- composeio-0.1.0/composeio/hal/drivers.py +391 -0
- composeio-0.1.0/composeio/hal/model.py +157 -0
- composeio-0.1.0/composeio/hal/parser.py +196 -0
- composeio-0.1.0/composeio/hal/registry.py +109 -0
- composeio-0.1.0/composeio/hal/rules.py +98 -0
- composeio-0.1.0/composeio/hal/runtime.py +189 -0
- composeio-0.1.0/composeio/hal/selftest.py +338 -0
- composeio-0.1.0/composeio/hal/topology.py +109 -0
- composeio-0.1.0/composeio/hal/validator.py +176 -0
- composeio-0.1.0/composeio/instance_home.py +356 -0
- composeio-0.1.0/composeio/integrations/__init__.py +32 -0
- composeio-0.1.0/composeio/integrations/homeassistant.py +216 -0
- composeio-0.1.0/composeio/maker/__init__.py +149 -0
- composeio-0.1.0/composeio/maker/audio_cover.py +363 -0
- composeio-0.1.0/composeio/maker/beepout/__init__.py +8 -0
- composeio-0.1.0/composeio/maker/beepout/cli.py +57 -0
- composeio-0.1.0/composeio/maker/beepout/derive.py +532 -0
- composeio-0.1.0/composeio/maker/beepout/mutate.py +124 -0
- composeio-0.1.0/composeio/maker/beepout/netlist.py +492 -0
- composeio-0.1.0/composeio/maker/beepout/render.py +373 -0
- composeio-0.1.0/composeio/maker/hookup_guide.py +251 -0
- composeio-0.1.0/composeio/maker/hookup_svg.py +1574 -0
- composeio-0.1.0/composeio/maker/mcu_config.py +593 -0
- composeio-0.1.0/composeio/maker/svg_resources.py +351 -0
- composeio-0.1.0/composeio/maker/throttle_thrust.py +321 -0
- composeio-0.1.0/composeio/maker/widget_viewer.py +238 -0
- composeio-0.1.0/composeio/ns_announce.py +661 -0
- composeio-0.1.0/composeio/paho_compat.py +528 -0
- composeio-0.1.0/composeio/peer/__init__.py +100 -0
- composeio-0.1.0/composeio/peer/buffer.py +62 -0
- composeio-0.1.0/composeio/peer/canbridge.py +285 -0
- composeio-0.1.0/composeio/peer/candecode.py +304 -0
- composeio-0.1.0/composeio/peer/canmap.py +184 -0
- composeio-0.1.0/composeio/peer/critical.py +401 -0
- composeio-0.1.0/composeio/peer/frag.py +157 -0
- composeio-0.1.0/composeio/peer/frame.py +221 -0
- composeio-0.1.0/composeio/peer/hub.py +285 -0
- composeio-0.1.0/composeio/peer/link.py +300 -0
- composeio-0.1.0/composeio/peer/mirror.py +101 -0
- composeio-0.1.0/composeio/peer/mockcan.py +166 -0
- composeio-0.1.0/composeio/peer/provenance.py +78 -0
- composeio-0.1.0/composeio/peer/socketcan.py +298 -0
- composeio-0.1.0/composeio/peripherals/__init__.py +12 -0
- composeio-0.1.0/composeio/peripherals/fingerprint/__init__.py +82 -0
- composeio-0.1.0/composeio/peripherals/fingerprint/__main__.py +31 -0
- composeio-0.1.0/composeio/peripherals/fingerprint/device.py +517 -0
- composeio-0.1.0/composeio/peripherals/fingerprint/hal.py +270 -0
- composeio-0.1.0/composeio/peripherals/fingerprint/mock.py +308 -0
- composeio-0.1.0/composeio/peripherals/fingerprint/push_validation.py +69 -0
- composeio-0.1.0/composeio/peripherals/fingerprint/selftest.py +930 -0
- composeio-0.1.0/composeio/peripherals/nfc/__init__.py +59 -0
- composeio-0.1.0/composeio/peripherals/nfc/__main__.py +30 -0
- composeio-0.1.0/composeio/peripherals/nfc/frames.py +151 -0
- composeio-0.1.0/composeio/peripherals/nfc/pn532.py +222 -0
- composeio-0.1.0/composeio/peripherals/nfc/poller.py +168 -0
- composeio-0.1.0/composeio/peripherals/nfc/selftest.py +192 -0
- composeio-0.1.0/composeio/peripherals/nfc/transport.py +148 -0
- composeio-0.1.0/composeio/plugins/__init__.py +9 -0
- composeio-0.1.0/composeio/plugins/bus_storage.py +496 -0
- composeio-0.1.0/composeio/plugins/fingerprint_manager.py +427 -0
- composeio-0.1.0/composeio/plugins/fingerprint_template_store.py +559 -0
- composeio-0.1.0/composeio/ptycore.py +1717 -0
- composeio-0.1.0/composeio/render/__init__.py +94 -0
- composeio-0.1.0/composeio/render/bitmap_font.py +153 -0
- composeio-0.1.0/composeio/render/canvas.py +312 -0
- composeio-0.1.0/composeio/render/composition/__init__.py +38 -0
- composeio-0.1.0/composeio/render/composition/__main__.py +11 -0
- composeio-0.1.0/composeio/render/composition/derive.py +518 -0
- composeio-0.1.0/composeio/render/composition/kinds.py +60 -0
- composeio-0.1.0/composeio/render/composition/lint.py +218 -0
- composeio-0.1.0/composeio/render/composition/router.py +145 -0
- composeio-0.1.0/composeio/render/conformance.py +460 -0
- composeio-0.1.0/composeio/render/dom/__init__.py +6 -0
- composeio-0.1.0/composeio/render/dom/static/bindings.js +187 -0
- composeio-0.1.0/composeio/render/dom/static/controls.js +358 -0
- composeio-0.1.0/composeio/render/dom/static/dom_canvas.js +366 -0
- composeio-0.1.0/composeio/render/dom/static/dsl.js +467 -0
- composeio-0.1.0/composeio/render/dom/static/form.js +121 -0
- composeio-0.1.0/composeio/render/dom/static/runtime.js +301 -0
- composeio-0.1.0/composeio/render/dom/static/ws_client.js +237 -0
- composeio-0.1.0/composeio/render/dom/validation.py +47 -0
- composeio-0.1.0/composeio/render/engine/__init__.py +41 -0
- composeio-0.1.0/composeio/render/engine/animation.py +143 -0
- composeio-0.1.0/composeio/render/engine/assets.py +135 -0
- composeio-0.1.0/composeio/render/engine/behaviors.py +422 -0
- composeio-0.1.0/composeio/render/engine/bindings.py +747 -0
- composeio-0.1.0/composeio/render/engine/component_imports.py +221 -0
- composeio-0.1.0/composeio/render/engine/components.py +279 -0
- composeio-0.1.0/composeio/render/engine/damage.py +234 -0
- composeio-0.1.0/composeio/render/engine/drag_value.py +160 -0
- composeio-0.1.0/composeio/render/engine/dsl.py +877 -0
- composeio-0.1.0/composeio/render/engine/dsl_conformance/__init__.py +4 -0
- composeio-0.1.0/composeio/render/engine/dsl_conformance/dsl_corpus.json +2452 -0
- composeio-0.1.0/composeio/render/engine/dsl_conformance/runner.py +135 -0
- composeio-0.1.0/composeio/render/engine/focus.py +108 -0
- composeio-0.1.0/composeio/render/engine/geometry.py +342 -0
- composeio-0.1.0/composeio/render/engine/headless.py +949 -0
- composeio-0.1.0/composeio/render/engine/hookup.py +895 -0
- composeio-0.1.0/composeio/render/engine/hookup_descriptor.py +263 -0
- composeio-0.1.0/composeio/render/engine/hookup_layout.py +1482 -0
- composeio-0.1.0/composeio/render/engine/hookup_seam.py +258 -0
- composeio-0.1.0/composeio/render/engine/instances.py +245 -0
- composeio-0.1.0/composeio/render/engine/layout.py +766 -0
- composeio-0.1.0/composeio/render/engine/parser.py +2411 -0
- composeio-0.1.0/composeio/render/engine/parts/__init__.py +198 -0
- composeio-0.1.0/composeio/render/engine/parts/catalog/bss138-4ch-levelshift.yaml +106 -0
- composeio-0.1.0/composeio/render/engine/parts/catalog/dy-sv5f.yaml +73 -0
- composeio-0.1.0/composeio/render/engine/parts/catalog/esp32-c3-supermini.yaml +106 -0
- composeio-0.1.0/composeio/render/engine/parts/catalog/esp32-c3.yaml +64 -0
- composeio-0.1.0/composeio/render/engine/parts/catalog/esp32-s3-supermini.yaml +141 -0
- composeio-0.1.0/composeio/render/engine/parts/catalog/pot-10k.yaml +38 -0
- composeio-0.1.0/composeio/render/engine/parts/catalog/psu-5v-ext.yaml +47 -0
- composeio-0.1.0/composeio/render/engine/parts/catalog/r503-fingerprint.yaml +294 -0
- composeio-0.1.0/composeio/render/engine/parts/catalog/res-470r.yaml +50 -0
- composeio-0.1.0/composeio/render/engine/parts/catalog/speaker.yaml +28 -0
- composeio-0.1.0/composeio/render/engine/parts/catalog/tm1637-4digit.yaml +152 -0
- composeio-0.1.0/composeio/render/engine/parts/footprint.py +147 -0
- composeio-0.1.0/composeio/render/engine/parts/svg/README.md +28 -0
- composeio-0.1.0/composeio/render/engine/parts/svg/bss138-4ch-levelshift.svg +87 -0
- composeio-0.1.0/composeio/render/engine/parts/svg/dy-sv5f.fzp.xml +268 -0
- composeio-0.1.0/composeio/render/engine/parts/svg/dy-sv5f.svg +6747 -0
- composeio-0.1.0/composeio/render/engine/parts/svg/esp32-c3-supermini.fzp.xml +290 -0
- composeio-0.1.0/composeio/render/engine/parts/svg/esp32-c3-supermini.svg +5589 -0
- composeio-0.1.0/composeio/render/engine/parts/svg/esp32-s3-supermini.fzp.xml +564 -0
- composeio-0.1.0/composeio/render/engine/parts/svg/esp32-s3-supermini.svg +7488 -0
- composeio-0.1.0/composeio/render/engine/parts/svg/potentiometer.svg +476 -0
- composeio-0.1.0/composeio/render/engine/parts/svg/tm1637-4digit.svg +163 -0
- composeio-0.1.0/composeio/render/engine/relay_actuator.py +210 -0
- composeio-0.1.0/composeio/render/engine/runtime.py +2639 -0
- composeio-0.1.0/composeio/render/engine/states.py +573 -0
- composeio-0.1.0/composeio/render/engine/swipe_carousel.py +299 -0
- composeio-0.1.0/composeio/render/engine/widget_registry.py +219 -0
- composeio-0.1.0/composeio/render/examples/assets/dradis_lottie.json +1387 -0
- composeio-0.1.0/composeio/render/examples/assets/flowchart.svg +42 -0
- composeio-0.1.0/composeio/render/examples/assets/red_alert.png +0 -0
- composeio-0.1.0/composeio/render/examples/assets/red_alert.svg +33 -0
- composeio-0.1.0/composeio/render/examples/assets/seven_segment.svg +74 -0
- composeio-0.1.0/composeio/render/examples/assets/seven_segment_colon.svg +58 -0
- composeio-0.1.0/composeio/render/examples/calib_throttle.compose.yaml +180 -0
- composeio-0.1.0/composeio/render/examples/carousel.compose.yaml +81 -0
- composeio-0.1.0/composeio/render/examples/chat_thread_demo.compose.yaml +73 -0
- composeio-0.1.0/composeio/render/examples/chat_thread_parity.compose.yaml +63 -0
- composeio-0.1.0/composeio/render/examples/colonial_clock.compose.yaml +40 -0
- composeio-0.1.0/composeio/render/examples/components/dropdown.compose.yaml +134 -0
- composeio-0.1.0/composeio/render/examples/components/intelligence_pane.compose.yaml +454 -0
- composeio-0.1.0/composeio/render/examples/components/keyboard.compose.yaml +708 -0
- composeio-0.1.0/composeio/render/examples/components/numpad.compose.yaml +359 -0
- composeio-0.1.0/composeio/render/examples/components/progress_bar.compose.yaml +153 -0
- composeio-0.1.0/composeio/render/examples/components/progress_bar_indeterminate.compose.yaml +117 -0
- composeio-0.1.0/composeio/render/examples/components/segment_bar.compose.yaml +118 -0
- composeio-0.1.0/composeio/render/examples/components/slider.compose.yaml +128 -0
- composeio-0.1.0/composeio/render/examples/components/switch.compose.yaml +126 -0
- composeio-0.1.0/composeio/render/examples/decisions_tab.compose.yaml +102 -0
- composeio-0.1.0/composeio/render/examples/dradis.compose.yaml +66 -0
- composeio-0.1.0/composeio/render/examples/dradis_lottie.compose.yaml +83 -0
- composeio-0.1.0/composeio/render/examples/dual_throttle.compose.yaml +211 -0
- composeio-0.1.0/composeio/render/examples/fingerprint/__init__.py +22 -0
- composeio-0.1.0/composeio/render/examples/fingerprint/auth_monitor.py +91 -0
- composeio-0.1.0/composeio/render/examples/fingerprint/binder.py +345 -0
- composeio-0.1.0/composeio/render/examples/fingerprint/device_diagnostic.compose.yaml +60 -0
- composeio-0.1.0/composeio/render/examples/fingerprint/drive.py +160 -0
- composeio-0.1.0/composeio/render/examples/fingerprint/drive_device_diagnostic.py +215 -0
- composeio-0.1.0/composeio/render/examples/fingerprint/drive_enroll_station.py +139 -0
- composeio-0.1.0/composeio/render/examples/fingerprint/drive_fleet.py +241 -0
- composeio-0.1.0/composeio/render/examples/fingerprint/drive_monitor.py +173 -0
- composeio-0.1.0/composeio/render/examples/fingerprint/enroll_station.py +245 -0
- composeio-0.1.0/composeio/render/examples/fingerprint/fleet_monitor.py +222 -0
- composeio-0.1.0/composeio/render/examples/fingerprint_casting.compose.yaml +200 -0
- composeio-0.1.0/composeio/render/examples/fingerprint_enroll_station.compose.yaml +56 -0
- composeio-0.1.0/composeio/render/examples/fingerprint_fleet.compose.yaml +63 -0
- composeio-0.1.0/composeio/render/examples/fingerprint_monitor.compose.yaml +67 -0
- composeio-0.1.0/composeio/render/examples/git_graph.compose.yaml +64 -0
- composeio-0.1.0/composeio/render/examples/graph_viewer.compose.yaml +42 -0
- composeio-0.1.0/composeio/render/examples/graph_viewer.styles.yaml +115 -0
- composeio-0.1.0/composeio/render/examples/headless/jump-drive-01.roster.yaml +18 -0
- composeio-0.1.0/composeio/render/examples/headless/widgets/fuel_pump.compose.yaml +55 -0
- composeio-0.1.0/composeio/render/examples/headless/widgets/fuel_tank.compose.yaml +44 -0
- composeio-0.1.0/composeio/render/examples/headless/widgets/jump_engine.compose.yaml +50 -0
- composeio-0.1.0/composeio/render/examples/m31_flagship.compose.yaml +82 -0
- composeio-0.1.0/composeio/render/examples/m31_workshop.compose.yaml +42 -0
- composeio-0.1.0/composeio/render/examples/mermaid_diagram.compose.yaml +63 -0
- composeio-0.1.0/composeio/render/examples/r503_tm1637_panel.compose.yaml +1083 -0
- composeio-0.1.0/composeio/render/examples/red_alert.compose.yaml +61 -0
- composeio-0.1.0/composeio/render/examples/render_demo.compose.yaml +193 -0
- composeio-0.1.0/composeio/render/examples/subwidgets_demo.compose.yaml +65 -0
- composeio-0.1.0/composeio/render/examples/target_designation.compose.yaml +112 -0
- composeio-0.1.0/composeio/render/examples/terminal_session.compose.yaml +73 -0
- composeio-0.1.0/composeio/render/examples/tm1637_quad_panel.compose.yaml +506 -0
- composeio-0.1.0/composeio/render/examples/touch_viz.compose.yaml +42 -0
- composeio-0.1.0/composeio/render/font_atlas_data.json +12099 -0
- composeio-0.1.0/composeio/render/fonts.py +317 -0
- composeio-0.1.0/composeio/render/freshness_view.py +370 -0
- composeio-0.1.0/composeio/render/ft_text.py +230 -0
- composeio-0.1.0/composeio/render/lottie/__init__.py +46 -0
- composeio-0.1.0/composeio/render/lottie/canvas_renderer.py +445 -0
- composeio-0.1.0/composeio/render/lottie/model.py +313 -0
- composeio-0.1.0/composeio/render/record.py +207 -0
- composeio-0.1.0/composeio/render/run_compose.py +15 -0
- composeio-0.1.0/composeio/render/sdl_strings.py +123 -0
- composeio-0.1.0/composeio/render/skia_backend.py +707 -0
- composeio-0.1.0/composeio/render/svg/__init__.py +50 -0
- composeio-0.1.0/composeio/render/svg/canvas_renderer.py +1332 -0
- composeio-0.1.0/composeio/render/svg/model.py +351 -0
- composeio-0.1.0/composeio/render/svg/path_data.py +191 -0
- composeio-0.1.0/composeio/render/widget.py +409 -0
- composeio-0.1.0/composeio/render/widgets/__init__.py +168 -0
- composeio-0.1.0/composeio/render/widgets/account_card.py +206 -0
- composeio-0.1.0/composeio/render/widgets/activity.py +312 -0
- composeio-0.1.0/composeio/render/widgets/agents_skills.py +452 -0
- composeio-0.1.0/composeio/render/widgets/assets/NOTICE +10 -0
- composeio-0.1.0/composeio/render/widgets/assets/center_focus_strong.svg +1 -0
- composeio-0.1.0/composeio/render/widgets/auth_event_feed.py +199 -0
- composeio-0.1.0/composeio/render/widgets/avatar.py +403 -0
- composeio-0.1.0/composeio/render/widgets/away_watch_view.py +348 -0
- composeio-0.1.0/composeio/render/widgets/bootstrap_manifest.py +701 -0
- composeio-0.1.0/composeio/render/widgets/bus_monitor.py +131 -0
- composeio-0.1.0/composeio/render/widgets/button.py +146 -0
- composeio-0.1.0/composeio/render/widgets/callout.py +127 -0
- composeio-0.1.0/composeio/render/widgets/carousel.py +434 -0
- composeio-0.1.0/composeio/render/widgets/chat_thread.py +1428 -0
- composeio-0.1.0/composeio/render/widgets/checkbox.py +84 -0
- composeio-0.1.0/composeio/render/widgets/circle.py +54 -0
- composeio-0.1.0/composeio/render/widgets/command.py +223 -0
- composeio-0.1.0/composeio/render/widgets/config_settings.py +584 -0
- composeio-0.1.0/composeio/render/widgets/console_prefs.py +388 -0
- composeio-0.1.0/composeio/render/widgets/console_tabs.py +186 -0
- composeio-0.1.0/composeio/render/widgets/console_theme.py +600 -0
- composeio-0.1.0/composeio/render/widgets/coordinate.py +178 -0
- composeio-0.1.0/composeio/render/widgets/dashboard.py +334 -0
- composeio-0.1.0/composeio/render/widgets/decisions_graph.py +384 -0
- composeio-0.1.0/composeio/render/widgets/decisions_summary.py +305 -0
- composeio-0.1.0/composeio/render/widgets/decisions_tab.py +2118 -0
- composeio-0.1.0/composeio/render/widgets/defects_summary.py +250 -0
- composeio-0.1.0/composeio/render/widgets/deliverable_alert.py +288 -0
- composeio-0.1.0/composeio/render/widgets/deliverable_card.py +333 -0
- composeio-0.1.0/composeio/render/widgets/deliverable_history.py +681 -0
- composeio-0.1.0/composeio/render/widgets/dialog.py +289 -0
- composeio-0.1.0/composeio/render/widgets/doc_browser.py +304 -0
- composeio-0.1.0/composeio/render/widgets/doc_picker.py +231 -0
- composeio-0.1.0/composeio/render/widgets/dsd_document.py +611 -0
- composeio-0.1.0/composeio/render/widgets/dsd_form.py +898 -0
- composeio-0.1.0/composeio/render/widgets/emit_button.py +207 -0
- composeio-0.1.0/composeio/render/widgets/enroll_ceremony.py +276 -0
- composeio-0.1.0/composeio/render/widgets/fingerprint_device_diagnostic.py +405 -0
- composeio-0.1.0/composeio/render/widgets/fingerprint_panel.py +192 -0
- composeio-0.1.0/composeio/render/widgets/fleet_status.py +237 -0
- composeio-0.1.0/composeio/render/widgets/gauge.py +998 -0
- composeio-0.1.0/composeio/render/widgets/hookup.py +541 -0
- composeio-0.1.0/composeio/render/widgets/image.py +111 -0
- composeio-0.1.0/composeio/render/widgets/intelligence_card.py +638 -0
- composeio-0.1.0/composeio/render/widgets/label.py +64 -0
- composeio-0.1.0/composeio/render/widgets/launch_tile.py +330 -0
- composeio-0.1.0/composeio/render/widgets/layered_dag.py +174 -0
- composeio-0.1.0/composeio/render/widgets/led.py +112 -0
- composeio-0.1.0/composeio/render/widgets/link_health.py +196 -0
- composeio-0.1.0/composeio/render/widgets/logic.py +38 -0
- composeio-0.1.0/composeio/render/widgets/lottie.py +396 -0
- composeio-0.1.0/composeio/render/widgets/lts_engine_rail.py +280 -0
- composeio-0.1.0/composeio/render/widgets/markdown_inline.py +330 -0
- composeio-0.1.0/composeio/render/widgets/markdown_table.py +445 -0
- composeio-0.1.0/composeio/render/widgets/markdown_viewer.py +757 -0
- composeio-0.1.0/composeio/render/widgets/master_detail.py +190 -0
- composeio-0.1.0/composeio/render/widgets/media/__init__.py +58 -0
- composeio-0.1.0/composeio/render/widgets/media/__main__.py +10 -0
- composeio-0.1.0/composeio/render/widgets/media/pyav_support.py +258 -0
- composeio-0.1.0/composeio/render/widgets/media/selftest.py +555 -0
- composeio-0.1.0/composeio/render/widgets/media/sources.py +355 -0
- composeio-0.1.0/composeio/render/widgets/media/widget.py +455 -0
- composeio-0.1.0/composeio/render/widgets/mermaid/__init__.py +46 -0
- composeio-0.1.0/composeio/render/widgets/mermaid/__main__.py +10 -0
- composeio-0.1.0/composeio/render/widgets/mermaid/assets/NOTICE +30 -0
- composeio-0.1.0/composeio/render/widgets/mermaid/assets/mermaid.min.js +3587 -0
- composeio-0.1.0/composeio/render/widgets/mermaid/selftest.py +210 -0
- composeio-0.1.0/composeio/render/widgets/mermaid/widget.py +331 -0
- composeio-0.1.0/composeio/render/widgets/mermaid_flowchart.py +654 -0
- composeio-0.1.0/composeio/render/widgets/model_picker.py +268 -0
- composeio-0.1.0/composeio/render/widgets/multiline_text.py +163 -0
- composeio-0.1.0/composeio/render/widgets/nightwatch_artifacts.py +188 -0
- composeio-0.1.0/composeio/render/widgets/nightwatch_checklist.py +251 -0
- composeio-0.1.0/composeio/render/widgets/placeholder.py +70 -0
- composeio-0.1.0/composeio/render/widgets/power_toggle.py +246 -0
- composeio-0.1.0/composeio/render/widgets/projects_view.py +647 -0
- composeio-0.1.0/composeio/render/widgets/radio_button_group.py +229 -0
- composeio-0.1.0/composeio/render/widgets/rectangle.py +63 -0
- composeio-0.1.0/composeio/render/widgets/registered_checklist.py +181 -0
- composeio-0.1.0/composeio/render/widgets/relay.py +102 -0
- composeio-0.1.0/composeio/render/widgets/segmented_tab_row.py +311 -0
- composeio-0.1.0/composeio/render/widgets/self_ledger.py +256 -0
- composeio-0.1.0/composeio/render/widgets/seven_segment.py +745 -0
- composeio-0.1.0/composeio/render/widgets/store_browser.py +721 -0
- composeio-0.1.0/composeio/render/widgets/style.py +126 -0
- composeio-0.1.0/composeio/render/widgets/subagent_ledger.py +434 -0
- composeio-0.1.0/composeio/render/widgets/svg.py +206 -0
- composeio-0.1.0/composeio/render/widgets/tab.py +147 -0
- composeio-0.1.0/composeio/render/widgets/terminal.py +1537 -0
- composeio-0.1.0/composeio/render/widgets/text_input.py +1024 -0
- composeio-0.1.0/composeio/render/widgets/theme_toggle.py +74 -0
- composeio-0.1.0/composeio/render/widgets/touch_viz.py +103 -0
- composeio-0.1.0/composeio/render/widgets/widget_select.py +373 -0
- composeio-0.1.0/composeio/render/window.py +720 -0
- composeio-0.1.0/composeio/resolve.py +222 -0
- composeio-0.1.0/composeio/source_bus.py +763 -0
- composeio-0.1.0/composeio/stack_member_probe.py +135 -0
- composeio-0.1.0/composeio/static/bus-events.js +40 -0
- composeio-0.1.0/composeio/storage.py +197 -0
- composeio-0.1.0/composeio/term_sequences.py +338 -0
- composeio-0.1.0/composeio/transport_can.py +513 -0
- composeio-0.1.0/composeio/transport_http_relay.py +184 -0
- composeio-0.1.0/composeio/transport_mcp.py +945 -0
- composeio-0.1.0/composeio/transport_mqtt.py +1522 -0
- composeio-0.1.0/composeio/transport_registry.py +286 -0
- composeio-0.1.0/composeio/transport_replay.py +264 -0
- composeio-0.1.0/composeio/transport_synthetic.py +242 -0
- composeio-0.1.0/composeio/transport_uart.py +454 -0
- composeio-0.1.0/composeio/transport_ws.py +560 -0
- composeio-0.1.0/composeio/web.py +376 -0
- composeio-0.1.0/composeio.egg-info/PKG-INFO +171 -0
- composeio-0.1.0/composeio.egg-info/SOURCES.txt +383 -0
- composeio-0.1.0/composeio.egg-info/entry_points.txt +2 -0
- composeio-0.1.0/composeio.egg-info/requires.txt +59 -0
- composeio-0.1.0/pyproject.toml +151 -0
- composeio-0.1.0/setup.py +25 -0
- composeio-0.0.0/PKG-INFO +0 -16
- composeio-0.0.0/README.md +0 -5
- composeio-0.0.0/composeio/__init__.py +0 -2
- composeio-0.0.0/composeio.egg-info/PKG-INFO +0 -16
- composeio-0.0.0/composeio.egg-info/SOURCES.txt +0 -8
- composeio-0.0.0/pyproject.toml +0 -18
- {composeio-0.0.0 → composeio-0.1.0}/LICENSE +0 -0
- {composeio-0.0.0 → composeio-0.1.0}/composeio.egg-info/dependency_links.txt +0 -0
- {composeio-0.0.0 → composeio-0.1.0}/composeio.egg-info/top_level.txt +0 -0
- {composeio-0.0.0 → composeio-0.1.0}/setup.cfg +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
The first real release of `composeio` on PyPI. The name was previously held by
|
|
6
|
+
a 0.0.0 placeholder with no code.
|
|
7
|
+
|
|
8
|
+
### Included
|
|
9
|
+
|
|
10
|
+
- The bus, through the `composebus` kernel: `composeio.bus` and the other
|
|
11
|
+
kernel module names resolve to the same module objects in `composebus`.
|
|
12
|
+
- The transports (MQTT, UART, CAN, WebSocket, HTTP relay, MCP, replay,
|
|
13
|
+
synthetic) and `composeio.paho_compat`, which runs the MQTT transport on
|
|
14
|
+
paho-mqtt 1.6.1 and on 2.x.
|
|
15
|
+
- `composeio.source_bus`, `ComposeApp` and the apps layer, and the `bus://` and
|
|
16
|
+
`doc://` storage clients.
|
|
17
|
+
- The ComposeServer plug-in host (`composeio.composeserver_plugins`).
|
|
18
|
+
- The render engine (`composeio.render`) and Composer, with their runtime data:
|
|
19
|
+
the font atlas, the parts catalog (YAML and SVG), the DOM runtime scripts,
|
|
20
|
+
widget assets, the vendored `mermaid.min.js` with its MIT notice, the example
|
|
21
|
+
surfaces, and the DSL conformance corpus with its runner.
|
|
22
|
+
- The `composeio` command-line tool.
|
|
23
|
+
|
|
24
|
+
### Not included
|
|
25
|
+
|
|
26
|
+
- The agent-operations packages: `decision_ops`, `defect_ops`, `magma_agg`,
|
|
27
|
+
`self_sensor`, `session_sweep`, `deliverable_sweep`, `git_sensor` and
|
|
28
|
+
`decision_extractor`. They depend on tooling that is not published and stay
|
|
29
|
+
in the source repository. The few shipped modules that can use them import
|
|
30
|
+
them only on use and fail with a clear message.
|
|
31
|
+
- `composeio.maker.projects` and the demo programs (`render/demo.py`, the DOM
|
|
32
|
+
demo servers and pages, `mermaid_widget_demo.html`).
|
|
33
|
+
- The render conformance goldens (`render/conformance_golden`): the backend
|
|
34
|
+
checker that reads them also needs a comparison script kept in the source
|
|
35
|
+
repository, so `composeio.render.conformance.verify_backend` runs from a
|
|
36
|
+
source checkout only, and says so when it cannot.
|
|
37
|
+
- The tests (they stay in the source repository).
|
|
38
|
+
|
|
39
|
+
### Dependencies
|
|
40
|
+
|
|
41
|
+
- Core: `composebus==0.1.2`, `pyyaml>=6.0`, `pydantic>=2.0`.
|
|
42
|
+
- Extras: `mqtt` (paho-mqtt >=1.6.1,<3), `render` (numpy, skia-python,
|
|
43
|
+
freetype-py, PySDL2), `plugins` (compose-plugins 0.5.1), `uart` (pyserial),
|
|
44
|
+
`terminal` (pyte), plus `ws`, `mcp`, `audio`, `nfc` and `media`. `all` is
|
|
45
|
+
every runtime extra; it no longer includes pytest, which is in `dev`.
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
48
|
+
|
|
49
|
+
- Importing `composeio.render` no longer imports numpy and skia-python; its
|
|
50
|
+
exported names load on first use.
|
|
51
|
+
- `composeio.composeserver_plugins` imports without compose-plugins; building
|
|
52
|
+
the plug-in host without it raises an ImportError naming the `plugins` extra.
|
|
53
|
+
- `composeio.plugins.fingerprint_manager` imports its `fingerprint_service`
|
|
54
|
+
dependency only when the plugin is used, with an error saying where that
|
|
55
|
+
package lives.
|
|
56
|
+
- The account card widget no longer has a built-in account name: with no
|
|
57
|
+
`account_id` its title reads "ACCOUNT".
|
|
58
|
+
- `composeio.instance_home.agent_descriptor_dirs()` reads the FactLattice
|
|
59
|
+
agent pool only from the `FACTLATTICE_AGENTS_DIR` environment variable.
|
|
60
|
+
There is no longer a fallback to a folder in the home directory; a host that
|
|
61
|
+
has an agent pool sets the variable (the per-host overlay can).
|
composeio-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: composeio
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Software-Defined I/O for Hardware Projects
|
|
5
|
+
Author: David Burnett
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Source, https://github.com/740Dave/composeio
|
|
8
|
+
Project-URL: Changelog, https://github.com/740Dave/composeio/blob/main/python/CHANGELOG.md
|
|
9
|
+
Keywords: pub/sub,bus,mqtt,iot,hardware,configuration
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Home Automation
|
|
20
|
+
Classifier: Topic :: Software Development :: Embedded Systems
|
|
21
|
+
Classifier: Topic :: System :: Hardware
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: pyyaml>=6.0
|
|
26
|
+
Requires-Dist: pydantic>=2.0
|
|
27
|
+
Requires-Dist: composebus==0.1.2
|
|
28
|
+
Provides-Extra: mqtt
|
|
29
|
+
Requires-Dist: paho-mqtt<3,>=1.6.1; extra == "mqtt"
|
|
30
|
+
Provides-Extra: render
|
|
31
|
+
Requires-Dist: numpy>=2.2.3; extra == "render"
|
|
32
|
+
Requires-Dist: skia-python>=144.0.post2; extra == "render"
|
|
33
|
+
Requires-Dist: freetype-py>=2.5.1; extra == "render"
|
|
34
|
+
Requires-Dist: PySDL2>=0.9.17; extra == "render"
|
|
35
|
+
Provides-Extra: plugins
|
|
36
|
+
Requires-Dist: compose-plugins==0.5.1; extra == "plugins"
|
|
37
|
+
Provides-Extra: uart
|
|
38
|
+
Requires-Dist: pyserial>=3.5; extra == "uart"
|
|
39
|
+
Provides-Extra: terminal
|
|
40
|
+
Requires-Dist: pyte>=0.8.2; extra == "terminal"
|
|
41
|
+
Provides-Extra: audio
|
|
42
|
+
Requires-Dist: miniaudio>=1.60; extra == "audio"
|
|
43
|
+
Provides-Extra: nfc
|
|
44
|
+
Requires-Dist: smbus2>=0.4.0; extra == "nfc"
|
|
45
|
+
Provides-Extra: media
|
|
46
|
+
Requires-Dist: av>=10.0; extra == "media"
|
|
47
|
+
Provides-Extra: ws
|
|
48
|
+
Requires-Dist: websockets>=12.0; extra == "ws"
|
|
49
|
+
Provides-Extra: mcp
|
|
50
|
+
Requires-Dist: mcp>=1.0.0; extra == "mcp"
|
|
51
|
+
Requires-Dist: starlette>=0.40; extra == "mcp"
|
|
52
|
+
Requires-Dist: uvicorn>=0.30; extra == "mcp"
|
|
53
|
+
Provides-Extra: all
|
|
54
|
+
Requires-Dist: paho-mqtt<3,>=1.6.1; extra == "all"
|
|
55
|
+
Requires-Dist: numpy>=2.2.3; extra == "all"
|
|
56
|
+
Requires-Dist: skia-python>=144.0.post2; extra == "all"
|
|
57
|
+
Requires-Dist: freetype-py>=2.5.1; extra == "all"
|
|
58
|
+
Requires-Dist: PySDL2>=0.9.17; extra == "all"
|
|
59
|
+
Requires-Dist: compose-plugins==0.5.1; extra == "all"
|
|
60
|
+
Requires-Dist: pyserial>=3.5; extra == "all"
|
|
61
|
+
Requires-Dist: pyte>=0.8.2; extra == "all"
|
|
62
|
+
Requires-Dist: miniaudio>=1.60; extra == "all"
|
|
63
|
+
Requires-Dist: smbus2>=0.4.0; extra == "all"
|
|
64
|
+
Requires-Dist: av>=10.0; extra == "all"
|
|
65
|
+
Requires-Dist: websockets>=12.0; extra == "all"
|
|
66
|
+
Requires-Dist: mcp>=1.0.0; extra == "all"
|
|
67
|
+
Requires-Dist: starlette>=0.40; extra == "all"
|
|
68
|
+
Requires-Dist: uvicorn>=0.30; extra == "all"
|
|
69
|
+
Provides-Extra: dev
|
|
70
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
71
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
72
|
+
Dynamic: license-file
|
|
73
|
+
|
|
74
|
+
# composeio
|
|
75
|
+
|
|
76
|
+
ComposeIO is software-defined I/O for hardware projects. Every participant, a
|
|
77
|
+
display, a sensor, a microcontroller or a program, is a peer on a bus. Peers
|
|
78
|
+
publish and subscribe named values (namespaces) such as `throttle = 0.7`;
|
|
79
|
+
none of them holds a reference to another, and none of them knows which wire a
|
|
80
|
+
message rode on. Behaviour is set in configuration (YAML), not in firmware.
|
|
81
|
+
|
|
82
|
+
This package is the Python platform:
|
|
83
|
+
|
|
84
|
+
- **the bus**: namespaces, typed state engines, local and bridged scopes. The
|
|
85
|
+
kernel is the `composebus` distribution; `composeio.bus` and the other kernel
|
|
86
|
+
module names resolve to it.
|
|
87
|
+
- **the transports**: MQTT, UART, CAN, WebSocket, HTTP relay, MCP, replay and
|
|
88
|
+
synthetic sources, behind one connector contract.
|
|
89
|
+
- **apps**: `ComposeApp`, which gives every app an in-process bus and an
|
|
90
|
+
external bus bridged over a transport, and the bus-native storage clients
|
|
91
|
+
(`bus://` assets and `doc://` documents).
|
|
92
|
+
- **the plug-in host** for ComposeServer, on the shared `compose-plugins`
|
|
93
|
+
contract library.
|
|
94
|
+
- **the render engine** (ComposeUX): widgets defined once against a small
|
|
95
|
+
canvas contract and drawn with Skia, plus `.compose.yaml` surfaces.
|
|
96
|
+
|
|
97
|
+
Source, firmware and specifications: <https://github.com/740Dave/composeio>.
|
|
98
|
+
|
|
99
|
+
## Install
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
pip install composeio
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The core needs only `composebus`, `pyyaml` and `pydantic`. Everything with a
|
|
106
|
+
heavier dependency is an extra:
|
|
107
|
+
|
|
108
|
+
| extra | adds | for |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| `mqtt` | paho-mqtt (1.6.1 or 2.x) | the MQTT transport, the usual external bus |
|
|
111
|
+
| `render` | numpy, skia-python, freetype-py, PySDL2 | the render engine, widgets, Composer and live windows |
|
|
112
|
+
| `plugins` | compose-plugins 0.5.1 | the ComposeServer plug-in host |
|
|
113
|
+
| `uart` | pyserial | the serial transport |
|
|
114
|
+
| `terminal` | pyte | the terminal surfaces |
|
|
115
|
+
| `ws` | websockets | the WebSocket listen connector |
|
|
116
|
+
| `mcp` | mcp, starlette, uvicorn | serving the MCP connector |
|
|
117
|
+
| `audio`, `nfc`, `media` | miniaudio, smbus2, av | the audio, NFC and media peripherals |
|
|
118
|
+
| `all` | every extra above | everything except the test tools |
|
|
119
|
+
| `dev` | pytest, pytest-cov | running the test suite |
|
|
120
|
+
|
|
121
|
+
For a bus app that talks MQTT:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
pip install 'composeio[mqtt]'
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
To render surfaces as well:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
pip install 'composeio[mqtt,render]'
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
A module that needs an extra you did not install fails at import (or at first
|
|
134
|
+
use) with an error naming what is missing.
|
|
135
|
+
|
|
136
|
+
### Modules that need more than the extras you install
|
|
137
|
+
|
|
138
|
+
Checked by importing every shipped module, one per fresh interpreter, from a
|
|
139
|
+
clean install:
|
|
140
|
+
|
|
141
|
+
| module | needs |
|
|
142
|
+
|---|---|
|
|
143
|
+
| `composeio.render.skia_backend`, `composeio.render.window`, `composeio.render.ft_text` | the `render` extra |
|
|
144
|
+
| `composeio.composer.__main__` | the `render` extra; it is the `python -m composeio.composer` entry point, so importing it starts the Composer window |
|
|
145
|
+
| `composeio.render.examples.fingerprint.binder`, `.drive`, `.drive_enroll_station`, `.drive_monitor`, `.enroll_station` | the `fingerprint_service` package from the source repository (`services/` on `PYTHONPATH`); these are example drivers for that service |
|
|
146
|
+
| `composeio.composeserver_plugins` (building the host) | the `plugins` extra |
|
|
147
|
+
| `composeio.plugins.fingerprint_manager` (running the plugin) | the `fingerprint_service` package, as above |
|
|
148
|
+
|
|
149
|
+
## A first bus
|
|
150
|
+
|
|
151
|
+
```python
|
|
152
|
+
from composeio.bus import ComposeIOBus
|
|
153
|
+
|
|
154
|
+
bus = ComposeIOBus()
|
|
155
|
+
bus.ensure_namespace("demo/throttle", "json")
|
|
156
|
+
bus.subscribe("demo/throttle", lambda ns, new, old: print(ns, old, "->", new))
|
|
157
|
+
bus.publish_state("demo/throttle", 0.7)
|
|
158
|
+
print(bus.get_state("demo/throttle"))
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## What is not in this package
|
|
162
|
+
|
|
163
|
+
The agent-operations tools kept in the source repository (the decision-graph,
|
|
164
|
+
defect and session tooling) depend on tooling that is not published, so they
|
|
165
|
+
are not part of this distribution. The maker project files and the demo
|
|
166
|
+
programs also stay in the repository.
|
|
167
|
+
|
|
168
|
+
## Licence
|
|
169
|
+
|
|
170
|
+
MIT. See `LICENSE`. The vendored `mermaid.min.js` is MIT-licensed by its
|
|
171
|
+
authors; its notice ships beside it.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# composeio
|
|
2
|
+
|
|
3
|
+
ComposeIO is software-defined I/O for hardware projects. Every participant, a
|
|
4
|
+
display, a sensor, a microcontroller or a program, is a peer on a bus. Peers
|
|
5
|
+
publish and subscribe named values (namespaces) such as `throttle = 0.7`;
|
|
6
|
+
none of them holds a reference to another, and none of them knows which wire a
|
|
7
|
+
message rode on. Behaviour is set in configuration (YAML), not in firmware.
|
|
8
|
+
|
|
9
|
+
This package is the Python platform:
|
|
10
|
+
|
|
11
|
+
- **the bus**: namespaces, typed state engines, local and bridged scopes. The
|
|
12
|
+
kernel is the `composebus` distribution; `composeio.bus` and the other kernel
|
|
13
|
+
module names resolve to it.
|
|
14
|
+
- **the transports**: MQTT, UART, CAN, WebSocket, HTTP relay, MCP, replay and
|
|
15
|
+
synthetic sources, behind one connector contract.
|
|
16
|
+
- **apps**: `ComposeApp`, which gives every app an in-process bus and an
|
|
17
|
+
external bus bridged over a transport, and the bus-native storage clients
|
|
18
|
+
(`bus://` assets and `doc://` documents).
|
|
19
|
+
- **the plug-in host** for ComposeServer, on the shared `compose-plugins`
|
|
20
|
+
contract library.
|
|
21
|
+
- **the render engine** (ComposeUX): widgets defined once against a small
|
|
22
|
+
canvas contract and drawn with Skia, plus `.compose.yaml` surfaces.
|
|
23
|
+
|
|
24
|
+
Source, firmware and specifications: <https://github.com/740Dave/composeio>.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
pip install composeio
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The core needs only `composebus`, `pyyaml` and `pydantic`. Everything with a
|
|
33
|
+
heavier dependency is an extra:
|
|
34
|
+
|
|
35
|
+
| extra | adds | for |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| `mqtt` | paho-mqtt (1.6.1 or 2.x) | the MQTT transport, the usual external bus |
|
|
38
|
+
| `render` | numpy, skia-python, freetype-py, PySDL2 | the render engine, widgets, Composer and live windows |
|
|
39
|
+
| `plugins` | compose-plugins 0.5.1 | the ComposeServer plug-in host |
|
|
40
|
+
| `uart` | pyserial | the serial transport |
|
|
41
|
+
| `terminal` | pyte | the terminal surfaces |
|
|
42
|
+
| `ws` | websockets | the WebSocket listen connector |
|
|
43
|
+
| `mcp` | mcp, starlette, uvicorn | serving the MCP connector |
|
|
44
|
+
| `audio`, `nfc`, `media` | miniaudio, smbus2, av | the audio, NFC and media peripherals |
|
|
45
|
+
| `all` | every extra above | everything except the test tools |
|
|
46
|
+
| `dev` | pytest, pytest-cov | running the test suite |
|
|
47
|
+
|
|
48
|
+
For a bus app that talks MQTT:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
pip install 'composeio[mqtt]'
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
To render surfaces as well:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
pip install 'composeio[mqtt,render]'
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
A module that needs an extra you did not install fails at import (or at first
|
|
61
|
+
use) with an error naming what is missing.
|
|
62
|
+
|
|
63
|
+
### Modules that need more than the extras you install
|
|
64
|
+
|
|
65
|
+
Checked by importing every shipped module, one per fresh interpreter, from a
|
|
66
|
+
clean install:
|
|
67
|
+
|
|
68
|
+
| module | needs |
|
|
69
|
+
|---|---|
|
|
70
|
+
| `composeio.render.skia_backend`, `composeio.render.window`, `composeio.render.ft_text` | the `render` extra |
|
|
71
|
+
| `composeio.composer.__main__` | the `render` extra; it is the `python -m composeio.composer` entry point, so importing it starts the Composer window |
|
|
72
|
+
| `composeio.render.examples.fingerprint.binder`, `.drive`, `.drive_enroll_station`, `.drive_monitor`, `.enroll_station` | the `fingerprint_service` package from the source repository (`services/` on `PYTHONPATH`); these are example drivers for that service |
|
|
73
|
+
| `composeio.composeserver_plugins` (building the host) | the `plugins` extra |
|
|
74
|
+
| `composeio.plugins.fingerprint_manager` (running the plugin) | the `fingerprint_service` package, as above |
|
|
75
|
+
|
|
76
|
+
## A first bus
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
from composeio.bus import ComposeIOBus
|
|
80
|
+
|
|
81
|
+
bus = ComposeIOBus()
|
|
82
|
+
bus.ensure_namespace("demo/throttle", "json")
|
|
83
|
+
bus.subscribe("demo/throttle", lambda ns, new, old: print(ns, old, "->", new))
|
|
84
|
+
bus.publish_state("demo/throttle", 0.7)
|
|
85
|
+
print(bus.get_state("demo/throttle"))
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## What is not in this package
|
|
89
|
+
|
|
90
|
+
The agent-operations tools kept in the source repository (the decision-graph,
|
|
91
|
+
defect and session tooling) depend on tooling that is not published, so they
|
|
92
|
+
are not part of this distribution. The maker project files and the demo
|
|
93
|
+
programs also stay in the repository.
|
|
94
|
+
|
|
95
|
+
## Licence
|
|
96
|
+
|
|
97
|
+
MIT. See `LICENSE`. The vendored `mermaid.min.js` is MIT-licensed by its
|
|
98
|
+
authors; its notice ships beside it.
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"""ComposeIO — Software-Defined I/O for Hardware Projects.
|
|
2
|
+
|
|
3
|
+
Bus-oriented composition model using namespace-based pub/sub.
|
|
4
|
+
Behavior defined in YAML configuration, not firmware.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
__version__ = "0.1.0"
|
|
8
|
+
|
|
9
|
+
# --- the host overlay: FIRST, before any submodule ---------------------------- #
|
|
10
|
+
# [CXC-SCL-SCRUB-OVERLAY-PARITY]. Submodules read the environment at their own
|
|
11
|
+
# import time (fleet, the decision_ops review tools, composeserver_plugins), so
|
|
12
|
+
# the per-host overlay must fill unset names before any of them load. It sets
|
|
13
|
+
# only names the environment lacks and never raises; see composeio/_overlay.py.
|
|
14
|
+
from composeio import _overlay as _overlay_mod
|
|
15
|
+
_overlay_mod.apply()
|
|
16
|
+
del _overlay_mod
|
|
17
|
+
|
|
18
|
+
# --- the composebus kernel: seat + identity aliases --------------------------- #
|
|
19
|
+
# [SPEC:CXC-COMPOSEBUS-KERNEL] §7. The bare-bus kernel modules MOVED to the
|
|
20
|
+
# `composebus` distribution (python/composebus/). Every moved `composeio.<name>`
|
|
21
|
+
# resolves to the IDENTICAL module object `composebus.<name>`
|
|
22
|
+
# ([CXC-CBK-PKG-COMPAT-IDENTITY]): `from composeio.bus import ComposeIOBus`,
|
|
23
|
+
# `mock.patch("composeio.bus.x")` and isinstance checks keep working and agree
|
|
24
|
+
# across both names. The alias is LAZY — `composeio.<name>` imports
|
|
25
|
+
# `composebus.<name>` only when it is itself imported — so the import footprint
|
|
26
|
+
# of every entrypoint is unchanged. `composeio.plugins` stays a REAL package
|
|
27
|
+
# (three non-moving plugins live in it); only its five moved default-plugin
|
|
28
|
+
# SUBMODULES are aliased (amendment-plugins-package).
|
|
29
|
+
def _seat_composebus() -> None:
|
|
30
|
+
"""TRANSITIONAL monorepo resolution ([CXC-CBK-PKG-DISTRIBUTION]
|
|
31
|
+
monorepo-resolution). An installed composebus always wins; otherwise the
|
|
32
|
+
sibling source directory python/composebus — located relative to this file,
|
|
33
|
+
never an absolute path — goes to the front of sys.path.
|
|
34
|
+
|
|
35
|
+
"Not importable" includes a NAMESPACE-package hit: with python/ on sys.path
|
|
36
|
+
(every `cd python && ...` entrypoint) the bare directory python/composebus/
|
|
37
|
+
satisfies `import composebus` as an EMPTY namespace package instead of
|
|
38
|
+
raising ImportError, so an ImportError-only check would never fall back.
|
|
39
|
+
Removal condition: composeio declares a dependency on a published composebus.
|
|
40
|
+
"""
|
|
41
|
+
import importlib
|
|
42
|
+
import importlib.util
|
|
43
|
+
import os
|
|
44
|
+
import sys
|
|
45
|
+
|
|
46
|
+
loaded = sys.modules.get("composebus")
|
|
47
|
+
if loaded is not None and getattr(loaded, "__file__", None):
|
|
48
|
+
return
|
|
49
|
+
if loaded is None:
|
|
50
|
+
try:
|
|
51
|
+
spec = importlib.util.find_spec("composebus")
|
|
52
|
+
except (ImportError, ValueError):
|
|
53
|
+
spec = None
|
|
54
|
+
if spec is not None and spec.origin is not None:
|
|
55
|
+
return
|
|
56
|
+
sibling = os.path.join(
|
|
57
|
+
os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "composebus")
|
|
58
|
+
if sibling not in sys.path:
|
|
59
|
+
sys.path.insert(0, sibling)
|
|
60
|
+
sys.modules.pop("composebus", None)
|
|
61
|
+
importlib.invalidate_caches()
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def _install_composebus_aliases() -> None:
|
|
65
|
+
import importlib
|
|
66
|
+
import importlib.abc
|
|
67
|
+
import importlib.machinery
|
|
68
|
+
import importlib.util
|
|
69
|
+
import sys
|
|
70
|
+
|
|
71
|
+
moved = (
|
|
72
|
+
"bus", "bus_clock", "bus_envelope", "freshness", "module", "namespace",
|
|
73
|
+
"selector", "state_engine", "transport", "transport_contract",
|
|
74
|
+
"transport_local", "plugin", "transforms",
|
|
75
|
+
)
|
|
76
|
+
moved_plugins = ("state_manager", "discovery", "time", "liveness", "log")
|
|
77
|
+
alias = {f"composeio.{n}": f"composebus.{n}" for n in moved}
|
|
78
|
+
alias.update({f"composeio.plugins.{n}": f"composebus.plugins.{n}"
|
|
79
|
+
for n in moved_plugins})
|
|
80
|
+
|
|
81
|
+
def _real_spec(target):
|
|
82
|
+
"""The composebus file's OWN spec, found fresh by the path finder (never
|
|
83
|
+
via sys.modules, whose entry may be the very object being repaired)."""
|
|
84
|
+
parent = sys.modules[target.rpartition(".")[0]]
|
|
85
|
+
return importlib.machinery.PathFinder.find_spec(target, parent.__path__)
|
|
86
|
+
|
|
87
|
+
class _ComposebusAlias(importlib.abc.MetaPathFinder, importlib.abc.Loader):
|
|
88
|
+
"""`composeio.<moved>` -> the composebus module object itself."""
|
|
89
|
+
|
|
90
|
+
def find_spec(self, fullname, path=None, target=None):
|
|
91
|
+
if fullname not in alias:
|
|
92
|
+
return None
|
|
93
|
+
return importlib.util.spec_from_loader(fullname, self)
|
|
94
|
+
|
|
95
|
+
def create_module(self, spec):
|
|
96
|
+
# The composebus module is returned AS the composeio module; the
|
|
97
|
+
# import system keeps its own __name__/__spec__ (it never
|
|
98
|
+
# overrides attributes a module already carries), so both names
|
|
99
|
+
# bind one object.
|
|
100
|
+
return importlib.import_module(alias[spec.name])
|
|
101
|
+
|
|
102
|
+
def exec_module(self, module):
|
|
103
|
+
# The import system has just stamped the ALIAS spec (name
|
|
104
|
+
# composeio.<x>, this loader, origin None) onto the shared module
|
|
105
|
+
# object: `__spec__` is the one attribute it sets unconditionally.
|
|
106
|
+
# Left there, `importlib.reload` re-finds the alias and re-executes
|
|
107
|
+
# NOTHING. Restore the real composebus spec, so a reload through
|
|
108
|
+
# either name re-executes the composebus file.
|
|
109
|
+
module.__spec__ = _real_spec(alias[module.__spec__.name])
|
|
110
|
+
|
|
111
|
+
# `python -m composeio.bus_envelope` (runpy) asks the loader for the
|
|
112
|
+
# module's CODE, not for a module object; hand over the composebus
|
|
113
|
+
# file's own code so `-m` entrypoints keep running unchanged.
|
|
114
|
+
def get_code(self, fullname):
|
|
115
|
+
spec = importlib.util.find_spec(alias[fullname])
|
|
116
|
+
return spec.loader.get_code(alias[fullname])
|
|
117
|
+
|
|
118
|
+
def is_package(self, fullname):
|
|
119
|
+
return False
|
|
120
|
+
|
|
121
|
+
if not any(type(f).__name__ == "_ComposebusAlias" for f in sys.meta_path):
|
|
122
|
+
sys.meta_path.insert(0, _ComposebusAlias())
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
_seat_composebus()
|
|
126
|
+
_install_composebus_aliases()
|
|
127
|
+
del _seat_composebus, _install_composebus_aliases
|
|
128
|
+
# ----------------------------------------------------------------------------- #
|
|
129
|
+
|
|
130
|
+
from composeio.bus import ComposeIOBus
|
|
131
|
+
from composeio.namespace import Namespace
|
|
132
|
+
from composeio.state_engine import (
|
|
133
|
+
StateEngine,
|
|
134
|
+
BinaryEngine,
|
|
135
|
+
TriLevelEngine,
|
|
136
|
+
StopLightEngine,
|
|
137
|
+
ContinuousEngine,
|
|
138
|
+
EnumEngine,
|
|
139
|
+
JsonEngine,
|
|
140
|
+
)
|
|
141
|
+
from composeio.module import Module
|
|
142
|
+
from composeio.app import ComposeApp, AppModule
|
|
143
|
+
from composeio.web import WebBusModule
|
|
144
|
+
from composeio.transport_replay import ReplayTransport
|
|
145
|
+
from composeio.transport_synthetic import SyntheticTransport
|
|
146
|
+
from composeio.capture import BusCapture
|
|
147
|
+
from composeio.generate import generate_trace
|
|
148
|
+
|
|
149
|
+
__all__ = [
|
|
150
|
+
"ComposeIOBus",
|
|
151
|
+
"ComposeApp",
|
|
152
|
+
"AppModule",
|
|
153
|
+
"WebBusModule",
|
|
154
|
+
"Namespace",
|
|
155
|
+
"StateEngine",
|
|
156
|
+
"BinaryEngine",
|
|
157
|
+
"TriLevelEngine",
|
|
158
|
+
"StopLightEngine",
|
|
159
|
+
"ContinuousEngine",
|
|
160
|
+
"EnumEngine",
|
|
161
|
+
"JsonEngine",
|
|
162
|
+
"Module",
|
|
163
|
+
"ReplayTransport",
|
|
164
|
+
"SyntheticTransport",
|
|
165
|
+
"BusCapture",
|
|
166
|
+
"generate_trace",
|
|
167
|
+
]
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"""The host overlay: live values for names the public tree carries only as neutral defaults.
|
|
2
|
+
|
|
3
|
+
[CXC-SCL-SCRUB-OVERLAY-PARITY]. Called from composeio/__init__.py BEFORE any submodule import,
|
|
4
|
+
because several submodules read the environment at their own import time. Standard library only.
|
|
5
|
+
|
|
6
|
+
File: $COMPOSEIO_OVERLAY_ENV, else ~/.config/composeio/live.env; the value `none` disables it; a
|
|
7
|
+
missing file is a no-op. Lines are KEY=VALUE, `#` comments, optional `export ` prefix, one pair of
|
|
8
|
+
matching surrounding quotes stripped, NO shell expansion. Only names absent from the environment
|
|
9
|
+
are set, so an explicit environment always wins. `applied` records the file and the NAMES set,
|
|
10
|
+
never values. The FIRST occurrence of a name wins. A malformed line is skipped and recorded by
|
|
11
|
+
line number: no `=`, a bad key, a duplicate, a value holding NUL, a key or value over its cap,
|
|
12
|
+
text that is not UTF-8. A path that is not a regular file is never opened (a FIFO would block).
|
|
13
|
+
Nothing here raises: `import composeio` must survive any overlay content.
|
|
14
|
+
scripts/lib/overlay-env.sh applies the same rules for shell consumers.
|
|
15
|
+
"""
|
|
16
|
+
import os
|
|
17
|
+
import re
|
|
18
|
+
from collections import namedtuple
|
|
19
|
+
|
|
20
|
+
ENV_NAME = "COMPOSEIO_OVERLAY_ENV"
|
|
21
|
+
DEFAULT_PATH = "~/.config/composeio/live.env"
|
|
22
|
+
LIVE_HOST_MARKER = "COMPOSEIO_LIVE_HOST"
|
|
23
|
+
# The one list of names a live host must supply (env or overlay) for parity with the live tree.
|
|
24
|
+
OVERLAY_REQUIRED = ("COMPOSEBUS_MQTT", "COMPOSEIO_MQTT_BROKER", "COMPOSEIO_STORAGE_URL",
|
|
25
|
+
"COMPOSEIO_SECRETS_PATH", "COMPOSEIO_TEMPLATE_STORE_URL", "MQTT")
|
|
26
|
+
|
|
27
|
+
Parsed = namedtuple("Parsed", "values skipped") # values: {name: value}; skipped: ((line, reason),)
|
|
28
|
+
Applied = namedtuple("Applied", "path names skipped") # path read (or None), names SET, skipped lines
|
|
29
|
+
_KEY = re.compile(r"[A-Za-z_][A-Za-z0-9_]*\Z")
|
|
30
|
+
MAX_KEY = 256 # characters
|
|
31
|
+
MAX_VALUE = 64 * 1024 # characters; a larger value would break every child spawn (E2BIG)
|
|
32
|
+
|
|
33
|
+
applied = Applied(None, (), ())
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def default_path():
|
|
37
|
+
return os.path.expanduser(DEFAULT_PATH)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def resolve_path(environ=None):
|
|
41
|
+
env = os.environ if environ is None else environ
|
|
42
|
+
path = env.get(ENV_NAME) or default_path()
|
|
43
|
+
return None if path.strip().lower() == "none" else os.path.expanduser(path)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def read(path):
|
|
47
|
+
"""Parse `path`; never raises. Line 0 in `skipped` means the file itself could not be read."""
|
|
48
|
+
values, skipped = {}, []
|
|
49
|
+
try:
|
|
50
|
+
if not path or path.strip().lower() == "none" or not os.path.exists(path):
|
|
51
|
+
return Parsed(values, ())
|
|
52
|
+
if not os.path.isfile(path):
|
|
53
|
+
return Parsed(values, ((0, "not a regular file"),))
|
|
54
|
+
with open(path, "rb") as fh:
|
|
55
|
+
data = fh.read()
|
|
56
|
+
except Exception as exc: # noqa: BLE001 — a broken overlay must never break `import composeio`
|
|
57
|
+
return Parsed(values, ((0, f"unreadable: {type(exc).__name__}"),))
|
|
58
|
+
for n, raw in enumerate(data.splitlines(), 1):
|
|
59
|
+
if len(raw) > 4 * (MAX_KEY + MAX_VALUE) + 16: # cannot pass the caps: do not even decode it
|
|
60
|
+
skipped.append((n, "line over the caps"))
|
|
61
|
+
continue
|
|
62
|
+
try:
|
|
63
|
+
line = raw.decode("utf-8").strip()
|
|
64
|
+
except UnicodeDecodeError:
|
|
65
|
+
skipped.append((n, "not UTF-8"))
|
|
66
|
+
continue
|
|
67
|
+
if not line or line.startswith("#"):
|
|
68
|
+
continue
|
|
69
|
+
if line.startswith("export "):
|
|
70
|
+
line = line[7:].lstrip()
|
|
71
|
+
key, sep, value = line.partition("=")
|
|
72
|
+
key, value = key.strip(), value.strip()
|
|
73
|
+
if not sep or not _KEY.match(key) or len(key) > MAX_KEY:
|
|
74
|
+
skipped.append((n, "not KEY=VALUE"))
|
|
75
|
+
continue
|
|
76
|
+
if len(value) >= 2 and value[0] == value[-1] and value[0] in "\"'":
|
|
77
|
+
value = value[1:-1]
|
|
78
|
+
if "\x00" in value:
|
|
79
|
+
skipped.append((n, "NUL in value"))
|
|
80
|
+
elif len(value) > MAX_VALUE:
|
|
81
|
+
skipped.append((n, "value over MAX_VALUE"))
|
|
82
|
+
elif key in values:
|
|
83
|
+
skipped.append((n, "duplicate name (the first wins)"))
|
|
84
|
+
else:
|
|
85
|
+
values[key] = value
|
|
86
|
+
return Parsed(values, tuple(skipped))
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def apply(path=None, environ=None):
|
|
90
|
+
"""Fill unset names in `environ` (default os.environ) from the overlay; record what was done.
|
|
91
|
+
Never raises: a write the environment refuses is a skipped line, and any other fault is
|
|
92
|
+
recorded as line 0."""
|
|
93
|
+
global applied
|
|
94
|
+
env = os.environ if environ is None else environ
|
|
95
|
+
try:
|
|
96
|
+
path = resolve_path(env) if path is None else path
|
|
97
|
+
parsed = read(path)
|
|
98
|
+
names, skipped = [], list(parsed.skipped)
|
|
99
|
+
for k, v in parsed.values.items():
|
|
100
|
+
if k in env:
|
|
101
|
+
continue
|
|
102
|
+
try:
|
|
103
|
+
env[k] = v
|
|
104
|
+
names.append(k)
|
|
105
|
+
except Exception as exc: # noqa: BLE001 — e.g. ValueError from os.environ
|
|
106
|
+
skipped.append((0, f"{k}: refused by the environment ({type(exc).__name__})"))
|
|
107
|
+
used = path if path and path.strip().lower() != "none" and os.path.exists(path) else None
|
|
108
|
+
applied = Applied(used, tuple(names), tuple(skipped))
|
|
109
|
+
except Exception as exc: # noqa: BLE001 — last resort: never break `import composeio`
|
|
110
|
+
applied = Applied(None, (), ((0, f"loader fault: {type(exc).__name__}"),))
|
|
111
|
+
return applied
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def missing_required(environ=None, path=None):
|
|
115
|
+
"""OVERLAY_REQUIRED names with no non-empty value in `environ` nor in the overlay at `path`."""
|
|
116
|
+
env = os.environ if environ is None else environ
|
|
117
|
+
file_values = read(resolve_path(env) if path is None else path).values
|
|
118
|
+
return tuple(n for n in OVERLAY_REQUIRED if not (env.get(n) or file_values.get(n)))
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def live_host_status(environ=None, path=None):
|
|
122
|
+
"""(is_live, problems). Live when COMPOSEIO_LIVE_HOST=1 is in the environment or in the overlay.
|
|
123
|
+
On a live host, a missing overlay file and every unset OVERLAY_REQUIRED name are problems
|
|
124
|
+
(names only, never values)."""
|
|
125
|
+
env = os.environ if environ is None else environ
|
|
126
|
+
path = resolve_path(env) if path is None else path
|
|
127
|
+
file_values = read(path).values
|
|
128
|
+
live = env.get(LIVE_HOST_MARKER) == "1" or file_values.get(LIVE_HOST_MARKER) == "1"
|
|
129
|
+
if not live:
|
|
130
|
+
return False, ()
|
|
131
|
+
problems = []
|
|
132
|
+
if not (path and os.path.isfile(path)):
|
|
133
|
+
problems.append(f"no overlay file at {path}")
|
|
134
|
+
problems += [f"{n} unset" for n in missing_required(environ=env, path=path)]
|
|
135
|
+
return True, tuple(problems)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"""ComposeIO output adaptors — bus-native drivers that subscribe semantic
|
|
2
|
+
namespaces and actuate external systems.
|
|
3
|
+
|
|
4
|
+
[CXC-HAL-ACTUATE]: the HAL's symmetric OUTPUT side. An adaptor is a Tier-2
|
|
5
|
+
output driver: it consumes SEMANTIC namespaces off ComposeBus and maps them to
|
|
6
|
+
some device's native protocol. Nothing here runs on the device — these are
|
|
7
|
+
pure client adaptors ("define once, actuate many").
|
|
8
|
+
"""
|