@narumitw/pi-webui 0.22.0 โ 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.
- package/README.md +15 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# ๐ pi-webui โ Current-session Web Companion for Pi
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@narumitw/pi-webui) [](./LICENSE)
|
|
3
|
+
[](https://www.npmjs.com/package/@narumitw/pi-webui) [](https://pi.dev) [](./LICENSE)
|
|
4
4
|
|
|
5
5
|
`@narumitw/pi-webui` adds a private, lightweight browser companion to the current terminal-owned [Pi Coding Agent](https://pi.dev) session. It displays Pi's semantic conversation and tool activity as they happen and can send text or sanitized images back into that same session.
|
|
6
6
|
|
|
7
7
|
This package is intentionally different from the broader, separately maintained `@narumitw/pi-web` application. WebUI has one current-session chat page and no session manager, shell, file browser, git UI, control room, or task board.
|
|
8
8
|
|
|
9
|
-
## Features
|
|
9
|
+
## โจ Features
|
|
10
10
|
|
|
11
11
|
- Streams current-branch user and assistant messages, assistant text updates, tool activity/results, errors, and busy/idle state over Server-Sent Events.
|
|
12
12
|
- Renders a safe Markdown subset for headings, lists, emphasis, code, blockquotes, and HTTP(S) links without executing model-provided HTML.
|
|
@@ -18,7 +18,7 @@ This package is intentionally different from the broader, separately maintained
|
|
|
18
18
|
- Keeps a failed browser draft and prevents rapid duplicate submission with request IDs.
|
|
19
19
|
- Uses no frontend framework, build step, browser storage, remote service, or automatically launched browser.
|
|
20
20
|
|
|
21
|
-
## Install
|
|
21
|
+
## ๐ฆ Install
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
24
|
pi install npm:@narumitw/pi-webui
|
|
@@ -34,7 +34,7 @@ just try webui
|
|
|
34
34
|
|
|
35
35
|
The package targets the latest Pi release.
|
|
36
36
|
|
|
37
|
-
## Usage
|
|
37
|
+
## ๐ Usage
|
|
38
38
|
|
|
39
39
|
1. Start Pi in a terminal and run `/webui`.
|
|
40
40
|
2. Open the one-time `http://127.0.0.1:<port>/bootstrap?...` link shown by Pi. The extension does not open a browser itself.
|
|
@@ -44,7 +44,7 @@ The package targets the latest Pi release.
|
|
|
44
44
|
|
|
45
45
|
If another installed extension also registers `/webui`, Pi assigns numeric command suffixes according to extension load order. Check Pi's command provenance and invoke the WebUI entry.
|
|
46
46
|
|
|
47
|
-
## Commands
|
|
47
|
+
## ๐ฌ Commands
|
|
48
48
|
|
|
49
49
|
| Command | Behavior |
|
|
50
50
|
| --- | --- |
|
|
@@ -56,7 +56,7 @@ If another installed extension also registers `/webui`, Pi assigns numeric comma
|
|
|
56
56
|
|
|
57
57
|
Argument completion is available for all subcommands. Bare `/webui` remains the direct browser-link action.
|
|
58
58
|
|
|
59
|
-
## Settings
|
|
59
|
+
## โ๏ธ Settings
|
|
60
60
|
|
|
61
61
|
WebUI has one optional, **global-only** JSON settings file:
|
|
62
62
|
|
|
@@ -100,13 +100,13 @@ Settings are reloaded on every `session_start`. Changes made in `/webui settings
|
|
|
100
100
|
|
|
101
101
|
In print, JSON, and RPC modes, `/webui settings` does not open custom TUI or write protocol-breaking output. Use `/webui status`, `/webui help`, or edit the reported path manually.
|
|
102
102
|
|
|
103
|
-
## What synchronization means
|
|
103
|
+
## ๐ What synchronization means
|
|
104
104
|
|
|
105
105
|
WebUI mirrors Pi's semantic session events, not terminal pixels. It displays conversation content, streaming assistant state, tool calls/results, errors, and activity using browser-native presentation. It does not reproduce ANSI colors, terminal wrapping, footer/widgets, built-in dialogs, arbitrary custom TUI components, or unsent terminal editor text.
|
|
106
106
|
|
|
107
107
|
The initial transcript comes from the active session branch. Unsent browser message text and ordered attachment references are authoritative in the live Pi process, so refresh, reconnect, and active-tab takeover restore the same draft without creating a second transcript or altering Pi's session tree. Text edits are revisioned and saved with bounded, deduplicated mutations; stale or delayed responses cannot overwrite newer typing.
|
|
108
108
|
|
|
109
|
-
## Images
|
|
109
|
+
## ๐ผ๏ธ Images
|
|
110
110
|
|
|
111
111
|
| Input | Provider-ready output |
|
|
112
112
|
| --- | --- |
|
|
@@ -129,7 +129,7 @@ Pi's effective global and trusted-project `images.autoResize` and `images.blockI
|
|
|
129
129
|
|
|
130
130
|
When `retainSentImages` is enabled, only provider-ready sanitized bytes transfer into a separate session-memory store after Pi accepts the matching browser message. Content-identical sanitized images share one opaque session reference. Oldest entries are evicted first when either retention ceiling is exceeded. WebUI also reconciles retained, current-draft, and conservative in-flight processing bytes against one aggregate resident-image budget (the larger of the configured retention byte ceiling and the staging store's maximum working set), evicting sent entries before that aggregate can grow. Eligible transcript image chips offer **Attach again** and **Forget**; evicted or forgotten references read **Expired**, and terminal-origin images never gain those actions. Attach again clones the retained bytes into the current authoritative draft, reuses normal count/byte admission, and never mutates the earlier message. Refresh and active-tab takeover recover eligibility from Pi-process state; session replacement, reload, shutdown, or process exit releases all retained bytes.
|
|
131
131
|
|
|
132
|
-
## Security and privacy
|
|
132
|
+
## ๐ Security and privacy
|
|
133
133
|
|
|
134
134
|
- The server binds only to a random `127.0.0.1` port and is owned by one live Pi session.
|
|
135
135
|
- A rotating bootstrap token is exchanged once for a per-server HttpOnly, `SameSite=Strict` cookie and removed from the URL.
|
|
@@ -141,11 +141,11 @@ When `retainSentImages` is enabled, only provider-ready sanitized bytes transfer
|
|
|
141
141
|
|
|
142
142
|
A loopback page is local to the operating-system network namespace. WebUI does not support LAN/public binding or a cloud relay. For SSH, containers, or devcontainers, forward the exact printed port and preserve the `127.0.0.1:<port>` Host value.
|
|
143
143
|
|
|
144
|
-
## Accessibility and browsers
|
|
144
|
+
## โฟ Accessibility and browsers
|
|
145
145
|
|
|
146
146
|
The page uses semantic headings, native disclosure/dialog controls, concise status/alert live regions, accessible labels, visible keyboard focus, at least 44 px controls, keyboard image preview/removal/reordering, `Ctrl/Command+Enter` submission, reduced-motion handling, dark mode, and responsive reflow. It targets current stable desktop Chrome, Edge, Firefox, and Safari.
|
|
147
147
|
|
|
148
|
-
## Limitations
|
|
148
|
+
## ๐ง Limitations
|
|
149
149
|
|
|
150
150
|
- One active Pi session and one active browser editing tab only.
|
|
151
151
|
- No persistent browser transcript, permanent sent-image gallery, cross-session image history, remote access, PTY/terminal control, model/settings controls, or session switching.
|
|
@@ -153,7 +153,7 @@ The page uses semantic headings, native disclosure/dialog controls, concise stat
|
|
|
153
153
|
- Browser acknowledgment means Pi accepted or queued the message. Provider failures follow Pi's normal session/retry behavior.
|
|
154
154
|
- Built-in TUI commands and dialogs are not reimplemented in the browser.
|
|
155
155
|
|
|
156
|
-
## Package layout
|
|
156
|
+
## ๐๏ธ Package layout
|
|
157
157
|
|
|
158
158
|
```text
|
|
159
159
|
src/webui.ts Pi extension entrypoint
|
|
@@ -170,7 +170,7 @@ src/pi-settings.ts effective Pi image settings reader
|
|
|
170
170
|
src/web/ framework-free browser page
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
## Development
|
|
173
|
+
## ๐งช Development
|
|
174
174
|
|
|
175
175
|
From the repository root:
|
|
176
176
|
|
|
@@ -183,10 +183,10 @@ just pack webui
|
|
|
183
183
|
|
|
184
184
|
The package preview must contain its manifest, license, README, TypeScript source, and static web assets, but no tests, fixtures, cache, or `node_modules`.
|
|
185
185
|
|
|
186
|
-
## Keywords
|
|
186
|
+
## ๐ Keywords
|
|
187
187
|
|
|
188
188
|
Pi extension, Pi Coding Agent, browser companion, local web chat, terminal session sync, Server-Sent Events, image prompt, tool activity, local-first AI coding agent.
|
|
189
189
|
|
|
190
|
-
## License
|
|
190
|
+
## ๐ License
|
|
191
191
|
|
|
192
192
|
MIT
|