Skip to content

Commit 0e25fc7

Browse files
authored
Changes for OSS
1 parent 324397d commit 0e25fc7

10 files changed

Lines changed: 227 additions & 13 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ dist/
33
pkg/
44
*.tsbuildinfo
55
bin/gofumpt
6+
cli/engine-cli

CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This repository is maintained by:
2+
* @github/coding-agent-core-team

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at opensource@github.com. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
## Contributing
2+
3+
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
4+
5+
Contributions to this project are released to the public under the project's open source license.
6+
7+
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
8+
9+
## Development setup
10+
11+
This repository contains a TypeScript SDK and a Go CLI for local engine testing.
12+
13+
### Prerequisites
14+
15+
- Node.js 20+
16+
- npm
17+
- Go (for working on the CLI in `cli/`)
18+
19+
### Install dependencies
20+
21+
```bash
22+
npm install
23+
```
24+
25+
## Building and testing
26+
27+
Run the existing build commands before submitting a pull request:
28+
29+
```bash
30+
npm run build
31+
cd cli && go build ./cmd/engine-cli
32+
```
33+
34+
If you change the SDK and use it from a linked local engine checkout, rebuild the SDK after your changes:
35+
36+
```bash
37+
npm run build
38+
```
39+
40+
## Submitting a pull request
41+
42+
1. Fork the repository and clone your fork.
43+
2. Create a new branch for your change.
44+
3. Make your change and keep it focused.
45+
4. Run the relevant build and test commands locally.
46+
5. Open a pull request with a clear description of the problem and solution.
47+
48+
## Resources
49+
50+
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
51+
- [Using Pull Requests](https://docs.github.com/pull-requests)
52+
- [GitHub Docs](https://docs.github.com)

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) GitHub, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The Copilot Engine SDK provides everything you need to build an engine that runs
1818
1919
## Installation
2020

21-
This package is hosted as a private GitHub repository. Add it to your `package.json`:
21+
Until this package is published to a package registry, install it directly from GitHub:
2222

2323
```json
2424
{
@@ -28,7 +28,7 @@ This package is hosted as a private GitHub repository. Add it to your `package.j
2828
}
2929
```
3030

31-
Then run `npm install`. Git credentials must be available for private repo access (e.g., `GITHUB_TOKEN`, SSH keys, or git credential helper).
31+
Then run `npm install`.
3232

3333
### Local Development
3434

@@ -244,6 +244,18 @@ Engines receive these environment variables from the platform:
244244
- **[Integration Guide](docs/integration-guide.md)** — step-by-step guide to building an engine from scratch
245245
- **[Example Engine](https://github.com/github/agent-platform-engine-example)** — reference implementation
246246

247+
## Contributing
248+
249+
See [CONTRIBUTING.md](CONTRIBUTING.md) for local setup, build commands, and pull request guidance.
250+
251+
## Support
252+
253+
See [SUPPORT.md](SUPPORT.md) for how to ask questions or report bugs.
254+
255+
## Security
256+
257+
See [SECURITY.md](SECURITY.md) for how to report security vulnerabilities.
258+
247259
## License
248260

249-
MIT
261+
See [LICENSE](LICENSE).

SECURITY.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Thanks for helping make GitHub safe for everyone.
2+
3+
# Security
4+
5+
GitHub takes the security of our software products and services seriously, including all of the open source code repositories managed through our GitHub organizations.
6+
7+
Even though open source repositories are outside of the scope of our bug bounty program and therefore not eligible for bounty rewards, we will ensure that your finding gets passed along to the appropriate maintainers for remediation.
8+
9+
## Reporting Security Issues
10+
11+
If you believe you have found a security vulnerability in this repository, please report it to us through coordinated disclosure.
12+
13+
**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.**
14+
15+
Instead, please send an email to opensource-security@github.com.
16+
17+
Please include as much of the information below as you can to help us better understand and resolve the issue:
18+
19+
- The type of issue (for example, buffer overflow, SQL injection, or cross-site scripting)
20+
- Full paths of source file(s) related to the issue
21+
- The location of the affected source code (tag, branch, commit, or direct URL)
22+
- Any special configuration required to reproduce the issue
23+
- Step-by-step instructions to reproduce the issue
24+
- Proof-of-concept or exploit code, if possible
25+
- The impact of the issue, including how an attacker might exploit it
26+
27+
## Policy
28+
29+
See GitHub's Safe Harbor Policy:
30+
https://docs.github.com/en/site-policy/security-policies/github-bug-bounty-program-legal-safe-harbor#1-safe-harbor-terms

SUPPORT.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Support
2+
3+
## How to file issues and get help
4+
5+
This project uses GitHub issues to track bugs and feature requests. Please search the existing issues before filing a new issue to avoid duplicates.
6+
7+
If you have questions about using the Copilot Engine SDK, open an issue in this repository with enough detail for maintainers to reproduce the problem or understand the request.
8+
9+
`copilot-engine-sdk` is under active development and maintained by GitHub staff. We will do our best to respond to support requests, feature requests, and community questions in a timely manner.
10+
11+
## GitHub Support Policy
12+
13+
Support for this project is limited to the resources listed above.

cli/engine-cli

-14.1 MB
Binary file not shown.

docs/integration-guide.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,16 @@ The **first thing your engine should do** is fetch the job details. This call re
102102
### Using the SDK
103103

104104
```typescript
105-
import { fetchJobDetails } from "@github/copilot-engine-sdk";
105+
import { PlatformClient } from "@github/copilot-engine-sdk";
106106
107-
const job = await fetchJobDetails(
108-
process.env.GITHUB_PLATFORM_API_URL,
109-
process.env.GITHUB_JOB_ID,
110-
process.env.GITHUB_PLATFORM_API_TOKEN,
111-
process.env.GITHUB_JOB_NONCE,
112-
);
107+
const platform = new PlatformClient({
108+
apiUrl: process.env.GITHUB_PLATFORM_API_URL!,
109+
jobId: process.env.GITHUB_JOB_ID!,
110+
token: process.env.GITHUB_PLATFORM_API_TOKEN!,
111+
nonce: process.env.GITHUB_JOB_NONCE,
112+
});
113+
114+
const job = await platform.fetchJobDetails();
113115
```
114116

115117
### Calling the API Directly
@@ -449,7 +451,7 @@ When called, it sends a `comment_reply` event to the platform, which posts a rep
449451
450452
### User-Provided MCP Servers
451453
452-
Users can configure their own MCP servers (e.g., internal code search, documentation tools, database access) through the platform. These servers are **started by the platform before your engine is launched** and run outside the firewall so they have unrestricted network access.
454+
Users can configure their own MCP servers (for example, code search, documentation tools, or database access) through the platform. These servers are **started by the platform before your engine is launched** and run outside the firewall so they have unrestricted network access.
453455
454456
The job response includes an `mcp_proxy_url` field when user MCP servers are configured. The proxy is an HTTP server that bridges your engine to the user's MCP servers. Your engine discovers available servers from the proxy and connects to them as HTTP MCP endpoints.
455457
@@ -823,7 +825,7 @@ flowchart LR
823825
```
824826

825827
```typescript
826-
import { PlatformClient, cloneRepo, finalizeChanges, fetchJobDetails } from "@github/copilot-engine-sdk";
828+
import { PlatformClient, cloneRepo, finalizeChanges } from "@github/copilot-engine-sdk";
827829
import { CopilotClient } from "@github/copilot-sdk";
828830

829831
async function main() {
@@ -835,8 +837,15 @@ async function main() {
835837
const gitToken = process.env.GITHUB_GIT_TOKEN!;
836838
const inferenceToken = process.env.GITHUB_INFERENCE_TOKEN!;
837839

840+
const platform = new PlatformClient({
841+
apiUrl,
842+
jobId,
843+
token: apiToken,
844+
nonce,
845+
});
846+
838847
// 2. Fetch job details (problem statement, repo metadata, action type)
839-
const job = await fetchJobDetails(apiUrl, jobId, apiToken, nonce);
848+
const job = await platform.fetchJobDetails();
840849

841850
// 3. Clone the repository
842851
const repoLocation = cloneRepo({

0 commit comments

Comments
 (0)