@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 +21 -0
- package/README.md +45 -3
- package/dist/postfile.js +18697 -0
- package/package.json +34 -3
- package/skills/postfile/SKILL.md +25 -0
package/package.json
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vanam/postfile",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Authenticated binary file sharing for agents.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/vanam/postfile.git",
|
|
10
|
+
"directory": "packages/cli"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=22.12.0"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist/",
|
|
17
|
+
"skills/",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"bin": {
|
|
21
|
+
"postfile": "dist/postfile.js"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"commander": "^14.0.0",
|
|
25
|
+
"esbuild": "^0.28.1",
|
|
26
|
+
"tsx": "^4.20.6",
|
|
27
|
+
"@postfile/contracts": "0.1.0"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"cli": "tsx src/main.ts",
|
|
34
|
+
"build": "node scripts/build.mjs",
|
|
35
|
+
"test": "node --import tsx --test test/*.test.ts"
|
|
36
|
+
}
|
|
6
37
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: postfile
|
|
3
|
+
description: Upload a screenshot, recording, or arbitrary file through the authenticated postfile CLI and return a share URL. Use for binary capture sharing, not HTML page publishing or folders.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use `postfile` with configured `POSTFILE_API_URL` and `POSTFILE_API_KEY`, or saved credentials under `~/.postfile`. Credentials and cloud resources are separate from Postplan. Missing credentials are a setup blocker; uploads never fall back to anonymous writes.
|
|
7
|
+
|
|
8
|
+
Upload one regular file:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
postfile check ./capture.png --kind screenshot --json
|
|
12
|
+
postfile upload ./capture.png --kind screenshot --json
|
|
13
|
+
postfile upload ./recording.webm --kind recording --json
|
|
14
|
+
postfile upload ./sensitive.png --kind screenshot --private --json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Unlisted links are readable by anyone with the URL. Use `--private` for sensitive captures; its URLs require owner authentication. For browser access, visit the configured origin's `/auth` route and use username `postfile` with the API key as the password, then open the private URL. Never put an API key in a URL or metadata, and exclude credentials or secrets from captures and example files. Return the receipt's `viewUrl`, and include `downloadUrl` when useful. Keep receipt policy fields with the result if retention matters.
|
|
18
|
+
|
|
19
|
+
Explicit screenshots default to disposable. Recordings, GIFs, and other files default to retained. `--disposable` opts any file into cleanup, `--retain` retains screenshots, and `--pin` protects any file. Cleanup eligibility begins seven days after upload and is not a deletion deadline; storage pressure triggers removal. Retention and visibility are independent.
|
|
20
|
+
|
|
21
|
+
The CLI checks signatures and hashes in a streaming pass. Limits are decimal 20 MB for recognized raster images, 50 MB for GIFs, and 90 MB for video/other files. HTML, SVG, and unknown formats download as attachments. `check` is advisory and reserves nothing; an offline report does not confirm server readiness.
|
|
22
|
+
|
|
23
|
+
After a timeout, repeat the same upload command. Pending uploads keep their retry key; completed invocations produce a new immutable file on the next upload. `postfile status <file-id> --json` recovers an in-progress receipt. An explicit `--idempotency-key` is bound to the same account and exact manifest. Do not change it to conceal an uncertain result. A failed terminal upload requires a new retry key.
|
|
24
|
+
|
|
25
|
+
Inspect or manage owned files with `list`, `usage`, `pin`, `unpin`, `retain`, `disposable`, `private`, `unlisted`, and `delete`. Deletion and visibility changes stop future reads immediately. A cleanup claim may make a pin conflict explicitly. At `507 storage_full`, report the quota and ask the owner to delete files or increase the allocation; do not unpin or delete unrelated assets.
|