@vanam/postfile 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 t3dotgg
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,45 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # postfile
2
+
3
+ Upload one immutable file and return a share URL. This package belongs to Postfile, the binary-sharing fork of Postplan. Its credentials live separately in `~/.postfile`.
4
+
5
+ Build/pack from the workspace with `pnpm pack:cli`. Until npm publication is configured, install `postfile-cli.tgz` locally or run the built executable:
6
+
7
+ ```sh
8
+ node packages/cli/dist/postfile.js auth set <postfile-key>
9
+ node packages/cli/dist/postfile.js upload ./capture.png --kind screenshot --json
10
+ ```
11
+
12
+ After installation, use `postfile` directly. The default API origin is `https://postfile.martinvana.com`. `POSTFILE_API_KEY` and `POSTFILE_API_URL` override saved credentials. `--api-url` overrides the URL; a saved key is sent only to its saved origin. Environment-provided keys are sent to the selected origin. HTTPS is required outside loopback. For local development, set `POSTFILE_API_URL=http://127.0.0.1:8787`. `POSTFILE_HOME` isolates local credential/retry state for tests.
13
+
14
+ ```sh
15
+ postfile check ./capture.png --kind screenshot --json
16
+ postfile upload ./capture.png --kind screenshot --json
17
+ postfile upload ./recording.webm --kind recording --disposable --json
18
+ postfile upload ./sensitive.png --kind screenshot --private --json
19
+ postfile upload ./important.png --kind screenshot --pin --json
20
+ postfile list --json
21
+ postfile usage --json
22
+ postfile status <file-id> --json
23
+ postfile pin <file-id>
24
+ postfile unpin <file-id>
25
+ postfile private <file-id>
26
+ postfile unlisted <file-id>
27
+ postfile retain <file-id>
28
+ postfile disposable <file-id>
29
+ postfile delete <file-id>
30
+ postfile key create agent --json
31
+ postfile key revoke <key-id>
32
+ postfile auth clear
33
+ ```
34
+
35
+ Unlisted links are readable by anyone with the URL. Private links require owner credentials. For browser previews, authenticate at the server's `/auth` route using username `postfile` and the key as the password, then open the private file. Never paste the key into a URL. Browsers cache Basic credentials until their authentication cache is cleared or the session ends. Revocation is checked on every private read.
36
+
37
+ Screenshots default to disposable only with explicit `--kind screenshot`. Other files, including GIFs and recordings, default to retained. `--retain`, `--disposable`, and `--pin` control cleanup independently of visibility. Eligible captures can be removed under storage pressure after seven days; this is not a promised expiry.
38
+
39
+ Limits are decimal 20 MB raster image, 50 MB GIF, and 90 MB video/other. `--mime-type` declares a MIME claim that must agree with the bytes to receive a preview. HTML/SVG and conflicting/unknown formats download as attachments. `--metadata <json-file>` adds up to 8 KB owner-only JSON.
40
+
41
+ `check` never reserves space. An unauthenticated check validates locally with `offline: true` and `quotaReady: null`; upload requires credentials. JSON errors are written to stdout and exit with status 1.
42
+
43
+ After a timeout, repeat the identical upload command. Pending retry state retains the idempotency key and recovers a committed receipt. Each invocation after a completed upload creates a new immutable file. `--idempotency-key <key>` explicitly controls retries and remains bound to the account and full manifest. A terminal failure needs a fresh key. Folder inputs are rejected. `list --cursor <cursor>` continues pagination.
44
+
45
+ The bundled [postfile agent skill](skills/postfile/SKILL.md) documents capture sharing, privacy, retention, and retry handling. The distributable bundles its client dependencies and shared contracts; it requires no workspace packages at runtime. The default Cloudflare service is deployed; npm publication remains a separate setup step.