CopilotShell.xml

<?xml version="1.0"?>
<doc>
    <assembly>
        <name>CopilotShell</name>
    </assembly>
    <members>
        <member name="T:CopilotShell.AgentFileParser">
            <summary>
            Parses .agent.md files (YAML frontmatter + markdown body) into <see cref="T:GitHub.Copilot.CustomAgentConfig"/> objects.
            The agent name is derived from the filename: e.g. "ado-team.agent.md" → "ado-team".
            </summary>
            <remarks>
            Expected file format:
            <code>
            ---
            description: 'Short description of the agent'
            tools: ['tool1', 'tool2']
            ---
            Markdown body used as the agent prompt.
            </code>
            </remarks>
        </member>
        <member name="F:CopilotShell.AgentFileParser.VsCodeToolMappings">
            <summary>
            Maps VS Code Copilot agent tool names (as written in <c>.agent.md</c> <c>tools:</c> lists)
            to their Copilot CLI equivalents. Both the dash (<c>read-readFile</c>) and slash
            (<c>read/readFile</c>) spellings are accepted. Entries not present here — including MCP
            selectors such as <c>"&lt;server&gt;/*"</c> or <c>"&lt;server&gt;/tool"</c>, and plain CLI
            tool names — are passed through verbatim.
            </summary>
        </member>
        <member name="M:CopilotShell.AgentFileParser.Parse(System.String)">
            <summary>
            Parse an .agent.md file into a <see cref="T:GitHub.Copilot.CustomAgentConfig"/>.
            </summary>
        </member>
        <member name="M:CopilotShell.AgentFileParser.ParseMany(System.Collections.Generic.IEnumerable{System.String})">
            <summary>
            Parse multiple agent files.
            </summary>
        </member>
        <member name="M:CopilotShell.AgentFileParser.ExtractAgentName(System.String)">
            <summary>
            Extract the agent name from a filename like "ado-team.agent.md" → "ado-team".
            Falls back to filename without extension if the pattern doesn't match.
            </summary>
        </member>
        <member name="M:CopilotShell.AgentFileParser.ParseFrontmatter(System.String,GitHub.Copilot.CustomAgentConfig)">
            <summary>
            Lightweight YAML frontmatter parser — handles description and tools fields.
            Avoids a full YAML dependency.
            </summary>
        </member>
        <member name="M:CopilotShell.AgentFileParser.ExtractStringValue(System.String)">
            <summary>
            Extract a string value, stripping surrounding quotes.
            </summary>
        </member>
        <member name="M:CopilotShell.AgentFileParser.TranslateTools(System.Collections.Generic.List{System.String})">
             <summary>
             Translate a parsed <c>tools:</c> list from VS Code tool names to CLI equivalents.
             Entries not present in <see cref="F:CopilotShell.AgentFileParser.VsCodeToolMappings"/> (MCP selectors, plain CLI tool
             names) are kept verbatim. Order is preserved and duplicates are removed.
            
             NOTE: built-in tools like "skill" (and "sql" / "report_intent") are intentionally NOT
             added here. The Copilot CLI injects those automatically, so a scoped agent already has
             them without listing them.
             </summary>
        </member>
        <member name="M:CopilotShell.AgentFileParser.ParseToolsList(System.String)">
            <summary>
            Parse an inline YAML list like ['tool1', 'tool2'] into a List&lt;string&gt;.
            </summary>
        </member>
        <member name="T:CopilotShell.AsyncPSCmdlet">
            <summary>
            Base cmdlet that bridges async/await into the PowerShell pipeline by
            pumping a single-threaded <see cref="T:System.Threading.SynchronizationContext"/> on the
            pipeline thread. This ensures that <c>WriteObject</c>, <c>WriteError</c>,
            etc. are always called from the correct thread.
            </summary>
        </member>
        <member name="M:CopilotShell.AsyncPSCmdlet.ResolvePSPath(System.String)">
            <summary>
            Resolve a user-supplied path (relative or absolute) against PowerShell's
            current working directory ($PWD) instead of .NET's Environment.CurrentDirectory.
            </summary>
        </member>
        <member name="M:CopilotShell.AsyncPSCmdlet.ProcessRecordAsync">
            <summary>Override this to implement async pipeline processing.</summary>
        </member>
        <member name="M:CopilotShell.AsyncPSCmdlet.EndProcessingAsync">
            <summary>Override this to implement async end processing.</summary>
        </member>
        <member name="M:CopilotShell.AsyncPSCmdlet.RunWithPump(System.Func{System.Threading.Tasks.Task})">
            <summary>
            Runs the async factory on a thread-pool thread while pumping
            continuations back onto the current (pipeline) thread.
            </summary>
        </member>
        <member name="T:CopilotShell.AsyncPSCmdlet.PipelineSyncContext">
            <summary>
            A <see cref="T:System.Threading.SynchronizationContext"/> that posts callbacks to a
            <see cref="T:System.Collections.Concurrent.BlockingCollection`1"/> so they execute on the pipeline thread.
            </summary>
        </member>
        <member name="T:CopilotShell.CliDownloader">
            <summary>
            Downloads the Copilot CLI binary from the npm registry on demand.
            The binary version is tightly coupled to the SDK version and is embedded
            in the assembly at build time via AssemblyMetadata("CopilotCliVersion", ...).
            </summary>
        </member>
        <member name="M:CopilotShell.CliDownloader.GetRequiredCliVersion">
            <summary>
            Gets the required CLI version from assembly metadata (stamped at build time
            from the GitHub.Copilot.SDK's CopilotCliVersion MSBuild property).
            </summary>
        </member>
        <member name="M:CopilotShell.CliDownloader.GetCacheDir(System.String,System.String)">
            <summary>
            Gets the user-local cache directory for a given CLI version and RID.
            Windows: %LOCALAPPDATA%\CopilotShell\cli\{version}\{rid}\
            macOS: ~/Library/Application Support/CopilotShell/cli/{version}/{rid}/
            Linux: ~/.local/share/CopilotShell/cli/{version}/{rid}/
            </summary>
        </member>
        <member name="M:CopilotShell.CliDownloader.FindCached(System.String,System.String)">
            <summary>
            Returns the path to the cached CLI binary if it exists, or null.
            </summary>
        </member>
        <member name="M:CopilotShell.CliDownloader.GetNpmPlatform(System.String)">
            <summary>
            Maps .NET RID to npm platform name used in the @github/copilot-{platform} package.
            </summary>
        </member>
        <member name="M:CopilotShell.CliDownloader.DownloadAsync(System.String,System.String,System.Action{System.String},System.Threading.CancellationToken)">
            <summary>
            Downloads and extracts the copilot CLI binary to the user cache.
            Returns the path to the binary, or null on failure.
            </summary>
            <param name="version">CLI version (e.g., "0.0.420")</param>
            <param name="rid">Runtime identifier (e.g., "win-x64")</param>
            <param name="log">Optional callback for progress messages (WriteVerbose)</param>
            <param name="cancellationToken">Cancellation token</param>
        </member>
        <member name="T:CopilotShell.NewCopilotClientCommand">
            <summary>
            Creates a new CopilotClient. The client manages the connection to the
            Copilot CLI server process.
            </summary>
            <example>
            <code>$client = New-CopilotClient</code>
            <code>$client = New-CopilotClient -Model gpt-5 -LogLevel debug</code>
            <code>$client = New-CopilotClient -GitHubToken $env:GITHUB_TOKEN</code>
            </example>
        </member>
        <member name="T:CopilotShell.StartCopilotClientCommand">
            <summary>
            Start a CopilotClient that was created with -AutoStart $false.
            </summary>
        </member>
        <member name="T:CopilotShell.StopCopilotClientCommand">
            <summary>
            Gracefully stop a CopilotClient.
            </summary>
        </member>
        <member name="T:CopilotShell.RemoveCopilotClientCommand">
            <summary>
            Dispose and remove a CopilotClient.
            </summary>
        </member>
        <member name="T:CopilotShell.TestCopilotClientCommand">
            <summary>
            Ping the Copilot server to test connectivity.
            </summary>
        </member>
        <member name="T:CopilotShell.CliPathResolver">
            <summary>
            Resolves the path to the Copilot CLI binary.
            Checks in order: bundled in module folder, user-local download cache.
            </summary>
        </member>
        <member name="M:CopilotShell.CliPathResolver.Resolve">
            <summary>
            Returns the full path to copilot(.exe), checking the module folder first,
            then the user-local cache. Returns null if not found anywhere.
            Call <see cref="M:CopilotShell.CliPathResolver.ResolveOrDownloadAsync(System.Action{System.String},System.Threading.CancellationToken)"/> to auto-download when missing.
            </summary>
        </member>
        <member name="M:CopilotShell.CliPathResolver.ResolveOrDownloadAsync(System.Action{System.String},System.Threading.CancellationToken)">
            <summary>
            Resolves the CLI path, downloading from npm if not found locally.
            </summary>
        </member>
        <member name="T:CopilotShell.InvokeCopilotCommand">
            <summary>
            One-shot convenience cmdlet: creates a client + session, sends a prompt,
            collects or streams the response, and cleans up. Ideal for scripting.
            </summary>
            <example>
            <code>Invoke-Copilot "What is 2+2?"</code>
            <code>Invoke-Copilot "Explain this code" -Model claude-sonnet-4.5 -Stream</code>
            <code>Invoke-Copilot "You are a pirate" -SystemMessage "Respond like a pirate." -SystemMessageMode Replace</code>
            <code>Invoke-Copilot "Refactor this" -TimeoutSeconds 120 -MaxTurns 5</code>
            <code>Invoke-Copilot "Help me" -DefaultAgent my-custom-agent</code>
            <code>
            # Define a custom agent and use it in one shot
            $agent = [GitHub.Copilot.CustomAgentConfig]@{ Name = 'reviewer'; Prompt = 'You are a code reviewer.' }
            Invoke-Copilot "Review this PR" -CustomAgents $agent -DefaultAgent reviewer
            </code>
            <code>
            # Load a custom agent from a .agent.md file
            Invoke-Copilot "Check the ADO pipeline" -CustomAgentFile .github\agents\ado-team.agent.md
            </code>
            <code>
            # Use a VS Code-compatible .prompt.md file
            Invoke-Copilot -PromptFile .github\prompts\get-work-items.prompt.md
            </code>
            <code>
            # Use a prompt file but override the agent
            Invoke-Copilot -PromptFile .github\prompts\get-work-items.prompt.md -DefaultAgent different-agent
            </code>
            </example>
        </member>
        <member name="T:CopilotShell.ConnectCopilotCommand">
            <summary>
            Authenticates with GitHub Copilot via the CLI's OAuth device flow.
            Ensures the correct CLI version is downloaded, then runs <c>copilot login</c>
            interactively so the user can complete the browser-based authentication.
            </summary>
            <example>
            <code>Connect-Copilot</code>
            <code>Connect-Copilot -Host "https://example.ghe.com"</code>
            <code>Connect-Copilot -CliPath C:\path\to\copilot.exe</code>
            </example>
        </member>
        <member name="T:CopilotShell.McpConfigLoader">
            <summary>
            Loads MCP server configurations from a JSON config file (e.g. mcp-config.json)
            and converts them into the SDK's <see cref="T:GitHub.Copilot.McpStdioServerConfig"/> /
            <see cref="T:GitHub.Copilot.McpHttpServerConfig"/> objects for <see cref="T:GitHub.Copilot.SessionConfig"/>.
            </summary>
        </member>
        <member name="M:CopilotShell.McpConfigLoader.Load(System.String)">
            <summary>
            Reads a JSON config file and returns a dictionary suitable for
            assigning to a <see cref="T:GitHub.Copilot.SessionConfig"/>.
            </summary>
            <remarks>
            Supports two formats (auto-detected):
            <para><b>Copilot CLI format</b> — top-level <c>"mcpServers"</c>:</para>
            <code>
            {
              "mcpServers": {
                "name": { "command": "...", "args": [...], "env": { ... }, "tools": ["*"] }
              }
            }
            </code>
            <para><b>VS Code format</b> (.vscode/mcp.json) — top-level <c>"servers"</c>:</para>
            <code>
            {
              "servers": {
                "name": { "command": "...", "args": [...], "env": { ... } }
              }
            }
            </code>
            Entries with <c>"url"</c> are treated as remote servers; entries with
            <c>"command"</c> are local. Entries with <c>"disabled": true</c> are skipped.
            When <c>"tools"</c> is absent, it defaults to <c>["*"]</c>.
            </remarks>
        </member>
        <member name="T:CopilotShell.ResetCopilotMcpDaemonCommand">
            <summary>
            Stops the MCP zombie daemon and all its managed MCP server processes.
            Use this when authentication tokens become stale and you need to force
            MCP servers to restart fresh (re-authenticate) on the next session.
            </summary>
            <example>
            <code>Reset-CopilotMcpDaemon</code>
            <para>Stops the daemon and all managed MCP servers. They restart automatically on next use.</para>
            </example>
            <example>
            <code>Reset-CopilotMcpDaemon -Force</code>
            <para>Force-kills the daemon process if the graceful shutdown signal fails.</para>
            </example>
        </member>
        <member name="T:CopilotShell.McpWrapperHelper">
            <summary>
            Wraps MCP local server configurations to use the <c>mcp-wrapper</c> executable.
            The wrapper handles env var propagation and, for eligible servers, manages
            persistent "zombie" daemon connections that survive session boundaries.
            </summary>
            <remarks>
            <para>When wrapping is enabled (default), each <see cref="T:GitHub.Copilot.McpStdioServerConfig"/> is
            transformed so that <c>mcp-wrapper</c> becomes the command, and the original command,
            args, env vars, and cwd are passed as wrapper arguments:</para>
            <code>
            mcp-wrapper --env KEY1=VAL1 --env KEY2=VAL2 --cwd /path -- original-command arg1 arg2
            </code>
            <para>The wrapper internally decides whether to use zombie mode (persistent daemon
            with Unix domain socket) or direct proxy mode based on regex patterns matching
            the command and args. The <c>--no-zombie</c> flag can force direct mode.</para>
            </remarks>
        </member>
        <member name="M:CopilotShell.McpWrapperHelper.ResolveWrapperPath">
            <summary>
            Resolve the path to the <c>mcp-wrapper</c> executable bundled with this module.
            Expected in the same directory as the module assembly.
            </summary>
            <returns>Full path to the wrapper executable, or null if not found.</returns>
        </member>
        <member name="M:CopilotShell.McpWrapperHelper.WrapLocalServers(System.Collections.Generic.Dictionary{System.String,GitHub.Copilot.McpServerConfig},System.String)">
            <summary>
            Wrap all local MCP server configs to use the <c>mcp-wrapper</c> executable.
            Remote server configs are passed through unchanged.
            </summary>
            <param name="mcpConfig">The MCP server config dictionary (from <see cref="T:CopilotShell.McpConfigLoader"/>)</param>
            <param name="wrapperPath">Full path to the mcp-wrapper executable</param>
            <returns>A new dictionary with wrapped local server configs</returns>
        </member>
        <member name="M:CopilotShell.McpWrapperHelper.NeedsWrapping(GitHub.Copilot.McpStdioServerConfig,System.String)">
            <summary>
            Check whether a local MCP server config needs wrapping.
            All local servers are wrapped so zombie-eligible ones get persistent daemon
            connections.
            </summary>
        </member>
        <member name="M:CopilotShell.McpWrapperHelper.WrapConfig(GitHub.Copilot.McpStdioServerConfig,System.String)">
            <summary>
            Transform a single <see cref="T:GitHub.Copilot.McpStdioServerConfig"/> to use the wrapper.
            The original command, args, env, and cwd become wrapper arguments.
            </summary>
        </member>
        <member name="T:CopilotShell.SendCopilotMessageCommand">
            <summary>
            Send a message to a Copilot session.
            With -Stream, emits session events to the pipeline in real time.
            Without -Stream, waits for the session to become idle and returns the
            final assistant message text.
            </summary>
            <example>
            <code>Send-CopilotMessage -Session $session -Prompt "Hello"</code>
            <code>Send-CopilotMessage $session "Explain this code" -Stream</code>
            <code>"Fix the bug" | Send-CopilotMessage -Session $session -Attachment ./file.cs</code>
            <code>Send-CopilotMessage $session "Use this agent" -Agent my-agent</code>
            <code>
            # Use a VS Code-compatible .prompt.md file
            Send-CopilotMessage $session -PromptFile .github\prompts\get-work-items.prompt.md
            </code>
            </example>
        </member>
        <member name="T:CopilotShell.WaitCopilotSessionCommand">
            <summary>
            Wait for a Copilot session to become idle.
            </summary>
        </member>
        <member name="T:CopilotShell.ModuleInitializer">
             <summary>
             PowerShell module lifecycle hooks.
            
             <b>Assembly isolation for dependency version conflicts:</b>
             The module bundles newer assemblies (e.g. System.Text.Json 10.x) than the
             PowerShell host provides (.NET 8's v8.x or .NET 9's v9.x). To avoid type
             identity conflicts, all module dependencies live in a <c>dependencies/</c>
             subdirectory and are loaded via an isolated <see cref="T:System.Runtime.Loader.AssemblyLoadContext"/>.
            
             <b>Critical timing:</b> The Resolving handler MUST be registered BEFORE
             PowerShell calls <c>GetTypes()</c> on this assembly (which triggers resolution
             of SDK types). Since <c>IModuleAssemblyInitializer.OnImport()</c> runs AFTER
             type enumeration begins, registration happens in <c>StartupCheck.ps1</c>
             (via <c>ScriptsToProcess</c> in the manifest) which runs before the
             binary module loads.
            
             This class provides the <see cref="T:System.Management.Automation.IModuleAssemblyCleanup"/> implementation
             to unregister the handler when the module is removed.
             </summary>
        </member>
        <member name="T:CopilotShell.PromptFileResult">
            <summary>
            Result of parsing a .prompt.md file.
            Contains the prompt body text and optional frontmatter metadata.
            </summary>
        </member>
        <member name="P:CopilotShell.PromptFileResult.Prompt">
            <summary>Prompt body text (everything after the frontmatter).</summary>
        </member>
        <member name="P:CopilotShell.PromptFileResult.Agent">
            <summary>Optional agent name from frontmatter (e.g. agent: 'my-agent').</summary>
        </member>
        <member name="P:CopilotShell.PromptFileResult.Description">
            <summary>Optional description from frontmatter.</summary>
        </member>
        <member name="T:CopilotShell.PromptFileParser">
             <summary>
             Parses .prompt.md files (YAML frontmatter + markdown body) into <see cref="T:CopilotShell.PromptFileResult"/> objects.
             Compatible with VS Code's .prompt.md format.
             </summary>
             <remarks>
             Expected file format:
             <code>
             ---
             agent: 'my-agent'
             description: 'Your goal is to help with specific tasks.'
             ---
             The actual prompt text sent to the model.
             Can span multiple lines with markdown formatting.
             </code>
            
             All frontmatter fields are optional. The body (after the frontmatter) becomes the prompt text.
             If no frontmatter is present, the entire file content is used as the prompt.
             </remarks>
        </member>
        <member name="M:CopilotShell.PromptFileParser.Parse(System.String)">
            <summary>
            Parse a .prompt.md file.
            </summary>
        </member>
        <member name="M:CopilotShell.PromptFileParser.ParseFrontmatter(System.String,CopilotShell.PromptFileResult)">
            <summary>
            Lightweight YAML frontmatter parser — handles agent and description fields.
            Avoids a full YAML dependency.
            </summary>
        </member>
        <member name="M:CopilotShell.PromptFileParser.ExtractStringValue(System.String)">
            <summary>
            Extract a string value, stripping surrounding quotes.
            </summary>
        </member>
        <member name="T:CopilotShell.NewCopilotSessionCommand">
            <summary>
            Create a new Copilot conversation session on a running client.
            </summary>
            <example>
            <code>$session = New-CopilotSession -Client $client -Model gpt-5</code>
            <code>$session = New-CopilotSession $client -Model gpt-5 -SystemMessage "You are a pirate." -SystemMessageMode Replace</code>
            <code>$session = New-CopilotSession $client -Model claude-sonnet-4.5 -Stream</code>
            <code>$session = New-CopilotSession $client -McpConfigFile C:\code\project\mcp-config.json</code>
            <code>$session = New-CopilotSession $client -DefaultAgent "my-custom-agent"</code>
            <code>
            # Define and use a custom agent inline
            $agent = [GitHub.Copilot.CustomAgentConfig]@{ Name = 'reviewer'; Prompt = 'You are a code reviewer.'; Description = 'Reviews code changes' }
            $session = New-CopilotSession $client -CustomAgents $agent -DefaultAgent reviewer
            </code>
            <code>
            # Load a custom agent from a .agent.md file
            $session = New-CopilotSession $client -CustomAgentFile .github\agents\ado-team.agent.md
            </code>
            </example>
        </member>
        <member name="T:CopilotShell.GetCopilotSessionCommand">
            <summary>
            List all sessions or return a specific session's metadata.
            </summary>
            <example>
            <code>Get-CopilotSession -Client $client</code>
            </example>
        </member>
        <member name="T:CopilotShell.ResumeCopilotSessionCommand">
            <summary>
            Resume an existing session by ID.
            </summary>
        </member>
        <member name="T:CopilotShell.RemoveCopilotSessionCommand">
            <summary>
            Delete a session by ID.
            </summary>
        </member>
        <member name="T:CopilotShell.GetCopilotSessionMessagesCommand">
            <summary>
            Get all messages/events from a session.
            </summary>
        </member>
        <member name="T:CopilotShell.StopCopilotSessionCommand">
            <summary>
            Abort the currently processing message in a session.
            </summary>
        </member>
        <member name="T:CopilotShell.DisconnectCopilotSessionCommand">
            <summary>
            Disconnect (dispose) a local session object to free resources without deleting
            the session from the server. The session can be resumed later with
            <c>Resume-CopilotSession</c> using the same session ID.
            </summary>
            <example>
            <code>
            $id = $session.SessionId
            Disconnect-CopilotSession $session
            # later...
            $session = Resume-CopilotSession $client $id
            </code>
            </example>
        </member>
        <member name="T:CopilotShell.SessionDataStore">
            <summary>
            Helpers for reading and writing a per-session JSON "sidecar" file that lives
            alongside the Copilot CLI's own session state at
            <c>~/.copilot/session-state/&lt;sessionId&gt;/copilotshell.json</c>.
            This lets callers attach arbitrary metadata to a session without modifying
            the SDK's read-only <c>SessionMetadata</c>/<c>SessionContext</c> types.
            </summary>
        </member>
        <member name="M:CopilotShell.SessionDataStore.ResolveConfigDir(System.String)">
            <summary>Resolves the Copilot CLI config directory (default <c>~/.copilot</c>).</summary>
        </member>
        <member name="M:CopilotShell.SessionDataStore.SessionStateDir(System.String,System.String)">
            <summary>Full path to the per-session state directory.</summary>
        </member>
        <member name="M:CopilotShell.SessionDataStore.SidecarPath(System.String,System.String)">
            <summary>Full path to the sidecar JSON file for a session.</summary>
        </member>
        <member name="M:CopilotShell.SessionDataStore.Read(System.String)">
            <summary>Reads the sidecar into a <see cref="T:System.Collections.Hashtable"/>, or null if absent.</summary>
        </member>
        <member name="M:CopilotShell.SessionDataStore.Write(System.String,System.Collections.Hashtable)">
            <summary>Writes a <see cref="T:System.Collections.Hashtable"/> to the sidecar as indented JSON.</summary>
        </member>
        <member name="M:CopilotShell.SessionDataStore.WriteCreationDefaults(System.String,System.String)">
            <summary>
            Writes the default sidecar created automatically when a session is created,
            recording the OS process that created it. Existing keys are preserved so
            this never clobbers user-supplied data; the creation block is only written
            once (on first creation).
            </summary>
        </member>
        <member name="M:CopilotShell.SessionDataStore.Normalize(System.Object)">
            <summary>Recursively converts Hashtables/lists/scalars into JSON-friendly types.</summary>
        </member>
        <member name="M:CopilotShell.SessionDataStore.FromElement(System.Text.Json.JsonElement)">
            <summary>Recursively converts a <see cref="T:System.Text.Json.JsonElement"/> into Hashtables/lists/scalars.</summary>
        </member>
        <member name="T:CopilotShell.SetCopilotSessionDataCommand">
            <summary>
            Stores arbitrary metadata in a JSON sidecar file alongside a session's CLI
            state (<c>~/.copilot/session-state/&lt;sessionId&gt;/copilotshell.json</c>).
            By default the supplied data is merged into any existing sidecar; use
            <c>-Replace</c> to overwrite it entirely.
            </summary>
            <example>
            <code>Set-CopilotSessionData -SessionId $session.SessionId -Data @{ ticket = 'AB#123'; owner = 'nina' }</code>
            <code>$session | Set-CopilotSessionData -Data @{ reviewed = $true } -PassThru</code>
            </example>
        </member>
        <member name="T:CopilotShell.GetCopilotSessionDataCommand">
            <summary>
            Reads the JSON sidecar file stored alongside a session's CLI state by
            <c>Set-CopilotSessionData</c>. Returns nothing if no sidecar exists.
            </summary>
            <example>
            <code>Get-CopilotSessionData -SessionId $session.SessionId</code>
            <code>$session | Get-CopilotSessionData</code>
            </example>
        </member>
        <member name="T:CopilotShell.SessionSetupHelper">
             <summary>
             Wires custom agents, MCP servers, tool filters, and skills onto a session config.
            
             <para>There are two entry points that share a common configuration core but differ in how the
             selected agent is applied:</para>
             <list type="bullet">
               <item><see cref="M:CopilotShell.SessionSetupHelper.Configure(GitHub.Copilot.SessionConfig,CopilotShell.SessionSetupOptions)"/> — for <b>creating</b> a session (<see cref="T:GitHub.Copilot.SessionConfig"/>).
               The agent (from <c>-DefaultAgent</c> or a prompt file) is <i>pre-selected</i> by setting
               <see cref="P:GitHub.Copilot.SessionConfigBase.Agent"/> before the session is created. A sole custom agent is
               never auto-selected.</item>
               <item><see cref="M:CopilotShell.SessionSetupHelper.ConfigureResume(GitHub.Copilot.ResumeSessionConfig,CopilotShell.SessionSetupOptions)"/> — for <b>resuming</b> a session (<see cref="T:GitHub.Copilot.ResumeSessionConfig"/>).
               The config's <see cref="P:GitHub.Copilot.SessionConfigBase.Agent"/> is left unset; the agent name is returned so the
               caller can apply it <i>after</i> resume via <c>session.Rpc.Agent.SelectAsync</c>. An agent is selected
               only when explicitly requested via <c>-DefaultAgent</c>; a sole custom agent is never auto-selected.</item>
             </list>
            
             <para>Shared configuration core (intentionally minimal — applies to both paths):</para>
             <list type="bullet">
               <item>MCP servers, when a config file is given, are always attached to the session as-is
               (optionally wrapped). They are never filtered by tool list nor attached to individual agents.</item>
               <item>The session-level tool filter (<see cref="P:GitHub.Copilot.SessionConfigBase.AvailableTools"/>) is only set when
               the caller explicitly passes <c>-AvailableTools</c> and/or <c>-IsolatedDefaultAgent</c>; otherwise
               the session inherits all tools.
               <c>-IsolatedDefaultAgent</c> (only when no agent is selected) restricts the session — and therefore
               the built-in default agent it caps — to <see cref="P:GitHub.Copilot.BuiltInTools.Isolated"/> minus
               <c>exit_plan_mode</c>/<c>ask_user</c>.</item>
               <item>Agent <c>Tools</c> lists are passed through verbatim — including MCP selectors like
               <c>"&lt;server&gt;/*"</c>. (VS Code tool-group names from <c>.agent.md</c> files are translated
               to CLI tools earlier, in <see cref="T:CopilotShell.AgentFileParser"/>.) No wildcard expansion and no MCP
               tool discovery are performed.</item>
               <item>Skills are off unless skill directories are supplied; passing any directory sets
               <see cref="P:GitHub.Copilot.SessionConfigBase.EnableSkills"/> and registers the (resolved) directories. Disabled
               skill names are passed through verbatim. See <see cref="M:CopilotShell.SessionSetupHelper.ApplySkills(GitHub.Copilot.SessionConfigBase,System.String[],System.String[],System.Func{System.String,System.String},System.Action{System.String})"/>.</item>
             </list>
             </summary>
        </member>
        <member name="M:CopilotShell.SessionSetupHelper.ApplySkills(GitHub.Copilot.SessionConfigBase,System.String[],System.String[],System.Func{System.String,System.String},System.Action{System.String})">
            <summary>
            Applies skill configuration onto a session config. Passing one or more skill directories
            turns skills on (<see cref="P:GitHub.Copilot.SessionConfigBase.EnableSkills"/> = <c>true</c>) and registers
            the resolved directories. Disabled skill names are passed through verbatim.
            </summary>
        </member>
        <member name="M:CopilotShell.SessionSetupHelper.ConfigureResume(GitHub.Copilot.ResumeSessionConfig,CopilotShell.SessionSetupOptions)">
            <summary>
            Configures a <see cref="T:GitHub.Copilot.ResumeSessionConfig"/> for resuming a session. Applies the shared
            configuration core (custom agents, MCP servers, tool filters, skills) but — unlike
            <see cref="M:CopilotShell.SessionSetupHelper.Configure(GitHub.Copilot.SessionConfig,CopilotShell.SessionSetupOptions)"/> — does NOT pre-set <see cref="P:GitHub.Copilot.SessionConfigBase.Agent"/>. The
            resolved agent name is returned via <see cref="P:CopilotShell.SessionSetupResult.AgentToSelect"/> so the
            caller can apply it after resume through <c>session.Rpc.Agent.SelectAsync</c>. An agent is
            selected only when explicitly requested via <c>-DefaultAgent</c>; a sole loaded custom agent is
            never auto-selected.
            </summary>
        </member>
        <member name="M:CopilotShell.SessionSetupHelper.ApplyServersToolsAndSkills(GitHub.Copilot.SessionConfigBase,CopilotShell.SessionSetupOptions,System.String)">
            <summary>
            Shared core used by both <see cref="M:CopilotShell.SessionSetupHelper.Configure(GitHub.Copilot.SessionConfig,CopilotShell.SessionSetupOptions)"/> and <see cref="M:CopilotShell.SessionSetupHelper.ConfigureResume(GitHub.Copilot.ResumeSessionConfig,CopilotShell.SessionSetupOptions)"/>:
            attaches MCP servers, applies the session-level tool filter, sets excluded tools, and
            applies skills onto any <see cref="T:GitHub.Copilot.SessionConfigBase"/>.
            </summary>
        </member>
        <member name="M:CopilotShell.SessionSetupHelper.RegisterAgents(GitHub.Copilot.SessionConfigBase,CopilotShell.SessionSetupOptions)">
            <summary>Loads custom agents and registers them on the config. Returns the loaded list (or null).</summary>
        </member>
        <member name="M:CopilotShell.SessionSetupHelper.ApplyMcpServers(GitHub.Copilot.SessionConfigBase,CopilotShell.SessionSetupOptions)">
            <summary>
            Loads MCP servers from <see cref="P:CopilotShell.SessionSetupOptions.McpConfigFiles"/> (if given), optionally
            wraps local servers via <c>mcp-wrapper</c>, and attaches ALL of them to the session. They are
            never filtered out or attached to individual agents — agents scope themselves through their own
            Tools list (e.g. "&lt;server&gt;/*").
            </summary>
        </member>
        <member name="M:CopilotShell.SessionSetupHelper.ApplyToolFilters(GitHub.Copilot.SessionConfigBase,CopilotShell.SessionSetupOptions,System.String)">
            <summary>
            Applies the session-level tool filter. The session inherits ALL tools unless one of these is set:
            <list type="bullet">
              <item><c>-AvailableTools</c> — explicit runtime selectors passed verbatim.</item>
              <item><c>-IsolatedDefaultAgent</c> — when NO agent is selected, restrict the (built-in) default
              agent to the isolated builtin set minus <c>exit_plan_mode</c>/<c>ask_user</c>.</item>
            </list>
            A session-level allow-list is a hard cap that cascades to the default agent (and any subagents it
            spawns), so it is how we make the default agent "isolated".
            </summary>
        </member>
        <member name="M:CopilotShell.SessionSetupHelper.ResolveCreateAgent(CopilotShell.SessionSetupOptions)">
            <summary>Resolves the agent to select when <b>creating</b> a session: explicit
            <c>-DefaultAgent</c> takes precedence, then a prompt-file agent. A sole custom agent is NOT
            auto-selected.</summary>
        </member>
    </members>
</doc>