Skip to content

Commit 85483d5

Browse files
tclemCopilot
andcommitted
Move SessionFs ADR out of public crate
ADR 0001 (SessionFsProvider trait and plumbing) captured the design rationale for choosing direct Arc<dyn SessionFsProvider> registration over the factory-closure pattern that Node/Python/Go use. That rationale is internal release-engineering history, not consumer-facing API documentation; the README's "Differences From Other SDKs" section already explains what consumers need to know about the divergence. The full ADR is being relocated to the private SDK release-plan documentation in github/github-app PR #3166 (docs/copilot/2026-04-14-sdk-release/). - Delete rust/docs/ entirely (only contained ADR 0001 + index README). - Strip ADR links from rustdoc, README, CHANGELOG, and the session_fs example. The README's existing inline rationale (factory pattern doesn't cleanly express in Rust at the session-config call site, no `Session` value to thread in, SDK already prefers traits over closures for handler-shaped APIs) is sufficient on its own. cargo doc -D warnings clean. cargo clippy clean. cargo fmt clean. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 802dc3b commit 85483d5

8 files changed

Lines changed: 3 additions & 511 deletions

File tree

rust/CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,7 @@ public surface.
274274
so providers only override the methods they need and forward-compatible
275275
schema additions land without breaking existing implementations.
276276
Diverges from Node/Python/Go's factory-closure pattern in favor of
277-
direct `Arc<dyn SessionFsProvider>` registration — see
278-
`docs/adr/0001-session-fs-provider.md` for the rationale.
277+
direct `Arc<dyn SessionFsProvider>` registration.
279278
- W3C Trace Context propagation: new [`TraceContext`] struct and
280279
[`TraceContextProvider`] async trait in `crate::trace_context` (also
281280
re-exported from `crate::types`). Hybrid shape combines Node's

rust/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,7 @@ ergonomics the dynamically-typed SDKs don't.
520520
cleanly express in Rust at the session-config call site — there is no
521521
`Session` value to thread in, and the SDK already prefers traits over
522522
boxed closures for handler-shaped APIs (`SessionHandler`, `SessionHooks`,
523-
`ToolHandler`). See
524-
[`docs/adr/0001-session-fs-provider.md`](docs/adr/0001-session-fs-provider.md)
525-
for the full design rationale, including the rejected factory variant
526-
and a forward-compat escape hatch.
523+
`ToolHandler`).
527524

528525
```rust,ignore
529526
use std::sync::Arc;

rust/docs/adr/0001-session-fs-provider.md

Lines changed: 0 additions & 470 deletions
This file was deleted.

rust/docs/adr/README.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

rust/examples/session_fs.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
//! sessions, projecting files into virtual storage, or applying permission
66
//! policies before bytes are read or written.
77
//!
8-
//! See `docs/adr/0001-session-fs-provider.md` for the design rationale,
9-
//! including why this SDK uses direct `Arc<dyn SessionFsProvider>`
10-
//! registration rather than the factory-closure pattern used by the Node,
11-
//! Python, and Go SDKs.
12-
//!
138
//! ```sh
149
//! cargo run -p github-copilot-sdk --example session_fs
1510
//! ```

rust/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ pub struct ClientOptions {
356356
/// the CLI. Each session created on this client must supply its own
357357
/// [`SessionFsProvider`] via
358358
/// [`SessionConfig::with_session_fs_provider`](crate::SessionConfig::with_session_fs_provider).
359-
/// See `docs/adr/0001-session-fs-provider.md`.
360359
pub session_fs: Option<SessionFsConfig>,
361360
/// Optional [`TraceContextProvider`] used to inject W3C Trace Context
362361
/// headers (`traceparent` / `tracestate`) on outbound `session.create`,

rust/src/session_fs.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
//! applications sandbox sessions, project files into in-memory or remote
77
//! storage, and apply permission policies before bytes move.
88
//!
9-
//! See `rust/docs/adr/0001-session-fs-provider.md` for the full design
10-
//! rationale, including why this SDK uses direct `Arc<dyn SessionFsProvider>`
11-
//! registration rather than the factory-closure pattern used by Node, Python,
12-
//! and Go.
13-
//!
149
//! # Concurrency
1510
//!
1611
//! Each inbound `sessionFs.*` request is dispatched on its own spawned task,

rust/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ pub struct SessionConfig {
767767
/// Custom session filesystem provider for this session. Required when
768768
/// the [`Client`](crate::Client) was started with
769769
/// [`ClientOptions::session_fs`](crate::ClientOptions::session_fs) set.
770-
/// See [`SessionFsProvider`] and `docs/adr/0001-session-fs-provider.md`.
770+
/// See [`SessionFsProvider`].
771771
#[serde(skip)]
772772
pub session_fs_provider: Option<Arc<dyn SessionFsProvider>>,
773773
/// Session-level event handler. The default is

0 commit comments

Comments
 (0)