You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge upstream/master into feat/settings-ui + address Patch76 review
Conflicts:
- homeassistant-addon-dev/{config.yaml,translations/en.yaml,DOCS.md,start.py}:
combined homeassistant-ai#1030 beta flags (filesystem/yaml/custom-component) with this
PR's new dev-only options (tool_search_max_results, disabled_tools,
pinned_tools). New options stay dev-only per homeassistant-ai#942 channel convention.
- src/ha_mcp/server.py: combined homeassistant-ai#955's _apply_search_keyword_enrichment
refactor with this PR's settings-visibility apply step. Order:
tools -> enhanced -> skills -> _apply_settings_visibility ->
_apply_search_keyword_enrichment -> _apply_tool_search.
- homeassistant-addon/start.py: kept homeassistant-ai#806 migrate_skills_as_tools_default
+ relocated supervisor-token validation; added new env var exports.
Patch76 review fixes:
- G1: Mount settings UI under MCP secret_path so Docker/standalone clients
share the same auth-by-obscurity as the MCP endpoint. Add-on continues
to mount at root for HA ingress proxy. Routes don't register at all
when neither path is available (stdio mode, or HTTP without secret).
Moved register_settings_routes out of _initialize_server into the HTTP
entry points (_run_http_server, _run_oauth_server, addon start.py).
- G2: Wire tool_search_max_results through CategorizedSearchTransform;
enforce 2-10 range in Pydantic Field and addon-dev schema int(2,10)?.
- G3: 400 instead of 500 when POST body is JSON but not an object.
- G4: Use SUPERVISOR_TOKEN, not /data existence, to detect add-on mode
in _get_config_path. Matches the rest of the module.
- G5: HTML-escape interpolated tool metadata in the settings JS.
- G6: Comment explaining MANDATORY_TOOLS vs DEFAULT_PINNED_TOOLS overlap.
- G7: Add ha_install_mcp_tools stub to FEATURE_GATED_TOOLS; rewrite stub
copy to point at docs/beta.md (covers both stable and dev paths post-homeassistant-ai#942).
- G9: Keep enable_yaml_config_editing guard with defense-in-depth comment;
drop the discard so AND semantics apply (UI off OR toggle off -> tool off).
- G12: Restore .env.example trailing newline.
Tests cover non-dict body, garbage state values, route mounting under
secret_path, _get_config_path env-driven path, FEATURE_GATED_TOOLS
beta-system alignment, and the G9 AND-semantics regression.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .gemini/styleguide.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,7 @@ All MCP tools MUST follow `ha_<verb>_<noun>` pattern:
71
71
-`ha_set_*` — create/update operations
72
72
-`ha_delete_*` — remove operations
73
73
-`ha_call_*` — execute operations
74
+
-`ha_manage_*` — multi-modal tools combining several operations behind one interface
74
75
75
76
Flag MEDIUM severity if tools don't follow this pattern.
76
77
@@ -101,11 +102,12 @@ Flag HIGH severity if errors use plain exceptions or dict returns instead of str
101
102
These rules apply to new or modified tool docstrings in the PR diff only -- not to pre-existing docstrings in unchanged files.
102
103
103
104
**Flag MEDIUM severity when a new or modified tool docstring:**
104
-
- Does not start with an action verb (`Returns...` should be `Get...`; valid verbs: `Get`, `List`, `Search`, `Create`, `Update`, `Delete`, `Remove`, `Execute`, `Call`)
105
+
- Does not start with an action verb (`Returns...` should be `Get...`; valid verbs: `Get`, `List`, `Search`, `Create`, `Update`, `Delete`, `Remove`, `Execute`, `Call`, `Manage`)
105
106
- Is missing entirely or is still a placeholder
106
107
- References a non-existent tool (e.g., `ha_get_domain_docs` -- the correct name is `ha_get_skill_home_assistant_best_practices`)
107
108
- Embeds a full parameter schema instead of deferring to `ha_get_skill_home_assistant_best_practices`
108
109
- Is a workflow-entry tool but gives no hint about the next natural tool to call
110
+
- Multi-line docstring does not follow the structure template: (1) what the tool does, (2) when NOT to use it with preferred alternatives, (3) when to use it, (4) caveats. See AGENTS.md "Tool Docstrings" for details.
109
111
110
112
**Do NOT flag:**
111
113
- Concise one-liners on straightforward tools (progressive disclosure: brief by default)
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
93
+
echo "::notice::Manual dispatch: unreleased feat/fix/perf commits exist on master since $LATEST_TAG. Forcing republish of $LATEST_TAG from the tag ref (master HEAD $HEAD_SHA is being ignored)."
echo "master has releasable commits since the latest stable tag \`$LATEST_TAG\` but no new tag was cut, so republishing \`$LATEST_TAG\` would be misleading." >> "$GITHUB_STEP_SUMMARY"
101
+
echo "This is expected on biweekly-gate odd weeks; the re-triggered \`workflow_run\` is being correctly ignored." >> "$GITHUB_STEP_SUMMARY"
After addressing a comment, **ALWAYS post a comment explaining the resolution, then mark the thread as resolved**:
144
+
After addressing a comment, **ALWAYS post a comment explaining the resolution, then mark the thread as resolved**.
145
+
146
+
When there are inline review comments, do **both**: reply on each inline thread *and* post a PR-level review comment summarising the changes. The inline replies document the per-thread resolution where future readers expect it; the PR-level comment gives a single summary for anyone scanning the PR timeline.
147
+
148
+
**Always resolve the inline thread after replying**, unless the reply is asking the reviewer for further clarification (in which case leave the thread open so they can respond). An unresolved thread signals "still needs attention"; don't leave resolved work in that state. Unresolved threads also **block the PR from merging even after a maintainer has approved it** — the merge button stays disabled until every thread is marked resolved.
0 commit comments