Skip to content

feat(agent): connect Vana and Home Assistant by address - #1488

Merged
AnthonyRonning merged 3 commits into
masterfrom
codex-vanaha-maple
Nov 7, 2026
Merged

AnthonyRonning merged 3 commits into
masterfrom
codex-vanaha-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds Vana Desktop and Home Assistant to the Apps catalog through one new connection type: an app at an address that depends on the person's setup. Neither needs any app-specific code.

An entry gives the usual address, and Connect tries it first. A centered pop-up asks for another address only if nothing is there, so most people connect in one click. Vana connects at 127.0.0.1:47321, the port Vana Desktop gives its server by default. Home Assistant tries homeassistant.local:8123.

To make this work, sign-in now takes any http:// or https:// address, which also applies to + Custom server.

This covers the Vana card from #1313 without its Vana-specific code.

Changes

  • Catalog: new address connection with label, help, default, path, appName and getUrl. sign_in_at turns what the person gives into a server address, adding http:// and the app's path if they are left off.
  • Pop-up: a centered overlay with the app's help text, the address ready to edit, a download link, and Connect and Cancel. Enter submits and Esc closes.
  • Addresses: sign_in_endpoint accepts any HTTP or HTTPS address with no credentials or fragment. Over plain HTTP, PlainOAuthHttp holds every sign-in request to the address given.
  • No registration: where a server has no registration endpoint but sets client_id_metadata_document_supported, Maple uses its callback origin as the client ID. Home Assistant accepts this because the callback shares that origin, so nothing has to be hosted.
  • Missing issuer: Home Assistant gives relative sign-in paths and no issuer when reached by a name it was not told, which includes the usual .local name. fill_in_paths reads those as the server's own. This is allowed only over plain HTTP, so HTTPS stays strict.
  • Private addresses: rmcp refuses a private address named in metadata with any custom client, which stopped every LAN IP. When rmcp turns down a plain HTTP server, discover_metadata reads that server's own metadata directly.
  • Clearer failures: check_server_answers runs before the browser opens, so a wrong address or a missing Home Assistant integration is reported rather than sending someone through a sign-in that cannot work.
  • Logos: official logos for both apps, listed in SOURCES.md.
  • Localization: the new copy and the pop-up are in the English and Spanish catalogs, with translated accessible names. Sign-in failures the UI acts on cross the host as McpSignInError and HostFailure codes, so the pop-up no longer depends on the words of a failure, and sign_in_mcp_server moved to the presented dispatch so those codes survive. Failures stay UiText, so one on screen follows a language change.
  • Connected apps: a catalog app saves its English summary when connected, which showed as English on connected rows and in the composer's integrations list. Both now show the translated summary while that text is unchanged. This covers every catalog app, and anything a person wrote stays as written.

Behavior

  • Connect on either app starts with the spinner and Cancel on the card, like every other app.
  • If nothing answers at the usual address, the pop-up opens with that address and the reason. Plain HTTP servers get 5 seconds to answer.
  • A failure other than a missing server, such as access not being approved, stays on the card.
  • A typed address that fails reports on the card and does not reopen the pop-up.

Known tradeoffs

  • Plain HTTP: a token sent over http:// can be read on the way. This is deliberate, because most Home Assistant setups are plain HTTP on a local network, and there is no local-only rule any more, so this applies to public http:// addresses too.
  • Home Assistant's approval screen shows http://127.0.0.1:<port>/ rather than Maple. Changing that would need a hosted client metadata document.
  • Vana needs data first. With an empty account, Vana shows "Add data before approving", and Maple's sign-in times out after 5 minutes with a retry on the card.
  • A failed .local lookup takes about 5 seconds before the pop-up appears.

Validation

  • The localization commit passed the full pre-commit hook: 2,719 tests passed, 0 failed, 8 ignored, with 867 in maple-agent and 1,314 in the app, plus just ci-lint. The final tree differs from what was tested only by Compact Responses within the sliding window in one summary #1485, which changes no Agent code, so that result still applies.
  • In the previous full run, failed_stop_restores_enabled_remote_and_real_retry_retains_ownership failed once with WouldBlock on its final try_lock. It then passed 6 of 6 alone and in the full rerun. This PR changes no host or remote code apart from one From impl, so this looks like a race under parallel load, but that is unconfirmed.
  • This branch merges master instead of rebasing, because a force push was blocked. The merge commit and the final commit were built directly from the exact trees checked here, so neither ran the hook again. The merge's tree alone would fail the localization guard, and the final commit fixes that.
  • New tests were checked by breaking the behavior: removing a summary arm and matching a failure's words each failed the expected test.

