litepaseo 0.2.0 → 0.3.1
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/CHANGELOG.md +78 -0
- package/README.md +113 -39
- package/dist/server/cli.mjs +1346 -150
- package/dist/web/assets/{CodeBlockNode-CehKIzSk.js → CodeBlockNode-fLbELjCG.js} +1 -1
- package/dist/web/assets/CodeBlockNode-fLbELjCG.js.br +0 -0
- package/dist/web/assets/CodeBlockNode-fLbELjCG.js.gz +0 -0
- package/dist/web/assets/{FileViewer-01t53KTX.js → FileViewer-C7zGfiFt.js} +1 -1
- package/dist/web/assets/FileViewer-C7zGfiFt.js.br +0 -0
- package/dist/web/assets/FileViewer-C7zGfiFt.js.gz +0 -0
- package/dist/web/assets/{FilesPanel-B7NknFvl.js → FilesPanel-B1YfdWK8.js} +1 -1
- package/dist/web/assets/FilesPanel-B1YfdWK8.js.br +0 -0
- package/dist/web/assets/FilesPanel-B1YfdWK8.js.gz +0 -0
- package/dist/web/assets/{MarkdownMessage-UlvozPc5.js → MarkdownMessage-C30PkBRA.js} +5 -5
- package/dist/web/assets/MarkdownMessage-C30PkBRA.js.br +0 -0
- package/dist/web/assets/{MarkdownMessage-UlvozPc5.js.gz → MarkdownMessage-C30PkBRA.js.gz} +0 -0
- package/dist/web/assets/{PreCodeBlock-DPQTlYty.js → PreCodeBlock-3ozveRNf.js} +1 -1
- package/dist/web/assets/{PreCodeBlock.vue_vue_type_style_index_0_lang-Cdy-YZRP.js → PreCodeBlock.vue_vue_type_style_index_0_lang-BPnMZFbo.js} +1 -1
- package/dist/web/assets/PreCodeBlock.vue_vue_type_style_index_0_lang-BPnMZFbo.js.br +0 -0
- package/dist/web/assets/PreCodeBlock.vue_vue_type_style_index_0_lang-BPnMZFbo.js.gz +0 -0
- package/dist/web/assets/{TerminalPanel-BdmAonFr.js → TerminalPanel-BR2okuCE.js} +1 -1
- package/dist/web/assets/TerminalPanel-BR2okuCE.js.br +0 -0
- package/dist/web/assets/TerminalPanel-BR2okuCE.js.gz +0 -0
- package/dist/web/assets/{Tooltip-BJ2o2M_0.js → Tooltip-Dh7ELGI1.js} +1 -1
- package/dist/web/assets/Tooltip-Dh7ELGI1.js.br +0 -0
- package/dist/web/assets/Tooltip-Dh7ELGI1.js.gz +0 -0
- package/dist/web/assets/index-BJ4CkuXT.js +30 -0
- package/dist/web/assets/index-BJ4CkuXT.js.br +0 -0
- package/dist/web/assets/index-BJ4CkuXT.js.gz +0 -0
- package/dist/web/assets/index-CaFqUnEO.css +1 -0
- package/dist/web/assets/index-CaFqUnEO.css.br +0 -0
- package/dist/web/assets/index-CaFqUnEO.css.gz +0 -0
- package/dist/web/assets/{index10-WpTfisco.js → index10-BXOnBXXV.js} +1 -1
- package/dist/web/assets/index10-BXOnBXXV.js.br +0 -0
- package/dist/web/assets/index10-BXOnBXXV.js.gz +0 -0
- package/dist/web/assets/index3-C1CbKHXb.js +1 -0
- package/dist/web/assets/index4-CE4EA6Rx.js +1 -0
- package/dist/web/assets/{index5-BCbIyN1t.js → index5-BrR0S3K6.js} +1 -1
- package/dist/web/assets/index5-BrR0S3K6.js.br +0 -0
- package/dist/web/assets/index5-BrR0S3K6.js.gz +0 -0
- package/dist/web/assets/{index6-CbdnTDhy.js → index6-DWBoE2gM.js} +1 -1
- package/dist/web/assets/index6-DWBoE2gM.js.br +0 -0
- package/dist/web/assets/index6-DWBoE2gM.js.gz +0 -0
- package/dist/web/assets/{index7-BzNzdNxO.js → index7-CoJTOvQ5.js} +1 -1
- package/dist/web/assets/index7-CoJTOvQ5.js.br +0 -0
- package/dist/web/assets/index7-CoJTOvQ5.js.gz +0 -0
- package/dist/web/assets/{index8-CD8jmACo.js → index8-CQGhir4p.js} +1 -1
- package/dist/web/assets/index8-CQGhir4p.js.br +0 -0
- package/dist/web/assets/index8-CQGhir4p.js.gz +0 -0
- package/dist/web/assets/{index9-9FYLmtt9.js → index9-D_kItRZJ.js} +1 -1
- package/dist/web/assets/index9-D_kItRZJ.js.br +0 -0
- package/dist/web/assets/index9-D_kItRZJ.js.gz +0 -0
- package/dist/web/index.html +2 -2
- package/dist/web/index.html.br +0 -0
- package/dist/web/index.html.gz +0 -0
- package/docs/cloudflare-access.md +111 -0
- package/docs/performance-plan.md +119 -241
- package/package.json +5 -2
- package/dist/web/assets/CodeBlockNode-CehKIzSk.js.br +0 -0
- package/dist/web/assets/CodeBlockNode-CehKIzSk.js.gz +0 -0
- package/dist/web/assets/FileViewer-01t53KTX.js.br +0 -0
- package/dist/web/assets/FileViewer-01t53KTX.js.gz +0 -0
- package/dist/web/assets/FilesPanel-B7NknFvl.js.br +0 -0
- package/dist/web/assets/FilesPanel-B7NknFvl.js.gz +0 -0
- package/dist/web/assets/MarkdownMessage-UlvozPc5.js.br +0 -0
- package/dist/web/assets/PreCodeBlock.vue_vue_type_style_index_0_lang-Cdy-YZRP.js.br +0 -0
- package/dist/web/assets/PreCodeBlock.vue_vue_type_style_index_0_lang-Cdy-YZRP.js.gz +0 -0
- package/dist/web/assets/TerminalPanel-BdmAonFr.js.br +0 -0
- package/dist/web/assets/TerminalPanel-BdmAonFr.js.gz +0 -0
- package/dist/web/assets/Tooltip-BJ2o2M_0.js.br +0 -0
- package/dist/web/assets/Tooltip-BJ2o2M_0.js.gz +0 -0
- package/dist/web/assets/index-D_YTh7Zw.css +0 -1
- package/dist/web/assets/index-D_YTh7Zw.css.br +0 -0
- package/dist/web/assets/index-D_YTh7Zw.css.gz +0 -0
- package/dist/web/assets/index-civcSERr.js +0 -27
- package/dist/web/assets/index-civcSERr.js.br +0 -0
- package/dist/web/assets/index-civcSERr.js.gz +0 -0
- package/dist/web/assets/index10-WpTfisco.js.br +0 -0
- package/dist/web/assets/index10-WpTfisco.js.gz +0 -0
- package/dist/web/assets/index3-C4yf5W5o.js +0 -1
- package/dist/web/assets/index4-Cwl0ij4U.js +0 -1
- package/dist/web/assets/index5-BCbIyN1t.js.br +0 -0
- package/dist/web/assets/index5-BCbIyN1t.js.gz +0 -0
- package/dist/web/assets/index6-CbdnTDhy.js.br +0 -0
- package/dist/web/assets/index6-CbdnTDhy.js.gz +0 -0
- package/dist/web/assets/index7-BzNzdNxO.js.br +0 -0
- package/dist/web/assets/index7-BzNzdNxO.js.gz +0 -0
- package/dist/web/assets/index8-CD8jmACo.js.br +0 -0
- package/dist/web/assets/index8-CD8jmACo.js.gz +0 -0
- package/dist/web/assets/index9-9FYLmtt9.js.br +0 -0
- package/dist/web/assets/index9-9FYLmtt9.js.gz +0 -0
- package/docs/operations.md +0 -143
package/docs/operations.md
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
# Operating LitePaseo
|
|
2
|
-
|
|
3
|
-
This guide covers deployment, notifications, backups and service management.
|
|
4
|
-
For installation and first use, see the [README](../README.md).
|
|
5
|
-
|
|
6
|
-
## Data and access
|
|
7
|
-
|
|
8
|
-
LitePaseo stores its own data in `~/.litepaseo`, separately from Paseo's
|
|
9
|
-
`~/.paseo`. Set `LITEPASEO_HOME` to use another directory;
|
|
10
|
-
`LITEPASEO_DATA_DIR` is also accepted for compatibility.
|
|
11
|
-
|
|
12
|
-
The directory contains SQLite metadata, daemon connection strings, the access
|
|
13
|
-
token, authenticator and push keys, signed-in devices, subscriptions, rotating
|
|
14
|
-
logs, the runtime lock and the local control socket. It is owner-only (0700,
|
|
15
|
-
files 0600). Treat the directory and its backups as credentials.
|
|
16
|
-
Conversation history stays on the daemons; drafts stay in browser storage.
|
|
17
|
-
|
|
18
|
-
Browsers sign in with an access token plus an authenticator code when TOTP is enabled and receive
|
|
19
|
-
an HttpOnly session cookie. Daemon credentials stay on the server. Bind and port
|
|
20
|
-
are controlled by `LITEPASEO_BIND` (default `127.0.0.1`) and `LITEPASEO_PORT`
|
|
21
|
-
(default `8787`). HTTPS ingress and tunnel configuration are managed separately.
|
|
22
|
-
|
|
23
|
-
Data from the earlier platform location (`~/.local/share/litepaseo` or
|
|
24
|
-
`~/Library/Application Support/LitePaseo`) moves over automatically once that
|
|
25
|
-
instance is stopped.
|
|
26
|
-
|
|
27
|
-
## Phone app and notifications
|
|
28
|
-
|
|
29
|
-
Open the console over HTTPS (for example your Cloudflare tunnel address); browsers only allow installation and push notifications on secure origins.
|
|
30
|
-
|
|
31
|
-
1. **Sign in once.** The browser receives an HttpOnly session cookie (30 days, extended while in use). Review or revoke devices under **Settings → Signed-in devices**.
|
|
32
|
-
2. **Optional: two-factor sign-in.** **Settings → Authenticator code → Set up** shows a QR code for a TOTP app. Once enabled, new logins require **both the access token and a 6-digit code**. Codes alone, tokens alone and bare Bearer API tokens cannot bypass this requirement. Code guesses are checked only after the token is valid, are single-use, and have per-client limits plus a persistent server-wide lockout that doubles up to 24 hours. Enabling TOTP signs out other browsers; upgrading from the old code-only implementation signs out existing browsers once. Re-enable notifications on devices after signing in again. Lost authenticator access must be recovered from the server shell with `litepaseo totp-reset`.
|
|
33
|
-
3. **Install.** Android/desktop Chrome: **Settings → Install**, or the browser's install menu. iPhone/iPad: Safari → Share → **Add to Home Screen**, then open LitePaseo from the Home Screen. On iOS, push only works in the Home Screen app (iOS 16.4+).
|
|
34
|
-
4. **Turn on notifications** in **Settings → Notifications**: one push when an agent needs your input (permission or question), and one when a turn finishes or fails. A push is not sent to the signed-in device currently viewing that conversation; other subscribed devices still receive it. Tapping it opens that session. The app icon shows how many sessions are waiting.
|
|
35
|
-
|
|
36
|
-
Notifications are sent by this server, which is always connected to your daemons, through the browser vendor's push service (outbound HTTPS). Set `LITEPASEO_PUSH_SUBJECT=mailto:you@example.com` to your own contact address; Apple's push service requires a `mailto:` or `https:` subject.
|
|
37
|
-
|
|
38
|
-
Recovery from the server shell: `litepaseo totp-reset` turns authenticator sign-in off, and `litepaseo signout-all` revokes every browser and its notifications.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
## Backups and upgrades
|
|
42
|
-
|
|
43
|
-
The database now has a schema version. Existing unversioned databases are migrated transactionally;
|
|
44
|
-
a private `pre-migration-v0-<id>.sqlite` snapshot is saved in the data directory first.
|
|
45
|
-
A newer, unsupported schema is refused instead of being modified.
|
|
46
|
-
|
|
47
|
-
Create a full backup, including the token, hosts, board, authenticator and push keys, sessions and subscriptions:
|
|
48
|
-
|
|
49
|
-
```sh
|
|
50
|
-
litepaseo backup /absolute/path/to/new-backup-directory
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
The destination must not exist. Backups can run while the server is running: SQLite's snapshot
|
|
54
|
-
includes committed WAL data. The backup directory is 0700 and files are 0600. Keep it private;
|
|
55
|
-
it contains working credentials. Conversation history remains on your daemons and browser drafts
|
|
56
|
-
remain in browser storage, so neither is included.
|
|
57
|
-
|
|
58
|
-
Restore into a **new, empty home**, leaving the original available for rollback:
|
|
59
|
-
|
|
60
|
-
```sh
|
|
61
|
-
LITEPASEO_HOME=/absolute/path/to/restored-home litepaseo restore /absolute/path/to/new-backup-directory
|
|
62
|
-
# Stop the old instance before starting the replacement on the same port.
|
|
63
|
-
LITEPASEO_HOME=/absolute/path/to/restored-home litepaseo start
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Restore checks the manifest checksums, schema and database integrity, uses the service's exclusive
|
|
67
|
-
control socket to block concurrent startup, and rejects nonempty destinations. An interrupted
|
|
68
|
-
publish leaves a marker that prevents startup; restore the backup into another empty home.
|
|
69
|
-
Only the current backup format/schema is supported by restore.
|
|
70
|
-
|
|
71
|
-
## Connection diagnostics
|
|
72
|
-
|
|
73
|
-
Hosts shows the last successful connection, retry attempt/time and a classified failure with
|
|
74
|
-
suggested checks. SDK connection errors are classified without echoing remote text, connection
|
|
75
|
-
URLs or credentials into the browser or logs. Unexpected API failures include a reference ID
|
|
76
|
-
that can be matched to the `api_operation_failed` log entry.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
## Supervision, autostart and logs
|
|
80
|
-
|
|
81
|
-
`start` launches a detached supervisor; `serve` runs it in the foreground. `status` reports the
|
|
82
|
-
supervisor PID, worker PID, readiness and restart count. The supervisor keeps the control socket
|
|
83
|
-
available while restarting a crashed worker, with delays from 250 ms up to 30 seconds. A worker
|
|
84
|
-
exits when its supervisor disconnects. A separate SQLite runtime lock is released by the kernel
|
|
85
|
-
even after SIGKILL, so a later supervisor can safely recover its dead control socket.
|
|
86
|
-
|
|
87
|
-
Install autostart explicitly (the implementation does not install a service just by being built):
|
|
88
|
-
|
|
89
|
-
```sh
|
|
90
|
-
litepaseo service print # inspect the generated configuration and path
|
|
91
|
-
litepaseo stop # stop a manually launched instance before handing over
|
|
92
|
-
litepaseo service install # install and start systemd user unit / launchd LaunchAgent
|
|
93
|
-
litepaseo service status
|
|
94
|
-
litepaseo service restart # preserve OS supervision when restarting
|
|
95
|
-
litepaseo service stop
|
|
96
|
-
litepaseo service start
|
|
97
|
-
litepaseo service uninstall # stop and remove autostart; preserve application data
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Services are named per data directory, use the current absolute Node/CLI paths, and capture
|
|
101
|
-
PATH plus LitePaseo bind/port/push/log settings. Reinstall after changing installation paths or
|
|
102
|
-
those settings. Linux uses a systemd **user** unit: startup before login and survival after logout
|
|
103
|
-
require user lingering (`loginctl enable-linger <username>`, subject to host policy). macOS uses
|
|
104
|
-
a LaunchAgent and starts at login, not before login. macOS configuration generation is tested,
|
|
105
|
-
but actual launchd operation still needs a Mac. Linux systemd process restart was tested with
|
|
106
|
-
an isolated transient user unit. No persistent service was installed during development tests.
|
|
107
|
-
|
|
108
|
-
The supervisor rotates worker stdout/stderr into `service.log`, with a default maximum of 5 MiB
|
|
109
|
-
per file and three archives (`service.log.1` is the newest archive). Set `LITEPASEO_LOG_BYTES`
|
|
110
|
-
(1024–104857600 bytes) and `LITEPASEO_LOG_ARCHIVES` (1–20) before starting/installing to change these limits.
|
|
111
|
-
`logs` prints the tail of the current file. Files are owner-only.
|
|
112
|
-
|
|
113
|
-
## Delivery checks and attachments
|
|
114
|
-
|
|
115
|
-
Unknown sends are checked every 15 seconds while their conversation is open in a visible tab,
|
|
116
|
-
and can be checked manually. Only an exact user-message `clientMessageId` (or legacy `messageId`)
|
|
117
|
-
confirms delivery; identical text is not evidence. Each check examines at most five 200-row history
|
|
118
|
-
pages. If the message was rewound away or lies outside that window, it stays uncertain. Confirmation
|
|
119
|
-
clears only a draft restored from that failed send, preserving newer edits. No check resends a message.
|
|
120
|
-
|
|
121
|
-
Use **Attach files**, paste images, or drop files on the composer. Up to four files per message,
|
|
122
|
-
8 MiB each and 24 MiB staged per signed-in device are supported. The panel shows previews, upload
|
|
123
|
-
state, cancellation/removal and retry. Attachments may be sent with an empty text message.
|
|
124
|
-
PNG/JPEG/WebP/GIF use native image input for known Codex/Claude/Pi adapters; the selected model must
|
|
125
|
-
support vision. Other files require an agent advertising tool invocation support and are uploaded
|
|
126
|
-
to the daemon for it to read. Unsupported agents are disabled with an explanation.
|
|
127
|
-
|
|
128
|
-
Selected files/previews remain in the current tab, not browser draft storage. BFF staging is memory-only,
|
|
129
|
-
bounded to 64 MiB total and expires after 20 minutes; cancelling removes staged data, and server restart
|
|
130
|
-
requires re-upload. Ordinary files reach the daemon only when Send is pressed. Once submitted (or when
|
|
131
|
-
submission is uncertain), daemon-side uploads and provider-materialized images follow the daemon's
|
|
132
|
-
retention policy; LitePaseo does not delete files that an agent may still need. Unknown-send records
|
|
133
|
-
retain attachment names/IDs, not file bytes. A lost response is never retried automatically.
|
|
134
|
-
|
|
135
|
-
Opt-in integration checks:
|
|
136
|
-
|
|
137
|
-
```sh
|
|
138
|
-
LITEPASEO_TEST_SYSTEMD=1 node tests/systemd.mjs
|
|
139
|
-
LITEPASEO_TEST_HOST=127.0.0.1:6767 LITEPASEO_TEST_CREDENTIAL_FILE=/path/to/local-credential LITEPASEO_TEST_ATTACHMENTS=1 node tests/live-daemon.mjs
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
The second check creates a disposable agent, verifies an uploaded random file marker and a red image,
|
|
143
|
-
archives the agent and deletes its test upload. It consumes provider quota.
|