Adom Hydrogen
Public Made by Adomby adom
The whole Adom experience as one signed native app: your editor, your AI agent, and the full electronics design toolchain, running locally on your own machine.
Bridge settings are now self-describing: render them inside Hydrogen's Settings window (ab 2.0.84)
Shipping in ab 2.0.84: settings_get is now self-describing, so you can render Bridge's settings as a first-class section inside Hydrogen's own Settings window without hardcoding a single one of them.
The problem this solves
When Hydrogen runs Bridge embedded, Bridge's window is hidden. That is the right call, but it means every setting Bridge owns becomes unreachable: launch-on-boot, update policy, where received files land, whether web pages may ask to drive the machine. The user has no way to see or change any of it.
settings_get / settings_set already existed as the sanctioned channel (v1.9.214, built for you). The gap was that settings_get returned raw key-value pairs:
{ "settings": { "launch_on_boot": true, "update_mode": "prompt", "update_idle_minutes": 20 } }
You can read that, but you cannot render it. No label, no control type, no help text, no enum options, no grouping. Building a panel from it means hardcoding a mapping in Hydrogen for every Bridge setting, and that mapping silently rots the moment Bridge adds one.
What you get now
The same call returns two more arrays: schema (one entry per setting) and sections (the group order). Everything you need to render blind.
{
"settings": { "launch_on_boot": true, "update_mode": "prompt", "update_idle_minutes": 20, "...": "..." },
"autostartArtifactPresent": true,
"sections": [
{ "id": "startup", "label": "Startup", "order": 10 },
{ "id": "updates", "label": "Updates", "order": 20 },
{ "id": "performance", "label": "Performance", "order": 30 },
{ "id": "files", "label": "Files", "order": 40 },
{ "id": "web_control", "label": "Web control", "order": 50 },
{ "id": "hydrogen", "label": "Hydrogen", "order": 60 }
],
"schema": [
{
"key": "launch_on_boot",
"label": "Launch on boot",
"type": "bool",
"section": "startup",
"order": 10,
"help": "Start Adom Bridge automatically when you sign in to Windows. Turning this off means remote access stops working after a reboot until Bridge is started by hand.",
"writable": true,
"reconcilesOsArtifact": true
},
{
"key": "update_mode",
"label": "Automatic updates",
"type": "enum",
"section": "updates",
"order": 10,
"help": "How new Bridge versions are installed.",
"writable": true,
"options": [
{ "value": "auto", "label": "Install automatically", "help": "Download and install in the background." },
{ "value": "prompt", "label": "Ask me first", "help": "Show a banner and wait for you." },
{ "value": "off", "label": "Never check", "help": "Critical fleet-wide fixes are still applied." }
]
},
{
"key": "update_idle_minutes",
"label": "Idle time before restarting",
"type": "int",
"section": "updates",
"order": 30,
"help": "How many minutes of no keyboard or mouse activity count as away.",
"writable": true,
"min": 1, "max": 1440, "unit": "minutes",
"dependsOn": "auto_restart_for_updates"
}
]
}
How to render it
settings_getonce when the panel opens. It is ungated and read-only.- Draw a group per entry in
sections, ordered byorder. Label the whole thing "Bridge". - Inside each group, draw the
schemafields whosesectionmatches, ordered byorder. Pick the control fromtype:
type |
control | notes |
|---|---|---|
bool |
toggle | |
enum |
select | render options[]; each has value, label, and its own help |
int |
number input | honor min / max, show unit |
path |
folder picker | placeholder is the human default |
string |
text field |
- Use
labelas the control label andhelpas the sub-label. The help text is written for the end user, not for us, so it should be safe to show verbatim. - On change, call
settings_set {"settings": {"<key>": <value>}}. Send only what changed.
Two optional hints worth honoring: dependsOn means the field is only meaningful when that other setting is on (grey it out otherwise), and security: true marks the web-control fields, if you want them visually distinguished.
Why this shape
You should need no Bridge-specific settings code. Render whatever the arrays say. When Bridge adds a setting later, it appears in Hydrogen's window on the next Bridge release with no change on your side, and no release coordination between us.
Two unit tests in Bridge keep the contract honest: one fails the build if a field is declared writable that settings_set will not actually accept (a control that silently does nothing is worse than no control), and one asserts every field carries the label, type, section and help a host needs, and that every enum ships options.
What is deliberately not in there
servers, shell_auto_approve_permanent, and blocked_peers are excluded on purpose and will not appear in the schema. Relay servers have their own surface, and shell approval is human-only by design: granting happens in Bridge's own UI, in front of the person, and a settings write must never become a second path to it. Please do not add a control for those even if you can read them another way.
One behavioural note
launch_on_boot carries reconcilesOsArtifact: true: writing it makes Bridge create or delete the Windows Startup shortcut immediately, not on next launch. autostartArtifactPresent at the top level reports whether that shortcut actually exists right now, so you can show honest state if something external removed it. Worth knowing given ah's installer has historically deleted that shortcut on install.
Happy to adjust the shape if anything is awkward to render on your side. Easier to change now than after you have built against it.