3.2 KiB
AGENTS.md
Purpose
This repository is a Thunderbird Manifest V3 Filelink/cloudFile provider scaffold for PsiTransfer. Treat it as an integration-in-progress, not a finished provider.
Required source of truth
Before changing PsiTransfer integration behavior:
- Check whether
/tmp/psitransferalready exists. - If it does not exist, clone it:
git clone https://github.com/psi-4ward/psitransfer.git /tmp/psitransfer
- Use
/tmp/psitransferas the primary source of truth for the effective upload/download interface. - Use the official Thunderbird docs, especially: https://webextension-api.thunderbird.net/en/mv3/cloudFile.html
Thunderbird library rule
Thunderbird add-ons are strict about how third-party libraries are referenced. Do not load tus-js-client or other dependencies from a CDN at runtime.
For this repository:
- Use the vendored local copy at
vendor/tus.js - Do not switch background/UI code to
https://cdn.jsdelivr.net/...references - If the tus client needs to be updated, download the new bundle into the repository first and record the exact resolved version in docs or commit notes
Current vendored tus client:
- Source URL used:
https://cdn.jsdelivr.net/npm/tus-js-client@latest/dist/tus.js - Resolved package version at download time:
4.3.1 - Local path:
vendor/tus.js
Interpretation rules
Distinguish clearly between:
tusstandard behavior- PsiTransfer-specific behavior
- Thunderbird
cloudFile/ Filelink behavior
Do not invent a polished public PsiTransfer API if the code only exposes an internal frontend-facing interface.
When uncertain, cite exact PsiTransfer source files and line ranges in notes or docs. Prefer adding a TODO with file references over guessing behavior.
Minimal-v1 scope
Preserve a minimal-v1 mindset:
- configure endpoint
- upload
- obtain share URL
- skip delete/rename/reuse if source support is weak
Prefer explicit TODOs over guessed implementations.
Concrete workflow
- Inspect
manifest.jsonand the existing scaffold undersrc/andui/. - Inspect
/tmp/psitransferfrontend and backend routes. - Document the inferred HTTP flow with exact source references.
- Implement the minimal upload path.
- Verify the generated share URL and Thunderbird
cloudFilereturn shape. - Only then add optional delete, reuse, or rename support.
PsiTransfer-specific notes to verify
- Upload config is exposed from PsiTransfer server-side code, not an external API contract by itself.
- Upload password behavior and bucket password behavior are different concerns.
sidhandling may mix PsiTransfer frontend convenience with server upload metadata requirements.- Bucket locking is part of the upload flow and must not be dropped casually.
- Delete and rename support must not be claimed unless the PsiTransfer source clearly supports them for uploaded items.
Files to update carefully
src/psitransfer/client.jssrc/cloudfile/provider.jssrc/cloudfile/account-store.jsdocs/psitransfer-notes.mdREADME.md
Documentation expectation
If you infer or change transport behavior, update docs/psitransfer-notes.md with:
- the exact PsiTransfer files consulted
- the relevant line ranges
- what is confirmed
- what is still unresolved