All on macOS against real apps, with a local test account:

Home Assistant 2026.10.4 Vana Desktop 1.74.0
Sign-in in the real app Through Chrome on localhost Through Vana's real approval screen
Real task Turned off one light and turned on another, confirmed from Home Assistant's own state Read imported fictional records and cited them
Connect flow Usual address missing, pop-up opened, typed address worked One click at the usual port
Restart and token refresh Passed on a LAN IP, a .local name and 127.0.0.1 Not tested

The Home Assistant devices were its built-in demo integration, and the Vana data was the fictional records from #1313. The Vana task ran with the Home Assistant connection down, and that did not get in its way.

Also checked on screen: the pop-up for both apps, a missing integration on a real instance over a LAN IP, an unreachable address, and Esc.

After moving onto the localization work, in Spanish on macOS through the real host process: translated search found Home Assistant, a failed usual address opened the pop-up in Spanish, an empty field and a bad scheme gave Spanish errors, and a typed address with no server reported on the card. That card error switched to English live. A real Home Assistant sign-in then succeeded through the new dispatch, and connected rows and the composer list read in Spanish. The accessibility tree showed the dialog, the Dirección field, the link and the buttons by name.

Not proven

  • Windows and Linux, including everything in Spanish.
  • Vana's sign-in on the updated code. It shares Home Assistant's path, and its existing connection carried over.
  • The browser login on a LAN IP or .local name. Those two ran through Home Assistant's login API with the real sign-in code, in a temporary test that is not part of this PR.
  • homeassistant.local itself, since there was no such host to test against.
  • Vana token refresh.

Still in English

The other fixed sign-in failures, such as access not being approved, and the browser page after sign-in were English before this PR and stay that way. This PR's own text is translated.

🤖 Generated with Claude Code

AnthonyRonning and others added 3 commits November 6, 2026 19:30
Add a catalog connection for an app that runs at an address which depends
on the person's setup. An entry gives the usual address, which Connect
tries first, and a centered pop-up asks for another only if nothing is
there. Vana Desktop and Home Assistant are the first two.

Sign-in now takes any http:// or https:// address. Over plain HTTP every
sign-in request stays on the address given. Before the browser opens,
Maple checks that an MCP server answers there, so a wrong address or a
missing integration is reported instead of a sign-in that cannot work.

Home Assistant has no registration, so Maple names itself by its callback
origin where a server says it accepts that. It gives sign-in addresses as
paths when reached by a name it was not told, which includes the usual
.local name, and these are read as that server's own. rmcp refuses a
private address named in metadata, so a server reached over plain HTTP is
read directly from its own address when that happens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in Fluent localization and Responses compaction. The conflicts
were one import line and one settings field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The localization work rules out reading English to decide anything, and
the address pop-up opened by comparing a failure's text. Sign-in failures
the UI acts on now travel as McpSignInError and HostFailure codes, and
sign_in_mcp_server moves to the presented dispatch, because the String
path turns every failure into an unknown code.

The UI keeps these as UiText, so one on screen follows a language change.
Vana and Home Assistant get their summaries, field labels and help in
both catalogs. The pop-up uses Fluent for its title, buttons and input
name, and named accessible text and a link role for the rest.

Connected rows and the composer's integrations list showed the English
summary a catalog app saved when it connected. They now show it in the
person's language while it is unchanged. Anything a person wrote stays
as written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning
AnthonyRonning merged commit 8662661 into master Nov 7, 2026
23 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-vanaha-maple branch November 7, 2026 16:51
AnthonyRonning added a commit that referenced this pull request Nov 7, 2026
A permission request's desktop notification used the runtime's English
fallback text under the generic question title. It now has its own title
and the translated reason, so a Spanish interface shows no English there.
The mode chip's accessible name now says what it sets, as "Permissions:
Auto", and the question card's options expose their text to accessibility.

Recording the Spanish review also stamps the twelve strings #1488 added.
They landed translated but unstamped, which has failed master's
translations_were_reviewed_against_the_current_english since #1488.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AnthonyRonning added a commit that referenced this pull request Nov 7, 2026
#1488 added twelve messages with their Spanish text but no review
record. Its CI ran before #1489 added the stale-translation check, so
master's agent-test and agent-full-macos now fail in
translations_were_reviewed_against_the_current_english.

Generated with `just translations-reviewed es`. The Spanish text is
unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant