@narumitw/pi-image-drop 0.20.2 โ†’ 0.25.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.
Files changed (2) hide show
  1. package/README.md +29 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,12 +1,22 @@
1
1
  # ๐Ÿ–ผ๏ธ pi-image-drop โ€” Browser Image Staging for Pi
2
2
 
3
- [![npm](https://img.shields.io/npm/v/@narumitw/pi-image-drop)](https://www.npmjs.com/package/@narumitw/pi-image-drop) [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE)
3
+ [![npm](https://img.shields.io/npm/v/@narumitw/pi-image-drop)](https://www.npmjs.com/package/@narumitw/pi-image-drop) [![Pi extension](https://img.shields.io/badge/Pi-extension-blue)](https://pi.dev) [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE)
4
4
 
5
5
  `@narumitw/pi-image-drop` adds one `/image-drop` command to the latest [Pi Coding Agent](https://pi.dev). It serves a private loopback page where you can paste, drop, choose, preview, reorder, retry, and remove local images. The ordered batch is attached to your next non-empty interactive Pi message.
6
6
 
7
7
  The page never contains a prompt or Attach button: Pi remains the only place where messages are written and sent.
8
8
 
9
- ## Install
9
+ ## โœจ Features
10
+
11
+ - Stages pasted, dropped, or selected images on a private loopback page.
12
+ - Preserves an ordered batch for the next non-empty interactive Pi message.
13
+ - Previews, reorders, retries, and removes images before submission.
14
+ - Supports PNG, JPEG, WebP, GIF, BMP, TIFF, HEIC/HEIF, and AVIF input.
15
+ - Applies orientation, strips private metadata, and enforces Pi-compatible image limits.
16
+ - Keeps bounded sent-image history for explicit re-attachment during the live session.
17
+ - Reports batch state above Pi's editor and can start automatically with each session.
18
+
19
+ ## ๐Ÿ“ฆ Install
10
20
 
11
21
  ```bash
12
22
  pi install npm:@narumitw/pi-image-drop
@@ -22,7 +32,7 @@ just try image-drop
22
32
 
23
33
  This package targets the latest Pi release and uses its `agent_settled` lifecycle event. Older Pi releases are not supported.
24
34
 
25
- ## Workflow
35
+ ## ๐Ÿš€ Workflow
26
36
 
27
37
  1. Run `/image-drop` in an interactive Pi session. You can instead set `startOnSessionStart: true` to start the service with every Pi session.
28
38
  2. Pi prints and displays a clickable one-time `http://127.0.0.1:<port>/...` link. The extension does **not** open a browser, including when session startup is enabled.
@@ -35,7 +45,7 @@ The `๐Ÿ–ผ๏ธ` widget above Pi's editor reports ready, uploading, error, and queu
35
45
 
36
46
  By default, the loopback service starts lazily when you run `/image-drop`. With `startOnSessionStart: true`, it starts after each Pi session initializes and displays the link in Pi automatically. Each later `/image-drop` invocation reuses the service and rotates the unused one-time link. A browser refresh keeps the current in-memory batch and sent-image history. Opening the authenticated page in another tab gives the new tab the editing lease and makes the old tab stale. Reloading, replacing, forking, or shutting down the Pi session releases both the draft and all retained history.
37
47
 
38
- ## Supported images
48
+ ## ๐Ÿ–ผ๏ธ Supported images
39
49
 
40
50
  | Input | Provider-ready output |
41
51
  | --- | --- |
@@ -52,7 +62,7 @@ Detection uses file signatures, not filenames or browser MIME types. SVG, HTML,
52
62
 
53
63
  The processor applies orientation and removes EXIF (including GPS), XMP, IPTC, comments, and other sensitive metadata. It retains an ICC color profile and animated GIF timing where the output format supports them. With Pi's `images.autoResize` enabled (the default), output is reduced to fit Pi's 2,000-pixel and approximately 4.5 MiB Base64 inline limits. With it disabled, output that exceeds either limit fails visibly instead of being resized.
54
64
 
55
- ## Configuration
65
+ ## โš™๏ธ Configuration
56
66
 
57
67
  Image Drop has one optional **global-only** JSON file:
58
68
 
@@ -93,7 +103,7 @@ Limit values are positive integer counts/bytes/pixels, and `startOnSessionStart`
93
103
 
94
104
  At upload and submission time, the extension also re-reads Pi's documented global and trusted-project `images.autoResize` and `images.blockImages` settings. `blockImages: true` or a text-only current model blocks processing/submission without discarding the draft.
95
105
 
96
- ## Security and privacy
106
+ ## ๐Ÿ” Security and privacy
97
107
 
98
108
  - The HTTP listener binds only to a random `127.0.0.1` port.
99
109
  - A rotating bootstrap token is exchanged once for an HttpOnly, `SameSite=Strict` session cookie, then removed from the URL.
@@ -105,7 +115,7 @@ At upload and submission time, the extension also re-reads Pi's documented globa
105
115
 
106
116
  A loopback page is local to your operating-system network namespace. Do not expose the port to a LAN or public interface.
107
117
 
108
- ## Platforms, browsers, and remote environments
118
+ ## ๐Ÿ–ฅ๏ธ Platforms, browsers, and remote environments
109
119
 
110
120
  The supported local targets are current macOS, Windows, desktop Linux, and WSL with current stable Chrome, Edge, Firefox, or Safari where those browsers are available. Native `sharp` packages are installed for the current platform; HEVC-backed HEIC and BMP use bounded portable decoders because the patent-safe prebuilt `sharp`/libvips bundle omits them.
111
121
 
@@ -117,7 +127,7 @@ ssh -L 45678:127.0.0.1:45678 user@remote-host
117
127
 
118
128
  Then open the unchanged `http://127.0.0.1:45678/...` link locally. Image Drop does not provide a cloud relay or remote upload endpoint.
119
129
 
120
- ## Limitations
130
+ ## ๐Ÿšง Limitations
121
131
 
122
132
  - Only `/image-drop` is registered; there is no `/image-drop clear` command.
123
133
  - A non-empty interactive Pi message is required. RPC, extension-generated, slash-command, and image-only inputs do not consume the batch.
@@ -126,7 +136,7 @@ Then open the unchanged `http://127.0.0.1:45678/...` link locally. Image Drop do
126
136
  - Sent history exists only for the current live Pi session. It is not reconstructed from the transcript, persisted across sessions, or shared with another Pi process.
127
137
  - FIFO retention can remove the oldest sent images automatically at the configured count or memory limit; the browser displays the current usage and limit.
128
138
 
129
- ## Package layout
139
+ ## ๐Ÿ—‚๏ธ Package layout
130
140
 
131
141
  ```text
132
142
  src/image-drop.ts Pi extension entrypoint
@@ -139,7 +149,7 @@ src/pi-settings.ts effective Pi image settings adapter
139
149
  src/web/ framework-free browser page
140
150
  ```
141
151
 
142
- ## Development
152
+ ## ๐Ÿงช Development
143
153
 
144
154
  From the repository root:
145
155
 
@@ -152,7 +162,7 @@ just pack image-drop
152
162
 
153
163
  The dry-run package must contain the manifest, license, README, TypeScript sources, and static web assets, but no tests, fixtures, image bytes, or `node_modules`.
154
164
 
155
- ## Publishing
165
+ ## ๐Ÿš€ Publishing
156
166
 
157
167
  The first publication is intentionally a maintainer action:
158
168
 
@@ -161,3 +171,11 @@ npm publish --workspace @narumitw/pi-image-drop --access public
161
171
  ```
162
172
 
163
173
  `just npm-public` only changes visibility after a scoped package already exists. Do not publish from an implementation or verification run.
174
+
175
+ ## ๐Ÿ”Ž Keywords
176
+
177
+ Pi extension, Pi Coding Agent, browser image staging, image prompt, local image upload, metadata removal, local-first AI coding agent.
178
+
179
+ ## ๐Ÿ“„ License
180
+
181
+ MIT. See [`LICENSE`](./LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narumitw/pi-image-drop",
3
- "version": "0.20.2",
3
+ "version": "0.25.0",
4
4
  "description": "Pi extension for staging browser images and attaching them to the next message.",
5
5
  "type": "module",
6
6
  "license": "MIT",