[pull] main from microsoft:main - #1610
Merged
Merged
Conversation
Move Dev Tunnels discovery and relay connections into the browser Agents window. - Builds a lazy browser-only Dev Tunnels ES module beside the sessions code. - Shares tunnel connection, gateway selection, and WebSocket-over-stream logic. - Restores the editor-versus-dedicated host choice and saves the preference. - Keeps desktop tunnel connections on the shared connector implementation. - Adds focused tests for tunnel selection, framing, cleanup, and browser discovery. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Create tunnel storage after dependency-injected services are initialized. - Avoids accessing the storage service from class field initializers. - Preserves the shared tunnel-change event exposed by both browser services. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fix lifecycle and build integration issues found during review. - Emits the Dev Tunnels module from every bundle containing the sessions web entry. - Disposes active tunnel connections when their connector shuts down. - Handles synchronous gateway-message replay without losing listener handles. - Cleans up relay resources when gateway payload parsing fails. - Adds regression tests for each cleanup and replay path. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: back terminal chat with the Agent Host Adds an experimental path that backs Terminal Chat with an Agent Host session instead of the extension host. Sessions created for throwaway UI surfaces are marked ephemeral so they are never retained or listed, and the terminal surface supplies per-turn instructions that keep answers focused on a single command. - Adds `chat.terminal.agentHost.enabled` (default off, startup experiment) to select the backend. When disabled, session creation follows the previous extension-host path exactly. - Adds `TerminalChatSessionResolver`, which applies the Agent Host preference, falls back to a local session when the Agent Host is unavailable or fails, and reports the contribution the widget must lock to. Requests then carry `agentIdSilent`, because a contributed session type is not the default agent for its location. - Adds an optional `locations` to chat session contributions, which defaults to the primary Chat surface, so a session type can serve the terminal. - Adds the `vscode.chat.ephemeralSession` metadata slot. The Agent Host tombstones such sessions at creation, omits them from the session list and the overlay summaries, and collects them after their last subscription ends. - Adds the `vscode.chat.surface` metadata slot, which carries the shell type and the operating system. `AgentSideEffects` uses it to add terminal instructions to each turn. The widget refreshes the slot when the shell type becomes known. - Replaces `AgentSessionRegistry.unregister` with `tombstone`, because the two methods did the same operation. - Shows the widget immediately and waits for the session only before a request is sent, so the Agent Host round trip does not delay the terminal chat display. (Commit message generated by Copilot) * chat: clean up ephemeral session lifecycle - Clear pending session markers after backend materialization or model abandonment. - Remove ephemeral registry tombstones after successful session teardown. - Add regression coverage for both lifecycle paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: enable built-in GitHub MCP servers Enable the official GitHub MCP server in each built-in Agent Host provider. - Enable the Copilot runtime server for sessions that use a session token. - Add a shared Agent Host setting that defaults the GitHub MCP server to enabled. - Configure Claude and Codex with the authenticated endpoint and selected tool set. - Keep web search available and omit tools that the installed gh CLI can replace. - Apply the existing scoped customization enablement decisions before provider launch. - Hide the duplicate Copilot Chat GitHub collection from Agent Host customization views. - Add focused provider, configuration, synchronization, and UI tests. Fixes #331392 (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: update GitHub MCP test narrowing Use the MCP transport discriminator after merging the latest SDK typings. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: harden GitHub MCP endpoint handling Address review feedback for GitHub MCP authentication and remote hosts. - Omit servers when account endpoint discovery does not return a trusted host. - Let provider MCP authentication flows supply credentials after a challenge. - Preserve the client GitHub server for remote hosts without a negotiated capability. - Clear Codex GitHub MCP credentials when the configured endpoint changes. - Add regression coverage for endpoint discovery, remote compatibility, and cache invalidation. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: defer GitHub MCP authentication Use each provider's normal MCP authentication flow for GitHub servers. - Use the Copilot token only to discover the account-specific MCP endpoint. - Do not include an authorization header in the initial MCP configuration. - Fail closed when endpoint discovery cannot resolve a trusted host. - Clear Codex endpoint state when GitHub host configuration changes. - Preserve client GitHub MCP synchronization for older remote hosts. - Complete Codex test fixtures and cover the endpoint and authentication behavior. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * tests * agentHost: stub GitHub MCP in E2E replay Keep GitHub MCP bootstrap and OAuth discovery out of model replay fixtures. - Return unavailable responses for GitHub MCP bootstrap endpoints. - Stub the follow-up OAuth metadata probes used by Codex. - Document the ancillary endpoints in the E2E replay architecture. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: scope Copilot customization assertions Exclude the runtime-owned GitHub MCP entry from integration assertions that cover workspace, user, and plugin customizations. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: close GitHub MCP launch gaps Apply GitHub MCP enablement and authentication state before provider launch. - Disable the Copilot built-in before startup when scoped enablement says it is off. - Guard Codex authentication and endpoint resolution with a generation counter. - Suppress Codex built-in injection when an enabled alias uses the same endpoint. - Add focused launch, race, and alias regression tests. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: initialize MCP enablement before launch Resolve the built-in GitHub MCP decision only after session enablement initialization. - Await launch and refresh decisions at every Copilot session creation path. - Keep general Copilot tests on the permissive enablement fixture. - Preserve the pending fixture only for the host-snapshot enablement test. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: align provider authentication fixtures Align launch and integration fixtures with provider authentication contracts. - Initialize Copilot customization enablement before launch and refresh decisions. - Use permissive enablement in general Copilot tests and pending state only where tested. - Authenticate restarted and runtime-enabled Codex providers with the Copilot resource. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: gate Codex restart replay on Windows Track the Windows-only Codex provider-context restart timeout as a known E2E issue. - Skip only the Codex Windows persistence variant by default. - Preserve macOS and Linux coverage. - Allow focused reproduction through AGENT_HOST_RUN_KNOWN_ISSUES. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: gate Codex restart replay Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: await Codex before integration auth Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Render evidence chapters from the automation harness Record when video recording starts so captured step timestamps can be expressed as offsets into the recording, and add a script that composes step chapter cards onto a finished run. This lets a clean capture be annotated afterwards instead of drawing a banner into the window under test, and gives local runs and CI one shared implementation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: adb443eb-11e5-40a1-8608-7f593fa79485 * Write the chapter renderer in TypeScript Hygiene rejects new JavaScript files, so move the renderer into the compiled MCP sources and invoke it from out/ instead of adding an eslint-allowed-javascript-files exception. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: adb443eb-11e5-40a1-8608-7f593fa79485 * Address review of evidence chaptering Sample the recording origin at page creation instead of context or application creation, state the residual imprecision in the contract, render manifest text literally, point the report at the annotated recording, and refuse multi-window runs rather than chaptering onto only the first recording. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: adb443eb-11e5-40a1-8608-7f593fa79485 --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: adb443eb-11e5-40a1-8608-7f593fa79485
…ipt (#328557) import.meta.resolve(...).replace('file://', '') is not a correct way to convert a file:// URL to a filesystem path. It always breaks on Windows (leaves a leading slash before the drive letter, e.g. /C:/Users/..., which downstream path.join/fs calls mangle into C:\C:\Users\...), and it also breaks on any OS whenever the resolved path contains a character that gets percent-encoded in a URL, most commonly a space (e.g. file:///home/jane%20doe/... never gets decoded back to "jane doe", so fs.readFileSync fails with ENOENT there too). Use fileURLToPath() from node:url instead, which is Node's own built-in, spec-correct URL-to-path converter and handles both cases.
* Initial plan * fix: polish external session banner picker Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com> * fix: preserve accessible select navigation Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com>
Let Custom Endpoint Responses implementations apply their own storage default when zero data retention is not configured. Keep explicit ZDR requests stateless and preserve ordinary OpenAI BYOK behavior. Fixes #331636 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
workbench: coalesce composite bar layout updates Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…1669) Agent Merge only ran while a client had the session open and subscribed, so enabling it and then navigating away silently stopped the repair/merge work until the session was reopened. The Agent Host now keeps an enabled session resident on its own: - `AgentMergeController` owns a hold on the sessions it monitors, maintained eagerly at its own state transitions and exposed as `holdsSession()`. `AgentService` skips idle eviction and empty-session GC for a held session and re-arms the release when `onDidReleaseHold` reports the hold ended, so disable/archive/terminal states go back to normal eviction. - Enablement is mirrored into an index of session URIs in the orchestrator database, so startup finds the few monitored sessions with one query plus a single-row registry lookup each instead of opening every session database. Enable, disable, archive and delete all maintain it; delete clears it in the same transaction that removes the session, and stale entries self-heal. - Provider registration (and turning the feature on) restores the indexed sessions, so monitoring resumes after a host restart and for a session never opened in this client. The index is a derived pointer only: enablement and all host-owned target state are still read from session config, and `agentMerge.controller` remains blocked from client writes. Adds regression tests for staying resident after the last unsubscribe, resuming on a fresh host and being released once disabled, and index cleanup on archive and delete. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ix-prioritization-37e6feba Fix BYOK utility model cancellation error logging
Cover the explicit false state so Custom Endpoint Responses requests continue sending store true and reusing previous_response_id. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
agentHost: harden session catalog migration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: enable single-pane layout by default Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: document phone layout exception Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…itService` (#331644) * Agents - create session from pull request should not leverage the `IGitService` * Pull request feedback
The A/A assignment read is no longer needed now that the experiment has been completed. Drop the BlockStartup contribution, unit test, and treatment constant. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* cli: recover stale tunnel port protocols Handles stale tunnel ports whose immutable protocol does not match the requested forwarding mode. - Matches the structured HTTP response instead of the formatted error message. - Removes the stale port and retries registration for the legacy Node tunnel path. - Adds the linkPresentationProviders extension point. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * cli: fix tunnel protocol conflict detection Uses the formatted TunnelError detail because the pinned dev-tunnels revision does not expose the inner HTTP error as a source. - Matches the production error shape used by relay port registration. - Removes the synthetic source wrapper from the regression test. - Documents the SDK limitation and legacy Node tunnel scope. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tore-fix byok: omit store for custom Responses endpoints
* add mcp server key as description * avoiding duplicate text Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Drew Skwiers-Koballa <drskwier@microsoft.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
…el-agents sessions: connect to agent hosts through browser tunnels
* Add patchBased02AggressionHighLow * Make eagerness part of prompt strategy for diffpatch prompt * Explicitly gate isAggressionPromptingStrategy behind prompt strategy and eagerness option * Remove accidental deletion * Properly rename function * Refactor patch-based postscript scoping Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Fix PatchBased02 eagerness prompt Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Ulugbek Abdullaev <ulugbekna@gmail.com>
* Apply multi-diff options before attaching models ## Summary - apply per-document editor options before attaching a multi-diff model - prevent initial model construction from falling back to stale environment accessibility detection - add regression coverage for option ordering and effective accessibility support ## Testing - npm run eslint -- src/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.ts src/vs/editor/test/browser/widget/multiDiffEditorWidget.test.ts - ./scripts/test.sh --run src/vs/editor/test/browser/widget/multiDiffEditorWidget.test.ts --run src/vs/editor/test/browser/widget/diffEditorWidget.test.ts --run src/vs/workbench/contrib/multiDiffEditor/test/browser/multiDiffEditorInput.test.ts (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Make multi-diff test storage-independent Register an in-memory storage service so editor contributions do not depend on test execution order. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agents window: fix sessions list progress * expose summary returned from listSessions * agentHost: handle repeated session listings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * address comments --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
#331696) In a multi-root workspace, when two folders each contribute a standalone skill or agent with the same name, first-name-wins discovery keeps the primary folder's copy and drops the other. The Claude SDK/CLI exposes standalone entries by name only, so the shadowed copy is unreachable by name and was previously dropped with no diagnostic. Add an optional `onShadowed` callback to `selectFirstClaudeCustomizationByKey` and use it in the multi-root discovery path to log a warning naming the dropped customization, its source URI, and the winning copy. Discovery output is unchanged; same-named user-scope copies remain ordinary precedence and are not logged. Refs #331508 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chat: prevent duplicate remote Agent Host queue sends Classify server-managed queues using the registered Agent Host provider metadata so remote sessions are not dequeued by both the client and host. Add regression coverage for remote queues.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Revert chat quota trajectory nudge Remove the Chat Quota Trajectory Nudge after shipping control by stopping the Public and Insiders ExP stages. This drops the feature from #320683 and the billing-period fix from #325895. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Remove unused ChatInputNotificationSeverity import Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Agent Host changes for osortega/agents/show-new-worktree-checkbox
* sessions: add Sandbox option for new cloud sessions
Adds a "Sandbox" checkbox beside the cloud session config, shown when
`chat.agentHost.cloudSandbox.enabled` is on. When checked, sending the
first message provisions a GitHub-managed sandbox and drives it over the
Agent Host Protocol relay instead of using the server-run cloud agent.
Creation is the same `POST /agents/tasks` as a regular cloud task plus
`environment_id: "github-sandbox"` — a sentinel that asks Mission Control
to provision a fresh VM. The concrete environment comes back on the
created session and is the only id the relay can address.
From the seed onward, provisioning reuses the discovery path
(`_ensureProvider` -> `seedSessions` -> `connect`), so a created task is
just a discovered one we happen to know about first and a later discovery
pass reconciles with it instead of duplicating it. Mission Control starts
no run for environment-bound tasks, so the first turn is dispatched by
the client.
Also extracts the checkbox chip that was inline in BranchPicker into a
shared CheckboxChip, now used by both the worktree and sandbox chips.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: derive sandbox repo NWO without the workspace ref
A browsed GitHub workspace root carries a ref (`/<owner>/<repo>/HEAD`,
see `_browseForRepo`), so stripping only the leading slash produced
`owner/repo/HEAD`. `parseNwo` then split on the first separator and sent
`{owner, name: "repo/HEAD"}` to Mission Control — an invalid repository.
Reuse the existing `githubRemoteRepoLabel`, which already takes the first
two path segments for exactly this reason, instead of a second derivation
that got it wrong. The tests now use realistic `/HEAD` workspace roots.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: page sandbox discovery and drop dead baseRef
Discovery read a single page of 100 tasks but reported the scan as
`complete`, which is what authorizes negative reconciliation. On an
account with more tasks than that, sandbox sessions outside the window
looked deleted and were torn down.
Page through the task list up to a bounded ceiling, and report `partial`
whenever the scan was cut short — by the ceiling, a failed later page, or
cancellation — so callers keep existing sessions instead of reconciling
against a list that was never authoritative.
Also remove `baseRef`, which no production caller set, and flag that
`isCloudSandboxTask` requires both the agent slug and the compute
provider: the expected slug migration would silently return zero
sessions, so that must be resolved before the setting is enabled.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: trim cloud sandbox comments
The comments had grown into design notes, recording why decisions were
made and how the subsystem fits together rather than what the code does.
Cut them back to what is not visible from the code itself, keeping the
notes that describe real traps: that a dormant environment reads
`offline` whether or not it can wake, and that registering a second
content provider for one session type throws.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: detect further task pages from the Link header
Discovery inferred the end of the task list from a short page, but
Mission Control can return fewer rows than requested and still advertise
`rel="next"` — page 3 of a real account returns 99 of 100 with a next
link. That page count also made an exact multiple of the page size look
truncated, pinning the result to `partial` and permanently suppressing
reconciliation.
Read the `Link` header instead, which states outright whether another
page exists. Matches how dotcom's agent-sessions client paginates the
same endpoint.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…31712) Two GraphQL documents selected fields that do not exist in GitHub's schema, so both requests failed at validation time before executing. PullRequest.viewerCanMerge does not exist. Merge permission is now derived from Repository.viewerPermission (ADMIN/MAINTAIN/WRITE grant push access). It fails closed when the field is null, which GitHub returns for GitHub App authentication, matching the existing REST fallback. rateLimit exists only on the Query root, but all four pull request mutations selected it at the Mutation root, so every Agent Merge write failed. Rate limits are still tracked from the x-ratelimit-* response headers in GitHubTransport, so no telemetry is lost. Note agentHostOctoKitService.ts already had the correct form; the two copies had drifted. Verified by validating every GraphQL document in the repository against the live schema via introspection; the remaining 29 documents were already valid. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: resolve state files through host Move Agent Host state-file discovery behind the owning provider and AHP connection so clients no longer infer Copilot SDK paths from session URIs. Rename the command to Open Agent Host State File while preserving its existing IDs.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: address review feedback Move the remote state-file tests to suite scope so Mocha executes them, and correct the command JSDoc service reference.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: update state-file test guard Use the shared resource editor input guard after merging current main. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )