Skip to content

feat(settings): add external agent setup UI - #6628

Merged
M4n5ter merged 3 commits into
rust-previewfrom
feat/external-agent-settings-ui
Nov 4, 2026
Merged

M4n5ter merged 3 commits into
rust-previewfrom
feat/external-agent-settings-ui

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Nov 4, 2026

Copy link
Copy Markdown
Member

Summary

Completes the user-facing setup path for the source-aware OAR integration in #6617.

  • Add Settings → External agents, linked directly from the model picker. No deployment-file editing is needed.
  • Require an initially unchecked, explicit permissions acknowledgement before enabling. Cancelling does not change source or start a worker.
  • Update the conversation Agent and WorkHub coordinator atomically through configureBatch, preserving custom executable/arguments when disabled. Refresh the authoritative UI bindings before reading the newly configured services.
  • Display installation, native authentication and model-discovery status independently, retaining not-installed, unauthenticated, unsupported, unknown and error states. Listing models is not treated as evidence of authentication.
  • Show OAR's installation plan before a separate Install confirmation. Recover an interrupted operation through its original receipt rather than reinstalling.
  • Keep the persistent model button to model · effort; retain provider/source details in its tooltip and in the picker where they disambiguate choices.
  • Cover the workflow with real Host + NSH input/viewport tests and register the embedded worker fixture with the shared CI input router.

Verification

Passed locally:

  • Real Host/NSH UI: 3/3 workflows, using physical input and scrolling. They cover consent/cancel, one-revision dual-target enable/disable, all fixture runtime states, native-login refresh, non-default vendor effort selection, the compact model button, installation confirmation, and recovery of the exact original installation receipt with confirmed cleanup and one installation.
  • Relevant Agent API/native and manager behavior: 27/27, including OAR history, attachments, persistence, cancellation and batch/CAS/rollback behavior.
  • OAR worker + CI routing: 33/33 JavaScript tests.
  • Workbench connection/login and model-selection behavior: 17/17 JavaScript tests.
  • Generated SDK declarations, SDK acceptance typecheck and final product typecheck.
  • Shared check format, check notices, check licenses, and git diff --check.

UI evidence (real Host and the shared NSH UI, not source-text assertions):

cargo nextest run --locked --no-fail-fast -p maka-cli --test integration \
  -E 'test(terminal::external_agents::)'

PASS external_agents_ui_installation_requires_a_plan_and_explicit_confirmation
PASS external_agents_ui_recovers_the_original_install_receipt_without_reinstalling
PASS external_agents_ui_consent_updates_both_sources_and_preserves_native_selection
Summary: 3 tests run: 3 passed

The fixture isolates vendor processes and installation effects in a temporary directory. It does not log in to vendors or run a real vendor installer. Desktop capture and the full cross-platform matrix were not run locally; remote CI results are separate.

Permissions and operation ownership

External agents use their own tools, existing accounts and default permission model, potentially outside the Maka session sandbox. The confirmation says so explicitly. Ordinary plugin, Code Mode and Computer Use boundaries are unchanged. Maka retains execution, queue, receipt and cleanup ownership. Native vendor login remains the login path; this adds status/refresh, not credential migration or a login shim. Existing explicit OAR configurations remain enabled by default; disabling preserves launch settings and does not uninstall or sign out.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Maka, including GPT-6-Astra high delegated implementation and independent advice, implemented and tested this change. The commit carries Generated-by: Maka.

Checklist

  • Tests cover the change and fail without it
  • Format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

Add explicit external-agent permission confirmation, atomic conversation and coordinator configuration, installation and native authentication status, and plan-first installation with original receipt recovery. Link the model picker to settings and keep provider names in its tooltip instead of the persistent model button.

Generated-by: Maka

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.

This is a focused review of the product typecheck failure at abab53b41d1eccbf2e9deec15432905c867c734a, not a complete review of all 44 changed files.

P2: the new UI imports AgentExternalRuntime and AgentExternalAgents from the generated runtime module, but that module exports neither. The new Rust types have those schema names in plugins/agent/api/src/oar.rs; the generator catalog still registers only the existing OAR setup roots, alongside the unrelated new configure-batch root. The missing generated export contract is detailed inline.

I checked the actual imports, the complete generated runtime export set, the Rust schema declarations and the catalog increment. In CI 41815187944, product job 126524119445 runs fresh UI declarations and tsc, then reports TS2305 for both names (plus dependent typing errors) and exits with code 1. This is a failure introduced by the new UI's imports, separate from the inherited #6617 composer fixture failures.

All three newly added external-agent UI workflows also fail in this run while waiting at external_agents.rs:91; I read their failed job logs, but have not independently determined their runtime cause. Those failures cannot be treated as evidence that consent, installation confirmation or original-receipt recovery has passed remotely. The author's local results remain the author's evidence.

Please export/register the required schema types, regenerate the SDK, and rerun the product check and affected UI cases. The actual Git merge against rust-preview at a08d327f19a0afd17dbe4c941123c06b4a46d871 succeeds. I did not rerun the full product compiler locally, execute vendor login/installers, or finish the broader consent/batch/recovery/permission review.


Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.


