stuntman / providers / files

Files

FTP, FTPS and SFTP servers where partners drop files and your app picks them up.

Stands in for

  • FTP
  • FTPS (explicit, AUTH TLS)
  • SFTP (SSH)
  • EDI and bank file drops

Everything Files gives you

  1. 01

    Three protocols, one folder

    Each server is a folder: FTP, explicit FTPS and SFTP all see the same files, so the app can switch protocol without new fixtures.

  2. 02

    The commands EDI clients use

    PASV, EPSV, LIST, NLST, MLSD, RETR, STOR, APPE, DELE, MKD, RMD, RNFR/RNTO, SIZE, MDTM and REST.

  3. 03

    Drop a partner's file

    put_file puts text or binary on a server; the app finds it on its next poll, exactly as if the partner sent it.

  4. 04

    Wait for the app's upload

    wait_for_file blocks until a file whose path matches a * pattern appears, then returns it.

  5. 05

    Users and read-only logins

    Each server has its own users; read_only users get permission denied on writes, as a real partner account would.

  6. 06

    Every login and transfer

    list_transfers shows logins, uploads, downloads, deletes and listings, newest first, with the provoked ones marked.

  7. 07

    A stable host key

    The SFTP host key is kept on disk, so a client that pinned it keeps trusting it across restarts.

  8. 08

    Failures on the next session

    Refuse logins, fill the disk, deny permission, cut a transfer after 4 KB, slow to 20 KB/s or change the host key.

The screens

Each number is a control or a reading on the real screen. Everything you can click there, your agent can do with a tool.

A server, its folders and the next sessions

A server, its folders and the next sessions: the Files screen in Stuntman
1How to connect

SFTP on :2222, FTP on :2121 and FTPS with AUTH TLS, all on the same server.

1 of 5
2Folders

Folders made by set_file_server, such as /in for the app and /out for the partner.

2 of 5
3What the app uploaded

A file's content as text; get_file returns base64 for binary.

3 of 5
4Put a file

Drop a file as if the partner did; the app picks it up on its next poll.

4 of 5
5Provoke

Login refused (530), disk full (552), permission denied (550), drop after 4 KB, slow, host key changed.

5 of 5
  1. How to connect

    SFTP on :2222, FTP on :2121 and FTPS with AUTH TLS, all on the same server.

  2. Folders

    Folders made by set_file_server, such as /in for the app and /out for the partner.

  3. What the app uploaded

    A file's content as text; get_file returns base64 for binary.

  4. Put a file

    Drop a file as if the partner did; the app picks it up on its next poll.

  5. Provoke

    Login refused (530), disk full (552), permission denied (550), drop after 4 KB, slow, host key changed.

Logins and transfers, in order

Logins and transfers, in order: the Files screen in Stuntman
1Users and folders

Each user with its folders: files waiting in /in, files the app wrote to /out.

1 of 5
2An upload

Who uploaded, which path, size and how long it took.

2 of 5
3Refused login

A provoked login_refused is marked on the row, so it is not taken for a real bug.

3 of 5
4Did the app retry?

A provoked disk full is marked on the row, next to what the app did after it.

4 of 5
5The file itself

Fixed-width EDI shown as text; the exact bytes are kept.

5 of 5
  1. Users and folders

    Each user with its folders: files waiting in /in, files the app wrote to /out.

  2. An upload

    Who uploaded, which path, size and how long it took.

  3. Refused login

    A provoked login_refused is marked on the row, so it is not taken for a real bug.

  4. Did the app retry?

    A provoked disk full is marked on the row, next to what the app did after it.

  5. The file itself

    Fixed-width EDI shown as text; the exact bytes are kept.

Break it on purpose

The failures you need to test, exactly when you ask: from the screen or by a tool call, each one shown on the timeline with who caused it.

  • Login refused

    Every login answers 530

    set_file_server provoke login_refused
  • Disk full

    Uploads answer 552

    set_file_server provoke disk_full
  • Permission denied

    Writes answer 550

    set_file_server provoke permission_denied
  • Transfer cut

    The connection breaks after 4 KB

    set_file_server provoke drop_mid
  • Slow link

    Transfers run at 20 KB/s

    set_file_server provoke slow
  • Host key changed

    SFTP shows another host key; pinned clients refuse

    set_file_server provoke host_key_changed
  • Read-only partner

    A user that can read but gets permission denied on writes

    set_file_server users with read_only
  • Wrong password

    Users with no password take any password except wrong

    log in with password wrong

Why not the real sandbox

Your AI agent drives it

Claude Code, Codex or any MCP client connects to /mcp (or calls /api over plain HTTP), sets the stand-in up, breaks it on cue and reads what your app did.

you

Drop an orders file on the EDI server, then check that the app answers with a file in /out.

set_file_server{"name": "edi-acme", "users": [{"user": "edi", "password": "s3cret"}], "folders": ["/in", "/out"]}
→ ok edi-acme on :2121 (FTP/FTPS) and :2222 (SFTP)
put_file{"server": "edi-acme", "path": "/in/ORDERS_1042.txt", "text": "000GLOBEX ORDERS 1042"}
wait_for_file{"server": "edi-acme", "path": "/out/*.txt"}
→ ok /out/OCOREN_1042.txt · 5 KB · uploaded by edi

MCP tools

  • list_file_serversServers with users, provocation, how to connect, file counts
  • set_file_serverCreate or change a server: users, folders, provoke
  • list_filesFiles and folders on a server or under a path
  • get_fileA file's content (text or base64)
  • put_fileDrop a file as the partner would
  • delete_fileDelete a file from a server
  • list_transfersLogins and transfers, newest first
  • wait_for_fileWait for a file matching a pattern

The same over HTTP

  • PUT/api/files/servers/{name}
  • POST/api/files/servers/{server}/put
  • GET/api/files/servers/{server}/wait
  • GET/api/files/servers/{server}/file
  • GET/api/files/transfers