Idea: LIST/GLOB — enumerate guest files without shelling out
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start by reading the existing message set and follow-up issue #72 before deciding whether this belongs in a new RPC or an optional surface. The work would include the proto, guest implementation, and an e2e test; done means single-directory listing supports optional globbing, deterministic name ordering, pagination, and the specified file metadata.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
There is no primitive for directory enumeration on the guest filesystem. Clients that need to discover files must either exec a shell (ls/find), which couples clients to guest shell semantics and bypasses structured errors and accounting, or maintain client-side ledgers that drift from actual filesystem state.
Follow-up from #72: append makes segmented, append-only logs viable inside guests; enumeration is the complementary half of that workload. Our concrete case: agents write rotating segment files (seg.0.jsonl, seg.1.jsonl, …), and a host-side poller needs to enumerate segments it hasn't read. This generalizes to checkpoint discovery, temp-file cleanup passes, and any "what exists in this directory" query.
Proposal
Additive RPC (or an optional surface on the existing message set), single-directory scope for v1:
message ListFilesRequest {
string path = 1; // directory to list
string pattern = 2; // optional glob, e.g. "seg.*.jsonl"
int32 limit = 3; // page size
string page_token = 4;
}
message ListFilesResponse {
repeated FileEntry entries = 1;
string next_page_token = 2;
}
message FileEntry {
string name = 1;
int64 size = 2;
google.protobuf.Timestamp modified = 3;
uint32 mode = 4;
}
- Deterministic ordering: entries sorted by name.
- Pagination (
limit/page_token) keeps large directories bounded. - Out of scope for v1: recursive walks; streaming/watch semantics — the fuller long-term answer for tailing workloads, but a substantially larger surface, worth discussing separately.
Alternatives considered
- Exec
find/lsin the guest — rejected: shell coupling, unstructured output and errors, no accounting. - Client-side segment ledgers — rejected: duplicate directory state, drifts from the filesystem, and must be reimplemented in every client.
ReadFileon directories — not meaningful under current read semantics; would overload the read path.
If this fits the project's direction, I'm glad to draft the PR — proto + guest implementation + e2e test, same shape as #72.
- Ngôn ngữ chính
- Go
- Star
- 70
- Fork
- 17
- Merge trung bình
- 21 giờ 36 phút
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 agent-substrate/env
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
agent-substrate/env#123 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
agent-substrate/env#121 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
agent-substrate/env#119 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
agent-substrate/env#118 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
agent-substrate/env#117 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của agent-substrate/env
Issue tương tự
-
agent-butler-finding chore
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
jordansmall/spindrift#6318 ·
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 72/100
Eyevinn/moqlivemock#166 ·
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 72/100
JakeChampion/lang#14091 ·
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 84/100
hyperledger/fabric-x-orderer#1409 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
get actions doesn't show the approval flag, and describe action shows it unformattedCó thể đã có người làm @kenokech đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày