Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 10 additions & 47 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,63 +33,26 @@ We are generally **not** looking for:
- Additional documentation
- **SDKs for other languages** — if you want to create a Copilot SDK for another language, we'd love to hear from you and may offer to link to your SDK from our repo. However we do not plan to add further language-specific SDKs to this repo in the short term, since we need to retain our maintenance capacity for moving forwards quickly with the existing language set. For other languages, please consider running your own external project.

## Prerequisites for Running and Testing Code
## Developing an SDK

This is a multi-language SDK repository. Install the tools for the SDK(s) you plan to work on:
Setup, build, and test instructions are maintained with each SDK:

### All SDKs

1. The end-to-end tests across all languages use a shared test harness written in Node.js. Before running tests in any language, `cd test/harness && npm ci`.

### Node.js/TypeScript SDK

1. Install [Node.js](https://nodejs.org/) (v18+)
1. Install dependencies: `cd nodejs && npm ci`

### Python SDK

1. Install [Python 3.8+](https://www.python.org/downloads/)
1. Install [uv](https://github.com/astral-sh/uv)
1. Install dependencies: `cd python && uv pip install -e . --group dev`

### Go SDK

1. Install [Go 1.24+](https://go.dev/doc/install)
1. Install [golangci-lint](https://golangci-lint.run/welcome/install/#local-installation)
1. Install dependencies: `cd go && go mod download`

### .NET SDK

1. Install [.NET SDK 10+](https://dotnet.microsoft.com/download)
1. Install .NET dependencies: `cd dotnet && dotnet restore`
- [Node.js/TypeScript](nodejs/README.md#development)
- [Python](python/README.md#development)
- [Go](go/README.md#development)
- [.NET](dotnet/README.md#development)
- [Rust](rust/README.md#development)
- [Java](java/README.md#development-setup)

## Submitting a Pull Request

1. Fork and clone the repository
1. Install dependencies for the SDK(s) you're modifying (see above)
1. Make sure the tests pass on your machine (see commands below)
1. Make sure linter passes on your machine (see commands below)
1. Follow the development instructions for the SDK(s) you're modifying
1. Create a new branch: `git checkout -b my-branch-name`
1. Make your change, add tests, and make sure the tests and linter still pass
1. Make your change, add tests, and run the documented checks
1. Push to your fork and [submit a pull request][pr]
1. Pat yourself on the back and wait for your pull request to be reviewed and merged.

### Running Tests and Linters

```bash
# Node.js
cd nodejs && npm test && npm run lint

# Python
cd python && uv run pytest && uv run ruff check .

# Go
cd go && go test ./... && golangci-lint run ./...

# .NET
cd dotnet && dotnet test test/GitHub.Copilot.SDK.Test.csproj
```

Here are a few things you can do that will increase the likelihood of your pull request being accepted:

- Write tests.
Expand Down
19 changes: 19 additions & 0 deletions dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,25 @@ catch (Exception ex)
}
```

## Development

Development requires [.NET SDK 10+](https://dotnet.microsoft.com/download) and a supported [Node.js version](../nodejs/README.md#prerequisites). From the repository root:

```bash
cd nodejs
npm ci
```

```bash
cd test/harness
npm ci
```

```bash
cd dotnet
dotnet test
```
Comment thread
SteveSandersonMS marked this conversation as resolved.

## License

MIT
19 changes: 19 additions & 0 deletions go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,25 @@ Communicates with CLI via TCP socket. Useful for distributed scenarios.

- `COPILOT_CLI_PATH` - Path to the Copilot CLI executable

## Development

Tests require a supported [Node.js version](../nodejs/README.md#prerequisites). From the repository root:

```bash
cd nodejs
npm ci
```

```bash
cd test/harness
npm ci
```

```bash
cd go
./test.sh
```

## License

MIT
2 changes: 1 addition & 1 deletion java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ The gate also applies to individual methods annotated with `@CopilotExperimental

### Development Setup

Requires JDK 25 or later for development. The following steps validate the artifact built with JDK 25 runs on both 25 and 17, preserving the MR-JAR behavior.
Requires JDK 25 or later and a supported [Node.js version](../nodejs/README.md#prerequisites) for development. The following steps validate the artifact built with JDK 25 runs on both 25 and 17, preserving the MR-JAR behavior.

```bash
# Clone the repository
Expand Down
15 changes: 15 additions & 0 deletions nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,21 @@ try {
}
```

## Development

From the repository root:

```bash
cd test/harness
npm ci
```

```bash
cd nodejs
npm ci
npm test
```

## License

MIT
20 changes: 20 additions & 0 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1142,3 +1142,23 @@ When `on_elicitation_request` is provided, the SDK automatically:
- Reports the `elicitation` capability on the session
- Dispatches `elicitation.requested` events to your handler
- Auto-cancels if your handler throws an error (so the server doesn't hang)

## Development

Install [uv](https://docs.astral.sh/uv/) and a supported [Node.js version](../nodejs/README.md#prerequisites), then from the repository root:

```bash
cd nodejs
npm ci
```

```bash
cd test/harness
npm ci
```

```bash
cd python
uv sync
uv run pytest
```
19 changes: 19 additions & 0 deletions rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -965,3 +965,22 @@ github-copilot-sdk = { version = "0.1", default-features = false }
# Derive JSON Schema for tool parameters (adds to default bundled-cli).
github-copilot-sdk = { version = "0.1", features = ["derive"] }
```

## Development

Tests require a supported [Node.js version](../nodejs/README.md#prerequisites). From the repository root:

```bash
cd nodejs
npm ci
```

```bash
cd test/harness
npm ci
```

```bash
cd rust
cargo test --features test-support
```
Loading