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
Ship the documentation that lets an LLM (or a human) author a valid agent manifest and start an agent session for the [remote-copilot-sdk] topology described by the split set: a local router + persistence on the source, a remote CopilotSdkChatClient on a user-computer-profile reached over the reverse transport, and a split executor topology where workspace-gui / workspace-entity / source-targeted agent-session / current-session tools execute LOCAL on the source while all other tools (plus the Copilot SDK's built-in tools) execute REMOTE on the SDK's user-computer-profile.
Concretely this bug delivers:
A new example manifest (docs/examples/github-copilot-remote-chat.json) that demonstrates every field an LLM needs to emit for this topology.
A dedicated section in the manifest reference (documentation/agent-options-providers.md — the github-copilot and BYOK openai / azure-openai entries) documenting remote hosting: how host-profile-entity-id on the resulting agent-session entity targets a user-computer-profile, and how TrustProfile.HostingWorkspacesClientInstances / TrustProfile.DefaultExecutionTarget + ExecutorTopology express the local/remote split.
Cross-links from the design doc referenced by the master (docs/design/remote-chat-client-session.md) and the existing github-copilot-provider-support.md, session-context-tools.md, and llm-trust-profile.md.
An entry in docs/examples/README.md for the new example.
A test that the new example manifest loads (extending ExampleAgentDefinitionsTests).
The acceptance target is: given only the docs listed here, an LLM can emit a valid manifest for the remote Copilot SDK topology, know which fields select the remote user-computer-profile, know that its workspace-gui / workspace-entity / source-targeted agent-session tool calls will run on the source, and know that its github-copilot (or openai / azure-openai BYOK) chat client + built-in shell tool will run on the remote profile.
Investigation (paths cited relative to features/):
Existing surfaces the manifest already covers:
docs/examples/github-copilot-chat.json — the only existing github-copilot example, but it is single-machine (no remote-hosting fields). No example demonstrates remote hosting or the split tool topology.
docs/examples/README.md — enumerates every current example; has no entry for a remote-hosting variant.
Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-options-overview.md — the top-level index. Does not mention remote hosting or host-profile-entity-id selection.
Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-options-providers.md — documents github-copilot and BYOK openai / azure-openai (CopilotSdkChatClient). No mention of remote hosting or how the SDK's built-in tools land on the remote profile.
Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-options-tools.md — documents tool kinds. Does not describe the local/remote split of tool execution.
Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-options-connections.md — documents CopilotByokOptions connection fields for BYOK.
Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-options-parameters.md — documents working-directory and notes the future trust-profile parameter. Needs to describe how the trust-profile parameter (with HostingWorkspacesClientInstances on the resolved llm-trust-profile) selects the remote host.
Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-configuration.md — already documents host-profile-entity-id on agent-session as "Entity ID of the user-computer-profile hosting this session" (see also Phantom.Workspaces.Data.Core/JsonSchemas/agent-session.json:24). Needs a remote-hosting worked example.
docs/design/github-copilot-provider-support.md — the design for the github-copilot provider (CopilotSdkChatClient). No cross-link yet to remote-chat-client-session or the split topology.
docs/design/session-context-tools.md:28-31, 99-103, 200-206 — already correctly documents that host-profile-entity-id records where the session was last hosted but is not the source of truth for the current run; the live host's profile/user is used. This is directly relevant to the doc-set and must be cross-linked.
docs/design/llm-trust-profile.md — currently only a stub. Needs (or must cross-link to) documentation of TrustProfile.HostingWorkspacesClientInstances (Phantom.Workspaces.Llm.Core/Trust/TrustProfile.cs:99, 137) and TrustProfile.DefaultExecutionTarget (ibid. lines 105, 143).
What is missing (this bug):
No example manifest exists under docs/examples/ that demonstrates the remote Copilot SDK topology (github-copilot provider + a remote user-computer-profile execution target + the split tool set). This is the single biggest gap for the LLM authoring path.
agent-options-providers.md has no "Remote hosting" subsection for github-copilot / BYOK explaining that (a) the resulting agent-session records host-profile-entity-id = the remote user-computer-profile entity id, (b) the SDK's built-in tools (shell, filesystem) execute on that remote host, and (c) the CLI process and Copilot session id live on the remote host while persistence stays on the source.
agent-options-tools.md has no description of the split executor topology: which tool kinds are ExecutorTarget.GuiLocal (workspace-gui, workspace-entity), which are ExecutorTarget.HostingInstance (source-targeted agent-session / current-session), and which are ExecutorTarget.AgentExecutor (all other tools + SDK built-ins). Cite Phantom.Workspaces.Llm.Core/Transport/ExecutorTarget.cs:9-28 and Phantom.Workspaces.Llm.Core/Transport/ExecutorTopology.cs:10-44.
agent-options-parameters.md needs to describe the interaction between the (future) trust-profile parameter and remote hosting: the resolved TrustProfile.HostingWorkspacesClientInstances list constrains which user-computer-profiles the session may be hosted on; TrustProfile.DefaultExecutionTarget supplies the connection descriptor when the manifest does not override it.
docs/examples/README.md needs a section describing the new example (matching the style of the existing github-models-chat-with-mongodb.json write-up).
documentation/agent-configuration.md — extend the agent-session schema section (currently only single-machine example) with a remote-hosting worked example showing host-profile-entity-id pointing at a remote user-computer-profile entity id, plus a note that agent-definition-reference still resolves against the source workspace so the same manifest reconstructs the session on resume.
Code fields the docs must cover (with paths):
Provider strings github-copilot, openai, azure-openai — dispatched in Phantom.Workspaces.Llm.Core/AgentFactory.cs.
Phantom.Workspaces.Llm.Core/CopilotByokOptions.cs:16-30 (Provider, BaseUrl, ApiKey) — BYOK connection fields already documented in agent-options-connections.md but must be cross-linked from the remote-hosting section.
Phantom.Workspaces.Llm.Core/Trust/TrustProfile.cs:99, 105, 137, 143 — HostingWorkspacesClientInstances, DefaultExecutionTarget. Also the sentinels TrustProfile.LocalClientInstance (".") and TrustProfile.WildcardClientInstance ("*").
Phantom.Workspaces.Llm.Core/Transport/ExecutorTarget.cs:9-28 (AgentExecutor / GuiLocal / HostingInstance) and Phantom.Workspaces.Llm.Core/Transport/ExecutorTopology.cs:10-44 (mapping to client instances).
Phantom.Workspaces.Data.Core/JsonSchemas/agent-session.json:24-27 — host-profile-entity-id (uuid of user-computer-profile).
Referencing a user-computer-profile by entity id — see documentation/user-computer-profile-schema.md.
Add a "Remote hosting" subsection under github-copilot (and by reference under openai / azure-openai) covering host-profile-entity-id selection, split executor topology summary, and a link to the example.
Add a "Execution target of tool kinds" table mapping each tool kind to ExecutorTarget and, in a remote-hosted session, to source-local vs. remote-host.
Expand the trust-profile (future) entry with HostingWorkspacesClientInstances / DefaultExecutionTarget semantics and how the manifest opts into remote hosting.
The new features/docs/examples/github-copilot-remote-chat.json demonstrates every field an LLM needs to emit. Sketch:
{
"kind": "prompt",
"name": "github-copilot-remote-chat",
"displayName": "GitHub Copilot Chat (remote host)",
"description": "GitHub Copilot SDK chat client hosted on a remote user-computer-profile; router and persistence stay on the source.",
"model": {
"id": "gpt-5",
"provider": "github-copilot",
"connection": {
"kind": "key",
"apiKey": "${GITHUB_TOKEN}"
},
"options": {
"working-directory": "${working-directory}"
}
},
"instructions": "You are a helpful assistant running on a remote Phantom.Workspaces user-computer-profile. The router and persistence live on the source instance; your built-in shell tool runs here.",
"parameters": {
"properties": [
{
"name": "working-directory",
"kind": "string",
"description": "Working directory the Copilot CLI uses on the remote host.",
"required": true
},
{
"name": "trust-profile",
"kind": "string",
"description": "Name of an llm-trust-profile whose HostingWorkspacesClientInstances lists the remote user-computer-profile.",
"required": true
}
]
},
"tools": [
{ "kind": "workspace-gui" },
{ "kind": "workspace-entity" },
{ "kind": "current-session" },
{ "kind": "filesystem" },
{ "kind": "github-cli-builtin-tools" }
],
"metadata": {
"version": "1.0",
"tags": ["github-copilot", "copilot-sdk", "remote", "split-executor"],
"prerequisites": [
"The remote user-computer-profile is enrolled and reachable via the reverse-tunnel transport.",
"An llm-trust-profile exists whose HostingWorkspacesClientInstances contains the remote profile entity id.",
"GITHUB_TOKEN with Copilot access is available on the remote host (or the remote user is signed in to the Copilot CLI)."
]
}
}
The example intentionally uses parameters (not literal values) for both working-directory and trust-profile so the Launchpad UI collects them. The trust-profile parameter is what selects the remote user-computer-profile: the resolved TrustProfile.HostingWorkspacesClientInstances names the remote instance, and TrustProfile.DefaultExecutionTarget supplies the connection descriptor. The agent-session entity written at launch records host-profile-entity-id = that remote profile's entity id (per agent-configuration.md and agent-session.json:24).
Documentation outline (structure of the new subsections)
agent-options-providers.md, new "Remote hosting" subsection under github-copilot:
How a session becomes remote-hosted. The trust-profile parameter resolves an llm-trust-profile whose HostingWorkspacesClientInstances names a non-"." client instance. AgentFactory records the selected host on the agent-session entity's host-profile-entity-id. On session resume, the router reads that field and forwards the chat client to the remote instance.
BYOK variant.openai / azure-openai follow the same rules; the BYOK CopilotByokOptions fields (Provider, BaseUrl, ApiKey) come from the model connection and are honored on the remote host.
Cross-links to docs/design/remote-chat-client-session.md, session-context-tools.md, agent-options-tools.md#execution-target-of-tool-kinds, and documentation/agent-configuration.md.
agent-options-tools.md, new "Execution target of tool kinds" section:
remote profile in a remote-hosted session; source in single-machine
Copilot SDK built-in tools (shell, etc.)
(SDK self-invokes)
wherever CopilotSdkChatClient runs → remote in a remote-hosted session
agent-options-parameters.md, expand the trust-profile entry: (a) resolves an llm-trust-profile entity by name, (b) HostingWorkspacesClientInstances selects the remote host — "." = source, "*" = any (per TrustProfile.cs:131-134), any other value = a remote client instance id, (c) DefaultExecutionTarget supplies the connection descriptor used to reach the remote instance.
Cross-linking plan
docs/design/github-copilot-provider-support.md gets a new "Remote hosting" subsection linking to docs/design/remote-chat-client-session.md.
docs/design/llm-trust-profile.md gets a short "Hosting client instances" subsection linking to the same design.
docs/design/session-context-tools.md already covers the "host follows the current run, not the persisted host-profile-entity-id" rule; add a cross-link from remote-chat-client-session.md.
The example manifest's README entry links back to the two documentation entities (agent-options-providers, agent-options-tools).
Expected Tests
Documentation is not unit-tested per line, but the example manifest is machine-validated by the existing example-manifest test class Phantom.Workspaces.Llm.Core.Tests/ExampleAgentDefinitionsTests.cs (which today already contains LoadGithubCopilotChat_ValidatesSuccessfully at line 184, calling AgentDefinitionLoader.LoadAgentFromJson on the embedded resource). We extend it — we do not propose a new test class.
Test (extend ExampleAgentDefinitionsTests)
Purpose
LoadGithubCopilotRemoteChat_ValidatesSuccessfully
Loads the new github-copilot-remote-chat.json embedded resource via AgentDefinitionLoader.LoadAgentFromJson; asserts model.provider == "github-copilot", the working-directory and trust-profile parameters exist and are required, and the tools list contains at least one GuiLocal tool kind (workspace-gui) and at least one AgentExecutor tool kind. Matches the shape of LoadGithubCopilotChat_ValidatesSuccessfully.
Also requires Phantom.Workspaces.Llm.Core.Tests.csproj to add an <EmbeddedResource Include="..\docs\examples\github-copilot-remote-chat.json" ... /> entry alongside the existing example resources (lines 39-45).
Documentation acceptance checklist (verifiable by reading the merged docs)
docs/examples/github-copilot-remote-chat.json exists and is added as an embedded resource in Phantom.Workspaces.Llm.Core.Tests.csproj.
docs/examples/README.md has a section describing the new example (prerequisites, behavior, split tool topology).
documentation/agent-options-providers.md has a "Remote hosting" subsection under github-copilot covering host-profile-entity-id, the local/remote split table, and BYOK.
documentation/agent-options-tools.md has an "Execution target of tool kinds" table covering all current tool kinds.
documentation/agent-options-parameters.md's trust-profile entry documents HostingWorkspacesClientInstances and DefaultExecutionTarget.
documentation/agent-options-overview.md links to the new remote-hosting section.
documentation/agent-configuration.md includes a remote-hosting worked example for agent-session.
docs/design/remote-chat-client-session.md exists (or is committed here) and is cross-linked from github-copilot-provider-support.md, llm-trust-profile.md, and session-context-tools.md.
Every mention of the split topology cites ExecutorTarget / ExecutorTopology by path so future readers can find the code.
Part of #1313
Summary
Ship the documentation that lets an LLM (or a human) author a valid agent manifest and start an agent session for the
[remote-copilot-sdk]topology described by the split set: a local router + persistence on the source, a remoteCopilotSdkChatClienton a user-computer-profile reached over the reverse transport, and a split executor topology whereworkspace-gui/workspace-entity/ source-targetedagent-session/current-sessiontools execute LOCAL on the source while all other tools (plus the Copilot SDK's built-in tools) execute REMOTE on the SDK's user-computer-profile.Concretely this bug delivers:
docs/examples/github-copilot-remote-chat.json) that demonstrates every field an LLM needs to emit for this topology.documentation/agent-options-providers.md— thegithub-copilotand BYOKopenai/azure-openaientries) documenting remote hosting: howhost-profile-entity-idon the resultingagent-sessionentity targets auser-computer-profile, and howTrustProfile.HostingWorkspacesClientInstances/TrustProfile.DefaultExecutionTarget+ExecutorTopologyexpress the local/remote split.docs/design/remote-chat-client-session.md) and the existinggithub-copilot-provider-support.md,session-context-tools.md, andllm-trust-profile.md.docs/examples/README.mdfor the new example.ExampleAgentDefinitionsTests).The acceptance target is: given only the docs listed here, an LLM can emit a valid manifest for the remote Copilot SDK topology, know which fields select the remote user-computer-profile, know that its
workspace-gui/workspace-entity/ source-targetedagent-sessiontool calls will run on the source, and know that itsgithub-copilot(oropenai/azure-openaiBYOK) chat client + built-in shell tool will run on the remote profile.Dependencies
ExecutorTarget+ExecutorTopologymapping toTrustProfile.HostingWorkspacesClientInstances) defines the manifest surface the docs must describe. Documentation can be drafted in parallel with [remote-copilot-sdk] Split executor topology: GUI + workspace-entity + source-targeted session tools LOCAL, other tools REMOTE #1317 but is finalized once [remote-copilot-sdk] Split executor topology: GUI + workspace-entity + source-targeted session tools LOCAL, other tools REMOTE #1317 lands, because the exact field names and defaults for the topology are set there.CopilotSdkChatClientis established (what the wire-carriedAgentDefinitionmust contain). Docs cannot be finalized until [remote-copilot-sdk] Complete + host server-side chat-client transport listener (builds CopilotSdkChatClient from AgentDefinition) #1314's field contract is stable.docs/design/remote-chat-client-session.md(the master [remote-copilot-sdk] End-to-end test missing: Copilot-SDK-BYOK AgentChat with source-session tool + built-in PowerShell tool + persistence round-trip #1313 design). If the design doc has not been committed yet, this sub-item includes committing / cross-linking to it.Current State / What's Missing
Investigation (paths cited relative to
features/):Existing surfaces the manifest already covers:
docs/examples/github-copilot-chat.json— the only existinggithub-copilotexample, but it is single-machine (no remote-hosting fields). No example demonstrates remote hosting or the split tool topology.docs/examples/README.md— enumerates every current example; has no entry for a remote-hosting variant.Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-options-overview.md— the top-level index. Does not mention remote hosting orhost-profile-entity-idselection.Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-options-providers.md— documentsgithub-copilotand BYOKopenai/azure-openai(CopilotSdkChatClient). No mention of remote hosting or how the SDK's built-in tools land on the remote profile.Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-options-tools.md— documents tool kinds. Does not describe the local/remote split of tool execution.Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-options-connections.md— documentsCopilotByokOptionsconnection fields for BYOK.Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-options-parameters.md— documentsworking-directoryand notes the futuretrust-profileparameter. Needs to describe how thetrust-profileparameter (withHostingWorkspacesClientInstanceson the resolvedllm-trust-profile) selects the remote host.Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-configuration.md— already documentshost-profile-entity-idonagent-sessionas "Entity ID of theuser-computer-profilehosting this session" (see alsoPhantom.Workspaces.Data.Core/JsonSchemas/agent-session.json:24). Needs a remote-hosting worked example.docs/design/github-copilot-provider-support.md— the design for thegithub-copilotprovider (CopilotSdkChatClient). No cross-link yet to remote-chat-client-session or the split topology.docs/design/session-context-tools.md:28-31, 99-103, 200-206— already correctly documents thathost-profile-entity-idrecords where the session was last hosted but is not the source of truth for the current run; the live host's profile/user is used. This is directly relevant to the doc-set and must be cross-linked.docs/design/llm-trust-profile.md— currently only a stub. Needs (or must cross-link to) documentation ofTrustProfile.HostingWorkspacesClientInstances(Phantom.Workspaces.Llm.Core/Trust/TrustProfile.cs:99, 137) andTrustProfile.DefaultExecutionTarget(ibid. lines 105, 143).What is missing (this bug):
docs/examples/that demonstrates the remote Copilot SDK topology (github-copilotprovider + a remoteuser-computer-profileexecution target + the split tool set). This is the single biggest gap for the LLM authoring path.agent-options-providers.mdhas no "Remote hosting" subsection forgithub-copilot/ BYOK explaining that (a) the resultingagent-sessionrecordshost-profile-entity-id= the remoteuser-computer-profileentity id, (b) the SDK's built-in tools (shell, filesystem) execute on that remote host, and (c) the CLI process and Copilot session id live on the remote host while persistence stays on the source.agent-options-tools.mdhas no description of the split executor topology: which tool kinds areExecutorTarget.GuiLocal(workspace-gui,workspace-entity), which areExecutorTarget.HostingInstance(source-targetedagent-session/current-session), and which areExecutorTarget.AgentExecutor(all other tools + SDK built-ins). CitePhantom.Workspaces.Llm.Core/Transport/ExecutorTarget.cs:9-28andPhantom.Workspaces.Llm.Core/Transport/ExecutorTopology.cs:10-44.agent-options-parameters.mdneeds to describe the interaction between the (future)trust-profileparameter and remote hosting: the resolvedTrustProfile.HostingWorkspacesClientInstanceslist constrains which user-computer-profiles the session may be hosted on;TrustProfile.DefaultExecutionTargetsupplies the connection descriptor when the manifest does not override it.docs/examples/README.mdneeds a section describing the new example (matching the style of the existinggithub-models-chat-with-mongodb.jsonwrite-up).docs/design/remote-chat-client-session.md— referenced by master [remote-copilot-sdk] End-to-end test missing: Copilot-SDK-BYOK AgentChat with source-session tool + built-in PowerShell tool + persistence round-trip #1313 as the design doc. If not already committed alongside [remote-copilot-sdk] Complete + host server-side chat-client transport listener (builds CopilotSdkChatClient from AgentDefinition) #1314/[remote-copilot-sdk] Split executor topology: GUI + workspace-entity + source-targeted session tools LOCAL, other tools REMOTE #1317, commit it here with cross-links fromgithub-copilot-provider-support.mdandllm-trust-profile.md.documentation/agent-configuration.md— extend theagent-sessionschema section (currently only single-machine example) with a remote-hosting worked example showinghost-profile-entity-idpointing at a remoteuser-computer-profileentity id, plus a note thatagent-definition-referencestill resolves against the source workspace so the same manifest reconstructs the session on resume.Code fields the docs must cover (with paths):
github-copilot,openai,azure-openai— dispatched inPhantom.Workspaces.Llm.Core/AgentFactory.cs.Phantom.Workspaces.Llm.Core/CopilotByokOptions.cs:16-30(Provider,BaseUrl,ApiKey) — BYOK connection fields already documented inagent-options-connections.mdbut must be cross-linked from the remote-hosting section.Phantom.Workspaces.Llm.Core/Trust/TrustProfile.cs:99, 105, 137, 143—HostingWorkspacesClientInstances,DefaultExecutionTarget. Also the sentinelsTrustProfile.LocalClientInstance(".") andTrustProfile.WildcardClientInstance("*").Phantom.Workspaces.Llm.Core/Transport/ExecutorTarget.cs:9-28(AgentExecutor/GuiLocal/HostingInstance) andPhantom.Workspaces.Llm.Core/Transport/ExecutorTopology.cs:10-44(mapping to client instances).Phantom.Workspaces.Data.Core/JsonSchemas/agent-session.json:24-27—host-profile-entity-id(uuid ofuser-computer-profile).user-computer-profileby entity id — seedocumentation/user-computer-profile-schema.md.Affected Files
features/docs/examples/github-copilot-remote-chat.jsongithub-copilotprovider +trust-profileparameter +working-directoryparameter targeting a remoteuser-computer-profile.features/docs/examples/README.mdGITHUB_TOKENon the remote profile, remote profile enrolled) and behavior (router + persistence local; SDK + built-in tools remote).features/Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-options-providers.mdgithub-copilot(and by reference underopenai/azure-openai) coveringhost-profile-entity-idselection, split executor topology summary, and a link to the example.features/Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-options-tools.mdExecutorTargetand, in a remote-hosted session, to source-local vs. remote-host.features/Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-options-parameters.mdtrust-profile(future) entry withHostingWorkspacesClientInstances/DefaultExecutionTargetsemantics and how the manifest opts into remote hosting.features/Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-options-overview.mdfeatures/Phantom.Workspaces.Data.Core/JsonEntities/documentation/agent-configuration.mdagent-sessionexample.features/docs/design/remote-chat-client-session.mdgithub-copilot-provider-support.md,llm-trust-profile.md, andsession-context-tools.md.features/docs/design/github-copilot-provider-support.mdremote-chat-client-session.md.features/docs/design/llm-trust-profile.mdremote-chat-client-session.md)HostingWorkspacesClientInstancesandDefaultExecutionTarget.features/Phantom.Workspaces.Llm.Core.Tests/ExampleAgentDefinitionsTests.csLoadGithubCopilotRemoteChat_ValidatesSuccessfully(see Expected Tests).features/Phantom.Workspaces.Llm.Core.Tests/Phantom.Workspaces.Llm.Core.Tests.csproj<EmbeddedResource Include="..\docs\examples\github-copilot-remote-chat.json" Link="github-copilot-remote-chat.json" />.Design / Fix
Structure of the new example manifest
The new
features/docs/examples/github-copilot-remote-chat.jsondemonstrates every field an LLM needs to emit. Sketch:{ "kind": "prompt", "name": "github-copilot-remote-chat", "displayName": "GitHub Copilot Chat (remote host)", "description": "GitHub Copilot SDK chat client hosted on a remote user-computer-profile; router and persistence stay on the source.", "model": { "id": "gpt-5", "provider": "github-copilot", "connection": { "kind": "key", "apiKey": "${GITHUB_TOKEN}" }, "options": { "working-directory": "${working-directory}" } }, "instructions": "You are a helpful assistant running on a remote Phantom.Workspaces user-computer-profile. The router and persistence live on the source instance; your built-in shell tool runs here.", "parameters": { "properties": [ { "name": "working-directory", "kind": "string", "description": "Working directory the Copilot CLI uses on the remote host.", "required": true }, { "name": "trust-profile", "kind": "string", "description": "Name of an llm-trust-profile whose HostingWorkspacesClientInstances lists the remote user-computer-profile.", "required": true } ] }, "tools": [ { "kind": "workspace-gui" }, { "kind": "workspace-entity" }, { "kind": "current-session" }, { "kind": "filesystem" }, { "kind": "github-cli-builtin-tools" } ], "metadata": { "version": "1.0", "tags": ["github-copilot", "copilot-sdk", "remote", "split-executor"], "prerequisites": [ "The remote user-computer-profile is enrolled and reachable via the reverse-tunnel transport.", "An llm-trust-profile exists whose HostingWorkspacesClientInstances contains the remote profile entity id.", "GITHUB_TOKEN with Copilot access is available on the remote host (or the remote user is signed in to the Copilot CLI)." ] } }The example intentionally uses
parameters(not literal values) for bothworking-directoryandtrust-profileso the Launchpad UI collects them. Thetrust-profileparameter is what selects the remote user-computer-profile: the resolvedTrustProfile.HostingWorkspacesClientInstancesnames the remote instance, andTrustProfile.DefaultExecutionTargetsupplies the connection descriptor. Theagent-sessionentity written at launch recordshost-profile-entity-id= that remote profile's entity id (peragent-configuration.mdandagent-session.json:24).Documentation outline (structure of the new subsections)
agent-options-providers.md, new "Remote hosting" subsection undergithub-copilot:How a session becomes remote-hosted. The
trust-profileparameter resolves anllm-trust-profilewhoseHostingWorkspacesClientInstancesnames a non-"."client instance.AgentFactoryrecords the selected host on theagent-sessionentity'shost-profile-entity-id. On session resume, the router reads that field and forwards the chat client to the remote instance.What runs where. Table:
AgentChatrouter, steering, persistenceCopilotSdkChatClient+ Copilot CLI processworkspace-gui/workspace-entitytool callsagent-session/current-sessiontoolsfunction/mcptoolsExecutorTarget.AgentExecutor)BYOK variant.
openai/azure-openaifollow the same rules; the BYOKCopilotByokOptionsfields (Provider,BaseUrl,ApiKey) come from the model connection and are honored on the remote host.Cross-links to
docs/design/remote-chat-client-session.md,session-context-tools.md,agent-options-tools.md#execution-target-of-tool-kinds, anddocumentation/agent-configuration.md.agent-options-tools.md, new "Execution target of tool kinds" section:ExecutorTargetworkspace-guiGuiLocalworkspace-entityGuiLocalagent-session/current-session(targeting source session id)HostingInstancefilesystem,web_request,mcp,function,chat-history,github-cli-builtin-toolsAgentExecutorCopilotSdkChatClientruns → remote in a remote-hosted sessionagent-options-parameters.md, expand thetrust-profileentry: (a) resolves anllm-trust-profileentity by name, (b)HostingWorkspacesClientInstancesselects the remote host —"."= source,"*"= any (perTrustProfile.cs:131-134), any other value = a remote client instance id, (c)DefaultExecutionTargetsupplies the connection descriptor used to reach the remote instance.Cross-linking plan
docs/design/github-copilot-provider-support.mdgets a new "Remote hosting" subsection linking todocs/design/remote-chat-client-session.md.docs/design/llm-trust-profile.mdgets a short "Hosting client instances" subsection linking to the same design.docs/design/session-context-tools.mdalready covers the "host follows the current run, not the persistedhost-profile-entity-id" rule; add a cross-link fromremote-chat-client-session.md.agent-options-providers,agent-options-tools).Expected Tests
Documentation is not unit-tested per line, but the example manifest is machine-validated by the existing example-manifest test class
Phantom.Workspaces.Llm.Core.Tests/ExampleAgentDefinitionsTests.cs(which today already containsLoadGithubCopilotChat_ValidatesSuccessfullyat line 184, callingAgentDefinitionLoader.LoadAgentFromJsonon the embedded resource). We extend it — we do not propose a new test class.ExampleAgentDefinitionsTests)LoadGithubCopilotRemoteChat_ValidatesSuccessfullygithub-copilot-remote-chat.jsonembedded resource viaAgentDefinitionLoader.LoadAgentFromJson; assertsmodel.provider == "github-copilot", theworking-directoryandtrust-profileparameters exist and are required, and the tools list contains at least oneGuiLocaltool kind (workspace-gui) and at least oneAgentExecutortool kind. Matches the shape ofLoadGithubCopilotChat_ValidatesSuccessfully.Also requires
Phantom.Workspaces.Llm.Core.Tests.csprojto add an<EmbeddedResource Include="..\docs\examples\github-copilot-remote-chat.json" ... />entry alongside the existing example resources (lines 39-45).Documentation acceptance checklist (verifiable by reading the merged docs)
docs/examples/github-copilot-remote-chat.jsonexists and is added as an embedded resource inPhantom.Workspaces.Llm.Core.Tests.csproj.ExampleAgentDefinitionsTests.LoadGithubCopilotRemoteChat_ValidatesSuccessfullypasses.docs/examples/README.mdhas a section describing the new example (prerequisites, behavior, split tool topology).documentation/agent-options-providers.mdhas a "Remote hosting" subsection undergithub-copilotcoveringhost-profile-entity-id, the local/remote split table, and BYOK.documentation/agent-options-tools.mdhas an "Execution target of tool kinds" table covering all current tool kinds.documentation/agent-options-parameters.md'strust-profileentry documentsHostingWorkspacesClientInstancesandDefaultExecutionTarget.documentation/agent-options-overview.mdlinks to the new remote-hosting section.documentation/agent-configuration.mdincludes a remote-hosting worked example foragent-session.docs/design/remote-chat-client-session.mdexists (or is committed here) and is cross-linked fromgithub-copilot-provider-support.md,llm-trust-profile.md, andsession-context-tools.md.ExecutorTarget/ExecutorTopologyby path so future readers can find the code.