Surface session working directory / context on `SessionMetadata` so persisted sessions can be resumed by id
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
Bắt đầu với SessionMetadata và các điểm vào list_sessions và get_session_metadata, sau đó so sánh chúng với ResumeSessionConfig, SessionListFilter và SessionRpcMetadata::snapshot. Theo dõi nơi siêu dữ liệu của các phiên không hoạt động được tập hợp và cách các trường ngữ cảnh hiện có được biểu diễn. Được xem là hoàn tất khi cả hai lệnh gọi siêu dữ liệu đều trả về các trường tùy chọn, bổ sung cho thư mục làm việc và ngữ cảnh, đồng thời hỗ trợ tiếp tục một phiên đã được lưu bền vững theo id.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Client::list_sessions and Client::get_session_metadata return SessionMetadata, which today carries only:
pub struct SessionMetadata {
pub session_id: SessionId,
pub start_time: String,
pub modified_time: String,
pub summary: Option<String>,
pub is_remote: bool,
}
There is no way to recover a persisted session's working directory (or its repository / git-root / branch context) from these calls. This makes it impossible to faithfully resume a session by id after the consuming process has restarted.
Why this is a gap
ResumeSessionConfig asks the caller to supply the working directory:
pub struct ResumeSessionConfig {
pub session_id: SessionId,
pub working_directory: Option<PathBuf>,
// ...
}
A consumer that persists only a session_id (the documented, stable handle for resume) and later wants to resume it has a chicken-and-egg problem: it needs the session's original working directory to resume correctly, but the SDK provides no way to look that up from the id. After a restart, the in-memory mapping from id to working directory is gone, and list_sessions / get_session_metadata don't return it.
The data already appears to exist server-side
Two public-surface signals suggest the working directory / context is already tracked per session and just isn't surfaced on SessionMetadata:
-
SessionListFilteralready lets callers filterlist_sessionsbycwd,git_root,repository, andbranch:pub struct SessionListFilter { pub cwd: Option<String>, pub git_root: Option<String>, pub repository: Option<String>, pub branch: Option<String>, }i.e. the server can match on these fields, but the returned metadata omits them — an asymmetry between what you can filter on and what you get back.
-
The experimental
session.metadata.snapshotRPC (SessionRpcMetadata::snapshot) already returnsworking_directoryplus aworkspacesummary (cwd / git_root / repository / branch / name),selected_model, and more — but only for an active (already-resumed) session, so it can't be used to discover where a dormant session should be resumed.
Proposed change
Surface the session's working directory and context on the dormant-session metadata path, so it can be recovered by id without first resuming:
- Add the working directory (and ideally the
cwd/git_root/repository/branchcontext, and the user-providedname) toSessionMetadata, returned by bothlist_sessionsandget_session_metadata. - All new fields optional / additive, so this is backward compatible for existing consumers.
This lets a consumer that persisted a session_id look up the session's working directory and resume it faithfully across restarts, and render accurate session lists (working directory, title) without having to resume each session first.
Alternatives considered
- Persisting an id-to-working-directory map in the consumer. Works, but duplicates state the runtime already owns and can drift from the on-disk source of truth — hence this request to make the SDK the single source of truth.
- Ngôn ngữ chính
- TypeScript
- Star
- 10.5k
- Fork
- 1.5k
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 81
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/copilot-sdk
-
Clarify SDK architecture and in-process runtime transportCó thể đã có người làm @KalebCole đã nhận 3 ngày trước. Đang mởdocumentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
github/copilot-sdk#2804 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Python ModelLimits drops max_output_tokens from model metadataCó thể đã có người làm @HDMowri đã nhận 5 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
github/copilot-sdk#2798 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/copilot-sdk#2793 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/copilot-sdk#2782 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Rust: subagent lifecycle hooks are logged as unknownCó thể đã có người làm @hackberry-lab đã nhận 7 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
github/copilot-sdk#2781 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của github/copilot-sdk
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
AOSSIE-Org/DebateAI#611 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Upgrade node-libzim to 4.7.0Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
openzim/mwoffliner#2933 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Use the README category name for website links and submissionsCó thể đã có người làm @dajiaohuang đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
birobirobiro/awesome-shadcn-ui#647 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Twake Drive picker: closePicker() never destroys the intent (stop() is on the promise returned by start(), not by create())Có thể đã có người làm @chibenwa đã nhận hôm nay. Đang mởclaude
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
linagora/twake-calendar-frontend#1498 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: Valea Prahovei TV RO SDĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày