@deslop/stash 0.1.1060 → 0.1.1061
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 +7 -2
- package/dist/cli.js +2 -2
- package/dist/{contracts-B4aEKL_A.mjs → contracts-CoHsVor4.mjs} +580 -5
- package/dist/server.js +498 -382
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,11 +16,13 @@ The CLI saves the entry through the server's RPC, waits until the server has rea
|
|
|
16
16
|
|
|
17
17
|
- **Run.** `vp -C apps/stash run preview` builds `dist/server.js` and serves it on `127.0.0.1:5017`; `sudo tailscale serve --bg --https=8443 http://127.0.0.1:5017` publishes it on the tailnet. The tailnet is the only sign-in, so never bind it to `0.0.0.0` on `dev`, which has a public address.
|
|
18
18
|
- **Environment.** `~/.deslop/stash.env` holds the variables in [.env.example](.env.example). `ANTHROPIC_API_KEY` turns tagging on; without it a note fails with the reason. `STASH_AI_MODEL` defaults to `claude-haiku-5-5`, at high effort. `STASH_DATA_DIR` defaults to `~/.deslop/stash`.
|
|
19
|
-
- **Media.** The server runs the `yt-dlp` on `PATH` and downloads the Whisper model into `$XDG_CACHE_HOME/deslop/media` on first use. Published captions win; Whisper `small.en` takes about a quarter of the audio's length, up to two hours of audio.
|
|
19
|
+
- **Media.** The server runs the `yt-dlp` on `PATH` and downloads the Whisper model into `$XDG_CACHE_HOME/deslop/media` on first use. Published captions win; Whisper `small.en` takes about a quarter of the audio's length, up to two hours of audio. TikTok, X, YouTube and Instagram links go through `yt-dlp`, also when their page could not be read.
|
|
20
|
+
- **Proxy.** When `STASH_PROXY` holds an `http://` proxy URL, every request for a source exits through it: `yt-dlp`, pages, APIs, preview images and the reader. Without it, the server reads with its own address. `{session}` in the URL becomes a new random value for each `yt-dlp` run and each request, so a rotating residential proxy keeps one exit address while a run downloads. A request that a site blocks, or that the exit drops, retries twice from new exit addresses. On `dev` it is the owner's [DataImpulse](https://app.dataimpulse.com) residential plan "stash": pay-as-you-go traffic that never expires, with `__sessid.{session}` after the login.
|
|
21
|
+
- **Sources.** Web pages become Markdown with their headings, lists and link targets. GitHub repositories give their README, issues and pull requests their comments, X posts their long-form articles, and TikTok photo posts every slide. A page that holds no text, such as a JavaScript app or a PDF, goes to the [Jina Reader](https://jina.ai/reader/), which also takes blocked pages; its bot-check pages count as failures.
|
|
20
22
|
- **Storage.** SQLite at `stash.db` in `STASH_DATA_DIR`, one row per note, without migrations: a change to its shape can drop it. Previews and uploaded files sit beside it in `images/` and `files/`.
|
|
21
23
|
- **Sync.** `notes.watch` sends every note's list fields once, then only the notes that changed, at most every 400 ms. `notes.get` loads the long texts and `notes.search` searches transcripts and pages on the server.
|
|
22
24
|
- **Routes.** The app uses the JSON WebSocket RPC at `/api/rpc` and loads previews from `/api/images/<id>`. The share extension posts `{id, text}` to `/api/capture`. Photos and videos arrive as the raw body of `/api/files/<id>`.
|
|
23
|
-
- **Organizer.** Claude reads each entry as a developer would: a title of at most
|
|
25
|
+
- **Organizer.** Claude reads each entry as a developer would and writes the notes the owner reads instead of the source: a plain title of at most 40 characters, a summary of one or two sentences, one to three tags, search topics, Markdown notes whose length follows the content (headings, facts, steps, bold names and links), and the words in the images. The preview, the photo post's slides and 12 evenly spaced video stills, up to 768 pixels wide, go with it. A short link resolves before saving, so another share of the same post finds the saved note.
|
|
24
26
|
|
|
25
27
|
## iOS client
|
|
26
28
|
|
|
@@ -80,5 +82,8 @@ A Swift change compiles first in the simulator build on CI.
|
|
|
80
82
|
| Binary RPC serialization | It failed to reopen a cancelled watch |
|
|
81
83
|
| An app outbox | The extension uploads in a background session, and the app saves through the RPC directly |
|
|
82
84
|
| `yt-dlp` and Whisper inside the CLI | API keys and models live on the server, and every analysis stays a note |
|
|
85
|
+
| Mozilla Readability for web pages | It needs a DOM library; the cheerio Markdown walker keeps headings and links without one |
|
|
86
|
+
| Reddit and Hacker News readers | The owner saves neither |
|
|
87
|
+
| `yt-dlp --impersonate chrome` | It changed no result on the 21 probe links |
|
|
83
88
|
|
|
84
89
|
</details>
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env -S node --max-old-space-size=16384 --heapsnapshot-near-heap-limit=3 --report-on-fatalerror
|
|
2
|
-
import { $ as Socket, $
|
|
2
|
+
import { $ as Socket, $a as isNonEmpty, $l as isNotUndefined, Ac as some$1, Ai as gen, Ar as take, At as TaggedError, B as constPing, Bi as logInfo, Bs as Reference, Ca as sync$1, Ci as forEach, Cr as failCause, Ct as Literal, D as option, Di as forkScoped, Do as interruptors, Ds as sync, Ea as timeout, Ec as match, Ei as forkIn, Er as offerAll, F as layerJson, Fa as useSpan, Fi as isEffect, Fo as effect, Fr as getCurrent, Ga as min, Gi as mapError, Gn as fromQueue, Gt as tag, Hi as makeSpanScoped, Ho as provide$1, Hs as add, Ht as is, Ia as void_, Ir as interrupt$2, Is as taggedEnum, It as decodeSync, J as spanAttributes, Jo as addFinalizer, Jr as andThen, Js as make$3, K as getStreamSchemas, Ka as spaced, Ki as match$2, Ks as getOrUndefinedUnsafe, L as RequestId, La as whileLoop, Lt as decodeUnknownEffect, Mi as ignoreCause, Ml as withFiber$1, Mo as squash, N as withRunClient, Na as uninterruptibleMask, Ni as interrupt$1, Nl as assignProperty, Nt as Union, Oa as timeoutOrElse, Oc as reduce, Ot as String$6, P as RpcSerialization, Pi as interruptible, Pr as makeUnsafe, Qa as isEmpty, Ql as hasProperty, Ra as withFiber, Ri as logError, Rt as encodeEffect, Sa as suspend, Sc as join, Si as fnUntraced, Sl as some, So as findError, Sr as end, Tc as map$5, To as hasInterrupts, Tt as NonEmptyArray, U as exitSchema, Uc as fail$2, Ui as map$3, Us as empty$1, Ut as optional$2, Va as withParentSpan, Vl as format, Vs as Service, Wa as exponential, Ws as get, Wt as optionalKey, X as Collector, Y as spanName, Yo as addFinalizerExit, Yr as annotateLogs, Z as makeCollectorUnsafe, Zc as isSuccess, Zi as onError, Zs as Prototype, _ as QuitError, _a as scoped, _t as BooleanLiterals, aa as provide, ar as runHead, at as layerWebSocket, ba as succeed$1, bl as none, br as bounded, c as NotesError, ca as raceFirst, cc as findFirst, ci as catchTags, cs as failCause$1, dl as getOrElse, ds as isFailure, dt as HttpClientErrorSchema, du as identity, ea as onInterrupt, ei as callback, el as succeed$2, et as SocketError, fa as retryOrElse, fi as delay, fu as pipe, g as layer, gi as fail$1, gt as ArraySchema, h as errorReported, hl as isSome, hn as value, ho as Clock, ii as catchFilter, il as exists, io as replace, is as MinimumLogLevel, j as Stdio, ji as ignore, jt as TrueLiterals, kr as shutdownUnsafe, lc as findFirstIndex, ls as interrupt, lu as dual, m as errorExitCode, ma as runForkWith, mi as ensuring, ml as isNone, mn as make$2, mo as round, na as orDie, ni as catchCauseIf, oa as provideContext, oc as filter$1, on as empty, os as die, ot as layerWebSocketConstructorGlobal, p as runMain, pl as getOrUndefined, pr as unwrap, pu as pipeArguments, q as isStreamSchema, qi as matchCauseEffect, qo as Scope, qs as getUnsafe, qt as toCodecStringTree, rc as empty$2, rt as SocketReadError, sa as provideService, si as catchTag, sn as fromInput, ss as fail, su as constVoid, t as RpcContracts, ti as catchCause, tt as SocketErrorReason, u as LogToStderr, ua as result, uc as findLast, ui as context, ul as fromUndefinedOr, un as merge, v as Terminal, vl as map$4, vt as Defect, w as String$7, wa as tapCause, wi as forever, x as Crypto, xc as isReadonlyArrayNonEmpty, xt as FalseLiterals, y as isQuitError, ya as serviceOption, yi as flatMap$1, yl as match$1, ys as ConsoleRef, yt as Error$1, zn as filter, zs as toMillis } from "./contracts-CoHsVor4.mjs";
|
|
3
3
|
//#region ../../node_modules/.pnpm/effect@4.0.2/node_modules/effect/dist/workers/WorkerError.js
|
|
4
4
|
/**
|
|
5
5
|
* Worker error reason for failures while spawning or setting up a worker.
|
|
@@ -7255,7 +7255,7 @@ const runWith = (command, config) => {
|
|
|
7255
7255
|
};
|
|
7256
7256
|
//#endregion
|
|
7257
7257
|
//#region package.json
|
|
7258
|
-
var version = "0.1.
|
|
7258
|
+
var version = "0.1.1061";
|
|
7259
7259
|
//#endregion
|
|
7260
7260
|
//#region src/main.cli.ts
|
|
7261
7261
|
function section(title, text) {
|