import { inputAction, Scroll, Text, View } from 'nsh';
import { Button } from 'nsh/base';
import type { AgentExternalRuntime } from '../../../../packages/plugin-sdk/src/generated/runtime';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Make the new external-agent types part of the generated runtime contract before importing them.

packages/plugin-sdk/src/generated/runtime.ts exports neither AgentExternalRuntime nor AgentExternalAgents; externalAgentSettingsState.ts:21–24 also imports both. They are named by the new Rust oar::RuntimeRecord/oar::ExternalAgents schema declarations, but are absent from the runtime generator's catalog roots. The exact-head product job generates declarations and then fails tsc with TS2305 at these imports. Register/export the necessary schema roots and regenerate the SDK, or import an actual exported contract, then verify the same product check passes. This is independent of the existing composer fixture CI problem.


Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

…fixtures

Register the external agent status roots in the SDK schema catalog, use a provably appended configuration path, and migrate completion fixtures to source-aware backend identities and lookup payloads. Verify the actual UI typecheck in the shared contracts suite.

Generated-by: Maka
Temporarily expose the existing readiness snapshots and refresh stages in debug builds to diagnose the Linux-only CI activation wait. No timeout, lifecycle or release behavior is changed.

Generated-by: Maka
@M4n5ter

M4n5ter commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

Maka follow-up: fixed the missing exported SDK status roots and migrated the stale completion fixtures in ee649ca. The shared contracts suite (including the separate real UI TypeScript project), the full product suite, and both completion UI tests now pass locally. The three external-agent UI tests still pass on macOS; their Linux CI refresh wait remains under investigation. 71e2fab adds temporary debug-only readiness/refresh observations to get the actual lifecycle evidence from the independent runner; it does not extend timeouts or change lifecycle behavior. I will remove those temporary observations once the cause is identified. There are currently no submitted reviews or inline review comments on this PR.

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.

I reviewed all eight files in the increment from abab53b4 to 71e2fab70ea27ee8822867e1bad1d3506f742534. The missing-export P2 reported on the previous head has been repaired in the source. This is a focused increment review; the full 44-file external-agent feature review is still outstanding.

The generator now includes oar::ExternalAgentsRead and oar::ExternalAgents as catalog roots, the regenerated runtime module exports AgentExternalRuntime and AgentExternalAgents, and the methods module uses those runtime contracts. This addresses the specific TS2305 cause in my previous review. The tuple-path change also removes the reported spread cast. I did not rerun the full product compiler locally.

The terminal-shell component fixture now provides a tagged kind: 'model' backend, uses sourceName, and destructures the skills callback's backend. I ran three controlled checks with the actual new fixture backend and the actual production model-selection functions (only the locale adapter was substituted): the model tag, matching route and displayed Fixture model · Original route caption all passed. This addresses the specific untagged-fixture cause previously observed in #6617; it does not establish that every native UI sequence passes. The added wait before selecting a skill and the debug-only readiness/refresh logs likewise need hosted execution.

CI 41826958385 is still running at publication. The three external-agent UI failures on the previous head have not yet been cleared by a completed current-head result. I found no new confirmed P0–P2 in this eight-file increment. The actual Git merge with rust-preview at a08d327f19a0afd17dbe4c941123c06b4a46d871 succeeds. These source repairs are not yet merged into that shared branch, whose existing failing run therefore remains a separate current fact. I did not run a native desktop, vendor installers/login, or complete the broader consent, batching, recovery and permission review.


Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

@M4n5ter
M4n5ter merged commit a5c2753 into rust-preview Nov 4, 2026
17 checks passed
@M4n5ter
M4n5ter deleted the feat/external-agent-settings-ui branch November 4, 2026 12:29

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.

The pending checks in my previous follow-up have now completed for 71e2fab70ea27ee8822867e1bad1d3506f742534. The product typecheck and the two old composer-fixture regressions pass; the new external-agent UI checks are not all passing.

In CI 41826958385, the product job succeeds. The actual logs also show the native skill-chip test passing in 1.934 seconds and slash/workspace-reference test in 2.048 seconds. These close the observed missing-export and old untagged-fixture failures. Original-install-receipt recovery passes in this run (44.367 seconds), but consent/dual-source selection and installation-confirmation workflows both fail waiting at external_agents.rs:91.

This PR has now merged as a5c275300e6bef68116fff87a391e2323cde3f12. On the later shared branch at 89e7dcdaf070566f511f4b8d99239b9a944d2993, CI 41833327706 fails all three external-agent workflows at that same wait, including receipt recovery. The readiness diagnostics contain a desired deployment without an effective deployment; they do not establish why activation or the UI wait is not completing. I have not separated a product activation problem from test-driver/scheduling behavior. Please investigate this exact failing workflow rather than treating the successful product build as UI acceptance.

My earlier follow-up retained the old 44-file count: the final merged PR has 48 changed files. My review remains limited to the generated-type repair, fixture migration, the controlled selection-function checks already described, and these hosted results. I have not completed the full consent/configuration/installation/permission review, run vendor installers/login, or reproduced the native UI locally. The earlier missing-export P2 is repaired; these unresolved UI failures are a separate finding requiring diagnosis.


Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

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.

2 participants