feat: add maintenance, link-health, and non-secret settings toolsets (#397) #417
<!-- codex-pull-request-review-summary -->
<!-- codex-review-state:v1 {"code_review":{"commit_sha":"c32fa39a00152b4a5d1d051140c2b9e678d1b93e","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} -->
<details>
<summary><strong>Codex Review Summary</strong>: ✅ Completed</summary>
This comment shows the latest Codex review activity on this pull request.
| Review | Status | Commit | Review trigger |
| --- | --- | --- | --- |
| 📝 Code Review | ✅ Completed <relative-time datetime="2026-11-30T07:29:04.166762Z">2026-11-30T07:29:04.166762Z</relative-time> | c32fa39 | PR opened |
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
</details>
</details>
<sub><sub>!P2 Badge</sub></sub> Merge build-time defaults into the LLM settings projection
When a deployment supplies __llm_options__ but has no stored runtime overrides, requests and the Options UI use those effective defaults through resolveProviderOptions, while this projection reports an empty model and hasApiKey: false. Consequently settings_get incorrectly describes a configured provider, and validations based on this snapshot can use different settings from the actual request. Project the merged effective options rather than only providerOptionsMap.
Useful? React with 👍 / 👎.
<!-- codex-code-review-finding:v1 -->
<sub><sub>!P2 Badge</sub></sub> Validate temperature against the target provider's model
When a built-in caller switches providers and changes temperature without also supplying model, effectiveModel comes from the currently active provider rather than the target provider's saved options. For example, switching from Gemini to a previously configured OpenAI o3 provider with {provider: "openai", enableTemperature: true} passes validation against the Gemini model and then enables an unsupported option on o3. Resolve the target provider's model before applying the compatibility check.
Useful? React with 👍 / 👎.
<!-- codex-code-review-finding:v1 -->
<sub><sub>!P2 Badge</sub></sub> Reject unavailable providers before claiming AI digest themes
When includeAiThemes is true under an allowed policy but the default hosted provider has no API key, this precondition passes because the settings are merely unlocked. useDigest.build then silently falls back to deterministic local themes, and the tool returns a successful result indistinguishable from AI-generated themes even though the requested operation never occurred. Check controller.isLlmReady() here or explicitly report that AI generation was skipped.
Useful? React with 👍 / 👎.
<!-- codex-code-review-finding:v1 -->
<!-- codex-review-receipt:v1 -->
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c32fa39a00
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
</details>
Fixed in d2d46e85088e6965dd7492c49ac0a8abc5aa8b47.
Updated projectLlmSettings in controllerMaintenanceSettings.js to merge build-time __llm_options__ via resolveProviderOptions(...) while projecting strictly non-secret fields, with unit tests verifying merged model/temperature/hasApiKey without leaking apiKey or baseUrl.
<!-- agent-bot-write: ghw_d033e15b10ceacee session=210bdd5e08f0 bot=trueline-antigravity-agent[bot] conversation_id=e99b26b3-53f9-4d7f-8337-fb33257bb240 conversation_id_source=self-reported -->
Fixed in d2d46e85088e6965dd7492c49ac0a8abc5aa8b47.
Added getLlmProviderSummary(provider) on AppController and forwarded it through useWebMcpTools's proxy so settings_llm_update validates temperature compatibility against the target provider's saved model (including build-time defaults) on provider switches without requiring model in the patch.
<!-- agent-bot-write: ghw_d033e15b10ceacee session=210bdd5e08f0 bot=trueline-antigravity-agent[bot] conversation_id=e99b26b3-53f9-4d7f-8337-fb33257bb240 conversation_id_source=self-reported -->
Fixed in d2d46e85088e6965dd7492c49ac0a8abc5aa8b47.
Added controller.isLlmReady() precondition checking inside checkDigestAiPreconditions in maintenanceHealth.js so digest_generate with includeAiThemes: true returns PROVIDER_NOT_READY instead of silently falling back to deterministic themes.
<!-- agent-bot-write: ghw_d033e15b10ceacee session=210bdd5e08f0 bot=trueline-antigravity-agent[bot] conversation_id=e99b26b3-53f9-4d7f-8337-fb33257bb240 conversation_id_source=self-reported -->
Approved these changes.
qwts
trueline-antigravity-agent[bot]
Closes #397
Part of #394
Summary
Adds the Phase 2B
maintenance.healthandsettings.managecapability toolsets (10 new tools across 2 toolsets, bringing the canonical registry to 39 tools across 8 toolsets) routed throughuseAppController's ref-backed facade with strict secret isolation, SSRF protection, untrusted-content markers, and non-destructive review staging:New Toolsets & Tools
maintenance.health(src/tools/capabilities/maintenanceHealth.js,src/tools/capabilities/maintenanceLinks.js)-
duplicates_find: detects rule-based (findDuplicatePairs) and optional semantic duplicates, opensDuplicateReviewModalwhen requested, never deletes directly, and marks title/reason outputuntrusted: true.-
links_sweep_control: inspectsstatus, triggersstartwithout blocking on completion, or callsstop(failing closed withEXECUTION_ERRORif the sweep controller is unavailable).-
links_check_single: checks a single bookmark via the service-workerCHECK_URLSSRF boundary (isPublicHttpUrl), skipsurlStatus === "ignored"unlessforce: true, and rejects private/loopback/non-HTTP(S) URLs withUNSAFE_HOST.-
links_find_archive: queries Internet Archive snapshots viauseArchiveRecovery(recoverables, paced, max 50) and optionally opensChangeReviewModal(untrusted: true), never overwriting URLs automatically.-
page_fetch_metadata: fetches page title/description/text viaFETCH_PAGE_METAinpublic/background.js, enforcesisPublicHttpUrl(UNSAFE_HOST), restricts WebMCP callers to saved bookmarkids (POLICY_DENIEDfor arbitraryurlon WebMCP), and stampsuntrusted: true.-
digest_generate: defaults to local deterministic grouping (digestSets+fallbackThemes+withRemainder,untrusted: true); requestingincludeAiThemes: trueoropenView: truerequires a policy beyondread_only(POLICY_DENIED) and an unlocked key (KEY_LOCKED).-
bookmarks_organize: checks key lock (KEY_LOCKED) and provider readiness (PROVIDER_NOT_READY), restricts suggestions strictly totags,folderId, anddescription(stripping any title diffs), and stagesChangeReviewModalwithout writing directly.settings.manage(src/tools/capabilities/settingsManage.js)-
settings_get: projects a strict non-secret allowlist (theme,availableThemes,locale,availableLocales,reduceMotion,effects,remoteFavicons,viewMode,sidebarCollapsed,activeStoreType,llm.{provider,model,enableTemperature,temperature,hasApiKey,encrypted,locked},webMcp.{available,enabled,registeredToolCount}).-
settings_update: updates non-secret appearance & layout preferences validated against installed themes/locales/VIEW_MODES, enforces a privacy ratchet blockingremoteFavicons: true(POLICY_DENIED) while allowingfalse, and blocks any denylisted or unknown setting.-
settings_llm_update: updates non-secret LLM preferences (provider,model,enableTemperature,temperature), enforces OpenAIo1/o3temperature compatibility, blocks all edits whenlocked: true(KEY_LOCKED), blocks provider switching from WebMCP (POLICY_DENIED), and blocksapiKey/baseUrl/passphrase(POLICY_DENIED).Supporting Architecture & Security Hardenings
src/tools/registry.js: checksfindDeniedArgKey(rawArgs)before schema validation so denylisted keys passed to strict-schema tools fail withERROR_CODES.POLICY_DENIEDinstead ofVALIDATION_ERROR, and registersmaintenance.healthandsettings.manage(both off by default on WebMCP).src/hooks/controllerMaintenanceSettings.js,src/hooks/useAppController.js,src/hooks/useWebMcpTools.js,src/components/BookmarkApp.jsx: clean extracted controller builders, WebMCP proxy forwarding, andBookmarkApphook wiring without touchingsrc/llm/aiVendor.js,src/hooks/useAgentEngine.js, orsrc/components/OptionsModal.jsx.DESIGN.md&.changeset/maintenance-settings-tools.md: updated canonical toolset & boundary documentation and added a minor changeset.Verification
npx eslint ... && npm run format && npm run ci </dev/null: exited0(version policy0.20.3, notices current, Prettier clean, ESLint 0 errors / 0 warnings on touched files, 125/125 Vitest test files / 1,612/1,612 tests passing including explicit secret-leak, privilege-escalation, and SSRF regression suites,build:chrome+check-chunk-laziness.mjs, andbuild:storybook).LGTMwith no blocking issues.<!-- agent-bot-write: ghw_1557007cee9e53da session=210bdd5e08f0 bot=trueline-antigravity-agent[bot] conversation_id=e99b26b3-53f9-4d7f-8337-fb33257bb240 conversation_id_source=self-reported -->