Showing preview only (6,911K chars total). Download the full file or copy to clipboard to get everything.
Repository: github/copilot-sdk
Branch: main
Commit: f7f94508b872
Files: 979
Total size: 6.4 MB
Directory structure:
gitextract_xohivnil/
├── .devcontainer/
│ └── devcontainer.json
├── .gitattributes
├── .github/
│ ├── CODEOWNERS
│ ├── actions/
│ │ └── setup-copilot/
│ │ └── action.yml
│ ├── agents/
│ │ ├── agentic-workflows.agent.md
│ │ └── docs-maintenance.agent.md
│ ├── aw/
│ │ ├── actions-lock.json
│ │ └── logs/
│ │ └── .gitignore
│ ├── commands/
│ │ └── triage_feedback.yml
│ ├── copilot-instructions.md
│ ├── dependabot.yaml
│ ├── lsp.json
│ └── workflows/
│ ├── codegen-check.yml
│ ├── collect-corrections.yml
│ ├── copilot-setup-steps.yml
│ ├── corrections-tests.yml
│ ├── cross-repo-issue-analysis.lock.yml
│ ├── cross-repo-issue-analysis.md
│ ├── docs-validation.yml
│ ├── dotnet-sdk-tests.yml
│ ├── go-sdk-tests.yml
│ ├── handle-bug.lock.yml
│ ├── handle-bug.md
│ ├── handle-documentation.lock.yml
│ ├── handle-documentation.md
│ ├── handle-enhancement.lock.yml
│ ├── handle-enhancement.md
│ ├── handle-question.lock.yml
│ ├── handle-question.md
│ ├── issue-classification.lock.yml
│ ├── issue-classification.md
│ ├── issue-triage.lock.yml
│ ├── issue-triage.md
│ ├── nodejs-sdk-tests.yml
│ ├── publish.yml
│ ├── python-sdk-tests.yml
│ ├── release-changelog.lock.yml
│ ├── release-changelog.md
│ ├── scenario-builds.yml
│ ├── sdk-consistency-review.lock.yml
│ ├── sdk-consistency-review.md
│ ├── update-copilot-dependency.yml
│ └── verify-compiled.yml
├── .gitignore
├── .vscode/
│ ├── launch.json
│ └── settings.json
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── SUPPORT.md
├── docs/
│ ├── auth/
│ │ ├── byok.md
│ │ └── index.md
│ ├── features/
│ │ ├── agent-loop.md
│ │ ├── custom-agents.md
│ │ ├── hooks.md
│ │ ├── image-input.md
│ │ ├── index.md
│ │ ├── mcp.md
│ │ ├── session-persistence.md
│ │ ├── skills.md
│ │ ├── steering-and-queueing.md
│ │ └── streaming-events.md
│ ├── getting-started.md
│ ├── hooks/
│ │ ├── error-handling.md
│ │ ├── index.md
│ │ ├── post-tool-use.md
│ │ ├── pre-tool-use.md
│ │ ├── session-lifecycle.md
│ │ └── user-prompt-submitted.md
│ ├── index.md
│ ├── integrations/
│ │ └── microsoft-agent-framework.md
│ ├── observability/
│ │ └── opentelemetry.md
│ ├── setup/
│ │ ├── azure-managed-identity.md
│ │ ├── backend-services.md
│ │ ├── bundled-cli.md
│ │ ├── github-oauth.md
│ │ ├── index.md
│ │ ├── local-cli.md
│ │ └── scaling.md
│ └── troubleshooting/
│ ├── compatibility.md
│ ├── debugging.md
│ └── mcp-debugging.md
├── dotnet/
│ ├── .config/
│ │ └── dotnet-tools.json
│ ├── .gitignore
│ ├── Directory.Build.props
│ ├── Directory.Packages.props
│ ├── GitHub.Copilot.SDK.slnx
│ ├── README.md
│ ├── global.json
│ ├── nuget.config
│ ├── samples/
│ │ ├── Chat.cs
│ │ └── Chat.csproj
│ ├── src/
│ │ ├── ActionDisposable.cs
│ │ ├── Client.cs
│ │ ├── Generated/
│ │ │ ├── Rpc.cs
│ │ │ └── SessionEvents.cs
│ │ ├── GitHub.Copilot.SDK.csproj
│ │ ├── JsonRpc.cs
│ │ ├── MillisecondsTimeSpanConverter.cs
│ │ ├── PermissionHandlers.cs
│ │ ├── SdkProtocolVersion.cs
│ │ ├── Session.cs
│ │ ├── SessionFsProvider.cs
│ │ ├── Telemetry.cs
│ │ ├── Types.cs
│ │ └── build/
│ │ └── GitHub.Copilot.SDK.targets
│ └── test/
│ ├── AssemblyInfo.cs
│ ├── E2E/
│ │ ├── AskUserE2ETests.cs
│ │ ├── BuiltinToolsE2ETests.cs
│ │ ├── ClientE2ETests.cs
│ │ ├── ClientLifecycleE2ETests.cs
│ │ ├── ClientOptionsE2ETests.cs
│ │ ├── ClientSessionManagementE2ETests.cs
│ │ ├── CommandsE2ETests.cs
│ │ ├── CompactionE2ETests.cs
│ │ ├── ElicitationE2ETests.cs
│ │ ├── ErrorResilienceE2ETests.cs
│ │ ├── EventFidelityE2ETests.cs
│ │ ├── HookLifecycleAndOutputE2ETests.cs
│ │ ├── HooksE2ETests.cs
│ │ ├── MultiClientCommandsElicitationE2ETests.cs
│ │ ├── MultiClientE2ETests.cs
│ │ ├── MultiTurnE2ETests.cs
│ │ ├── PendingWorkResumeE2ETests.cs
│ │ ├── PerSessionAuthE2ETests.cs
│ │ ├── PermissionE2ETests.cs
│ │ ├── RpcAgentE2ETests.cs
│ │ ├── RpcMcpAndSkillsE2ETests.cs
│ │ ├── RpcMcpConfigE2ETests.cs
│ │ ├── RpcServerE2ETests.cs
│ │ ├── RpcSessionStateE2ETests.cs
│ │ ├── RpcShellAndFleetE2ETests.cs
│ │ ├── RpcTasksAndHandlersE2ETests.cs
│ │ ├── SessionConfigE2ETests.cs
│ │ ├── SessionE2ETests.cs
│ │ ├── SessionFsE2ETests.cs
│ │ ├── SessionLifecycleE2ETests.cs
│ │ ├── SessionMcpAndAgentConfigE2ETests.cs
│ │ ├── SkillsE2ETests.cs
│ │ ├── StreamingFidelityE2ETests.cs
│ │ ├── SuspendE2ETests.cs
│ │ ├── SystemMessageTransformE2ETests.cs
│ │ ├── TelemetryExportE2ETests.cs
│ │ ├── ToolResultsE2ETests.cs
│ │ └── ToolsE2ETests.cs
│ ├── GitHub.Copilot.SDK.Test.csproj
│ ├── Harness/
│ │ ├── CapiProxy.cs
│ │ ├── E2ETestBase.cs
│ │ ├── E2ETestContext.cs
│ │ ├── E2ETestFixture.cs
│ │ └── TestHelper.cs
│ └── Unit/
│ ├── CloneTests.cs
│ ├── ForwardCompatibilityTests.cs
│ ├── JsonRpcTests.cs
│ ├── PermissionRequestResultKindTests.cs
│ ├── PublicDtoTests.cs
│ ├── SerializationTests.cs
│ ├── SessionEventSerializationTests.cs
│ └── TelemetryTests.cs
├── go/
│ ├── .gitignore
│ ├── .golangci.yml
│ ├── README.md
│ ├── client.go
│ ├── client_test.go
│ ├── cmd/
│ │ └── bundler/
│ │ └── main.go
│ ├── definetool.go
│ ├── definetool_test.go
│ ├── embeddedcli/
│ │ └── installer.go
│ ├── generated_session_events.go
│ ├── go.mod
│ ├── go.sum
│ ├── internal/
│ │ ├── e2e/
│ │ │ ├── agent_and_compact_rpc_e2e_test.go
│ │ │ ├── ask_user_e2e_test.go
│ │ │ ├── builtin_tools_e2e_test.go
│ │ │ ├── client_api_e2e_test.go
│ │ │ ├── client_e2e_test.go
│ │ │ ├── client_lifecycle_e2e_test.go
│ │ │ ├── client_options_e2e_test.go
│ │ │ ├── commands_and_elicitation_e2e_test.go
│ │ │ ├── compaction_e2e_test.go
│ │ │ ├── error_resilience_e2e_test.go
│ │ │ ├── event_fidelity_e2e_test.go
│ │ │ ├── hooks_e2e_test.go
│ │ │ ├── hooks_extended_e2e_test.go
│ │ │ ├── mcp_and_agents_e2e_test.go
│ │ │ ├── multi_client_e2e_test.go
│ │ │ ├── multi_turn_e2e_test.go
│ │ │ ├── pending_work_resume_e2e_test.go
│ │ │ ├── per_session_auth_e2e_test.go
│ │ │ ├── permissions_e2e_test.go
│ │ │ ├── rpc_e2e_test.go
│ │ │ ├── rpc_mcp_and_skills_e2e_test.go
│ │ │ ├── rpc_mcp_config_e2e_test.go
│ │ │ ├── rpc_server_e2e_test.go
│ │ │ ├── rpc_session_state_e2e_test.go
│ │ │ ├── rpc_shell_and_fleet_e2e_test.go
│ │ │ ├── rpc_tasks_and_handlers_e2e_test.go
│ │ │ ├── session_config_e2e_test.go
│ │ │ ├── session_e2e_test.go
│ │ │ ├── session_fs_e2e_test.go
│ │ │ ├── skills_e2e_test.go
│ │ │ ├── streaming_fidelity_e2e_test.go
│ │ │ ├── suspend_e2e_test.go
│ │ │ ├── system_message_transform_e2e_test.go
│ │ │ ├── telemetry_e2e_test.go
│ │ │ ├── testharness/
│ │ │ │ ├── context.go
│ │ │ │ ├── helper.go
│ │ │ │ └── proxy.go
│ │ │ ├── tool_results_e2e_test.go
│ │ │ └── tools_e2e_test.go
│ │ ├── embeddedcli/
│ │ │ ├── embeddedcli.go
│ │ │ └── embeddedcli_test.go
│ │ ├── flock/
│ │ │ ├── flock.go
│ │ │ ├── flock_other.go
│ │ │ ├── flock_test.go
│ │ │ ├── flock_unix.go
│ │ │ └── flock_windows.go
│ │ └── jsonrpc2/
│ │ ├── frame.go
│ │ ├── jsonrpc2.go
│ │ └── jsonrpc2_test.go
│ ├── permissions.go
│ ├── process_other.go
│ ├── process_windows.go
│ ├── rpc/
│ │ ├── generated_rpc.go
│ │ └── result_union.go
│ ├── samples/
│ │ ├── chat.go
│ │ ├── go.mod
│ │ └── go.sum
│ ├── sdk_protocol_version.go
│ ├── session.go
│ ├── session_event_serialization_test.go
│ ├── session_fs_provider.go
│ ├── session_test.go
│ ├── telemetry.go
│ ├── telemetry_test.go
│ ├── test.sh
│ ├── types.go
│ └── types_test.go
├── java/
│ └── README.md
├── justfile
├── nodejs/
│ ├── .gitignore
│ ├── .npmignore
│ ├── .prettierignore
│ ├── .prettierrc.json
│ ├── README.md
│ ├── docs/
│ │ ├── agent-author.md
│ │ ├── examples.md
│ │ └── extensions.md
│ ├── esbuild-copilotsdk-nodejs.ts
│ ├── eslint.config.js
│ ├── examples/
│ │ └── basic-example.ts
│ ├── package.json
│ ├── samples/
│ │ ├── chat.ts
│ │ └── package.json
│ ├── scripts/
│ │ ├── get-version.js
│ │ ├── set-version.js
│ │ └── update-protocol-version.ts
│ ├── src/
│ │ ├── client.ts
│ │ ├── extension.ts
│ │ ├── generated/
│ │ │ ├── rpc.ts
│ │ │ └── session-events.ts
│ │ ├── index.ts
│ │ ├── sdkProtocolVersion.ts
│ │ ├── session.ts
│ │ ├── sessionFsProvider.ts
│ │ ├── telemetry.ts
│ │ └── types.ts
│ ├── test/
│ │ ├── call-tool-result.test.ts
│ │ ├── cjs-compat.test.ts
│ │ ├── client.test.ts
│ │ ├── e2e/
│ │ │ ├── agent_and_compact_rpc.e2e.test.ts
│ │ │ ├── ask_user.e2e.test.ts
│ │ │ ├── builtin_tools.e2e.test.ts
│ │ │ ├── client.e2e.test.ts
│ │ │ ├── client_api.e2e.test.ts
│ │ │ ├── client_lifecycle.e2e.test.ts
│ │ │ ├── client_options.e2e.test.ts
│ │ │ ├── commands.e2e.test.ts
│ │ │ ├── compaction.e2e.test.ts
│ │ │ ├── error_resilience.e2e.test.ts
│ │ │ ├── event_fidelity.e2e.test.ts
│ │ │ ├── harness/
│ │ │ │ ├── CapiProxy.ts
│ │ │ │ ├── sdkTestContext.ts
│ │ │ │ └── sdkTestHelper.ts
│ │ │ ├── hooks.e2e.test.ts
│ │ │ ├── hooks_extended.e2e.test.ts
│ │ │ ├── mcp_and_agents.e2e.test.ts
│ │ │ ├── multi-client.e2e.test.ts
│ │ │ ├── multi_turn.e2e.test.ts
│ │ │ ├── pending_work_resume.e2e.test.ts
│ │ │ ├── per_session_auth.e2e.test.ts
│ │ │ ├── permissions.e2e.test.ts
│ │ │ ├── rpc.e2e.test.ts
│ │ │ ├── rpc_mcp_and_skills.e2e.test.ts
│ │ │ ├── rpc_mcp_config.e2e.test.ts
│ │ │ ├── rpc_server.e2e.test.ts
│ │ │ ├── rpc_session_state.e2e.test.ts
│ │ │ ├── rpc_shell_and_fleet.e2e.test.ts
│ │ │ ├── rpc_tasks_and_handlers.e2e.test.ts
│ │ │ ├── session.e2e.test.ts
│ │ │ ├── session_config.e2e.test.ts
│ │ │ ├── session_fs.e2e.test.ts
│ │ │ ├── session_lifecycle.e2e.test.ts
│ │ │ ├── skills.e2e.test.ts
│ │ │ ├── streaming_fidelity.e2e.test.ts
│ │ │ ├── suspend.e2e.test.ts
│ │ │ ├── system_message_transform.e2e.test.ts
│ │ │ ├── telemetry.e2e.test.ts
│ │ │ ├── tool_results.e2e.test.ts
│ │ │ ├── tools.e2e.test.ts
│ │ │ └── ui_elicitation.e2e.test.ts
│ │ ├── extension.test.ts
│ │ ├── python-codegen.test.ts
│ │ ├── session_fs_adapter.test.ts
│ │ └── telemetry.test.ts
│ ├── tsconfig.json
│ └── vitest.config.ts
├── python/
│ ├── .gitignore
│ ├── README.md
│ ├── copilot/
│ │ ├── __init__.py
│ │ ├── _jsonrpc.py
│ │ ├── _sdk_protocol_version.py
│ │ ├── _telemetry.py
│ │ ├── client.py
│ │ ├── generated/
│ │ │ ├── __init__.py
│ │ │ ├── rpc.py
│ │ │ └── session_events.py
│ │ ├── py.typed
│ │ ├── session.py
│ │ ├── session_fs_provider.py
│ │ └── tools.py
│ ├── e2e/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── test_agent_and_compact_rpc_e2e.py
│ │ ├── test_ask_user_e2e.py
│ │ ├── test_builtin_tools_e2e.py
│ │ ├── test_client_api_e2e.py
│ │ ├── test_client_e2e.py
│ │ ├── test_client_lifecycle_e2e.py
│ │ ├── test_client_options_e2e.py
│ │ ├── test_commands_e2e.py
│ │ ├── test_compaction_e2e.py
│ │ ├── test_error_resilience_e2e.py
│ │ ├── test_event_fidelity_e2e.py
│ │ ├── test_hooks_e2e.py
│ │ ├── test_hooks_extended_e2e.py
│ │ ├── test_mcp_and_agents_e2e.py
│ │ ├── test_multi_client_e2e.py
│ │ ├── test_multi_turn_e2e.py
│ │ ├── test_pending_work_resume_e2e.py
│ │ ├── test_per_session_auth_e2e.py
│ │ ├── test_permissions_e2e.py
│ │ ├── test_rpc_e2e.py
│ │ ├── test_rpc_mcp_and_skills_e2e.py
│ │ ├── test_rpc_mcp_config_e2e.py
│ │ ├── test_rpc_server_e2e.py
│ │ ├── test_rpc_session_state_e2e.py
│ │ ├── test_rpc_shell_and_fleet_e2e.py
│ │ ├── test_rpc_tasks_and_handlers_e2e.py
│ │ ├── test_session_config_e2e.py
│ │ ├── test_session_e2e.py
│ │ ├── test_session_fs_e2e.py
│ │ ├── test_skills_e2e.py
│ │ ├── test_streaming_fidelity_e2e.py
│ │ ├── test_suspend_e2e.py
│ │ ├── test_system_message_transform_e2e.py
│ │ ├── test_telemetry_e2e.py
│ │ ├── test_tool_results_e2e.py
│ │ ├── test_tools_e2e.py
│ │ ├── test_ui_elicitation_e2e.py
│ │ ├── test_ui_elicitation_multi_client_e2e.py
│ │ └── testharness/
│ │ ├── __init__.py
│ │ ├── context.py
│ │ ├── helper.py
│ │ └── proxy.py
│ ├── pyproject.toml
│ ├── samples/
│ │ └── chat.py
│ ├── scripts/
│ │ └── build-wheels.mjs
│ ├── test_client.py
│ ├── test_commands_and_elicitation.py
│ ├── test_event_forward_compatibility.py
│ ├── test_jsonrpc.py
│ ├── test_rpc_timeout.py
│ ├── test_telemetry.py
│ └── test_tools.py
├── scripts/
│ ├── codegen/
│ │ ├── .gitignore
│ │ ├── csharp.ts
│ │ ├── go.ts
│ │ ├── package.json
│ │ ├── python.ts
│ │ ├── typescript.ts
│ │ └── utils.ts
│ ├── corrections/
│ │ ├── .gitignore
│ │ ├── collect-corrections.js
│ │ ├── package.json
│ │ ├── test/
│ │ │ └── collect-corrections.test.ts
│ │ └── tsconfig.json
│ └── docs-validation/
│ ├── .gitignore
│ ├── extract.ts
│ ├── package.json
│ └── validate.ts
├── sdk-protocol-version.json
└── test/
├── harness/
│ ├── .gitignore
│ ├── capturingHttpProxy.test.ts
│ ├── capturingHttpProxy.ts
│ ├── package.json
│ ├── replayingCapiProxy.test.ts
│ ├── replayingCapiProxy.ts
│ ├── server.ts
│ ├── test-mcp-server.mjs
│ ├── tsconfig.json
│ ├── util.ts
│ └── vitest.config.ts
├── scenarios/
│ ├── .gitignore
│ ├── README.md
│ ├── auth/
│ │ ├── byok-anthropic/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── byok-azure/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── byok-ollama/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── byok-openai/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ └── gh-app/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── index.ts
│ │ └── verify.sh
│ ├── bundling/
│ │ ├── app-backend-to-server/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── app-direct-server/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ ├── src/
│ │ │ │ │ └── index.ts
│ │ │ │ └── tsconfig.json
│ │ │ └── verify.sh
│ │ ├── container-proxy/
│ │ │ ├── .dockerignore
│ │ │ ├── Dockerfile
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── docker-compose.yml
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── proxy.py
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ ├── src/
│ │ │ │ │ └── index.ts
│ │ │ │ └── tsconfig.json
│ │ │ └── verify.sh
│ │ └── fully-bundled/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ ├── src/
│ │ │ │ └── index.ts
│ │ │ └── tsconfig.json
│ │ └── verify.sh
│ ├── callbacks/
│ │ ├── hooks/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── permissions/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ └── user-input/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── index.ts
│ │ └── verify.sh
│ ├── modes/
│ │ ├── default/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ └── minimal/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── index.ts
│ │ └── verify.sh
│ ├── prompts/
│ │ ├── attachments/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── sample-data.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── reasoning-effort/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ └── system-message/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── index.ts
│ │ └── verify.sh
│ ├── sessions/
│ │ ├── concurrent-sessions/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── infinite-sessions/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── multi-user-long-lived/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── multi-user-short-lived/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── session-resume/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ └── streaming/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── index.ts
│ │ └── verify.sh
│ ├── tools/
│ │ ├── custom-agents/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── mcp-servers/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── no-tools/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── skills/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── sample-skills/
│ │ │ │ └── greeting/
│ │ │ │ └── SKILL.md
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── tool-filtering/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── tool-overrides/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ └── virtual-filesystem/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── index.ts
│ │ └── verify.sh
│ ├── transport/
│ │ ├── README.md
│ │ ├── reconnect/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── stdio/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ └── tcp/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── index.ts
│ │ └── verify.sh
│ └── verify.sh
└── snapshots/
├── agent_and_compact_rpc/
│ └── should_compact_session_history_after_messages.yaml
├── ask-user/
│ ├── should_handle_freeform_user_input_response.yaml
│ ├── should_invoke_user_input_handler_when_model_uses_ask_user_tool.yaml
│ └── should_receive_choices_in_user_input_request.yaml
├── ask_user/
│ ├── handle_freeform_user_input_response.yaml
│ ├── invoke_user_input_handler_when_model_uses_ask_user_tool.yaml
│ ├── receive_choices_in_user_input_request.yaml
│ ├── should_handle_freeform_user_input_response.yaml
│ ├── should_invoke_user_input_handler_when_model_uses_ask_user_tool.yaml
│ └── should_receive_choices_in_user_input_request.yaml
├── askuser/
│ ├── should_handle_freeform_user_input_response.yaml
│ ├── should_invoke_user_input_handler_when_model_uses_ask_user_tool.yaml
│ └── should_receive_choices_in_user_input_request.yaml
├── builtin_tools/
│ ├── should_capture_exit_code_in_output.yaml
│ ├── should_capture_stderr_output.yaml
│ ├── should_create_a_new_file.yaml
│ ├── should_edit_a_file_successfully.yaml
│ ├── should_find_files_by_pattern.yaml
│ ├── should_handle_nonexistent_file_gracefully.yaml
│ ├── should_read_file_with_line_range.yaml
│ └── should_search_for_patterns_in_files.yaml
├── client_api/
│ ├── should_delete_session_by_id.yaml
│ └── should_track_last_session_id_after_session_created.yaml
├── client_lifecycle/
│ ├── should_emit_session_lifecycle_events.yaml
│ └── should_return_last_session_id_after_sending_a_message.yaml
├── client_options/
│ └── should_use_client_cwd_for_default_workingdirectory.yaml
├── combinedconfiguration/
│ └── accept_mcp_servers_and_custom_agents.yaml
├── compaction/
│ ├── should_not_emit_compaction_events_when_infinite_sessions_disabled.yaml
│ └── should_trigger_compaction_with_low_threshold_and_emit_events.yaml
├── customagents/
│ ├── accept_custom_agent_config_on_create.yaml
│ └── accept_custom_agent_config_on_resume.yaml
├── event_fidelity/
│ ├── should_emit_assistant_message_with_messageid.yaml
│ ├── should_emit_events_in_correct_order_for_tool_using_conversation.yaml
│ ├── should_emit_tool_execution_events_with_correct_fields.yaml
│ └── should_include_valid_fields_on_all_events.yaml
├── hooks/
│ ├── deny_tool_execution_when_pre_tool_use_returns_deny.yaml
│ ├── invoke_both_hooks_for_single_tool_call.yaml
│ ├── invoke_post_tool_use_hook_after_model_runs_a_tool.yaml
│ ├── invoke_pre_tool_use_hook_when_model_runs_a_tool.yaml
│ ├── should_deny_tool_execution_when_pretooluse_returns_deny.yaml
│ ├── should_invoke_both_pretooluse_and_posttooluse_hooks_for_a_single_tool_call.yaml
│ ├── should_invoke_both_pretooluse_and_posttooluse_hooks_for_single_tool_call.yaml
│ ├── should_invoke_posttooluse_hook_after_model_runs_a_tool.yaml
│ └── should_invoke_pretooluse_hook_when_model_runs_a_tool.yaml
├── hooks_extended/
│ ├── should_allow_posttooluse_to_return_modifiedresult.yaml
│ ├── should_allow_pretooluse_to_return_modifiedargs_and_suppressoutput.yaml
│ ├── should_invoke_onerroroccurred_hook_when_error_occurs.yaml
│ ├── should_invoke_onsessionend_hook_when_session_is_disconnected.yaml
│ ├── should_invoke_onsessionstart_hook_on_new_session.yaml
│ ├── should_invoke_onuserpromptsubmitted_hook_when_sending_a_message.yaml
│ ├── should_invoke_sessionend_hook.yaml
│ ├── should_invoke_sessionstart_hook.yaml
│ ├── should_invoke_userpromptsubmitted_hook_and_modify_prompt.yaml
│ └── should_register_erroroccurred_hook.yaml
├── mcp-and-agents/
│ ├── should_accept_both_mcp_servers_and_custom_agents.yaml
│ ├── should_accept_custom_agent_configuration_on_session_create.yaml
│ ├── should_accept_custom_agent_configuration_on_session_resume.yaml
│ ├── should_accept_mcp_server_configuration_on_session_create.yaml
│ └── should_accept_mcp_server_configuration_on_session_resume.yaml
├── mcp_and_agents/
│ ├── accept_custom_agent_config_on_create.yaml
│ ├── accept_custom_agent_config_on_resume.yaml
│ ├── accept_mcp_server_config_on_create.yaml
│ ├── accept_mcp_server_config_on_resume.yaml
│ ├── accept_mcp_servers_and_custom_agents.yaml
│ ├── should_accept_both_mcp_servers_and_custom_agents.yaml
│ ├── should_accept_custom_agent_configuration_on_session_create.yaml
│ ├── should_accept_custom_agent_configuration_on_session_resume.yaml
│ ├── should_accept_defaultagent_configuration_on_session_resume.yaml
│ ├── should_accept_mcp_server_configuration_on_session_create.yaml
│ ├── should_accept_mcp_server_configuration_on_session_resume.yaml
│ ├── should_hide_excluded_tools_from_default_agent.yaml
│ └── should_pass_literal_env_values_to_mcp_server_subprocess.yaml
├── mcpservers/
│ ├── accept_mcp_server_config_on_create.yaml
│ └── accept_mcp_server_config_on_resume.yaml
├── multi_client/
│ ├── both_clients_see_tool_request_and_completion_events.yaml
│ ├── disconnecting_client_removes_its_tools.yaml
│ ├── one_client_approves_permission_and_both_see_the_result.yaml
│ ├── one_client_rejects_permission_and_both_see_the_result.yaml
│ └── two_clients_register_different_tools_and_agent_uses_both.yaml
├── multi_turn/
│ ├── should_handle_file_creation_then_reading_across_turns.yaml
│ └── should_use_tool_results_from_previous_turns.yaml
├── pending_work_resume/
│ ├── should_continue_parallel_pending_external_tool_requests_after_resume.yaml
│ ├── should_continue_pending_external_tool_request_after_resume.yaml
│ ├── should_continue_pending_permission_request_after_resume.yaml
│ └── should_resume_successfully_when_no_pending_work_exists.yaml
├── permissions/
│ ├── async_permission_handler.yaml
│ ├── deny_permission.yaml
│ ├── permission_handler_errors.yaml
│ ├── permission_handler_for_shell_commands.yaml
│ ├── permission_handler_for_write_operations.yaml
│ ├── resume_session_with_permission_handler.yaml
│ ├── should_deny_permission_when_handler_returns_denied.yaml
│ ├── should_deny_tool_operations_when_handler_explicitly_denies.yaml
│ ├── should_deny_tool_operations_when_handler_explicitly_denies_after_resume.yaml
│ ├── should_handle_async_permission_handler.yaml
│ ├── should_handle_permission_handler_errors_gracefully.yaml
│ ├── should_invoke_permission_handler_for_write_operations.yaml
│ ├── should_receive_toolcallid_in_permission_requests.yaml
│ ├── should_resume_session_with_permission_handler.yaml
│ ├── should_work_with_approve_all_permission_handler.yaml
│ └── tool_call_id_in_permission_requests.yaml
├── rpc_session_state/
│ ├── should_compact_session_history_after_messages.yaml
│ └── should_fork_session_with_persisted_messages.yaml
├── rpc_shell_and_fleet/
│ └── should_start_fleet_and_complete_custom_tool_task.yaml
├── session/
│ ├── disposeasync_from_handler_does_not_deadlock.yaml
│ ├── handler_exception_does_not_halt_event_delivery.yaml
│ ├── send_returns_immediately_while_events_stream_in_background.yaml
│ ├── sendandwait_blocks_until_session_idle_and_returns_final_assistant_message.yaml
│ ├── sendandwait_throws_on_timeout.yaml
│ ├── sendandwait_throws_operationcanceledexception_when_token_cancelled.yaml
│ ├── should_abort_a_session.yaml
│ ├── should_accept_blob_attachments.yaml
│ ├── should_create_a_session_with_appended_systemmessage_config.yaml
│ ├── should_create_a_session_with_availabletools.yaml
│ ├── should_create_a_session_with_customized_systemmessage_config.yaml
│ ├── should_create_a_session_with_defaultagent_excludedtools.yaml
│ ├── should_create_a_session_with_excludedtools.yaml
│ ├── should_create_a_session_with_replaced_systemmessage_config.yaml
│ ├── should_create_session_with_custom_config_dir.yaml
│ ├── should_create_session_with_custom_tool.yaml
│ ├── should_delete_session.yaml
│ ├── should_get_last_session_id.yaml
│ ├── should_get_session_metadata.yaml
│ ├── should_get_session_metadata_by_id.yaml
│ ├── should_have_stateful_conversation.yaml
│ ├── should_list_sessions.yaml
│ ├── should_list_sessions_with_context.yaml
│ ├── should_receive_session_events.yaml
│ ├── should_resume_a_session_using_a_new_client.yaml
│ ├── should_resume_a_session_using_the_same_client.yaml
│ ├── should_send_with_custom_requestheaders.yaml
│ ├── should_send_with_directory_attachment.yaml
│ ├── should_send_with_file_attachment.yaml
│ ├── should_send_with_github_reference_attachment.yaml
│ ├── should_send_with_mode_property.yaml
│ ├── should_send_with_selection_attachment.yaml
│ ├── should_set_model_on_existing_session.yaml
│ └── should_set_model_with_reasoningeffort.yaml
├── session_config/
│ ├── should_accept_blob_attachments.yaml
│ ├── should_accept_message_attachments.yaml
│ ├── should_apply_availabletools_on_session_resume.yaml
│ ├── should_apply_systemmessage_on_session_resume.yaml
│ ├── should_apply_workingdirectory_on_session_resume.yaml
│ ├── should_forward_clientname_in_user_agent.yaml
│ ├── should_forward_clientname_in_useragent.yaml
│ ├── should_forward_custom_provider_headers_on_create.yaml
│ ├── should_forward_custom_provider_headers_on_resume.yaml
│ ├── should_use_workingdirectory_for_tool_execution.yaml
│ ├── vision_disabled_then_enabled_via_setmodel.yaml
│ └── vision_enabled_then_disabled_via_setmodel.yaml
├── session_fs/
│ ├── should_load_session_data_from_fs_provider_on_resume.yaml
│ ├── should_map_large_output_handling_into_sessionfs.yaml
│ ├── should_persist_plan_md_via_sessionfs.yaml
│ ├── should_reject_setprovider_when_sessions_already_exist.yaml
│ ├── should_route_file_operations_through_the_session_fs_provider.yaml
│ ├── should_succeed_with_compaction_while_using_sessionfs.yaml
│ └── should_write_workspace_metadata_via_sessionfs.yaml
├── session_lifecycle/
│ ├── should_delete_session_permanently.yaml
│ ├── should_list_created_sessions_after_sending_a_message.yaml
│ ├── should_return_events_via_getmessages_after_conversation.yaml
│ └── should_support_multiple_concurrent_sessions.yaml
├── skills/
│ ├── should_allow_agent_with_skills_to_invoke_skill.yaml
│ ├── should_load_and_apply_skill_from_skilldirectories.yaml
│ ├── should_not_apply_skill_when_disabled_via_disabledskills.yaml
│ └── should_not_provide_skills_to_agent_without_skills_field.yaml
├── streaming_fidelity/
│ ├── should_emit_assistantmessagestart_before_deltas_with_matching_messageid.yaml
│ ├── should_not_produce_deltas_when_streaming_is_disabled.yaml
│ ├── should_produce_delta_events_when_streaming_is_enabled.yaml
│ └── should_produce_deltas_after_session_resume.yaml
├── suspend/
│ ├── should_allow_resume_and_continue_conversation_after_suspend.yaml
│ ├── should_cancel_pending_permission_request_when_suspending.yaml
│ ├── should_reject_pending_external_tool_when_suspending.yaml
│ └── should_suspend_idle_session_without_throwing.yaml
├── system_message_transform/
│ ├── should_apply_transform_modifications_to_section_content.yaml
│ ├── should_invoke_transform_callbacks_with_section_content.yaml
│ └── should_work_with_static_overrides_and_transforms_together.yaml
├── telemetry/
│ └── should_export_file_telemetry_for_sdk_interactions.yaml
├── tool_results/
│ ├── should_handle_structured_toolresultobject_from_custom_tool.yaml
│ ├── should_handle_tool_result_with_failure_resulttype.yaml
│ ├── should_pass_validated_zod_parameters_to_tool_handler.yaml
│ └── should_preserve_tooltelemetry_and_not_stringify_structured_results_for_llm.yaml
└── tools/
├── can_receive_and_return_complex_types.yaml
├── denies_custom_tool_when_permission_denied.yaml
├── handles_tool_calling_errors.yaml
├── invokes_built_in_tools.yaml
├── invokes_custom_tool.yaml
├── invokes_custom_tool_with_permission_handler.yaml
├── overrides_built_in_tool_with_custom_tool.yaml
└── skippermission_sent_in_tool_definition.yaml
================================================
FILE CONTENTS
================================================
================================================
FILE: .devcontainer/devcontainer.json
================================================
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:3-3.14-trixie",
"features": {
"ghcr.io/devcontainers/features/copilot-cli:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers-extra/features/uv:1": {},
"ghcr.io/schlich/devcontainer-features/just:0": {},
"ghcr.io/devcontainers/features/dotnet:2": {}
}
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
================================================
FILE: .gitattributes
================================================
.github/workflows/*.lock.yml linguist-generated=true merge=ours
# Generated files — keep LF line endings so codegen output is deterministic across platforms.
nodejs/src/generated/* eol=lf linguist-generated=true
dotnet/src/Generated/* eol=lf linguist-generated=true
python/copilot/generated/* eol=lf linguist-generated=true
go/generated_session_events.go eol=lf linguist-generated=true
go/rpc/generated_rpc.go eol=lf linguist-generated=true
================================================
FILE: .github/CODEOWNERS
================================================
* @github/copilot-sdk
================================================
FILE: .github/actions/setup-copilot/action.yml
================================================
name: "Setup Copilot"
description: "Setup Copilot based on the project's package.json file."
outputs:
cli-path:
description: "Path to the Copilot CLI"
value: ${{ steps.cli-path.outputs.path }}
runs:
using: "composite"
steps:
- uses: actions/setup-node@v6
with:
cache: "npm"
cache-dependency-path: "./nodejs/package-lock.json"
node-version: 22
- name: Install dependencies
run: npm --prefix "$(pwd)/nodejs" ci --ignore-scripts
shell: bash
- name: Set CLI path
id: cli-path
run: echo "path=$(pwd)/nodejs/node_modules/@github/copilot/index.js" >> $GITHUB_OUTPUT
shell: bash
- name: Verify CLI works
run: node ${{ steps.cli-path.outputs.path }} --version
shell: bash
================================================
FILE: .github/agents/agentic-workflows.agent.md
================================================
---
description: GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing
disable-model-invocation: true
---
# GitHub Agentic Workflows Agent
This agent helps you work with **GitHub Agentic Workflows (gh-aw)**, a CLI extension for creating AI-powered workflows in natural language using markdown files.
## What This Agent Does
This is a **dispatcher agent** that routes your request to the appropriate specialized prompt based on your task:
- **Creating new workflows**: Routes to `create` prompt
- **Updating existing workflows**: Routes to `update` prompt
- **Debugging workflows**: Routes to `debug` prompt
- **Upgrading workflows**: Routes to `upgrade-agentic-workflows` prompt
- **Creating report-generating workflows**: Routes to `report` prompt — consult this whenever the workflow posts status updates, audits, analyses, or any structured output as issues, discussions, or comments
- **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt
- **Fixing Dependabot PRs**: Routes to `dependabot` prompt — use this when Dependabot opens PRs that modify generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`). Never merge those PRs directly; instead update the source `.md` files and rerun `gh aw compile --dependabot` to bundle all fixes
- **Analyzing test coverage**: Routes to `test-coverage` prompt — consult this whenever the workflow reads, analyzes, or reports on test coverage data from PRs or CI runs
Workflows may optionally include:
- **Project tracking / monitoring** (GitHub Projects updates, status reporting)
- **Orchestration / coordination** (one workflow assigning agents or dispatching and coordinating other workflows)
## Files This Applies To
- Workflow files: `.github/workflows/*.md` and `.github/workflows/**/*.md`
- Workflow lock files: `.github/workflows/*.lock.yml`
- Shared components: `.github/workflows/shared/*.md`
- Configuration: https://github.com/github/gh-aw/blob/v0.64.2/.github/aw/github-agentic-workflows.md
## Problems This Solves
- **Workflow Creation**: Design secure, validated agentic workflows with proper triggers, tools, and permissions
- **Workflow Debugging**: Analyze logs, identify missing tools, investigate failures, and fix configuration issues
- **Version Upgrades**: Migrate workflows to new gh-aw versions, apply codemods, fix breaking changes
- **Component Design**: Create reusable shared workflow components that wrap MCP servers
## How to Use
When you interact with this agent, it will:
1. **Understand your intent** - Determine what kind of task you're trying to accomplish
2. **Route to the right prompt** - Load the specialized prompt file for your task
3. **Execute the task** - Follow the detailed instructions in the loaded prompt
## Available Prompts
### Create New Workflow
**Load when**: User wants to create a new workflow from scratch, add automation, or design a workflow that doesn't exist yet
**Prompt file**: https://github.com/github/gh-aw/blob/v0.64.2/.github/aw/create-agentic-workflow.md
**Use cases**:
- "Create a workflow that triages issues"
- "I need a workflow to label pull requests"
- "Design a weekly research automation"
### Update Existing Workflow
**Load when**: User wants to modify, improve, or refactor an existing workflow
**Prompt file**: https://github.com/github/gh-aw/blob/v0.64.2/.github/aw/update-agentic-workflow.md
**Use cases**:
- "Add web-fetch tool to the issue-classifier workflow"
- "Update the PR reviewer to use discussions instead of issues"
- "Improve the prompt for the weekly-research workflow"
### Debug Workflow
**Load when**: User needs to investigate, audit, debug, or understand a workflow, troubleshoot issues, analyze logs, or fix errors
**Prompt file**: https://github.com/github/gh-aw/blob/v0.64.2/.github/aw/debug-agentic-workflow.md
**Use cases**:
- "Why is this workflow failing?"
- "Analyze the logs for workflow X"
- "Investigate missing tool calls in run #12345"
### Upgrade Agentic Workflows
**Load when**: User wants to upgrade workflows to a new gh-aw version or fix deprecations
**Prompt file**: https://github.com/github/gh-aw/blob/v0.64.2/.github/aw/upgrade-agentic-workflows.md
**Use cases**:
- "Upgrade all workflows to the latest version"
- "Fix deprecated fields in workflows"
- "Apply breaking changes from the new release"
### Create a Report-Generating Workflow
**Load when**: The workflow being created or updated produces reports — recurring status updates, audit summaries, analyses, or any structured output posted as a GitHub issue, discussion, or comment
**Prompt file**: https://github.com/github/gh-aw/blob/v0.64.2/.github/aw/report.md
**Use cases**:
- "Create a weekly CI health report"
- "Post a daily security audit to Discussions"
- "Add a status update comment to open PRs"
### Create Shared Agentic Workflow
**Load when**: User wants to create a reusable workflow component or wrap an MCP server
**Prompt file**: https://github.com/github/gh-aw/blob/v0.64.2/.github/aw/create-shared-agentic-workflow.md
**Use cases**:
- "Create a shared component for Notion integration"
- "Wrap the Slack MCP server as a reusable component"
- "Design a shared workflow for database queries"
### Fix Dependabot PRs
**Load when**: User needs to close or fix open Dependabot PRs that update dependencies in generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`)
**Prompt file**: https://github.com/github/gh-aw/blob/v0.64.2/.github/aw/dependabot.md
**Use cases**:
- "Fix the open Dependabot PRs for npm dependencies"
- "Bundle and close the Dependabot PRs for workflow dependencies"
- "Update @playwright/test to fix the Dependabot PR"
### Analyze Test Coverage
**Load when**: The workflow reads, analyzes, or reports test coverage — whether triggered by a PR, a schedule, or a slash command. Always consult this prompt before designing the coverage data strategy.
**Prompt file**: https://github.com/github/gh-aw/blob/v0.64.2/.github/aw/test-coverage.md
**Use cases**:
- "Create a workflow that comments coverage on PRs"
- "Analyze coverage trends over time"
- "Add a coverage gate that blocks PRs below a threshold"
## Instructions
When a user interacts with you:
1. **Identify the task type** from the user's request
2. **Load the appropriate prompt** from the GitHub repository URLs listed above
3. **Follow the loaded prompt's instructions** exactly
4. **If uncertain**, ask clarifying questions to determine the right prompt
## Quick Reference
```bash
# Initialize repository for agentic workflows
gh aw init
# Generate the lock file for a workflow
gh aw compile [workflow-name]
# Debug workflow runs
gh aw logs [workflow-name]
gh aw audit <run-id>
# Upgrade workflows
gh aw fix --write
gh aw compile --validate
```
## Key Features of gh-aw
- **Natural Language Workflows**: Write workflows in markdown with YAML frontmatter
- **AI Engine Support**: Copilot, Claude, Codex, or custom engines
- **MCP Server Integration**: Connect to Model Context Protocol servers for tools
- **Safe Outputs**: Structured communication between AI and GitHub API
- **Strict Mode**: Security-first validation and sandboxing
- **Shared Components**: Reusable workflow building blocks
- **Repo Memory**: Persistent git-backed storage for agents
- **Sandboxed Execution**: All workflows run in the Agent Workflow Firewall (AWF) sandbox, enabling full `bash` and `edit` tools by default
## Important Notes
- Always reference the instructions file at https://github.com/github/gh-aw/blob/v0.64.2/.github/aw/github-agentic-workflows.md for complete documentation
- Use the MCP tool `agentic-workflows` when running in GitHub Copilot Cloud
- Workflows must be compiled to `.lock.yml` files before running in GitHub Actions
- **Bash tools are enabled by default** - Don't restrict bash commands unnecessarily since workflows are sandboxed by the AWF
- Follow security best practices: minimal permissions, explicit network access, no template injection
- **Network configuration**: Use ecosystem identifiers (`node`, `python`, `go`, etc.) or explicit FQDNs in `network.allowed`. Bare shorthands like `npm` or `pypi` are **not** valid. See https://github.com/github/gh-aw/blob/v0.64.2/.github/aw/network.md for the full list of valid ecosystem identifiers and domain patterns.
- **Single-file output**: When creating a workflow, produce exactly **one** workflow `.md` file. Do not create separate documentation files (architecture docs, runbooks, usage guides, etc.). If documentation is needed, add a brief `## Usage` section inside the workflow file itself.
================================================
FILE: .github/agents/docs-maintenance.agent.md
================================================
---
description: Audit SDK documentation and generate an actionable improvement plan.
tools:
- grep
- glob
- view
- create
- edit
---
# SDK Documentation Maintenance Agent
You are a documentation auditor for the GitHub Copilot SDK. Your job is to analyze the documentation and **produce a prioritized action plan** of improvements needed.
## IMPORTANT: Output Format
**You do NOT make changes directly.** Instead, you:
1. **Audit** the documentation against the standards below
2. **Generate a plan** as a markdown file with actionable items
The human will then review the plan and selectively ask Copilot to implement specific items.
> **Note:** When run from github.com, the platform will automatically create a PR with your changes. When run locally, you just create the file.
### Plan Output Format
Create a file called `docs/IMPROVEMENT_PLAN.md` with this structure:
```markdown
# Documentation Improvement Plan
Generated: [date]
Audited by: docs-maintenance agent
## Summary
- **Coverage**: X% of SDK features documented
- **Sample Accuracy**: X issues found
- **Link Health**: X broken links
- **Multi-language**: X missing examples
## Critical Issues (Fix Immediately)
### 1. [Issue Title]
- **File**: `docs/path/to/file.md`
- **Line**: ~42
- **Problem**: [description]
- **Fix**: [specific action to take]
### 2. ...
## High Priority (Should Fix Soon)
### 1. [Issue Title]
- **File**: `docs/path/to/file.md`
- **Problem**: [description]
- **Fix**: [specific action to take]
## Medium Priority (Nice to Have)
### 1. ...
## Low Priority (Future Improvement)
### 1. ...
## Missing Documentation
The following SDK features lack documentation:
- [ ] `feature_name` - needs new doc at `docs/path/suggested.md`
- [ ] ...
## Sample Code Fixes Needed
The following code samples don't match the SDK interface:
### File: `docs/example.md`
**Line ~25 - TypeScript sample uses wrong method name:**
```typescript
// Current (wrong):
await client.create_session()
// Should be:
await client.createSession()
```
**Line ~45 - Python sample has camelCase:**
```python
# Current (wrong):
client = CopilotClient(cliPath="/usr/bin/copilot")
# Should be:
client = CopilotClient(cli_path="/usr/bin/copilot")
```
## Broken Links
| Source File | Line | Broken Link | Suggested Fix |
|-------------|------|-------------|---------------|
| `docs/a.md` | 15 | `./missing.md` | Remove or create file |
## Consistency Issues
- [ ] Term "XXX" used inconsistently (file1.md says "A", file2.md says "B")
- [ ] ...
```
After creating this plan file, your work is complete. The platform (github.com) will handle creating a PR if applicable.
## Documentation Standards
The SDK documentation must meet these quality standards:
### 1. Feature Coverage
Every major SDK feature should be documented. Core features include:
**Client & Connection:**
- Client initialization and configuration
- Connection modes (stdio vs TCP)
- Authentication options
**Session Management:**
- Creating sessions
- Resuming sessions
- Destroying/deleting sessions
- Listing sessions
- Infinite sessions and compaction
**Messaging:**
- Sending messages
- Attachments (file, directory, selection)
- Streaming responses
- Aborting requests
**Tools:**
- Registering custom tools
- Tool schemas (JSON Schema)
- Tool handlers
- Permission handling
**Hooks:**
- Pre-tool use (permission control)
- Post-tool use (result modification)
- User prompt submitted
- Session start/end
- Error handling
**MCP Servers:**
- Local/stdio servers
- Remote HTTP/SSE servers
- Configuration options
- Debugging MCP issues
**Events:**
- Event subscription
- Event types
- Streaming vs final events
**Advanced:**
- Custom providers (BYOK)
- System message customization
- Custom agents
- Skills
### 2. Multi-Language Support
All documentation must include examples for all four SDKs:
- **Node.js / TypeScript**
- **Python**
- **Go**
- **.NET (C#)**
Use collapsible `<details>` sections with the first language open by default.
### 3. Content Structure
Each documentation file should include:
- Clear title and introduction
- Table of contents for longer docs
- Code examples for all languages
- Reference tables for options/parameters
- Common patterns and use cases
- Best practices section
- "See Also" links to related docs
### 4. Link Integrity
All internal links must:
- Point to existing files
- Use relative paths (e.g., `./hooks/overview.md`, `../debugging.md`)
- Include anchor links where appropriate (e.g., `#session-start`)
### 5. Consistency
Maintain consistency in:
- Terminology (use same terms across all docs)
- Code style (consistent formatting in examples)
- Section ordering (similar docs should have similar structure)
- Voice and tone (clear, direct, developer-friendly)
## Audit Checklist
When auditing documentation, check:
### Completeness
- [ ] All major SDK features are documented
- [ ] All four languages have examples
- [ ] API reference covers all public methods
- [ ] Configuration options are documented
- [ ] Error scenarios are explained
### Accuracy
- [ ] Code examples are correct and runnable
- [ ] Type signatures match actual SDK types
- [ ] Default values are accurate
- [ ] Behavior descriptions match implementation
### Links
- [ ] All internal links resolve to existing files
- [ ] External links are valid and relevant
- [ ] Anchor links point to existing sections
### Discoverability
- [ ] Clear navigation between related topics
- [ ] Consistent "See Also" sections
- [ ] Searchable content (good headings, keywords)
- [ ] README links to key documentation
### Clarity
- [ ] Jargon is explained or avoided
- [ ] Examples are practical and realistic
- [ ] Complex topics have step-by-step explanations
- [ ] Error messages are helpful
## Documentation Structure
The expected documentation structure is:
```
docs/
├── getting-started.md # Quick start tutorial
├── debugging.md # General debugging guide
├── compatibility.md # SDK vs CLI feature comparison
├── hooks/
│ ├── overview.md # Hooks introduction
│ ├── pre-tool-use.md # Permission control
│ ├── post-tool-use.md # Result transformation
│ ├── user-prompt-submitted.md
│ ├── session-lifecycle.md
│ └── error-handling.md
└── mcp/
├── overview.md # MCP configuration
└── debugging.md # MCP troubleshooting
```
Additional directories to consider:
- `docs/tools/` - Custom tool development
- `docs/events/` - Event reference
- `docs/advanced/` - Advanced topics (providers, agents, skills)
- `docs/api/` - API reference (auto-generated or manual)
## Audit Process
### Step 1: Inventory Current Docs
```bash
# List all documentation files
find docs -name "*.md" -type f | sort
# Check for README references
grep -r "docs/" README.md
```
### Step 2: Check Feature Coverage
Compare documented features against SDK types:
```bash
# Node.js types
grep -E "export (interface|type|class)" nodejs/src/types.ts nodejs/src/client.ts nodejs/src/session.ts
# Python types
grep -E "^class |^def " python/copilot/types.py python/copilot/client.py python/copilot/session.py
# Go types
grep -E "^type |^func " go/types.go go/client.go go/session.go
# .NET types
grep -E "public (class|interface|enum)" dotnet/src/Types.cs dotnet/src/Client.cs dotnet/src/Session.cs
```
### Step 3: Validate Links
```bash
# Find all markdown links
grep -roh '\[.*\](\..*\.md[^)]*' docs/
# Check each link exists
for link in $(grep -roh '\](\..*\.md' docs/ | sed 's/\](//' | sort -u); do
# Resolve relative to docs/
if [ ! -f "docs/$link" ]; then
echo "Broken link: $link"
fi
done
```
### Step 4: Check Multi-Language Examples
```bash
# Ensure all docs have examples for each language
for file in $(find docs -name "*.md"); do
echo "=== $file ==="
grep -c "Node.js\|TypeScript" "$file" || echo "Missing Node.js"
grep -c "Python" "$file" || echo "Missing Python"
grep -c "Go" "$file" || echo "Missing Go"
grep -c "\.NET\|C#" "$file" || echo "Missing .NET"
done
```
### Step 5: Validate Code Samples Against SDK Interface
**CRITICAL**: All code examples must match the actual SDK interface. Verify method names, parameter names, types, and return values.
#### Node.js/TypeScript Validation
Check that examples use correct method signatures:
```bash
# Extract public methods from SDK
grep -E "^\s*(async\s+)?[a-z][a-zA-Z]+\(" nodejs/src/client.ts nodejs/src/session.ts | head -50
# Key interfaces to verify against
cat nodejs/src/types.ts | grep -A 20 "export interface CopilotClientOptions"
cat nodejs/src/types.ts | grep -A 50 "export interface SessionConfig"
cat nodejs/src/types.ts | grep -A 20 "export interface SessionHooks"
cat nodejs/src/types.ts | grep -A 10 "export interface ExportSessionOptions"
```
**Must match:**
- `CopilotClient` constructor options: `cliPath`, `cliUrl`, `useStdio`, `port`, `logLevel`, `autoStart`, `env`, `githubToken`, `useLoggedInUser`
- `createSession()` config: `model`, `tools`, `hooks`, `systemMessage`, `mcpServers`, `availableTools`, `excludedTools`, `streaming`, `reasoningEffort`, `provider`, `infiniteSessions`, `customAgents`, `workingDirectory`
- `CopilotSession` methods: `send()`, `sendAndWait()`, `getMessages()`, `disconnect()`, `abort()`, `on()`, `once()`, `off()`
- Hook names: `onPreToolUse`, `onPostToolUse`, `onUserPromptSubmitted`, `onSessionStart`, `onSessionEnd`, `onErrorOccurred`
#### Python Validation
```bash
# Extract public methods
grep -E "^\s+async def [a-z]" python/copilot/client.py python/copilot/session.py
# Key types
cat python/copilot/types.py | grep -A 20 "class CopilotClientOptions"
cat python/copilot/types.py | grep -A 30 "class SessionConfig"
cat python/copilot/types.py | grep -A 15 "class SessionHooks"
```
**Must match (snake_case):**
- `CopilotClient` options: `cli_path`, `cli_url`, `use_stdio`, `port`, `log_level`, `auto_start`, `env`, `github_token`, `use_logged_in_user`
- `create_session()` config keys: `model`, `tools`, `hooks`, `system_message`, `mcp_servers`, `available_tools`, `excluded_tools`, `streaming`, `reasoning_effort`, `provider`, `infinite_sessions`, `custom_agents`, `working_directory`
- `CopilotSession` methods: `send()`, `send_and_wait()`, `get_messages()`, `disconnect()`, `abort()`, `export_session()`
- Hook names: `on_pre_tool_use`, `on_post_tool_use`, `on_user_prompt_submitted`, `on_session_start`, `on_session_end`, `on_error_occurred`
#### Go Validation
```bash
# Extract public methods (capitalized = exported)
grep -E "^func \([a-z]+ \*[A-Z]" go/client.go go/session.go
# Key types
cat go/types.go | grep -A 20 "type ClientOptions struct"
cat go/types.go | grep -A 30 "type SessionConfig struct"
cat go/types.go | grep -A 15 "type SessionHooks struct"
```
**Must match (PascalCase for exported):**
- `ClientOptions` fields: `CLIPath`, `CLIUrl`, `UseStdio`, `Port`, `LogLevel`, `AutoStart`, `Env`, `GithubToken`, `UseLoggedInUser`
- `SessionConfig` fields: `Model`, `Tools`, `Hooks`, `SystemMessage`, `MCPServers`, `AvailableTools`, `ExcludedTools`, `Streaming`, `ReasoningEffort`, `Provider`, `InfiniteSessions`, `CustomAgents`, `WorkingDirectory`
- `Session` methods: `Send()`, `SendAndWait()`, `GetMessages()`, `Disconnect()`, `Abort()`, `ExportSession()`
- Hook fields: `OnPreToolUse`, `OnPostToolUse`, `OnUserPromptSubmitted`, `OnSessionStart`, `OnSessionEnd`, `OnErrorOccurred`
#### .NET Validation
```bash
# Extract public methods
grep -E "public (async Task|void|[A-Z])" dotnet/src/Client.cs dotnet/src/Session.cs | head -50
# Key types
cat dotnet/src/Types.cs | grep -A 20 "public class CopilotClientOptions"
cat dotnet/src/Types.cs | grep -A 40 "public class SessionConfig"
cat dotnet/src/Types.cs | grep -A 15 "public class SessionHooks"
```
**Must match (PascalCase):**
- `CopilotClientOptions` properties: `CliPath`, `CliUrl`, `UseStdio`, `Port`, `LogLevel`, `AutoStart`, `Environment`, `GithubToken`, `UseLoggedInUser`
- `SessionConfig` properties: `Model`, `Tools`, `Hooks`, `SystemMessage`, `McpServers`, `AvailableTools`, `ExcludedTools`, `Streaming`, `ReasoningEffort`, `Provider`, `InfiniteSessions`, `CustomAgents`, `WorkingDirectory`
- `CopilotSession` methods: `SendAsync()`, `SendAndWaitAsync()`, `GetMessagesAsync()`, `DisposeAsync()`, `AbortAsync()`, `ExportSessionAsync()`
- Hook properties: `OnPreToolUse`, `OnPostToolUse`, `OnUserPromptSubmitted`, `OnSessionStart`, `OnSessionEnd`, `OnErrorOccurred`
#### Common Sample Errors to Check
1. **Wrong method names:**
- ❌ `client.create_session()` in TypeScript (should be `createSession()`)
- ❌ `session.SendAndWait()` in Python (should be `send_and_wait()`)
- ❌ `client.CreateSession()` in Go without context (should be `CreateSession(ctx, config)`)
2. **Wrong parameter names:**
- ❌ `{ cli_path: "..." }` in TypeScript (should be `cliPath`)
- ❌ `{ cliPath: "..." }` in Python (should be `cli_path`)
- ❌ `McpServers` in Go (should be `MCPServers`)
3. **Missing required parameters:**
- Go methods require `context.Context` as first parameter
- .NET async methods should use `CancellationToken`
4. **Wrong hook structure:**
- ❌ `hooks: { preToolUse: ... }` (should be `onPreToolUse`)
- ❌ `hooks: { OnPreToolUse: ... }` in Python (should be `on_pre_tool_use`)
5. **Outdated APIs:**
- Check for deprecated method names
- Verify against latest SDK version
#### Validation Script
Run this to extract all code blocks and check for common issues:
```bash
# Extract TypeScript examples and check for Python-style naming
grep -A 20 '```typescript' docs/**/*.md | grep -E "cli_path|create_session|send_and_wait" && echo "ERROR: Python naming in TypeScript"
# Extract Python examples and check for camelCase
grep -A 20 '```python' docs/**/*.md | grep -E "cliPath|createSession|sendAndWait" && echo "ERROR: camelCase in Python"
# Check Go examples have context parameter
grep -A 20 '```go' docs/**/*.md | grep -E "CreateSession\([^c]|Send\([^c]" && echo "WARNING: Go method may be missing context"
```
### Step 6: Create the Plan
After completing the audit:
1. Create `docs/IMPROVEMENT_PLAN.md` with all findings organized by priority
2. Your work is complete - the platform handles PR creation
The human reviewer can then:
- Review the plan
- Comment on specific items to prioritize
- Ask Copilot to implement specific fixes from the plan
## Remember
- **You are an auditor, not a fixer** - your job is to find issues and document them clearly
- Each item in the plan should be **actionable** - specific enough that someone (or Copilot) can fix it
- Include **file paths and line numbers** where possible
- Show **before/after code** for sample fixes
- Prioritize issues by **impact on developers**
- The plan becomes the work queue for future improvements
================================================
FILE: .github/aw/actions-lock.json
================================================
{
"entries": {
"actions/checkout@v6.0.2": {
"repo": "actions/checkout",
"version": "v6.0.2",
"sha": "de0fac2e4500dabe0009e67214ff5f5447ce83dd"
},
"actions/download-artifact@v8.0.0": {
"repo": "actions/download-artifact",
"version": "v8.0.0",
"sha": "70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3"
},
"actions/github-script@v8": {
"repo": "actions/github-script",
"version": "v8",
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
},
"actions/upload-artifact@v7.0.0": {
"repo": "actions/upload-artifact",
"version": "v7.0.0",
"sha": "bbbca2ddaa5d8feaa63e36b76fdaad77386f024f"
},
"github/gh-aw-actions/setup@v0.67.4": {
"repo": "github/gh-aw-actions/setup",
"version": "v0.67.4",
"sha": "9d6ae06250fc0ec536a0e5f35de313b35bad7246"
},
"github/gh-aw/actions/setup@v0.52.1": {
"repo": "github/gh-aw/actions/setup",
"version": "v0.52.1",
"sha": "a86e657586e4ac5f549a790628971ec02f6a4a8f"
}
}
}
================================================
FILE: .github/aw/logs/.gitignore
================================================
# Ignore all downloaded workflow logs
*
# But keep the .gitignore file itself
!.gitignore
================================================
FILE: .github/commands/triage_feedback.yml
================================================
trigger: triage_feedback
title: Triage feedback
description: Provide feedback on the triage agent's classification of this issue
surfaces:
- issue
steps:
- type: form
style: modal
body:
- type: textarea
attributes:
label: Feedback
placeholder: Describe what the agent got wrong and what the correct action should have been...
actions:
submit: Submit feedback
cancel: Cancel
- type: repository_dispatch
eventType: triage_feedback
================================================
FILE: .github/copilot-instructions.md
================================================
# GitHub Copilot SDK — Assistant Instructions
**Quick purpose:** Help contributors and AI coding agents quickly understand this mono-repo and be productive (build, test, add SDK features, add E2E tests). ✅
## Big picture 🔧
- The repo implements language SDKs (Node/TS, Python, Go, .NET) that speak to the **Copilot CLI** via **JSON‑RPC** (see `README.md` and `nodejs/src/client.ts`).
- Typical flow: your App → SDK client → JSON-RPC → Copilot CLI (server mode). The CLI must be installed or you can connect to an external CLI server via the `CLI URL option (language-specific casing)` (Node: `cliUrl`, Go: `CLIUrl`, .NET: `CliUrl`, Python: `cli_url`).
## Most important files to read first 📚
- Top-level: `README.md` (architecture + quick start)
- Language entry points: `nodejs/src/client.ts`, `python/README.md`, `go/README.md`, `dotnet/README.md`
- Test harness & E2E: `test/harness/*`, Python harness wrapper `python/e2e/testharness/proxy.py`
- Schemas & type generation: `nodejs/scripts/generate-session-types.ts`
- Session snapshots used by E2E: `test/snapshots/` (used by the replay proxy)
## Developer workflows (commands you’ll use often) ▶️
- Monorepo helpers: use `just` tasks from repo root:
- Install deps: `just install` (runs npm ci, uv pip install -e, go mod download, dotnet restore)
- Format all: `just format` | Lint all: `just lint` | Test all: `just test`
- Per-language:
- Node: `cd nodejs && npm ci` → `npm test` (Vitest), `npm run generate:session-types` to regenerate session-event types
- Python: `cd python && uv pip install -e ".[dev]"` → `uv run pytest` (E2E tests use the test harness)
- Go: `cd go && go test ./...`
- .NET: `cd dotnet && dotnet test test/GitHub.Copilot.SDK.Test.csproj`
- **.NET testing note:** Never add `InternalsVisibleTo` to any project file when writing tests. Tests must only access public APIs.
## Testing & E2E tips ⚙️
- E2E runs against a local **replaying CAPI proxy** (see `test/harness/server.ts`). Most language E2E harnesses spawn that server automatically (see `python/e2e/testharness/proxy.py`).
- Tests rely on YAML snapshot exchanges under `test/snapshots/` — to add test scenarios, add or edit the appropriate YAML files and update tests.
- The harness prints `Listening: http://...` — tests parse this URL to configure CLI or proxy.
## Project-specific conventions & patterns ✅
- Tools: each SDK has helper APIs to expose functions as tools; prefer the language's `DefineTool`/`@define_tool`/`AIFunctionFactory.Create` patterns (see language READMEs).
- Infinite sessions are enabled by default and persist workspace state to `~/.copilot/session-state/{sessionId}`; compaction events are emitted (`session.compaction_start`, `session.compaction_complete`). See language READMEs for usage.
- Streaming: when `streaming`/`Streaming=true` you receive delta events (`assistant.message_delta`, `assistant.reasoning_delta`) and final events (`assistant.message`, `assistant.reasoning`) — tests expect this behavior.
- Type generation is centralized in `nodejs/scripts/generate-session-types.ts` and requires the `@github/copilot` schema to be present (often via `npm link` or installed package).
## Integration & environment notes ⚠️
- The SDK requires a Copilot CLI installation or an external server reachable via the `CLI URL option (language-specific casing)` (Node: `cliUrl`, Go: `CLIUrl`, .NET: `CliUrl`, Python: `cli_url`) or `COPILOT_CLI_PATH`.
- Some scripts (typegen, formatting) call external tools: `gofmt`, `dotnet format`, `tsx` (available via npm), `quicktype`/`quicktype-core` (used by the Node typegen script), and `prettier` (provided as an npm devDependency). Most of these are available through the repo's package scripts or devDependencies—run `just install` (and `cd nodejs && npm ci`) to install them. Ensure the required tools are available in CI / developer machines.
- Tests may assume `node >= 18`, `python >= 3.9`, platform differences handled (Windows uses `shell=True` for npx in harness).
## Where to add new code or tests 🧭
- SDK code: `nodejs/src`, `python/copilot`, `go`, `dotnet/src`
- Unit tests: `nodejs/test`, `python/*`, `go/*`, `dotnet/test`
- E2E tests: `*/e2e/` folders that use the shared replay proxy and `test/snapshots/`
- Generated types: update schema in `@github/copilot` then run `cd nodejs && npm run generate:session-types` and commit generated files in `src/generated` or language generated location.
================================================
FILE: .github/dependabot.yaml
================================================
version: 2
multi-ecosystem-groups:
all:
schedule:
interval: 'weekly'
updates:
- package-ecosystem: 'github-actions'
directory: '/'
multi-ecosystem-group: 'all'
patterns: ['*']
- package-ecosystem: 'devcontainers'
directory: '/'
multi-ecosystem-group: 'all'
patterns: ['*']
# Node.js dependencies
- package-ecosystem: 'npm'
directory: '/nodejs'
multi-ecosystem-group: 'all'
patterns: ['*']
- package-ecosystem: 'npm'
directory: '/test/harness'
multi-ecosystem-group: 'all'
patterns: ['*']
# Python dependencies
- package-ecosystem: 'pip'
directory: '/python'
multi-ecosystem-group: 'all'
patterns: ['*']
# Go dependencies
- package-ecosystem: 'gomod'
directory: '/go'
multi-ecosystem-group: 'all'
patterns: ['*']
# .NET dependencies
- package-ecosystem: 'nuget'
directory: '/dotnet'
multi-ecosystem-group: 'all'
patterns: ['*']
================================================
FILE: .github/lsp.json
================================================
{
"lspServers": {
"csharp": {
"command": "dotnet",
"args": [
"tool",
"run",
"roslyn-language-server",
"--stdio",
"--autoLoadProjects"
],
"fileExtensions": {
".cs": "csharp"
},
"rootUri": "dotnet"
},
"go": {
"command": "gopls",
"args": ["serve"],
"fileExtensions": {
".go": "go"
},
"rootUri": "go"
}
}
}
================================================
FILE: .github/workflows/codegen-check.yml
================================================
name: "Codegen Check"
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'scripts/codegen/**'
- 'nodejs/src/generated/**'
- 'dotnet/src/Generated/**'
- 'python/copilot/generated/**'
- 'go/generated_*.go'
- 'go/rpc/**'
- '.github/workflows/codegen-check.yml'
workflow_dispatch:
permissions:
contents: read
jobs:
check:
name: "Verify generated files are up-to-date"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install nodejs SDK dependencies
working-directory: ./nodejs
run: npm ci
- name: Install codegen dependencies
working-directory: ./scripts/codegen
run: npm ci
- name: Run codegen
working-directory: ./scripts/codegen
run: npm run generate
- name: Check for uncommitted changes
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "::error::Generated files are out of date. Run 'cd scripts/codegen && npm run generate' and commit the changes."
git diff --stat
git diff
exit 1
fi
echo "✅ Generated files are up-to-date"
================================================
FILE: .github/workflows/collect-corrections.yml
================================================
name: Submit triage agent feedback
on:
repository_dispatch:
types: [triage_feedback]
workflow_dispatch:
inputs:
issue_number:
description: "Issue number to submit feedback for"
required: true
type: string
feedback:
description: "Feedback text describing what the triage agent got wrong"
required: true
type: string
concurrency:
group: collect-corrections
cancel-in-progress: false
permissions:
issues: write
contents: read
jobs:
collect:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/github-script@v8
with:
script: |
const script = require('./scripts/corrections/collect-corrections.js')
await script({ github, context })
================================================
FILE: .github/workflows/copilot-setup-steps.yml
================================================
name: "Copilot Setup Steps"
# This workflow configures the environment for GitHub Copilot Agent
# Automatically run the setup steps when they are changed to allow for easy validation
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
# The job MUST be called 'copilot-setup-steps' to be recognized by GitHub Copilot Agent
copilot-setup-steps:
runs-on: ubuntu-latest
# Set minimal permissions for setup steps
# Copilot Agent receives its own token with appropriate permissions
permissions:
contents: read
steps:
# Checkout the repository to install dependencies
- name: Checkout code
uses: actions/checkout@v6.0.2
# Setup Node.js (for TypeScript/JavaScript SDK and tooling)
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
cache: "npm"
cache-dependency-path: |
./nodejs/package-lock.json
./test/harness/package-lock.json
# Setup Python (for Python SDK)
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
# Setup uv (Python package manager used in this repo)
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
# Setup Go (for Go SDK)
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.24"
# Setup .NET (for .NET SDK)
- name: Set up .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: "10.0.x"
# Install just command runner
- name: Install just
uses: extractions/setup-just@v3
# Install gh-aw extension for advanced GitHub CLI features
- name: Install gh-aw extension
run: |
curl -fsSL https://raw.githubusercontent.com/githubnext/gh-aw/refs/heads/main/install-gh-aw.sh | bash
# Install JavaScript dependencies
- name: Install Node.js dependencies
working-directory: ./nodejs
run: npm ci --ignore-scripts
# Install Python dependencies
- name: Install Python dependencies
working-directory: ./python
run: uv sync --all-extras --dev
# Install Go dependencies
- name: Install Go dependencies
working-directory: ./go
run: go mod download
# Restore .NET dependencies
- name: Restore .NET dependencies
working-directory: ./dotnet
run: dotnet restore
# Install test harness dependencies
- name: Install test harness dependencies
working-directory: ./test/harness
run: npm ci --ignore-scripts
# Verify installations
- name: Verify tool installations
run: |
echo "=== Verifying installations ==="
node --version
npm --version
python --version
uv --version
go version
dotnet --version
just --version
gh --version
gh aw version
echo "✅ All tools installed successfully"
================================================
FILE: .github/workflows/corrections-tests.yml
================================================
name: "Triage Agent Corrections Tests"
on:
push:
branches: [main]
paths:
- 'scripts/corrections/**'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'scripts/corrections/**'
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci
working-directory: scripts/corrections
- run: npm test
working-directory: scripts/corrections
================================================
FILE: .github/workflows/cross-repo-issue-analysis.lock.yml
================================================
# ___ _ _
# / _ \ | | (_)
# | |_| | __ _ ___ _ __ | |_ _ ___
# | _ |/ _` |/ _ \ '_ \| __| |/ __|
# | | | | (_| | __/ | | | |_| | (__
# \_| |_/\__, |\___|_| |_|\__|_|\___|
# __/ |
# _ _ |___/
# | | | | / _| |
# | | | | ___ _ __ _ __| |_| | _____ ____
# | |/\| |/ _ \ '__| |/ /| _| |/ _ \ \ /\ / / ___|
# \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \
# \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/
#
# This file was automatically generated by gh-aw (v0.65.5). DO NOT EDIT.
#
# To update this file, edit the corresponding .md file and run:
# gh aw compile
# Not all edits will cause changes to this file.
#
# For more information: https://github.github.com/gh-aw/introduction/overview/
#
# Analyzes copilot-sdk issues to determine if a fix is needed in copilot-agent-runtime, then opens a linked issue there
#
# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"bbe407b2d324d84d7c6653015841817713551b010318cee1ec12dd5c1c077977","compiler_version":"v0.65.5","strict":true,"agent_id":"copilot"}
name: "SDK Runtime Triage"
"on":
issues:
types:
- labeled
workflow_dispatch:
inputs:
aw_context:
default: ""
description: Agent caller context (used internally by Agentic Workflows).
required: false
type: string
issue_number:
description: Issue number to analyze
required: true
type: string
permissions: {}
concurrency:
group: "gh-aw-${{ github.workflow }}-${{ github.event.issue.number || github.run_id }}"
run-name: "SDK Runtime Triage"
jobs:
activation:
needs: pre_activation
if: >
needs.pre_activation.outputs.activated == 'true' && (github.event_name == 'workflow_dispatch' || github.event.label.name == 'runtime triage')
runs-on: ubuntu-slim
permissions:
contents: read
outputs:
body: ${{ steps.sanitized.outputs.body }}
comment_id: ""
comment_repo: ""
lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }}
model: ${{ steps.generate_aw_info.outputs.model }}
secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }}
text: ${{ steps.sanitized.outputs.text }}
title: ${{ steps.sanitized.outputs.title }}
steps:
- name: Setup Scripts
uses: github/gh-aw-actions/setup@15b2fa31e9a1b771c9773c162273924d8f5ea516 # v0.65.5
with:
destination: ${{ runner.temp }}/gh-aw/actions
- name: Generate agentic run info
id: generate_aw_info
env:
GH_AW_INFO_ENGINE_ID: "copilot"
GH_AW_INFO_ENGINE_NAME: "GitHub Copilot CLI"
GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'auto' }}
GH_AW_INFO_VERSION: "latest"
GH_AW_INFO_AGENT_VERSION: "latest"
GH_AW_INFO_CLI_VERSION: "v0.65.5"
GH_AW_INFO_WORKFLOW_NAME: "SDK Runtime Triage"
GH_AW_INFO_EXPERIMENTAL: "false"
GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true"
GH_AW_INFO_STAGED: "false"
GH_AW_INFO_ALLOWED_DOMAINS: '["defaults"]'
GH_AW_INFO_FIREWALL_ENABLED: "true"
GH_AW_INFO_AWF_VERSION: "v0.25.10"
GH_AW_INFO_AWMG_VERSION: ""
GH_AW_INFO_FIREWALL_TYPE: "squid"
GH_AW_COMPILED_STRICT: "true"
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_aw_info.cjs');
await main(core, context);
- name: Validate COPILOT_GITHUB_TOKEN secret
id: validate-secret
run: ${RUNNER_TEMP}/gh-aw/actions/validate_multi_secret.sh COPILOT_GITHUB_TOKEN 'GitHub Copilot CLI' https://github.github.com/gh-aw/reference/engines/#github-copilot-default
env:
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
- name: Checkout .github and .agents folders
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
sparse-checkout: |
.github
.agents
sparse-checkout-cone-mode: true
fetch-depth: 1
- name: Check workflow file timestamps
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_WORKFLOW_FILE: "cross-repo-issue-analysis.lock.yml"
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_workflow_timestamp_api.cjs');
await main();
- name: Check compile-agentic version
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_COMPILED_VERSION: "v0.65.5"
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_version_updates.cjs');
await main();
- name: Compute current body text
id: sanitized
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/compute_text.cjs');
await main();
- name: Create prompt with built-in context
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl
GH_AW_EXPR_54492A5B: ${{ github.event.issue.number || inputs.issue_number }}
GH_AW_GITHUB_ACTOR: ${{ github.actor }}
GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }}
GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }}
GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
GH_AW_GITHUB_EVENT_ISSUE_TITLE: ${{ github.event.issue.title }}
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
# poutine:ignore untrusted_checkout_exec
run: |
bash ${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh
{
cat << 'GH_AW_PROMPT_cf83d6980df47851_EOF'
<system>
GH_AW_PROMPT_cf83d6980df47851_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md"
cat << 'GH_AW_PROMPT_cf83d6980df47851_EOF'
<safe-output-tools>
Tools: create_issue, add_labels(max:3), missing_tool, missing_data, noop
</safe-output-tools>
<github-context>
The following GitHub context information is available for this workflow:
{{#if __GH_AW_GITHUB_ACTOR__ }}
- **actor**: __GH_AW_GITHUB_ACTOR__
{{/if}}
{{#if __GH_AW_GITHUB_REPOSITORY__ }}
- **repository**: __GH_AW_GITHUB_REPOSITORY__
{{/if}}
{{#if __GH_AW_GITHUB_WORKSPACE__ }}
- **workspace**: __GH_AW_GITHUB_WORKSPACE__
{{/if}}
{{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
{{/if}}
{{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
{{/if}}
{{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
{{/if}}
{{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
{{/if}}
{{#if __GH_AW_GITHUB_RUN_ID__ }}
- **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
{{/if}}
</github-context>
GH_AW_PROMPT_cf83d6980df47851_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md"
cat << 'GH_AW_PROMPT_cf83d6980df47851_EOF'
</system>
{{#runtime-import .github/workflows/cross-repo-issue-analysis.md}}
GH_AW_PROMPT_cf83d6980df47851_EOF
} > "$GH_AW_PROMPT"
- name: Interpolate variables and render templates
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
GH_AW_EXPR_54492A5B: ${{ github.event.issue.number || inputs.issue_number }}
GH_AW_GITHUB_EVENT_ISSUE_TITLE: ${{ github.event.issue.title }}
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/interpolate_prompt.cjs');
await main();
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
GH_AW_EXPR_54492A5B: ${{ github.event.issue.number || inputs.issue_number }}
GH_AW_GITHUB_ACTOR: ${{ github.actor }}
GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }}
GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }}
GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
GH_AW_GITHUB_EVENT_ISSUE_TITLE: ${{ github.event.issue.title }}
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: ${{ needs.pre_activation.outputs.activated }}
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const substitutePlaceholders = require('${{ runner.temp }}/gh-aw/actions/substitute_placeholders.cjs');
// Call the substitution function
return await substitutePlaceholders({
file: process.env.GH_AW_PROMPT,
substitutions: {
GH_AW_EXPR_54492A5B: process.env.GH_AW_EXPR_54492A5B,
GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR,
GH_AW_GITHUB_EVENT_COMMENT_ID: process.env.GH_AW_GITHUB_EVENT_COMMENT_ID,
GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: process.env.GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER,
GH_AW_GITHUB_EVENT_ISSUE_NUMBER: process.env.GH_AW_GITHUB_EVENT_ISSUE_NUMBER,
GH_AW_GITHUB_EVENT_ISSUE_TITLE: process.env.GH_AW_GITHUB_EVENT_ISSUE_TITLE,
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: process.env.GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED
}
});
- name: Validate prompt placeholders
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
# poutine:ignore untrusted_checkout_exec
run: bash ${RUNNER_TEMP}/gh-aw/actions/validate_prompt_placeholders.sh
- name: Print prompt
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
# poutine:ignore untrusted_checkout_exec
run: bash ${RUNNER_TEMP}/gh-aw/actions/print_prompt_summary.sh
- name: Upload activation artifact
if: success()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: activation
path: |
/tmp/gh-aw/aw_info.json
/tmp/gh-aw/aw-prompts/prompt.txt
retention-days: 1
agent:
needs: activation
runs-on: ubuntu-latest
permissions:
contents: read
issues: read
env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
GH_AW_ASSETS_ALLOWED_EXTS: ""
GH_AW_ASSETS_BRANCH: ""
GH_AW_ASSETS_MAX_SIZE_KB: 0
GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs
GH_AW_WORKFLOW_ID_SANITIZED: crossrepoissueanalysis
outputs:
checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }}
has_patch: ${{ steps.collect_output.outputs.has_patch }}
inference_access_error: ${{ steps.detect-inference-error.outputs.inference_access_error || 'false' }}
model: ${{ needs.activation.outputs.model }}
output: ${{ steps.collect_output.outputs.output }}
output_types: ${{ steps.collect_output.outputs.output_types }}
steps:
- name: Setup Scripts
uses: github/gh-aw-actions/setup@15b2fa31e9a1b771c9773c162273924d8f5ea516 # v0.65.5
with:
destination: ${{ runner.temp }}/gh-aw/actions
- name: Set runtime paths
id: set-runtime-paths
run: |
echo "GH_AW_SAFE_OUTPUTS=${RUNNER_TEMP}/gh-aw/safeoutputs/outputs.jsonl" >> "$GITHUB_OUTPUT"
echo "GH_AW_SAFE_OUTPUTS_CONFIG_PATH=${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" >> "$GITHUB_OUTPUT"
echo "GH_AW_SAFE_OUTPUTS_TOOLS_PATH=${RUNNER_TEMP}/gh-aw/safeoutputs/tools.json" >> "$GITHUB_OUTPUT"
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Create gh-aw temp directory
run: bash ${RUNNER_TEMP}/gh-aw/actions/create_gh_aw_tmp_dir.sh
- name: Configure gh CLI for GitHub Enterprise
run: bash ${RUNNER_TEMP}/gh-aw/actions/configure_gh_for_ghe.sh
env:
GH_TOKEN: ${{ github.token }}
- name: Clone copilot-agent-runtime
run: git clone --depth 1 https://x-access-token:${{ secrets.RUNTIME_TRIAGE_TOKEN }}@github.com/github/copilot-agent-runtime.git ${{ github.workspace }}/copilot-agent-runtime
- name: Configure Git credentials
env:
REPO_NAME: ${{ github.repository }}
SERVER_URL: ${{ github.server_url }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git config --global am.keepcr true
# Re-authenticate git with GitHub token
SERVER_URL_STRIPPED="${SERVER_URL#https://}"
git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL_STRIPPED}/${REPO_NAME}.git"
echo "Git configured with standard GitHub Actions identity"
- name: Checkout PR branch
id: checkout-pr
if: |
github.event.pull_request || github.event.issue.pull_request
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_TOKEN: ${{ secrets.RUNTIME_TRIAGE_TOKEN }}
with:
github-token: ${{ secrets.RUNTIME_TRIAGE_TOKEN }}
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs');
await main();
- name: Install GitHub Copilot CLI
run: ${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh latest
- name: Install AWF binary
run: bash ${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh v0.25.10
- name: Determine automatic lockdown mode for GitHub MCP Server
id: determine-automatic-lockdown
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
with:
script: |
const determineAutomaticLockdown = require('${{ runner.temp }}/gh-aw/actions/determine_automatic_lockdown.cjs');
await determineAutomaticLockdown(github, context, core);
- name: Download container images
run: bash ${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh ghcr.io/github/gh-aw-firewall/agent:0.25.10 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.10 ghcr.io/github/gh-aw-firewall/squid:0.25.10 ghcr.io/github/gh-aw-mcpg:v0.2.11 ghcr.io/github/github-mcp-server:v0.32.0 node:lts-alpine
- name: Write Safe Outputs Config
run: |
mkdir -p ${RUNNER_TEMP}/gh-aw/safeoutputs
mkdir -p /tmp/gh-aw/safeoutputs
mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs
cat > ${RUNNER_TEMP}/gh-aw/safeoutputs/config.json << 'GH_AW_SAFE_OUTPUTS_CONFIG_48b594175610bb45_EOF'
{"add_labels":{"allowed":["runtime","sdk-fix-only","needs-investigation"],"max":3,"target":"triggering"},"create_issue":{"labels":["upstream-from-sdk","ai-triaged"],"max":1,"target-repo":"github/copilot-agent-runtime","title_prefix":"[copilot-sdk] "},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"}}
GH_AW_SAFE_OUTPUTS_CONFIG_48b594175610bb45_EOF
- name: Write Safe Outputs Tools
run: |
cat > ${RUNNER_TEMP}/gh-aw/safeoutputs/tools_meta.json << 'GH_AW_SAFE_OUTPUTS_TOOLS_META_b7411e2278a534bd_EOF'
{
"description_suffixes": {
"add_labels": " CONSTRAINTS: Maximum 3 label(s) can be added. Only these labels are allowed: [\"runtime\" \"sdk-fix-only\" \"needs-investigation\"]. Target: triggering.",
"create_issue": " CONSTRAINTS: Maximum 1 issue(s) can be created. Title will be prefixed with \"[copilot-sdk] \". Labels [\"upstream-from-sdk\" \"ai-triaged\"] will be automatically added. Issues will be created in repository \"github/copilot-agent-runtime\"."
},
"repo_params": {},
"dynamic_tools": []
}
GH_AW_SAFE_OUTPUTS_TOOLS_META_b7411e2278a534bd_EOF
cat > ${RUNNER_TEMP}/gh-aw/safeoutputs/validation.json << 'GH_AW_SAFE_OUTPUTS_VALIDATION_81274d71f66b7af3_EOF'
{
"add_labels": {
"defaultMax": 5,
"fields": {
"item_number": {
"issueNumberOrTemporaryId": true
},
"labels": {
"required": true,
"type": "array",
"itemType": "string",
"itemSanitize": true,
"itemMaxLength": 128
},
"repo": {
"type": "string",
"maxLength": 256
}
}
},
"create_issue": {
"defaultMax": 1,
"fields": {
"body": {
"required": true,
"type": "string",
"sanitize": true,
"maxLength": 65000
},
"labels": {
"type": "array",
"itemType": "string",
"itemSanitize": true,
"itemMaxLength": 128
},
"parent": {
"issueOrPRNumber": true
},
"repo": {
"type": "string",
"maxLength": 256
},
"temporary_id": {
"type": "string"
},
"title": {
"required": true,
"type": "string",
"sanitize": true,
"maxLength": 128
}
}
},
"missing_data": {
"defaultMax": 20,
"fields": {
"alternatives": {
"type": "string",
"sanitize": true,
"maxLength": 256
},
"context": {
"type": "string",
"sanitize": true,
"maxLength": 256
},
"data_type": {
"type": "string",
"sanitize": true,
"maxLength": 128
},
"reason": {
"type": "string",
"sanitize": true,
"maxLength": 256
}
}
},
"missing_tool": {
"defaultMax": 20,
"fields": {
"alternatives": {
"type": "string",
"sanitize": true,
"maxLength": 512
},
"reason": {
"required": true,
"type": "string",
"sanitize": true,
"maxLength": 256
},
"tool": {
"type": "string",
"sanitize": true,
"maxLength": 128
}
}
},
"noop": {
"defaultMax": 1,
"fields": {
"message": {
"required": true,
"type": "string",
"sanitize": true,
"maxLength": 65000
}
}
}
}
GH_AW_SAFE_OUTPUTS_VALIDATION_81274d71f66b7af3_EOF
node ${RUNNER_TEMP}/gh-aw/actions/generate_safe_outputs_tools.cjs
- name: Generate Safe Outputs MCP Server Config
id: safe-outputs-config
run: |
# Generate a secure random API key (360 bits of entropy, 40+ chars)
# Mask immediately to prevent timing vulnerabilities
API_KEY=$(openssl rand -base64 45 | tr -d '/+=')
echo "::add-mask::${API_KEY}"
PORT=3001
# Set outputs for next steps
{
echo "safe_outputs_api_key=${API_KEY}"
echo "safe_outputs_port=${PORT}"
} >> "$GITHUB_OUTPUT"
echo "Safe Outputs MCP server will run on port ${PORT}"
- name: Start Safe Outputs MCP HTTP Server
id: safe-outputs-start
env:
DEBUG: '*'
GH_AW_SAFE_OUTPUTS_PORT: ${{ steps.safe-outputs-config.outputs.safe_outputs_port }}
GH_AW_SAFE_OUTPUTS_API_KEY: ${{ steps.safe-outputs-config.outputs.safe_outputs_api_key }}
GH_AW_SAFE_OUTPUTS_TOOLS_PATH: ${{ runner.temp }}/gh-aw/safeoutputs/tools.json
GH_AW_SAFE_OUTPUTS_CONFIG_PATH: ${{ runner.temp }}/gh-aw/safeoutputs/config.json
GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs
run: |
# Environment variables are set above to prevent template injection
export DEBUG
export GH_AW_SAFE_OUTPUTS_PORT
export GH_AW_SAFE_OUTPUTS_API_KEY
export GH_AW_SAFE_OUTPUTS_TOOLS_PATH
export GH_AW_SAFE_OUTPUTS_CONFIG_PATH
export GH_AW_MCP_LOG_DIR
bash ${RUNNER_TEMP}/gh-aw/actions/start_safe_outputs_server.sh
- name: Start MCP Gateway
id: start-mcp-gateway
env:
GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
GH_AW_SAFE_OUTPUTS_API_KEY: ${{ steps.safe-outputs-start.outputs.api_key }}
GH_AW_SAFE_OUTPUTS_PORT: ${{ steps.safe-outputs-start.outputs.port }}
GITHUB_MCP_GUARD_MIN_INTEGRITY: ${{ steps.determine-automatic-lockdown.outputs.min_integrity }}
GITHUB_MCP_GUARD_REPOS: ${{ steps.determine-automatic-lockdown.outputs.repos }}
GITHUB_MCP_SERVER_TOKEN: ${{ secrets.RUNTIME_TRIAGE_TOKEN }}
run: |
set -eo pipefail
mkdir -p /tmp/gh-aw/mcp-config
# Export gateway environment variables for MCP config and gateway script
export MCP_GATEWAY_PORT="80"
export MCP_GATEWAY_DOMAIN="host.docker.internal"
MCP_GATEWAY_API_KEY=$(openssl rand -base64 45 | tr -d '/+=')
echo "::add-mask::${MCP_GATEWAY_API_KEY}"
export MCP_GATEWAY_API_KEY
export MCP_GATEWAY_PAYLOAD_DIR="/tmp/gh-aw/mcp-payloads"
mkdir -p "${MCP_GATEWAY_PAYLOAD_DIR}"
export MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD="524288"
export DEBUG="*"
export GH_AW_ENGINE="copilot"
export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.2.11'
mkdir -p /home/runner/.copilot
cat << GH_AW_MCP_CONFIG_8a197b6974c2932c_EOF | bash ${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.sh
{
"mcpServers": {
"github": {
"type": "stdio",
"container": "ghcr.io/github/github-mcp-server:v0.32.0",
"env": {
"GITHUB_HOST": "\${GITHUB_SERVER_URL}",
"GITHUB_PERSONAL_ACCESS_TOKEN": "\${GITHUB_MCP_SERVER_TOKEN}",
"GITHUB_READ_ONLY": "1",
"GITHUB_TOOLSETS": "context,repos,issues,pull_requests"
},
"guard-policies": {
"allow-only": {
"min-integrity": "$GITHUB_MCP_GUARD_MIN_INTEGRITY",
"repos": "$GITHUB_MCP_GUARD_REPOS"
}
}
},
"safeoutputs": {
"type": "http",
"url": "http://host.docker.internal:$GH_AW_SAFE_OUTPUTS_PORT",
"headers": {
"Authorization": "\${GH_AW_SAFE_OUTPUTS_API_KEY}"
},
"guard-policies": {
"write-sink": {
"accept": [
"*"
]
}
}
}
},
"gateway": {
"port": $MCP_GATEWAY_PORT,
"domain": "${MCP_GATEWAY_DOMAIN}",
"apiKey": "${MCP_GATEWAY_API_KEY}",
"payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}"
}
}
GH_AW_MCP_CONFIG_8a197b6974c2932c_EOF
- name: Download activation artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: activation
path: /tmp/gh-aw
- name: Clean git credentials
continue-on-error: true
run: bash ${RUNNER_TEMP}/gh-aw/actions/clean_git_credentials.sh
- name: Execute GitHub Copilot CLI
id: agentic_execution
# Copilot CLI tool arguments (sorted):
# --allow-tool github
# --allow-tool safeoutputs
# --allow-tool shell(cat)
# --allow-tool shell(cat:*)
# --allow-tool shell(date)
# --allow-tool shell(echo)
# --allow-tool shell(find:*)
# --allow-tool shell(grep)
# --allow-tool shell(grep:*)
# --allow-tool shell(head)
# --allow-tool shell(head:*)
# --allow-tool shell(ls)
# --allow-tool shell(ls:*)
# --allow-tool shell(pwd)
# --allow-tool shell(sort)
# --allow-tool shell(tail)
# --allow-tool shell(tail:*)
# --allow-tool shell(uniq)
# --allow-tool shell(wc)
# --allow-tool shell(wc:*)
# --allow-tool shell(yq)
# --allow-tool write
timeout-minutes: 20
run: |
set -o pipefail
touch /tmp/gh-aw/agent-step-summary.md
# shellcheck disable=SC1003
sudo -E awf --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --allow-domains api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --image-tag 0.25.10 --skip-pull --enable-api-proxy \
-- /bin/bash -c '/usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --allow-tool github --allow-tool safeoutputs --allow-tool '\''shell(cat)'\'' --allow-tool '\''shell(cat:*)'\'' --allow-tool '\''shell(date)'\'' --allow-tool '\''shell(echo)'\'' --allow-tool '\''shell(find:*)'\'' --allow-tool '\''shell(grep)'\'' --allow-tool '\''shell(grep:*)'\'' --allow-tool '\''shell(head)'\'' --allow-tool '\''shell(head:*)'\'' --allow-tool '\''shell(ls)'\'' --allow-tool '\''shell(ls:*)'\'' --allow-tool '\''shell(pwd)'\'' --allow-tool '\''shell(sort)'\'' --allow-tool '\''shell(tail)'\'' --allow-tool '\''shell(tail:*)'\'' --allow-tool '\''shell(uniq)'\'' --allow-tool '\''shell(wc)'\'' --allow-tool '\''shell(wc:*)'\'' --allow-tool '\''shell(yq)'\'' --allow-tool write --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log
env:
COPILOT_AGENT_RUNNER_TYPE: STANDALONE
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || '' }}
GH_AW_MCP_CONFIG: /home/runner/.copilot/mcp-config.json
GH_AW_PHASE: agent
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
GH_AW_VERSION: v0.65.5
GITHUB_API_URL: ${{ github.api_url }}
GITHUB_AW: true
GITHUB_HEAD_REF: ${{ github.head_ref }}
GITHUB_MCP_SERVER_TOKEN: ${{ secrets.RUNTIME_TRIAGE_TOKEN }}
GITHUB_REF_NAME: ${{ github.ref_name }}
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_STEP_SUMMARY: /tmp/gh-aw/agent-step-summary.md
GITHUB_WORKSPACE: ${{ github.workspace }}
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_AUTHOR_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
XDG_CONFIG_HOME: /home/runner
- name: Detect inference access error
id: detect-inference-error
if: always()
continue-on-error: true
run: bash ${RUNNER_TEMP}/gh-aw/actions/detect_inference_access_error.sh
- name: Configure Git credentials
env:
REPO_NAME: ${{ github.repository }}
SERVER_URL: ${{ github.server_url }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git config --global am.keepcr true
# Re-authenticate git with GitHub token
SERVER_URL_STRIPPED="${SERVER_URL#https://}"
git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL_STRIPPED}/${REPO_NAME}.git"
echo "Git configured with standard GitHub Actions identity"
- name: Copy Copilot session state files to logs
if: always()
continue-on-error: true
run: bash ${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh
- name: Stop MCP Gateway
if: always()
continue-on-error: true
env:
MCP_GATEWAY_PORT: ${{ steps.start-mcp-gateway.outputs.gateway-port }}
MCP_GATEWAY_API_KEY: ${{ steps.start-mcp-gateway.outputs.gateway-api-key }}
GATEWAY_PID: ${{ steps.start-mcp-gateway.outputs.gateway-pid }}
run: |
bash ${RUNNER_TEMP}/gh-aw/actions/stop_mcp_gateway.sh "$GATEWAY_PID"
- name: Redact secrets in logs
if: always()
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/redact_secrets.cjs');
await main();
env:
GH_AW_SECRET_NAMES: 'COPILOT_GITHUB_TOKEN,GH_AW_GITHUB_MCP_SERVER_TOKEN,GH_AW_GITHUB_TOKEN,RUNTIME_TRIAGE_TOKEN'
SECRET_COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
SECRET_GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
SECRET_GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
SECRET_RUNTIME_TRIAGE_TOKEN: ${{ secrets.RUNTIME_TRIAGE_TOKEN }}
- name: Append agent step summary
if: always()
run: bash ${RUNNER_TEMP}/gh-aw/actions/append_agent_step_summary.sh
- name: Copy Safe Outputs
if: always()
env:
GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
run: |
mkdir -p /tmp/gh-aw
cp "$GH_AW_SAFE_OUTPUTS" /tmp/gh-aw/safeoutputs.jsonl 2>/dev/null || true
- name: Ingest agent output
id: collect_output
if: always()
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
GH_AW_ALLOWED_DOMAINS: "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
GH_AW_ALLOWED_GITHUB_REFS: "repo,github/copilot-agent-runtime"
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_API_URL: ${{ github.api_url }}
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/collect_ndjson_output.cjs');
await main();
- name: Parse agent logs for step summary
if: always()
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_AGENT_OUTPUT: /tmp/gh-aw/sandbox/agent/logs/
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_copilot_log.cjs');
await main();
- name: Parse MCP Gateway logs for step summary
if: always()
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_mcp_gateway_log.cjs');
await main();
- name: Print firewall logs
if: always()
continue-on-error: true
env:
AWF_LOGS_DIR: /tmp/gh-aw/sandbox/firewall/logs
run: |
# Fix permissions on firewall logs so they can be uploaded as artifacts
# AWF runs with sudo, creating files owned by root
sudo chmod -R a+r /tmp/gh-aw/sandbox/firewall/logs 2>/dev/null || true
# Only run awf logs summary if awf command exists (it may not be installed if workflow failed before install step)
if command -v awf &> /dev/null; then
awf logs summary | tee -a "$GITHUB_STEP_SUMMARY"
else
echo 'AWF binary not installed, skipping firewall log summary'
fi
- name: Parse token usage for step summary
if: always()
continue-on-error: true
run: bash ${RUNNER_TEMP}/gh-aw/actions/parse_token_usage.sh
- name: Write agent output placeholder if missing
if: always()
run: |
if [ ! -f /tmp/gh-aw/agent_output.json ]; then
echo '{"items":[]}' > /tmp/gh-aw/agent_output.json
fi
- name: Upload agent artifacts
if: always()
continue-on-error: true
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: agent
path: |
/tmp/gh-aw/aw-prompts/prompt.txt
/tmp/gh-aw/sandbox/agent/logs/
/tmp/gh-aw/redacted-urls.log
/tmp/gh-aw/mcp-logs/
/tmp/gh-aw/agent-stdio.log
/tmp/gh-aw/agent/
/tmp/gh-aw/safeoutputs.jsonl
/tmp/gh-aw/agent_output.json
/tmp/gh-aw/aw-*.patch
/tmp/gh-aw/aw-*.bundle
if-no-files-found: ignore
- name: Upload firewall audit logs
if: always()
continue-on-error: true
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: firewall-audit-logs
path: |
/tmp/gh-aw/sandbox/firewall/logs/
/tmp/gh-aw/sandbox/firewall/audit/
if-no-files-found: ignore
conclusion:
needs:
- activation
- agent
- detection
- safe_outputs
if: always() && (needs.agent.result != 'skipped' || needs.activation.outputs.lockdown_check_failed == 'true')
runs-on: ubuntu-slim
permissions:
contents: read
issues: write
pull-requests: write
concurrency:
group: "gh-aw-conclusion-cross-repo-issue-analysis"
cancel-in-progress: false
outputs:
noop_message: ${{ steps.noop.outputs.noop_message }}
tools_reported: ${{ steps.missing_tool.outputs.tools_reported }}
total_count: ${{ steps.missing_tool.outputs.total_count }}
steps:
- name: Setup Scripts
uses: github/gh-aw-actions/setup@15b2fa31e9a1b771c9773c162273924d8f5ea516 # v0.65.5
with:
destination: ${{ runner.temp }}/gh-aw/actions
- name: Download agent output artifact
id: download-agent-output
continue-on-error: true
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: agent
path: /tmp/gh-aw/
- name: Setup agent output environment variable
id: setup-agent-output-env
if: steps.download-agent-output.outcome == 'success'
run: |
mkdir -p /tmp/gh-aw/
find "/tmp/gh-aw/" -type f -print
echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
- name: Process No-Op Messages
id: noop
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
GH_AW_NOOP_MAX: "1"
GH_AW_WORKFLOW_NAME: "SDK Runtime Triage"
with:
github-token: ${{ secrets.RUNTIME_TRIAGE_TOKEN }}
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/noop.cjs');
await main();
- name: Record Missing Tool
id: missing_tool
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
GH_AW_MISSING_TOOL_CREATE_ISSUE: "true"
GH_AW_WORKFLOW_NAME: "SDK Runtime Triage"
with:
github-token: ${{ secrets.RUNTIME_TRIAGE_TOKEN }}
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/missing_tool.cjs');
await main();
- name: Handle Agent Failure
id: handle_agent_failure
if: always()
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
GH_AW_WORKFLOW_NAME: "SDK Runtime Triage"
GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }}
GH_AW_WORKFLOW_ID: "cross-repo-issue-analysis"
GH_AW_ENGINE_ID: "copilot"
GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.activation.outputs.secret_verification_result }}
GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }}
GH_AW_INFERENCE_ACCESS_ERROR: ${{ needs.agent.outputs.inference_access_error }}
GH_AW_LOCKDOWN_CHECK_FAILED: ${{ needs.activation.outputs.lockdown_check_failed }}
GH_AW_GROUP_REPORTS: "false"
GH_AW_FAILURE_REPORT_AS_ISSUE: "true"
GH_AW_TIMEOUT_MINUTES: "20"
with:
github-token: ${{ secrets.RUNTIME_TRIAGE_TOKEN }}
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/handle_agent_failure.cjs');
await main();
- name: Handle No-Op Message
id: handle_noop_message
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
GH_AW_WORKFLOW_NAME: "SDK Runtime Triage"
GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }}
GH_AW_NOOP_MESSAGE: ${{ steps.noop.outputs.noop_message }}
GH_AW_NOOP_REPORT_AS_ISSUE: "true"
with:
github-token: ${{ secrets.RUNTIME_TRIAGE_TOKEN }}
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/handle_noop_message.cjs');
await main();
detection:
needs: agent
if: >
always() && needs.agent.result != 'skipped' && (needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true')
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
detection_conclusion: ${{ steps.detection_conclusion.outputs.conclusion }}
detection_success: ${{ steps.detection_conclusion.outputs.success }}
steps:
- name: Setup Scripts
uses: github/gh-aw-actions/setup@15b2fa31e9a1b771c9773c162273924d8f5ea516 # v0.65.5
with:
destination: ${{ runner.temp }}/gh-aw/actions
- name: Download agent output artifact
id: download-agent-output
continue-on-error: true
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: agent
path: /tmp/gh-aw/
- name: Setup agent output environment variable
id: setup-agent-output-env
if: steps.download-agent-output.outcome == 'success'
run: |
mkdir -p /tmp/gh-aw/
find "/tmp/gh-aw/" -type f -print
echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
- name: Checkout repository for patch context
if: needs.agent.outputs.has_patch == 'true'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
# --- Threat Detection ---
- name: Download container images
run: bash ${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh ghcr.io/github/gh-aw-firewall/agent:0.25.10 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.10 ghcr.io/github/gh-aw-firewall/squid:0.25.10
- name: Check if detection needed
id: detection_guard
if: always()
env:
OUTPUT_TYPES: ${{ needs.agent.outputs.output_types }}
HAS_PATCH: ${{ needs.agent.outputs.has_patch }}
run: |
if [[ -n "$OUTPUT_TYPES" || "$HAS_PATCH" == "true" ]]; then
echo "run_detection=true" >> "$GITHUB_OUTPUT"
echo "Detection will run: output_types=$OUTPUT_TYPES, has_patch=$HAS_PATCH"
else
echo "run_detection=false" >> "$GITHUB_OUTPUT"
echo "Detection skipped: no agent outputs or patches to analyze"
fi
- name: Clear MCP configuration for detection
if: always() && steps.detection_guard.outputs.run_detection == 'true'
run: |
rm -f /tmp/gh-aw/mcp-config/mcp-servers.json
rm -f /home/runner/.copilot/mcp-config.json
rm -f "$GITHUB_WORKSPACE/.gemini/settings.json"
- name: Prepare threat detection files
if: always() && steps.detection_guard.outputs.run_detection == 'true'
run: |
mkdir -p /tmp/gh-aw/threat-detection/aw-prompts
cp /tmp/gh-aw/aw-prompts/prompt.txt /tmp/gh-aw/threat-detection/aw-prompts/prompt.txt 2>/dev/null || true
cp /tmp/gh-aw/agent_output.json /tmp/gh-aw/threat-detection/agent_output.json 2>/dev/null || true
for f in /tmp/gh-aw/aw-*.patch; do
[ -f "$f" ] && cp "$f" /tmp/gh-aw/threat-detection/ 2>/dev/null || true
done
for f in /tmp/gh-aw/aw-*.bundle; do
[ -f "$f" ] && cp "$f" /tmp/gh-aw/threat-detection/ 2>/dev/null || true
done
echo "Prepared threat detection files:"
ls -la /tmp/gh-aw/threat-detection/ 2>/dev/null || true
- name: Setup threat detection
if: always() && steps.detection_guard.outputs.run_detection == 'true'
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
WORKFLOW_NAME: "SDK Runtime Triage"
WORKFLOW_DESCRIPTION: "Analyzes copilot-sdk issues to determine if a fix is needed in copilot-agent-runtime, then opens a linked issue there"
HAS_PATCH: ${{ needs.agent.outputs.has_patch }}
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/setup_threat_detection.cjs');
await main();
- name: Ensure threat-detection directory and log
if: always() && steps.detection_guard.outputs.run_detection == 'true'
run: |
mkdir -p /tmp/gh-aw/threat-detection
touch /tmp/gh-aw/threat-detection/detection.log
- name: Install GitHub Copilot CLI
run: ${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh latest
- name: Install AWF binary
run: bash ${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh v0.25.10
- name: Execute GitHub Copilot CLI
if: always() && steps.detection_guard.outputs.run_detection == 'true'
id: detection_agentic_execution
# Copilot CLI tool arguments (sorted):
timeout-minutes: 20
run: |
set -o pipefail
touch /tmp/gh-aw/agent-step-summary.md
# shellcheck disable=SC1003
sudo -E awf --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --allow-domains api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,github.com,host.docker.internal,telemetry.enterprise.githubcopilot.com --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --image-tag 0.25.10 --skip-pull --enable-api-proxy \
-- /bin/bash -c '/usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log
env:
COPILOT_AGENT_RUNNER_TYPE: STANDALONE
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || '' }}
GH_AW_PHASE: detection
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
GH_AW_VERSION: v0.65.5
GITHUB_API_URL: ${{ github.api_url }}
GITHUB_AW: true
GITHUB_HEAD_REF: ${{ github.head_ref }}
GITHUB_REF_NAME: ${{ github.ref_name }}
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_STEP_SUMMARY: /tmp/gh-aw/agent-step-summary.md
GITHUB_WORKSPACE: ${{ github.workspace }}
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_AUTHOR_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
XDG_CONFIG_HOME: /home/runner
- name: Upload threat detection log
if: always() && steps.detection_guard.outputs.run_detection == 'true'
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: detection
path: /tmp/gh-aw/threat-detection/detection.log
if-no-files-found: ignore
- name: Parse and conclude threat detection
id: detection_conclusion
if: always()
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
RUN_DETECTION: ${{ steps.detection_guard.outputs.run_detection }}
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_threat_detection_results.cjs');
await main();
pre_activation:
if: github.event_name == 'workflow_dispatch' || github.event.label.name == 'runtime triage'
runs-on: ubuntu-slim
outputs:
activated: ${{ steps.check_membership.outputs.is_team_member == 'true' }}
matched_command: ''
steps:
- name: Setup Scripts
uses: github/gh-aw-actions/setup@15b2fa31e9a1b771c9773c162273924d8f5ea516 # v0.65.5
with:
destination: ${{ runner.temp }}/gh-aw/actions
- name: Check team membership for workflow
id: check_membership
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_REQUIRED_ROLES: "admin,maintainer,write"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_membership.cjs');
await main();
safe_outputs:
needs:
- agent
- detection
if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success'
runs-on: ubuntu-slim
permissions:
contents: read
issues: write
pull-requests: write
timeout-minutes: 15
env:
GH_AW_CALLER_WORKFLOW_ID: "${{ github.repository }}/cross-repo-issue-analysis"
GH_AW_ENGINE_ID: "copilot"
GH_AW_ENGINE_MODEL: ${{ needs.agent.outputs.model }}
GH_AW_WORKFLOW_ID: "cross-repo-issue-analysis"
GH_AW_WORKFLOW_NAME: "SDK Runtime Triage"
outputs:
code_push_failure_count: ${{ steps.process_safe_outputs.outputs.code_push_failure_count }}
code_push_failure_errors: ${{ steps.process_safe_outputs.outputs.code_push_failure_errors }}
create_discussion_error_count: ${{ steps.process_safe_outputs.outputs.create_discussion_error_count }}
create_discussion_errors: ${{ steps.process_safe_outputs.outputs.create_discussion_errors }}
created_issue_number: ${{ steps.process_safe_outputs.outputs.created_issue_number }}
created_issue_url: ${{ steps.process_safe_outputs.outputs.created_issue_url }}
process_safe_outputs_processed_count: ${{ steps.process_safe_outputs.outputs.processed_count }}
process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }}
steps:
- name: Setup Scripts
uses: github/gh-aw-actions/setup@15b2fa31e9a1b771c9773c162273924d8f5ea516 # v0.65.5
with:
destination: ${{ runner.temp }}/gh-aw/actions
- name: Download agent output artifact
id: download-agent-output
continue-on-error: true
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: agent
path: /tmp/gh-aw/
- name: Setup agent output environment variable
id: setup-agent-output-env
if: steps.download-agent-output.outcome == 'success'
run: |
mkdir -p /tmp/gh-aw/
find "/tmp/gh-aw/" -type f -print
echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
- name: Configure GH_HOST for enterprise compatibility
id: ghes-host-config
shell: bash
run: |
# Derive GH_HOST from GITHUB_SERVER_URL so the gh CLI targets the correct
# GitHub instance (GHES/GHEC). On github.com this is a harmless no-op.
GH_HOST="${GITHUB_SERVER_URL#https://}"
GH_HOST="${GH_HOST#http://}"
echo "GH_HOST=${GH_HOST}" >> "$GITHUB_ENV"
- name: Process Safe Outputs
id: process_safe_outputs
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
GH_AW_ALLOWED_DOMAINS: "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_API_URL: ${{ github.api_url }}
GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_labels\":{\"allowed\":[\"runtime\",\"sdk-fix-only\",\"needs-investigation\"],\"max\":3,\"target\":\"triggering\"},\"create_issue\":{\"labels\":[\"upstream-from-sdk\",\"ai-triaged\"],\"max\":1,\"target-repo\":\"github/copilot-agent-runtime\",\"title_prefix\":\"[copilot-sdk] \"},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"}}"
with:
github-token: ${{ secrets.RUNTIME_TRIAGE_TOKEN }}
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/safe_output_handler_manager.cjs');
await main();
- name: Upload Safe Output Items
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: safe-output-items
path: /tmp/gh-aw/safe-output-items.jsonl
if-no-files-found: ignore
================================================
FILE: .github/workflows/cross-repo-issue-analysis.md
================================================
---
description: Analyzes copilot-sdk issues to determine if a fix is needed in copilot-agent-runtime, then opens a linked issue there
on:
issues:
types: [labeled]
workflow_dispatch:
inputs:
issue_number:
description: "Issue number to analyze"
required: true
type: string
if: "github.event_name == 'workflow_dispatch' || github.event.label.name == 'runtime triage'"
permissions:
contents: read
issues: read
steps:
- name: Clone copilot-agent-runtime
run: git clone --depth 1 https://x-access-token:${{ secrets.RUNTIME_TRIAGE_TOKEN }}@github.com/github/copilot-agent-runtime.git ${{ github.workspace }}/copilot-agent-runtime
tools:
github:
toolsets: [default]
github-token: ${{ secrets.RUNTIME_TRIAGE_TOKEN }}
bash:
- "grep:*"
- "find:*"
- "cat:*"
- "head:*"
- "tail:*"
- "wc:*"
- "ls:*"
safe-outputs:
github-token: ${{ secrets.RUNTIME_TRIAGE_TOKEN }}
allowed-github-references: ["repo", "github/copilot-agent-runtime"]
add-labels:
allowed: [runtime, sdk-fix-only, needs-investigation]
max: 3
target: triggering
create-issue:
title-prefix: "[copilot-sdk] "
labels: [upstream-from-sdk, ai-triaged]
target-repo: "github/copilot-agent-runtime"
max: 1
timeout-minutes: 20
---
# SDK Runtime Triage
You are an expert agent that analyzes issues filed in the **copilot-sdk** repository to determine whether the root cause and fix live in this repo or in the **copilot-agent-runtime** repo (`github/copilot-agent-runtime`).
## Context
- Repository: ${{ github.repository }}
- Issue number: ${{ github.event.issue.number || inputs.issue_number }}
- Issue title: ${{ github.event.issue.title }}
The **copilot-sdk** repo is a multi-language SDK (Node/TS, Python, Go, .NET) that communicates with the Copilot CLI via JSON-RPC. The **copilot-agent-runtime** repo contains the CLI/server that the SDK talks to. Many issues filed against the SDK are actually caused by behavior in the runtime.
## Your Task
### Step 1: Understand the Issue
Use GitHub tools to fetch the full issue body, comments, and any linked references for issue `${{ github.event.issue.number || inputs.issue_number }}` in `${{ github.repository }}`.
### Step 2: Analyze Against copilot-sdk
Search the copilot-sdk codebase on disk to understand whether the reported problem could originate here. The repo is checked out at the default working directory.
- Use bash tools (`grep`, `find`, `cat`) to search the relevant SDK language implementation (`nodejs/src/`, `python/copilot/`, `go/`, `dotnet/src/`)
- Look at the JSON-RPC client layer, session management, event handling, and tool definitions
- Check if the issue relates to SDK-side logic (type generation, streaming, event parsing, client options, etc.)
### Step 3: Investigate copilot-agent-runtime
If the issue does NOT appear to be caused by SDK code, or you suspect the runtime is involved, investigate the **copilot-agent-runtime** repo. It has been cloned to `./copilot-agent-runtime/` in the current working directory.
- Use bash tools (`grep`, `find`, `cat`) to search the runtime codebase at `./copilot-agent-runtime/`
- Look at the server-side JSON-RPC handling, session management, tool execution, and response generation
- Focus on the areas that correspond to the reported issue (e.g., if the issue is about streaming, look at the runtime's streaming implementation)
Common areas where runtime fixes are needed:
- JSON-RPC protocol handling and response formatting
- Session lifecycle (creation, persistence, compaction, destruction)
- Tool execution and permission handling
- Model/API interaction (prompt construction, response parsing)
- Streaming event generation (deltas, completions)
- Error handling and error response formatting
### Step 4: Make Your Determination
Classify the issue into one of these categories:
1. **SDK-fix-only**: The bug/feature is entirely in the SDK code. Label the issue `sdk-fix-only`.
2. **Runtime**: The root cause is in copilot-agent-runtime. Do ALL of the following:
- Label the original issue `runtime`
- Create an issue in `github/copilot-agent-runtime` that:
- Clearly describes the problem and root cause
- References the original SDK issue (e.g., `github/copilot-sdk#123`)
- Includes the specific files and code paths involved
- Suggests a fix approach
3. **Needs-investigation**: You cannot confidently determine the root cause. Label the issue `needs-investigation`.
## Guidelines
1. **Be thorough but focused**: Read enough code to be confident in your analysis, but don't read every file in both repos
2. **Err on the side of creating the runtime issue**: If there's a reasonable chance the fix is in the runtime, create the issue. False positives are better than missed upstream bugs.
3. **Link everything**: Always cross-reference between the SDK issue and runtime issue so maintainers can follow the trail
4. **Be specific**: When describing the root cause, point to specific files, functions, and line numbers in both repos
5. **Don't duplicate**: Before creating a runtime issue, search existing open issues in `github/copilot-agent-runtime` to avoid duplicates. If a related issue exists, reference it instead of creating a new one.
================================================
FILE: .github/workflows/docs-validation.yml
================================================
name: "Documentation Validation"
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'docs/**'
- 'nodejs/src/**'
- 'python/copilot/**'
- 'go/**/*.go'
- 'dotnet/src/**'
- 'scripts/docs-validation/**'
- '.github/workflows/docs-validation.yml'
workflow_dispatch:
merge_group:
permissions:
contents: read
jobs:
validate-typescript:
name: "Validate TypeScript"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
cache: "npm"
cache-dependency-path: "nodejs/package-lock.json"
- name: Install SDK dependencies
working-directory: nodejs
run: npm ci --ignore-scripts
- name: Install validation dependencies
working-directory: scripts/docs-validation
run: npm ci
- name: Extract and validate TypeScript
working-directory: scripts/docs-validation
run: npm run extract && npm run validate:ts
validate-python:
name: "Validate Python"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install SDK dependencies
working-directory: python
run: uv sync
- name: Install mypy
run: pip install mypy
- name: Install validation dependencies
working-directory: scripts/docs-validation
run: npm ci
- name: Extract and validate Python
working-directory: scripts/docs-validation
run: npm run extract && npm run validate:py
validate-go:
name: "Validate Go"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
- uses: actions/setup-go@v6
with:
go-version: "1.24"
cache-dependency-path: "go/go.sum"
- name: Install validation dependencies
working-directory: scripts/docs-validation
run: npm ci
- name: Extract and validate Go
working-directory: scripts/docs-validation
run: npm run extract && npm run validate:go
validate-csharp:
name: "Validate C#"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
- uses: actions/setup-dotnet@v5
with:
dotnet-version: "10.0.x"
- name: Install validation dependencies
working-directory: scripts/docs-validation
run: npm ci
- name: Restore SDK dependencies
working-directory: dotnet
run: dotnet restore
- name: Extract and validate C#
working-directory: scripts/docs-validation
run: npm run extract && npm run validate:cs
================================================
FILE: .github/workflows/dotnet-sdk-tests.yml
================================================
name: ".NET SDK Tests"
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'dotnet/**'
- 'test/**'
- 'nodejs/package.json'
- '.github/workflows/dotnet-sdk-tests.yml'
- '!**/*.md'
- '!**/LICENSE*'
- '!**/.gitignore'
- '!**/.editorconfig'
- '!**/*.png'
- '!**/*.jpg'
- '!**/*.jpeg'
- '!**/*.gif'
- '!**/*.svg'
workflow_dispatch:
merge_group:
permissions:
contents: read
jobs:
test:
name: ".NET SDK Tests"
env:
POWERSHELL_UPDATECHECK: Off
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
working-directory: ./dotnet
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-dotnet@v5
with:
dotnet-version: "10.0.x"
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: "npm"
cache-dependency-path: "./nodejs/package-lock.json"
- name: Install Node.js dependencies (for CLI version extraction)
working-directory: ./nodejs
run: npm ci --ignore-scripts
- name: Restore .NET dependencies
run: dotnet restore
- name: Run dotnet format check
if: runner.os == 'Linux'
run: |
dotnet format --verify-no-changes
if [ $? -ne 0 ]; then
echo "❌ dotnet format produced changes. Please run 'dotnet format' in dotnet"
exit 1
fi
echo "✅ dotnet format produced no changes"
- name: Build SDK
run: dotnet build --no-restore
- name: Install test harness dependencies
working-directory: ./test/harness
run: npm ci --ignore-scripts
- name: Warm up PowerShell
if: runner.os == 'Windows'
run: pwsh.exe -Command "Write-Host 'PowerShell ready'"
- name: Run .NET SDK tests
env:
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
run: dotnet test --no-build -v n
================================================
FILE: .github/workflows/go-sdk-tests.yml
================================================
name: "Go SDK Tests"
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'go/**'
- 'test/**'
- 'nodejs/package.json'
- '.github/workflows/go-sdk-tests.yml'
- '.github/actions/setup-copilot/**'
- '!**/*.md'
- '!**/LICENSE*'
- '!**/.gitignore'
- '!**/.editorconfig'
- '!**/*.png'
- '!**/*.jpg'
- '!**/*.jpeg'
- '!**/*.gif'
- '!**/*.svg'
workflow_dispatch:
merge_group:
permissions:
contents: read
jobs:
test:
name: "Go SDK Tests"
env:
POWERSHELL_UPDATECHECK: Off
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
working-directory: ./go
steps:
- uses: actions/checkout@v6.0.2
- uses: ./.github/actions/setup-copilot
id: setup-copilot
- uses: actions/setup-go@v6
with:
go-version: "1.24"
- name: Run go fmt
if: runner.os == 'Linux'
working-directory: ./go
run: |
go fmt ./...
if [ -n "$(git status --porcelain)" ]; then
echo "❌ go fmt produced changes. Please run 'go fmt ./...' in go"
git --no-pager diff
exit 1
fi
echo "✅ go fmt produced no changes"
- name: Install golangci-lint
if: runner.os == 'Linux'
uses: golangci/golangci-lint-action@v9
with:
working-directory: ./go
version: latest
args: --timeout=5m
- name: Install test harness dependencies
working-directory: ./test/harness
run: npm ci --ignore-scripts
- name: Warm up PowerShell
if: runner.os == 'Windows'
run: pwsh.exe -Command "Write-Host 'PowerShell ready'"
- name: Run Go SDK tests
env:
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
COPILOT_CLI_PATH: ${{ steps.setup-copilot.outputs.cli-path }}
run: /bin/bash test.sh
================================================
FILE: .github/workflows/handle-bug.lock.yml
================================================
# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"a473a22cd67feb7f8f5225639fd989cf71705f78c9fe11c3fc757168e1672b0e","compiler_version":"v0.67.4","strict":true,"agent_id":"copilot"}
# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"ed597411d8f924073f98dfc5c65a23a2325f34cd","version":"v8"},{"repo":"actions/upload-artifact","sha":"bbbca2ddaa5d8feaa63e36b76fdaad77386f024f","version":"v7"},{"repo":"github/gh-aw-actions/setup","sha":"9d6ae06250fc0ec536a0e5f35de313b35bad7246","version":"v0.67.4"}]}
# ___ _ _
# / _ \ | | (_)
# | |_| | __ _ ___ _ __ | |_ _ ___
# | _ |/ _` |/ _ \ '_ \| __| |/ __|
# | | | | (_| | __/ | | | |_| | (__
# \_| |_/\__, |\___|_| |_|\__|_|\___|
# __/ |
# _ _ |___/
# | | | | / _| |
# | | | | ___ _ __ _ __| |_| | _____ ____
# | |/\| |/ _ \ '__| |/ /| _| |/ _ \ \ /\ / / ___|
# \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \
# \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/
#
# This file was automatically generated by gh-aw (v0.67.4). DO NOT EDIT.
#
# To update this file, edit the corresponding .md file and run:
# gh aw compile
# Not all edits will cause changes to this file.
#
# For more information: https://github.github.com/gh-aw/introduction/overview/
#
# Handles issues classified as bugs by the triage classifier
#
# Secrets used:
# - COPILOT_GITHUB_TOKEN
# - GH_AW_GITHUB_MCP_SERVER_TOKEN
# - GH_AW_GITHUB_TOKEN
# - GITHUB_TOKEN
#
# Custom actions used:
# - actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# - actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
# - actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
# - actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
# - github/gh-aw-actions/setup@9d6ae06250fc0ec536a0e5f35de313b35bad7246 # v0.67.4
name: "Bug Handler"
"on":
workflow_call:
inputs:
issue_number:
required: true
type: string
payload:
required: false
type: string
outputs:
comment_id:
description: ID of the first added comment
value: ${{ jobs.safe_outputs.outputs.comment_id }}
comment_url:
description: URL of the first added comment
value: ${{ jobs.safe_outputs.outputs.comment_url }}
permissions: {}
concurrency:
group: "gh-aw-${{ github.workflow }}"
run-name: "Bug Handler"
jobs:
activation:
runs-on: ubuntu-slim
permissions:
actions: read
contents: read
outputs:
artifact_prefix: ${{ steps.artifact-prefix.outputs.prefix }}
comment_id: ""
comment_repo: ""
lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }}
model: ${{ steps.generate_aw_info.outputs.model }}
secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }}
setup-trace-id: ${{ steps.setup.outputs.trace-id }}
target_ref: ${{ steps.resolve-host-repo.outputs.target_ref }}
target_repo: ${{ steps.resolve-host-repo.outputs.target_repo }}
target_repo_name: ${{ steps.resolve-host-repo.outputs.target_repo_name }}
steps:
- name: Setup Scripts
id: setup
uses: github/gh-aw-actions/setup@9d6ae06250fc0ec536a0e5f35de313b35bad7246 # v0.67.4
with:
destination: ${{ runner.temp }}/gh-aw/actions
job-name: ${{ github.job }}
- name: Resolve host repo for activation checkout
id: resolve-host-repo
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/resolve_host_repo.cjs');
await main();
- name: Compute artifact prefix
id: artifact-prefix
env:
INPUTS_JSON: ${{ toJSON(inputs) }}
run: bash "${RUNNER_TEMP}/gh-aw/actions/compute_artifact_prefix.sh"
- name: Generate agentic run info
id: generate_aw_info
env:
GH_AW_INFO_ENGINE_ID: "copilot"
GH_AW_INFO_ENGINE_NAME: "GitHub Copilot CLI"
GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'auto' }}
GH_AW_INFO_VERSION: "1.0.20"
GH_AW_INFO_AGENT_VERSION: "1.0.20"
GH_AW_INFO_CLI_VERSION: "v0.67.4"
GH_AW_INFO_WORKFLOW_NAME: "Bug Handler"
GH_AW_INFO_EXPERIMENTAL: "false"
GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true"
GH_AW_INFO_STAGED: "false"
GH_AW_INFO_ALLOWED_DOMAINS: '["defaults"]'
GH_AW_INFO_FIREWALL_ENABLED: "true"
GH_AW_INFO_AWF_VERSION: "v0.25.18"
GH_AW_INFO_AWMG_VERSION: ""
GH_AW_INFO_FIREWALL_TYPE: "squid"
GH_AW_COMPILED_STRICT: "true"
GH_AW_INFO_TARGET_REPO: ${{ steps.resolve-host-repo.outputs.target_repo }}
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_aw_info.cjs');
await main(core, context);
- name: Validate COPILOT_GITHUB_TOKEN secret
id: validate-secret
run: bash "${RUNNER_TEMP}/gh-aw/actions/validate_multi_secret.sh" COPILOT_GITHUB_TOKEN 'GitHub Copilot CLI' https://github.github.com/gh-aw/reference/engines/#github-copilot-default
env:
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
- name: Cross-repo setup guidance
if: failure() && steps.resolve-host-repo.outputs.target_repo != github.repository
run: |
echo "::error::COPILOT_GITHUB_TOKEN must be configured in the CALLER repository's secrets."
echo "::error::For cross-repo workflow_call, secrets must be set in the repository that triggers the workflow."
echo "::error::See: https://github.github.com/gh-aw/patterns/central-repo-ops/#cross-repo-setup"
- name: Checkout .github and .agents folders
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
repository: ${{ steps.resolve-host-repo.outputs.target_repo }}
ref: ${{ steps.resolve-host-repo.outputs.target_ref }}
sparse-checkout: |
.github
.agents
sparse-checkout-cone-mode: true
fetch-depth: 1
- name: Check workflow lock file
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_WORKFLOW_FILE: "handle-bug.lock.yml"
GH_AW_CONTEXT_WORKFLOW_REF: "${{ github.workflow_ref }}"
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_workflow_timestamp_api.cjs');
await main();
- name: Check compile-agentic version
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_COMPILED_VERSION: "v0.67.4"
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_version_updates.cjs');
await main();
- name: Create prompt with built-in context
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl
GH_AW_GITHUB_ACTOR: ${{ github.actor }}
GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }}
GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }}
GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
GH_AW_INPUTS_ISSUE_NUMBER: ${{ inputs.issue_number }}
# poutine:ignore untrusted_checkout_exec
run: |
bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh"
{
cat << 'GH_AW_PROMPT_3df18ed0421fc8c1_EOF'
<system>
GH_AW_PROMPT_3df18ed0421fc8c1_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md"
cat << 'GH_AW_PROMPT_3df18ed0421fc8c1_EOF'
<safe-output-tools>
Tools: add_comment, add_labels, missing_tool, missing_data, noop
</safe-output-tools>
<github-context>
The following GitHub context information is available for this workflow:
{{#if __GH_AW_GITHUB_ACTOR__ }}
- **actor**: __GH_AW_GITHUB_ACTOR__
{{/if}}
{{#if __GH_AW_GITHUB_REPOSITORY__ }}
- **repository**: __GH_AW_GITHUB_REPOSITORY__
{{/if}}
{{#if __GH_AW_GITHUB_WORKSPACE__ }}
- **workspace**: __GH_AW_GITHUB_WORKSPACE__
{{/if}}
{{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
{{/if}}
{{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
{{/if}}
{{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
{{/if}}
{{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
{{/if}}
{{#if __GH_AW_GITHUB_RUN_ID__ }}
- **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
{{/if}}
</github-context>
GH_AW_PROMPT_3df18ed0421fc8c1_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md"
cat << 'GH_AW_PROMPT_3df18ed0421fc8c1_EOF'
</system>
{{#runtime-import .github/workflows/handle-bug.md}}
GH_AW_PROMPT_3df18ed0421fc8c1_EOF
} > "$GH_AW_PROMPT"
- name: Interpolate variables and render templates
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
GH_AW_INPUTS_ISSUE_NUMBER: ${{ inputs.issue_number }}
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/interpolate_prompt.cjs');
await main();
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
GH_AW_GITHUB_ACTOR: ${{ github.actor }}
GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }}
GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }}
GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
GH_AW_INPUTS_ISSUE_NUMBER: ${{ inputs.issue_number }}
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const substitutePlaceholders = require('${{ runner.temp }}/gh-aw/actions/substitute_placeholders.cjs');
// Call the substitution function
return await substitutePlaceholders({
file: process.env.GH_AW_PROMPT,
substitutions: {
GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR,
GH_AW_GITHUB_EVENT_COMMENT_ID: process.env.GH_AW_GITHUB_EVENT_COMMENT_ID,
GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: process.env.GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER,
GH_AW_GITHUB_EVENT_ISSUE_NUMBER: process.env.GH_AW_GITHUB_EVENT_ISSUE_NUMBER,
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
GH_AW_INPUTS_ISSUE_NUMBER: process.env.GH_AW_INPUTS_ISSUE_NUMBER
}
});
- name: Validate prompt placeholders
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
# poutine:ignore untrusted_checkout_exec
run: bash "${RUNNER_TEMP}/gh-aw/actions/validate_prompt_placeholders.sh"
- name: Print prompt
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
# poutine:ignore untrusted_checkout_exec
run: bash "${RUNNER_TEMP}/gh-aw/actions/print_prompt_summary.sh"
- name: Upload activation artifact
if: success()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: ${{ steps.artifact-prefix.outputs.prefix }}activation
path: |
/tmp/gh-aw/aw_info.json
/tmp/gh-aw/aw-prompts/prompt.txt
/tmp/gh-aw/github_rate_limits.jsonl
if-no-files-found: ignore
retention-days: 1
agent:
needs: activation
runs-on: ubuntu-latest
permissions:
contents: read
issues: read
pull-requests: read
concurrency:
group: "gh-aw-copilot-${{ github.workflow }}-${{ inputs.issue_number }}"
env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
GH_AW_ASSETS_ALLOWED_EXTS: ""
GH_AW_ASSETS_BRANCH: ""
GH_AW_ASSETS_MAX_SIZE_KB: 0
GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs
GH_AW_WORKFLOW_ID_SANITIZED: handlebug
outputs:
artifact_prefix: ${{ needs.activation.outputs.artifact_prefix }}
checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }}
effective_tokens: ${{ steps.parse-mcp-gateway.outputs.effective_tokens }}
has_patch: ${{ steps.collect_output.outputs.has_patch }}
inference_access_error: ${{ steps.detect-inference-error.outputs.inference_access_error || 'false' }}
model: ${{ needs.activation.outputs.model }}
output: ${{ steps.collect_output.outputs.output }}
output_types: ${{ steps.collect_output.outputs.output_types }}
setup-trace-id: ${{ steps.setup.outputs.trace-id }}
steps:
- name: Setup Scripts
id: setup
uses: github/gh-aw-actions/setup@9d6ae06250fc0ec536a0e5f35de313b35bad7246 # v0.67.4
with:
destination: ${{ runner.temp }}/gh-aw/actions
job-name: ${{ github.job }}
trace-id: ${{ needs.activation.outputs.setup-trace-id }}
- name: Set runtime paths
id: set-runtime-paths
run: |
echo "GH_AW_SAFE_OUTPUTS=${RUNNER_TEMP}/gh-aw/safeoutputs/outputs.jsonl" >> "$GITHUB_OUTPUT"
echo "GH_AW_SAFE_OUTPUTS_CONFIG_PATH=${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" >> "$GITHUB_OUTPUT"
echo "GH_AW_SAFE_OUTPUTS_TOOLS_PATH=${RUNNER_TEMP}/gh-aw/safeoutputs/tools.json" >> "$GITHUB_OUTPUT"
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Create gh-aw temp directory
run: bash "${RUNNER_TEMP}/gh-aw/actions/create_gh_aw_tmp_dir.sh"
- name: Configure gh CLI for GitHub Enterprise
run: bash "${RUNNER_TEMP}/gh-aw/actions/configure_gh_for_ghe.sh"
env:
GH_TOKEN: ${{ github.token }}
- name: Configure Git credentials
env:
REPO_NAME: ${{ github.repository }}
SERVER_URL: ${{ github.server_url }}
GITHUB_TOKEN: ${{ github.token }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git config --global am.keepcr true
# Re-authenticate git with GitHub token
SERVER_URL_STRIPPED="${SERVER_URL#https://}"
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@${SERVER_URL_STRIPPED}/${REPO_NAME}.git"
echo "Git configured with standard GitHub Actions identity"
- name: Checkout PR branch
id: checkout-pr
if: |
github.event.pull_request || github.event.issue.pull_request
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
with:
github-token: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs');
await main();
- name: Install GitHub Copilot CLI
run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.20
env:
GH_HOST: github.com
- name: Install AWF binary
run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.18
- name: Parse integrity filter lists
id: parse-guard-vars
env:
GH_AW_BLOCKED_USERS_VAR: ${{ vars.GH_AW_GITHUB_BLOCKED_USERS || '' }}
GH_AW_TRUSTED_USERS_VAR: ${{ vars.GH_AW_GITHUB_TRUSTED_USERS || '' }}
GH_AW_APPROVAL_LABELS_VAR: ${{ vars.GH_AW_GITHUB_APPROVAL_LABELS || '' }}
run: bash "${RUNNER_TEMP}/gh-aw/actions/parse_guard_list.sh"
- name: Download container images
run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.18 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.18 ghcr.io/github/gh-aw-firewall/squid:0.25.18 ghcr.io/github/gh-aw-mcpg:v0.2.17 ghcr.io/github/github-mcp-server:v0.32.0 node:lts-alpine
- name: Write Safe Outputs Config
run: |
mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs"
mkdir -p /tmp/gh-aw/safeoutputs
mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs
cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_788bfbc2e8cbcb67_EOF'
{"add_comment":{"max":1,"target":"*"},"add_labels":{"allowed":["bug","enhancement","question","documentation"],"max":1,"target":"*"},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{}}
GH_AW_SAFE_OUTPUTS_CONFIG_788bfbc2e8cbcb67_EOF
- name: Write Safe Outputs Tools
env:
GH_AW_TOOLS_META_JSON: |
{
"description_suffixes": {
"add_comment": " CONSTRAINTS: Maximum 1 comment(s) can be added. Target: *.",
"add_labels": " CONSTRAINTS: Maximum 1 label(s) can be added. Only these labels are allowed: [\"bug\" \"enhancement\" \"question\" \"documentation\"]. Target: *."
},
"repo_params": {},
"dynamic_tools": []
}
GH_AW_VALIDATION_JSON: |
{
"add_comment": {
"defaultMax": 1,
"fields": {
"body": {
"required": true,
"type": "string",
"sanitize": true,
"maxLength": 65000
},
"item_number": {
"issueOrPRNumber": true
},
"repo": {
"type": "string",
"maxLength": 256
}
}
},
"add_labels": {
"defaultMax": 5,
"fields": {
"item_number": {
"issueNumberOrTemporaryId": true
},
"labels": {
"required": true,
"type": "array",
"itemType": "string",
"itemSanitize": true,
"itemMaxLength": 128
},
"repo": {
"type": "string",
"maxLength": 256
}
}
},
"missing_data": {
"defaultMax": 20,
"fields": {
"alternatives": {
"type": "string",
"sanitize": true,
"maxLength": 256
},
"context": {
"type": "string",
"sanitize": true,
"maxLength": 256
},
"data_type": {
"type": "string",
"sanitize": true,
"maxLength": 128
},
"reason": {
"type": "string",
"sanitize": true,
"maxLength": 256
}
}
},
"missing_tool": {
"defaultMax": 20,
"fields": {
"alternatives": {
"type": "string",
"sanitize": true,
"maxLength": 512
},
"reason": {
"required": true,
"type": "string",
"sanitize": true,
"maxLength": 256
},
"tool": {
"type": "string",
"sanitize": true,
"maxLength": 128
}
}
},
"noop": {
"defaultMax": 1,
"fields": {
"message": {
"required": true,
"type": "string",
"sanitize": true,
"maxLength": 65000
}
}
},
"report_incomplete": {
"defaultMax": 5,
"fields": {
"details": {
"type": "string",
"sanitize": true,
"maxLength": 65000
},
"reason": {
"required": true,
"type": "string",
"sanitize": true,
"maxLength": 1024
}
}
}
}
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_safe_outputs_tools.cjs');
await main();
- name: Generate Safe Outputs MCP Server Config
id: safe-outputs-config
run: |
# Generate a secure random API key (360 bits of entropy, 40+ chars)
# Mask immediately to prevent timing vulnerabilities
API_KEY=$(openssl rand -base64 45 | tr -d '/+=')
echo "::add-mask::${API_KEY}"
PORT=3001
# Set outputs for next steps
{
echo "safe_outputs_api_key=${API_KEY}"
echo "safe_outputs_port=${PORT}"
} >> "$GITHUB_OUTPUT"
echo "Safe Outputs MCP server will run on port ${PORT}"
- name: Start Safe Outputs MCP HTTP Server
id: safe-outputs-start
env:
DEBUG: '*'
GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
GH_AW_SAFE_OUTPUTS_PORT: ${{ steps.safe-outputs-config.outputs.safe_outputs_port }}
GH_AW_SAFE_OUTPUTS_API_KEY: ${{ steps.safe-outputs-config.outputs.safe_outputs_api_key }}
GH_AW_SAFE_OUTPUTS_TOOLS_PATH: ${{ runner.temp }}/gh-aw/safeoutputs/tools.json
GH_AW_SAFE_OUTPUTS_CONFIG_PATH: ${{ runner.temp }}/gh-aw/safeoutputs/config.json
GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs
run: |
# Environment variables are set above to prevent template injection
export DEBUG
export GH_AW_SAFE_OUTPUTS
export GH_AW_SAFE_OUTPUTS_PORT
export GH_AW_SAFE_OUTPUTS_API_KEY
export GH_AW_SAFE_OUTPUTS_TOOLS_PATH
export GH_AW_SAFE_OUTPUTS_CONFIG_PATH
export GH_AW_MCP_LOG_DIR
bash "${RUNNER_TEMP}/gh-aw/actions/start_safe_outputs_server.sh"
- name: Start MCP Gateway
id: start-mcp-gateway
env:
GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
GH_AW_SAFE_OUTPUTS_API_KEY: ${{ steps.safe-outputs-start.outputs.api_key }}
GH_AW_SAFE_OUTPUTS_PORT: ${{ steps.safe-outputs-start.outputs.port }}
GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
run: |
set -eo pipefail
mkdir -p /tmp/gh-aw/mcp-config
# Export gateway environment variables for MCP config and gateway script
export MCP_GATEWAY_PORT="80"
export MCP_GATEWAY_DOMAIN="host.docker.internal"
MCP_GATEWAY_API_KEY=$(openssl rand -base64 45 | tr -d '/+=')
echo "::add-mask::${MCP_GATEWAY_API_KEY}"
export MCP_GATEWAY_API_KEY
export MCP_GATEWAY_PAYLOAD_DIR="/tmp/gh-aw/mcp-payloads"
mkdir -p "${MCP_GATEWAY_PAYLOAD_DIR}"
export MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD="524288"
export DEBUG="*"
export GH_AW_ENGINE="copilot"
export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.2.17'
mkdir -p /home/runner/.copilot
cat << GH_AW_MCP_CONFIG_5cf2254bdcfe4a71_EOF | bash "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.sh"
{
"mcpServers": {
"github": {
"type": "stdio",
"container": "ghcr.io/github/github-mcp-server:v0.32.0",
"env": {
"GITHUB_HOST": "\${GITHUB_SERVER_URL}",
"GITHUB_PERSONAL_ACCESS_TOKEN": "\${GITHUB_MCP_SERVER_TOKEN}",
"GITHUB_READ_ONLY": "1",
"GITHUB_TOOLSETS": "context,repos,issues,pull_requests"
},
"guard-policies": {
"allow-only": {
"approval-labels": ${{ steps.parse-guard-vars.outputs.approval_labels }},
"blocked-users": ${{ steps.parse-guard-vars.outputs.blocked_users }},
"min-integrity": "none",
"repos": "all",
"trusted-users": ${{ steps.parse-guard-vars.outputs.trusted_users }}
}
}
},
"safeoutputs": {
"type": "http",
"url": "http://host.docker.internal:$GH_AW_SAFE_OUTPUTS_PORT",
"headers": {
"Authorization": "\${GH_AW_SAFE_OUTPUTS_API_KEY}"
},
"guard-policies": {
"write-sink": {
"accept": [
"*"
]
}
}
}
},
"gateway": {
"port": $MCP_GATEWAY_PORT,
"domain": "${MCP_GATEWAY_DOMAIN}",
"apiKey": "${MCP_GATEWAY_API_KEY}",
"payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}"
}
}
GH_AW_MCP_CONFIG_5cf2254bdcfe4a71_EOF
- name: Download activation artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ needs.activation.outputs.artifact_prefix }}activation
path: /tmp/gh-aw
- name: Clean git credentials
continue-on-error: true
run: bash "${RUNNER_TEMP}/gh-aw/actions/clean_git_credentials.sh"
- name: Execute GitHub Copilot CLI
id: agentic_execution
# Copilot CLI tool arguments (sorted):
timeout-minutes: 20
run: |
set -o pipefail
touch /tmp/gh-aw/agent-step-summary.md
# shellcheck disable=SC1003
sudo -E awf --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --allow-domains api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --image-tag 0.25.18 --skip-pull --enable-api-proxy \
-- /bin/bash -c 'node ${RUNNER_TEMP}/gh-aw/actions/copilot_driver.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log
env:
COPILOT_AGENT_RUNNER_TYPE: STANDALONE
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || '' }}
GH_AW_MCP_CONFIG: /home/runner/.copilot/mcp-config.json
GH_AW_PHASE: agent
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
GH_AW_VERSION: v0.67.4
GITHUB_API_URL: ${{ github.api_url }}
GITHUB_AW: true
GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows
GITHUB_HEAD_REF: ${{ github.head_ref }}
GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
GITHUB_REF_NAME: ${{ github.ref_name }}
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_STEP_SUMMARY: /tmp/gh-aw/agent-step-summary.md
GITHUB_WORKSPACE: ${{ github.workspace }}
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_AUTHOR_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
XDG_CONFIG_HOME: /home/runner
- name: Detect inference access error
id: detect-inference-error
if: always()
continue-on-error: true
run: bash "${RUNNER_TEMP}/gh-aw/actions/detect_inference_access_error.sh"
- name: Configure Git credentials
env:
REPO_NAME: ${{ github.repository }}
SERVER_URL: ${{ github.server_url }}
GITHUB_TOKEN: ${{ github.token }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git config --global am.keepcr true
# Re-authenticate git with GitHub token
SERVER_URL_STRIPPED="${SERVER_URL#https://}"
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@${SERVER_URL_STRIPPED}/${REPO_NAME}.git"
echo "Git configured with standard GitHub Actions identity"
- name: Copy Copilot session state files to logs
if: always()
continue-on-error: true
run: bash "${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh"
- name: Stop MCP Gateway
if: always()
continue-on-error: true
env:
MCP_GATEWAY_PORT: ${{ steps.start-mcp-gateway.outputs.gateway-port }}
MCP_GATEWAY_API_KEY: ${{ steps.start-mcp-gateway.outputs.gateway-api-key }}
GATEWAY_PID: ${{ steps.start-mcp-gateway.outputs.gateway-pid }}
run: |
bash "${RUNNER_TEMP}/gh-aw/actions/stop_mcp_gateway.sh" "$GATEWAY_PID"
- name: Redact secrets in logs
if: always()
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/redact_secrets.cjs');
await main();
env:
GH_AW_SECRET_NAMES: 'COPILOT_GITHUB_TOKEN,GH_AW_GITHUB_MCP_SERVER_TOKEN,GH_AW_GITHUB_TOKEN,GITHUB_TOKEN'
SECRET_COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
SECRET_GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
SECRET_GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
SECRET_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Append agent step summary
if: always()
run: bash "${RUNNER_TEMP}/gh-aw/actions/append_agent_step_summary.sh"
- name: Copy Safe Outputs
if: always()
env:
GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
run: |
mkdir -p /tmp/gh-aw
cp "$GH_AW_SAFE_OUTPUTS" /tmp/gh-aw/safeoutputs.jsonl 2>/dev/null || true
- name: Ingest agent output
id: collect_output
if: always()
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
GH_AW_ALLOWED_DOMAINS: "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_API_URL: ${{ github.api_url }}
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/collect_ndjson_output.cjs');
await main();
- name: Parse agent logs for step summary
if: always()
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_AGENT_OUTPUT: /tmp/gh-aw/sandbox/agent/logs/
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_copilot_log.cjs');
await main();
- name: Parse MCP Gateway logs for step summary
if: always()
id: parse-mcp-gateway
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_mcp_gateway_log.cjs');
await main();
- name: Print firewall logs
if: always()
continue-on-error: true
env:
AWF_LOGS_DIR: /tmp/gh-aw/sandbox/firewall/logs
run: |
# Fix permissions on firewall logs so they can be uploaded as artifacts
# AWF runs with sudo, creating files owned by root
sudo chmod -R a+r /tmp/gh-aw/sandbox/firewall/logs 2>/dev/null || true
# Only run awf logs summary if awf command exists (it may not be installed if workflow failed before install step)
if command -v awf &> /dev/null; then
awf logs summary | tee -a "$GITHUB_STEP_SUMMARY"
else
echo 'AWF binary not installed, skipping firewall log summary'
fi
- name: Parse token usage for step summary
if: always()
continue-on-error: true
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs');
await main();
- name: Write agent output placeholder if missing
if: always()
run: |
if [ ! -f /tmp/gh-aw/agent_output.json ]; then
echo '{"items":[]}' > /tmp/gh-aw/agent_output.json
fi
- name: Upload agent artifacts
if: always()
continue-on-error: true
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: ${{ needs.activation.outputs.artifact_prefix }}agent
path: |
/tmp/gh-aw/aw-prompts/prompt.txt
/tmp/gh-aw/sandbox/agent/logs/
/tmp/gh-aw/redacted-urls.log
/tmp/gh-aw/mcp-logs/
/tmp/gh-aw/proxy-logs/
!/tmp/gh-aw/proxy-logs/proxy-tls/
/tmp/gh-aw/agent_usage.json
/tmp/gh-aw/agent-stdio.log
/tmp/gh-aw/agent/
/tmp/gh-aw/github_rate_limits.jsonl
/tmp/gh-aw/safeoutputs.jsonl
/tmp/gh-aw/agent_output.json
/tmp/gh-aw/aw-*.patch
/tmp/gh-aw/aw-*.bundle
if-no-files-found: ignore
- name: Upload firewall audit logs
if: always()
continue-on-error: true
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: ${{ needs.activation.outputs.artifact_prefix }}firewall-audit-logs
path: |
/tmp/gh-aw/sandbox/firewall/logs/
/tmp/gh-aw/sandbox/firewall/audit/
if-no-files-found: ignore
conclusion:
needs:
- activation
- agent
- detection
- safe_outputs
if: always() && (needs.agent.result != 'skipped' || needs.activation.outputs.lockdown_check_failed == 'true')
runs-on: ubuntu-slim
permissions:
contents: read
discussions: write
issues: write
pull-requests: write
concurrency:
group: "gh-aw-conclusion-handle-bug-${{ inputs.issue_number }}"
cancel-in-progress: false
outputs:
incomplete_count: ${{ steps.report_incomplete.outputs.incomplete_count }}
noop_message: ${{ steps.noop.outputs.noop_message }}
tools_reported: ${{ steps.missing_tool.outputs.tools_reported }}
total_count: ${{ steps.missing_tool.outputs.total_count }}
steps:
- name: Setup Scripts
id: setup
uses: github/gh-aw-actions/setup@9d6ae06250fc0ec536a0e5f35de313b35bad7246 # v0.67.4
with:
destination: ${{ runner.temp }}/gh-aw/actions
job-name: ${{ github.job }}
trace-id: ${{ needs.activation.outputs.setup-trace-id }}
- name: Download agent output artifact
id: download-agent-output
continue-on-error: true
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ needs.activation.outputs.artifact_prefix }}agent
path: /tmp/gh-aw/
- name: Setup agent output environment variable
id: setup-agent-output-env
if: steps.download-agent-output.outcome == 'success'
run: |
mkdir -p /tmp/gh-aw/
find "/tmp/gh-aw/" -type f -print
echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
- name: Process No-Op Messages
id: noop
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
GH_AW_NOOP_MAX: "1"
GH_AW_WORKFLOW_NAME: "Bug Handler"
GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }}
GH_AW_NOOP_REPORT_AS_ISSUE: "true"
with:
github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/handle_noop_message.cjs');
await main();
- name: Record missing tool
id: missing_tool
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
GH_AW_MISSING_TOOL_CREATE_ISSUE: "true"
GH_AW_WORKFLOW_NAME: "Bug Handler"
with:
github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/missing_tool.cjs');
await main();
- name: Record incomplete
id: report_incomplete
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
GH_AW_REPORT_INCOMPLETE_CREATE_ISSUE: "true"
GH_AW_WORKFLOW_NAME: "Bug Handler"
with:
github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/report_incomplete_handler.cjs');
await main();
- name: Handle agent failure
id: handle_agent_failure
if: always()
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
GH_AW_WORKFLOW_NAME: "Bug Handler"
GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }}
GH_AW_WORKFLOW_ID: "handle-bug"
GH_AW_ENGINE_ID: "copilot"
GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.activation.outputs.secret_verification_result }}
GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }}
GH_AW_INFERENCE_ACCESS_ERROR: ${{ needs.agent.outputs.inference_access_error }}
GH_AW_LOCKDOWN_CHECK_FAILED: ${{ needs.activation.outputs.lockdown_check_failed }}
GH_AW_GROUP_REPORTS: "false"
GH_AW_FAILURE_REPORT_AS_ISSUE: "true"
GH_AW_TIMEOUT_MINUTES: "20"
with:
github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/handle_agent_failure.cjs');
await main();
detection:
needs:
- activation
- agent
if: >
always() && needs.agent.result != 'skipped' && (needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true')
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
detection_conclusion: ${{ steps.detection_conclusion.outputs.conclusion }}
detection_success: ${{ steps.detection_conclusion.outputs.success }}
steps:
- name: Setup Scripts
id: setup
uses: github/gh-aw-actions/setup@9d6ae06250fc0ec536a0e5f35de313b35bad7246 # v0.67.4
with:
destination: ${{ runner.temp }}/gh-aw/actions
job-name: ${{ github.job }}
trace-id: ${{ needs.activation.outputs.setup-trace-id }}
- name: Download agent output artifact
id: download-agent-output
continue-on-error: true
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ needs.agent.outputs.artifact_prefix }}agent
path: /tmp/gh-aw/
- name: Setup agent output environment variable
id: setup-agent-output-env
if: steps.download-agent-output.outcome == 'success'
run: |
mkdir -p /tmp/gh-aw/
find "/tmp/gh-aw/" -type f -print
echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
- name: Checkout repository for patch context
if: needs.agent.outputs.has_patch == 'true'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
# --- Threat Detection ---
- name: Download container images
run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.18 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.18 ghcr.io/github/gh-aw-firewall/squid:0.25.18
- name: Check if detection needed
id: detection_guard
if: always()
env:
OUTPUT_TYPES: ${{ needs.agent.outputs.output_types }}
HAS_PATCH: ${{ needs.agent.outputs.has_patch }}
run: |
if [[ -n "$OUTPUT_TYPES" || "$HAS_PATCH" == "true" ]]; then
echo "run_detection=true" >> "$GITHUB_OUTPUT"
echo "Detection will run: output_types=$OUTPUT_TYPES, has_patch=$HAS_PATCH"
else
echo "run_detection=false" >> "$GITHUB_OUTPUT"
echo "Detection skipped: no agent outputs or patches to analyze"
fi
- name: Clear MCP configuration for detection
if: always() && steps.detection_guard.outputs.run_detection == 'true'
run: |
rm -f /tmp/gh-aw/mcp-config/mcp-servers.json
rm -f /home/runner/.copilot/mcp-config.json
rm -f "$GITHUB_WORKSPACE/.gemini/settings.json"
- name: Prepare threat detection files
if: always() && steps.detection_guard.outputs.run_detection == 'true'
run: |
mkdir -p /tmp/gh-aw/threat-detection/aw-prompts
cp /tmp/gh-aw/aw-prompts/prompt.txt /tmp/gh-aw/threat-detection/aw-prompts/prompt.txt 2>/dev/null || true
cp /tmp/gh-aw/agent_output.json /tmp/gh-aw/threat-detection/agent_output.json 2>/dev/null || true
for f in /tmp/gh-aw/aw-*.patch; do
[ -f "$f" ] && cp "$f" /tmp/gh-aw/threat-detection/ 2>/dev/null || true
done
for f in /tmp/gh-aw/aw-*.bundle; do
[ -f "$f" ] && cp "$f" /tmp/gh-aw/threat-detection/ 2>/dev/null || true
done
echo "Prepared threat detection files:"
ls -la /tmp/gh-aw/threat-detection/ 2>/dev/null || true
- name: Setup threat detection
if: always() && steps.detection_guard.outputs.run_detection == 'true'
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
WORKFLOW_NAME: "Bug Handler"
WORKFLOW_DESCRIPTION: "Handles issues classified as bugs by the triage classifier"
HAS_PATCH: ${{ needs.agent.outputs.has_patch }}
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/setup_threat_detection.cjs');
await main();
- name: Ensure threat-detection directory and log
if: always() && steps.detection_guard.outputs.run_detection == 'true'
run: |
mkdir -p /tmp/gh-aw/threat-detection
touch /tmp/gh-aw/threat-detection/detection.log
- name: Install GitHub Copilot CLI
run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.20
env:
GH_HOST: github.com
- name: Install AWF binary
run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.18
- name: Execute GitHub Copilot CLI
if: always() && steps.detection_guard.outputs.run_detection == 'true'
id: detection_agentic_execution
# Copilot CLI tool arguments (sorted):
timeout-minutes: 20
run: |
set -o pipefail
touch /tmp/gh-aw/agent-step-summary.md
# shellcheck disable=SC1003
sudo -E awf --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --allow-domains api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,github.com,host.docker.internal,telemetry.enterprise.githubcopilot.com --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --image-tag 0.25.18 --skip-pull --enable-api-proxy \
-- /bin/bash -c 'node ${RUNNER_TEMP}/gh-aw/actions/copilot_driver.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log
env:
COPILOT_AGENT_RUNNER_TYPE: STANDALONE
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || '' }}
GH_AW_PHASE: detection
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
GH_AW_VERSION: v0.67.4
GITHUB_API_URL: ${{ github.api_url }}
GITHUB_AW: true
GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows
GITHUB_HEAD_REF: ${{ github.head_ref }}
GITHUB_REF_NAME: ${{ github.ref_name }}
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_STEP_SUMMARY: /tmp/gh-aw/agent-step-summary.md
GITHUB_WORKSPACE: ${{ github.workspace }}
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_AUTHOR_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
XDG_CONFIG_HOME: /home/runner
- name: Upload threat detection log
if: always() && steps.detection_guard.outputs.run_detection == 'true'
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: ${{ needs.agent.outputs.artifact_prefix }}detection
path: /tmp/gh-aw/threat-detection/detection.log
if-no-files-found: ignore
- name: Parse and conclude threat detection
id: detection_conclusion
if: always()
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
RUN_DETECTION: ${{ steps.detection_guard.outputs.run_detection }}
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_threat_detection_results.cjs');
await main();
safe_outputs:
needs:
- activation
- agent
- detection
if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success'
runs-on: ubuntu-slim
permissions:
contents: read
discussions: write
issues: write
pull-requests: write
timeout-minutes: 15
env:
GH_AW_CALLER_WORKFLOW_ID: "${{ github.repository }}/handle-bug"
GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens }}
GH_AW_ENGINE_ID: "copilot"
GH_AW_ENGINE_MODEL: ${{ needs.agent.outputs.model }}
GH_AW_WORKFLOW_ID: "handle-bug"
GH_AW_WORKFLOW_NAME: "Bug Handler"
outputs:
code_push_failure_count: ${{ steps.process_safe_outputs.outputs.code_push_failure_count }}
code_push_failure_errors: ${{ steps.process_safe_outputs.outputs.code_push_failure_errors }}
comment_id: ${{ steps.process_safe_outputs.outputs.comment_id }}
comment_url: ${{ steps.process_safe_outputs.outputs.comment_url }}
create_discussion_error_count: ${{ steps.process_safe_outputs.outputs.create_discussion_error_count }}
create_discussion_errors: ${{ steps.process_safe_outputs.outputs.create_discussion_errors }}
process_safe_outputs_processed_count: ${{ steps.process_safe_outputs.outputs.processed_count }}
process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }}
steps:
- name: Setup Scripts
id: setup
uses: github/gh-aw-actions/setup@9d6ae06250fc0ec536a0e5f35de313b35bad7246 # v0.67.4
with:
destination: ${{ runner.temp }}/gh-aw/actions
job-name: ${{ github.job }}
trace-id: ${{ needs.activation.outputs.setup-trace-id }}
- name: Download agent output artifact
id: download-agent-output
continue-on-error: true
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ needs.activation.outputs.artifact_prefix }}agent
path: /tmp/gh-aw/
- name: Setup agent output environment variable
id: setup-agent-output-env
if: steps.download-agent-output.outcome == 'success'
run: |
mkdir -p /tmp/gh-aw/
find "/tmp/gh-aw/" -type f -print
echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
- name: Configure GH_HOST for enterprise compatibility
id: ghes-host-config
shell: bash
run: |
# Derive GH_HOST from GITHUB_SERVER_URL so the gh CLI targets the correct
# GitHub instance (GHES/GHEC). On github.com this is a harmless no-op.
GH_HOST="${GITHUB_SERVER_URL#https://}"
GH_HOST="${GH_HOST#http://}"
echo "GH_HOST=${GH_HOST}" >> "$GITHUB_ENV"
- name: Process Safe Outputs
id: process_safe_outputs
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
GH_AW_ALLOWED_DOMAINS: "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_API_URL: ${{ github.api_url }}
GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"max\":1,\"target\":\"*\"},\"add_labels\":{\"allowed\":[\"bug\",\"enhancement\",\"question\",\"documentation\"],\"max\":1,\"target\":\"*\"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"},\"report_incomplete\":{}}"
with:
github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/safe_output_handler_manager.cjs');
await main();
- name: Upload Safe Outputs Items
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: ${{ needs.activation.outputs.artifact_prefix }}safe-outputs-items
path: /tmp/gh-aw/safe-output-items.jsonl
if-no-files-found: ignore
================================================
FILE: .github/workflows/handle-bug.md
================================================
---
description: Handles issues classified as bugs by the triage classifier
concurrency:
job-discriminator: ${{ inputs.issue_number }}
on:
workflow_call:
inputs:
payload:
type: string
required: false
issue_number:
type: string
required: true
roles: all
permissions:
contents: read
issues: read
pull-requests: read
tools:
github:
toolsets: [default]
min-integrity: none
safe-outputs:
add-labels:
allowed: [bug, enhancement, question, documentation]
max: 1
target: "*"
add-comment:
max: 1
target: "*"
timeout-minutes: 20
---
# Bug Handler
You are an AI agent that investigates issues routed to you as potential bugs in the copilot-sdk repository. Your job is to determine whether the reported issue is genuinely a bug or has been misclassified, and to share your findings.
## Your Task
1. Fetch the full issue content (title, body, and comments) for issue #${{ inputs.issue_number }} using GitHub tools
2. Investigate the reported behavior by analyzing the relevant source code in the repository
3. Determine whether the behavior described is actually a bug or whether the product is working as designed
4. Apply the appropriate label and leave a comment with your findings
## Investigation Steps
1. **Understand the claim** — read the issue carefully to identify what specific behavior the author considers broken and what they expect instead.
2. **Analyze the codebase** — search the repository for the relevant code paths. Look at the implementation to understand whether the current behavior is intentional or accidental.
3. **Try to reproduce** — if the issue includes steps to reproduce, attempt to reproduce the bug using available tools (e.g., running tests, executing code). Document whether the bug reproduces and under what conditions.
4. **Check for related context** — look at recent commits, related tests, or documentation that might clarify whether the behavior is by design.
## Decision and Action
Based on your investigation, take **one** of the following actions:
- **If the behavior is genuinely a bug** (the code is not working as intended): add the `bug` label and leave a comment summarizing the root cause you identified.
- **If the behavior is working as designed** but the author wants it changed: add the `enhancement` label and leave a comment explaining that the current behavior is intentional and that the issue has been reclassified as a feature request.
- **If the issue is actually a usage question**: add the `question` label and leave a comment clarifying the intended behavior and how to use the feature correctly.
- **If the issue is about documentation**, or if the root cause is misuse of the product and there is a clear gap in documentation that would have prevented the issue: add the `documentation` label and leave a comment explaining the reclassification. The comment **must** describe the specific documentation gap — identify which docs are missing, incorrect, or unclear, and explain what content should be added or improved to address the issue.
**Always leave a comment** explaining your findings, even when confirming the issue is a bug. Include:
- What you investigated (which files/code paths you looked at)
- What you found (is the behavior intentional or not)
- Why you applied the label you chose
================================================
FILE: .github/workflows/handle-documentation.lock.yml
================================================
# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"258058e9a5e3bb707bbcfc9157b7b69f64c06547642da2526a1ff441e3a358dd","compiler_version":"v0.67.4","strict":true,"agent_id":"copilot"}
# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"ed597411d8f924073f98dfc5c65a23a2325f34cd","version":"v8"},{"repo":"actions/upload-artifact","sha":"bbbca2ddaa5d8feaa63e36b76fdaad77386f024f","version":"v7"},{"repo":"github/gh-aw-actions/setup","sha":"9d6ae06250fc0ec536a0e5f35de313b35bad7246","version":"v0.67.4"}]}
# ___ _ _
# / _ \ | | (_)
# | |_| | __ _ ___ _ __ | |_ _ ___
# | _ |/ _` |/ _ \ '_ \| __| |/ __|
# | | | | (_| | __/ | | | |_| | (__
# \_| |_/\__, |\___|_| |_|\__|_|\___|
# __/ |
# _ _ |___/
# | | | | / _| |
# | | | | ___ _ __ _ __| |_| | _____ ____
# | |/\| |/ _ \ '__| |/ /| _| |/ _ \ \ /\ / / ___|
# \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \
# \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/
#
# This file was automatically generated by gh-aw (v0.67.4). DO NOT EDIT.
#
# To update this file, edit the corresponding .md file and run:
# gh aw compile
# Not all edits will cause changes to this file.
#
# For more information: https://github.github.com/gh-aw/introduction/overview/
#
# Handles issues classified as documentation-related by the triage classifier
#
# Secrets used:
# - COPILOT_GITHUB_TOKEN
# - GH_AW_GITHUB_MCP_SERVER_TOKEN
# - GH_AW_GITHUB_TOKEN
# - GITHUB_TOKEN
#
# Custom actions used:
# - actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# - actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
# - actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
# - actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
# - github/gh-aw-actions/setup@9d6ae06250fc0ec536a0e5f35de313b35bad7246 # v0.67.4
name: "Documentation Handler"
"on":
workflow_call:
inputs:
issue_number:
required: true
type: string
payload:
required: false
type: string
outputs:
comment_id:
description: ID of the first added comment
value: ${{ jobs.safe_outputs.outputs.comment_id }}
comment_url:
description: URL of the first added comment
value: ${{ jobs.safe_outputs.outputs.comment_url }}
permissions: {}
concurrency:
group: "gh-aw-${{ github.workflow }}"
run-name: "Documentation Handler"
jobs:
activation:
runs-on: ubuntu-slim
permissions:
actions: read
contents: read
outputs:
artifact_prefix: ${{ steps.artifact-prefix.outputs.prefix }}
comment_id: ""
comment_repo: ""
lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }}
model: ${{ steps.generate_aw_info.outputs.model }}
secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }}
setup-trace-id: ${{ steps.setup.outputs.trace-id }}
target_ref: ${{ steps.resolve-host-repo.outputs.target_ref }}
target_repo: ${{ steps.resolve-host-repo.outputs.target_repo }}
target_repo_name: ${{ steps.resolve-host-repo.outputs.target_repo_name }}
steps:
- name: Setup Scripts
id: setup
uses: github/gh-aw-actions/setup@9d6ae06250fc0ec536a0e5f35de313b35bad7246 # v0.67.4
with:
destination: ${{ runner.temp }}/gh-aw/actions
job-name: ${{ github.job }}
- name: Resolve host repo for activation checkout
id: resolve-host-repo
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/resolve_host_repo.cjs');
await main();
- name: Compute artifact prefix
id: artifact-prefix
env:
INPUTS_JSON: ${{ toJSON(inputs) }}
run: bash "${RUNNER_TEMP}/gh-aw/actions/compute_artifact_prefix.sh"
- name: Generate agentic run info
id: generate_aw_info
env:
GH_AW_INFO_ENGINE_ID: "copilot"
GH_AW_INFO_ENGINE_NAME: "GitHub Copilot CLI"
GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'auto' }}
GH_AW_INFO_VERSION: "1.0.20"
GH_AW_INFO_AGENT_VERSION: "1.0.20"
GH_AW_INFO_CLI_VERSION: "v0.67.4"
GH_AW_INFO_WORKFLOW_NAME: "Documentation Handler"
GH_AW_INFO_EXPERIMENTAL: "false"
GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true"
GH_AW_INFO_STAGED: "false"
GH_AW_INFO_ALLOWED_DOMAINS: '["defaults"]'
GH_AW_INFO_FIREWALL_ENABLED: "true"
GH_AW_INFO_AWF_VERSION: "v0.25.18"
GH_AW_INFO_AWMG_VERSION: ""
GH_AW_INFO_FIREWALL_TYPE: "squid"
GH_AW_COMPILED_STRICT: "true"
GH_AW_INFO_TARGET_REPO: ${{ steps.resolve-host-repo.outputs.target_repo }}
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_aw_info.cjs');
await main(core, context);
- name: Validate COPILOT_GITHUB_TOKEN secret
id: validate-secret
run: bash "${RUNNER_TEMP}/gh-aw/actions/validate_multi_secret.sh" COPILOT_GITHUB_TOKEN 'GitHub Copilot CLI' https://github.github.com/gh-aw/reference/engines/#github-copilot-default
env:
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
- name: Cross-repo setup guidance
if: failure() && steps.resolve-host-repo.outputs.target_repo != github.repository
run: |
echo "::error::COPILOT_GITHUB_TOKEN must be configured in the CALLER repository's secrets."
echo "::error::For cross-repo workflow_call, secrets must be set in the repository that triggers the workflow."
echo "::error::See: https://github.github.com/gh-aw/patterns/central-repo-ops/#cross-repo-setup"
- name: Checkout .github and .agents folders
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
repository: ${{ steps.resolve-host-repo.outputs.target_repo }}
ref: ${{ steps.resolve-host-repo.outputs.target_ref }}
sparse-checkout: |
.github
.agents
sparse-checkout-cone-mode: true
fetch-depth: 1
- name: Check workflow lock file
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_WORKFLOW_FILE: "handle-documentation.lock.yml"
GH_AW_CONTEXT_WORKFLOW_REF: "${{ github.workflow_ref }}"
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_workflow_timestamp_api.cjs');
await main();
- name: Check compile-agentic version
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_COMPILED_VERSION: "v0.67.4"
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_version_updates.cjs');
await main();
- name: Create prompt with built-in context
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl
GH_AW_GITHUB_ACTOR: ${{ github.actor }}
GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }}
GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }}
GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
GH_AW_INPUTS_ISSUE_NUMBER: ${{ inputs.issue_number }}
# poutine:ignore untrusted_checkout_exec
run: |
bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh"
{
cat << 'GH_AW_PROMPT_c1995fcb77e4eb7d_EOF'
<system>
GH_AW_PROMPT_c1995fcb77e4eb7d_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md"
cat << 'GH_AW_PROMPT_c1995fcb77e4eb7d_EOF'
<safe-output-tools>
Tools: add_comment, add_labels, missing_tool, missing_data, noop
</safe-output-tools>
<github-context>
The following GitHub context information is available for this workflow:
{{#if __GH_AW_GITHUB_ACTOR__ }}
- **actor**: __GH_AW_GITHUB_ACTOR__
{{/if}}
{{#if __GH_AW_GITHUB_REPOSITORY__ }}
- **repository**: __GH_AW_GITHUB_REPOSITORY__
{{/if}}
{{#if __GH_AW_GITHUB_WORKSPACE__ }}
- **workspace**: __GH_AW_GITHUB_WORKSPACE__
{{/if}}
{{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
{{/if}}
{{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
{{/if}}
{{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
{{/if}}
{{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
{{/if}}
{{#if __GH_AW_GITHUB_RUN_ID__ }}
- **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
{{/if}}
</github-context>
GH_AW_PROMPT_c1995fcb77e4eb7d_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md"
cat << 'GH_AW_PROMPT_c1995fcb77e4eb7d_EOF'
</system>
{{#runtime-import .github/workflows/handle-documentation.md}}
GH_AW_PROMPT_c1995fcb77e4eb7d_EOF
} > "$GH_AW_PROMPT"
- name: Interpolate variables and render templates
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
GH_AW_INPUTS_ISSUE_NUMBER: ${{ inputs.issue_number }}
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/interpolate_prompt.cjs');
await main();
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
GH_AW_GITHUB_ACTOR: ${{ github.actor }}
GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }}
GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }}
GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
GH_AW_INPUTS_ISSUE_NUMBER: ${{ inputs.issue_number }}
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const substitutePlaceholders = require('${{ runner.temp }}/gh-aw/actions/substitute_placeholders.cjs');
// Call the substitution function
return await substitutePlaceholders({
file: process.env.GH_AW_PROMPT,
substitutions: {
GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR,
GH_AW_GITHUB_EVENT_COMMENT_ID: process.env.GH_AW_GITHUB_EVENT_COMMENT_ID,
GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: process.env.GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER,
GH_AW_GITHUB_EVENT_ISSUE_NUMBER: process.env.GH_AW_GITHUB_EVENT_ISSUE_NUMBER,
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
GH_AW_INPUTS_ISSUE_NUMBER: process.env.GH_AW_INPUTS_ISSUE_NUMBER
}
});
- name: Validate prompt placeholders
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
# poutine:ignore untrusted_checkout_exec
run: bash "${RUNNER_TEMP}/gh-aw/actions/validate_prompt_placeholders.sh"
- name: Print prompt
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
# poutine:ignore untrusted_checkout_exec
run: bash "${RUNNER_TEMP}/gh-aw/actions/print_prompt_summary.sh"
- name: Upload activation artifact
if: success()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: ${{ steps.artifact-prefix.outputs.prefix }}activation
path: |
/tmp/gh-aw/aw_info.json
/tmp/gh-aw/aw-prompts/prompt.txt
/tmp/gh-aw/github_rate_limits.jsonl
if-no-files-found: ignore
retention-days: 1
agent:
needs: activation
runs-on: ubuntu-latest
permissions:
contents: read
issues: read
pull-requests: read
concurrency:
group: "gh-aw-copilot-${{ github.workflow }}-${{ inputs.issue_number }}"
env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
GH_AW_ASSETS_ALLOWED_EXTS: ""
GH_AW_ASSETS_BRANCH: ""
GH_AW_ASSETS_MAX_SIZE_KB: 0
GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs
GH_AW_WORKFLOW_ID_SANITIZED: handledocumentation
outputs:
artifact_prefix: ${{ needs.activation.outputs.artifact_prefix }}
checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }}
effective_tokens: ${{ steps.parse-mcp-gateway.outputs.effective_tokens }}
has_patch: ${{ steps.collect_output.outputs.has_patch }}
inference_access_error: ${{ steps.detect-inference-error.outputs.inference_access_error || 'false' }}
model: ${{ needs.activation.outputs.model }}
output: ${{ steps.collect_output.outputs.output }}
output_types: ${{ steps.collect_output.outputs.output_types }}
setup-trace-id: ${{ steps.setup.outputs.trace-id }}
steps:
- name: Setup Scripts
id: setup
uses: github/gh-aw-actions/setup@9d6ae06250fc0ec536a0e5f35de313b35bad7246 # v0.67.4
with:
destination: ${{ runner.temp }}/gh-aw/actions
job-name: ${{ github.job }}
trace-id: ${{ needs.activation.outputs.setup-trace-id }}
- name: Set runtime paths
id: set-runtime-paths
run: |
echo "GH_AW_SAFE_OUTPUTS=${RUNNER_TEMP}/gh-aw/safeoutputs/outputs.jsonl" >> "$GITHUB_OUTPUT"
echo "GH_AW_SAFE_OUTPUTS_CONFIG_PATH=${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" >> "$GITHUB_OUTPUT"
echo "GH_AW_SAFE_OUTPUTS_TOOLS_PATH=${RUNNER_TEMP}/gh-aw/safeoutputs/tools.json" >> "$GITHUB_OUTPUT"
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Create gh-aw temp directory
run: bash "${RUNNER_TEMP}/gh-aw/actions/create_gh_aw_tmp_dir.sh"
- name: Configure gh CLI for GitHub Enterprise
run: bash "${RUNNER_TEMP}/gh-aw/actions/configure_gh_for_ghe.sh"
env:
GH_TOKEN: ${{ github.token }}
- name: Configure Git credentials
env:
REPO_NAME: ${{ github.repository }}
SERVER_URL: ${{ github.server_url }}
GITHUB_TOKEN: ${{ github.token }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git config --global am.keepcr true
# Re-authenticate git with GitHub token
SERVER_URL_STRIPPED="${SERVER_URL#https://}"
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@${SERVER_URL_STRIPPED}/${REPO_NAME}.git"
echo "Git configured with standard GitHub Actions identity"
- name: Checkout PR branch
id: checkout-pr
if: |
github.event.pull_request || github.event.issue.pull_request
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
GH_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
with:
github-token: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
setupGlobals(core, github, context, exec, io);
const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs');
await main();
- name: Install GitHub Copilot CLI
run:
gitextract_xohivnil/
├── .devcontainer/
│ └── devcontainer.json
├── .gitattributes
├── .github/
│ ├── CODEOWNERS
│ ├── actions/
│ │ └── setup-copilot/
│ │ └── action.yml
│ ├── agents/
│ │ ├── agentic-workflows.agent.md
│ │ └── docs-maintenance.agent.md
│ ├── aw/
│ │ ├── actions-lock.json
│ │ └── logs/
│ │ └── .gitignore
│ ├── commands/
│ │ └── triage_feedback.yml
│ ├── copilot-instructions.md
│ ├── dependabot.yaml
│ ├── lsp.json
│ └── workflows/
│ ├── codegen-check.yml
│ ├── collect-corrections.yml
│ ├── copilot-setup-steps.yml
│ ├── corrections-tests.yml
│ ├── cross-repo-issue-analysis.lock.yml
│ ├── cross-repo-issue-analysis.md
│ ├── docs-validation.yml
│ ├── dotnet-sdk-tests.yml
│ ├── go-sdk-tests.yml
│ ├── handle-bug.lock.yml
│ ├── handle-bug.md
│ ├── handle-documentation.lock.yml
│ ├── handle-documentation.md
│ ├── handle-enhancement.lock.yml
│ ├── handle-enhancement.md
│ ├── handle-question.lock.yml
│ ├── handle-question.md
│ ├── issue-classification.lock.yml
│ ├── issue-classification.md
│ ├── issue-triage.lock.yml
│ ├── issue-triage.md
│ ├── nodejs-sdk-tests.yml
│ ├── publish.yml
│ ├── python-sdk-tests.yml
│ ├── release-changelog.lock.yml
│ ├── release-changelog.md
│ ├── scenario-builds.yml
│ ├── sdk-consistency-review.lock.yml
│ ├── sdk-consistency-review.md
│ ├── update-copilot-dependency.yml
│ └── verify-compiled.yml
├── .gitignore
├── .vscode/
│ ├── launch.json
│ └── settings.json
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── SUPPORT.md
├── docs/
│ ├── auth/
│ │ ├── byok.md
│ │ └── index.md
│ ├── features/
│ │ ├── agent-loop.md
│ │ ├── custom-agents.md
│ │ ├── hooks.md
│ │ ├── image-input.md
│ │ ├── index.md
│ │ ├── mcp.md
│ │ ├── session-persistence.md
│ │ ├── skills.md
│ │ ├── steering-and-queueing.md
│ │ └── streaming-events.md
│ ├── getting-started.md
│ ├── hooks/
│ │ ├── error-handling.md
│ │ ├── index.md
│ │ ├── post-tool-use.md
│ │ ├── pre-tool-use.md
│ │ ├── session-lifecycle.md
│ │ └── user-prompt-submitted.md
│ ├── index.md
│ ├── integrations/
│ │ └── microsoft-agent-framework.md
│ ├── observability/
│ │ └── opentelemetry.md
│ ├── setup/
│ │ ├── azure-managed-identity.md
│ │ ├── backend-services.md
│ │ ├── bundled-cli.md
│ │ ├── github-oauth.md
│ │ ├── index.md
│ │ ├── local-cli.md
│ │ └── scaling.md
│ └── troubleshooting/
│ ├── compatibility.md
│ ├── debugging.md
│ └── mcp-debugging.md
├── dotnet/
│ ├── .config/
│ │ └── dotnet-tools.json
│ ├── .gitignore
│ ├── Directory.Build.props
│ ├── Directory.Packages.props
│ ├── GitHub.Copilot.SDK.slnx
│ ├── README.md
│ ├── global.json
│ ├── nuget.config
│ ├── samples/
│ │ ├── Chat.cs
│ │ └── Chat.csproj
│ ├── src/
│ │ ├── ActionDisposable.cs
│ │ ├── Client.cs
│ │ ├── Generated/
│ │ │ ├── Rpc.cs
│ │ │ └── SessionEvents.cs
│ │ ├── GitHub.Copilot.SDK.csproj
│ │ ├── JsonRpc.cs
│ │ ├── MillisecondsTimeSpanConverter.cs
│ │ ├── PermissionHandlers.cs
│ │ ├── SdkProtocolVersion.cs
│ │ ├── Session.cs
│ │ ├── SessionFsProvider.cs
│ │ ├── Telemetry.cs
│ │ ├── Types.cs
│ │ └── build/
│ │ └── GitHub.Copilot.SDK.targets
│ └── test/
│ ├── AssemblyInfo.cs
│ ├── E2E/
│ │ ├── AskUserE2ETests.cs
│ │ ├── BuiltinToolsE2ETests.cs
│ │ ├── ClientE2ETests.cs
│ │ ├── ClientLifecycleE2ETests.cs
│ │ ├── ClientOptionsE2ETests.cs
│ │ ├── ClientSessionManagementE2ETests.cs
│ │ ├── CommandsE2ETests.cs
│ │ ├── CompactionE2ETests.cs
│ │ ├── ElicitationE2ETests.cs
│ │ ├── ErrorResilienceE2ETests.cs
│ │ ├── EventFidelityE2ETests.cs
│ │ ├── HookLifecycleAndOutputE2ETests.cs
│ │ ├── HooksE2ETests.cs
│ │ ├── MultiClientCommandsElicitationE2ETests.cs
│ │ ├── MultiClientE2ETests.cs
│ │ ├── MultiTurnE2ETests.cs
│ │ ├── PendingWorkResumeE2ETests.cs
│ │ ├── PerSessionAuthE2ETests.cs
│ │ ├── PermissionE2ETests.cs
│ │ ├── RpcAgentE2ETests.cs
│ │ ├── RpcMcpAndSkillsE2ETests.cs
│ │ ├── RpcMcpConfigE2ETests.cs
│ │ ├── RpcServerE2ETests.cs
│ │ ├── RpcSessionStateE2ETests.cs
│ │ ├── RpcShellAndFleetE2ETests.cs
│ │ ├── RpcTasksAndHandlersE2ETests.cs
│ │ ├── SessionConfigE2ETests.cs
│ │ ├── SessionE2ETests.cs
│ │ ├── SessionFsE2ETests.cs
│ │ ├── SessionLifecycleE2ETests.cs
│ │ ├── SessionMcpAndAgentConfigE2ETests.cs
│ │ ├── SkillsE2ETests.cs
│ │ ├── StreamingFidelityE2ETests.cs
│ │ ├── SuspendE2ETests.cs
│ │ ├── SystemMessageTransformE2ETests.cs
│ │ ├── TelemetryExportE2ETests.cs
│ │ ├── ToolResultsE2ETests.cs
│ │ └── ToolsE2ETests.cs
│ ├── GitHub.Copilot.SDK.Test.csproj
│ ├── Harness/
│ │ ├── CapiProxy.cs
│ │ ├── E2ETestBase.cs
│ │ ├── E2ETestContext.cs
│ │ ├── E2ETestFixture.cs
│ │ └── TestHelper.cs
│ └── Unit/
│ ├── CloneTests.cs
│ ├── ForwardCompatibilityTests.cs
│ ├── JsonRpcTests.cs
│ ├── PermissionRequestResultKindTests.cs
│ ├── PublicDtoTests.cs
│ ├── SerializationTests.cs
│ ├── SessionEventSerializationTests.cs
│ └── TelemetryTests.cs
├── go/
│ ├── .gitignore
│ ├── .golangci.yml
│ ├── README.md
│ ├── client.go
│ ├── client_test.go
│ ├── cmd/
│ │ └── bundler/
│ │ └── main.go
│ ├── definetool.go
│ ├── definetool_test.go
│ ├── embeddedcli/
│ │ └── installer.go
│ ├── generated_session_events.go
│ ├── go.mod
│ ├── go.sum
│ ├── internal/
│ │ ├── e2e/
│ │ │ ├── agent_and_compact_rpc_e2e_test.go
│ │ │ ├── ask_user_e2e_test.go
│ │ │ ├── builtin_tools_e2e_test.go
│ │ │ ├── client_api_e2e_test.go
│ │ │ ├── client_e2e_test.go
│ │ │ ├── client_lifecycle_e2e_test.go
│ │ │ ├── client_options_e2e_test.go
│ │ │ ├── commands_and_elicitation_e2e_test.go
│ │ │ ├── compaction_e2e_test.go
│ │ │ ├── error_resilience_e2e_test.go
│ │ │ ├── event_fidelity_e2e_test.go
│ │ │ ├── hooks_e2e_test.go
│ │ │ ├── hooks_extended_e2e_test.go
│ │ │ ├── mcp_and_agents_e2e_test.go
│ │ │ ├── multi_client_e2e_test.go
│ │ │ ├── multi_turn_e2e_test.go
│ │ │ ├── pending_work_resume_e2e_test.go
│ │ │ ├── per_session_auth_e2e_test.go
│ │ │ ├── permissions_e2e_test.go
│ │ │ ├── rpc_e2e_test.go
│ │ │ ├── rpc_mcp_and_skills_e2e_test.go
│ │ │ ├── rpc_mcp_config_e2e_test.go
│ │ │ ├── rpc_server_e2e_test.go
│ │ │ ├── rpc_session_state_e2e_test.go
│ │ │ ├── rpc_shell_and_fleet_e2e_test.go
│ │ │ ├── rpc_tasks_and_handlers_e2e_test.go
│ │ │ ├── session_config_e2e_test.go
│ │ │ ├── session_e2e_test.go
│ │ │ ├── session_fs_e2e_test.go
│ │ │ ├── skills_e2e_test.go
│ │ │ ├── streaming_fidelity_e2e_test.go
│ │ │ ├── suspend_e2e_test.go
│ │ │ ├── system_message_transform_e2e_test.go
│ │ │ ├── telemetry_e2e_test.go
│ │ │ ├── testharness/
│ │ │ │ ├── context.go
│ │ │ │ ├── helper.go
│ │ │ │ └── proxy.go
│ │ │ ├── tool_results_e2e_test.go
│ │ │ └── tools_e2e_test.go
│ │ ├── embeddedcli/
│ │ │ ├── embeddedcli.go
│ │ │ └── embeddedcli_test.go
│ │ ├── flock/
│ │ │ ├── flock.go
│ │ │ ├── flock_other.go
│ │ │ ├── flock_test.go
│ │ │ ├── flock_unix.go
│ │ │ └── flock_windows.go
│ │ └── jsonrpc2/
│ │ ├── frame.go
│ │ ├── jsonrpc2.go
│ │ └── jsonrpc2_test.go
│ ├── permissions.go
│ ├── process_other.go
│ ├── process_windows.go
│ ├── rpc/
│ │ ├── generated_rpc.go
│ │ └── result_union.go
│ ├── samples/
│ │ ├── chat.go
│ │ ├── go.mod
│ │ └── go.sum
│ ├── sdk_protocol_version.go
│ ├── session.go
│ ├── session_event_serialization_test.go
│ ├── session_fs_provider.go
│ ├── session_test.go
│ ├── telemetry.go
│ ├── telemetry_test.go
│ ├── test.sh
│ ├── types.go
│ └── types_test.go
├── java/
│ └── README.md
├── justfile
├── nodejs/
│ ├── .gitignore
│ ├── .npmignore
│ ├── .prettierignore
│ ├── .prettierrc.json
│ ├── README.md
│ ├── docs/
│ │ ├── agent-author.md
│ │ ├── examples.md
│ │ └── extensions.md
│ ├── esbuild-copilotsdk-nodejs.ts
│ ├── eslint.config.js
│ ├── examples/
│ │ └── basic-example.ts
│ ├── package.json
│ ├── samples/
│ │ ├── chat.ts
│ │ └── package.json
│ ├── scripts/
│ │ ├── get-version.js
│ │ ├── set-version.js
│ │ └── update-protocol-version.ts
│ ├── src/
│ │ ├── client.ts
│ │ ├── extension.ts
│ │ ├── generated/
│ │ │ ├── rpc.ts
│ │ │ └── session-events.ts
│ │ ├── index.ts
│ │ ├── sdkProtocolVersion.ts
│ │ ├── session.ts
│ │ ├── sessionFsProvider.ts
│ │ ├── telemetry.ts
│ │ └── types.ts
│ ├── test/
│ │ ├── call-tool-result.test.ts
│ │ ├── cjs-compat.test.ts
│ │ ├── client.test.ts
│ │ ├── e2e/
│ │ │ ├── agent_and_compact_rpc.e2e.test.ts
│ │ │ ├── ask_user.e2e.test.ts
│ │ │ ├── builtin_tools.e2e.test.ts
│ │ │ ├── client.e2e.test.ts
│ │ │ ├── client_api.e2e.test.ts
│ │ │ ├── client_lifecycle.e2e.test.ts
│ │ │ ├── client_options.e2e.test.ts
│ │ │ ├── commands.e2e.test.ts
│ │ │ ├── compaction.e2e.test.ts
│ │ │ ├── error_resilience.e2e.test.ts
│ │ │ ├── event_fidelity.e2e.test.ts
│ │ │ ├── harness/
│ │ │ │ ├── CapiProxy.ts
│ │ │ │ ├── sdkTestContext.ts
│ │ │ │ └── sdkTestHelper.ts
│ │ │ ├── hooks.e2e.test.ts
│ │ │ ├── hooks_extended.e2e.test.ts
│ │ │ ├── mcp_and_agents.e2e.test.ts
│ │ │ ├── multi-client.e2e.test.ts
│ │ │ ├── multi_turn.e2e.test.ts
│ │ │ ├── pending_work_resume.e2e.test.ts
│ │ │ ├── per_session_auth.e2e.test.ts
│ │ │ ├── permissions.e2e.test.ts
│ │ │ ├── rpc.e2e.test.ts
│ │ │ ├── rpc_mcp_and_skills.e2e.test.ts
│ │ │ ├── rpc_mcp_config.e2e.test.ts
│ │ │ ├── rpc_server.e2e.test.ts
│ │ │ ├── rpc_session_state.e2e.test.ts
│ │ │ ├── rpc_shell_and_fleet.e2e.test.ts
│ │ │ ├── rpc_tasks_and_handlers.e2e.test.ts
│ │ │ ├── session.e2e.test.ts
│ │ │ ├── session_config.e2e.test.ts
│ │ │ ├── session_fs.e2e.test.ts
│ │ │ ├── session_lifecycle.e2e.test.ts
│ │ │ ├── skills.e2e.test.ts
│ │ │ ├── streaming_fidelity.e2e.test.ts
│ │ │ ├── suspend.e2e.test.ts
│ │ │ ├── system_message_transform.e2e.test.ts
│ │ │ ├── telemetry.e2e.test.ts
│ │ │ ├── tool_results.e2e.test.ts
│ │ │ ├── tools.e2e.test.ts
│ │ │ └── ui_elicitation.e2e.test.ts
│ │ ├── extension.test.ts
│ │ ├── python-codegen.test.ts
│ │ ├── session_fs_adapter.test.ts
│ │ └── telemetry.test.ts
│ ├── tsconfig.json
│ └── vitest.config.ts
├── python/
│ ├── .gitignore
│ ├── README.md
│ ├── copilot/
│ │ ├── __init__.py
│ │ ├── _jsonrpc.py
│ │ ├── _sdk_protocol_version.py
│ │ ├── _telemetry.py
│ │ ├── client.py
│ │ ├── generated/
│ │ │ ├── __init__.py
│ │ │ ├── rpc.py
│ │ │ └── session_events.py
│ │ ├── py.typed
│ │ ├── session.py
│ │ ├── session_fs_provider.py
│ │ └── tools.py
│ ├── e2e/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── test_agent_and_compact_rpc_e2e.py
│ │ ├── test_ask_user_e2e.py
│ │ ├── test_builtin_tools_e2e.py
│ │ ├── test_client_api_e2e.py
│ │ ├── test_client_e2e.py
│ │ ├── test_client_lifecycle_e2e.py
│ │ ├── test_client_options_e2e.py
│ │ ├── test_commands_e2e.py
│ │ ├── test_compaction_e2e.py
│ │ ├── test_error_resilience_e2e.py
│ │ ├── test_event_fidelity_e2e.py
│ │ ├── test_hooks_e2e.py
│ │ ├── test_hooks_extended_e2e.py
│ │ ├── test_mcp_and_agents_e2e.py
│ │ ├── test_multi_client_e2e.py
│ │ ├── test_multi_turn_e2e.py
│ │ ├── test_pending_work_resume_e2e.py
│ │ ├── test_per_session_auth_e2e.py
│ │ ├── test_permissions_e2e.py
│ │ ├── test_rpc_e2e.py
│ │ ├── test_rpc_mcp_and_skills_e2e.py
│ │ ├── test_rpc_mcp_config_e2e.py
│ │ ├── test_rpc_server_e2e.py
│ │ ├── test_rpc_session_state_e2e.py
│ │ ├── test_rpc_shell_and_fleet_e2e.py
│ │ ├── test_rpc_tasks_and_handlers_e2e.py
│ │ ├── test_session_config_e2e.py
│ │ ├── test_session_e2e.py
│ │ ├── test_session_fs_e2e.py
│ │ ├── test_skills_e2e.py
│ │ ├── test_streaming_fidelity_e2e.py
│ │ ├── test_suspend_e2e.py
│ │ ├── test_system_message_transform_e2e.py
│ │ ├── test_telemetry_e2e.py
│ │ ├── test_tool_results_e2e.py
│ │ ├── test_tools_e2e.py
│ │ ├── test_ui_elicitation_e2e.py
│ │ ├── test_ui_elicitation_multi_client_e2e.py
│ │ └── testharness/
│ │ ├── __init__.py
│ │ ├── context.py
│ │ ├── helper.py
│ │ └── proxy.py
│ ├── pyproject.toml
│ ├── samples/
│ │ └── chat.py
│ ├── scripts/
│ │ └── build-wheels.mjs
│ ├── test_client.py
│ ├── test_commands_and_elicitation.py
│ ├── test_event_forward_compatibility.py
│ ├── test_jsonrpc.py
│ ├── test_rpc_timeout.py
│ ├── test_telemetry.py
│ └── test_tools.py
├── scripts/
│ ├── codegen/
│ │ ├── .gitignore
│ │ ├── csharp.ts
│ │ ├── go.ts
│ │ ├── package.json
│ │ ├── python.ts
│ │ ├── typescript.ts
│ │ └── utils.ts
│ ├── corrections/
│ │ ├── .gitignore
│ │ ├── collect-corrections.js
│ │ ├── package.json
│ │ ├── test/
│ │ │ └── collect-corrections.test.ts
│ │ └── tsconfig.json
│ └── docs-validation/
│ ├── .gitignore
│ ├── extract.ts
│ ├── package.json
│ └── validate.ts
├── sdk-protocol-version.json
└── test/
├── harness/
│ ├── .gitignore
│ ├── capturingHttpProxy.test.ts
│ ├── capturingHttpProxy.ts
│ ├── package.json
│ ├── replayingCapiProxy.test.ts
│ ├── replayingCapiProxy.ts
│ ├── server.ts
│ ├── test-mcp-server.mjs
│ ├── tsconfig.json
│ ├── util.ts
│ └── vitest.config.ts
├── scenarios/
│ ├── .gitignore
│ ├── README.md
│ ├── auth/
│ │ ├── byok-anthropic/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── byok-azure/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── byok-ollama/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── byok-openai/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ └── gh-app/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── index.ts
│ │ └── verify.sh
│ ├── bundling/
│ │ ├── app-backend-to-server/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── app-direct-server/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ ├── src/
│ │ │ │ │ └── index.ts
│ │ │ │ └── tsconfig.json
│ │ │ └── verify.sh
│ │ ├── container-proxy/
│ │ │ ├── .dockerignore
│ │ │ ├── Dockerfile
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── docker-compose.yml
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── proxy.py
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ ├── src/
│ │ │ │ │ └── index.ts
│ │ │ │ └── tsconfig.json
│ │ │ └── verify.sh
│ │ └── fully-bundled/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ ├── src/
│ │ │ │ └── index.ts
│ │ │ └── tsconfig.json
│ │ └── verify.sh
│ ├── callbacks/
│ │ ├── hooks/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── permissions/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ └── user-input/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── index.ts
│ │ └── verify.sh
│ ├── modes/
│ │ ├── default/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ └── minimal/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── index.ts
│ │ └── verify.sh
│ ├── prompts/
│ │ ├── attachments/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── sample-data.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── reasoning-effort/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ └── system-message/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── index.ts
│ │ └── verify.sh
│ ├── sessions/
│ │ ├── concurrent-sessions/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── infinite-sessions/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── multi-user-long-lived/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── multi-user-short-lived/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── session-resume/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ └── streaming/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── index.ts
│ │ └── verify.sh
│ ├── tools/
│ │ ├── custom-agents/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── mcp-servers/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── no-tools/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── skills/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── sample-skills/
│ │ │ │ └── greeting/
│ │ │ │ └── SKILL.md
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── tool-filtering/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── tool-overrides/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ └── virtual-filesystem/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── index.ts
│ │ └── verify.sh
│ ├── transport/
│ │ ├── README.md
│ │ ├── reconnect/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ ├── stdio/
│ │ │ ├── README.md
│ │ │ ├── csharp/
│ │ │ │ ├── Program.cs
│ │ │ │ └── csharp.csproj
│ │ │ ├── go/
│ │ │ │ ├── go.mod
│ │ │ │ ├── go.sum
│ │ │ │ └── main.go
│ │ │ ├── python/
│ │ │ │ ├── main.py
│ │ │ │ └── requirements.txt
│ │ │ ├── typescript/
│ │ │ │ ├── package.json
│ │ │ │ └── src/
│ │ │ │ └── index.ts
│ │ │ └── verify.sh
│ │ └── tcp/
│ │ ├── README.md
│ │ ├── csharp/
│ │ │ ├── Program.cs
│ │ │ └── csharp.csproj
│ │ ├── go/
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ └── main.go
│ │ ├── python/
│ │ │ ├── main.py
│ │ │ └── requirements.txt
│ │ ├── typescript/
│ │ │ ├── package.json
│ │ │ └── src/
│ │ │ └── index.ts
│ │ └── verify.sh
│ └── verify.sh
└── snapshots/
├── agent_and_compact_rpc/
│ └── should_compact_session_history_after_messages.yaml
├── ask-user/
│ ├── should_handle_freeform_user_input_response.yaml
│ ├── should_invoke_user_input_handler_when_model_uses_ask_user_tool.yaml
│ └── should_receive_choices_in_user_input_request.yaml
├── ask_user/
│ ├── handle_freeform_user_input_response.yaml
│ ├── invoke_user_input_handler_when_model_uses_ask_user_tool.yaml
│ ├── receive_choices_in_user_input_request.yaml
│ ├── should_handle_freeform_user_input_response.yaml
│ ├── should_invoke_user_input_handler_when_model_uses_ask_user_tool.yaml
│ └── should_receive_choices_in_user_input_request.yaml
├── askuser/
│ ├── should_handle_freeform_user_input_response.yaml
│ ├── should_invoke_user_input_handler_when_model_uses_ask_user_tool.yaml
│ └── should_receive_choices_in_user_input_request.yaml
├── builtin_tools/
│ ├── should_capture_exit_code_in_output.yaml
│ ├── should_capture_stderr_output.yaml
│ ├── should_create_a_new_file.yaml
│ ├── should_edit_a_file_successfully.yaml
│ ├── should_find_files_by_pattern.yaml
│ ├── should_handle_nonexistent_file_gracefully.yaml
│ ├── should_read_file_with_line_range.yaml
│ └── should_search_for_patterns_in_files.yaml
├── client_api/
│ ├── should_delete_session_by_id.yaml
│ └── should_track_last_session_id_after_session_created.yaml
├── client_lifecycle/
│ ├── should_emit_session_lifecycle_events.yaml
│ └── should_return_last_session_id_after_sending_a_message.yaml
├── client_options/
│ └── should_use_client_cwd_for_default_workingdirectory.yaml
├── combinedconfiguration/
│ └── accept_mcp_servers_and_custom_agents.yaml
├── compaction/
│ ├── should_not_emit_compaction_events_when_infinite_sessions_disabled.yaml
│ └── should_trigger_compaction_with_low_threshold_and_emit_events.yaml
├── customagents/
│ ├── accept_custom_agent_config_on_create.yaml
│ └── accept_custom_agent_config_on_resume.yaml
├── event_fidelity/
│ ├── should_emit_assistant_message_with_messageid.yaml
│ ├── should_emit_events_in_correct_order_for_tool_using_conversation.yaml
│ ├── should_emit_tool_execution_events_with_correct_fields.yaml
│ └── should_include_valid_fields_on_all_events.yaml
├── hooks/
│ ├── deny_tool_execution_when_pre_tool_use_returns_deny.yaml
│ ├── invoke_both_hooks_for_single_tool_call.yaml
│ ├── invoke_post_tool_use_hook_after_model_runs_a_tool.yaml
│ ├── invoke_pre_tool_use_hook_when_model_runs_a_tool.yaml
│ ├── should_deny_tool_execution_when_pretooluse_returns_deny.yaml
│ ├── should_invoke_both_pretooluse_and_posttooluse_hooks_for_a_single_tool_call.yaml
│ ├── should_invoke_both_pretooluse_and_posttooluse_hooks_for_single_tool_call.yaml
│ ├── should_invoke_posttooluse_hook_after_model_runs_a_tool.yaml
│ └── should_invoke_pretooluse_hook_when_model_runs_a_tool.yaml
├── hooks_extended/
│ ├── should_allow_posttooluse_to_return_modifiedresult.yaml
│ ├── should_allow_pretooluse_to_return_modifiedargs_and_suppressoutput.yaml
│ ├── should_invoke_onerroroccurred_hook_when_error_occurs.yaml
│ ├── should_invoke_onsessionend_hook_when_session_is_disconnected.yaml
│ ├── should_invoke_onsessionstart_hook_on_new_session.yaml
│ ├── should_invoke_onuserpromptsubmitted_hook_when_sending_a_message.yaml
│ ├── should_invoke_sessionend_hook.yaml
│ ├── should_invoke_sessionstart_hook.yaml
│ ├── should_invoke_userpromptsubmitted_hook_and_modify_prompt.yaml
│ └── should_register_erroroccurred_hook.yaml
├── mcp-and-agents/
│ ├── should_accept_both_mcp_servers_and_custom_agents.yaml
│ ├── should_accept_custom_agent_configuration_on_session_create.yaml
│ ├── should_accept_custom_agent_configuration_on_session_resume.yaml
│ ├── should_accept_mcp_server_configuration_on_session_create.yaml
│ └── should_accept_mcp_server_configuration_on_session_resume.yaml
├── mcp_and_agents/
│ ├── accept_custom_agent_config_on_create.yaml
│ ├── accept_custom_agent_config_on_resume.yaml
│ ├── accept_mcp_server_config_on_create.yaml
│ ├── accept_mcp_server_config_on_resume.yaml
│ ├── accept_mcp_servers_and_custom_agents.yaml
│ ├── should_accept_both_mcp_servers_and_custom_agents.yaml
│ ├── should_accept_custom_agent_configuration_on_session_create.yaml
│ ├── should_accept_custom_agent_configuration_on_session_resume.yaml
│ ├── should_accept_defaultagent_configuration_on_session_resume.yaml
│ ├── should_accept_mcp_server_configuration_on_session_create.yaml
│ ├── should_accept_mcp_server_configuration_on_session_resume.yaml
│ ├── should_hide_excluded_tools_from_default_agent.yaml
│ └── should_pass_literal_env_values_to_mcp_server_subprocess.yaml
├── mcpservers/
│ ├── accept_mcp_server_config_on_create.yaml
│ └── accept_mcp_server_config_on_resume.yaml
├── multi_client/
│ ├── both_clients_see_tool_request_and_completion_events.yaml
│ ├── disconnecting_client_removes_its_tools.yaml
│ ├── one_client_approves_permission_and_both_see_the_result.yaml
│ ├── one_client_rejects_permission_and_both_see_the_result.yaml
│ └── two_clients_register_different_tools_and_agent_uses_both.yaml
├── multi_turn/
│ ├── should_handle_file_creation_then_reading_across_turns.yaml
│ └── should_use_tool_results_from_previous_turns.yaml
├── pending_work_resume/
│ ├── should_continue_parallel_pending_external_tool_requests_after_resume.yaml
│ ├── should_continue_pending_external_tool_request_after_resume.yaml
│ ├── should_continue_pending_permission_request_after_resume.yaml
│ └── should_resume_successfully_when_no_pending_work_exists.yaml
├── permissions/
│ ├── async_permission_handler.yaml
│ ├── deny_permission.yaml
│ ├── permission_handler_errors.yaml
│ ├── permission_handler_for_shell_commands.yaml
│ ├── permission_handler_for_write_operations.yaml
│ ├── resume_session_with_permission_handler.yaml
│ ├── should_deny_permission_when_handler_returns_denied.yaml
│ ├── should_deny_tool_operations_when_handler_explicitly_denies.yaml
│ ├── should_deny_tool_operations_when_handler_explicitly_denies_after_resume.yaml
│ ├── should_handle_async_permission_handler.yaml
│ ├── should_handle_permission_handler_errors_gracefully.yaml
│ ├── should_invoke_permission_handler_for_write_operations.yaml
│ ├── should_receive_toolcallid_in_permission_requests.yaml
│ ├── should_resume_session_with_permission_handler.yaml
│ ├── should_work_with_approve_all_permission_handler.yaml
│ └── tool_call_id_in_permission_requests.yaml
├── rpc_session_state/
│ ├── should_compact_session_history_after_messages.yaml
│ └── should_fork_session_with_persisted_messages.yaml
├── rpc_shell_and_fleet/
│ └── should_start_fleet_and_complete_custom_tool_task.yaml
├── session/
│ ├── disposeasync_from_handler_does_not_deadlock.yaml
│ ├── handler_exception_does_not_halt_event_delivery.yaml
│ ├── send_returns_immediately_while_events_stream_in_background.yaml
│ ├── sendandwait_blocks_until_session_idle_and_returns_final_assistant_message.yaml
│ ├── sendandwait_throws_on_timeout.yaml
│ ├── sendandwait_throws_operationcanceledexception_when_token_cancelled.yaml
│ ├── should_abort_a_session.yaml
│ ├── should_accept_blob_attachments.yaml
│ ├── should_create_a_session_with_appended_systemmessage_config.yaml
│ ├── should_create_a_session_with_availabletools.yaml
│ ├── should_create_a_session_with_customized_systemmessage_config.yaml
│ ├── should_create_a_session_with_defaultagent_excludedtools.yaml
│ ├── should_create_a_session_with_excludedtools.yaml
│ ├── should_create_a_session_with_replaced_systemmessage_config.yaml
│ ├── should_create_session_with_custom_config_dir.yaml
│ ├── should_create_session_with_custom_tool.yaml
│ ├── should_delete_session.yaml
│ ├── should_get_last_session_id.yaml
│ ├── should_get_session_metadata.yaml
│ ├── should_get_session_metadata_by_id.yaml
│ ├── should_have_stateful_conversation.yaml
│ ├── should_list_sessions.yaml
│ ├── should_list_sessions_with_context.yaml
│ ├── should_receive_session_events.yaml
│ ├── should_resume_a_session_using_a_new_client.yaml
│ ├── should_resume_a_session_using_the_same_client.yaml
│ ├── should_send_with_custom_requestheaders.yaml
│ ├── should_send_with_directory_attachment.yaml
│ ├── should_send_with_file_attachment.yaml
│ ├── should_send_with_github_reference_attachment.yaml
│ ├── should_send_with_mode_property.yaml
│ ├── should_send_with_selection_attachment.yaml
│ ├── should_set_model_on_existing_session.yaml
│ └── should_set_model_with_reasoningeffort.yaml
├── session_config/
│ ├── should_accept_blob_attachments.yaml
│ ├── should_accept_message_attachments.yaml
│ ├── should_apply_availabletools_on_session_resume.yaml
│ ├── should_apply_systemmessage_on_session_resume.yaml
│ ├── should_apply_workingdirectory_on_session_resume.yaml
│ ├── should_forward_clientname_in_user_agent.yaml
│ ├── should_forward_clientname_in_useragent.yaml
│ ├── should_forward_custom_provider_headers_on_create.yaml
│ ├── should_forward_custom_provider_headers_on_resume.yaml
│ ├── should_use_workingdirectory_for_tool_execution.yaml
│ ├── vision_disabled_then_enabled_via_setmodel.yaml
│ └── vision_enabled_then_disabled_via_setmodel.yaml
├── session_fs/
│ ├── should_load_session_data_from_fs_provider_on_resume.yaml
│ ├── should_map_large_output_handling_into_sessionfs.yaml
│ ├── should_persist_plan_md_via_sessionfs.yaml
│ ├── should_reject_setprovider_when_sessions_already_exist.yaml
│ ├── should_route_file_operations_through_the_session_fs_provider.yaml
│ ├── should_succeed_with_compaction_while_using_sessionfs.yaml
│ └── should_write_workspace_metadata_via_sessionfs.yaml
├── session_lifecycle/
│ ├── should_delete_session_permanently.yaml
│ ├── should_list_created_sessions_after_sending_a_message.yaml
│ ├── should_return_events_via_getmessages_after_conversation.yaml
│ └── should_support_multiple_concurrent_sessions.yaml
├── skills/
│ ├── should_allow_agent_with_skills_to_invoke_skill.yaml
│ ├── should_load_and_apply_skill_from_skilldirectories.yaml
│ ├── should_not_apply_skill_when_disabled_via_disabledskills.yaml
│ └── should_not_provide_skills_to_agent_without_skills_field.yaml
├── streaming_fidelity/
│ ├── should_emit_assistantmessagestart_before_deltas_with_matching_messageid.yaml
│ ├── should_not_produce_deltas_when_streaming_is_disabled.yaml
│ ├── should_produce_delta_events_when_streaming_is_enabled.yaml
│ └── should_produce_deltas_after_session_resume.yaml
├── suspend/
│ ├── should_allow_resume_and_continue_conversation_after_suspend.yaml
│ ├── should_cancel_pending_permission_request_when_suspending.yaml
│ ├── should_reject_pending_external_tool_when_suspending.yaml
│ └── should_suspend_idle_session_without_throwing.yaml
├── system_message_transform/
│ ├── should_apply_transform_modifications_to_section_content.yaml
│ ├── should_invoke_transform_callbacks_with_section_content.yaml
│ └── should_work_with_static_overrides_and_transforms_together.yaml
├── telemetry/
│ └── should_export_file_telemetry_for_sdk_interactions.yaml
├── tool_results/
│ ├── should_handle_structured_toolresultobject_from_custom_tool.yaml
│ ├── should_handle_tool_result_with_failure_resulttype.yaml
│ ├── should_pass_validated_zod_parameters_to_tool_handler.yaml
│ └── should_preserve_tooltelemetry_and_not_stringify_structured_results_for_llm.yaml
└── tools/
├── can_receive_and_return_complex_types.yaml
├── denies_custom_tool_when_permission_denied.yaml
├── handles_tool_calling_errors.yaml
├── invokes_built_in_tools.yaml
├── invokes_custom_tool.yaml
├── invokes_custom_tool_with_permission_handler.yaml
├── overrides_built_in_tool_with_custom_tool.yaml
└── skippermission_sent_in_tool_definition.yaml
Showing preview only (607K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (6413 symbols across 340 files)
FILE: dotnet/src/ActionDisposable.cs
class ActionDisposable (line 10) | internal sealed class ActionDisposable(Action action) : IDisposable
method Dispose (line 14) | public void Dispose()
FILE: dotnet/src/Client.cs
class CopilotClient (line 55) | public sealed partial class CopilotClient : IDisposable, IAsyncDisposable
method CopilotClient (line 121) | public CopilotClient(CopilotClientOptions? options = null)
method ParseCliUrl (line 160) | private static Uri ParseCliUrl(string url)
method StartAsync (line 199) | public Task StartAsync(CancellationToken cancellationToken = default)
method StopAsync (line 260) | public async Task StopAsync()
method ForceStopAsync (line 305) | public async Task ForceStopAsync()
method ThrowErrors (line 316) | private static void ThrowErrors(List<Exception> errors)
method CleanupConnectionAsync (line 328) | private async Task CleanupConnectionAsync(List<Exception>? errors)
method ExtractTransformCallbacks (line 362) | private static (SystemMessageConfig? wireConfig, Dictionary<string, Fu...
method CreateSessionAsync (line 425) | public async Task<CopilotSession> CreateSessionAsync(SessionConfig con...
method ResumeSessionAsync (line 552) | public async Task<CopilotSession> ResumeSessionAsync(string sessionId,...
method PingAsync (line 692) | public async Task<PingResponse> PingAsync(string? message = null, Canc...
method GetStatusAsync (line 706) | public async Task<GetStatusResponse> GetStatusAsync(CancellationToken ...
method GetAuthStatusAsync (line 720) | public async Task<GetAuthStatusResponse> GetAuthStatusAsync(Cancellati...
method ListModelsAsync (line 738) | public async Task<IList<ModelInfo>> ListModelsAsync(CancellationToken ...
method GetLastSessionIdAsync (line 791) | public async Task<string?> GetLastSessionIdAsync(CancellationToken can...
method DeleteSessionAsync (line 819) | public async Task DeleteSessionAsync(string sessionId, CancellationTok...
method ListSessionsAsync (line 850) | public async Task<IList<SessionMetadata>> ListSessionsAsync(SessionLis...
method GetSessionMetadataAsync (line 880) | public async Task<SessionMetadata?> GetSessionMetadataAsync(string ses...
method GetForegroundSessionIdAsync (line 908) | public async Task<string?> GetForegroundSessionIdAsync(CancellationTok...
method SetForegroundSessionIdAsync (line 933) | public async Task SetForegroundSessionIdAsync(string sessionId, Cancel...
method On (line 963) | public IDisposable On(Action<SessionLifecycleEvent> handler)
method On (line 993) | public IDisposable On(string eventType, Action<SessionLifecycleEvent> ...
method DispatchLifecycleEvent (line 1017) | private void DispatchLifecycleEvent(SessionLifecycleEvent evt)
method InvokeRpcAsync (line 1041) | internal static async Task<T> InvokeRpcAsync<T>(JsonRpc rpc, string me...
method InvokeRpcAsync (line 1046) | internal static async Task InvokeRpcAsync(JsonRpc rpc, string method, ...
method InvokeRpcAsync (line 1051) | internal static async Task<T> InvokeRpcAsync<T>(JsonRpc rpc, string me...
method EnsureConnectedAsync (line 1080) | private Task<Connection> EnsureConnectedAsync(CancellationToken cancel...
method ConfigureSessionFsAsync (line 1091) | private async Task ConfigureSessionFsAsync(CancellationToken cancellat...
method ConfigureSessionFsHandlers (line 1105) | private void ConfigureSessionFsHandlers(CopilotSession session, Func<C...
method VerifyProtocolVersionAsync (line 1122) | private async Task VerifyProtocolVersionAsync(Connection connection, C...
method StartCliServerAsync (line 1148) | private static async Task<(Process Process, int? DetectedLocalhostTcpP...
method GetBundledCliPath (line 1281) | private static string? GetBundledCliPath(out string searchedPath)
method GetPortableRid (line 1292) | private static string? GetPortableRid()
method ResolveCliCommand (line 1310) | private static (string FileName, IEnumerable<string> Args) ResolveCliC...
method ConnectToServerAsync (line 1322) | private async Task<Connection> ConnectToServerAsync(Process? cliProces...
method CreateSerializerOptions (line 1393) | private static JsonSerializerOptions CreateSerializerOptions()
method GetSession (line 1412) | internal CopilotSession? GetSession(string sessionId)
method Dispose (line 1423) | public void Dispose()
method DisposeAsync (line 1435) | public async ValueTask DisposeAsync()
class RpcHandler (line 1442) | private class RpcHandler(CopilotClient client)
method OnSessionEvent (line 1444) | public void OnSessionEvent(string sessionId, JsonElement? @event)
method OnSessionLifecycle (line 1457) | public void OnSessionLifecycle(string type, string sessionId, JsonEl...
method OnUserInputRequest (line 1475) | public async ValueTask<UserInputRequestResponse> OnUserInputRequest(...
method OnHooksInvoke (line 1489) | public async ValueTask<HooksInvokeResponse> OnHooksInvoke(string ses...
method OnSystemMessageTransform (line 1496) | public async ValueTask<SystemMessageTransformRpcResponse> OnSystemMe...
method OnToolCallV2 (line 1504) | public async ValueTask<ToolCallResponseV2> OnToolCallV2(string sessi...
method OnPermissionRequestV2 (line 1571) | public async ValueTask<PermissionRequestResponseV2> OnPermissionRequ...
class Connection (line 1599) | private class Connection(
class ProcessArgumentEscaper (line 1611) | private static class ProcessArgumentEscaper
method Escape (line 1613) | public static string Escape(string arg)
type CreateSessionRequest (line 1622) | internal record CreateSessionRequest(
type ToolDefinition (line 1655) | internal record ToolDefinition(
type CreateSessionResponse (line 1672) | internal record CreateSessionResponse(
type ResumeSessionRequest (line 1677) | internal record ResumeSessionRequest(
type ResumeSessionResponse (line 1712) | internal record ResumeSessionResponse(
type CommandWireDefinition (line 1717) | internal record CommandWireDefinition(
type GetLastSessionIdResponse (line 1721) | internal record GetLastSessionIdResponse(
type DeleteSessionRequest (line 1724) | internal record DeleteSessionRequest(
type DeleteSessionResponse (line 1727) | internal record DeleteSessionResponse(
type ListSessionsRequest (line 1731) | internal record ListSessionsRequest(
type ListSessionsResponse (line 1734) | internal record ListSessionsResponse(
type GetSessionMetadataRequest (line 1737) | internal record GetSessionMetadataRequest(
type GetSessionMetadataResponse (line 1740) | internal record GetSessionMetadataResponse(
type SetForegroundSessionRequest (line 1743) | internal record SetForegroundSessionRequest(
type UserInputRequestResponse (line 1746) | internal record UserInputRequestResponse(
type HooksInvokeResponse (line 1750) | internal record HooksInvokeResponse(
type ToolCallResponseV2 (line 1754) | internal record ToolCallResponseV2(
type PermissionRequestResponseV2 (line 1757) | internal record PermissionRequestResponseV2(
class ClientJsonContext (line 1760) | [JsonSourceGenerationOptions(
method ListeningOnPortRegex (line 1799) | [GeneratedRegex(@"listening on port ([0-9]+)", RegexOptions.IgnoreCase)]
class ToolResultAIContent (line 1808) | public class ToolResultAIContent(ToolResultObject toolResult) : AIContent
FILE: dotnet/src/Generated/Rpc.cs
class Diagnostics (line 19) | internal static class Diagnostics
class PingResult (line 26) | public sealed class PingResult
class PingRequest (line 42) | internal sealed class PingRequest
class ModelBilling (line 50) | public sealed class ModelBilling
class ModelCapabilitiesLimitsVision (line 58) | public sealed class ModelCapabilitiesLimitsVision
class ModelCapabilitiesLimits (line 76) | public sealed class ModelCapabilitiesLimits
class ModelCapabilitiesSupports (line 99) | public sealed class ModelCapabilitiesSupports
class ModelCapabilities (line 111) | public sealed class ModelCapabilities
class ModelPolicy (line 123) | public sealed class ModelPolicy
class Model (line 135) | public sealed class Model
class ModelList (line 167) | public sealed class ModelList
class ModelsListRequest (line 175) | internal sealed class ModelsListRequest
class Tool (line 183) | public sealed class Tool
class ToolList (line 207) | public sealed class ToolList
class ToolsListRequest (line 215) | internal sealed class ToolsListRequest
class AccountQuotaSnapshot (line 223) | public sealed class AccountQuotaSnapshot
class AccountGetQuotaResult (line 261) | public sealed class AccountGetQuotaResult
class AccountGetQuotaRequest (line 269) | internal sealed class AccountGetQuotaRequest
class DiscoveredMcpServer (line 277) | public sealed class DiscoveredMcpServer
class McpDiscoverResult (line 300) | public sealed class McpDiscoverResult
class McpDiscoverRequest (line 308) | internal sealed class McpDiscoverRequest
class McpConfigList (line 316) | public sealed class McpConfigList
class McpConfigAddRequest (line 324) | internal sealed class McpConfigAddRequest
class McpConfigUpdateRequest (line 339) | internal sealed class McpConfigUpdateRequest
class McpConfigRemoveRequest (line 354) | internal sealed class McpConfigRemoveRequest
class McpConfigEnableRequest (line 365) | internal sealed class McpConfigEnableRequest
class McpConfigDisableRequest (line 373) | internal sealed class McpConfigDisableRequest
class ServerSkill (line 381) | public sealed class ServerSkill
class ServerSkillList (line 413) | public sealed class ServerSkillList
class SkillsDiscoverRequest (line 421) | internal sealed class SkillsDiscoverRequest
class SkillsConfigSetDisabledSkillsRequest (line 433) | internal sealed class SkillsConfigSetDisabledSkillsRequest
class SessionFsSetProviderResult (line 441) | public sealed class SessionFsSetProviderResult
class SessionFsSetProviderRequest (line 449) | internal sealed class SessionFsSetProviderRequest
class SessionsForkResult (line 465) | [Experimental(Diagnostics.Experimental)]
class SessionsForkRequest (line 474) | [Experimental(Diagnostics.Experimental)]
class SessionSuspendRequest (line 487) | internal sealed class SessionSuspendRequest
class LogResult (line 495) | public sealed class LogResult
class LogRequest (line 503) | internal sealed class LogRequest
class SessionAuthStatus (line 529) | public sealed class SessionAuthStatus
class SessionAuthGetStatusRequest (line 557) | internal sealed class SessionAuthGetStatusRequest
class CurrentModel (line 565) | public sealed class CurrentModel
class SessionModelGetCurrentRequest (line 573) | internal sealed class SessionModelGetCurrentRequest
class ModelSwitchToResult (line 581) | public sealed class ModelSwitchToResult
class ModelCapabilitiesOverrideLimitsVision (line 589) | public sealed class ModelCapabilitiesOverrideLimitsVision
class ModelCapabilitiesOverrideLimits (line 607) | public sealed class ModelCapabilitiesOverrideLimits
class ModelCapabilitiesOverrideSupports (line 630) | public sealed class ModelCapabilitiesOverrideSupports
class ModelCapabilitiesOverride (line 642) | public sealed class ModelCapabilitiesOverride
class ModelSwitchToRequest (line 654) | internal sealed class ModelSwitchToRequest
class SessionModeGetRequest (line 674) | internal sealed class SessionModeGetRequest
class ModeSetRequest (line 682) | internal sealed class ModeSetRequest
class NameGetResult (line 694) | public sealed class NameGetResult
class SessionNameGetRequest (line 702) | internal sealed class SessionNameGetRequest
class NameSetRequest (line 710) | internal sealed class NameSetRequest
class PlanReadResult (line 725) | public sealed class PlanReadResult
class SessionPlanReadRequest (line 741) | internal sealed class SessionPlanReadRequest
class PlanUpdateRequest (line 749) | internal sealed class PlanUpdateRequest
class SessionPlanDeleteRequest (line 761) | internal sealed class SessionPlanDeleteRequest
class WorkspacesGetWorkspaceResultWorkspace (line 769) | public sealed class WorkspacesGetWorkspaceResultWorkspace
class WorkspacesGetWorkspaceResult (line 846) | public sealed class WorkspacesGetWorkspaceResult
class SessionWorkspacesGetWorkspaceRequest (line 854) | internal sealed class SessionWorkspacesGetWorkspaceRequest
class WorkspacesListFilesResult (line 862) | public sealed class WorkspacesListFilesResult
class SessionWorkspacesListFilesRequest (line 870) | internal sealed class SessionWorkspacesListFilesRequest
class WorkspacesReadFileResult (line 878) | public sealed class WorkspacesReadFileResult
class WorkspacesReadFileRequest (line 886) | internal sealed class WorkspacesReadFileRequest
class WorkspacesCreateFileRequest (line 898) | internal sealed class WorkspacesCreateFileRequest
class InstructionsSources (line 914) | public sealed class InstructionsSources
class InstructionsGetSourcesResult (line 950) | public sealed class InstructionsGetSourcesResult
class SessionInstructionsGetSourcesRequest (line 958) | internal sealed class SessionInstructionsGetSourcesRequest
class FleetStartResult (line 966) | [Experimental(Diagnostics.Experimental)]
class FleetStartRequest (line 975) | [Experimental(Diagnostics.Experimental)]
class AgentInfo (line 988) | public sealed class AgentInfo
class AgentList (line 1008) | [Experimental(Diagnostics.Experimental)]
class SessionAgentListRequest (line 1017) | [Experimental(Diagnostics.Experimental)]
class AgentGetCurrentResult (line 1026) | [Experimental(Diagnostics.Experimental)]
class SessionAgentGetCurrentRequest (line 1035) | [Experimental(Diagnostics.Experimental)]
class AgentSelectResult (line 1044) | [Experimental(Diagnostics.Experimental)]
class AgentSelectRequest (line 1053) | [Experimental(Diagnostics.Experimental)]
class SessionAgentDeselectRequest (line 1066) | [Experimental(Diagnostics.Experimental)]
class AgentReloadResult (line 1075) | [Experimental(Diagnostics.Experimental)]
class SessionAgentReloadRequest (line 1084) | [Experimental(Diagnostics.Experimental)]
class TasksStartAgentResult (line 1093) | [Experimental(Diagnostics.Experimental)]
class TasksStartAgentRequest (line 1102) | [Experimental(Diagnostics.Experimental)]
class TaskInfo (line 1131) | [JsonPolymorphic(
class TaskInfoAgent (line 1145) | public partial class TaskInfoAgent : TaskInfo
class TaskInfoShell (line 1232) | public partial class TaskInfoShell : TaskInfo
class TaskList (line 1289) | [Experimental(Diagnostics.Experimental)]
class SessionTasksListRequest (line 1298) | [Experimental(Diagnostics.Experimental)]
class TasksPromoteToBackgroundResult (line 1307) | [Experimental(Diagnostics.Experimental)]
class TasksPromoteToBackgroundRequest (line 1316) | [Experimental(Diagnostics.Experimental)]
class TasksCancelResult (line 1329) | [Experimental(Diagnostics.Experimental)]
class TasksCancelRequest (line 1338) | [Experimental(Diagnostics.Experimental)]
class TasksRemoveResult (line 1351) | [Experimental(Diagnostics.Experimental)]
class TasksRemoveRequest (line 1360) | [Experimental(Diagnostics.Experimental)]
class Skill (line 1373) | public sealed class Skill
class SkillList (line 1401) | [Experimental(Diagnostics.Experimental)]
class SessionSkillsListRequest (line 1410) | [Experimental(Diagnostics.Experimental)]
class SkillsEnableRequest (line 1419) | [Experimental(Diagnostics.Experimental)]
class SkillsDisableRequest (line 1432) | [Experimental(Diagnostics.Experimental)]
class SessionSkillsReloadRequest (line 1445) | [Experimental(Diagnostics.Experimental)]
class McpServer (line 1454) | public sealed class McpServer
class McpServerList (line 1477) | [Experimental(Diagnostics.Experimental)]
class SessionMcpListRequest (line 1486) | [Experimental(Diagnostics.Experimental)]
class McpEnableRequest (line 1495) | [Experimental(Diagnostics.Experimental)]
class McpDisableRequest (line 1511) | [Experimental(Diagnostics.Experimental)]
class SessionMcpReloadRequest (line 1527) | [Experimental(Diagnostics.Experimental)]
class McpOauthLoginResult (line 1536) | [Experimental(Diagnostics.Experimental)]
class McpOauthLoginRequest (line 1545) | [Experimental(Diagnostics.Experimental)]
class Plugin (line 1573) | public sealed class Plugin
class PluginList (line 1593) | [Experimental(Diagnostics.Experimental)]
class SessionPluginsListRequest (line 1602) | [Experimental(Diagnostics.Experimental)]
class Extension (line 1611) | public sealed class Extension
class ExtensionList (line 1635) | [Experimental(Diagnostics.Experimental)]
class SessionExtensionsListRequest (line 1644) | [Experimental(Diagnostics.Experimental)]
class ExtensionsEnableRequest (line 1653) | [Experimental(Diagnostics.Experimental)]
class ExtensionsDisableRequest (line 1666) | [Experimental(Diagnostics.Experimental)]
class SessionExtensionsReloadRequest (line 1679) | [Experimental(Diagnostics.Experimental)]
class HandlePendingToolCallResult (line 1688) | public sealed class HandlePendingToolCallResult
class HandlePendingToolCallRequest (line 1696) | internal sealed class HandlePendingToolCallRequest
class CommandsHandlePendingCommandResult (line 1716) | public sealed class CommandsHandlePendingCommandResult
class CommandsHandlePendingCommandRequest (line 1724) | internal sealed class CommandsHandlePendingCommandRequest
class UIElicitationResponse (line 1740) | public sealed class UIElicitationResponse
class UIElicitationSchema (line 1752) | public sealed class UIElicitationSchema
class UIElicitationRequest (line 1768) | internal sealed class UIElicitationRequest
class UIElicitationResult (line 1784) | public sealed class UIElicitationResult
class UIHandlePendingElicitationRequest (line 1792) | internal sealed class UIHandlePendingElicitationRequest
class PermissionRequestResult (line 1808) | public sealed class PermissionRequestResult
class PermissionDecision (line 1816) | [JsonPolymorphic(
class PermissionDecisionApproveOnce (line 1834) | public partial class PermissionDecisionApproveOnce : PermissionDecision
class PermissionDecisionApproveForSessionApproval (line 1843) | [JsonPolymorphic(
class PermissionDecisionApproveForSessionApprovalCommands (line 1862) | public partial class PermissionDecisionApproveForSessionApprovalCommands...
class PermissionDecisionApproveForSessionApprovalRead (line 1874) | public partial class PermissionDecisionApproveForSessionApprovalRead : P...
class PermissionDecisionApproveForSessionApprovalWrite (line 1882) | public partial class PermissionDecisionApproveForSessionApprovalWrite : ...
class PermissionDecisionApproveForSessionApprovalMcp (line 1890) | public partial class PermissionDecisionApproveForSessionApprovalMcp : Pe...
class PermissionDecisionApproveForSessionApprovalMcpSampling (line 1906) | public partial class PermissionDecisionApproveForSessionApprovalMcpSampl...
class PermissionDecisionApproveForSessionApprovalMemory (line 1918) | public partial class PermissionDecisionApproveForSessionApprovalMemory :...
class PermissionDecisionApproveForSessionApprovalCustomTool (line 1926) | public partial class PermissionDecisionApproveForSessionApprovalCustomTo...
class PermissionDecisionApproveForSession (line 1938) | public partial class PermissionDecisionApproveForSession : PermissionDec...
class PermissionDecisionApproveForLocationApproval (line 1957) | [JsonPolymorphic(
class PermissionDecisionApproveForLocationApprovalCommands (line 1976) | public partial class PermissionDecisionApproveForLocationApprovalCommand...
class PermissionDecisionApproveForLocationApprovalRead (line 1988) | public partial class PermissionDecisionApproveForLocationApprovalRead : ...
class PermissionDecisionApproveForLocationApprovalWrite (line 1996) | public partial class PermissionDecisionApproveForLocationApprovalWrite :...
class PermissionDecisionApproveForLocationApprovalMcp (line 2004) | public partial class PermissionDecisionApproveForLocationApprovalMcp : P...
class PermissionDecisionApproveForLocationApprovalMcpSampling (line 2020) | public partial class PermissionDecisionApproveForLocationApprovalMcpSamp...
class PermissionDecisionApproveForLocationApprovalMemory (line 2032) | public partial class PermissionDecisionApproveForLocationApprovalMemory ...
class PermissionDecisionApproveForLocationApprovalCustomTool (line 2040) | public partial class PermissionDecisionApproveForLocationApprovalCustomT...
class PermissionDecisionApproveForLocation (line 2052) | public partial class PermissionDecisionApproveForLocation : PermissionDe...
class PermissionDecisionApprovePermanently (line 2068) | public partial class PermissionDecisionApprovePermanently : PermissionDe...
class PermissionDecisionReject (line 2080) | public partial class PermissionDecisionReject : PermissionDecision
class PermissionDecisionUserNotAvailable (line 2093) | public partial class PermissionDecisionUserNotAvailable : PermissionDeci...
class PermissionDecisionRequest (line 2101) | internal sealed class PermissionDecisionRequest
class PermissionsSetApproveAllResult (line 2117) | public sealed class PermissionsSetApproveAllResult
class PermissionsSetApproveAllRequest (line 2125) | internal sealed class PermissionsSetApproveAllRequest
class PermissionsResetSessionApprovalsResult (line 2137) | public sealed class PermissionsResetSessionApprovalsResult
class PermissionsResetSessionApprovalsRequest (line 2145) | internal sealed class PermissionsResetSessionApprovalsRequest
class ShellExecResult (line 2153) | public sealed class ShellExecResult
class ShellExecRequest (line 2161) | internal sealed class ShellExecRequest
class ShellKillResult (line 2183) | public sealed class ShellKillResult
class ShellKillRequest (line 2191) | internal sealed class ShellKillRequest
class HistoryCompactContextWindow (line 2207) | public sealed class HistoryCompactContextWindow
class HistoryCompactResult (line 2241) | [Experimental(Diagnostics.Experimental)]
class SessionHistoryCompactRequest (line 2264) | [Experimental(Diagnostics.Experimental)]
class HistoryTruncateResult (line 2273) | [Experimental(Diagnostics.Experimental)]
class HistoryTruncateRequest (line 2283) | [Experimental(Diagnostics.Experimental)]
class UsageMetricsCodeChanges (line 2296) | public sealed class UsageMetricsCodeChanges
class UsageMetricsModelMetricRequests (line 2312) | public sealed class UsageMetricsModelMetricRequests
class UsageMetricsModelMetricTokenDetail (line 2324) | public sealed class UsageMetricsModelMetricTokenDetail
class UsageMetricsModelMetricUsage (line 2333) | public sealed class UsageMetricsModelMetricUsage
class UsageMetricsModelMetric (line 2362) | public sealed class UsageMetricsModelMetric
class UsageMetricsTokenDetail (line 2383) | public sealed class UsageMetricsTokenDetail
class UsageGetMetricsResult (line 2392) | [Experimental(Diagnostics.Experimental)]
class SessionUsageGetMetricsRequest (line 2447) | [Experimental(Diagnostics.Experimental)]
class SessionFsError (line 2456) | public sealed class SessionFsError
class SessionFsReadFileResult (line 2468) | public sealed class SessionFsReadFileResult
class SessionFsReadFileRequest (line 2480) | public sealed class SessionFsReadFileRequest
class SessionFsWriteFileRequest (line 2492) | public sealed class SessionFsWriteFileRequest
class SessionFsAppendFileRequest (line 2513) | public sealed class SessionFsAppendFileRequest
class SessionFsExistsResult (line 2534) | public sealed class SessionFsExistsResult
class SessionFsExistsRequest (line 2542) | public sealed class SessionFsExistsRequest
class SessionFsStatResult (line 2554) | public sealed class SessionFsStatResult
class SessionFsStatRequest (line 2583) | public sealed class SessionFsStatRequest
class SessionFsMkdirRequest (line 2595) | public sealed class SessionFsMkdirRequest
class SessionFsReaddirResult (line 2616) | public sealed class SessionFsReaddirResult
class SessionFsReaddirRequest (line 2628) | public sealed class SessionFsReaddirRequest
class SessionFsReaddirWithTypesEntry (line 2640) | public sealed class SessionFsReaddirWithTypesEntry
class SessionFsReaddirWithTypesResult (line 2652) | public sealed class SessionFsReaddirWithTypesResult
class SessionFsReaddirWithTypesRequest (line 2664) | public sealed class SessionFsReaddirWithTypesRequest
class SessionFsRmRequest (line 2676) | public sealed class SessionFsRmRequest
class SessionFsRenameRequest (line 2696) | public sealed class SessionFsRenameRequest
type DiscoveredMcpServerSource (line 2712) | [JsonConverter(typeof(JsonStringEnumConverter<DiscoveredMcpServerSource>))]
type DiscoveredMcpServerType (line 2731) | [JsonConverter(typeof(JsonStringEnumConverter<DiscoveredMcpServerType>))]
type SessionFsSetProviderConventions (line 2750) | [JsonConverter(typeof(JsonStringEnumConverter<SessionFsSetProviderConven...
type SessionLogLevel (line 2763) | [JsonConverter(typeof(JsonStringEnumConverter<SessionLogLevel>))]
type AuthInfoType (line 2779) | [JsonConverter(typeof(JsonStringEnumConverter<AuthInfoType>))]
type SessionMode (line 2807) | [JsonConverter(typeof(JsonStringEnumConverter<SessionMode>))]
type WorkspacesGetWorkspaceResultWorkspaceHostType (line 2823) | [JsonConverter(typeof(JsonStringEnumConverter<WorkspacesGetWorkspaceResu...
type WorkspacesGetWorkspaceResultWorkspaceSessionSyncLevel (line 2836) | [JsonConverter(typeof(JsonStringEnumConverter<WorkspacesGetWorkspaceResu...
type InstructionsSourcesLocation (line 2852) | [JsonConverter(typeof(JsonStringEnumConverter<InstructionsSourcesLocatio...
type InstructionsSourcesType (line 2868) | [JsonConverter(typeof(JsonStringEnumConverter<InstructionsSourcesType>))]
type TaskAgentInfoExecutionMode (line 2893) | [JsonConverter(typeof(JsonStringEnumConverter<TaskAgentInfoExecutionMode...
type TaskAgentInfoStatus (line 2906) | [JsonConverter(typeof(JsonStringEnumConverter<TaskAgentInfoStatus>))]
type TaskShellInfoAttachmentMode (line 2928) | [JsonConverter(typeof(JsonStringEnumConverter<TaskShellInfoAttachmentMod...
type TaskShellInfoExecutionMode (line 2941) | [JsonConverter(typeof(JsonStringEnumConverter<TaskShellInfoExecutionMode...
type TaskShellInfoStatus (line 2954) | [JsonConverter(typeof(JsonStringEnumConverter<TaskShellInfoStatus>))]
type McpServerSource (line 2976) | [JsonConverter(typeof(JsonStringEnumConverter<McpServerSource>))]
type McpServerStatus (line 2995) | [JsonConverter(typeof(JsonStringEnumConverter<McpServerStatus>))]
type ExtensionSource (line 3020) | [JsonConverter(typeof(JsonStringEnumConverter<ExtensionSource>))]
type ExtensionStatus (line 3033) | [JsonConverter(typeof(JsonStringEnumConverter<ExtensionStatus>))]
type UIElicitationResponseAction (line 3052) | [JsonConverter(typeof(JsonStringEnumConverter<UIElicitationResponseActio...
type ShellKillSignal (line 3068) | [JsonConverter(typeof(JsonStringEnumConverter<ShellKillSignal>))]
type SessionFsErrorCode (line 3084) | [JsonConverter(typeof(JsonStringEnumConverter<SessionFsErrorCode>))]
type SessionFsReaddirWithTypesEntryType (line 3097) | [JsonConverter(typeof(JsonStringEnumConverter<SessionFsReaddirWithTypesE...
class ServerRpc (line 3110) | public sealed class ServerRpc
method ServerRpc (line 3114) | internal ServerRpc(JsonRpc rpc)
method PingAsync (line 3127) | public async Task<PingResult> PingAsync(string? message = null, Cancel...
class ServerModelsApi (line 3156) | public sealed class ServerModelsApi
method ServerModelsApi (line 3160) | internal ServerModelsApi(JsonRpc rpc)
method ListAsync (line 3166) | public async Task<ModelList> ListAsync(string? gitHubToken = null, Can...
class ServerToolsApi (line 3174) | public sealed class ServerToolsApi
method ServerToolsApi (line 3178) | internal ServerToolsApi(JsonRpc rpc)
method ListAsync (line 3184) | public async Task<ToolList> ListAsync(string? model = null, Cancellati...
class ServerAccountApi (line 3192) | public sealed class ServerAccountApi
method ServerAccountApi (line 3196) | internal ServerAccountApi(JsonRpc rpc)
method GetQuotaAsync (line 3202) | public async Task<AccountGetQuotaResult> GetQuotaAsync(string? gitHubT...
class ServerMcpApi (line 3210) | public sealed class ServerMcpApi
method ServerMcpApi (line 3214) | internal ServerMcpApi(JsonRpc rpc)
method DiscoverAsync (line 3221) | public async Task<McpDiscoverResult> DiscoverAsync(string? workingDire...
class ServerMcpConfigApi (line 3232) | public sealed class ServerMcpConfigApi
method ServerMcpConfigApi (line 3236) | internal ServerMcpConfigApi(JsonRpc rpc)
method ListAsync (line 3242) | public async Task<McpConfigList> ListAsync(CancellationToken cancellat...
method AddAsync (line 3248) | public async Task AddAsync(string name, object config, CancellationTok...
method UpdateAsync (line 3255) | public async Task UpdateAsync(string name, object config, Cancellation...
method RemoveAsync (line 3262) | public async Task RemoveAsync(string name, CancellationToken cancellat...
method EnableAsync (line 3269) | public async Task EnableAsync(IList<string> names, CancellationToken c...
method DisableAsync (line 3276) | public async Task DisableAsync(IList<string> names, CancellationToken ...
class ServerSkillsApi (line 3284) | public sealed class ServerSkillsApi
method ServerSkillsApi (line 3288) | internal ServerSkillsApi(JsonRpc rpc)
method DiscoverAsync (line 3295) | public async Task<ServerSkillList> DiscoverAsync(IList<string>? projec...
class ServerSkillsConfigApi (line 3306) | public sealed class ServerSkillsConfigApi
method ServerSkillsConfigApi (line 3310) | internal ServerSkillsConfigApi(JsonRpc rpc)
method SetDisabledSkillsAsync (line 3316) | public async Task SetDisabledSkillsAsync(IList<string> disabledSkills,...
class ServerSessionFsApi (line 3324) | public sealed class ServerSessionFsApi
method ServerSessionFsApi (line 3328) | internal ServerSessionFsApi(JsonRpc rpc)
method SetProviderAsync (line 3334) | public async Task<SessionFsSetProviderResult> SetProviderAsync(string ...
class ServerSessionsApi (line 3342) | [Experimental(Diagnostics.Experimental)]
method ServerSessionsApi (line 3347) | internal ServerSessionsApi(JsonRpc rpc)
method ForkAsync (line 3353) | public async Task<SessionsForkResult> ForkAsync(string sessionId, stri...
class SessionRpc (line 3361) | public sealed class SessionRpc
method SessionRpc (line 3366) | internal SessionRpc(JsonRpc rpc, string sessionId)
method SuspendAsync (line 3457) | public async Task SuspendAsync(CancellationToken cancellationToken = d...
method LogAsync (line 3464) | public async Task<LogResult> LogAsync(string message, SessionLogLevel?...
class AuthApi (line 3472) | public sealed class AuthApi
method AuthApi (line 3477) | internal AuthApi(JsonRpc rpc, string sessionId)
method GetStatusAsync (line 3484) | public async Task<SessionAuthStatus> GetStatusAsync(CancellationToken ...
class ModelApi (line 3492) | public sealed class ModelApi
method ModelApi (line 3497) | internal ModelApi(JsonRpc rpc, string sessionId)
method GetCurrentAsync (line 3504) | public async Task<CurrentModel> GetCurrentAsync(CancellationToken canc...
method SwitchToAsync (line 3511) | public async Task<ModelSwitchToResult> SwitchToAsync(string modelId, s...
class ModeApi (line 3519) | public sealed class ModeApi
method ModeApi (line 3524) | internal ModeApi(JsonRpc rpc, string sessionId)
method GetAsync (line 3531) | public async Task<SessionMode> GetAsync(CancellationToken cancellation...
method SetAsync (line 3538) | public async Task SetAsync(SessionMode mode, CancellationToken cancell...
class NameApi (line 3546) | public sealed class NameApi
method NameApi (line 3551) | internal NameApi(JsonRpc rpc, string sessionId)
method GetAsync (line 3558) | public async Task<NameGetResult> GetAsync(CancellationToken cancellati...
method SetAsync (line 3565) | public async Task SetAsync(string name, CancellationToken cancellation...
class PlanApi (line 3573) | public sealed class PlanApi
method PlanApi (line 3578) | internal PlanApi(JsonRpc rpc, string sessionId)
method ReadAsync (line 3585) | public async Task<PlanReadResult> ReadAsync(CancellationToken cancella...
method UpdateAsync (line 3592) | public async Task UpdateAsync(string content, CancellationToken cancel...
method DeleteAsync (line 3599) | public async Task DeleteAsync(CancellationToken cancellationToken = de...
class WorkspacesApi (line 3607) | public sealed class WorkspacesApi
method WorkspacesApi (line 3612) | internal WorkspacesApi(JsonRpc rpc, string sessionId)
method GetWorkspaceAsync (line 3619) | public async Task<WorkspacesGetWorkspaceResult> GetWorkspaceAsync(Canc...
method ListFilesAsync (line 3626) | public async Task<WorkspacesListFilesResult> ListFilesAsync(Cancellati...
method ReadFileAsync (line 3633) | public async Task<WorkspacesReadFileResult> ReadFileAsync(string path,...
method CreateFileAsync (line 3640) | public async Task CreateFileAsync(string path, string content, Cancell...
class InstructionsApi (line 3648) | public sealed class InstructionsApi
method InstructionsApi (line 3653) | internal InstructionsApi(JsonRpc rpc, string sessionId)
method GetSourcesAsync (line 3660) | public async Task<InstructionsGetSourcesResult> GetSourcesAsync(Cancel...
class FleetApi (line 3668) | [Experimental(Diagnostics.Experimental)]
method FleetApi (line 3674) | internal FleetApi(JsonRpc rpc, string sessionId)
method StartAsync (line 3681) | public async Task<FleetStartResult> StartAsync(string? prompt = null, ...
class AgentApi (line 3689) | [Experimental(Diagnostics.Experimental)]
method AgentApi (line 3695) | internal AgentApi(JsonRpc rpc, string sessionId)
method ListAsync (line 3702) | public async Task<AgentList> ListAsync(CancellationToken cancellationT...
method GetCurrentAsync (line 3709) | public async Task<AgentGetCurrentResult> GetCurrentAsync(CancellationT...
method SelectAsync (line 3716) | public async Task<AgentSelectResult> SelectAsync(string name, Cancella...
method DeselectAsync (line 3723) | public async Task DeselectAsync(CancellationToken cancellationToken = ...
method ReloadAsync (line 3730) | public async Task<AgentReloadResult> ReloadAsync(CancellationToken can...
class TasksApi (line 3738) | [Experimental(Diagnostics.Experimental)]
method TasksApi (line 3744) | internal TasksApi(JsonRpc rpc, string sessionId)
method StartAgentAsync (line 3751) | public async Task<TasksStartAgentResult> StartAgentAsync(string agentT...
method ListAsync (line 3758) | public async Task<TaskList> ListAsync(CancellationToken cancellationTo...
method PromoteToBackgroundAsync (line 3765) | public async Task<TasksPromoteToBackgroundResult> PromoteToBackgroundA...
method CancelAsync (line 3772) | public async Task<TasksCancelResult> CancelAsync(string id, Cancellati...
method RemoveAsync (line 3779) | public async Task<TasksRemoveResult> RemoveAsync(string id, Cancellati...
class SkillsApi (line 3787) | [Experimental(Diagnostics.Experimental)]
method SkillsApi (line 3793) | internal SkillsApi(JsonRpc rpc, string sessionId)
method ListAsync (line 3800) | public async Task<SkillList> ListAsync(CancellationToken cancellationT...
method EnableAsync (line 3807) | public async Task EnableAsync(string name, CancellationToken cancellat...
method DisableAsync (line 3814) | public async Task DisableAsync(string name, CancellationToken cancella...
method ReloadAsync (line 3821) | public async Task ReloadAsync(CancellationToken cancellationToken = de...
class McpApi (line 3829) | [Experimental(Diagnostics.Experimental)]
method McpApi (line 3835) | internal McpApi(JsonRpc rpc, string sessionId)
method ListAsync (line 3843) | public async Task<McpServerList> ListAsync(CancellationToken cancellat...
method EnableAsync (line 3850) | public async Task EnableAsync(string serverName, CancellationToken can...
method DisableAsync (line 3857) | public async Task DisableAsync(string serverName, CancellationToken ca...
method ReloadAsync (line 3864) | public async Task ReloadAsync(CancellationToken cancellationToken = de...
class McpOauthApi (line 3875) | [Experimental(Diagnostics.Experimental)]
method McpOauthApi (line 3881) | internal McpOauthApi(JsonRpc rpc, string sessionId)
method LoginAsync (line 3888) | public async Task<McpOauthLoginResult> LoginAsync(string serverName, b...
class PluginsApi (line 3896) | [Experimental(Diagnostics.Experimental)]
method PluginsApi (line 3902) | internal PluginsApi(JsonRpc rpc, string sessionId)
method ListAsync (line 3909) | public async Task<PluginList> ListAsync(CancellationToken cancellation...
class ExtensionsApi (line 3917) | [Experimental(Diagnostics.Experimental)]
method ExtensionsApi (line 3923) | internal ExtensionsApi(JsonRpc rpc, string sessionId)
method ListAsync (line 3930) | public async Task<ExtensionList> ListAsync(CancellationToken cancellat...
method EnableAsync (line 3937) | public async Task EnableAsync(string id, CancellationToken cancellatio...
method DisableAsync (line 3944) | public async Task DisableAsync(string id, CancellationToken cancellati...
method ReloadAsync (line 3951) | public async Task ReloadAsync(CancellationToken cancellationToken = de...
class ToolsApi (line 3959) | public sealed class ToolsApi
method ToolsApi (line 3964) | internal ToolsApi(JsonRpc rpc, string sessionId)
method HandlePendingToolCallAsync (line 3971) | public async Task<HandlePendingToolCallResult> HandlePendingToolCallAs...
class CommandsApi (line 3979) | public sealed class CommandsApi
method CommandsApi (line 3984) | internal CommandsApi(JsonRpc rpc, string sessionId)
method HandlePendingCommandAsync (line 3991) | public async Task<CommandsHandlePendingCommandResult> HandlePendingCom...
class UiApi (line 3999) | public sealed class UiApi
method UiApi (line 4004) | internal UiApi(JsonRpc rpc, string sessionId)
method ElicitationAsync (line 4011) | public async Task<UIElicitationResponse> ElicitationAsync(string messa...
method HandlePendingElicitationAsync (line 4018) | public async Task<UIElicitationResult> HandlePendingElicitationAsync(s...
class PermissionsApi (line 4026) | public sealed class PermissionsApi
method PermissionsApi (line 4031) | internal PermissionsApi(JsonRpc rpc, string sessionId)
method HandlePendingPermissionRequestAsync (line 4038) | public async Task<PermissionRequestResult> HandlePendingPermissionRequ...
method SetApproveAllAsync (line 4045) | public async Task<PermissionsSetApproveAllResult> SetApproveAllAsync(b...
method ResetSessionApprovalsAsync (line 4052) | public async Task<PermissionsResetSessionApprovalsResult> ResetSession...
class ShellApi (line 4060) | public sealed class ShellApi
method ShellApi (line 4065) | internal ShellApi(JsonRpc rpc, string sessionId)
method ExecAsync (line 4072) | public async Task<ShellExecResult> ExecAsync(string command, string? c...
method KillAsync (line 4079) | public async Task<ShellKillResult> KillAsync(string processId, ShellKi...
class HistoryApi (line 4087) | [Experimental(Diagnostics.Experimental)]
method HistoryApi (line 4093) | internal HistoryApi(JsonRpc rpc, string sessionId)
method CompactAsync (line 4100) | public async Task<HistoryCompactResult> CompactAsync(CancellationToken...
method TruncateAsync (line 4107) | public async Task<HistoryTruncateResult> TruncateAsync(string eventId,...
class UsageApi (line 4115) | [Experimental(Diagnostics.Experimental)]
method UsageApi (line 4121) | internal UsageApi(JsonRpc rpc, string sessionId)
method GetMetricsAsync (line 4128) | public async Task<UsageGetMetricsResult> GetMetricsAsync(CancellationT...
type ISessionFsHandler (line 4136) | public interface ISessionFsHandler
method ReadFileAsync (line 4139) | Task<SessionFsReadFileResult> ReadFileAsync(SessionFsReadFileRequest r...
method WriteFileAsync (line 4141) | Task<SessionFsError?> WriteFileAsync(SessionFsWriteFileRequest request...
method AppendFileAsync (line 4143) | Task<SessionFsError?> AppendFileAsync(SessionFsAppendFileRequest reque...
method ExistsAsync (line 4145) | Task<SessionFsExistsResult> ExistsAsync(SessionFsExistsRequest request...
method StatAsync (line 4147) | Task<SessionFsStatResult> StatAsync(SessionFsStatRequest request, Canc...
method MkdirAsync (line 4149) | Task<SessionFsError?> MkdirAsync(SessionFsMkdirRequest request, Cancel...
method ReaddirAsync (line 4151) | Task<SessionFsReaddirResult> ReaddirAsync(SessionFsReaddirRequest requ...
method ReaddirWithTypesAsync (line 4153) | Task<SessionFsReaddirWithTypesResult> ReaddirWithTypesAsync(SessionFsR...
method RmAsync (line 4155) | Task<SessionFsError?> RmAsync(SessionFsRmRequest request, Cancellation...
method RenameAsync (line 4157) | Task<SessionFsError?> RenameAsync(SessionFsRenameRequest request, Canc...
class ClientSessionApiHandlers (line 4161) | public sealed class ClientSessionApiHandlers
class ClientSessionApiRegistration (line 4168) | internal static class ClientSessionApiRegistration
method RegisterClientSessionApiHandlers (line 4175) | public static void RegisterClientSessionApiHandlers(JsonRpc rpc, Func<...
class RpcJsonContext (line 4240) | [JsonSourceGenerationOptions(
FILE: dotnet/src/Generated/SessionEvents.cs
class SessionEvent (line 22) | [DebuggerDisplay("{DebuggerDisplay,nq}")]
method FromJson (line 135) | public static SessionEvent FromJson(string json) =>
method ToJson (line 139) | public string ToJson() =>
class SessionStartEvent (line 148) | public partial class SessionStartEvent : SessionEvent
class SessionResumeEvent (line 161) | public partial class SessionResumeEvent : SessionEvent
class SessionRemoteSteerableChangedEvent (line 174) | public partial class SessionRemoteSteerableChangedEvent : SessionEvent
class SessionErrorEvent (line 187) | public partial class SessionErrorEvent : SessionEvent
class SessionIdleEvent (line 200) | public partial class SessionIdleEvent : SessionEvent
class SessionTitleChangedEvent (line 213) | public partial class SessionTitleChangedEvent : SessionEvent
class SessionInfoEvent (line 226) | public partial class SessionInfoEvent : SessionEvent
class SessionWarningEvent (line 239) | public partial class SessionWarningEvent : SessionEvent
class SessionModelChangeEvent (line 252) | public partial class SessionModelChangeEvent : SessionEvent
class SessionModeChangedEvent (line 265) | public partial class SessionModeChangedEvent : SessionEvent
class SessionPlanChangedEvent (line 278) | public partial class SessionPlanChangedEvent : SessionEvent
class SessionWorkspaceFileChangedEvent (line 291) | public partial class SessionWorkspaceFileChangedEvent : SessionEvent
class SessionHandoffEvent (line 304) | public partial class SessionHandoffEvent : SessionEvent
class SessionTruncationEvent (line 317) | public partial class SessionTruncationEvent : SessionEvent
class SessionSnapshotRewindEvent (line 330) | public partial class SessionSnapshotRewindEvent : SessionEvent
class SessionShutdownEvent (line 343) | public partial class SessionShutdownEvent : SessionEvent
class SessionContextChangedEvent (line 356) | public partial class SessionContextChangedEvent : SessionEvent
class SessionUsageInfoEvent (line 369) | public partial class SessionUsageInfoEvent : SessionEvent
class SessionCompactionStartEvent (line 382) | public partial class SessionCompactionStartEvent : SessionEvent
class SessionCompactionCompleteEvent (line 395) | public partial class SessionCompactionCompleteEvent : SessionEvent
class SessionTaskCompleteEvent (line 408) | public partial class SessionTaskCompleteEvent : SessionEvent
class UserMessageEvent (line 420) | public partial class UserMessageEvent : SessionEvent
class PendingMessagesModifiedEvent (line 433) | public partial class PendingMessagesModifiedEvent : SessionEvent
class AssistantTurnStartEvent (line 446) | public partial class AssistantTurnStartEvent : SessionEvent
class AssistantIntentEvent (line 459) | public partial class AssistantIntentEvent : SessionEvent
class AssistantReasoningEvent (line 472) | public partial class AssistantReasoningEvent : SessionEvent
class AssistantReasoningDeltaEvent (line 485) | public partial class AssistantReasoningDeltaEvent : SessionEvent
class AssistantStreamingDeltaEvent (line 498) | public partial class AssistantStreamingDeltaEvent : SessionEvent
class AssistantMessageEvent (line 511) | public partial class AssistantMessageEvent : SessionEvent
class AssistantMessageStartEvent (line 524) | public partial class AssistantMessageStartEvent : SessionEvent
class AssistantMessageDeltaEvent (line 537) | public partial class AssistantMessageDeltaEvent : SessionEvent
class AssistantTurnEndEvent (line 550) | public partial class AssistantTurnEndEvent : SessionEvent
class AssistantUsageEvent (line 563) | public partial class AssistantUsageEvent : SessionEvent
class ModelCallFailureEvent (line 576) | public partial class ModelCallFailureEvent : SessionEvent
class AbortEvent (line 589) | public partial class AbortEvent : SessionEvent
class ToolUserRequestedEvent (line 602) | public partial class ToolUserRequestedEvent : SessionEvent
class ToolExecutionStartEvent (line 615) | public partial class ToolExecutionStartEvent : SessionEvent
class ToolExecutionPartialResultEvent (line 628) | public partial class ToolExecutionPartialResultEvent : SessionEvent
class ToolExecutionProgressEvent (line 641) | public partial class ToolExecutionProgressEvent : SessionEvent
class ToolExecutionCompleteEvent (line 654) | public partial class ToolExecutionCompleteEvent : SessionEvent
class SkillInvokedEvent (line 667) | public partial class SkillInvokedEvent : SessionEvent
class SubagentStartedEvent (line 680) | public partial class SubagentStartedEvent : SessionEvent
class SubagentCompletedEvent (line 693) | public partial class SubagentCompletedEvent : SessionEvent
class SubagentFailedEvent (line 706) | public partial class SubagentFailedEvent : SessionEvent
class SubagentSelectedEvent (line 719) | public partial class SubagentSelectedEvent : SessionEvent
class SubagentDeselectedEvent (line 732) | public partial class SubagentDeselectedEvent : SessionEvent
class HookStartEvent (line 745) | public partial class HookStartEvent : SessionEvent
class HookEndEvent (line 758) | public partial class HookEndEvent : SessionEvent
class SystemMessageEvent (line 771) | public partial class SystemMessageEvent : SessionEvent
class SystemNotificationEvent (line 784) | public partial class SystemNotificationEvent : SessionEvent
class PermissionRequestedEvent (line 797) | public partial class PermissionRequestedEvent : SessionEvent
class PermissionCompletedEvent (line 810) | public partial class PermissionCompletedEvent : SessionEvent
class UserInputRequestedEvent (line 823) | public partial class UserInputRequestedEvent : SessionEvent
class UserInputCompletedEvent (line 836) | public partial class UserInputCompletedEvent : SessionEvent
class ElicitationRequestedEvent (line 849) | public partial class ElicitationRequestedEvent : SessionEvent
class ElicitationCompletedEvent (line 862) | public partial class ElicitationCompletedEvent : SessionEvent
class SamplingRequestedEvent (line 875) | public partial class SamplingRequestedEvent : SessionEvent
class SamplingCompletedEvent (line 888) | public partial class SamplingCompletedEvent : SessionEvent
class McpOauthRequiredEvent (line 901) | public partial class McpOauthRequiredEvent : SessionEvent
class McpOauthCompletedEvent (line 914) | public partial class McpOauthCompletedEvent : SessionEvent
class ExternalToolRequestedEvent (line 927) | public partial class ExternalToolRequestedEvent : SessionEvent
class ExternalToolCompletedEvent (line 940) | public partial class ExternalToolCompletedEvent : SessionEvent
class CommandQueuedEvent (line 953) | public partial class CommandQueuedEvent : SessionEvent
class CommandExecuteEvent (line 966) | public partial class CommandExecuteEvent : SessionEvent
class CommandCompletedEvent (line 979) | public partial class CommandCompletedEvent : SessionEvent
class AutoModeSwitchRequestedEvent (line 992) | public partial class AutoModeSwitchRequestedEvent : SessionEvent
class AutoModeSwitchCompletedEvent (line 1005) | public partial class AutoModeSwitchCompletedEvent : SessionEvent
class CommandsChangedEvent (line 1018) | public partial class CommandsChangedEvent : SessionEvent
class CapabilitiesChangedEvent (line 1031) | public partial class CapabilitiesChangedEvent : SessionEvent
class ExitPlanModeRequestedEvent (line 1044) | public partial class ExitPlanModeRequestedEvent : SessionEvent
class ExitPlanModeCompletedEvent (line 1057) | public partial class ExitPlanModeCompletedEvent : SessionEvent
class SessionToolsUpdatedEvent (line 1069) | public partial class SessionToolsUpdatedEvent : SessionEvent
class SessionBackgroundTasksChangedEvent (line 1081) | public partial class SessionBackgroundTasksChangedEvent : SessionEvent
class SessionSkillsLoadedEvent (line 1093) | public partial class SessionSkillsLoadedEvent : SessionEvent
class SessionCustomAgentsUpdatedEvent (line 1105) | public partial class SessionCustomAgentsUpdatedEvent : SessionEvent
class SessionMcpServersLoadedEvent (line 1117) | public partial class SessionMcpServersLoadedEvent : SessionEvent
class SessionMcpServerStatusChangedEvent (line 1129) | public partial class SessionMcpServerStatusChangedEvent : SessionEvent
class SessionExtensionsLoadedEvent (line 1141) | public partial class SessionExtensionsLoadedEvent : SessionEvent
class SessionStartData (line 1153) | public partial class SessionStartData
class SessionResumeData (line 1202) | public partial class SessionResumeData
class SessionRemoteSteerableChangedData (line 1249) | public partial class SessionRemoteSteerableChangedData
class SessionErrorData (line 1257) | public partial class SessionErrorData
class SessionIdleData (line 1301) | public partial class SessionIdleData
class SessionTitleChangedData (line 1310) | public partial class SessionTitleChangedData
class SessionInfoData (line 1318) | public partial class SessionInfoData
class SessionWarningData (line 1342) | public partial class SessionWarningData
class SessionModelChangeData (line 1361) | public partial class SessionModelChangeData
class SessionModeChangedData (line 1389) | public partial class SessionModeChangedData
class SessionPlanChangedData (line 1401) | public partial class SessionPlanChangedData
class SessionWorkspaceFileChangedData (line 1409) | public partial class SessionWorkspaceFileChangedData
class SessionHandoffData (line 1421) | public partial class SessionHandoffData
class SessionTruncationData (line 1458) | public partial class SessionTruncationData
class SessionSnapshotRewindData (line 1494) | public partial class SessionSnapshotRewindData
class SessionShutdownData (line 1506) | public partial class SessionShutdownData
class SessionContextChangedData (line 1574) | public partial class SessionContextChangedData
class SessionUsageInfoData (line 1617) | public partial class SessionUsageInfoData
class SessionCompactionStartData (line 1653) | public partial class SessionCompactionStartData
class SessionCompactionCompleteData (line 1672) | public partial class SessionCompactionCompleteData
class SessionTaskCompleteData (line 1750) | public partial class SessionTaskCompleteData
class UserMessageData (line 1764) | public partial class UserMessageData
class PendingMessagesModifiedData (line 1812) | public partial class PendingMessagesModifiedData
class AssistantTurnStartData (line 1817) | public partial class AssistantTurnStartData
class AssistantIntentData (line 1830) | public partial class AssistantIntentData
class AssistantReasoningData (line 1838) | public partial class AssistantReasoningData
class AssistantReasoningDeltaData (line 1850) | public partial class AssistantReasoningDeltaData
class AssistantStreamingDeltaData (line 1862) | public partial class AssistantStreamingDeltaData
class AssistantMessageData (line 1870) | public partial class AssistantMessageData
class AssistantMessageStartData (line 1933) | public partial class AssistantMessageStartData
class AssistantMessageDeltaData (line 1946) | public partial class AssistantMessageDeltaData
class AssistantTurnEndData (line 1964) | public partial class AssistantTurnEndData
class AssistantUsageData (line 1972) | public partial class AssistantUsageData
class ModelCallFailureData (line 2061) | public partial class ModelCallFailureData
class AbortData (line 2104) | public partial class AbortData
class ToolUserRequestedData (line 2112) | public partial class ToolUserRequestedData
class ToolExecutionStartData (line 2129) | public partial class ToolExecutionStartData
class ToolExecutionPartialResultData (line 2167) | public partial class ToolExecutionPartialResultData
class ToolExecutionProgressData (line 2179) | public partial class ToolExecutionProgressData
class ToolExecutionCompleteData (line 2191) | public partial class ToolExecutionCompleteData
class SkillInvokedData (line 2244) | public partial class SkillInvokedData
class SubagentStartedData (line 2280) | public partial class SubagentStartedData
class SubagentCompletedData (line 2300) | public partial class SubagentCompletedData
class SubagentFailedData (line 2336) | public partial class SubagentFailedData
class SubagentSelectedData (line 2376) | public partial class SubagentSelectedData
class SubagentDeselectedData (line 2392) | public partial class SubagentDeselectedData
class HookStartData (line 2397) | public partial class HookStartData
class HookEndData (line 2414) | public partial class HookEndData
class SystemMessageData (line 2440) | public partial class SystemMessageData
class SystemNotificationData (line 2462) | public partial class SystemNotificationData
class PermissionRequestedData (line 2474) | public partial class PermissionRequestedData
class PermissionCompletedData (line 2496) | public partial class PermissionCompletedData
class UserInputRequestedData (line 2513) | public partial class UserInputRequestedData
class UserInputCompletedData (line 2540) | public partial class UserInputCompletedData
class ElicitationRequestedData (line 2558) | public partial class ElicitationRequestedData
class ElicitationCompletedData (line 2595) | public partial class ElicitationCompletedData
class SamplingRequestedData (line 2613) | public partial class SamplingRequestedData
class SamplingCompletedData (line 2629) | public partial class SamplingCompletedData
class McpOauthRequiredData (line 2637) | public partial class McpOauthRequiredData
class McpOauthCompletedData (line 2658) | public partial class McpOauthCompletedData
class ExternalToolRequestedData (line 2666) | public partial class ExternalToolRequestedData
class ExternalToolCompletedData (line 2701) | public partial class ExternalToolCompletedData
class CommandQueuedData (line 2709) | public partial class CommandQueuedData
class CommandExecuteData (line 2721) | public partial class CommandExecuteData
class CommandCompletedData (line 2741) | public partial class CommandCompletedData
class AutoModeSwitchRequestedData (line 2749) | public partial class AutoModeSwitchRequestedData
class AutoModeSwitchCompletedData (line 2767) | public partial class AutoModeSwitchCompletedData
class CommandsChangedData (line 2779) | public partial class CommandsChangedData
class CapabilitiesChangedData (line 2787) | public partial class CapabilitiesChangedData
class ExitPlanModeRequestedData (line 2796) | public partial class ExitPlanModeRequestedData
class ExitPlanModeCompletedData (line 2820) | public partial class ExitPlanModeCompletedData
class SessionToolsUpdatedData (line 2848) | public partial class SessionToolsUpdatedData
class SessionBackgroundTasksChangedData (line 2856) | public partial class SessionBackgroundTasksChangedData
class SessionSkillsLoadedData (line 2861) | public partial class SessionSkillsLoadedData
class SessionCustomAgentsUpdatedData (line 2869) | public partial class SessionCustomAgentsUpdatedData
class SessionMcpServersLoadedData (line 2885) | public partial class SessionMcpServersLoadedData
class SessionMcpServerStatusChangedData (line 2893) | public partial class SessionMcpServerStatusChangedData
class SessionExtensionsLoadedData (line 2905) | public partial class SessionExtensionsLoadedData
class WorkingDirectoryContext (line 2914) | public partial class WorkingDirectoryContext
class HandoffRepository (line 2958) | public partial class HandoffRepository
class ShutdownCodeChanges (line 2976) | public partial class ShutdownCodeChanges
class ShutdownModelMetricRequests (line 2993) | public partial class ShutdownModelMetricRequests
class ShutdownModelMetricTokenDetail (line 3005) | public partial class ShutdownModelMetricTokenDetail
class ShutdownModelMetricUsage (line 3014) | public partial class ShutdownModelMetricUsage
class ShutdownModelMetric (line 3039) | public partial class ShutdownModelMetric
class ShutdownTokenDetail (line 3061) | public partial class ShutdownTokenDetail
class CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail (line 3070) | public partial class CompactionCompleteCompactionTokensUsedCopilotUsageT...
class CompactionCompleteCompactionTokensUsedCopilotUsage (line 3091) | public partial class CompactionCompleteCompactionTokensUsedCopilotUsage
class CompactionCompleteCompactionTokensUsed (line 3104) | public partial class CompactionCompleteCompactionTokensUsed
class UserMessageAttachmentFileLineRange (line 3144) | public partial class UserMessageAttachmentFileLineRange
class UserMessageAttachmentFile (line 3157) | public partial class UserMessageAttachmentFile : UserMessageAttachment
class UserMessageAttachmentDirectory (line 3179) | public partial class UserMessageAttachmentDirectory : UserMessageAttachment
class UserMessageAttachmentSelectionDetailsEnd (line 3196) | public partial class UserMessageAttachmentSelectionDetailsEnd
class UserMessageAttachmentSelectionDetailsStart (line 3209) | public partial class UserMessageAttachmentSelectionDetailsStart
class UserMessageAttachmentSelectionDetails (line 3222) | public partial class UserMessageAttachmentSelectionDetails
class UserMessageAttachmentSelection (line 3235) | public partial class UserMessageAttachmentSelection : UserMessageAttachment
class UserMessageAttachmentGithubReference (line 3260) | public partial class UserMessageAttachmentGithubReference : UserMessageA...
class UserMessageAttachmentBlob (line 3289) | public partial class UserMessageAttachmentBlob : UserMessageAttachment
class UserMessageAttachment (line 3312) | [JsonPolymorphic(
class AssistantMessageToolRequest (line 3330) | public partial class AssistantMessageToolRequest
class AssistantUsageCopilotUsageTokenDetail (line 3368) | public partial class AssistantUsageCopilotUsageTokenDetail
class AssistantUsageCopilotUsage (line 3389) | public partial class AssistantUsageCopilotUsage
class AssistantUsageQuotaSnapshot (line 3401) | public partial class AssistantUsageQuotaSnapshot
class ToolExecutionCompleteError (line 3439) | public partial class ToolExecutionCompleteError
class ToolExecutionCompleteContentText (line 3453) | public partial class ToolExecutionCompleteContentText : ToolExecutionCom...
class ToolExecutionCompleteContentTerminal (line 3466) | public partial class ToolExecutionCompleteContentTerminal : ToolExecutio...
class ToolExecutionCompleteContentImage (line 3489) | public partial class ToolExecutionCompleteContentImage : ToolExecutionCo...
class ToolExecutionCompleteContentAudio (line 3507) | public partial class ToolExecutionCompleteContentAudio : ToolExecutionCo...
class ToolExecutionCompleteContentResourceLinkIcon (line 3525) | public partial class ToolExecutionCompleteContentResourceLinkIcon
class ToolExecutionCompleteContentResourceLink (line 3549) | public partial class ToolExecutionCompleteContentResourceLink : ToolExec...
class ToolExecutionCompleteContentResource (line 3591) | public partial class ToolExecutionCompleteContentResource : ToolExecutio...
class ToolExecutionCompleteContent (line 3604) | [JsonPolymorphic(
class ToolExecutionCompleteResult (line 3623) | public partial class ToolExecutionCompleteResult
class HookEndError (line 3642) | public partial class HookEndError
class SystemMessageMetadata (line 3656) | public partial class SystemMessageMetadata
class SystemNotificationAgentCompleted (line 3670) | public partial class SystemNotificationAgentCompleted : SystemNotification
class SystemNotificationAgentIdle (line 3700) | public partial class SystemNotificationAgentIdle : SystemNotification
class SystemNotificationNewInboxMessage (line 3721) | public partial class SystemNotificationNewInboxMessage : SystemNotification
class SystemNotificationShellCompleted (line 3745) | public partial class SystemNotificationShellCompleted : SystemNotification
class SystemNotificationShellDetachedCompleted (line 3767) | public partial class SystemNotificationShellDetachedCompleted : SystemNo...
class SystemNotificationInstructionDiscovered (line 3784) | public partial class SystemNotificationInstructionDiscovered : SystemNot...
class SystemNotification (line 3810) | [JsonPolymorphic(
class PermissionRequestShellCommand (line 3828) | public partial class PermissionRequestShellCommand
class PermissionRequestShellPossibleUrl (line 3840) | public partial class PermissionRequestShellPossibleUrl
class PermissionRequestShell (line 3849) | public partial class PermissionRequestShell : PermissionRequest
class PermissionRequestWrite (line 3896) | public partial class PermissionRequestWrite : PermissionRequest
class PermissionRequestRead (line 3931) | public partial class PermissionRequestRead : PermissionRequest
class PermissionRequestMcp (line 3953) | public partial class PermissionRequestMcp : PermissionRequest
class PermissionRequestUrl (line 3988) | public partial class PermissionRequestUrl : PermissionRequest
class PermissionRequestMemory (line 4010) | public partial class PermissionRequestMemory : PermissionRequest
class PermissionRequestCustomTool (line 4053) | public partial class PermissionRequestCustomTool : PermissionRequest
class PermissionRequestHook (line 4080) | public partial class PermissionRequestHook : PermissionRequest
class PermissionRequest (line 4108) | [JsonPolymorphic(
class PermissionPromptRequestCommands (line 4129) | public partial class PermissionPromptRequestCommands : PermissionPromptR...
class PermissionPromptRequestWrite (line 4164) | public partial class PermissionPromptRequestWrite : PermissionPromptRequest
class PermissionPromptRequestRead (line 4199) | public partial class PermissionPromptRequestRead : PermissionPromptRequest
class PermissionPromptRequestMcp (line 4221) | public partial class PermissionPromptRequestMcp : PermissionPromptRequest
class PermissionPromptRequestUrl (line 4252) | public partial class PermissionPromptRequestUrl : PermissionPromptRequest
class PermissionPromptRequestMemory (line 4274) | public partial class PermissionPromptRequestMemory : PermissionPromptReq...
class PermissionPromptRequestCustomTool (line 4317) | public partial class PermissionPromptRequestCustomTool : PermissionPromp...
class PermissionPromptRequestPath (line 4344) | public partial class PermissionPromptRequestPath : PermissionPromptRequest
class PermissionPromptRequestHook (line 4366) | public partial class PermissionPromptRequestHook : PermissionPromptRequest
class PermissionPromptRequest (line 4394) | [JsonPolymorphic(
class PermissionResultApproved (line 4415) | public partial class PermissionResultApproved : PermissionResult
class UserToolSessionApprovalCommands (line 4423) | public partial class UserToolSessionApprovalCommands : UserToolSessionAp...
class UserToolSessionApprovalRead (line 4435) | public partial class UserToolSessionApprovalRead : UserToolSessionApproval
class UserToolSessionApprovalWrite (line 4443) | public partial class UserToolSessionApprovalWrite : UserToolSessionApproval
class UserToolSessionApprovalMcp (line 4451) | public partial class UserToolSessionApprovalMcp : UserToolSessionApproval
class UserToolSessionApprovalMemory (line 4467) | public partial class UserToolSessionApprovalMemory : UserToolSessionAppr...
class UserToolSessionApprovalCustomTool (line 4475) | public partial class UserToolSessionApprovalCustomTool : UserToolSession...
class UserToolSessionApproval (line 4488) | [JsonPolymorphic(
class PermissionResultApprovedForSession (line 4506) | public partial class PermissionResultApprovedForSession : PermissionResult
class PermissionResultApprovedForLocation (line 4518) | public partial class PermissionResultApprovedForLocation : PermissionResult
class PermissionResultCancelled (line 4534) | public partial class PermissionResultCancelled : PermissionResult
class PermissionRule (line 4547) | public partial class PermissionRule
class PermissionResultDeniedByRules (line 4559) | public partial class PermissionResultDeniedByRules : PermissionResult
class PermissionResultDeniedNoApprovalRuleAndCouldNotRequestFromUser (line 4571) | public partial class PermissionResultDeniedNoApprovalRuleAndCouldNotRequ...
class PermissionResultDeniedInteractivelyByUser (line 4579) | public partial class PermissionResultDeniedInteractivelyByUser : Permiss...
class PermissionResultDeniedByContentExclusionPolicy (line 4597) | public partial class PermissionResultDeniedByContentExclusionPolicy : Pe...
class PermissionResultDeniedByPermissionRequestHook (line 4613) | public partial class PermissionResultDeniedByPermissionRequestHook : Per...
class PermissionResult (line 4632) | [JsonPolymorphic(
class ElicitationRequestedSchema (line 4654) | public partial class ElicitationRequestedSchema
class McpOauthRequiredStaticClientConfig (line 4672) | public partial class McpOauthRequiredStaticClientConfig
class CommandsChangedCommand (line 4690) | public partial class CommandsChangedCommand
class CapabilitiesChangedUI (line 4704) | public partial class CapabilitiesChangedUI
class SkillsLoadedSkill (line 4713) | public partial class SkillsLoadedSkill
class CustomAgentsUpdatedAgent (line 4742) | public partial class CustomAgentsUpdatedAgent
class McpServersLoadedServer (line 4779) | public partial class McpServersLoadedServer
class ExtensionsLoadedExtension (line 4801) | public partial class ExtensionsLoadedExtension
type WorkingDirectoryContextHostType (line 4821) | [JsonConverter(typeof(JsonStringEnumConverter<WorkingDirectoryContextHos...
type PlanChangedOperation (line 4833) | [JsonConverter(typeof(JsonStringEnumConverter<PlanChangedOperation>))]
type WorkspaceFileChangedOperation (line 4848) | [JsonConverter(typeof(JsonStringEnumConverter<WorkspaceFileChangedOperat...
type HandoffSourceType (line 4860) | [JsonConverter(typeof(JsonStringEnumConverter<HandoffSourceType>))]
type ShutdownType (line 4872) | [JsonConverter(typeof(JsonStringEnumConverter<ShutdownType>))]
type UserMessageAgentMode (line 4884) | [JsonConverter(typeof(JsonStringEnumConverter<UserMessageAgentMode>))]
type UserMessageAttachmentGithubReferenceType (line 4902) | [JsonConverter(typeof(JsonStringEnumConverter<UserMessageAttachmentGithu...
type AssistantMessageToolRequestType (line 4917) | [JsonConverter(typeof(JsonStringEnumConverter<AssistantMessageToolReques...
type ModelCallFailureSource (line 4929) | [JsonConverter(typeof(JsonStringEnumConverter<ModelCallFailureSource>))]
type ToolExecutionCompleteContentResourceLinkIconTheme (line 4944) | [JsonConverter(typeof(JsonStringEnumConverter<ToolExecutionCompleteConte...
type SystemMessageRole (line 4956) | [JsonConverter(typeof(JsonStringEnumConverter<SystemMessageRole>))]
type SystemNotificationAgentCompletedStatus (line 4968) | [JsonConverter(typeof(JsonStringEnumConverter<SystemNotificationAgentCom...
type PermissionRequestMemoryAction (line 4980) | [JsonConverter(typeof(JsonStringEnumConverter<PermissionRequestMemoryAct...
type PermissionRequestMemoryDirection (line 4992) | [JsonConverter(typeof(JsonStringEnumConverter<PermissionRequestMemoryDir...
type PermissionPromptRequestMemoryAction (line 5004) | [JsonConverter(typeof(JsonStringEnumConverter<PermissionPromptRequestMem...
type PermissionPromptRequestMemoryDirection (line 5016) | [JsonConverter(typeof(JsonStringEnumConverter<PermissionPromptRequestMem...
type PermissionPromptRequestPathAccessKind (line 5028) | [JsonConverter(typeof(JsonStringEnumConverter<PermissionPromptRequestPat...
type ElicitationRequestedMode (line 5043) | [JsonConverter(typeof(JsonStringEnumConverter<ElicitationRequestedMode>))]
type ElicitationCompletedAction (line 5055) | [JsonConverter(typeof(JsonStringEnumConverter<ElicitationCompletedAction...
type McpServersLoadedServerStatus (line 5070) | [JsonConverter(typeof(JsonStringEnumConverter<McpServersLoadedServerStat...
type McpServerStatusChangedStatus (line 5094) | [JsonConverter(typeof(JsonStringEnumConverter<McpServerStatusChangedStat...
type ExtensionsLoadedExtensionSource (line 5118) | [JsonConverter(typeof(JsonStringEnumConverter<ExtensionsLoadedExtensionS...
type ExtensionsLoadedExtensionStatus (line 5130) | [JsonConverter(typeof(JsonStringEnumConverter<ExtensionsLoadedExtensionS...
class SessionEventsJsonContext (line 5147) | [JsonSourceGenerationOptions(
FILE: dotnet/src/JsonRpc.cs
class JsonRpc (line 30) | internal sealed partial class JsonRpc : IDisposable
method JsonRpc (line 54) | public JsonRpc(Stream sendStream, Stream receiveStream, JsonSerializer...
method StartListening (line 70) | public void StartListening()
method InvokeAsync (line 78) | public async Task<T> InvokeAsync<T>(string method, object?[]? args, Ca...
method SetLocalRpcMethod (line 131) | public void SetLocalRpcMethod(string methodName, Delegate handler, boo...
method Dispose (line 137) | public void Dispose()
method SendMessageAsync (line 160) | private async Task SendMessageAsync<T>(T message, JsonTypeInfo<T> type...
method ReadLoopAsync (line 190) | private async Task ReadLoopAsync(CancellationToken cancellationToken)
method ReadMessageAsync (line 280) | private async ValueTask<(int ContentLength, byte[] Buffer, int Carried...
method HandleResponse (line 387) | private void HandleResponse(JsonElement message, JsonElement idProp)
method HandleIncomingMethodAsync (line 421) | private async Task HandleIncomingMethodAsync(string methodName, JsonEl...
method InvokeHandlerAsync (line 480) | private async ValueTask<object?> InvokeHandlerAsync(MethodRegistration...
method TryGetPropertyCaseInsensitive (line 585) | private static bool TryGetPropertyCaseInsensitive(JsonElement obj, str...
method SerializeArgs (line 607) | private JsonElement? SerializeArgs(object?[]? args)
method SendResultResponseAsync (line 658) | private async Task SendResultResponseAsync(JsonElement id, object? res...
method SendErrorResponseAsync (line 685) | private async Task SendErrorResponseAsync(JsonElement id, int code, st...
method SendCancelNotificationAsync (line 701) | private async Task SendCancelNotificationAsync(long requestId)
class PendingRequest (line 719) | private sealed class PendingRequest() : TaskCompletionSource<JsonEleme...
class MethodRegistration (line 721) | private sealed class MethodRegistration
method MethodRegistration (line 723) | public MethodRegistration(Delegate handler, bool singleObjectParam)
class JsonRpcWireContext (line 739) | [JsonSourceGenerationOptions(
class JsonRpcRequest (line 748) | private sealed class JsonRpcRequest
class JsonRpcResponse (line 763) | private sealed class JsonRpcResponse
class JsonRpcErrorResponse (line 781) | private sealed class JsonRpcErrorResponse
class JsonRpcError (line 793) | private sealed class JsonRpcError
class JsonRpcNotification (line 802) | private sealed class JsonRpcNotification
class CancelRequestParams (line 814) | private sealed class CancelRequestParams
class CancelRequestParamsContext (line 820) | [JsonSerializable(typeof(CancelRequestParams))]
class ConnectionLostException (line 827) | internal sealed class ConnectionLostException() : IOException("The JSON-...
class RemoteRpcException (line 832) | internal sealed class RemoteRpcException(string message, int errorCode, ...
FILE: dotnet/src/MillisecondsTimeSpanConverter.cs
class MillisecondsTimeSpanConverter (line 12) | [EditorBrowsable(EditorBrowsableState.Never)]
method Read (line 16) | public override TimeSpan Read(ref Utf8JsonReader reader, Type typeToCo...
method Write (line 20) | public override void Write(Utf8JsonWriter writer, TimeSpan value, Json...
FILE: dotnet/src/PermissionHandlers.cs
class PermissionHandler (line 8) | public static class PermissionHandler
FILE: dotnet/src/SdkProtocolVersion.cs
class SdkProtocolVersion (line 9) | internal static class SdkProtocolVersion
method GetVersion (line 19) | public static int GetVersion() => Version;
FILE: dotnet/src/Session.cs
class CopilotSession (line 55) | public sealed partial class CopilotSession : IAsyncDisposable
method CopilotSession (line 138) | internal CopilotSession(string sessionId, JsonRpc rpc, ILogger logger,...
method InvokeRpcAsync (line 150) | private Task<T> InvokeRpcAsync<T>(string method, object?[]? args, Canc...
method SendAsync (line 183) | public async Task<string> SendAsync(MessageOptions options, Cancellati...
method SendAndWaitAsync (line 231) | public async Task<AssistantMessageEvent?> SendAndWaitAsync(
method On (line 310) | public IDisposable On(SessionEventHandler handler)
method DispatchEvent (line 327) | internal void DispatchEvent(SessionEvent sessionEvent)
method ProcessEventsAsync (line 343) | private async Task ProcessEventsAsync()
method RegisterTools (line 369) | internal void RegisterTools(ICollection<AIFunction> tools)
method GetTool (line 383) | internal AIFunction? GetTool(string name)
method RegisterPermissionHandler (line 396) | internal void RegisterPermissionHandler(PermissionRequestHandler handler)
method HandlePermissionRequestAsync (line 406) | internal async Task<PermissionRequestResult> HandlePermissionRequestAs...
method HandleBroadcastEventAsync (line 434) | private async Task HandleBroadcastEventAsync(SessionEvent sessionEvent)
method ExecuteToolAndRespondAsync (line 536) | private async Task ExecuteToolAndRespondAsync(string requestId, string...
method ExecutePermissionAndRespondAsync (line 595) | private async Task ExecutePermissionAndRespondAsync(string requestId, ...
method RegisterUserInputHandler (line 635) | internal void RegisterUserInputHandler(UserInputHandler handler)
method RegisterCommands (line 644) | internal void RegisterCommands(IEnumerable<CommandDefinition>? commands)
method RegisterElicitationHandler (line 658) | internal void RegisterElicitationHandler(ElicitationHandler? handler)
method SetCapabilities (line 667) | internal void SetCapabilities(SessionCapabilities? capabilities)
method ExecuteCommandAndRespondAsync (line 676) | private async Task ExecuteCommandAndRespondAsync(string requestId, str...
method HandleElicitationRequestAsync (line 722) | private async Task HandleElicitationRequestAsync(ElicitationContext co...
method AssertElicitation (line 756) | private void AssertElicitation()
class SessionUiApiImpl (line 769) | private sealed class SessionUiApiImpl(CopilotSession session) : ISessi...
method ElicitationAsync (line 771) | public async Task<ElicitationResult> ElicitationAsync(ElicitationPar...
method ConfirmAsync (line 784) | public async Task<bool> ConfirmAsync(string message, CancellationTok...
method SelectAsync (line 812) | public async Task<string?> SelectAsync(string message, string[] opti...
method InputAsync (line 839) | public async Task<string?> InputAsync(string message, InputOptions? ...
method HandleUserInputRequestAsync (line 877) | internal async Task<UserInputResponse> HandleUserInputRequestAsync(Use...
method RegisterHooks (line 892) | internal void RegisterHooks(SessionHooks hooks)
method HandleHooksInvokeAsync (line 911) | internal async Task<object?> HandleHooksInvokeAsync(string hookType, J...
method RegisterTransformCallbacks (line 974) | internal void RegisterTransformCallbacks(Dictionary<string, Func<strin...
method HandleSystemMessageTransformAsync (line 992) | internal async Task<SystemMessageTransformRpcResponse> HandleSystemMes...
method GetMessagesAsync (line 1058) | public async Task<IReadOnlyList<SessionEvent>> GetMessagesAsync(Cancel...
method AbortAsync (line 1092) | public async Task AbortAsync(CancellationToken cancellationToken = def...
method SetModelAsync (line 1112) | public async Task SetModelAsync(string model, string? reasoningEffort,...
method SetModelAsync (line 1120) | public Task SetModelAsync(string model, CancellationToken cancellation...
method LogAsync (line 1143) | public async Task LogAsync(string message, SessionLogLevel? level = nu...
method DisposeAsync (line 1181) | public async ValueTask DisposeAsync()
method LogBroadcastHandlerError (line 1212) | [LoggerMessage(Level = LogLevel.Error, Message = "Unhandled exception ...
method LogEventHandlerError (line 1215) | [LoggerMessage(Level = LogLevel.Error, Message = "Unhandled exception ...
type SendMessageRequest (line 1218) | internal record SendMessageRequest
type SendMessageResponse (line 1229) | internal record SendMessageResponse
type GetMessagesRequest (line 1234) | internal record GetMessagesRequest
type GetMessagesResponse (line 1239) | internal record GetMessagesResponse
type SessionAbortRequest (line 1244) | internal record SessionAbortRequest
type SessionDestroyRequest (line 1249) | internal record SessionDestroyRequest
class SessionJsonContext (line 1254) | [JsonSourceGenerationOptions(
FILE: dotnet/src/SessionFsProvider.cs
class SessionFsProvider (line 15) | public abstract class SessionFsProvider : ISessionFsHandler
method ReadFileAsync (line 21) | protected abstract Task<string> ReadFileAsync(string path, Cancellatio...
method WriteFileAsync (line 28) | protected abstract Task WriteFileAsync(string path, string content, in...
method AppendFileAsync (line 35) | protected abstract Task AppendFileAsync(string path, string content, i...
method ExistsAsync (line 41) | protected abstract Task<bool> ExistsAsync(string path, CancellationTok...
method StatAsync (line 46) | protected abstract Task<SessionFsStatResult> StatAsync(string path, Ca...
method MkdirAsync (line 53) | protected abstract Task MkdirAsync(string path, bool recursive, int? m...
method ReaddirAsync (line 58) | protected abstract Task<IList<string>> ReaddirAsync(string path, Cance...
method ReaddirWithTypesAsync (line 63) | protected abstract Task<IList<SessionFsReaddirWithTypesEntry>> Readdir...
method RmAsync (line 70) | protected abstract Task RmAsync(string path, bool recursive, bool forc...
method RenameAsync (line 76) | protected abstract Task RenameAsync(string src, string dest, Cancellat...
method ReadFileAsync (line 80) | async Task<SessionFsReadFileResult> ISessionFsHandler.ReadFileAsync(Se...
method WriteFileAsync (line 93) | async Task<SessionFsError?> ISessionFsHandler.WriteFileAsync(SessionFs...
method AppendFileAsync (line 106) | async Task<SessionFsError?> ISessionFsHandler.AppendFileAsync(SessionF...
method ExistsAsync (line 119) | async Task<SessionFsExistsResult> ISessionFsHandler.ExistsAsync(Sessio...
method StatAsync (line 132) | async Task<SessionFsStatResult> ISessionFsHandler.StatAsync(SessionFsS...
method MkdirAsync (line 144) | async Task<SessionFsError?> ISessionFsHandler.MkdirAsync(SessionFsMkdi...
method ReaddirAsync (line 157) | async Task<SessionFsReaddirResult> ISessionFsHandler.ReaddirAsync(Sess...
method ReaddirWithTypesAsync (line 170) | async Task<SessionFsReaddirWithTypesResult> ISessionFsHandler.ReaddirW...
method RmAsync (line 183) | async Task<SessionFsError?> ISessionFsHandler.RmAsync(SessionFsRmReque...
method RenameAsync (line 196) | async Task<SessionFsError?> ISessionFsHandler.RenameAsync(SessionFsRen...
method ToSessionFsError (line 209) | private static SessionFsError ToSessionFsError(Exception ex)
FILE: dotnet/src/Telemetry.cs
class TelemetryHelpers (line 9) | internal static class TelemetryHelpers
method GetTraceContext (line 11) | internal static (string? Traceparent, string? Tracestate) GetTraceCont...
method RestoreTraceContext (line 32) | internal static Activity? RestoreTraceContext(string? traceparent, str...
FILE: dotnet/src/Types.cs
type ConnectionState (line 19) | [JsonConverter(typeof(JsonStringEnumConverter<ConnectionState>))]
class CopilotClientOptions (line 39) | public class CopilotClientOptions
method CopilotClientOptions (line 44) | public CopilotClientOptions() { }
method CopilotClientOptions (line 50) | protected CopilotClientOptions(CopilotClientOptions? other)
method Clone (line 187) | public virtual CopilotClientOptions Clone()
class TelemetryConfig (line 196) | public sealed class TelemetryConfig
class SessionFsConfig (line 242) | public sealed class SessionFsConfig
class ToolBinaryResult (line 264) | public class ToolBinaryResult
class ToolResultObject (line 294) | public class ToolResultObject
method ConvertFromInvocationResult (line 343) | internal static ToolResultObject ConvertFromInvocationResult(object? r...
method TryConvertFromAIContent (line 370) | internal static ToolResultObject? TryConvertFromAIContent(object? result)
method ConvertAIContents (line 385) | private static ToolResultObject ConvertAIContents(IEnumerable<AIConten...
method SerializeAIContent (line 424) | private static string SerializeAIContent(AIContent content) =>
class ToolInvocation (line 431) | public class ToolInvocation
type PermissionRequestResultKind (line 457) | [JsonConverter(typeof(PermissionRequestResultKind.Converter))]
method PermissionRequestResultKind (line 492) | [JsonConstructor]
method Equals (line 502) | public override bool Equals([NotNullWhen(true)] object? obj) => obj is...
method Equals (line 505) | public bool Equals(PermissionRequestResultKind other) => string.Equals...
method GetHashCode (line 508) | public override int GetHashCode() => StringComparer.OrdinalIgnoreCase....
method ToString (line 511) | public override string ToString() => Value;
class Converter (line 514) | [EditorBrowsable(EditorBrowsableState.Never)]
method Read (line 518) | public override PermissionRequestResultKind Read(ref Utf8JsonReader ...
method Write (line 535) | public override void Write(Utf8JsonWriter writer, PermissionRequestR...
class PermissionRequestResult (line 543) | public class PermissionRequestResult
class PermissionInvocation (line 568) | public class PermissionInvocation
class UserInputRequest (line 588) | public class UserInputRequest
class UserInputResponse (line 612) | public class UserInputResponse
class UserInputInvocation (line 630) | public class UserInputInvocation
class CommandDefinition (line 650) | public class CommandDefinition
class CommandContext (line 671) | public class CommandContext
class ElicitationSchema (line 706) | public class ElicitationSchema
class ElicitationParams (line 730) | public class ElicitationParams
class ElicitationResult (line 746) | public class ElicitationResult
class InputOptions (line 762) | public class InputOptions
type ISessionUiApi (line 786) | public interface ISessionUiApi
method ElicitationAsync (line 795) | Task<ElicitationResult> ElicitationAsync(ElicitationParams elicitation...
method ConfirmAsync (line 805) | Task<bool> ConfirmAsync(string message, CancellationToken cancellation...
method SelectAsync (line 816) | Task<string?> SelectAsync(string message, string[] options, Cancellati...
method InputAsync (line 827) | Task<string?> InputAsync(string message, InputOptions? options = null,...
class ElicitationContext (line 838) | public class ElicitationContext
class SessionCapabilities (line 871) | public class SessionCapabilities
class SessionUiCapabilities (line 882) | public class SessionUiCapabilities
class HookInvocation (line 897) | public class HookInvocation
class PreToolUseHookInput (line 908) | public class PreToolUseHookInput
class PreToolUseHookOutput (line 938) | public class PreToolUseHookOutput
class PostToolUseHookInput (line 984) | public class PostToolUseHookInput
class PostToolUseHookOutput (line 1020) | public class PostToolUseHookOutput
class UserPromptSubmittedHookInput (line 1049) | public class UserPromptSubmittedHookInput
class UserPromptSubmittedHookOutput (line 1073) | public class UserPromptSubmittedHookOutput
class SessionStartHookInput (line 1102) | public class SessionStartHookInput
class SessionStartHookOutput (line 1137) | public class SessionStartHookOutput
class SessionEndHookInput (line 1160) | public class SessionEndHookInput
class SessionEndHookOutput (line 1203) | public class SessionEndHookOutput
class ErrorOccurredHookInput (line 1232) | public class ErrorOccurredHookInput
class ErrorOccurredHookOutput (line 1274) | public class ErrorOccurredHookOutput
class SessionHooks (line 1314) | public class SessionHooks
type SystemMessageMode (line 1350) | [JsonConverter(typeof(JsonStringEnumConverter<SystemMessageMode>))]
type SectionOverrideAction (line 1367) | [JsonConverter(typeof(JsonStringEnumConverter<SectionOverrideAction>))]
class SectionOverride (line 1390) | public class SectionOverride
class SystemPromptSections (line 1416) | public static class SystemPromptSections
class SystemMessageConfig (line 1443) | public class SystemMessageConfig
class ProviderConfig (line 1466) | public class ProviderConfig
class AzureOptions (line 1516) | public class AzureOptions
type McpHttpServerConfigOauthGrantType (line 1532) | [JsonConverter(typeof(JsonStringEnumConverter<McpHttpServerConfigOauthGr...
class McpServerConfig (line 1547) | [JsonPolymorphic(
method McpServerConfig (line 1554) | private protected McpServerConfig() { }
class McpStdioServerConfig (line 1578) | public sealed class McpStdioServerConfig : McpServerConfig
class McpHttpServerConfig (line 1612) | public sealed class McpHttpServerConfig : McpServerConfig
class CustomAgentConfig (line 1656) | public class CustomAgentConfig
class DefaultAgentConfig (line 1716) | public class DefaultAgentConfig
class InfiniteSessionConfig (line 1731) | public class InfiniteSessionConfig
class SessionConfig (line 1759) | public class SessionConfig
method SessionConfig (line 1764) | public SessionConfig() { }
method SessionConfig (line 1770) | protected SessionConfig(SessionConfig? other)
method Clone (line 2007) | public virtual SessionConfig Clone()
class ResumeSessionConfig (line 2016) | public class ResumeSessionConfig
method ResumeSessionConfig (line 2021) | public ResumeSessionConfig() { }
method ResumeSessionConfig (line 2027) | protected ResumeSessionConfig(ResumeSessionConfig? other)
method Clone (line 2277) | public virtual ResumeSessionConfig Clone()
class MessageOptions (line 2286) | public class MessageOptions
method MessageOptions (line 2291) | public MessageOptions() { }
method MessageOptions (line 2297) | protected MessageOptions(MessageOptions? other)
method Clone (line 2335) | public virtual MessageOptions Clone()
class SessionContext (line 2349) | public class SessionContext
class SessionListFilter (line 2364) | public class SessionListFilter
class SessionMetadata (line 2379) | public class SessionMetadata
class PingRequest (line 2405) | internal class PingRequest
class PingResponse (line 2413) | public class PingResponse
class GetStatusResponse (line 2432) | public class GetStatusResponse
class GetAuthStatusResponse (line 2446) | public class GetAuthStatusResponse
class ModelVisionLimits (line 2482) | public class ModelVisionLimits
class ModelLimits (line 2506) | public class ModelLimits
class ModelSupports (line 2530) | public class ModelSupports
class ModelCapabilities (line 2548) | public class ModelCapabilities
class ModelPolicy (line 2566) | public class ModelPolicy
class ModelBilling (line 2584) | public class ModelBilling
class ModelInfo (line 2596) | public class ModelInfo
class GetModelsResponse (line 2630) | public class GetModelsResponse
class SessionLifecycleEventTypes (line 2646) | public static class SessionLifecycleEventTypes
class SessionLifecycleEventMetadata (line 2663) | public class SessionLifecycleEventMetadata
class SessionLifecycleEvent (line 2687) | public class SessionLifecycleEvent
class GetForegroundSessionResponse (line 2711) | public class GetForegroundSessionResponse
class SetForegroundSessionResponse (line 2729) | public class SetForegroundSessionResponse
class SystemMessageTransformSection (line 2747) | public class SystemMessageTransformSection
class SystemMessageTransformRpcResponse (line 2759) | public class SystemMessageTransformRpcResponse
class TypesJsonContext (line 2768) | [JsonSourceGenerationOptions(
FILE: dotnet/test/E2E/AskUserE2ETests.cs
class AskUserE2ETests (line 11) | public class AskUserE2ETests(E2ETestFixture fixture, ITestOutputHelper o...
method Should_Invoke_User_Input_Handler_When_Model_Uses_Ask_User_Tool (line 13) | [Fact]
method Should_Receive_Choices_In_User_Input_Request (line 47) | [Fact]
method Should_Handle_Freeform_User_Input_Response (line 79) | [Fact]
FILE: dotnet/test/E2E/BuiltinToolsE2ETests.cs
class BuiltinToolsE2ETests (line 17) | public class BuiltinToolsE2ETests(E2ETestFixture fixture, ITestOutputHel...
method Should_Capture_Exit_Code_In_Output (line 20) | [Fact]
method Should_Capture_Stderr_Output (line 33) | [Fact]
method Should_Read_File_With_Line_Range (line 52) | [Fact]
method Should_Handle_Nonexistent_File_Gracefully (line 66) | [Fact]
method Should_Edit_A_File_Successfully (line 86) | [Fact]
method Should_Create_A_New_File (line 98) | [Fact]
method Should_Search_For_Patterns_In_Files (line 109) | [Fact]
method Should_Find_Files_By_Pattern (line 123) | [Fact]
FILE: dotnet/test/E2E/ClientE2ETests.cs
class ClientE2ETests (line 11) | public class ClientE2ETests
method Should_Start_And_Connect_To_Server_Using_Stdio (line 13) | [Fact]
method Should_Start_And_Connect_To_Server_Using_Tcp (line 36) | [Fact]
method Should_Force_Stop_Without_Cleanup (line 57) | [Fact]
method Should_Get_Status_With_Version_And_Protocol_Info (line 68) | [Fact]
method Should_Get_Auth_Status (line 90) | [Fact]
method Should_List_Models_When_Authenticated (line 115) | [Fact]
method Should_Not_Throw_When_Disposing_Session_After_Stopping_Client (line 151) | [Fact]
method Should_Report_Error_With_Stderr_When_CLI_Fails_To_Start (line 160) | [Fact]
method Should_Throw_When_CreateSession_Called_Without_PermissionHandler (line 188) | [Fact]
method Should_Throw_When_ResumeSession_Called_Without_PermissionHandler (line 199) | [Fact]
method ListModels_WithCustomHandler_CallsHandler (line 210) | [Fact]
method ListModels_WithCustomHandler_CachesResults (line 244) | [Fact]
method ListModels_WithCustomHandler_WorksWithoutStart (line 277) | [Fact]
FILE: dotnet/test/E2E/ClientLifecycleE2ETests.cs
class ClientLifecycleE2ETests (line 10) | public class ClientLifecycleE2ETests(E2ETestFixture fixture, ITestOutput...
method Should_Receive_Session_Created_Lifecycle_Event (line 13) | [Fact]
method Should_Filter_Session_Lifecycle_Events_By_Type (line 32) | [Fact]
method Disposing_Lifecycle_Subscription_Stops_Receiving_Events (line 45) | [Fact]
method Dispose_Disconnects_Client_And_Disposes_Rpc_Surface (line 61) | [Theory]
FILE: dotnet/test/E2E/ClientOptionsE2ETests.cs
class ClientOptionsE2ETests (line 14) | public class ClientOptionsE2ETests(E2ETestFixture fixture, ITestOutputHe...
method AutoStart_False_Requires_Explicit_Start (line 17) | [Fact]
method Should_Listen_On_Configured_Tcp_Port (line 43) | [Fact]
method Should_Use_Client_Cwd_For_Default_WorkingDirectory (line 63) | [Fact]
method Should_Propagate_Process_Options_To_Spawned_Cli (line 90) | [Fact]
method Should_Accept_GitHubToken_Option (line 158) | [Fact]
method Should_Default_UseLoggedInUser_To_Null (line 169) | [Fact]
method Should_Allow_Explicit_UseLoggedInUser_False (line 177) | [Fact]
method Should_Allow_Explicit_UseLoggedInUser_True_With_GitHubToken (line 188) | [Fact]
method Should_Throw_When_GitHubToken_Used_With_CliUrl (line 200) | [Fact]
method Should_Throw_When_UseLoggedInUser_Used_With_CliUrl (line 213) | [Fact]
method Should_Default_SessionIdleTimeoutSeconds_To_Null (line 226) | [Fact]
method Should_Accept_SessionIdleTimeoutSeconds_Option (line 234) | [Fact]
method GetAvailableTcpPort (line 245) | private static int GetAvailableTcpPort()
method AssertArgumentValue (line 259) | private static void AssertArgumentValue(string?[] args, string name, s...
FILE: dotnet/test/E2E/ClientSessionManagementE2ETests.cs
class ClientSessionManagementE2ETests (line 10) | public class ClientSessionManagementE2ETests(E2ETestFixture fixture, ITe...
method AssertFailureAsync (line 13) | private static async Task<Exception> AssertFailureAsync(Func<Task> act...
method Should_Delete_Session_By_Id (line 20) | [Fact]
method Should_Report_Error_When_Deleting_Unknown_Session_Id (line 34) | [Fact]
method Should_Get_Null_Last_Session_Id_Before_Any_Sessions_Exist (line 44) | [Fact]
method Should_Track_Last_Session_Id_After_Session_Created (line 54) | [Fact]
method Should_Get_Null_Foreground_Session_Id_In_Headless_Mode (line 67) | [Fact]
method Should_Report_Error_When_Setting_Foreground_Session_In_Headless_Mode (line 77) | [Fact]
FILE: dotnet/test/E2E/CommandsE2ETests.cs
class CommandsE2ETests (line 11) | public class CommandsE2ETests(E2ETestFixture fixture, ITestOutputHelper ...
method Session_With_Commands_Creates_Successfully (line 14) | [Fact]
method Session_With_Commands_Resumes_Successfully (line 33) | [Fact]
method CommandDefinition_Has_Required_Properties (line 53) | [Fact]
method CommandContext_Has_All_Properties (line 68) | [Fact]
method Session_With_No_Commands_Creates_Successfully (line 85) | [Fact]
method Session_Config_Commands_Are_Cloned (line 97) | [Fact]
method Resume_Config_Commands_Are_Cloned (line 120) | [Fact]
FILE: dotnet/test/E2E/CompactionE2ETests.cs
class CompactionE2ETests (line 12) | public class CompactionE2ETests(E2ETestFixture fixture, ITestOutputHelpe...
method Should_Trigger_Compaction_With_Low_Threshold_And_Emit_Events (line 14) | [Fact(Skip = "Compaction tests are skipped due to flakiness — re-enabl...
method Should_Not_Emit_Compaction_Events_When_Infinite_Sessions_Disabled (line 84) | [Fact(Skip = "Compaction tests are skipped due to flakiness — re-enabl...
FILE: dotnet/test/E2E/ElicitationE2ETests.cs
class ElicitationE2ETests (line 12) | public class ElicitationE2ETests(E2ETestFixture fixture, ITestOutputHelp...
method Defaults_Capabilities_When_Not_Provided (line 15) | [Fact]
method Elicitation_Throws_When_Capability_Is_Missing (line 28) | [Fact]
method Sends_RequestElicitation_When_Handler_Provided (line 75) | [Fact]
method Session_With_ElicitationHandler_Reports_Elicitation_Capability (line 94) | [Fact]
method Session_Without_ElicitationHandler_Reports_No_Capability (line 112) | [Fact]
method Session_Without_ElicitationHandler_Creates_Successfully (line 125) | [Fact]
method ConfirmAsync_Returns_True_When_Handler_Accepts (line 138) | [Fact]
method ConfirmAsync_Returns_False_When_Handler_Declines (line 159) | [Fact]
method SelectAsync_Returns_Selected_Option (line 173) | [Fact]
method InputAsync_Returns_Freeform_Value (line 193) | [Fact]
method ElicitationAsync_Returns_All_Action_Shapes (line 222) | [Fact]
method SessionCapabilities_Types_Are_Properly_Structured (line 267) | [Fact]
method ElicitationSchema_Types_Are_Properly_Structured (line 283) | [Fact]
method ElicitationParams_Types_Are_Properly_Structured (line 302) | [Fact]
method ElicitationResult_Types_Are_Properly_Structured (line 321) | [Fact]
method InputOptions_Has_All_Properties (line 341) | [Fact]
method ElicitationContext_Has_All_Properties (line 362) | [Fact]
method Session_Config_OnElicitationRequest_Is_Cloned (line 389) | [Fact]
method Resume_Config_OnElicitationRequest_Is_Cloned (line 408) | [Fact]
FILE: dotnet/test/E2E/ErrorResilienceE2ETests.cs
class ErrorResilienceE2ETests (line 17) | public class ErrorResilienceE2ETests(E2ETestFixture fixture, ITestOutput...
method Should_Throw_When_Sending_To_Disconnected_Session (line 20) | [Fact]
method Should_Throw_When_Getting_Messages_From_Disconnected_Session (line 30) | [Fact]
method Should_Handle_Double_Abort_Without_Error (line 39) | [Fact]
method Should_Throw_When_Resuming_Non_Existent_Session (line 53) | [Fact]
FILE: dotnet/test/E2E/EventFidelityE2ETests.cs
class EventFidelityE2ETests (line 18) | public class EventFidelityE2ETests(E2ETestFixture fixture, ITestOutputHe...
method Should_Emit_Events_In_Correct_Order_For_Tool_Using_Conversation (line 21) | [Fact]
method Should_Include_Valid_Fields_On_All_Events (line 53) | [Fact]
method Should_Emit_Tool_Execution_Events_With_Correct_Fields (line 89) | [Fact]
method Should_Emit_Assistant_Message_With_MessageId (line 122) | [Fact]
FILE: dotnet/test/E2E/HookLifecycleAndOutputE2ETests.cs
class HookLifecycleAndOutputE2ETests (line 20) | public class HookLifecycleAndOutputE2ETests(E2ETestFixture fixture, ITes...
method Should_Invoke_OnSessionStart_Hook_On_New_Session (line 25) | [Fact]
method Should_Invoke_OnUserPromptSubmitted_Hook_When_Sending_A_Message (line 53) | [Fact]
method Should_Invoke_OnSessionEnd_Hook_When_Session_Is_Disconnected (line 81) | [Fact]
method Should_Invoke_OnErrorOccurred_Hook_When_Error_Occurs (line 109) | [Fact]
method Should_Invoke_UserPromptSubmitted_Hook_And_Modify_Prompt (line 140) | [Fact]
method Should_Invoke_SessionStart_Hook (line 167) | [Fact]
method Should_Invoke_SessionEnd_Hook (line 194) | [Fact]
method Should_Register_ErrorOccurred_Hook (line 223) | [Fact]
method Should_Allow_PreToolUse_To_Return_ModifiedArgs_And_SuppressOutput (line 259) | [Fact]
method Should_Allow_PostToolUse_To_Return_ModifiedResult (line 306) | [Fact]
FILE: dotnet/test/E2E/HooksE2ETests.cs
class HooksE2ETests (line 11) | public class HooksE2ETests(E2ETestFixture fixture, ITestOutputHelper out...
method Should_Invoke_PreToolUse_Hook_When_Model_Runs_A_Tool (line 13) | [Fact]
method Should_Invoke_PostToolUse_Hook_After_Model_Runs_A_Tool (line 49) | [Fact]
method Should_Invoke_Both_PreToolUse_And_PostToolUse_Hooks_For_Single_Tool_Call (line 86) | [Fact]
method Should_Deny_Tool_Execution_When_PreToolUse_Returns_Deny (line 129) | [Fact]
FILE: dotnet/test/E2E/MultiClientCommandsElicitationE2ETests.cs
class MultiClientCommandsElicitationFixture (line 16) | public class MultiClientCommandsElicitationFixture : IAsyncLifetime
method InitializeAsync (line 21) | public async Task InitializeAsync()
method DisposeAsync (line 27) | public async Task DisposeAsync()
class MultiClientCommandsElicitationE2ETests (line 38) | public class MultiClientCommandsElicitationE2ETests
method MultiClientCommandsElicitationE2ETests (line 49) | public MultiClientCommandsElicitationE2ETests(
method GetTestName (line 57) | private static string GetTestName(ITestOutputHelper output)
method InitializeAsync (line 66) | public async Task InitializeAsync()
method DisposeAsync (line 86) | public async Task DisposeAsync()
method Client_Receives_Commands_Changed_When_Another_Client_Joins_With_Commands (line 104) | [Fact]
method Capabilities_Changed_Fires_When_Second_Client_Joins_With_Elicitation_Handler (line 149) | [Fact]
method Capabilities_Changed_Fires_When_Elicitation_Provider_Disconnects (line 195) | [Fact]
FILE: dotnet/test/E2E/MultiClientE2ETests.cs
class MultiClientTestFixture (line 19) | public class MultiClientTestFixture : IAsyncLifetime
method InitializeAsync (line 24) | public async Task InitializeAsync()
method DisposeAsync (line 30) | public async Task DisposeAsync()
class MultiClientE2ETests (line 41) | public class MultiClientE2ETests : IClassFixture<MultiClientTestFixture>...
method MultiClientE2ETests (line 50) | public MultiClientE2ETests(MultiClientTestFixture fixture, ITestOutput...
method GetTestName (line 56) | private static string GetTestName(ITestOutputHelper output)
method InitializeAsync (line 64) | public async Task InitializeAsync()
method DisposeAsync (line 84) | public async Task DisposeAsync()
method Both_Clients_See_Tool_Request_And_Completion_Events (line 95) | [Fact]
method One_Client_Approves_Permission_And_Both_See_The_Result (line 147) | [Fact]
method One_Client_Rejects_Permission_And_Both_See_The_Result (line 204) | [Fact]
method Two_Clients_Register_Different_Tools_And_Agent_Uses_Both (line 256) | [Fact]
method Disconnecting_Client_Removes_Its_Tools (line 298) | [Fact]
FILE: dotnet/test/E2E/MultiTurnE2ETests.cs
class MultiTurnE2ETests (line 16) | public class MultiTurnE2ETests(E2ETestFixture fixture, ITestOutputHelper...
method Should_Use_Tool_Results_From_Previous_Turns (line 19) | [Fact]
method Should_Handle_File_Creation_Then_Reading_Across_Turns (line 40) | [Fact]
FILE: dotnet/test/E2E/PendingWorkResumeE2ETests.cs
class PendingWorkResumeE2ETests (line 14) | public class PendingWorkResumeE2ETests(E2ETestFixture fixture, ITestOutp...
method Should_Continue_Pending_Permission_Request_After_Resume (line 19) | [Fact]
method Should_Continue_Pending_External_Tool_Request_After_Resume (line 103) | [Fact]
method Should_Continue_Parallel_Pending_External_Tool_Requests_After_Resume (line 166) | [Fact]
method Should_Resume_Successfully_When_No_Pending_Work_Exists (line 256) | [Fact]
method WaitForExternalToolRequestAsync (line 294) | private static async Task<ExternalToolRequestedEvent> WaitForExternalT...
method WaitForExternalToolRequestsAsync (line 302) | private static async Task<Dictionary<string, ExternalToolRequestedEven...
method GetCliUrl (line 334) | private static string GetCliUrl(CopilotClient client)
FILE: dotnet/test/E2E/PerSessionAuthE2ETests.cs
class PerSessionAuthE2ETests (line 11) | public class PerSessionAuthE2ETests(E2ETestFixture fixture, ITestOutputH...
method CreateAuthTestClient (line 17) | private CopilotClient CreateAuthTestClient()
method SetupCopilotUsersAsync (line 28) | private async Task SetupCopilotUsersAsync()
method ShouldAuthenticateWithGitHubToken (line 49) | [Fact]
method ShouldIsolateAuthBetweenSessions (line 65) | [Fact]
method ShouldBeUnauthenticatedWithoutToken (line 91) | [Fact]
method ShouldFailWithInvalidToken (line 106) | [Fact]
FILE: dotnet/test/E2E/PermissionE2ETests.cs
class PermissionE2ETests (line 11) | public class PermissionE2ETests(E2ETestFixture fixture, ITestOutputHelpe...
method Should_Invoke_Permission_Handler_For_Write_Operations (line 13) | [Fact]
method Should_Deny_Permission_When_Handler_Returns_Denied (line 44) | [Fact]
method Should_Deny_Tool_Operations_When_Handler_Explicitly_Denies (line 73) | [Fact]
method Should_Work_With_Approve_All_Permission_Handler (line 101) | [Fact]
method Should_Handle_Async_Permission_Handler (line 115) | [Fact]
method Should_Resume_Session_With_Permission_Handler (line 139) | [Fact]
method Should_Handle_Permission_Handler_Errors_Gracefully (line 167) | [Fact]
method Should_Deny_Tool_Operations_When_Handler_Explicitly_Denies_After_Resume (line 190) | [Fact]
method Should_Receive_ToolCallId_In_Permission_Requests (line 225) | [Fact]
FILE: dotnet/test/E2E/RpcAgentE2ETests.cs
class RpcAgentE2ETests (line 10) | public class RpcAgentE2ETests(E2ETestFixture fixture, ITestOutputHelper ...
method Should_List_Available_Custom_Agents (line 13) | [Fact]
method Should_Return_Null_When_No_Agent_Is_Selected (line 27) | [Fact]
method Should_Select_And_Get_Current_Agent (line 37) | [Fact]
method Should_Deselect_Current_Agent (line 52) | [Fact]
method Should_Return_Empty_List_When_No_Custom_Agents_Configured (line 64) | [Fact]
method Should_Call_Agent_Reload (line 74) | [Fact]
method CreateCustomAgents (line 93) | private static List<CustomAgentConfig> CreateCustomAgents() =>
method CreateReloadAgent (line 111) | private static CustomAgentConfig CreateReloadAgent() =>
FILE: dotnet/test/E2E/RpcMcpAndSkillsE2ETests.cs
class RpcMcpAndSkillsE2ETests (line 12) | public class RpcMcpAndSkillsE2ETests(E2ETestFixture fixture, ITestOutput...
method AssertFailureAsync (line 15) | private static async Task<Exception> AssertFailureAsync(Func<Task> act...
method Should_List_And_Toggle_Session_Skills (line 22) | [Fact]
method Should_Reload_Session_Skills (line 45) | [Fact]
method Should_List_Mcp_Servers_With_Configured_Server (line 64) | [Fact]
method Should_List_Plugins (line 87) | [Fact]
method Should_List_Extensions (line 98) | [Fact]
method Should_Report_Error_When_Mcp_Host_Is_Not_Initialized (line 113) | [Fact]
method Should_Report_Error_When_Extensions_Are_Not_Available (line 129) | [Fact]
method CreateSkillDirectory (line 145) | private string CreateSkillDirectory(string skillName, string description)
method CreateSkill (line 153) | private static void CreateSkill(string skillsDir, string skillName, st...
method AssertSkill (line 171) | private static RpcSkill AssertSkill(RpcSkillList list, string skillNam...
FILE: dotnet/test/E2E/RpcMcpConfigE2ETests.cs
class RpcMcpConfigE2ETests (line 12) | public class RpcMcpConfigE2ETests(E2ETestFixture fixture, ITestOutputHel...
method Should_Call_Server_Mcp_Config_Rpcs (line 15) | [Fact]
method Should_RoundTrip_Http_Mcp_Oauth_Config_Rpc (line 59) | [Fact]
method GetServerConfig (line 116) | private static JsonElement GetServerConfig(McpConfigList list, string ...
FILE: dotnet/test/E2E/RpcServerE2ETests.cs
class RpcServerE2ETests (line 12) | public class RpcServerE2ETests(E2ETestFixture fixture, ITestOutputHelper...
method CreateAuthenticatedClient (line 15) | private CopilotClient CreateAuthenticatedClient(string token)
method ConfigureAuthenticatedUserAsync (line 29) | private async Task ConfigureAuthenticatedUserAsync(
method Should_Call_Rpc_Ping_With_Typed_Params_And_Result (line 41) | [Fact]
method Should_Call_Rpc_Models_List_With_Typed_Result (line 52) | [Fact]
method Should_Call_Rpc_Account_GetQuota_When_Authenticated (line 67) | [Fact]
method Should_Call_Rpc_Tools_List_With_Typed_Result (line 97) | [Fact]
method Should_Discover_Server_Mcp_And_Skills (line 109) | [Fact]
method CreateSkillDirectory (line 139) | private string CreateSkillDirectory(string skillName, string description)
FILE: dotnet/test/E2E/RpcSessionStateE2ETests.cs
class RpcSessionStateE2ETests (line 12) | public class RpcSessionStateE2ETests(E2ETestFixture fixture, ITestOutput...
method AssertImplementedFailureAsync (line 15) | private static async Task<Exception> AssertImplementedFailureAsync(Fun...
method Should_Call_Session_Rpc_Model_GetCurrent (line 22) | [Fact]
method Should_Call_Session_Rpc_Model_SwitchTo (line 35) | [Fact]
method Should_Get_And_Set_Session_Mode (line 50) | [Fact]
method Should_Read_Update_And_Delete_Plan (line 65) | [Fact]
method Should_Call_Workspace_File_Rpc_Methods (line 88) | [Fact]
method Should_Get_And_Set_Session_Metadata (line 109) | [Fact]
method Should_Fork_Session_With_Persisted_Messages (line 122) | [Fact]
method Should_Report_Error_When_Forking_Session_Without_Persisted_Events (line 158) | [Fact]
method Should_Call_Session_Usage_And_Permission_Rpcs (line 169) | [Fact]
method Should_Report_Implemented_Errors_For_Unsupported_Session_Rpc_Paths (line 207) | [Fact]
method Should_Compact_Session_History_After_Messages (line 221) | [Fact]
method GetConversationMessages (line 233) | private static List<(string Role, string Content)> GetConversationMess...
FILE: dotnet/test/E2E/RpcShellAndFleetE2ETests.cs
class RpcShellAndFleetE2ETests (line 13) | public class RpcShellAndFleetE2ETests(E2ETestFixture fixture, ITestOutpu...
method Should_Execute_Shell_Command (line 16) | [Fact]
method Should_Kill_Shell_Process (line 29) | [Fact]
method Should_Start_Fleet_And_Complete_Custom_Tool_Task (line 45) | [Fact]
method CreateWriteFileCommand (line 86) | private static string CreateWriteFileCommand(string markerPath, string...
method WaitForFileTextAsync (line 96) | private static async Task WaitForFileTextAsync(string path, string exp...
method WaitForMessagesAsync (line 119) | private static async Task<IReadOnlyList<SessionEvent>> WaitForMessages...
FILE: dotnet/test/E2E/RpcTasksAndHandlersE2ETests.cs
class RpcTasksAndHandlersE2ETests (line 11) | public class RpcTasksAndHandlersE2ETests(E2ETestFixture fixture, ITestOu...
method AssertImplementedFailureAsync (line 14) | private static async Task AssertImplementedFailureAsync(Func<Task> act...
method Should_List_Task_State_And_Return_False_For_Missing_Task_Operations (line 20) | [Fact]
method Should_Report_Implemented_Error_For_Missing_Task_Agent_Type (line 39) | [Fact]
method Should_Return_Expected_Results_For_Missing_Pending_Handler_RequestIds (line 52) | [Fact]
FILE: dotnet/test/E2E/SessionConfigE2ETests.cs
class SessionConfigE2ETests (line 14) | public class SessionConfigE2ETests(E2ETestFixture fixture, ITestOutputHe...
method Vision_Disabled_Then_Enabled_Via_SetModel (line 24) | [Fact]
method Vision_Enabled_Then_Disabled_Via_SetModel (line 64) | [Fact]
method Should_Use_Custom_SessionId (line 104) | [Fact]
method Should_Forward_ClientName_In_UserAgent (line 123) | [Fact]
method Should_Forward_Custom_Provider_Headers_On_Create (line 139) | [Fact]
method Should_Forward_Custom_Provider_Headers_On_Resume (line 158) | [Fact]
method Should_Use_WorkingDirectory_For_Tool_Execution (line 180) | [Fact]
method Should_Apply_WorkingDirectory_On_Session_Resume (line 202) | [Fact]
method Should_Apply_SystemMessage_On_Session_Resume (line 227) | [Fact]
method Should_Apply_AvailableTools_On_Session_Resume (line 252) | [Fact]
method Should_Create_Session_With_Custom_Provider_Config (line 271) | [Fact]
method Should_Accept_Blob_Attachments (line 298) | [Fact]
method Should_Accept_Message_Attachments (line 327) | [Fact]
method HasImageUrlContent (line 355) | private static bool HasImageUrlContent(List<ChatCompletionMessage> mes...
method CreateProxyProvider (line 365) | private ProviderConfig CreateProxyProvider(string headerValue)
method AssertHeaderContains (line 379) | private static void AssertHeaderContains(
method HeaderValueAsString (line 395) | private static string HeaderValueAsString(JsonElement value)
FILE: dotnet/test/E2E/SessionE2ETests.cs
class SessionE2ETests (line 14) | public class SessionE2ETests(E2ETestFixture fixture, ITestOutputHelper o...
method ShouldCreateAndDisconnectSessions (line 16) | [Fact]
method Should_Have_Stateful_Conversation (line 34) | [Fact]
method Should_Create_A_Session_With_Appended_SystemMessage_Config (line 48) | [Fact]
method Should_Create_A_Session_With_Replaced_SystemMessage_Config (line 72) | [Fact]
method Should_Create_A_Session_With_Customized_SystemMessage_Config (line 94) | [Fact]
method Should_Create_A_Session_With_AvailableTools (line 125) | [Fact]
method Should_Create_A_Session_With_ExcludedTools (line 145) | [Fact]
method Should_Create_A_Session_With_DefaultAgent_ExcludedTools (line 165) | [Fact]
method Should_Create_Session_With_Custom_Tool (line 193) | [Fact]
method Should_Resume_A_Session_Using_The_Same_Client (line 213) | [Fact]
method Should_Resume_A_Session_Using_A_New_Client (line 237) | [Fact]
method Should_Throw_Error_When_Resuming_Non_Existent_Session (line 267) | [Fact]
method Should_Abort_A_Session (line 274) | [Fact]
method Should_Receive_Session_Events (line 309) | [Fact]
method Send_Returns_Immediately_While_Events_Stream_In_Background (line 382) | [Fact]
method SendAndWait_Blocks_Until_Session_Idle_And_Returns_Final_Assistant_Message (line 407) | [Fact]
method Should_List_Sessions_With_Context (line 424) | [Fact]
method Should_Get_Session_Metadata_By_Id (line 449) | [Fact]
method SendAndWait_Throws_On_Timeout (line 473) | [Fact]
method SendAndWait_Throws_OperationCanceledException_When_Token_Cancelled (line 492) | [Fact]
method Should_Create_Session_With_Custom_Config_Dir (line 523) | [Fact]
method Should_Set_Model_On_Existing_Session (line 538) | [Fact]
method Should_Set_Model_With_ReasoningEffort (line 553) | [Fact]
method Should_Log_Messages_At_Various_Levels (line 567) | [Fact]
method Handler_Exception_Does_Not_Halt_Event_Delivery (line 603) | [Fact]
method DisposeAsync_From_Handler_Does_Not_Deadlock (line 630) | [Fact]
method Should_Accept_Blob_Attachments (line 651) | [Fact]
method Should_Send_With_File_Attachment (line 676) | [Fact]
method Should_Send_With_Directory_Attachment (line 706) | [Fact]
method Should_Send_With_Selection_Attachment (line 734) | [Fact]
method Should_Send_With_Github_Reference_Attachment (line 772) | [Fact]
method Should_Send_With_Mode_Property (line 802) | [Fact]
method Should_Send_With_Custom_RequestHeaders (line 819) | [Fact]
method Should_Create_Session_With_Custom_Provider (line 842) | [Fact]
method Should_Create_Session_With_Azure_Provider (line 867) | [Fact]
method Should_Resume_Session_With_Custom_Provider (line 896) | [Fact]
method WaitForAsync (line 926) | private static async Task WaitForAsync(Func<bool> condition, TimeSpan ...
method WaitForAsync (line 942) | private static async Task WaitForAsync(Func<Task<bool>> condition, Tim...
FILE: dotnet/test/E2E/SessionFsE2ETests.cs
class SessionFsE2ETests (line 13) | public class SessionFsE2ETests(E2ETestFixture fixture, ITestOutputHelper...
method Should_Route_File_Operations_Through_The_Session_Fs_Provider (line 23) | [Fact]
method Should_Load_Session_Data_From_Fs_Provider_On_Resume (line 52) | [Fact]
method Should_Reject_SetProvider_When_Sessions_Already_Exist (line 91) | [Fact]
method Should_Map_All_SessionFs_Handler_Operations (line 140) | [Fact]
method SessionFsProvider_Converts_Exceptions_To_Rpc_Errors (line 274) | [Fact]
method Should_Map_Large_Output_Handling_Into_SessionFs (line 305) | [Fact]
method Should_Succeed_With_Compaction_While_Using_SessionFs (line 350) | [Fact]
method Should_Write_Workspace_Metadata_Via_SessionFs (line 389) | [Fact]
method Should_Persist_Plan_Md_Via_SessionFs (line 420) | [Fact]
method CreateSessionFsClient (line 449) | private CopilotClient CreateSessionFsClient(string providerRoot, bool ...
method FindToolCallResult (line 460) | private static string? FindToolCallResult(IReadOnlyList<SessionEvent> ...
method CreateProviderRoot (line 478) | private static string CreateProviderRoot()
method CreateSessionStatePath (line 481) | private static string CreateSessionStatePath()
method GetStoredPath (line 492) | private static string GetStoredPath(string providerRoot, string sessio...
method WaitForConditionAsync (line 504) | private static async Task WaitForConditionAsync(Func<bool> condition, ...
method WaitForConditionAsync (line 509) | private static async Task WaitForConditionAsync(Func<Task<bool>> condi...
method ReadAllTextSharedAsync (line 544) | private static async Task<string> ReadAllTextSharedAsync(string path, ...
method TryDeleteDirectoryAsync (line 551) | private static async Task TryDeleteDirectoryAsync(string path)
method NormalizeRelativePathSegment (line 598) | private static string NormalizeRelativePathSegment(string segment, str...
class ThrowingSessionFsProvider (line 614) | private sealed class ThrowingSessionFsProvider(Exception exception) : ...
method ReadFileAsync (line 616) | protected override Task<string> ReadFileAsync(string path, Cancellat...
method WriteFileAsync (line 619) | protected override Task WriteFileAsync(string path, string content, ...
method AppendFileAsync (line 622) | protected override Task AppendFileAsync(string path, string content,...
method ExistsAsync (line 625) | protected override Task<bool> ExistsAsync(string path, CancellationT...
method StatAsync (line 628) | protected override Task<SessionFsStatResult> StatAsync(string path, ...
method MkdirAsync (line 631) | protected override Task MkdirAsync(string path, bool recursive, int?...
method ReaddirAsync (line 634) | protected override Task<IList<string>> ReaddirAsync(string path, Can...
method ReaddirWithTypesAsync (line 637) | protected override Task<IList<SessionFsReaddirWithTypesEntry>> Readd...
method RmAsync (line 640) | protected override Task RmAsync(string path, bool recursive, bool fo...
method RenameAsync (line 643) | protected override Task RenameAsync(string src, string dest, Cancell...
class TestSessionFsHandler (line 647) | private sealed class TestSessionFsHandler(string sessionId, string roo...
method ReadFileAsync (line 649) | protected override async Task<string> ReadFileAsync(string path, Can...
method WriteFileAsync (line 654) | protected override async Task WriteFileAsync(string path, string con...
method AppendFileAsync (line 661) | protected override async Task AppendFileAsync(string path, string co...
method ExistsAsync (line 668) | protected override Task<bool> ExistsAsync(string path, CancellationT...
method StatAsync (line 674) | protected override Task<SessionFsStatResult> StatAsync(string path, ...
method MkdirAsync (line 706) | protected override Task MkdirAsync(string path, bool recursive, int?...
method ReaddirAsync (line 712) | protected override Task<IList<string>> ReaddirAsync(string path, Can...
method ReaddirWithTypesAsync (line 723) | protected override Task<IList<SessionFsReaddirWithTypesEntry>> Readd...
method RmAsync (line 736) | protected override Task RmAsync(string path, bool recursive, bool fo...
method RenameAsync (line 760) | protected override Task RenameAsync(string src, string dest, Cancell...
method ResolvePath (line 778) | private string ResolvePath(string sessionPath)
FILE: dotnet/test/E2E/SessionLifecycleE2ETests.cs
class SessionLifecycleE2ETests (line 17) | public class SessionLifecycleE2ETests(E2ETestFixture fixture, ITestOutpu...
method Should_List_Created_Sessions_After_Sending_A_Message (line 20) | [Fact]
method Should_Delete_Session_Permanently (line 47) | [Fact]
method Should_Return_Events_Via_GetMessages_After_Conversation (line 71) | [Fact]
method Should_Support_Multiple_Concurrent_Sessions (line 93) | [Fact]
method WaitForAsync (line 121) | private static async Task WaitForAsync(Func<Task<bool>> condition, Tim...
FILE: dotnet/test/E2E/SessionMcpAndAgentConfigE2ETests.cs
class SessionMcpAndAgentConfigE2ETests (line 11) | public class SessionMcpAndAgentConfigE2ETests(E2ETestFixture fixture, IT...
method Should_Accept_MCP_Server_Configuration_On_Session_Create (line 13) | [Fact]
method Should_Accept_MCP_Server_Configuration_On_Session_Resume (line 43) | [Fact]
method Should_Handle_Multiple_MCP_Servers (line 76) | [Fact]
method Should_Accept_Custom_Agent_Configuration_On_Session_Create (line 104) | [Fact]
method Should_Accept_Custom_Agent_Configuration_On_Session_Resume (line 136) | [Fact]
method Should_Handle_Custom_Agent_With_Tools_Configuration (line 170) | [Fact]
method Should_Handle_Custom_Agent_With_MCP_Servers (line 195) | [Fact]
method Should_Handle_Multiple_Custom_Agents (line 227) | [Fact]
method Should_Pass_Literal_Env_Values_To_Mcp_Server_Subprocess (line 258) | [Fact]
method Should_Accept_Both_MCP_Servers_And_Custom_Agents (line 293) | [Fact]
method FindTestHarnessDir (line 335) | private static string FindTestHarnessDir()
FILE: dotnet/test/E2E/SkillsE2ETests.cs
class SkillsE2ETests (line 10) | public class SkillsE2ETests : E2ETestBase
method SkillsE2ETests (line 16) | public SkillsE2ETests(E2ETestFixture fixture, ITestOutputHelper output...
method CreateSkillDir (line 27) | private string CreateSkillDir()
method CreateSkill (line 51) | private static void CreateSkill(string skillsDir, string name, string ...
method Should_Load_And_Apply_Skill_From_SkillDirectories (line 68) | [Fact]
method Should_Not_Apply_Skill_When_Disabled_Via_DisabledSkills (line 87) | [Fact]
method Should_Control_Ambient_Project_Skills_With_EnableConfigDiscovery (line 107) | [Fact]
method Should_Allow_Agent_With_Skills_To_Invoke_Skill (line 142) | [Fact]
method Should_Not_Provide_Skills_To_Agent_Without_Skills_Field (line 174) | [Fact]
method Should_Apply_Skill_On_Session_Resume_With_SkillDirectories (line 205) | [Fact(Skip = "See the big comment around the equivalent test in the No...
FILE: dotnet/test/E2E/StreamingFidelityE2ETests.cs
class StreamingFidelityE2ETests (line 11) | public class StreamingFidelityE2ETests(E2ETestFixture fixture, ITestOutp...
method Should_Produce_Delta_Events_When_Streaming_Is_Enabled (line 13) | [Fact]
method Should_Not_Produce_Deltas_When_Streaming_Is_Disabled (line 49) | [Fact]
method Should_Produce_Deltas_After_Session_Resume (line 74) | [Fact]
method Should_Emit_AssistantMessageStart_Before_Deltas_With_Matching_MessageId (line 109) | [Fact]
FILE: dotnet/test/E2E/SuspendE2ETests.cs
class SuspendE2ETests (line 30) | public class SuspendE2ETests(E2ETestFixture fixture, ITestOutputHelper o...
method Should_Suspend_Idle_Session_Without_Throwing (line 35) | [Fact]
method Should_Allow_Resume_And_Continue_Conversation_After_Suspend (line 50) | [Fact]
method Should_Cancel_Pending_Permission_Request_When_Suspending (line 94) | [Fact]
method Should_Reject_Pending_External_Tool_When_Suspending (line 161) | [Fact]
method GetCliUrl (line 220) | private static string GetCliUrl(CopilotClient client)
FILE: dotnet/test/E2E/SystemMessageTransformE2ETests.cs
class SystemMessageTransformE2ETests (line 11) | public class SystemMessageTransformE2ETests(E2ETestFixture fixture, ITes...
method Should_Invoke_Transform_Callbacks_With_Section_Content (line 13) | [Fact]
method Should_Apply_Transform_Modifications_To_Section_Content (line 62) | [Fact]
method Should_Work_With_Static_Overrides_And_Transforms_Together (line 100) | [Fact]
FILE: dotnet/test/E2E/TelemetryExportE2ETests.cs
class TelemetryExportE2ETests (line 13) | public class TelemetryExportE2ETests(E2ETestFixture fixture, ITestOutput...
method Should_Export_File_Telemetry_For_Sdk_Interactions (line 16) | [Fact]
method ReadTelemetryEntriesAsync (line 92) | private static async Task<IReadOnlyList<JsonElement>> ReadTelemetryEnt...
method GetTraceId (line 134) | private static string? GetTraceId(JsonElement entry) => GetStringPrope...
method GetSpanId (line 136) | private static string? GetSpanId(JsonElement entry) => GetStringProper...
method GetParentSpanId (line 138) | private static string? GetParentSpanId(JsonElement entry) => GetString...
method IsRootSpan (line 140) | private static bool IsRootSpan(JsonElement entry)
method GetStatusCode (line 148) | private static int GetStatusCode(JsonElement entry)
method AssertSpanWithOperation (line 155) | private static JsonElement AssertSpanWithOperation(IEnumerable<JsonEle...
method IsSpanWithOperation (line 162) | private static bool IsSpanWithOperation(JsonElement span, string opera...
method GetTypeName (line 167) | private static string? GetTypeName(JsonElement entry) => GetStringProp...
method GetInstrumentationScopeName (line 169) | private static string? GetInstrumentationScopeName(JsonElement entry)
method GetStringAttribute (line 176) | private static string? GetStringAttribute(JsonElement entry, string name)
method GetStringProperty (line 187) | private static string? GetStringProperty(JsonElement entry, string name)
method GetStringValue (line 192) | private static string? GetStringValue(JsonElement value)
FILE: dotnet/test/E2E/ToolResultsE2ETests.cs
class ToolResultsE2ETests (line 15) | public partial class ToolResultsE2ETests(E2ETestFixture fixture, ITestOu...
class ToolResultsJsonContext (line 17) | [JsonSourceGenerationOptions(JsonSerializerDefaults.Web)]
method Should_Handle_Structured_ToolResultObject_From_Custom_Tool (line 23) | [Fact]
method Should_Handle_Tool_Result_With_Failure_ResultType (line 50) | [Fact]
method Should_Preserve_ToolTelemetry_And_Not_Stringify_Structured_Results_For_LLM (line 78) | [Fact]
FILE: dotnet/test/E2E/ToolsE2ETests.cs
class ToolsE2ETests (line 17) | public partial class ToolsE2ETests(E2ETestFixture fixture, ITestOutputHe...
method Invokes_Built_In_Tools (line 19) | [Fact]
method Invokes_Custom_Tool (line 41) | [Fact]
method Handles_Tool_Calling_Errors (line 64) | [Fact]
method Can_Receive_And_Return_Complex_Types (line 108) | [Fact]
type DbQueryOptions (line 147) | record DbQueryOptions(string Table, int[] Ids, bool SortAscending);
type City (line 148) | record City(int CountryId, string CityName, int Population);
class ToolsTestsJsonContext (line 150) | [JsonSourceGenerationOptions(JsonSerializerDefaults.Web)]
method Overrides_Built_In_Tool_With_Custom_Tool (line 156) | [Fact]
method SkipPermission_Sent_In_Tool_Definition (line 184) | [Fact]
method Can_Return_Binary_Result (line 220) | [Fact(Skip = "Behaves as if no content was in the result. Likely that ...
method Invokes_Custom_Tool_With_Permission_Handler (line 251) | [Fact]
method Denies_Custom_Tool_When_Permission_Denied (line 285) | [Fact]
FILE: dotnet/test/Harness/CapiProxy.cs
class CapiProxy (line 15) | public sealed partial class CapiProxy : IAsyncDisposable
method StartAsync (line 20) | public Task<string> StartAsync()
method StopAsync (line 91) | public async Task StopAsync(bool skipWritingCache = false)
method ConfigureAsync (line 115) | public async Task ConfigureAsync(string filePath, string workDir)
type ConfigureRequest (line 124) | private record ConfigureRequest(string FilePath, string WorkDir);
method GetExchangesAsync (line 126) | public async Task<List<ParsedHttpExchange>> GetExchangesAsync()
method SetCopilotUserByTokenAsync (line 135) | public async Task SetCopilotUserByTokenAsync(string token, CopilotUser...
method DisposeAsync (line 145) | public async ValueTask DisposeAsync()
method FindRepoRoot (line 150) | private static string FindRepoRoot()
class CapiProxyJsonContext (line 162) | [JsonSourceGenerationOptions(JsonSerializerDefaults.Web)]
type CopilotUserByTokenRequest (line 170) | public record CopilotUserByTokenRequest(string Token, CopilotUserConfig ...
type CopilotUserConfig (line 172) | public record CopilotUserConfig(
type CopilotUserEndpoints (line 183) | public record CopilotUserEndpoints(string Api, string Telemetry);
type CopilotUserQuotaSnapshot (line 185) | public record CopilotUserQuotaSnapshot(
type ParsedHttpExchange (line 201) | public record ParsedHttpExchange(
type ChatCompletionRequest (line 206) | public record ChatCompletionRequest(
type ChatCompletionMessage (line 211) | public record ChatCompletionMessage(
type ChatCompletionToolCall (line 224) | public record ChatCompletionToolCall(string Id, string Type, ChatComplet...
type ChatCompletionToolCallFunction (line 226) | public record ChatCompletionToolCallFunction(string Name, string? Argume...
type ChatCompletionTool (line 228) | public record ChatCompletionTool(string Type, ChatCompletionToolFunction...
type ChatCompletionToolFunction (line 230) | public record ChatCompletionToolFunction(string Name, string? Description);
type ChatCompletionResponse (line 232) | public record ChatCompletionResponse(string Id, string Model, List<ChatC...
type ChatCompletionChoice (line 234) | public record ChatCompletionChoice(int Index, ChatCompletionMessage Mess...
FILE: dotnet/test/Harness/E2ETestBase.cs
class E2ETestBase (line 14) | public abstract class E2ETestBase : IClassFixture<E2ETestFixture>, IAsyn...
method E2ETestBase (line 23) | protected E2ETestBase(E2ETestFixture fixture, string snapshotCategory,...
class XunitLogger (line 38) | private sealed class XunitLogger(ITestOutputHelper output) : ILogger
method BeginScope (line 40) | public IDisposable? BeginScope<TState>(TState state) where TState : ...
method IsEnabled (line 41) | public bool IsEnabled(LogLevel logLevel) => logLevel >= LogLevel.War...
method Log (line 42) | public void Log<TState>(LogLevel logLevel, EventId eventId, TState s...
method GetTestName (line 50) | private static string GetTestName(ITestOutputHelper output)
method InitializeAsync (line 59) | public async Task InitializeAsync()
method DisposeAsync (line 64) | public Task DisposeAsync()
method CreateSessionAsync (line 73) | protected Task<CopilotSession> CreateSessionAsync(SessionConfig? confi...
method ResumeSessionAsync (line 84) | protected Task<CopilotSession> ResumeSessionAsync(string sessionId, Re...
method GetSystemMessage (line 91) | protected static string GetSystemMessage(ParsedHttpExchange exchange)
method GetToolNames (line 96) | protected static List<string> GetToolNames(ParsedHttpExchange exchange)
FILE: dotnet/test/Harness/E2ETestContext.cs
class E2ETestContext (line 11) | public sealed class E2ETestContext : IAsyncDisposable
method E2ETestContext (line 23) | private E2ETestContext(string homeDir, string workDir, string proxyUrl...
method CreateAsync (line 32) | public static async Task<E2ETestContext> CreateAsync()
method ResolveSymlinks (line 61) | private static string ResolveSymlinks(string path)
method FindRepoRoot (line 115) | private static string FindRepoRoot()
method GetCliPath (line 127) | private static string GetCliPath(string repoRoot)
method ConfigureForTestAsync (line 139) | public async Task ConfigureForTestAsync(string testFile, [CallerMember...
method GetExchangesAsync (line 148) | public Task<List<ParsedHttpExchange>> GetExchangesAsync()
method SetCopilotUserByTokenAsync (line 153) | public Task SetCopilotUserByTokenAsync(string token, CopilotUserConfig...
method GetEnvironment (line 158) | public IReadOnlyDictionary<string, string> GetEnvironment()
method CreateClient (line 172) | public CopilotClient CreateClient(bool useStdio = true, CopilotClientO...
method DisposeAsync (line 197) | public async ValueTask DisposeAsync()
FILE: dotnet/test/Harness/E2ETestFixture.cs
class E2ETestFixture (line 10) | public class E2ETestFixture : IAsyncLifetime
method InitializeAsync (line 15) | public async Task InitializeAsync()
method DisposeAsync (line 21) | public async Task DisposeAsync()
FILE: dotnet/test/Harness/TestHelper.cs
class TestHelper (line 7) | public static class TestHelper
method GetFinalAssistantMessageAsync (line 15) | public static async Task<AssistantMessageEvent?> GetFinalAssistantMess...
method GetExistingMessagesAsync (line 91) | private static async Task<(AssistantMessageEvent? Final, bool SawIdle)...
method GetNextEventOfTypeAsync (line 115) | public static async Task<T> GetNextEventOfTypeAsync<T>(
FILE: dotnet/test/Unit/CloneTests.cs
class CloneTests (line 10) | public class CloneTests
method CopilotClientOptions_Clone_CopiesAllProperties (line 12) | [Fact]
method CopilotClientOptions_Clone_CollectionsAreIndependent (line 49) | [Fact]
method CopilotClientOptions_Clone_EnvironmentIsShared (line 66) | [Fact]
method SessionConfig_Clone_CopiesAllProperties (line 77) | [Fact]
method SessionConfig_Clone_CollectionsAreIndependent (line 120) | [Fact]
method SessionConfig_Clone_PreservesMcpServersComparer (line 152) | [Fact]
method ResumeSessionConfig_Clone_CollectionsAreIndependent (line 163) | [Fact]
method ResumeSessionConfig_Clone_PreservesMcpServersComparer (line 195) | [Fact]
method MessageOptions_Clone_CopiesAllProperties (line 206) | [Fact]
method MessageOptions_Clone_AttachmentsAreIndependent (line 223) | [Fact]
method Clone_WithNullCollections_ReturnsNullCollections (line 238) | [Fact]
method SessionConfig_Clone_CopiesAgentProperty (line 256) | [Fact]
method ResumeSessionConfig_Clone_CopiesAgentProperty (line 270) | [Fact]
method ResumeSessionConfig_Clone_CopiesIncludeSubAgentStreamingEvents (line 284) | [Fact]
method ResumeSessionConfig_Clone_PreservesIncludeSubAgentStreamingEventsDefault (line 297) | [Fact]
method ResumeSessionConfig_Clone_CopiesContinuePendingWork (line 307) | [Fact]
method ResumeSessionConfig_Clone_PreservesContinuePendingWorkDefault (line 320) | [Fact]
FILE: dotnet/test/Unit/ForwardCompatibilityTests.cs
class ForwardCompatibilityTests (line 13) | public class ForwardCompatibilityTests
method FromJson_KnownEventType_DeserializesNormally (line 15) | [Fact]
method FromJson_UnknownEventType_ReturnsBaseSessionEvent (line 38) | [Fact]
method FromJson_UnknownEventType_PreservesBaseMetadata (line 59) | [Fact]
method FromJson_MultipleEvents_MixedKnownAndUnknown (line 79) | [Fact]
method FromJson_KnownEventType_WithExtraUnknownFields_IgnoresExtras (line 97) | [Fact]
method FromJson_KnownEventType_WithExtraUnknownEnvelopeFields_IgnoresExtras (line 124) | [Fact]
method FromJson_UnknownEventType_WithUnknownEnumInData_DoesNotThrow (line 146) | [Fact]
method FromJson_KnownEventType_WithNullOptionalFields_DoesNotThrow (line 169) | [Fact]
method FromJson_UnknownEventType_PreservesAgentIdNull (line 194) | [Fact]
FILE: dotnet/test/Unit/JsonRpcTests.cs
class JsonRpcTests (line 21) | public class JsonRpcTests
method JsonRpc_Handles_Positional_Named_And_Single_Object_Params (line 23) | [Fact]
method JsonRpc_Returns_Errors_For_Missing_Method_And_Invalid_Params (line 56) | [Fact]
method JsonRpc_Cancels_And_Disposes_Pending_Requests (line 82) | [Fact]
method GetRemoteErrorCode (line 97) | private static int GetRemoteErrorCode(Exception exception)
class NamedParams (line 104) | private sealed class NamedParams
class SingleObjectRequest (line 111) | private sealed class SingleObjectRequest
class SingleObjectResponse (line 116) | private sealed class SingleObjectResponse
class JsonRpcReflectionPair (line 121) | private sealed class JsonRpcReflectionPair : IDisposable
method JsonRpcReflectionPair (line 126) | private JsonRpcReflectionPair(InMemoryDuplexStream clientStream, InM...
method Create (line 138) | public static JsonRpcReflectionPair Create(bool startServer = true)
method StartListening (line 150) | public void StartListening() => Client.StartListening();
method Dispose (line 152) | public void Dispose()
class JsonRpcReflection (line 161) | private sealed class JsonRpcReflection : IDisposable
method JsonRpcReflection (line 173) | public JsonRpcReflection(Stream stream)
method StartListening (line 183) | public void StartListening() => JsonRpcType.GetMethod(nameof(StartLi...
method SetLocalRpcMethod (line 185) | public void SetLocalRpcMethod(string methodName, Delegate handler, b...
method InvokeAsync (line 188) | public async Task<T> InvokeAsync<T>(string methodName, object?[]? ar...
method Dispose (line 198) | public void Dispose() => ((IDisposable)_instance).Dispose();
class InMemoryDuplexStream (line 201) | private sealed class InMemoryDuplexStream : Stream
method CreatePair (line 219) | public static (InMemoryDuplexStream Client, InMemoryDuplexStream Ser...
method Flush (line 228) | public override void Flush()
method FlushAsync (line 232) | public override Task FlushAsync(CancellationToken cancellationToken)...
method Read (line 234) | public override int Read(byte[] buffer, int offset, int count) =>
method ReadAsync (line 237) | public override async ValueTask<int> ReadAsync(Memory<byte> destinat...
method Write (line 264) | public override void Write(byte[] buffer, int offset, int count) =>
method WriteAsync (line 267) | public override ValueTask WriteAsync(ReadOnlyMemory<byte> source, Ca...
method Seek (line 274) | public override long Seek(long offset, SeekOrigin origin) => throw n...
method SetLength (line 276) | public override void SetLength(long value) => throw new NotSupported...
method Dispose (line 278) | protected override void Dispose(bool disposing)
method Enqueue (line 293) | private void Enqueue(ReadOnlySpan<byte> source)
FILE: dotnet/test/Unit/PermissionRequestResultKindTests.cs
class PermissionRequestResultKindTests (line 10) | public class PermissionRequestResultKindTests
method WellKnownKinds_HaveExpectedValues (line 17) | [Fact]
method Equals_SameValue_ReturnsTrue (line 33) | [Fact]
method Equals_DifferentValue_ReturnsFalse (line 42) | [Fact]
method Equals_IsCaseInsensitive (line 49) | [Fact]
method GetHashCode_IsCaseInsensitive (line 56) | [Fact]
method ToString_ReturnsValue (line 63) | [Fact]
method CustomValue_IsPreserved (line 70) | [Fact]
method Constructor_NullValue_TreatedAsEmpty (line 78) | [Fact]
method Default_HasEmptyStringValue (line 85) | [Fact]
method Equals_NonPermissionRequestResultKindObject_ReturnsFalse (line 94) | [Fact]
method JsonSerialize_WritesStringValue (line 100) | [Fact]
method JsonDeserialize_ReadsStringValue (line 108) | [Fact]
method JsonRoundTrip_PreservesAllKinds (line 116) | [Fact]
method JsonRoundTrip_CustomValue (line 136) | [Fact]
class TestJsonContext (line 146) | [System.Text.Json.Serialization.JsonSerializable(typeof(PermissionReques...
FILE: dotnet/test/Unit/PublicDtoTests.cs
class PublicDtoTests (line 21) | public class PublicDtoTests
method Public_Dto_Properties_Can_Be_Set_And_Read (line 23) | [Fact]
method TryCreateSampleValue (line 64) | private static bool TryCreateSampleValue(Type type, HashSet<Type> visi...
method TryCreateGenericCollection (line 170) | private static bool TryCreateGenericCollection(Type type, HashSet<Type...
FILE: dotnet/test/Unit/SerializationTests.cs
class SerializationTests (line 14) | public class SerializationTests
method ProviderConfig_CanSerializeHeaders_WithSdkOptions (line 16) | [Fact]
method MessageOptions_CanSerializeRequestHeaders_WithSdkOptions (line 38) | [Fact]
method SendMessageRequest_CanSerializeRequestHeaders_WithSdkOptions (line 63) | [Fact]
method McpHttpServerConfig_CanSerializeOauthOptions_WithSdkOptions (line 84) | [Fact]
method GetSerializerOptions (line 122) | private static JsonSerializerOptions GetSerializerOptions()
method GetNestedType (line 133) | private static Type GetNestedType(Type containingType, string name)
method CreateInternalRequest (line 140) | private static object CreateInternalRequest(Type type, params (string ...
FILE: dotnet/test/Unit/SessionEventSerializationTests.cs
class SessionEventSerializationTests (line 11) | public class SessionEventSerializationTests
method ParseJsonElement (line 183) | private static JsonElement ParseJsonElement(string json)
method SessionEvent_ToJson_RoundTrips_JsonElementBackedPayloads (line 189) | [Theory]
FILE: dotnet/test/Unit/TelemetryTests.cs
class TelemetryTests (line 11) | public class TelemetryTests
method TelemetryConfig_DefaultValues_AreNull (line 13) | [Fact]
method TelemetryConfig_CanSetAllProperties (line 25) | [Fact]
method CopilotClientOptions_Telemetry_DefaultsToNull (line 44) | [Fact]
method CopilotClientOptions_Clone_CopiesTelemetry (line 52) | [Fact]
method TelemetryHelpers_Restores_W3C_Trace_Context (line 67) | [Fact]
method InvokeTelemetryHelper (line 92) | private static T InvokeTelemetryHelper<T>(string name, params object?[...
FILE: go/client.go
constant noResultPermissionV2Error (line 54) | noResultPermissionV2Error = "permission handlers cannot return 'no-resul...
function validateSessionFsConfig (line 56) | func validateSessionFsConfig(config *SessionFsConfig) error {
type Client (line 91) | type Client struct
method Start (line 303) | func (c *Client) Start(ctx context.Context) error {
method Stop (line 372) | func (c *Client) Stop() error {
method ForceStop (line 454) | func (c *Client) ForceStop() {
method ensureConnected (line 502) | func (c *Client) ensureConnected(ctx context.Context) error {
method CreateSession (line 572) | func (c *Client) CreateSession(ctx context.Context, config *SessionCon...
method ResumeSession (line 720) | func (c *Client) ResumeSession(ctx context.Context, sessionID string, ...
method ResumeSessionWithOptions (line 735) | func (c *Client) ResumeSessionWithOptions(ctx context.Context, session...
method ListSessions (line 893) | func (c *Client) ListSessions(ctx context.Context, filter *SessionList...
method GetSessionMetadata (line 929) | func (c *Client) GetSessionMetadata(ctx context.Context, sessionID str...
method DeleteSession (line 960) | func (c *Client) DeleteSession(ctx context.Context, sessionID string) ...
method GetLastSessionID (line 1007) | func (c *Client) GetLastSessionID(ctx context.Context) (*string, error) {
method GetForegroundSessionID (line 1039) | func (c *Client) GetForegroundSessionID(ctx context.Context) (*string,...
method SetForegroundSessionID (line 1067) | func (c *Client) SetForegroundSessionID(ctx context.Context, sessionID...
method On (line 1106) | func (c *Client) On(handler SessionLifecycleHandler) func() {
method OnEventType (line 1133) | func (c *Client) OnEventType(eventType SessionLifecycleEventType, hand...
method handleLifecycleEvent (line 1156) | func (c *Client) handleLifecycleEvent(event SessionLifecycleEvent) {
method State (line 1199) | func (c *Client) State() ConnectionState {
method ActualPort (line 1207) | func (c *Client) ActualPort() int {
method Ping (line 1224) | func (c *Client) Ping(ctx context.Context, message string) (*PingRespo...
method GetStatus (line 1242) | func (c *Client) GetStatus(ctx context.Context) (*GetStatusResponse, e...
method GetAuthStatus (line 1260) | func (c *Client) GetAuthStatus(ctx context.Context) (*GetAuthStatusRes...
method ListModels (line 1281) | func (c *Client) ListModels(ctx context.Context) ([]ModelInfo, error) {
method verifyProtocolVersion (line 1334) | func (c *Client) verifyProtocolVersion(ctx context.Context) error {
method startCLIServer (line 1358) | func (c *Client) startCLIServer(ctx context.Context) error {
method killProcess (line 1527) | func (c *Client) killProcess() error {
method monitorProcess (line 1542) | func (c *Client) monitorProcess() {
method connectToServer (line 1561) | func (c *Client) connectToServer(ctx context.Context) error {
method connectViaTcp (line 1572) | func (c *Client) connectViaTcp(ctx context.Context) error {
method setupNotificationHandler (line 1614) | func (c *Client) setupNotificationHandler() {
method handleSessionEvent (line 1633) | func (c *Client) handleSessionEvent(req sessionEventRequest) {
method handleUserInputRequest (line 1648) | func (c *Client) handleUserInputRequest(req userInputRequest) (*userIn...
method handleHooksInvoke (line 1673) | func (c *Client) handleHooksInvoke(req hooksInvokeRequest) (map[string...
method handleSystemMessageTransform (line 1698) | func (c *Client) handleSystemMessageTransform(req systemMessageTransfo...
method handleToolCallRequestV2 (line 1748) | func (c *Client) handleToolCallRequestV2(req toolCallRequestV2) (*tool...
method handlePermissionRequestV2 (line 1794) | func (c *Client) handlePermissionRequestV2(req permissionRequestV2) (*...
function NewClient (line 138) | func NewClient(options *ClientOptions) *Client {
function getEnvValue (line 243) | func getEnvValue(env []string, key string) string {
function parseCliUrl (line 257) | func parseCliUrl(url string) (string, int) {
function extractTransformCallbacks (line 544) | func extractTransformCallbacks(config *SystemMessageConfig) (*SystemMess...
constant minProtocolVersion (line 1330) | minProtocolVersion = 2
type toolCallRequestV2 (line 1722) | type toolCallRequestV2 struct
type toolCallResponseV2 (line 1732) | type toolCallResponseV2 struct
type permissionRequestV2 (line 1737) | type permissionRequestV2 struct
type permissionResponseV2 (line 1743) | type permissionResponseV2 struct
FILE: go/client_test.go
function TestClient_URLParsing (line 18) | func TestClient_URLParsing(t *testing.T) {
function TestClient_SessionFsConfig (line 228) | func TestClient_SessionFsConfig(t *testing.T) {
function TestClient_AuthOptions (line 270) | func TestClient_AuthOptions(t *testing.T) {
function TestClient_EnvOptions (line 347) | func TestClient_EnvOptions(t *testing.T) {
function TestClient_SessionIdleTimeoutSeconds (line 394) | func TestClient_SessionIdleTimeoutSeconds(t *testing.T) {
function findCLIPathForTest (line 414) | func findCLIPathForTest() string {
function fileExistsForTest (line 422) | func fileExistsForTest(path string) bool {
function TestCreateSessionRequest_ClientName (line 427) | func TestCreateSessionRequest_ClientName(t *testing.T) {
function TestResumeSessionRequest_ClientName (line 454) | func TestResumeSessionRequest_ClientName(t *testing.T) {
function TestCreateSessionRequest_Agent (line 481) | func TestCreateSessionRequest_Agent(t *testing.T) {
function TestResumeSessionRequest_Agent (line 508) | func TestResumeSessionRequest_Agent(t *testing.T) {
function TestOverridesBuiltInTool (line 535) | func TestOverridesBuiltInTool(t *testing.T) {
function TestClient_CreateSession_RequiresPermissionHandler (line 576) | func TestClient_CreateSession_RequiresPermissionHandler(t *testing.T) {
function TestClient_ResumeSession_RequiresPermissionHandler (line 602) | func TestClient_ResumeSession_RequiresPermissionHandler(t *testing.T) {
function TestListModelsWithCustomHandler (line 616) | func TestListModelsWithCustomHandler(t *testing.T) {
function TestListModelsHandlerCachesResults (line 648) | func TestListModelsHandlerCachesResults(t *testing.T) {
function TestClient_StartContextCancellationDoesNotKillProcess (line 675) | func TestClient_StartContextCancellationDoesNotKillProcess(t *testing.T) {
function TestClient_StartStopRace (line 701) | func TestClient_StartStopRace(t *testing.T) {
function TestCreateSessionRequest_Commands (line 742) | func TestCreateSessionRequest_Commands(t *testing.T) {
function TestResumeSessionRequest_Commands (line 785) | func TestResumeSessionRequest_Commands(t *testing.T) {
function TestCreateSessionRequest_RequestElicitation (line 825) | func TestCreateSessionRequest_RequestElicitation(t *testing.T) {
function TestResumeSessionRequest_RequestElicitation (line 854) | func TestResumeSessionRequest_RequestElicitation(t *testing.T) {
function TestResumeSessionRequest_ContinuePendingWork (line 884) | func TestResumeSessionRequest_ContinuePendingWork(t *testing.T) {
function TestCreateSessionRequest_IncludeSubAgentStreamingEvents (line 914) | func TestCreateSessionRequest_IncludeSubAgentStreamingEvents(t *testing....
function TestResumeSessionRequest_IncludeSubAgentStreamingEvents (line 950) | func TestResumeSessionRequest_IncludeSubAgentStreamingEvents(t *testing....
function TestCreateSessionResponse_Capabilities (line 988) | func TestCreateSessionResponse_Capabilities(t *testing.T) {
FILE: go/cmd/bundler/main.go
constant sdkModule (line 36) | sdkModule = "github.com/github/copilot-sdk/go"
constant packageLockURLFmt (line 37) | packageLockURLFmt = "https://raw.githubusercontent.com/github/copilot-sd...
constant tarballURLFmt (line 38) | tarballURLFmt = "https://registry.npmjs.org/@github/copilot-%s/-/cop...
constant licenseTarballFmt (line 39) | licenseTarballFmt = "https://registry.npmjs.org/@github/copilot/-/copilo...
type platformInfo (line 43) | type platformInfo struct
function main (line 59) | func main() {
function resolvePlatform (line 113) | func resolvePlatform(platform string) (string, string, platformInfo, err...
function resolveCLIVersion (line 126) | func resolveCLIVersion(flagValue string) string {
function defaultOutputFileName (line 141) | func defaultOutputFileName(version, goos, goarch, binaryName string) str...
function validPlatforms (line 148) | func validPlatforms() []string {
function detectCLIVersion (line 160) | func detectCLIVersion() (string, error) {
function getSDKVersion (line 179) | func getSDKVersion() (string, error) {
function fetchCLIVersionFromRepo (line 198) | func fetchCLIVersionFromRepo(sdkVersion string) (string, error) {
function isHex (line 247) | func isHex(s string) bool {
function buildBundle (line 257) | func buildBundle(info platformInfo, cliVersion, outputPath string) (stri...
function generateGoFile (line 311) | func generateGoFile(goos, goarch, binaryPath, cliVersion string, sha256H...
function downloadCLIBinary (line 378) | func downloadCLIBinary(npmPlatform, binaryName, cliVersion, destDir stri...
function downloadCLILicense (line 437) | func downloadCLILicense(cliVersion, outputPath string) error {
function licensePathForOutput (line 486) | func licensePathForOutput(outputPath string) string {
function licenseFileName (line 493) | func licenseFileName(binaryName string) string {
function extractFileFromTarballStream (line 501) | func extractFileFromTarballStream(r io.Reader, destDir, outputName strin...
function extractFileFromTarball (line 517) | func extractFileFromTarball(tarballPath, destDir, targetPath, outputName...
function compressZstdFile (line 565) | func compressZstdFile(src, dst string) error {
function sha256FileFromCompressed (line 591) | func sha256FileFromCompressed(path string) ([]byte, error) {
function sha256File (line 612) | func sha256File(path string) ([]byte, error) {
function ensureZstdDependency (line 627) | func ensureZstdDependency() error {
function checkEmbeddedVersion (line 637) | func checkEmbeddedVersion(detectedVersion, goos, goarch, outputDir strin...
FILE: go/definetool.go
function DefineTool (line 31) | func DefineTool[T any, U any](name, description string, handler func(T, ...
function createTypedHandler (line 44) | func createTypedHandler[T any, U any](handler func(T, ToolInvocation) (U...
function normalizeResult (line 71) | func normalizeResult(result any) (ToolResult, error) {
function ConvertMCPCallToolResult (line 108) | func ConvertMCPCallToolResult(value any) (ToolResult, bool) {
function generateSchemaForType (line 204) | func generateSchemaForType(t reflect.Type) map[string]any {
FILE: go/definetool_test.go
function TestDefineTool (line 9) | func TestDefineTool(t *testing.T) {
function TestNormalizeResult (line 148) | func TestNormalizeResult(t *testing.T) {
function TestConvertMCPCallToolResult (line 256) | func TestConvertMCPCallToolResult(t *testing.T) {
function TestGenerateSchemaForType (line 436) | func TestGenerateSchemaForType(t *testing.T) {
FILE: go/embeddedcli/installer.go
function Setup (line 15) | func Setup(cfg Config) {
FILE: go/generated_session_events.go
type SessionEventData (line 12) | type SessionEventData interface
type RawSessionEventData (line 17) | type RawSessionEventData struct
method sessionEventData (line 21) | func (RawSessionEventData) sessionEventData() {}
method MarshalJSON (line 24) | func (r RawSessionEventData) MarshalJSON() ([]byte, error) { return r....
type SessionEvent (line 27) | type SessionEvent struct
method Marshal (line 52) | func (r *SessionEvent) Marshal() ([]byte, error) {
method UnmarshalJSON (line 56) | func (e *SessionEvent) UnmarshalJSON(data []byte) error {
method MarshalJSON (line 552) | func (e SessionEvent) MarshalJSON() ([]byte, error) {
function UnmarshalSessionEvent (line 45) | func UnmarshalSessionEvent(data []byte) (SessionEvent, error) {
type SessionEventType (line 574) | type SessionEventType
constant SessionEventTypeSessionStart (line 577) | SessionEventTypeSessionStart SessionEventType = "sessio...
constant SessionEventTypeSessionResume (line 578) | SessionEventTypeSessionResume SessionEventType = "sessio...
constant SessionEventTypeSessionRemoteSteerableChanged (line 579) | SessionEventTypeSessionRemoteSteerableChanged SessionEventType = "sessio...
constant SessionEventTypeSessionError (line 580) | SessionEventTypeSessionError SessionEventType = "sessio...
constant SessionEventTypeSessionIdle (line 581) | SessionEventTypeSessionIdle SessionEventType = "sessio...
constant SessionEventTypeSessionTitleChanged (line 582) | SessionEventTypeSessionTitleChanged SessionEventType = "sessio...
constant SessionEventTypeSessionInfo (line 583) | SessionEventTypeSessionInfo SessionEventType = "sessio...
constant SessionEventTypeSessionWarning (line 584) | SessionEventTypeSessionWarning SessionEventType = "sessio...
constant SessionEventTypeSessionModelChange (line 585) | SessionEventTypeSessionModelChange SessionEventType = "sessio...
constant SessionEventTypeSessionModeChanged (line 586) | SessionEventTypeSessionModeChanged SessionEventType = "sessio...
constant SessionEventTypeSessionPlanChanged (line 587) | SessionEventTypeSessionPlanChanged SessionEventType = "sessio...
constant SessionEventTypeSessionWorkspaceFileChanged (line 588) | SessionEventTypeSessionWorkspaceFileChanged SessionEventType = "sessio...
constant SessionEventTypeSessionHandoff (line 589) | SessionEventTypeSessionHandoff SessionEventType = "sessio...
constant SessionEventTypeSessionTruncation (line 590) | SessionEventTypeSessionTruncation SessionEventType = "sessio...
constant SessionEventTypeSessionSnapshotRewind (line 591) | SessionEventTypeSessionSnapshotRewind SessionEventType = "sessio...
constant SessionEventTypeSessionShutdown (line 592) | SessionEventTypeSessionShutdown SessionEventType = "sessio...
constant SessionEventTypeSessionContextChanged (line 593) | SessionEventTypeSessionContextChanged SessionEventType = "sessio...
constant SessionEventTypeSessionUsageInfo (line 594) | SessionEventTypeSessionUsageInfo SessionEventType = "sessio...
constant SessionEventTypeSessionCompactionStart (line 595) | SessionEventTypeSessionCompactionStart SessionEventType = "sessio...
constant SessionEventTypeSessionCompactionComplete (line 596) | SessionEventTypeSessionCompactionComplete SessionEventType = "sessio...
constant SessionEventTypeSessionTaskComplete (line 597) | SessionEventTypeSessionTaskComplete SessionEventType = "sessio...
constant SessionEventTypeUserMessage (line 598) | SessionEventTypeUserMessage SessionEventType = "user.m...
constant SessionEventTypePendingMessagesModified (line 599) | SessionEventTypePendingMessagesModified SessionEventType = "pendin...
constant SessionEventTypeAssistantTurnStart (line 600) | SessionEventTypeAssistantTurnStart SessionEventType = "assist...
constant SessionEventTypeAssistantIntent (line 601) | SessionEventTypeAssistantIntent SessionEventType = "assist...
constant SessionEventTypeAssistantReasoning (line 602) | SessionEventTypeAssistantReasoning SessionEventType = "assist...
constant SessionEventTypeAssistantReasoningDelta (line 603) | SessionEventTypeAssistantReasoningDelta SessionEventType = "assist...
constant SessionEventTypeAssistantStreamingDelta (line 604) | SessionEventTypeAssistantStreamingDelta SessionEventType = "assist...
constant SessionEventTypeAssistantMessage (line 605) | SessionEventTypeAssistantMessage SessionEventType = "assist...
constant SessionEventTypeAssistantMessageStart (line 606) | SessionEventTypeAssistantMessageStart SessionEventType = "assist...
constant SessionEventTypeAssistantMessageDelta (line 607) | SessionEventTypeAssistantMessageDelta SessionEventType = "assist...
constant SessionEventTypeAssistantTurnEnd (line 608) | SessionEventTypeAssistantTurnEnd SessionEventType = "assist...
constant SessionEventTypeAssistantUsage (line 609) | SessionEventTypeAssistantUsage SessionEventType = "assist...
constant SessionEventTypeModelCallFailure (line 610) | SessionEventTypeModelCallFailure SessionEventType = "model....
constant SessionEventTypeAbort (line 611) | SessionEventTypeAbort SessionEventType = "abort"
constant SessionEventTypeToolUserRequested (line 612) | SessionEventTypeToolUserRequested SessionEventType = "tool.u...
constant SessionEventTypeToolExecutionStart (line 613) | SessionEventTypeToolExecutionStart SessionEventType = "tool.e...
constant SessionEventTypeToolExecutionPartialResult (line 614) | SessionEventTypeToolExecutionPartialResult SessionEventType = "tool.e...
constant SessionEventTypeToolExecutionProgress (line 615) | SessionEventTypeToolExecutionProgress SessionEventType = "tool.e...
constant SessionEventTypeToolExecutionComplete (line 616) | SessionEventTypeToolExecutionComplete SessionEventType = "tool.e...
constant SessionEventTypeSkillInvoked (line 617) | SessionEventTypeSkillInvoked SessionEventType = "skill....
constant SessionEventTypeSubagentStarted (line 618) | SessionEventTypeSubagentStarted SessionEventType = "subage...
constant SessionEventTypeSubagentCompleted (line 619) | SessionEventTypeSubagentCompleted SessionEventType = "subage...
constant SessionEventTypeSubagentFailed (line 620) | SessionEventTypeSubagentFailed SessionEventType = "subage...
constant SessionEventTypeSubagentSelected (line 621) | SessionEventTypeSubagentSelected SessionEventType = "subage...
constant SessionEventTypeSubagentDeselected (line 622) | SessionEventTypeSubagentDeselected SessionEventType = "subage...
constant SessionEventTypeHookStart (line 623) | SessionEventTypeHookStart SessionEventType = "hook.s...
constant SessionEventTypeHookEnd (line 624) | SessionEventTypeHookEnd SessionEventType = "hook.end"
constant SessionEventTypeSystemMessage (line 625) | SessionEventTypeSystemMessage SessionEventType = "system...
constant SessionEventTypeSystemNotification (line 626) | SessionEventTypeSystemNotification SessionEventType = "system...
constant SessionEventTypePermissionRequested (line 627) | SessionEventTypePermissionRequested SessionEventType = "permis...
constant SessionEventTypePermissionCompleted (line 628) | SessionEventTypePermissionCompleted SessionEventType = "permis...
constant SessionEventTypeUserInputRequested (line 629) | SessionEventTypeUserInputRequested SessionEventType = "user_i...
constant SessionEventTypeUserInputCompleted (line 630) | SessionEventTypeUserInputCompleted SessionEventType = "user_i...
constant SessionEventTypeElicitationRequested (line 631) | SessionEventTypeElicitationRequested SessionEventType = "elicit...
constant SessionEventTypeElicitationCompleted (line 632) | SessionEventTypeElicitationCompleted SessionEventType = "elicit...
constant SessionEventTypeSamplingRequested (line 633) | SessionEventTypeSamplingRequested SessionEventType = "sampli...
constant SessionEventTypeSamplingCompleted (line 634) | SessionEventTypeSamplingCompleted SessionEventType = "sampli...
constant SessionEventTypeMcpOauthRequired (line 635) | SessionEventTypeMcpOauthRequired SessionEventType = "mcp.oa...
constant SessionEventTypeMcpOauthCompleted (line 636) | SessionEventTypeMcpOauthCompleted SessionEventType = "mcp.oa...
constant SessionEventTypeExternalToolRequested (line 637) | SessionEventTypeExternalToolRequested SessionEventType = "extern...
constant SessionEventTypeExternalToolCompleted (line 638) | SessionEventTypeExternalToolCompleted SessionEventType = "extern...
constant SessionEventTypeCommandQueued (line 639) | SessionEventTypeCommandQueued SessionEventType = "comman...
constant SessionEventTypeCommandExecute (line 640) | SessionEventTypeCommandExecute SessionEventType = "comman...
constant SessionEventTypeCommandCompleted (line 641) | SessionEventTypeCommandCompleted SessionEventType = "comman...
constant SessionEventTypeAutoModeSwitchRequested (line 642) | SessionEventTypeAutoModeSwitchRequested SessionEventType = "auto_m...
constant SessionEventTypeAutoModeSwitchCompleted (line 643) | SessionEventTypeAutoModeSwitchCompleted SessionEventType = "auto_m...
constant SessionEventTypeCommandsChanged (line 644) | SessionEventTypeCommandsChanged SessionEventType = "comman...
constant SessionEventTypeCapabilitiesChanged (line 645) | SessionEventTypeCapabilitiesChanged SessionEventType = "capabi...
constant SessionEventTypeExitPlanModeRequested (line 646) | SessionEventTypeExitPlanModeRequested SessionEventType = "exit_p...
constant SessionEventTypeExitPlanModeCompleted (line 647) | SessionEventTypeExitPlanModeCompleted SessionEventType = "exit_p...
constant SessionEventTypeSessionToolsUpdated (line 648) | SessionEventTypeSessionToolsUpdated SessionEventType = "sessio...
constant SessionEventTypeSessionBackgroundTasksChanged (line 649) | SessionEventTypeSessionBackgroundTasksChanged SessionEventType = "sessio...
constant SessionEventTypeSessionSkillsLoaded (line 650) | SessionEventTypeSessionSkillsLoaded SessionEventType = "sessio...
constant SessionEventTypeSessionCustomAgentsUpdated (line 651) | SessionEventTypeSessionCustomAgentsUpdated SessionEventType = "sessio...
constant SessionEventTypeSessionMcpServersLoaded (line 652) | SessionEventTypeSessionMcpServersLoaded SessionEventType = "sessio...
constant SessionEventTypeSessionMcpServerStatusChanged (line 653) | SessionEventTypeSessionMcpServerStatusChanged SessionEventType = "sessio...
constant SessionEventTypeSessionExtensionsLoaded (line 654) | SessionEventTypeSessionExtensionsLoaded SessionEventType = "sessio...
type AssistantIntentData (line 658) | type AssistantIntentData struct
method sessionEventData (line 663) | func (*AssistantIntentData) sessionEventData() {}
type SessionModeChangedData (line 666) | type SessionModeChangedData struct
method sessionEventData (line 673) | func (*SessionModeChangedData) sessionEventData() {}
type AssistantReasoningData (line 676) | type AssistantReasoningData struct
method sessionEventData (line 683) | func (*AssistantReasoningData) sessionEventData() {}
type AssistantMessageData (line 686) | type AssistantMessageData struct
method sessionEventData (line 714) | func (*AssistantMessageData) sessionEventData() {}
type AutoModeSwitchCompletedData (line 717) | type AutoModeSwitchCompletedData struct
method sessionEventData (line 724) | func (*AutoModeSwitchCompletedData) sessionEventData() {}
type AutoModeSwitchRequestedData (line 727) | type AutoModeSwitchRequestedData struct
method sessionEventData (line 736) | func (*AutoModeSwitchRequestedData) sessionEventData() {}
type SessionCompactionStartData (line 739) | type SessionCompactionStartData struct
method sessionEventData (line 748) | func (*SessionCompactionStartData) sessionEventData() {}
type SessionCompactionCompleteData (line 751) | type SessionCompactionCompleteData struct
method sessionEventData (line 784) | func (*SessionCompactionCompleteData) sessionEventData() {}
type SessionTruncationData (line 787) | type SessionTruncationData struct
method sessionEventData (line 806) | func (*SessionTruncationData) sessionEventData() {}
type SessionUsageInfoData (line 809) | type SessionUsageInfoData struct
method sessionEventData (line 826) | func (*SessionUsageInfoData) sessionEventData() {}
type SubagentSelectedData (line 829) | type SubagentSelectedData struct
method sessionEventData (line 838) | func (*SubagentSelectedData) sessionEventData() {}
type ElicitationCompletedData (line 841) | type ElicitationCompletedData struct
method sessionEventData (line 850) | func (*ElicitationCompletedData) sessionEventData() {}
type ElicitationRequestedData (line 853) | type ElicitationRequestedData struct
method sessionEventData (line 870) | func (*ElicitationRequestedData) sessionEventData() {}
type SubagentDeselectedData (line 873) | type SubagentDeselectedData struct
method sessionEventData (line 876) | func (*SubagentDeselectedData) sessionEventData() {}
type PendingMessagesModifiedData (line 879) | type PendingMessagesModifiedData struct
method sessionEventData (line 882) | func (*PendingMessagesModifiedData) sessionEventData() {}
type SessionErrorData (line 885) | type SessionErrorData struct
method sessionEventData (line 904) | func (*SessionErrorData) sessionEventData() {}
type ExternalToolCompletedData (line 907) | type ExternalToolCompletedData struct
method sessionEventData (line 912) | func (*ExternalToolCompletedData) sessionEventData() {}
type ExternalToolRequestedData (line 915) | type ExternalToolRequestedData struct
method sessionEventData (line 932) | func (*ExternalToolRequestedData) sessionEventData() {}
type ModelCallFailureData (line 935) | type ModelCallFailureData struct
method sessionEventData (line 954) | func (*ModelCallFailureData) sessionEventData() {}
type HookEndData (line 957) | type HookEndData struct
method sessionEventData (line 970) | func (*HookEndData) sessionEventData() {}
type HookStartData (line 973) | type HookStartData struct
method sessionEventData (line 982) | func (*HookStartData) sessionEventData() {}
type SessionInfoData (line 985) | type SessionInfoData struct
method sessionEventData (line 996) | func (*SessionInfoData) sessionEventData() {}
type AssistantUsageData (line 999) | type AssistantUsageData struct
method sessionEventData (line 1037) | func (*AssistantUsageData) sessionEventData() {}
type McpOauthCompletedData (line 1040) | type McpOauthCompletedData struct
method sessionEventData (line 1045) | func (*McpOauthCompletedData) sessionEventData() {}
type SessionModelChangeData (line 1048) | type SessionModelChangeData struct
method sessionEventData (line 1061) | func (*SessionModelChangeData) sessionEventData() {}
type SessionRemoteSteerableChangedData (line 1064) | type SessionRemoteSteerableChangedData struct
method sessionEventData (line 1069) | func (*SessionRemoteSteerableChangedData) sessionEventData() {}
type McpOauthRequiredData (line 1072) | type McpOauthRequiredData struct
method sessionEventData (line 1083) | func (*McpOauthRequiredData) sessionEventData() {}
type SessionIdleData (line 1086) | type SessionIdleData struct
method sessionEventData (line 1091) | func (*SessionIdleData) sessionEventData() {}
type PermissionCompletedData (line 1094) | type PermissionCompletedData struct
method sessionEventData (line 1103) | func (*PermissionCompletedData) sessionEventData() {}
type PermissionRequestedData (line 1106) | type PermissionRequestedData struct
method sessionEventData (line 1117) | func (*PermissionRequestedData) sessionEventData() {}
type ExitPlanModeRequestedData (line 1120) | type ExitPlanModeRequestedData struct
method sessionEventData (line 1133) | func (*ExitPlanModeRequestedData) sessionEventData() {}
type SessionPlanChangedData (line 1136) | type SessionPlanChangedData struct
method sessionEventData (line 1141) | func (*SessionPlanChangedData) sessionEventData() {}
type ExitPlanModeCompletedData (line 1144) | type ExitPlanModeCompletedData struct
method sessionEventData (line 1157) | func (*ExitPlanModeCompletedData) sessionEventData() {}
type CommandCompletedData (line 1160) | type CommandCompletedData struct
method sessionEventData (line 1165) | func (*CommandCompletedData) sessionEventData() {}
type CommandQueuedData (line 1168) | type CommandQueuedData struct
method sessionEventData (line 1175) | func (*CommandQueuedData) sessionEventData() {}
type CommandExecuteData (line 1178) | type CommandExecuteData struct
method sessionEventData (line 1189) | func (*CommandExecuteData) sessionEventData() {}
type CommandsChangedData (line 1192) | type CommandsChangedData struct
method sessionEventData (line 1197) | func (*CommandsChangedData) sessionEventData() {}
type SamplingCompletedData (line 1200) | type SamplingCompletedData struct
method sessionEventData (line 1205) | func (*SamplingCompletedData) sessionEventData() {}
type SamplingRequestedData (line 1208) | type SamplingRequestedData struct
method sessionEventData (line 1217) | func (*SamplingRequestedData) sessionEventData() {}
type CapabilitiesChangedData (line 1220) | type CapabilitiesChangedData struct
method sessionEventData (line 1225) | func (*CapabilitiesChangedData) sessionEventData() {}
type SessionHandoffData (line 1228) | type SessionHandoffData struct
method sessionEventData (line 1245) | func (*SessionHandoffData) sessionEventData() {}
type SessionStartData (line 1248) | type SessionStartData struct
method sessionEventData (line 1271) | func (*SessionStartData) sessionEventData() {}
type SessionResumeData (line 1274) | type SessionResumeData struct
method sessionEventData (line 1295) | func (*SessionResumeData) sessionEventData() {}
type SessionSnapshotRewindData (line 1298) | type SessionSnapshotRewindData struct
method sessionEventData (line 1305) | func (*SessionSnapshotRewindData) sessionEventData() {}
type SessionShutdownData (line 1308) | type SessionShutdownData struct
method sessionEventData (line 1339) | func (*SessionShutdownData) sessionEventData() {}
type SessionTitleChangedData (line 1342) | type SessionTitleChangedData struct
method sessionEventData (line 1347) | func (*SessionTitleChangedData) sessionEventData() {}
type SessionBackgroundTasksChangedData (line 1350) | type SessionBackgroundTasksChangedData struct
method sessionEventData (line 1353) | func (*SessionBackgroundTasksChangedData) sessionEventData() {}
type SessionCustomAgentsUpdatedData (line 1356) | type SessionCustomAgentsUpdatedData struct
method sessionEventData (line 1365) | func (*SessionCustomAgentsUpdatedData) sessionEventData() {}
type SessionExtensionsLoadedData (line 1368) | type SessionExtensionsLoadedData struct
method sessionEventData (line 1373) | func (*SessionExtensionsLoadedData) sessionEventData() {}
type SessionMcpServerStatusChangedData (line 1376) | type SessionMcpServerStatusChangedData struct
method sessionEventData (line 1383) | func (*SessionMcpServerStatusChangedData) sessionEventData() {}
type SessionMcpServersLoadedData (line 1386) | type SessionMcpServersLoadedData struct
method sessionEventData (line 1391) | func (*SessionMcpServersLoadedData) sessionEventData() {}
type SessionSkillsLoadedData (line 1394) | type SessionSkillsLoadedData struct
method sessionEventData (line 1399) | func (*SessionSkillsLoadedData) sessionEventData() {}
type SessionToolsUpdatedData (line 1402) | type SessionToolsUpdatedData struct
method sessionEventData (line 1406) | func (*SessionToolsUpdatedData) sessionEventData() {}
type SkillInvokedData (line 1409) | type SkillInvokedData struct
method sessionEventData (line 1426) | func (*SkillInvokedData) sessionEventData() {}
type AssistantMessageDeltaData (line 1429) | type AssistantMessageDeltaData struct
method sessionEventData (line 1439) | func (*AssistantMessageDeltaData) sessionEventData() {}
type AssistantMessageStartData (line 1442) | type AssistantMessageStartData struct
method sessionEventData (line 1449) | func (*AssistantMessageStartData) sessionEventData() {}
type AssistantReasoningDeltaData (line 1452) | type AssistantReasoningDeltaData struct
method sessionEventData (line 1459) | func (*AssistantReasoningDeltaData) sessionEventData() {}
type AssistantStreamingDeltaData (line 1462) | type AssistantStreamingDeltaData struct
method sessionEventData (line 1467) | func (*AssistantStreamingDeltaData) sessionEventData() {}
type ToolExecutionPartialResultData (line 1470) | type ToolExecutionPartialResultData struct
method sessionEventData (line 1477) | func (*ToolExecutionPartialResultData) sessionEventData() {}
type SubagentCompletedData (line 1480) | type SubagentCompletedData struct
method sessionEventData (line 1497) | func (*SubagentCompletedData) sessionEventData() {}
type SubagentFailedData (line 1500) | type SubagentFailedData struct
method sessionEventData (line 1519) | func (*SubagentFailedData) sessionEventData() {}
type SubagentStartedData (line 1522) | type SubagentStartedData struct
method sessionEventData (line 1533) | func (*SubagentStartedData) sessionEventData() {}
type SystemNotificationData (line 1536) | type SystemNotificationData struct
method sessionEventData (line 1543) | func (*SystemNotificationData) sessionEventData() {}
type SystemMessageData (line 1546) | type SystemMessageData struct
method sessionEventData (line 1557) | func (*SystemMessageData) sessionEventData() {}
type SessionTaskCompleteData (line 1560) | type SessionTaskCompleteData struct
method sessionEventData (line 1567) | func (*SessionTaskCompleteData) sessionEventData() {}
type ToolExecutionCompleteData (line 1570) | type ToolExecutionCompleteData struct
method sessionEventData (line 1594) | func (*ToolExecutionCompleteData) sessionEventData() {}
type ToolExecutionProgressData (line 1597) | type ToolExecutionProgressData struct
method sessionEventData (line 1604) | func (*ToolExecutionProgressData) sessionEventData() {}
type ToolExecutionStartData (line 1607) | type ToolExecutionStartData struct
method sessionEventData (line 1625) | func (*ToolExecutionStartData) sessionEventData() {}
type AbortData (line 1628) | type AbortData struct
method sessionEventData (line 1633) | func (*AbortData) sessionEventData() {}
type AssistantTurnEndData (line 1636) | type AssistantTurnEndData struct
method sessionEventData (line 1641) | func (*AssistantTurnEndData) sessionEventData() {}
type AssistantTurnStartData (line 1644) | type AssistantTurnStartData struct
method sessionEventData (line 1651) | func (*AssistantTurnStartData) sessionEventData() {}
type UserInputCompletedData (line 1654) | type UserInputCompletedData struct
method sessionEventData (line 1663) | func (*UserInputCompletedData) sessionEventData() {}
type UserInputRequestedData (line 1666) | type UserInputRequestedData struct
method sessionEventData (line 1679) | func (*UserInputRequestedData) sessionEventData() {}
type ToolUserRequestedData (line 1682) | type ToolUserRequestedData struct
method sessionEventData (line 1691) | func (*ToolUserRequestedData) sessionEventData() {}
type UserMessageData (line 1694) | type UserMessageData struct
method sessionEventData (line 1715) | func (*UserMessageData) sessionEventData() {}
type SessionWarningData (line 1718) | type SessionWarningData struct
method sessionEventData (line 1727) | func (*SessionWarningData) sessionEventData() {}
type SessionContextChangedData (line 1730) | type SessionContextChangedData struct
method sessionEventData (line 1749) | func (*SessionContextChangedData) sessionEventData() {}
type SessionWorkspaceFileChangedData (line 1752) | type SessionWorkspaceFileChangedData struct
method sessionEventData (line 1759) | func (*SessionWorkspaceFileChangedData) sessionEventData() {}
type ToolExecutionCompleteContent (line 1762) | type ToolExecutionCompleteContent struct
type AssistantMessageToolRequest (line 1792) | type AssistantMessageToolRequest struct
type UserMessageAttachment (line 1810) | type UserMessageAttachment struct
type ShutdownCodeChanges (line 1842) | type ShutdownCodeChanges struct
type PermissionPromptRequest (line 1852) | type PermissionPromptRequest struct
type PermissionRequest (line 1910) | type PermissionRequest struct
type UserMessageAttachmentSelectionDetailsEnd (line 1972) | type UserMessageAttachmentSelectionDetailsEnd struct
type HookEndError (line 1980) | type HookEndError struct
type ToolExecutionCompleteError (line 1988) | type ToolExecutionCompleteError struct
type ToolExecutionCompleteContentResourceLinkIcon (line 1996) | type ToolExecutionCompleteContentResourceLinkIcon struct
type ElicitationRequestedSchema (line 2008) | type ElicitationRequestedSchema struct
type SystemMessageMetadata (line 2018) | type SystemMessageMetadata struct
type UserMessageAttachmentFileLineRange (line 2026) | type UserMessageAttachmentFileLineRange struct
type AssistantUsageCopilotUsage (line 2034) | type AssistantUsageCopilotUsage struct
type CompactionCompleteCompactionTokensUsedCopilotUsage (line 2042) | type CompactionCompleteCompactionTokensUsedCopilotUsage struct
type UserMessageAttachmentSelectionDetails (line 2050) | type UserMessageAttachmentSelectionDetails struct
type HandoffRepository (line 2058) | type HandoffRepository struct
type ShutdownModelMetricRequests (line 2068) | type ShutdownModelMetricRequests struct
type UserMessageAttachmentSelectionDetailsStart (line 2076) | type UserMessageAttachmentSelectionDetailsStart struct
type McpOauthRequiredStaticClientConfig (line 2084) | type McpOauthRequiredStaticClientConfig struct
type SystemNotification (line 2094) | type SystemNotification struct
type UserToolSessionApproval (line 2128) | type UserToolSessionApproval struct
type PermissionResult (line 2140) | type PermissionResult struct
type ShutdownModelMetricUsage (line 2164) | type ShutdownModelMetricUsage struct
type CompactionCompleteCompactionTokensUsed (line 2178) | type CompactionCompleteCompactionTokensUsed struct
type AssistantUsageCopilotUsageTokenDetail (line 2196) | type AssistantUsageCopilotUsageTokenDetail struct
type CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail (line 2208) | type CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail struct
type ToolExecutionCompleteResult (line 2220) | type ToolExecutionCompleteResult struct
type CapabilitiesChangedUI (line 2230) | type CapabilitiesChangedUI struct
type WorkingDirectoryContext (line 2236) | type WorkingDirectoryContext struct
type AssistantUsageQuotaSnapshot (line 2255) | type AssistantUsageQuotaSnapshot struct
type CommandsChangedCommand (line 2274) | type CommandsChangedCommand struct
type CustomAgentsUpdatedAgent (line 2279) | type CustomAgentsUpdatedAgent struct
type ExtensionsLoadedExtension (line 2298) | type ExtensionsLoadedExtension struct
type McpServersLoadedServer (line 2309) | type McpServersLoadedServer struct
type PermissionRequestShellCommand (line 2320) | type PermissionRequestShellCommand struct
type PermissionRequestShellPossibleURL (line 2327) | type PermissionRequestShellPossibleURL struct
type PermissionRule (line 2332) | type PermissionRule struct
type ShutdownModelMetric (line 2339) | type ShutdownModelMetric struct
type ShutdownModelMetricTokenDetail (line 2350) | type ShutdownModelMetricTokenDetail struct
type ShutdownTokenDetail (line 2355) | type ShutdownTokenDetail struct
type SkillsLoadedSkill (line 2360) | type SkillsLoadedSkill struct
type McpServersLoadedServerStatus (line 2376) | type McpServersLoadedServerStatus
constant McpServersLoadedServerStatusConnected (line 2379) | McpServersLoadedServerStatusConnected McpServersLoadedServerStatus =...
constant McpServersLoadedServerStatusFailed (line 2380) | McpServersLoadedServerStatusFailed McpServersLoadedServerStatus =...
constant McpServersLoadedServerStatusNeedsAuth (line 2381) | McpServersLoadedServerStatusNeedsAuth McpServersLoadedServerStatus =...
constant McpServersLoadedServerStatusPending (line 2382) | McpServersLoadedServerStatusPending McpServersLoadedServerStatus =...
constant McpServersLoadedServerStatusDisabled (line 2383) | McpServersLoadedServerStatusDisabled McpServersLoadedServerStatus =...
constant McpServersLoadedServerStatusNotConfigured (line 2384) | McpServersLoadedServerStatusNotConfigured McpServersLoadedServerStatus =...
type ExtensionsLoadedExtensionStatus (line 2388) | type ExtensionsLoadedExtensionStatus
constant ExtensionsLoadedExtensionStatusRunning (line 2391) | ExtensionsLoadedExtensionStatusRunning ExtensionsLoadedExtensionStatus ...
constant ExtensionsLoadedExtensionStatusDisabled (line 2392) | ExtensionsLoadedExtensionStatusDisabled ExtensionsLoadedExtensionStatus ...
constant ExtensionsLoadedExtensionStatusFailed (line 2393) | ExtensionsLoadedExtensionStatusFailed ExtensionsLoadedExtensionStatus ...
constant ExtensionsLoadedExtensionStatusStarting (line 2394) | ExtensionsLoadedExtensionStatusStarting ExtensionsLoadedExtensionStatus ...
type ExtensionsLoadedExtensionSource (line 2398) | type ExtensionsLoadedExtensionSource
constant ExtensionsLoadedExtensionSourceProject (line 2401) | ExtensionsLoadedExtensionSourceProject ExtensionsLoadedExtensionSource =...
constant ExtensionsLoadedExtensionSourceUser (line 2402) | ExtensionsLoadedExtensionSourceUser ExtensionsLoadedExtensionSource =...
type ElicitationRequestedMode (line 2406) | type ElicitationRequestedMode
constant ElicitationRequestedModeForm (line 2409) | ElicitationRequestedModeForm ElicitationRequestedMode = "form"
constant ElicitationRequestedModeURL (line 2410) | ElicitationRequestedModeURL ElicitationRequestedMode = "url"
type WorkingDirectoryContextHostType (line 2414) | type WorkingDirectoryContextHostType
constant WorkingDirectoryContextHostTypeGithub (line 2417) | WorkingDirectoryContextHostTypeGithub WorkingDirectoryContextHostType = ...
constant WorkingDirectoryContextHostTypeAdo (line 2418) | WorkingDirectoryContextHostTypeAdo WorkingDirectoryContextHostType = ...
type PermissionPromptRequestKind (line 2422) | type PermissionPromptRequestKind
constant PermissionPromptRequestKindCommands (line 2425) | PermissionPromptRequestKindCommands PermissionPromptRequestKind = "com...
constant PermissionPromptRequestKindWrite (line 2426) | PermissionPromptRequestKindWrite PermissionPromptRequestKind = "write"
constant PermissionPromptRequestKindRead (line 2427) | PermissionPromptRequestKindRead PermissionPromptRequestKind = "read"
constant PermissionPromptRequestKindMcp (line 2428) | PermissionPromptRequestKindMcp PermissionPromptRequestKind = "mcp"
constant PermissionPromptRequestKindURL (line 2429) | PermissionPromptRequestKindURL PermissionPromptRequestKind = "url"
constant PermissionPromptRequestKindMemory (line 2430) | PermissionPromptRequestKindMemory PermissionPromptRequestKind = "mem...
constant PermissionPromptRequestKindCustomTool (line 2431) | PermissionPromptRequestKindCustomTool PermissionPromptRequestKind = "cus...
constant PermissionPromptRequestKindPath (line 2432) | PermissionPromptRequestKindPath PermissionPromptRequestKind = "path"
constant PermissionPromptRequestKindHook (line 2433) | PermissionPromptRequestKindHook PermissionPromptRequestKind = "hook"
type PermissionRequestKind (line 2437) | type PermissionRequestKind
constant PermissionRequestKindShell (line 2440) | PermissionRequestKindShell PermissionRequestKind = "shell"
constant PermissionRequestKindWrite (line 2441) | PermissionRequestKindWrite PermissionRequestKind = "write"
constant PermissionRequestKindRead (line 2442) | PermissionRequestKindRead PermissionRequestKind = "read"
constant PermissionRequestKindMcp (line 2443) | PermissionRequestKindMcp PermissionRequestKind = "mcp"
constant PermissionRequestKindURL (line 2444) | PermissionRequestKindURL PermissionRequestKind = "url"
constant PermissionRequestKindMemory (line 2445) | PermissionRequestKindMemory PermissionRequestKind = "memory"
constant PermissionRequestKindCustomTool (line 2446) | PermissionRequestKindCustomTool PermissionRequestKind = "custom-tool"
constant PermissionRequestKindHook (line 2447) | PermissionRequestKindHook PermissionRequestKind = "hook"
type PermissionResultKind (line 2451) | type PermissionResultKind
constant PermissionResultKindApproved (line 2454) | PermissionResultKindApproved Permi...
constant PermissionResultKindApprovedForSession (line 2455) | PermissionResultKindApprovedForSession Permi...
constant PermissionResultKindApprovedForLocation (line 2456) | PermissionResultKindApprovedForLocation Permi...
constant PermissionResultKindCancelled (line 2457) | PermissionResultKindCancelled Permi...
constant PermissionResultKindDeniedByRules (line 2458) | PermissionResultKindDeniedByRules Permi...
constant PermissionResultKindDeniedNoApprovalRuleAndCouldNotRequestFromUser (line 2459) | PermissionResultKindDeniedNoApprovalRuleAndCouldNotRequestFromUser Permi...
constant PermissionResultKindDeniedInteractivelyByUser (line 2460) | PermissionResultKindDeniedInteractivelyByUser Permi...
constant PermissionResultKindDeniedByContentExclusionPolicy (line 2461) | PermissionResultKindDeniedByContentExclusionPolicy Permi...
constant PermissionResultKindDeniedByPermissionRequestHook (line 2462) | PermissionResultKindDeniedByPermissionRequestHook Permi...
type UserToolSessionApprovalKind (line 2466) | type UserToolSessionApprovalKind
constant UserToolSessionApprovalKindCommands (line 2469) | UserToolSessionApprovalKindCommands UserToolSessionApprovalKind = "com...
constant UserToolSessionApprovalKindRead (line 2470) | UserToolSessionApprovalKindRead UserToolSessionApprovalKind = "read"
constant UserToolSessionApprovalKindWrite (line 2471) | UserToolSessionApprovalKindWrite UserToolSessionApprovalKind = "write"
constant UserToolSessionApprovalKindMcp (line 2472) | UserToolSessionApprovalKindMcp UserToolSessionApprovalKind = "mcp"
constant UserToolSessionApprovalKindMemory (line 2473) | UserToolSessionApprovalKindMemory UserToolSessionApprovalKind = "mem...
constant UserToolSessionApprovalKindCustomTool (line 2474) | UserToolSessionApprovalKindCustomTool UserToolSessionApprovalKind = "cus...
type SystemMessageRole (line 2478) | type SystemMessageRole
constant SystemMessageRoleSystem (line 2481) | SystemMessageRoleSystem SystemMessageRole = "system"
constant SystemMessageRoleDeveloper (line 2482) | SystemMessageRoleDeveloper SystemMessageRole = "developer"
type McpServerStatusChangedStatus (line 2486) | type McpServerStatusChangedStatus
constant McpServerStatusChangedStatusConnected (line 2489) | McpServerStatusChangedStatusConnected McpServerStatusChangedStatus =...
constant McpServerStatusChangedStatusFailed (line 2490) | McpServerStatusChangedStatusFailed McpServerStatusChangedStatus =...
constant McpServerStatusChangedStatusNeedsAuth (line 2491) | McpServerStatusChangedStatusNeedsAuth McpServerStatusChangedStatus =...
constant McpServerStatusChangedStatusPending (line 2492) | McpServerStatusChangedStatusPending McpServerStatusChangedStatus =...
constant McpServerStatusChangedStatusDisabled (line 2493) | McpServerStatusChangedStatusDisabled McpServerStatusChangedStatus =...
constant McpServerStatusChangedStatusNotConfigured (line 2494) | McpServerStatusChangedStatusNotConfigured McpServerStatusChangedStatus =...
type HandoffSourceType (line 2498) | type HandoffSourceType
constant HandoffSourceTypeRemote (line 2501) | HandoffSourceTypeRemote HandoffSourceType = "remote"
constant HandoffSourceTypeLocal (line 2502) | HandoffSourceTypeLocal HandoffSourceType = "local"
type UserMessageAgentMode (line 2506) | type UserMessageAgentMode
constant UserMessageAgentModeInteractive (line 2509) | UserMessageAgentModeInteractive UserMessageAgentMode = "interactive"
constant UserMessageAgentModePlan (line 2510) | UserMessageAgentModePlan UserMessageAgentMode = "plan"
constant UserMessageAgentModeAutopilot (line 2511) | UserMessageAgentModeAutopilot UserMessageAgentMode = "autopilot"
constant UserMessageAgentModeShell (line 2512) | UserMessageAgentModeShell UserMessageAgentMode = "shell"
type PlanChangedOperation (line 2516) | type PlanChangedOperation
constant PlanChangedOperationCreate (line 2519) | PlanChangedOperationCreate PlanChangedOperation = "create"
constant PlanChangedOperationUpdate (line 2520) | PlanChangedOperationUpdate PlanChangedOperation = "update"
constant PlanChangedOperationDelete (line 2521) | PlanChangedOperationDelete PlanChangedOperation = "delete"
type ElicitationCompletedAction (line 2525) | type ElicitationCompletedAction
constant ElicitationCompletedActionAccept (line 2528) | ElicitationCompletedActionAccept ElicitationCompletedAction = "accept"
constant ElicitationCompletedActionDecline (line 2529) | ElicitationCompletedActionDecline ElicitationCompletedAction = "decline"
constant ElicitationCompletedActionCancel (line 2530) | ElicitationCompletedActionCancel ElicitationCompletedAction = "cancel"
type ToolExecutionCompleteContentResourceLinkIconTheme (line 2534) | type ToolExecutionCompleteContentResourceLinkIconTheme
constant ToolExecutionCompleteContentResourceLinkIconThemeLight (line 2537) | ToolExecutionCompleteContentResourceLinkIconThemeLight ToolExecutionComp...
constant ToolExecutionCompleteContentResourceLinkIconThemeDark (line 2538) | ToolExecutionCompleteContentResourceLinkIconThemeDark ToolExecutionComp...
type AssistantMessageToolRequestType (line 2542) | type AssistantMessageToolRequestType
constant AssistantMessageToolRequestTypeFunction (line 2545) | AssistantMessageToolRequestTypeFunction AssistantMessageToolRequestType ...
constant AssistantMessageToolRequestTypeCustom (line 2546) | AssistantMessageToolRequestTypeCustom AssistantMessageToolRequestType ...
type SystemNotificationType (line 2550) | type SystemNotificationType
constant SystemNotificationTypeAgentCompleted (line 2553) | SystemNotificationTypeAgentCompleted SystemNotificationType = "a...
constant SystemNotificationTypeAgentIdle (line 2554) | SystemNotificationTypeAgentIdle SystemNotificationType = "a...
constant SystemNotificationTypeNewInboxMessage (line 2555) | SystemNotificationTypeNewInboxMessage SystemNotificationType = "n...
constant SystemNotificationTypeShellCompleted (line 2556) | SystemNotificationTypeShellCompleted SystemNotificationType = "s...
constant SystemNotificationTypeShellDetachedCompleted (line 2557) | SystemNotificationTypeShellDetachedCompleted SystemNotificationType = "s...
constant SystemNotificationTypeInstructionDiscovered (line 2558) | SystemNotificationTypeInstructionDiscovered SystemNotificationType = "i...
type ToolExecutionCompleteContentType (line 2562) | type ToolExecutionCompleteContentType
constant ToolExecutionCompleteContentTypeText (line 2565) | ToolExecutionCompleteContentTypeText ToolExecutionCompleteConten...
constant ToolExecutionCompleteContentTypeTerminal (line 2566) | ToolExecutionCompleteContentTypeTerminal ToolExecutionCompleteConten...
constant ToolExecutionCompleteContentTypeImage (line 2567) | ToolExecutionCompleteContentTypeImage ToolExecutionCompleteConten...
constant ToolExecutionCompleteContentTypeAudio (line 2568) | ToolExecutionCompleteContentTypeAudio ToolExecutionCompleteConten...
constant ToolExecutionCompleteContentTypeResourceLink (line 2569) | ToolExecutionCompleteContentTypeResourceLink ToolExecutionCompleteConten...
constant ToolExecutionCompleteContentTypeResource (line 2570) | ToolExecutionCompleteContentTypeResource ToolExecutionCompleteConten...
type UserMessageAttachmentType (line 2574) | type UserMessageAttachmentType
constant UserMessageAttachmentTypeFile (line 2577) | UserMessageAttachmentTypeFile UserMessageAttachmentType = "file"
constant UserMessageAttachmentTypeDirectory (line 2578) | UserMessageAttachmentTypeDirectory UserMessageAttachmentType = "di...
constant UserMessageAttachmentTypeSelection (line 2579) | UserMessageAttachmentTypeSelection UserMessageAttachmentType = "se...
constant UserMessageAttachmentTypeGithubReference (line 2580) | UserMessageAttachmentTypeGithubReference UserMessageAttachmentType = "gi...
constant UserMessageAttachmentTypeBlob (line 2581) | UserMessageAttachmentTypeBlob UserMessageAttachmentType = "blob"
type UserMessageAttachmentGithubReferenceType (line 2585) | type UserMessageAttachmentGithubReferenceType
constant UserMessageAttachmentGithubReferenceTypeIssue (line 2588) | UserMessageAttachmentGithubReferenceTypeIssue UserMessageAttachment...
constant UserMessageAttachmentGithubReferenceTypePr (line 2589) | UserMessageAttachmentGithubReferenceTypePr UserMessageAttachment...
constant UserMessageAttachmentGithubReferenceTypeDiscussion (line 2590) | UserMessageAttachmentGithubReferenceTypeDiscussion UserMessageAttachment...
type PermissionPromptRequestPathAccessKind (line 2594) | type PermissionPromptRequestPathAccessKind
constant PermissionPromptRequestPathAccessKindRead (line 2597) | PermissionPromptRequestPathAccessKindRead PermissionPromptRequestPathAc...
constant PermissionPromptRequestPathAccessKindShell (line 2598) | PermissionPromptRequestPathAccessKindShell PermissionPromptRequestPathAc...
constant PermissionPromptRequestPathAccessKindWrite (line 2599) | PermissionPromptRequestPathAccessKindWrite PermissionPromptRequestPathAc...
type PermissionPromptRequestMemoryDirection (line 2603) | type PermissionPromptRequestMemoryDirection
constant PermissionPromptRequestMemoryDirectionUpvote (line 2606) | PermissionPromptRequestMemoryDirectionUpvote PermissionPromptRequestMe...
constant PermissionPromptRequestMemoryDirectionDownvote (line 2607) | PermissionPromptRequestMemoryDirectionDownvote PermissionPromptRequestMe...
type PermissionRequestMemoryDirection (line 2611) | type PermissionRequestMemoryDirection
constant PermissionRequestMemoryDirectionUpvote (line 2614) | PermissionRequestMemoryDirectionUpvote PermissionRequestMemoryDirectio...
constant PermissionRequestMemoryDirectionDownvote (line 2615) | PermissionRequestMemoryDirectionDownvote PermissionRequestMemoryDirectio...
type ModelCallFailureSource (line 2619) | type ModelCallFailureSource
constant ModelCallFailureSourceTopLevel (line 2622) | ModelCallFailureSourceTopLevel ModelCallFailureSource = "top_level"
constant ModelCallFailureSourceSubagent (line 2623) | ModelCallFailureSourceSubagent ModelCallFailureSource = "subagent"
constant ModelCallFailureSourceMcpSampling (line 2624) | ModelCallFailureSourceMcpSampling ModelCallFailureSource = "mcp_sampling"
type SystemNotificationAgentCompletedStatus (line 2628) | type SystemNotificationAgentCompletedStatus
constant SystemNotificationAgentCompletedStatusCompleted (line 2631) | SystemNotificationAgentCompletedStatusCompleted SystemNotificationAgentC...
constant SystemNotificationAgentCompletedStatusFailed (line 2632) | SystemNotificationAgentCompletedStatusFailed SystemNotificationAgentC...
type WorkspaceFileChangedOperation (line 2636) | type WorkspaceFileChangedOperation
constant WorkspaceFileChangedOperationCreate (line 2639) | WorkspaceFileChangedOperationCreate WorkspaceFileChangedOperation = "cre...
constant WorkspaceFileChangedOperationUpdate (line 2640) | WorkspaceFileChangedOperationUpdate WorkspaceFileChangedOperation = "upd...
type ShutdownType (line 2644) | type ShutdownType
constant ShutdownTypeRoutine (line 2647) | ShutdownTypeRoutine ShutdownType = "routine"
constant ShutdownTypeError (line 2648) | ShutdownTypeError ShutdownType = "error"
type PermissionPromptRequestMemoryAction (line 2652) | type PermissionPromptRequestMemoryAction
constant PermissionPromptRequestMemoryActionStore (line 2655) | PermissionPromptRequestMemoryActionStore PermissionPromptRequestMemoryAc...
constant PermissionPromptRequestMemoryActionVote (line 2656) | PermissionPromptRequestMemoryActionVote PermissionPromptRequestMemoryAc...
type PermissionRequestMemoryAction (line 2660) | type PermissionRequestMemoryAction
constant PermissionRequestMemoryActionStore (line 2663) | PermissionRequestMemoryActionStore PermissionRequestMemoryAction = "store"
constant PermissionRequestMemoryActionVote (line 2664) | PermissionRequestMemoryActionVote PermissionRequestMemoryAction = "vote"
constant AttachmentTypeFile (line 2677) | AttachmentTypeFile = UserMessageAttachmentTypeFile
constant AttachmentTypeDirectory (line 2678) | AttachmentTypeDirectory = UserMessageAttachmentTypeDirectory
constant AttachmentTypeSelection (line 2679) | AttachmentTypeSelectio
Condensed preview — 979 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (7,093K chars).
[
{
"path": ".devcontainer/devcontainer.json",
"chars": 1306,
"preview": "// For format details, see https://aka.ms/devcontainer.json. For config options, see the\n// README at: https://github.co"
},
{
"path": ".gitattributes",
"chars": 441,
"preview": ".github/workflows/*.lock.yml linguist-generated=true merge=ours\n\n# Generated files — keep LF line endings so codegen out"
},
{
"path": ".github/CODEOWNERS",
"chars": 22,
"preview": "* @github/copilot-sdk\n"
},
{
"path": ".github/actions/setup-copilot/action.yml",
"chars": 765,
"preview": "name: \"Setup Copilot\"\ndescription: \"Setup Copilot based on the project's package.json file.\"\noutputs:\n cli-path:\n de"
},
{
"path": ".github/agents/agentic-workflows.agent.md",
"chars": 8759,
"preview": "---\ndescription: GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent pro"
},
{
"path": ".github/agents/docs-maintenance.agent.md",
"chars": 14786,
"preview": "---\ndescription: Audit SDK documentation and generate an actionable improvement plan.\ntools:\n - grep\n - glob\n - view\n"
},
{
"path": ".github/aw/actions-lock.json",
"chars": 1042,
"preview": "{\n \"entries\": {\n \"actions/checkout@v6.0.2\": {\n \"repo\": \"actions/checkout\",\n \"version\": \"v6.0.2\",\n \"sh"
},
{
"path": ".github/aw/logs/.gitignore",
"chars": 90,
"preview": "# Ignore all downloaded workflow logs\n*\n# But keep the .gitignore file itself\n!.gitignore\n"
},
{
"path": ".github/commands/triage_feedback.yml",
"chars": 497,
"preview": "trigger: triage_feedback\ntitle: Triage feedback\ndescription: Provide feedback on the triage agent's classification of th"
},
{
"path": ".github/copilot-instructions.md",
"chars": 4445,
"preview": "# GitHub Copilot SDK — Assistant Instructions\n\n**Quick purpose:** Help contributors and AI coding agents quickly underst"
},
{
"path": ".github/dependabot.yaml",
"chars": 945,
"preview": "version: 2\nmulti-ecosystem-groups:\n all:\n schedule:\n interval: 'weekly'\nupdates:\n - package-ecosystem: 'github"
},
{
"path": ".github/lsp.json",
"chars": 445,
"preview": "{\n \"lspServers\": {\n \"csharp\": {\n \"command\": \"dotnet\",\n \"args\": [\n \"tool\",\n \"run\",\n \"r"
},
{
"path": ".github/workflows/codegen-check.yml",
"chars": 1414,
"preview": "name: \"Codegen Check\"\n\non:\n push:\n branches:\n - main\n pull_request:\n types: [opened, synchronize, reopened,"
},
{
"path": ".github/workflows/collect-corrections.yml",
"chars": 798,
"preview": "name: Submit triage agent feedback\n\non:\n repository_dispatch:\n types: [triage_feedback]\n workflow_dispatch:\n inp"
},
{
"path": ".github/workflows/copilot-setup-steps.yml",
"chars": 3199,
"preview": "name: \"Copilot Setup Steps\"\n\n# This workflow configures the environment for GitHub Copilot Agent\n# Automatically run the"
},
{
"path": ".github/workflows/corrections-tests.yml",
"chars": 569,
"preview": "name: \"Triage Agent Corrections Tests\"\n\non:\n push:\n branches: [main]\n paths:\n - 'scripts/corrections/**'\n p"
},
{
"path": ".github/workflows/cross-repo-issue-analysis.lock.yml",
"chars": 60449,
"preview": "# ___ _ _ \n# / _ \\ | | (_) \n# | |_| | __ _ ___ _ __ | |_ _ ___ \n# "
},
{
"path": ".github/workflows/cross-repo-issue-analysis.md",
"chars": 5285,
"preview": "---\ndescription: Analyzes copilot-sdk issues to determine if a fix is needed in copilot-agent-runtime, then opens a link"
},
{
"path": ".github/workflows/docs-validation.yml",
"chars": 3047,
"preview": "name: \"Documentation Validation\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review]\n p"
},
{
"path": ".github/workflows/dotnet-sdk-tests.yml",
"chars": 2187,
"preview": "name: \".NET SDK Tests\"\n\non:\n push:\n branches:\n - main\n pull_request:\n types: [opened, synchronize, reopened"
},
{
"path": ".github/workflows/go-sdk-tests.yml",
"chars": 2146,
"preview": "name: \"Go SDK Tests\"\n\non:\n push:\n branches:\n - main\n pull_request:\n types: [opened, synchronize, reopened, "
},
{
"path": ".github/workflows/handle-bug.lock.yml",
"chars": 61820,
"preview": "# gh-aw-metadata: {\"schema_version\":\"v3\",\"frontmatter_hash\":\"a473a22cd67feb7f8f5225639fd989cf71705f78c9fe11c3fc757168e16"
},
{
"path": ".github/workflows/handle-bug.md",
"chars": 3357,
"preview": "---\ndescription: Handles issues classified as bugs by the triage classifier\nconcurrency:\n job-discriminator: ${{ inputs"
},
{
"path": ".github/workflows/handle-documentation.lock.yml",
"chars": 61907,
"preview": "# gh-aw-metadata: {\"schema_version\":\"v3\",\"frontmatter_hash\":\"258058e9a5e3bb707bbcfc9157b7b69f64c06547642da2526a1ff441e3a"
},
{
"path": ".github/workflows/handle-documentation.md",
"chars": 1341,
"preview": "---\ndescription: Handles issues classified as documentation-related by the triage classifier\nconcurrency:\n job-discrimi"
},
{
"path": ".github/workflows/handle-enhancement.lock.yml",
"chars": 61851,
"preview": "# gh-aw-metadata: {\"schema_version\":\"v3\",\"frontmatter_hash\":\"0a1cd53da97b1be36f489e58d1153583dc96c9b436fab3392437a8d498d"
},
{
"path": ".github/workflows/handle-enhancement.md",
"chars": 684,
"preview": "---\ndescription: Handles issues classified as enhancements by the triage classifier\nconcurrency:\n job-discriminator: ${"
},
{
"path": ".github/workflows/handle-question.lock.yml",
"chars": 61788,
"preview": "# gh-aw-metadata: {\"schema_version\":\"v3\",\"frontmatter_hash\":\"fb6cc48845814496ea0da474d3030f9e02e7d38b5bb346b70ca525c06c2"
},
{
"path": ".github/workflows/handle-question.md",
"chars": 672,
"preview": "---\ndescription: Handles issues classified as questions by the triage classifier\nconcurrency:\n job-discriminator: ${{ i"
},
{
"path": ".github/workflows/issue-classification.lock.yml",
"chars": 67292,
"preview": "# gh-aw-metadata: {\"schema_version\":\"v3\",\"frontmatter_hash\":\"1c9f9a62a510a7796b96187fbe0537fd05da1c082d8fab86cd7b99bf001"
},
{
"path": ".github/workflows/issue-classification.md",
"chars": 6114,
"preview": "---\ndescription: Classifies newly opened issues and delegates to type-specific handler workflows\non:\n issues:\n types"
},
{
"path": ".github/workflows/issue-triage.lock.yml",
"chars": 64078,
"preview": "# gh-aw-metadata: {\"schema_version\":\"v3\",\"frontmatter_hash\":\"22ed351fca21814391eea23a7470028e8321a9e2fe21fb95e31b13d0353"
},
{
"path": ".github/workflows/issue-triage.md",
"chars": 3362,
"preview": "---\ndescription: Triages newly opened issues by labeling, acknowledging, requesting clarification, and closing duplicate"
},
{
"path": ".github/workflows/nodejs-sdk-tests.yml",
"chars": 1824,
"preview": "name: \"Node.js SDK Tests\"\n\nenv:\n HUSKY: 0\n\non:\n push:\n branches:\n - main\n pull_request:\n types: [opened, s"
},
{
"path": ".github/workflows/publish.yml",
"chars": 9283,
"preview": "name: Publish SDK packages\n\nenv:\n HUSKY: 0\n\non:\n workflow_dispatch:\n inputs:\n dist-tag:\n description: \""
},
{
"path": ".github/workflows/python-sdk-tests.yml",
"chars": 2275,
"preview": "name: \"Python SDK Tests\"\n\nenv:\n PYTHONUTF8: 1\n\non:\n push:\n branches:\n - main\n pull_request:\n types: [opene"
},
{
"path": ".github/workflows/release-changelog.lock.yml",
"chars": 64158,
"preview": "# gh-aw-metadata: {\"schema_version\":\"v3\",\"frontmatter_hash\":\"c06cce5802b74e1280963eef2e92515d84870d76d9cfdefa84b56c038e2"
},
{
"path": ".github/workflows/release-changelog.md",
"chars": 9985,
"preview": "---\ndescription: Generates release notes from merged PRs/commits. Triggered by the publish workflow or manually via work"
},
{
"path": ".github/workflows/scenario-builds.yml",
"chars": 5605,
"preview": "name: \"Scenario Build Verification\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review]\n "
},
{
"path": ".github/workflows/sdk-consistency-review.lock.yml",
"chars": 61792,
"preview": "# gh-aw-metadata: {\"schema_version\":\"v3\",\"frontmatter_hash\":\"b1f707a5df4bab2e9be118c097a5767ac0b909cf3ee1547f71895c5b33c"
},
{
"path": ".github/workflows/sdk-consistency-review.md",
"chars": 5022,
"preview": "---\ndescription: Reviews PRs to ensure features are implemented consistently across all SDK language implementations\ntra"
},
{
"path": ".github/workflows/update-copilot-dependency.yml",
"chars": 4139,
"preview": "name: \"Update @github/copilot Dependency\"\n\non:\n workflow_dispatch:\n inputs:\n version:\n description: 'Tar"
},
{
"path": ".github/workflows/verify-compiled.yml",
"chars": 885,
"preview": "name: Verify compiled workflows\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review]\n pa"
},
{
"path": ".gitignore",
"chars": 85,
"preview": "\n# Documentation validation output\ndocs/.validation/\n.DS_Store\n\n# Visual Studio\n.vs/\n"
},
{
"path": ".vscode/launch.json",
"chars": 662,
"preview": "{\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"name\": \"Debug Node.js SDK (chat sample)\",\n \"type\": \"node"
},
{
"path": ".vscode/settings.json",
"chars": 672,
"preview": "{\n \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n \"editor.formatOnSave\": true,\n \"files.trimTrailingWhitespace\""
},
{
"path": "CHANGELOG.md",
"chars": 24907,
"preview": "# Changelog\n\nAll notable changes to the Copilot SDK are documented in this file.\n\nThis changelog is automatically genera"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 3232,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
},
{
"path": "CONTRIBUTING.md",
"chars": 4571,
"preview": "# Contributing\n\nThanks for your interest in contributing!\n\nThis repository contains the Copilot SDK, a set of multi-lang"
},
{
"path": "LICENSE",
"chars": 1060,
"preview": "MIT License\n\nCopyright GitHub, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof thi"
},
{
"path": "README.md",
"chars": 11333,
"preview": "# GitHub Copilot CLI SDKs\n\n\n\n[\n\nBYOK allows you to use the Copilot SDK with your own API keys from model providers, bypassi"
},
{
"path": "docs/auth/index.md",
"chars": 10052,
"preview": "# Authentication\n\nThe GitHub Copilot SDK supports multiple authentication methods to fit different use cases. Choose the"
},
{
"path": "docs/features/agent-loop.md",
"chars": 7983,
"preview": "# The Agent Loop\r\n\r\nHow the Copilot CLI processes a user message end-to-end: from prompt to `session.idle`.\r\n\r\n## Archit"
},
{
"path": "docs/features/custom-agents.md",
"chars": 34014,
"preview": "# Custom Agents & Sub-Agent Orchestration\n\nDefine specialized agents with scoped tools and prompts, then let Copilot orc"
},
{
"path": "docs/features/hooks.md",
"chars": 33031,
"preview": "# Working with Hooks\n\nHooks let you plug custom logic into every stage of a Copilot session — from the moment it starts,"
},
{
"path": "docs/features/image-input.md",
"chars": 16019,
"preview": "# Image Input\n\nSend images to Copilot sessions as attachments. There are two ways to attach images:\n\n- **File attachment"
},
{
"path": "docs/features/index.md",
"chars": 1701,
"preview": "# Features\n\nThese guides cover the capabilities you can add to your Copilot SDK application. Each guide includes example"
},
{
"path": "docs/features/mcp.md",
"chars": 9185,
"preview": "# Using MCP Servers with the GitHub Copilot SDK\n\nThe Copilot SDK can integrate with **MCP servers** (Model Context Proto"
},
{
"path": "docs/features/session-persistence.md",
"chars": 19593,
"preview": "# Session Resume & Persistence\n\nThis guide walks you through the SDK's session persistence capabilities—how to pause wor"
},
{
"path": "docs/features/skills.md",
"chars": 12066,
"preview": "# Custom Skills\n\nSkills are reusable prompt modules that extend Copilot's capabilities. Load skills from directories to "
},
{
"path": "docs/features/steering-and-queueing.md",
"chars": 18983,
"preview": "# Steering & Queueing\n\nTwo interaction patterns let users send messages while the agent is already working: **steering**"
},
{
"path": "docs/features/streaming-events.md",
"chars": 32264,
"preview": "# Streaming Session Events\n\nEvery action the Copilot agent takes — thinking, writing code, running tools — is emitted as"
},
{
"path": "docs/getting-started.md",
"chars": 48055,
"preview": "# Build Your First Copilot-Powered App\n\nIn this tutorial, you'll use the Copilot SDK to build a command-line assistant. "
},
{
"path": "docs/hooks/error-handling.md",
"chars": 14044,
"preview": "# Error Handling Hook\n\nThe `onErrorOccurred` hook is called when errors occur during session execution. Use it to:\n\n- Im"
},
{
"path": "docs/hooks/index.md",
"chars": 8310,
"preview": "# Session Hooks\n\nHooks allow you to intercept and customize the behavior of Copilot sessions at key points in the conver"
},
{
"path": "docs/hooks/post-tool-use.md",
"chars": 12355,
"preview": "# Post-Tool Use Hook\n\nThe `onPostToolUse` hook is called **after** a tool executes. Use it to:\n\n- Transform or filter to"
},
{
"path": "docs/hooks/pre-tool-use.md",
"chars": 11461,
"preview": "# Pre-Tool Use Hook\n\nThe `onPreToolUse` hook is called **before** a tool executes. Use it to:\n\n- Approve or deny tool ex"
},
{
"path": "docs/hooks/session-lifecycle.md",
"chars": 13069,
"preview": "# Session Lifecycle Hooks\n\nSession lifecycle hooks let you respond to session start and end events. Use them to:\n\n- Init"
},
{
"path": "docs/hooks/user-prompt-submitted.md",
"chars": 12538,
"preview": "# User Prompt Submitted Hook\n\nThe `onUserPromptSubmitted` hook is called when a user submits a message. Use it to:\n\n- Mo"
},
{
"path": "docs/index.md",
"chars": 3806,
"preview": "# GitHub Copilot SDK Documentation\n\nWelcome to the GitHub Copilot SDK docs. Whether you're building your first Copilot-p"
},
{
"path": "docs/integrations/microsoft-agent-framework.md",
"chars": 19515,
"preview": "# Microsoft Agent Framework Integration\n\nUse the Copilot SDK as an agent provider inside the [Microsoft Agent Framework]"
},
{
"path": "docs/observability/opentelemetry.md",
"chars": 6733,
"preview": "# OpenTelemetry Instrumentation for Copilot SDK\n\nThis guide shows how to add OpenTelemetry tracing to your Copilot SDK a"
},
{
"path": "docs/setup/azure-managed-identity.md",
"chars": 7503,
"preview": "# Azure Managed Identity with BYOK\n\nThe Copilot SDK's [BYOK mode](../auth/byok.md) accepts static API keys, but Azure de"
},
{
"path": "docs/setup/backend-services.md",
"chars": 12904,
"preview": "# Backend Services Setup\n\nRun the Copilot SDK in server-side applications — APIs, web backends, microservices, and backg"
},
{
"path": "docs/setup/bundled-cli.md",
"chars": 7068,
"preview": "# Default Setup (Bundled CLI)\n\nThe Node.js, Python, and .NET SDKs include the Copilot CLI as a dependency — your app shi"
},
{
"path": "docs/setup/github-oauth.md",
"chars": 13611,
"preview": "# GitHub OAuth Setup\n\nLet users authenticate with their GitHub accounts to use Copilot through your application. This su"
},
{
"path": "docs/setup/index.md",
"chars": 5418,
"preview": "# Setup Guides\n\nThese guides walk you through configuring the Copilot SDK for your specific use case — from personal sid"
},
{
"path": "docs/setup/local-cli.md",
"chars": 5934,
"preview": "# Local CLI Setup\n\nUse a specific CLI binary instead of the SDK's bundled CLI. This is an advanced option — you supply t"
},
{
"path": "docs/setup/scaling.md",
"chars": 17669,
"preview": "# Scaling & Multi-Tenancy\n\nDesign your Copilot SDK deployment to serve multiple users, handle concurrent sessions, and s"
},
{
"path": "docs/troubleshooting/compatibility.md",
"chars": 13061,
"preview": "# SDK and CLI Compatibility\n\nThis document outlines which Copilot CLI features are available through the SDK and which a"
},
{
"path": "docs/troubleshooting/debugging.md",
"chars": 12184,
"preview": "# Debugging Guide\n\nThis guide covers common issues and debugging techniques for the Copilot SDK across all supported lan"
},
{
"path": "docs/troubleshooting/mcp-debugging.md",
"chars": 11225,
"preview": "# MCP Server Debugging Guide\n\nThis guide covers debugging techniques specific to MCP (Model Context Protocol) servers wh"
},
{
"path": "dotnet/.config/dotnet-tools.json",
"chars": 218,
"preview": "{\n \"version\": 1,\n \"isRoot\": true,\n \"tools\": {\n \"roslyn-language-server\": {\n \"version\": \"5.5.0-2.26078.4\",\n "
},
{
"path": "dotnet/.gitignore",
"chars": 281,
"preview": "# Build results\nbin/\nobj/\n\n# Generated build props (contains CLI version)\nsrc/build/GitHub.Copilot.SDK.props\n\n# NuGet pa"
},
{
"path": "dotnet/Directory.Build.props",
"chars": 320,
"preview": "<Project>\n\n <PropertyGroup>\n <TargetFramework>net8.0</TargetFramework>\n <LangVersion>14</LangVersion>\n <Implic"
},
{
"path": "dotnet/Directory.Packages.props",
"chars": 761,
"preview": "<Project>\n\n <PropertyGroup>\n <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>\n </PropertyGroup"
},
{
"path": "dotnet/GitHub.Copilot.SDK.slnx",
"chars": 418,
"preview": "<Solution>\n <Configurations>\n <Platform Name=\"Any CPU\" />\n <Platform Name=\"x64\" />\n <Platform Name=\"x86\" />\n "
},
{
"path": "dotnet/README.md",
"chars": 34016,
"preview": "# Copilot SDK\n\nSDK for programmatic control of GitHub Copilot CLI.\n\n> **Note:** This SDK is in public preview and may ch"
},
{
"path": "dotnet/global.json",
"chars": 73,
"preview": "{\n \"sdk\": {\n \"version\": \"10.0.100\",\n \"rollForward\": \"major\"\n }\n}\n"
},
{
"path": "dotnet/nuget.config",
"chars": 335,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n <packageSources>\n <clear />\n <add key=\"nuget.org\" value=\""
},
{
"path": "dotnet/samples/Chat.cs",
"chars": 993,
"preview": "using GitHub.Copilot.SDK;\n\nawait using var client = new CopilotClient();\nawait using var session = await client.CreateSe"
},
{
"path": "dotnet/samples/Chat.csproj",
"chars": 212,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n </PropertyGroup>\n <ItemGroup>\n "
},
{
"path": "dotnet/src/ActionDisposable.cs",
"chars": 608,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/src/Client.cs",
"chars": 72206,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/src/Generated/Rpc.cs",
"chars": 176703,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/src/Generated/SessionEvents.cs",
"chars": 231735,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/src/GitHub.Copilot.SDK.csproj",
"chars": 3560,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <GenerateDocumentationFile>true</GenerateDocumentationFi"
},
{
"path": "dotnet/src/JsonRpc.cs",
"chars": 33187,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/src/MillisecondsTimeSpanConverter.cs",
"chars": 978,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/src/PermissionHandlers.cs",
"chars": 711,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/src/SdkProtocolVersion.cs",
"chars": 515,
"preview": "// Code generated by update-protocol-version.ts. DO NOT EDIT.\n\nnamespace GitHub.Copilot.SDK;\n\n/// <summary>\n/// Provides"
},
{
"path": "dotnet/src/Session.cs",
"chars": 51740,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/src/SessionFsProvider.cs",
"chars": 9785,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/src/Telemetry.cs",
"chars": 2118,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/src/Types.cs",
"chars": 100367,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/src/build/GitHub.Copilot.SDK.targets",
"chars": 8552,
"preview": "<Project>\n <!-- These targets run in consuming projects when they build -->\n <!-- CopilotCliVersion is imported from G"
},
{
"path": "dotnet/test/AssemblyInfo.cs",
"chars": 1034,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/AskUserE2ETests.cs",
"chars": 4157,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/BuiltinToolsE2ETests.cs",
"chars": 5719,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/ClientE2ETests.cs",
"chars": 9928,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/ClientLifecycleE2ETests.cs",
"chars": 3137,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/ClientOptionsE2ETests.cs",
"chars": 12355,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/ClientSessionManagementE2ETests.cs",
"chars": 2726,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/CommandsE2ETests.cs",
"chars": 4311,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/CompactionE2ETests.cs",
"chars": 4267,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/ElicitationE2ETests.cs",
"chars": 14470,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/ErrorResilienceE2ETests.cs",
"chars": 2001,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/EventFidelityE2ETests.cs",
"chars": 5329,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/HookLifecycleAndOutputE2ETests.cs",
"chars": 13051,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/HooksE2ETests.cs",
"chars": 6749,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/MultiClientCommandsElicitationE2ETests.cs",
"chars": 9371,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/MultiClientE2ETests.cs",
"chars": 14235,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/MultiTurnE2ETests.cs",
"chars": 2307,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/PendingWorkResumeE2ETests.cs",
"chars": 14938,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/PerSessionAuthE2ETests.cs",
"chars": 4528,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/PermissionE2ETests.cs",
"chars": 8873,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/RpcAgentE2ETests.cs",
"chars": 4409,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/RpcMcpAndSkillsE2ETests.cs",
"chars": 6619,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/RpcMcpConfigE2ETests.cs",
"chars": 5191,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/RpcServerE2ETests.cs",
"chars": 5983,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/RpcSessionStateE2ETests.cs",
"chars": 9682,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/RpcShellAndFleetE2ETests.cs",
"chars": 5767,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/RpcTasksAndHandlersE2ETests.cs",
"chars": 3287,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/SessionConfigE2ETests.cs",
"chars": 14934,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/SessionE2ETests.cs",
"chars": 36573,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/SessionFsE2ETests.cs",
"chars": 30930,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/SessionLifecycleE2ETests.cs",
"chars": 4828,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/SessionMcpAndAgentConfigE2ETests.cs",
"chars": 11031,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/SkillsE2ETests.cs",
"chars": 8687,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/StreamingFidelityE2ETests.cs",
"chars": 5909,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/SuspendE2ETests.cs",
"chars": 10594,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/SystemMessageTransformE2ETests.cs",
"chars": 5161,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/TelemetryExportE2ETests.cs",
"chars": 8658,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/ToolResultsE2ETests.cs",
"chars": 4958,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/E2E/ToolsE2ETests.cs",
"chars": 12291,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/GitHub.Copilot.SDK.Test.csproj",
"chars": 1256,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <IsPackable>false</IsPackable>\n <NoWarn>$(NoWarn);GHCP001</N"
},
{
"path": "dotnet/test/Harness/CapiProxy.cs",
"chars": 8656,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/Harness/E2ETestBase.cs",
"chars": 3950,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/Harness/E2ETestContext.cs",
"chars": 7555,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/Harness/E2ETestFixture.cs",
"chars": 838,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/Harness/TestHelper.cs",
"chars": 5523,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/Unit/CloneTests.cs",
"chars": 11384,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/Unit/ForwardCompatibilityTests.cs",
"chars": 7040,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/Unit/JsonRpcTests.cs",
"chars": 11538,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/Unit/PermissionRequestResultKindTests.cs",
"chars": 5500,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/Unit/PublicDtoTests.cs",
"chars": 7094,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/Unit/SerializationTests.cs",
"chars": 7221,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/Unit/SessionEventSerializationTests.cs",
"chars": 11891,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "dotnet/test/Unit/TelemetryTests.cs",
"chars": 3240,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "go/.gitignore",
"chars": 495,
"preview": "# If you prefer the allow list template instead of the deny list, see community template:\n# https://github.com/github/gi"
},
{
"path": "go/.golangci.yml",
"chars": 242,
"preview": "version: \"2\"\n\nrun:\n timeout: 5m\n tests: true\n\nlinters:\n enable:\n - govet\n - ineffassign\n - staticcheck\n dis"
},
{
"path": "go/README.md",
"chars": 35741,
"preview": "# Copilot CLI SDK for Go\n\nA Go SDK for programmatic access to the GitHub Copilot CLI.\n\n> **Note:** This SDK is in public"
},
{
"path": "go/client.go",
"chars": 56366,
"preview": "// Package copilot provides a Go SDK for interacting with the GitHub Copilot CLI.\n//\n// The copilot package enables Go a"
},
{
"path": "go/client_test.go",
"chars": 29716,
"preview": "package copilot\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"regexp\"\n\t\"sync\"\n\t\"testing\"\n\n\t\""
},
{
"path": "go/cmd/bundler/main.go",
"chars": 21051,
"preview": "// Bundler downloads Copilot CLI binaries and packages them as a binary file,\n// along with a Go source file that embeds"
},
{
"path": "go/definetool.go",
"chars": 6487,
"preview": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Micros"
},
{
"path": "go/definetool_test.go",
"chars": 14892,
"preview": "package copilot\n\nimport (\n\t\"errors\"\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc TestDefineTool(t *testing.T) {\n\tt.Run(\"creates tool wi"
},
{
"path": "go/embeddedcli/installer.go",
"chars": 642,
"preview": "package embeddedcli\n\nimport \"github.com/github/copilot-sdk/go/internal/embeddedcli\"\n\n// Config defines the inputs used t"
},
{
"path": "go/generated_session_events.go",
"chars": 112708,
"preview": "// AUTO-GENERATED FILE - DO NOT EDIT\n// Generated from: session-events.schema.json\n\npackage copilot\n\nimport (\n\t\"encoding"
},
{
"path": "go/go.mod",
"chars": 474,
"preview": "module github.com/github/copilot-sdk/go\n\ngo 1.24\n\nrequire (\n\tgithub.com/google/jsonschema-go v0.4.2\n\tgithub.com/klauspos"
},
{
"path": "go/go.sum",
"chars": 2488,
"preview": "github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.m"
},
{
"path": "go/internal/e2e/agent_and_compact_rpc_e2e_test.go",
"chars": 10344,
"preview": "package e2e\n\nimport (\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.com/github/copilot-sdk/go/interna"
},
{
"path": "go/internal/e2e/ask_user_e2e_test.go",
"chars": 4905,
"preview": "package e2e\n\nimport (\n\t\"sync\"\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.com/github/copilot-sdk/go"
},
{
"path": "go/internal/e2e/builtin_tools_e2e_test.go",
"chars": 8296,
"preview": "package e2e\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/g"
},
{
"path": "go/internal/e2e/client_api_e2e_test.go",
"chars": 4524,
"preview": "package e2e\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.com/github/copilot-sdk"
},
{
"path": "go/internal/e2e/client_e2e_test.go",
"chars": 6824,
"preview": "package e2e\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.com/github/copilot-sdk/go"
},
{
"path": "go/internal/e2e/client_lifecycle_e2e_test.go",
"chars": 4862,
"preview": "package e2e\n\nimport (\n\t\"sync/atomic\"\n\t\"testing\"\n\t\"time\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.com/github"
},
{
"path": "go/internal/e2e/client_options_e2e_test.go",
"chars": 16052,
"preview": "package e2e\n\nimport (\n\t\"encoding/json\"\n\t\"net\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n\n\tcopilot \"github.com/github/"
},
{
"path": "go/internal/e2e/commands_and_elicitation_e2e_test.go",
"chars": 21871,
"preview": "package e2e\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.com/git"
},
{
"path": "go/internal/e2e/compaction_e2e_test.go",
"chars": 4477,
"preview": "package e2e\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.com/github/copilot-sdk"
},
{
"path": "go/internal/e2e/error_resilience_e2e_test.go",
"chars": 2732,
"preview": "package e2e\n\nimport (\n\t\"context\"\n\t\"testing\"\n\t\"time\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.com/github/cop"
},
{
"path": "go/internal/e2e/event_fidelity_e2e_test.go",
"chars": 8447,
"preview": "package e2e\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n"
},
{
"path": "go/internal/e2e/hooks_e2e_test.go",
"chars": 7896,
"preview": "package e2e\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.co"
},
{
"path": "go/internal/e2e/hooks_extended_e2e_test.go",
"chars": 10631,
"preview": "package e2e\n\nimport (\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.com/gi"
},
{
"path": "go/internal/e2e/mcp_and_agents_e2e_test.go",
"chars": 12349,
"preview": "package e2e\n\nimport (\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.com/g"
},
{
"path": "go/internal/e2e/multi_client_e2e_test.go",
"chars": 18689,
"preview": "package e2e\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\tcopilot \"github.com/github/c"
},
{
"path": "go/internal/e2e/multi_turn_e2e_test.go",
"chars": 2645,
"preview": "package e2e\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github"
},
{
"path": "go/internal/e2e/pending_work_resume_e2e_test.go",
"chars": 18706,
"preview": "package e2e\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\tcopilot \"github.com/github/cop"
},
{
"path": "go/internal/e2e/per_session_auth_e2e_test.go",
"chars": 4497,
"preview": "package e2e\n\nimport (\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.com/github/copilot-sdk/go/interna"
},
{
"path": "go/internal/e2e/permissions_e2e_test.go",
"chars": 13114,
"preview": "package e2e\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\tcopilot \"github.com/github/c"
},
{
"path": "go/internal/e2e/rpc_e2e_test.go",
"chars": 11628,
"preview": "package e2e\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.com/github/copilot-sdk"
},
{
"path": "go/internal/e2e/rpc_mcp_and_skills_e2e_test.go",
"chars": 9860,
"preview": "package e2e\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t"
},
{
"path": "go/internal/e2e/rpc_mcp_config_e2e_test.go",
"chars": 8268,
"preview": "package e2e\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/github/copilot-sdk/go/internal/e2e/testharness\"\n\t\"github.com/githu"
},
{
"path": "go/internal/e2e/rpc_server_e2e_test.go",
"chars": 8366,
"preview": "package e2e\n\nimport (\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"githu"
},
{
"path": "go/internal/e2e/rpc_session_state_e2e_test.go",
"chars": 16284,
"preview": "package e2e\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.com/github/copilot-sdk"
},
{
"path": "go/internal/e2e/rpc_shell_and_fleet_e2e_test.go",
"chars": 6505,
"preview": "package e2e\n\nimport (\n\t\"crypto/rand\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\t\"testing\"\n\t\"ti"
},
{
"path": "go/internal/e2e/rpc_tasks_and_handlers_e2e_test.go",
"chars": 5290,
"preview": "package e2e\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\tcopilot \"github.com/github/copilot-sdk/go\"\n\t\"github.com/github/copilot-sdk"
}
]
// ... and 779 more files (download for full content)
About this extraction
This page contains the full source code of the github/copilot-sdk GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 979 files (6.4 MB), approximately 1.7M tokens, and a symbol index with 6413 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.