Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

filesystem: document hard-link behavior and report the link count in get_file_info

Aperta
#5,226 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
node.js, typescript

Direzione di ricerca

Start with src/filesystem/README.md around line 106 and the filesystem server implementation of get_file_info. Check how write_file and edit_file handle existing files, then find the fs.stat result used for file information. Add the README explanation, expose nlink, and cover the field in tests; the changeset should describe the new output field.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement server-filesystem v2

The filesystem server's README should spell out what hard links mean for reads and writes, and get_file_info should report a file's link count.

Problem

write_file and edit_file overwrite an existing file in place, and the README says so (src/filesystem/README.md:106: the file "keeps its inode, creation time, hard links and permissions"). It does not spell out the consequence: when a file inside an allowed directory is a hard link to a file elsewhere, both names are the same file, so an overwrite changes the content seen at every name, and a read returns that shared content. Some tools create hard links routinely (pnpm's content-addressable store, for example, hard-links package files into node_modules), so this can happen without anyone choosing it.

The server cannot currently tell a caller whether a file has other names: get_file_info does not report the link count.

Expected

  1. A README paragraph, under write_file (or in a short note on allowed directories), saying that the server's allowed-directory checks are path-based, that a hard link is a real name of the same file, and that overwriting or editing such a file changes it at all of its names.
  2. get_file_info reports the link count (nlink from fs.stat), so a client or model can see that a file has more than one name before changing it.

Tests for the new get_file_info field, and a changeset (minor: a new output field).

Lingua principale
TypeScript
Stelle
91.4k
Fork
11.8k
Merge medio
6h 37m
PR unite (30g)
147

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di modelcontextprotocol/servers

Tutte le issue di modelcontextprotocol/servers

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.