pi-pocket 0.27.0 → 0.28.0-beta.2

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 (93) hide show
  1. package/README.md +11 -8
  2. package/docs/architecture.md +9 -1
  3. package/docs/customizing.md +16 -2
  4. package/docs/docker.md +2 -0
  5. package/docs/examples/quiet-note.js +21 -0
  6. package/docs/examples/quiet-note.ts +73 -0
  7. package/docs/extensions/app.md +1 -0
  8. package/docs/extensions/policies/api-stability.md +3 -0
  9. package/docs/extensions/reference/limits.md +11 -0
  10. package/docs/extensions/reference/pocket.md +22 -1
  11. package/docs/extensions/reference/theme-surface.md +12 -0
  12. package/docs/extensions/reference/web.md +36 -2
  13. package/docs/extensions.md +2 -0
  14. package/docs/features.md +20 -16
  15. package/docs/map.md +24 -12
  16. package/docs/systemd.md +1 -1
  17. package/npm-shrinkwrap.json +3163 -0
  18. package/package.json +3 -2
  19. package/src/launcher/access.ts +75 -4
  20. package/src/launcher/main.ts +303 -60
  21. package/src/launcher/options.ts +8 -5
  22. package/src/launcher/serve.ts +677 -0
  23. package/src/server/app.ts +223 -14
  24. package/src/server/avatars.ts +54 -0
  25. package/src/server/background.ts +214 -42
  26. package/src/server/build.ts +53 -0
  27. package/src/server/commands.ts +28 -33
  28. package/src/server/config.ts +9 -1
  29. package/src/server/docs.ts +8 -1
  30. package/src/server/entry-presentation.ts +275 -0
  31. package/src/server/export.ts +26 -3
  32. package/src/server/extension-web.ts +113 -8
  33. package/src/server/extensions/pip.ts +57 -2
  34. package/src/server/host.ts +21 -3
  35. package/src/server/http/api.ts +106 -6
  36. package/src/server/http/assets.ts +9 -1
  37. package/src/server/http/conversation-routes.ts +61 -0
  38. package/src/server/http/events.ts +19 -0
  39. package/src/server/http/icon-route.ts +196 -0
  40. package/src/server/http.ts +41 -2
  41. package/src/server/icon-mask.ts +33 -0
  42. package/src/server/icon-render.ts +149 -0
  43. package/src/server/icon-store.ts +57 -0
  44. package/src/server/model-images.ts +124 -0
  45. package/src/server/pip.ts +30 -6
  46. package/src/server/projection.ts +127 -32
  47. package/src/server/room.ts +171 -8
  48. package/src/server/running.ts +307 -2
  49. package/src/server/schedules.ts +5 -0
  50. package/src/server/skills.ts +99 -8
  51. package/src/server/spend.ts +5 -0
  52. package/src/server/transcripts.ts +28 -3
  53. package/src/server/when.ts +25 -11
  54. package/types/pocket.d.ts +53 -2
  55. package/web/app-icon.js +149 -0
  56. package/web/app.js +12 -8
  57. package/web/avatar.js +46 -2
  58. package/web/composer.js +107 -15
  59. package/web/entry-presentation.js +264 -0
  60. package/web/extension-ui.js +18 -0
  61. package/web/fingerprint.d.ts +2 -0
  62. package/web/fingerprint.js +21 -0
  63. package/web/launcher.js +15 -3
  64. package/web/model-favorites.js +27 -0
  65. package/web/peeks.js +11 -3
  66. package/web/pip.js +7 -1
  67. package/web/running-board.js +1197 -0
  68. package/web/session-cache.js +144 -0
  69. package/web/session-tabs.js +58 -0
  70. package/web/sessions.js +51 -12
  71. package/web/sheets/all-artifacts.js +104 -0
  72. package/web/sheets/appearance.js +45 -0
  73. package/web/sheets/background.js +228 -0
  74. package/web/sheets/find.js +61 -7
  75. package/web/sheets/folder.js +43 -4
  76. package/web/sheets/menu.js +3 -1
  77. package/web/sheets/message.js +80 -15
  78. package/web/sheets/model.js +39 -3
  79. package/web/sheets/people.js +35 -1
  80. package/web/sheets/providers.js +80 -26
  81. package/web/sheets/schedules.js +4 -1
  82. package/web/sheets/shortcuts.js +1 -0
  83. package/web/sheets/text.js +2 -0
  84. package/web/sheets.js +11 -4
  85. package/web/store.js +837 -27
  86. package/web/style.css +1928 -166
  87. package/web/subagents-board.js +3 -2
  88. package/web/tab-order.js +34 -0
  89. package/web/theme-surface.js +7 -0
  90. package/web/theme.js +15 -0
  91. package/web/transcript.js +588 -57
  92. package/web/user-search.js +6 -0
  93. package/web/sheets/running.js +0 -130
package/docs/map.md CHANGED
@@ -4,7 +4,7 @@ Where things are in Pi Pocket, for agents working on it. [index.md](index.md) li
4
4
 
5
5
  ## Processes
6
6
 
7
- `bin/pi-pocket.js` checks Node, then runs `src/launcher/main.ts`. In an npm install, Node strips no types from files in `node_modules`: `bin/strip-types.js` does it for Pi Pocket's own files there, in the launcher and (with `--import`) in the server. The launcher reads its options (`options.ts`), asks how devices connect (`access.ts`: this device, LAN, Cloudflare quick tunnel, Tailscale), runs the server (`src/server/main.ts`) as a child, restarts it on exit code 75 or a crash, and keeps the tunnel up. When a server stops before it is ready while an update from the app is under way, it goes back to the version before: the commit and packages of a git checkout, or the kept copy of a global npm install (`rollBackUpdate` in `src/server/update-state.ts`, the one server module it imports). `term.ts` draws its menu, panel, and QR code in the terminal. The server takes the data folder's lock, opens one `PocketApp`, and serves it with `http.ts`.
7
+ `bin/pi-pocket.js` checks Node, then runs `src/launcher/main.ts`. In an npm install, Node strips no types from files in `node_modules`: `bin/strip-types.js` does it for Pi Pocket's own files there, in the launcher and (with `--import`) in the server. The launcher reads its options (`options.ts`), asks how devices connect (`access.ts`: this device, LAN, Cloudflare quick tunnel, Tailscale, Tailscale Serve), runs the server (`src/server/main.ts`) as a child, restarts it on exit code 75 or a crash, and keeps the tunnel up. When a server stops before it is ready while an update from the app is under way, it goes back to the version before: the commit and packages of a git checkout, or the kept copy of a global npm install (`rollBackUpdate` in `src/server/update-state.ts`, the one server module it imports). `term.ts` draws its menu, panel, and QR code in the terminal. `serve.ts` drives the Tailscale CLI for Serve mode: every call has a timeout, the mount is checked before it is made, and it is taken down when the launcher quits. The server takes the data folder's lock, opens one `PocketApp`, and serves it with `http.ts`.
8
8
 
9
9
  ## Data (`~/.pi-pocket/`, or `PI_POCKET_DIR`)
10
10
 
@@ -25,6 +25,7 @@ A module split into parts keeps its name for the part others import, with the re
25
25
  | `attribution.ts` | Who Pi works for: who wrote each message to Pi or whose work it is (authors documents, from request ids), who queued each submission; read back at startup |
26
26
  | `room.ts` | One conversation's live view for its tabs: Pi Durable's view plus `ROOM_DOCS`, sent every 90 ms as changes; its peek tile (`peek`, at most once a second) for the tabs that show it (`PocketApp.setPeeks`) |
27
27
  | `projection.ts` | Entries as compact JSON for browsers; `usageCost` |
28
+ | `build.ts` | This server's build: a hash of its code and package, which tabs' kept sessions name (`have`), so they last across a restart with the same code |
28
29
  | `timing.ts` | Every model stream timed: when it started, its first token, and its end, stamped on the response for the status line's speed |
29
30
  | `limits.ts` | Reads a failed model request (error text, status, limit headers) and says whether it is a limit that clears with time, until when, and for whom (the account or one model). Pure functions |
30
31
  | `limit-gate.ts` | The limit gate around every model stream: a request that hits such a limit waits, one canary goes out, then the rest leave one by one; Stop and Interrupt end a wait; `provider-limits.json`; what the views and the session list show of a wait |
@@ -42,13 +43,14 @@ A module split into parts keeps its name for the part others import, with the re
42
43
 
43
44
  ### People
44
45
 
