Skip to content

Commit ce56eb8

Browse files
stephentoubCopilot
andauthored
Fix SDK documentation typos (#1235)
* Fix SDK documentation typos Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Preserve embedded CLI verbose log output Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 299ea21 commit ce56eb8

10 files changed

Lines changed: 18 additions & 18 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Advanced: You can override the bundled CLI using `cliPath` or `cliUrl` if you wa
9090

9191
### What tools are enabled by default?
9292

93-
By default, the SDK will operate the Copilot CLI in the equivalent of `--allow-all` being passed to the CLI, enabling all first-party tools, which means that the agents can perform a wide range of actions, including file system operations, Git operations, and web requests. You can customize tool availability by configuring the SDK client options to enable and disable specific tools. Refer to the individual SDK documentation for details on tool configuration and Copilot CLI for the list of tools available.
93+
By default, the SDK operates the Copilot CLI as if `--allow-all` were passed, enabling all first-party tools. This means that agents can perform a wide range of actions, including file system operations, Git operations, and web requests. You can customize tool availability by configuring the SDK client options to enable and disable specific tools. Refer to the individual SDK documentation for details on tool configuration and to the Copilot CLI documentation for the list of available tools.
9494

9595
### Can I use custom agents, skills or tools?
9696

docs/setup/github-oauth.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ async function handleOAuthCallback(code: string): Promise<string> {
113113

114114
## Step 3: pass the token to the SDK
115115

116-
Create a SDK client for each authenticated user, passing their token:
116+
Create an SDK client for each authenticated user, passing their token:
117117

118118
<details open>
119119
<summary><strong>Node.js / TypeScript</strong></summary>

docs/troubleshooting/mcp-debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ Windows Defender or other AV may block:
335335
#### Gatekeeper blocking
336336

337337
```bash
338-
# If server is blocked
338+
# If the server is blocked
339339
xattr -d com.apple.quarantine /path/to/mcp-server
340340
```
341341

dotnet/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ await using var session = await client.CreateSessionAsync(new SessionConfig
3535
OnPermissionRequest = PermissionHandler.ApproveAll,
3636
});
3737

38-
// Wait for response using session.idle event
38+
// Wait for the response using the session.idle event
3939
var done = new TaskCompletionSource();
4040

4141
session.On(evt =>

dotnet/src/JsonRpc.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ private async Task ReadLoopAsync(CancellationToken cancellationToken)
365365
// line; we walk the lines and require an exact "Content-Length: " prefix at the
366366
// start of one of them. A substring match anywhere in the header block would
367367
// false-positive on values like "X-Trace: Content-Length: 5" and desync the stream.
368-
// A missing or unparseable Content-Length means the framing is broken — there's
368+
// A missing or unparsable Content-Length means the framing is broken — there's
369369
// no safe way to resync, so throw and let the read loop terminate the connection.
370370
int contentLength = -1;
371371
ReadOnlySpan<byte> prefix = "Content-Length: "u8;

go/internal/jsonrpc2/frame.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func newHeaderWriter(w io.Writer) *headerWriter {
8282
return &headerWriter{out: w}
8383
}
8484

85-
// Write sends a single frame with Content-Length header.
85+
// Write sends a single frame with a Content-Length header.
8686
func (w *headerWriter) Write(data []byte) error {
8787
if _, err := fmt.Fprintf(w.out, "Content-Length: %d\r\n\r\n", len(data)); err != nil {
8888
return err

nodejs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const session = await client.createSession({
3838
onPermissionRequest: approveAll,
3939
});
4040

41-
// Wait for response using typed event handlers
41+
// Wait for the response using typed event handlers
4242
const done = new Promise<void>((resolve) => {
4343
session.on("assistant.message", (event) => {
4444
console.log(event.data.content);

nodejs/src/sessionFsProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import type {
1717
export type SessionFsFileInfo = Omit<SessionFsStatResult, "error">;
1818

1919
/**
20-
* Interface for session filesystem providers. Implementors use idiomatic
20+
* Interface for session filesystem providers. Implementers use idiomatic
2121
* TypeScript patterns: throw on error, return values directly. Use
2222
* {@link createSessionFsAdapter} to convert a provider into the
2323
* {@link SessionFsHandler} expected by the SDK.

python/copilot/_jsonrpc.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ async def request(
137137
self, method: str, params: dict | None = None, timeout: float | None = None
138138
) -> Any:
139139
"""
140-
Send a JSON-RPC request and wait for response
140+
Send a JSON-RPC request and wait for the response.
141141
142142
Args:
143143
method: Method name
@@ -149,8 +149,8 @@ async def request(
149149
The result from the response
150150
151151
Raises:
152-
JsonRpcError: If server returns an error
153-
asyncio.TimeoutError: If request times out (only when timeout is set)
152+
JsonRpcError: If the server returns an error
153+
asyncio.TimeoutError: If the request times out (only when timeout is set)
154154
"""
155155
request_start = time.perf_counter()
156156
request_id = str(uuid.uuid4())
@@ -198,7 +198,7 @@ async def request(
198198

199199
async def notify(self, method: str, params: dict | None = None):
200200
"""
201-
Send a JSON-RPC notification (no response expected)
201+
Send a JSON-RPC notification (no response expected).
202202
203203
Args:
204204
method: Method name
@@ -212,7 +212,7 @@ async def notify(self, method: str, params: dict | None = None):
212212
await self._send_message(message)
213213

214214
def set_notification_handler(self, handler: Callable[[str, dict], None]):
215-
"""Set handler for incoming notifications from server"""
215+
"""Set the handler for incoming notifications from the server."""
216216
self.notification_handler = handler
217217

218218
def set_request_handler(self, method: str, handler: RequestHandler):
@@ -222,7 +222,7 @@ def set_request_handler(self, method: str, handler: RequestHandler):
222222
self.request_handlers[method] = handler
223223

224224
async def _send_message(self, message: dict):
225-
"""Send a JSON-RPC message with Content-Length header"""
225+
"""Send a JSON-RPC message with a Content-Length header."""
226226
loop = self._loop or asyncio.get_event_loop()
227227

228228
def write():
@@ -311,10 +311,10 @@ def _read_exact(self, num_bytes: int) -> bytes:
311311

312312
def _read_message(self) -> dict | None:
313313
"""
314-
Read a single JSON-RPC message with Content-Length header (blocking)
314+
Read a single JSON-RPC message with a Content-Length header (blocking).
315315
316316
Returns:
317-
Parsed JSON message or None if connection closed
317+
Parsed JSON message, or None if the connection is closed.
318318
"""
319319
# Read header line
320320
header_line = self.process.stdout.readline()
@@ -362,7 +362,7 @@ def _handle_message(self, message: dict):
362362
loop.call_soon_threadsafe(future.set_exception, exc)
363363
return
364364

365-
# Check if it's a notification from server
365+
# Check if it's a notification from the server
366366
if "method" in message and "id" not in message:
367367
if self.notification_handler and self._loop:
368368
method = message["method"]

python/test_jsonrpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class TestReadMessageWithLargePayloads:
166166
"""Tests for _read_message() with large JSON-RPC messages"""
167167

168168
def create_jsonrpc_message(self, content_dict: dict) -> bytes:
169-
"""Create a complete JSON-RPC message with Content-Length header"""
169+
"""Create a complete JSON-RPC message with a Content-Length header."""
170170
content = json.dumps(content_dict, separators=(",", ":"))
171171
content_bytes = content.encode("utf-8")
172172
header = f"Content-Length: {len(content_bytes)}\r\n\r\n"

0 commit comments

Comments
 (0)