Skip to content

Commit 2033cce

Browse files
authored
Merge branch 'main' into morabbin/rust-session-memory-config
2 parents 5314036 + 867e78c commit 2033cce

219 files changed

Lines changed: 656 additions & 8642 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- Test harness & E2E: `test/harness/*`, Python harness wrapper `python/e2e/testharness/proxy.py`
1616
- Schemas & type generation: `nodejs/scripts/generate-session-types.ts`
1717
- Session snapshots used by E2E: `test/snapshots/` (used by the replay proxy)
18+
- Docs style guide: `.github/instructions/docs-style.instructions.md` (used for `docs/**`)
1819

1920
## Developer workflows (commands you’ll use often) ▶️
2021

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
---
2+
applyTo: "docs/**"
3+
---
4+
5+
# Copilot SDK docs style guide
6+
7+
This style guide applies to all documentation in the `docs/` directory. These docs are synced to `github/docs-internal` via a normalization pipeline, so they must follow the conventions below to be compatible with docs.github.com.
8+
9+
## Headings
10+
11+
Use **sentence case** for all headings. Capitalize only the first word and proper nouns.
12+
13+
* `## Quick start: Azure AI Foundry` — not `## Quick Start: Azure AI Foundry`
14+
* `# Custom agents and sub-agent orchestration` — not `# Custom Agents & Sub-Agent Orchestration`
15+
16+
Use `and` instead of `&` in headings.
17+
18+
Do not use `**bold**` or `*italic*` markers inside headings. The heading level provides emphasis.
19+
20+
### Proper nouns to always capitalize
21+
22+
* Products/companies: GitHub, Copilot, Azure, OpenAI, Anthropic, Microsoft, Ollama, Slack, Foundry, Kubernetes, Docker
23+
* Languages/frameworks: TypeScript, JavaScript, Python, Java, Node.js, OpenTelemetry, Express
24+
* Platforms: macOS, Linux, Windows
25+
* Protocols/formats: OAuth, JSON-RPC, JSON, YAML, HTTP, TCP, SSE, REST
26+
* Acronyms: MCP, BYOK, MAF, SDK, CLI, API, HMAC, CI/CD, SaaS, ISV, FAQ, LLM, AI, EMU, ID, UI, PNG
27+
* Tools (keep canonical casing): npm, npx, stdio
28+
* Code identifiers in headings: SessionConfig, MessageOptions, TelemetryConfig, ProviderConfig, CopilotClient
29+
* Multi-word proper names: GitHub App, GitHub Actions, GitHub OAuth, Foundry Local, Azure AD, Container Instances
30+
31+
## Callouts
32+
33+
Use GitHub-flavored alert syntax:
34+
35+
```markdown
36+
> [!NOTE]
37+
> This is a note.
38+
39+
> [!TIP]
40+
> This is a tip.
41+
42+
> [!WARNING]
43+
> This is a warning.
44+
```
45+
46+
Never use `> **Note:**` or `> **Tip:**` style callouts.
47+
48+
When a callout applies to a specific language, put the qualifier as bold text in the body:
49+
50+
```markdown
51+
> [!TIP]
52+
> **(Python / Go)** These SDKs use a single `Data` class/struct with all fields optional.
53+
```
54+
55+
## Lists
56+
57+
### Unordered lists
58+
59+
Use `*` (asterisks) for unordered list markers, not `-` (hyphens).
60+
61+
### Ordered lists
62+
63+
Use `1.` for every item in ordered lists, not sequential numbering. This makes reordering easier.
64+
65+
```markdown
66+
1. First step
67+
1. Second step
68+
1. Third step
69+
```
70+
71+
### List item formatting
72+
73+
* Capitalize the first letter of each list item.
74+
* Use periods only if the item is a complete sentence.
75+
* Introduce lists with a descriptive sentence, not vague phrases like "the following" in isolation.
76+
77+
## Em dashes
78+
79+
For list items with a **label and description**, use a colon:
80+
81+
```markdown
82+
* **Ephemeral**: not persisted to disk, not replayed on session resume
83+
```
84+
85+
For em dashes used mid-sentence, use no spaces:
86+
87+
```markdown
88+
The SDK is a transport layer—it sends your prompt to the CLI over JSON-RPC.
89+
```
90+
91+
## Horizontal rules
92+
93+
Do not use `---` as a horizontal rule to visually separate sections in the body of an article. Use headings to separate sections instead. This does not apply to YAML frontmatter delimiters.
94+
95+
## Index.md files
96+
97+
In the docs pipeline, `index.md` files become YAML-only category pages. Rich content (prose, code samples, diagrams) must live in standalone files.
98+
99+
If you are writing a new section with substantive content, create a named file (for example, `choosing-a-setup-path.md`) rather than putting the content in `index.md`.
100+
101+
## Code snippets
102+
103+
* Only modify code block contents when necessary. Keep all examples passing the SDK team's `docs-validate` workflow, rerun validation after changes, and use `docs-validate: skip` or `docs-validate: hidden` markers when appropriate.
104+
105+
## Voice and tone
106+
107+
* Use clear, simple language approachable for a wide range of readers.
108+
* Use active voice whenever possible.
109+
* Avoid idioms, slang, and region-specific phrases.
110+
* Avoid ambiguous modal verbs ("may", "might", "should", "could") when an action is required. Use definitive verbs instead.
111+
* Refer to people as "people" or "users", not "customers."
112+
113+
## Emphasis
114+
115+
* Use **bold** for UI elements and for emphasis, sparingly (no more than five contiguous words).
116+
* Do not bold text that already has other formatting (for example, all-caps placeholders).
117+
118+
## Word choice
119+
120+
| Use | Avoid |
121+
|---|---|
122+
| terminal | shell |
123+
| sign in | log in, login |
124+
| sign up | signup |
125+
| email | e-mail |
126+
| press (a key) | hit, tap |
127+
| repository | repo |
128+
| administrator | admin |
129+
| for example | e.g. |
130+
| and similar | etc. |
131+
132+
## What the pipeline handles
133+
134+
Authors do not need to worry about these — the normalization pipeline handles them automatically:
135+
136+
* YAML frontmatter (added to files for docs.github.com)
137+
* Mermaid diagram → PNG conversion
138+
* Link rewriting for docs.github.com cross-references
139+
* Liquid variable substitution (product names)
140+
* `[AUTOTITLE]` link conversion
141+
142+
## New article template
143+
144+
When creating a new docs article, use this structure:
145+
146+
```markdown
147+
# Article title in sentence case
148+
149+
A one- or two-sentence intro explaining what the reader will learn or accomplish.
150+
151+
## First section
152+
153+
Body text here.
154+
155+
## Second section
156+
157+
Body text here.
158+
159+
## Further reading
160+
161+
* [Link text](./relative-path.md): short description
162+
```

java/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ Replace `${copilot.sdk.version}` with the latest release from Maven Central.
3030
<dependency>
3131
<groupId>com.github</groupId>
3232
<artifactId>copilot-sdk-java</artifactId>
33-
<version>1.0.0</version>
33+
<version>1.0.1</version>
3434
</dependency>
3535
```
3636

3737
### Gradle
3838

3939
```groovy
40-
implementation 'com.github:copilot-sdk-java:1.0.0'
40+
implementation 'com.github:copilot-sdk-java:1.0.1'
4141
```
4242

4343
#### Snapshot Builds
@@ -56,7 +56,7 @@ Snapshot builds of the next development version are published to Maven Central S
5656
<dependency>
5757
<groupId>com.github</groupId>
5858
<artifactId>copilot-sdk-java</artifactId>
59-
<version>1.0.1-SNAPSHOT</version>
59+
<version>1.0.2-SNAPSHOT</version>
6060
</dependency>
6161
```
6262

@@ -65,7 +65,7 @@ Snapshot builds of the next development version are published to Maven Central S
6565
Replace `${copilot.sdk.version}` with the latest release from Maven Central.
6666

6767
```groovy
68-
implementation 'com.github:copilot-sdk-java:1.0.0-SNAPSHOT'
68+
implementation 'com.github:copilot-sdk-java:1.0.2-SNAPSHOT'
6969
```
7070

7171
## Quick Start

java/jbang-example.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///usr/bin/env jbang "$0" "$@" ; exit $?
2-
//DEPS com.github:copilot-sdk-java:1.0.0
2+
//DEPS com.github:copilot-sdk-java:1.0.1
33
import com.github.copilot.CopilotClient;
44
import com.github.copilot.generated.AssistantMessageEvent;
55
import com.github.copilot.generated.SessionUsageInfoEvent;

java/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>com.github</groupId>
99
<artifactId>copilot-sdk-java</artifactId>
10-
<version>1.0.1-SNAPSHOT</version>
10+
<version>1.0.2-SNAPSHOT</version>
1111
<packaging>jar</packaging>
1212

1313
<name>GitHub Copilot SDK :: Java</name>
@@ -112,7 +112,7 @@
112112
<dependency>
113113
<groupId>com.github.spotbugs</groupId>
114114
<artifactId>spotbugs-annotations</artifactId>
115-
<version>4.9.8</version>
115+
<version>4.10.2</version>
116116
<scope>provided</scope>
117117
</dependency>
118118

@@ -147,7 +147,7 @@
147147
<plugin>
148148
<groupId>com.github.spotbugs</groupId>
149149
<artifactId>spotbugs-maven-plugin</artifactId>
150-
<version>4.9.8.3</version>
150+
<version>4.10.2.0</version>
151151
<configuration>
152152
<excludeFilterFile>config/spotbugs/spotbugs-exclude.xml</excludeFilterFile>
153153
</configuration>
@@ -384,7 +384,7 @@
384384
<plugin>
385385
<groupId>org.jacoco</groupId>
386386
<artifactId>jacoco-maven-plugin</artifactId>
387-
<version>0.8.14</version>
387+
<version>0.8.15</version>
388388
<executions>
389389
<!-- Instrument bytecode before E2ETestContext runs tests with CapiProxy -->
390390
<execution>

java/scripts/codegen/java.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,6 +2059,12 @@ async function main(): Promise<void> {
20592059
console.log("🚀 Java SDK code generator");
20602060
console.log("============================");
20612061

2062+
// Clean the generated output directory to remove orphaned files from previous runs
2063+
const generatedOutputDir = path.join(REPO_ROOT, "src/generated/java/com/github/copilot/generated");
2064+
console.log(`🧹 Cleaning output directory: ${generatedOutputDir}`);
2065+
await fs.rm(generatedOutputDir, { recursive: true, force: true });
2066+
await fs.mkdir(generatedOutputDir, { recursive: true });
2067+
20622068
const sessionEventsSchemaPath = await getSessionEventsSchemaPath();
20632069
console.log(`📄 Session events schema: ${sessionEventsSchemaPath}`);
20642070
const apiSchemaPath = await getApiSchemaPath();

0 commit comments

Comments
 (0)