wherever-dev 0.19.1 → 0.20.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/CHANGELOG.md +12 -0
- package/dist/index.js +42 -1
- package/dist/index.js.map +1 -1
- package/dist/session-pool.d.ts +19 -0
- package/dist/session-pool.d.ts.map +1 -1
- package/dist/session-pool.js +31 -7
- package/dist/session-pool.js.map +1 -1
- package/dist/session-stars.d.ts +61 -0
- package/dist/session-stars.d.ts.map +1 -0
- package/dist/session-stars.js +193 -0
- package/dist/session-stars.js.map +1 -0
- package/dist/session-types.d.ts +5 -0
- package/dist/session-types.d.ts.map +1 -1
- package/package.json +1 -1
- package/public/_app/immutable/assets/0.BKJ49K71.css +1 -0
- package/public/_app/immutable/assets/SymbolsNerdFontMono-Regular.D4tvPAg7.woff2 +0 -0
- package/public/_app/immutable/chunks/Bd5ZlnTc.js +2 -0
- package/public/_app/immutable/chunks/{Be584n9t.js.map → Bd5ZlnTc.js.map} +1 -1
- package/public/_app/immutable/chunks/C9ocFjai.js +2 -0
- package/public/_app/immutable/chunks/{CDh6N9EK.js.map → C9ocFjai.js.map} +1 -1
- package/public/_app/immutable/chunks/{CHdncqe4.js → Dv0k4836.js} +2 -2
- package/public/_app/immutable/chunks/{CHdncqe4.js.map → Dv0k4836.js.map} +1 -1
- package/public/_app/immutable/entry/{app.Bvi1whhV.js → app.XDJeHJSD.js} +3 -3
- package/public/_app/immutable/entry/{app.Bvi1whhV.js.map → app.XDJeHJSD.js.map} +1 -1
- package/public/_app/immutable/entry/start.DmSDB-jz.js +2 -0
- package/public/_app/immutable/entry/start.DmSDB-jz.js.map +1 -0
- package/public/_app/immutable/nodes/{0.BXOlI-1A.js → 0.D1iNBbQ-.js} +3 -3
- package/public/_app/immutable/nodes/{0.BXOlI-1A.js.map → 0.D1iNBbQ-.js.map} +1 -1
- package/public/_app/immutable/nodes/{1.Dw59rM0a.js → 1.CBLPrzOP.js} +2 -2
- package/public/_app/immutable/nodes/{1.Dw59rM0a.js.map → 1.CBLPrzOP.js.map} +1 -1
- package/public/_app/immutable/nodes/2.Cypexl_F.js +120 -0
- package/public/_app/immutable/nodes/2.Cypexl_F.js.map +1 -0
- package/public/_app/version.json +1 -1
- package/public/index.html +11 -11
- package/public/service-worker.js +1 -1
- package/public/_app/immutable/assets/0.Cb5vRzMp.css +0 -1
- package/public/_app/immutable/chunks/Be584n9t.js +0 -2
- package/public/_app/immutable/chunks/CDh6N9EK.js +0 -2
- package/public/_app/immutable/entry/start.DrBMY1f9.js +0 -2
- package/public/_app/immutable/entry/start.DrBMY1f9.js.map +0 -1
- package/public/_app/immutable/nodes/2.B4mmUgEN.js +0 -120
- package/public/_app/immutable/nodes/2.B4mmUgEN.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# wherever-dev
|
|
2
2
|
|
|
3
|
+
## 0.20.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- bd85970: Star sessions to come back to them later. A ☆ button in the top bar (and on each session row in the sidebar) marks a session, and the ★ stays visible on its sidebar row. Typical use: a session hands a prompt off to a new session and waits on it; the new session takes the top of the list, so star the original to find it again. Stars are stored on the server (`starred-sessions.json` in the state dir) so they show on every device, are exempt from `sessions.maxAgeDays` / `sessions.maxSessions`, and are dropped when the session is deleted. New endpoint: `POST /sessions/star`.
|
|
8
|
+
|
|
9
|
+
## 0.19.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- ec818d5: Render Nerd Font symbols (Powerline separators, git branch, clock and folder icons used by fancy shell prompts) instead of tofu boxes. The web UI now bundles Symbols Nerd Font Mono as a `unicode-range`-limited fallback in both the sans and mono font stacks, so it is only downloaded when such a glyph is shown and a locally installed copy is preferred. The font is kept out of the service worker install-time precache (it is cached on first use instead). The server also serves `.woff2` with the `font/woff2` MIME type.
|
|
14
|
+
|
|
3
15
|
## 0.19.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { connect as netConnect } from 'node:net';
|
|
|
5
5
|
import { WebSocketServer, WebSocket } from 'ws';
|
|
6
6
|
import { SessionPool, RELOADING_REFUSAL, getWhereverConfig, getWhereverCertsDir, getWhereverStateDir, detectRemoteRepo, normalizePath, invalidateFolderExistence } from './session-pool.js';
|
|
7
7
|
import { readDrafts, addDraft, deleteDraft, validateDraftInput } from './drafts.js';
|
|
8
|
+
import { readStarredSet, setSessionStarred, validateStarInput, forgetStar } from './session-stars.js';
|
|
8
9
|
import { piSdkInfo } from './pi-sdk.js';
|
|
9
10
|
import { searchConversations } from './conversation-search.js';
|
|
10
11
|
import { matchRemoteRepoRule, resolveRemoteCandidates } from './remote-candidates.js';
|
|
@@ -40,6 +41,7 @@ const MIME_TYPES = {
|
|
|
40
41
|
'.jpeg': 'image/jpeg',
|
|
41
42
|
'.gif': 'image/gif',
|
|
42
43
|
'.svg': 'image/svg+xml',
|
|
44
|
+
'.woff2': 'font/woff2',
|
|
43
45
|
'.ico': 'image/x-icon',
|
|
44
46
|
'.wasm': 'application/wasm',
|
|
45
47
|
'.txt': 'text/plain',
|
|
@@ -882,7 +884,7 @@ async function main() {
|
|
|
882
884
|
debugEnabled = debug;
|
|
883
885
|
console.log(`[wherever] pi SDK ${piSdkInfo.version}: ` +
|
|
884
886
|
(piSdkInfo.tier === 'bundled' ? `bundled (${piSdkInfo.why})` : `${piSdkInfo.tier}, from ${piSdkInfo.root} (${piSdkInfo.why})`));
|
|
885
|
-
const sessionPool = new SessionPool(idleTimeout);
|
|
887
|
+
const sessionPool = new SessionPool(idleTimeout, { getStarred: readStarredSet });
|
|
886
888
|
await sessionPool.initialize();
|
|
887
889
|
// Abandoned partial uploads (untouched for 24 h) are collected at startup and
|
|
888
890
|
// then hourly. A no-op when the staging dir was never created. The startup
|
|
@@ -1263,6 +1265,43 @@ async function main() {
|
|
|
1263
1265
|
sendJSON(res, 200, { folders, activeSessions: active });
|
|
1264
1266
|
return;
|
|
1265
1267
|
}
|
|
1268
|
+
// --- Starred sessions ("come back to this") ------------------------------
|
|
1269
|
+
// Server-side like drafts, so a star set on one device shows on every other.
|
|
1270
|
+
// `/sessions` reports each session's `starred` flag; this toggles one and
|
|
1271
|
+
// broadcasts `sessions_updated` so every open dashboard re-lists. POST with
|
|
1272
|
+
// an explicit boolean (not a toggle) so a retried request is idempotent.
|
|
1273
|
+
if (pathname === '/sessions/star' && req.method === 'POST') {
|
|
1274
|
+
let parsed;
|
|
1275
|
+
try {
|
|
1276
|
+
parsed = JSON.parse((await readBody(req)) || '{}');
|
|
1277
|
+
}
|
|
1278
|
+
catch {
|
|
1279
|
+
sendJSON(res, 400, { error: 'Invalid request' });
|
|
1280
|
+
return;
|
|
1281
|
+
}
|
|
1282
|
+
const invalid = validateStarInput(parsed);
|
|
1283
|
+
if (invalid) {
|
|
1284
|
+
sendJSON(res, 400, { error: invalid });
|
|
1285
|
+
return;
|
|
1286
|
+
}
|
|
1287
|
+
const resolved = path.resolve(parsed.sessionFile);
|
|
1288
|
+
// Only paths inside the sessions dir (an arbitrary path would just be junk
|
|
1289
|
+
// in the store). The file need not exist yet: a brand-new session can be
|
|
1290
|
+
// starred from the top bar before its transcript is first written.
|
|
1291
|
+
if (!sessionPool.isSessionFile(resolved)) {
|
|
1292
|
+
sendJSON(res, 400, { error: 'Invalid session file: not a session in the sessions directory' });
|
|
1293
|
+
return;
|
|
1294
|
+
}
|
|
1295
|
+
try {
|
|
1296
|
+
const stars = setSessionStarred(resolved, parsed.starred);
|
|
1297
|
+
broadcastSessionsUpdated();
|
|
1298
|
+
sendJSON(res, 200, { starred: stars });
|
|
1299
|
+
}
|
|
1300
|
+
catch (err) {
|
|
1301
|
+
sendJSON(res, 500, { error: err.message || 'Failed to update star' });
|
|
1302
|
+
}
|
|
1303
|
+
return;
|
|
1304
|
+
}
|
|
1266
1305
|
// Full-text search over every past session, backed by the memonaut index.
|
|
1267
1306
|
// Same token gate as /sessions (via isApiRequest above). A missing index is
|
|
1268
1307
|
// answered with status:'not-indexed', never built inline: memonaut's indexer
|
|
@@ -1765,6 +1804,8 @@ async function main() {
|
|
|
1765
1804
|
if (fs.existsSync(resolved)) {
|
|
1766
1805
|
fs.unlinkSync(resolved);
|
|
1767
1806
|
}
|
|
1807
|
+
// A deleted session's star would otherwise linger in the store forever.
|
|
1808
|
+
forgetStar(resolved);
|
|
1768
1809
|
// Tell all connected clients the list changed. Throttled: deleting a
|
|
1769
1810
|
// whole folder fires one DELETE per session in parallel, and each one
|
|
1770
1811
|
// would otherwise make every client refetch the entire list.
|