45
- | File | Owns |
46
- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------- |
47
- | `config.ts`, `auth.ts` | People and settings; cookies, tokens, invites |
48
- | `requests.ts` | Request ids, which say whose each message to Pi is (`u:` a person's own, `p:` sent for a person) |
49
- | `collab.ts` | Chat, activity lines (`addActivity`), reactions, pins, notes, typing, take turns |
50
- | `alerts.ts`, `push.ts` | Push notifications: who hears about what; Web Push without dependencies (RFC 8291, 8292) |
51
- | `spend.ts` | Cost per conversation and person; limits, a team's (linked sessions') against the budget of the session that started it |
46
+ | File | Owns |
47
+ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
48
+ | `config.ts`, `auth.ts` | People and settings; cookies, tokens, invites |
49
+ | `avatars.ts` | People's profile pictures: files in `avatars/` of the data folder (PNG, JPEG, WebP, GIF, up to 512 KB), checked by their bytes |
50
+ | `requests.ts` | Request ids, which say whose each message to Pi is (`u:` a person's own, `p:` sent for a person) |
51
+ | `collab.ts` | Chat, activity lines (`addActivity`), reactions, pins, notes, typing, take turns |
52
+ | `alerts.ts`, `push.ts` | Push notifications: who hears about what; Web Push without dependencies (RFC 8291, 8292) |
53
+ | `spend.ts` | Cost per conversation and person; limits, a team's (linked sessions') against the budget of the session that started it |
52
54
 
53
55
  ### What people ask of Pi
54
56
 
@@ -59,18 +61,19 @@ A module split into parts keeps its name for the part others import, with the re
59
61
  | `extension-commands.ts` | Extensions' commands run: who may, a durable task per run that a retry finds and a restart never runs again, cards, and stopping |
60
62
  | `subagent-runs.ts` | How a subagent's run ended, in the words its record keeps: for the subagent tool's reports, and for what a person's message to a failed subagent came to |
61
63
  | `shell.ts` | `!` and `!!` commands: a background task per command that runs it and writes a `pocket.shell` entry; a restart cuts it off rather than running it again |
62
- | `background.ts` | Background tasks: commands Pi runs detached, each watched by a durable task until it ends |
64
+ | `background.ts` | Background tasks: commands Pi runs detached, each watched by a durable task until it ends, and their ends go to Pi as one message, steered into the run in flight |
63
65
  | `schedules.ts`, `when.ts` | Scheduled messages (a durable task) and their time grammar |
64
66
  | `goals.ts` | "Done when" checks |
65
67
  | `titles.ts` | A short title for a session with a long first message, or one that runs a skill or prompt template, from the session's own model |
66
68
  | `prompts.ts` | Pi's prompt templates as slash commands, and `/skill:name` expanded |
67
69
  | `pi-sessions.ts` | Pi's sessions from the terminal (`~/.pi/agent/sessions/`), read and never written: listing them, and one as a new session's history, with Pi's own context of it (compactions, context edits); `commands.continuePiSession` makes the session |
68
70
  | `skills.ts` | Which skills a session's folder has, from where Pi's CLI looks and in its order, with Pi's project trust; the system prompt and `/skill:name` both use it. Reads and saves the owner's answer to "trust this project?" |
71
+ | `model-images.ts` | Attached images made small enough for the model, started as each upload ends so a message that sends them finds them ready |
69
72
  | `models.ts` | The models people can pick (marked for Pi’s enabledModels scope and when their sign-in needs renewing), the one a conversation runs with, finding one by name, and the thinking levels |
70
73
  | `model-facts.ts` | One short line per model of the owner's list for subagents (thinking, context window, price, which is the session's own) for the `subagent` and `team` prompt sections |
71
74
  | `project-model.ts` | Trusted project model/thinking defaults and fresh global-only settings read for each new session, validation, and safe errors; no resource paths or per-project run policy |
72
75
  | `model-names.ts` | Which models a text names, word by word: PiP passes or names a model only when its person named it |
73
- | `running.ts` | Running now, from Pi Durable's task graph |
76
+ | `running.ts` | Running now, from Pi Durable's task graph, and the Running now board's data (`runningBoard`): the sessions at work with their model and spend, every scheduled message with its next times and whether it is held |
74
77
  | `pip.ts` | PiP, the owner's assistant: its conversation (made on first open, kept out of the session list), what its tools do as its person, and the follows (a durable task each) that report to it when a session's run ends |
75
78
  | `compaction.ts` | When a session's context is compacted: Pi's compaction settings for Pi Durable, with each model's own values (`compaction.modelOverrides`) |
76
79
  | `pip-compact.ts` | PiP's context kept small: when it compacts itself, and its own summaries, written with what came from outside left out and counted in its spend |
@@ -220,12 +223,15 @@ Plain ES modules, loaded as they are. `store.js` holds the shared state, and not
220
223
  | `commands.js` | Slash commands (the app's own, and extensions'), and prompt templates |
221
224
  | `trust.js` | Project trust: the bar that asks the owner whether to trust a session's project for its own skills and its `.pi/settings.json` model defaults, and the sheet (`/trust`, the menu) that shows and changes the answer |
222
225
  | `sheets.js` | Which sheet is open, the component that shows it, and the nested-sheet back action supplied to `Sheet` through `SheetBack` |
223
- | `sheets/*.js` | One sheet (or a few close ones) each: the model and branch pickers, folder, extensions, providers, people and invites, the file viewer (`FileView`, which the Files tile shows too), find, spend, running now, schedules, webhooks, memory (the lessons Pi keeps, with the menu's hint), worktree, Pi's terminal sessions, appearance, shortcuts, the menu, a session's actions, the extension gallery (`gallery.js`: browsing, an entry, its source, an update, sharing; `galleryAvailable`), with the artifact viewer's **Open in Design** button (`viewers.js`) |
226
+ | `sheets/*.js` | One sheet (or a few close ones) each: the model and branch pickers, folder, extensions, providers, people and invites, the file viewer (`FileView`, which the Files tile shows too), find, spend, all artifacts (`all-artifacts.js`: every session's artifacts from `GET /api/artifacts`, `PocketApp.artifactOverview`), schedules, webhooks, memory (the lessons Pi keeps, with the menu's hint), worktree, Pi's terminal sessions, appearance, shortcuts, the menu, a session's actions, the extension gallery (`gallery.js`: browsing, an entry, its source, an update, sharing; `galleryAvailable`), with the artifact viewer's **Open in Design** button (`viewers.js`) |
224
227
  | `peeks.js` | Peek tiles: their switches (the top bar's and the rail's), which sessions get one and in what order (working, waiting, with subagents at work, finished, or pinned), the column and the strip, each tile's subagents at work (the first few as rows, the rest counted, opening the board at them) and their own peeks, the watch list |
225
228
  | `seen.js` | What this browser has seen: when it last looked at each session (`markSeen`), which runs ended since (`finishedUnseen`), and the server's clock (`fromServer`). Peek tiles and the session list's squares read it; the list also puts looks back (`seenSnapshot`, `restoreSeen`) when it undoes marking sessions read |
226
229
  | `clock.js` | The server's clock as a tab knows it, without the DOM: how far it is ahead of this browser's, fitted to what each hello proves, so a hello handled late (a tab woken from the background) moves no time shown |
230
+ | `fingerprint.js` | A short fingerprint of a string, the same in the browser and on the server, which imports it: a tab names with it what it kept of a session (`have`), and the server checks it (`Room.push`) |
231
+ | `session-cache.js` | The sessions a browser keeps on the device (IndexedDB) for all its tabs: saved, read, and dropped by size, the one used longest ago first; `store.js` decides what goes in and checks what comes out |
227
232
  | `chat.js` | People panel: presence roster, take-turns shortcut, chat bubbles, pins, notes; the chat sheet |
228
- | `avatar.js` | People's avatars and colors, and folders' colors |
233
+ | `avatar.js` | People's avatars (their picture, else initials) and colors, and folders' colors |
234
+ | `running-board.js` | Running now, in the conversation's place: the server's `running/board` every 2 seconds, the Coming up timeline (a lane per session, schedules as marks, how long each has been at work), the filters, the session matrix (Now and Schedule), Needs you, Next up, the schedule selected, and the phone's layout |
229
235
  | `subagents-board.js` | The subagents board: every subagent in every session (the server's `subagents` events, while it shows), soft state-colored cells and rounded session rows, a sub-tile for each at work saying what it does now, the proportional state bar and filter pills, Needs you, the selected detail card (its peek), the arrows, and the phone's layout |
230
236
  | `extension-ui.js` | Extensions' browser modules: loading them as `hello` lists them (`server.ui`), `pocket` (the app's API for them), and what they add: rail buttons (`ExtensionRailButtons`), menu rows, launcher actions, pages in the conversation's place (`ExtensionPage`, `state.page`), panels beside it (`ExtensionPanel`, `state.extPanel`, with `ExtensionPanelButtons` in the top bar and `extensionPlaces` in the places), status-line items (`extensionStatusItems`, drawn by `composer.js`), sheets (`ExtensionSheet`), and the session list's chips, words, filters, and actions (`sessionChips`, `sessionWords`, `sessionFilters` and `sessionFilterTest`, `sessionActions`, drawn by `sessions.js`, `sheets/session.js`, and `launcher.js`); one that fails, alone, and how their tools' calls show (`pocket.toolCall`, given to `calls.js` and `turns.js`) |
231
237
  | `sessions.js` | The sidebar: the rail (`RailNav`: the tools, you, and, folded, numbered sessions) and the session list beside it (sidebar, drawer, a phone's home screen), a line per session, with extensions' chips under its title; extensions' filters beside the search; selecting rows and archiving them with undo (`setArchived`), and extensions' actions in the bar for them, and a touch screen's long press on a row, which opens `sheets/session.js`; linked sessions under the one that started them, with branch lines (`session-tree.js`, the tree as data); and Priority (`priorityGroups`, `slotOf`, `needOf`): sessions by what they ask of you, with a call open in its row (`NeedAsk`), dismissing failures, and marking sessions read, each with an undo where one is possible; the rail's count of sessions that need you (`needsYouCount`) |
@@ -233,6 +239,7 @@ Plain ES modules, loaded as they are. `store.js` holds the shared state, and not
233
239
  | `notify.js`, `sw.js` | Push, the icon badge, approvals from notifications, shares; the notifications sheet |
234
240
  | `share.js` | Share to Pi |
235
241
  | `ui.js` | htm binding, Markdown (code blocks colored and labeled, split into parts around the blocks `rich.js` draws), formatting, icons, `Sheet` and its optional `SheetBack` context, `Switch`, `Keys`, `item` (a menu row), `usePresence` (animate out), `drawnFor` (draws again only for some store keys), `memo` (draws again only for new props), `useMinute` (a minute tick), `WIDE` and `NO_HOVER` (media queries that draw the app again), `useSlide` (sliding indicators), `useSide` (which side of the screen a region a theme may move is on), `railState`. Shared controls and inset `.sheet-list` groups are styled in `style.css` |
242
+ | `app-icon.js` | The icons in the colors in use (`iconSvg` draws `icon.svg` from a palette's variables): the tab's icon, the home-screen icon; `theme.js` calls it each time the look applies |
236
243
  | `theme.js` | Appearance: the theme (a theme folder's stylesheets in the theme layer, swapped in as they change), the colors (palettes as CSS variables in the palette layer, a folder's own, Follow desktop), tiling, motion, text size, sidebar shape, pins; the reveal; the cache `index.html` paints from; the owner's default theme and colors for browsers whose person has not chosen |
237
244
  | `themes.js` | Omarchy's themes as palettes, generated from `/usr/share/omarchy/themes/*/colors.toml`. `themes/<id>/` holds the built-in theme folders (Pocket and Lantern); `theme-surface.js` lists the tokens and parts themes may rely on; `safe-mode.js` is `?noext=1` |
238
245
  | `launcher.js` | The Ctrl/⌘+K launcher: search-type pills, local fuzzy matches and field highlights, leading result tiles and session status pills, live theme previews, combobox selection, focus isolation, and a New session action for each favorite folder (named as `sheets/folder.js` names them); `app.js` gives every logical opening a fresh identity |
@@ -247,6 +254,8 @@ Plain ES modules, loaded as they are. `store.js` holds the shared state, and not
247
254
  | `run-frame.js` | `RunFrame`: a reply's HTML (or an inline card's page, as its artifact) run on a tap, in the server's sandboxed `/a/frame` page, sized to fit it |
248
255
  | `highlight.js` | Syntax colors without dependencies: `highlightLines` gives escaped HTML with flat `hl-` spans per line, which `diff.js` marks changed words in |
249
256
 
257
+ `web/model-favorites.js` keeps per-person model favorites in this browser's local storage. The Providers sheet supplies star controls; it and the session/default-model picker share the Favorites filter. Stars do not change subagent permissions.
258
+
250
259
  Manual refresh lives in `src/server/model-refresh.ts`, owned by `Providers.modelRefresh`; `web/model-refresh.js` shares the refresh and its feedback between the menu, Providers, and the launcher. `test/model-refresh.test.ts` checks local configuration, external sign-ins, provider isolation, cancellation, session use, and endpoint access.
251
260
 
252
261
  The Extensions hub in `sheets/gallery.js` shares one listing between Discover, Installed, Updates, and the selected entry. `sheets.js` maps its sheet routes to one retained hub; `sheets/extensions.js` supplies the built-in and local drop-in management controls for Installed, and the standalone sheet when the gallery is unavailable.
@@ -266,6 +275,8 @@ rsvg-convert -w 512 -h 512 web/icon.svg -o web/icon-512.png
266
275
  rsvg-convert -w 352 -h 352 --page-width 512 --page-height 512 --left 80 --top 80 -b "#13141c" web/icon.svg -o web/icon-maskable-512.png
267
276
  ```
268
277
 
278
+ These are the icons of the first load, and what stays where `web/app-icon.js` cannot draw. Once the app runs, `app-icon.js` draws the tab's icon and the home-screen icon (`apple-touch-icon`) again in the colors chosen in Appearance (frame ← darker background, card ← background, ring ← cyan to green, π ← orange), the home-screen icon is `/app-icon.png?frame=&card=&ring1=&ring2=&pi=&size=`, a PNG the server draws (`src/server/icon-render.ts`, with the π as coverage in `icon-mask.ts`, taken from `icon-512.png`; at most 192 pixels, the last 32 kept, and at most 8 new ones a second, past which the route answers 503): a phone fetches that address when the icon is added, and does not take a `data:` one. A cookie (`pocket_icon`, the five colors) lets the server put the same icon in the page it serves (iOS may read the icon before scripts run) and in `/manifest.webmanifest` (`http/icon-route.ts`): a phone fetches the page and the icon in a session with no cookie, so the owner's browser also reports the colors (`PUT /api/app-icon`, kept in `app-icon.json` in the data folder by `icon-store.ts`), which a request with no cookie gets, `/apple-touch-icon.png` too; with neither, they stay these files. The owner's colors are for the whole server, not for one device: the last device of the owner that changes the look sets them, and a guest, or any browser with no cookie, gets them. The server draws icons up to 192 pixels, keeps the last 32 it drew, and holds `app-icon.json` in memory after the first read. Notifications keep `icon.svg`.
279
+
269
280
  The maskable icon places the 352 × 352 artwork on a 512 × 512 page with 80-pixel margins and a `#13141c` background. Keep these commands outside the SVG: XML comments cannot contain `--`. The icon test in `test/mobile-ui.test.ts` checks that the served SVG decodes as an image.
270
281
 
271
282
  ## How a message travels
@@ -282,6 +293,7 @@ The maskable icon places the 352 × 352 artwork on a 512 × 512 page with 80-pix
282
293
  - **A sheet:** a component in `web/sheets/`, a case in `sheetBody` (`web/sheets.js`), and `openSheet({ type })` where it opens.
283
294
  - **Something back should close** (a screen over the conversation, a view that takes another's place on a phone): `useBack(open, close)` from `web/back.js` in the component that shows it. Sheets already have it.
284
295
  - **A built-in extension:** a file in `extensions/` (its extension named `pocket-…`), its place in `ORDER`, its title in `TITLES`, and its tools in `BUILT_IN_TOOLS` (`reload.ts`), which no test checks.
296
+ - **A presentation of an input a module sends:** `web.presentEntry` in the module, and `pocket.entryPresentation` in its browser module ([extensions/app.md](extensions/app.md)). Nothing it registers is stored.
285
297
  - **A member of the extension API** (on the host, `web`, `pocket`, or a command's context): add it to `types/pocket.d.ts` with `@since`, and to its page in `docs/extensions/reference/`. `test/public-types.ts` (in `npm run check`) fails until the code and the types agree for the host, `web`, and a command's context; for `pocket`, `extension-ui.test.ts` compares only the members' names, so check its signatures by reading. A host member for built-ins only goes in `Internal` in `public-types.ts` instead.
286
298
  - **A built-in slash command:** `web/commands.js`, with its name kept from modules' commands in `BUILT_IN_COMMANDS` (`extension-web.ts`).
287
299
  - **A command of the owner's own:** a drop-in with `web.command`, not a change here ([extensions/commands.md](extensions/commands.md)).
package/docs/systemd.md CHANGED
@@ -8,7 +8,7 @@ sudo systemctl enable --now pi-pocket@lan
8
8
 
9
9
  The modes are `local`, `lan`, `cloudflare`, `tailscale`, and `tailscale-serve`. [Remote access](../README.md#remote-access) explains who can connect in each one.
10
10
 
11
- Enable one instance at a time. Every instance uses the same port and data folder, so two of them would share both.
11
+ Enable one instance at a time. Every instance uses the same port and data folder, and a second launcher on that folder now refuses to start (it names the pid that holds it) rather than adopting the first one's Tailscale Serve mount.
12
12
 
13
13
  ## Before you start
14
14