@aryasaatvik/scratchpad 0.2.1 → 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 CHANGED
@@ -1,3 +1,27 @@
1
+ ## @aryasaatvik/scratchpad@0.3.1
2
+
3
+ ### Retire every file for a closed issue or milestone
4
+
5
+ When one issue or milestone had more than one backlog mapping, for example after two checkouts' mappings were adopted into one mount, `pull` retired only one of them on closure. The others stayed as active files and were never synced again. `pull` now retires every mapping for a closed object. For an open object it syncs through one mapping and reports any second file so you can merge it by hand. A second mapping whose file is already gone is dropped, so the next push no longer closes the issue.
6
+
7
+ ### Re-list everything with `--full`
8
+
9
+ `scratchpad pull --full` and `scratchpad sync --full` list every remote issue and milestone instead of only those changed since the last pull. Use it once to retire files for closures that an earlier incremental pull already passed.
10
+
11
+ ## @aryasaatvik/scratchpad@0.3.0
12
+
13
+ ### Upload larger files with resumable multipart transfers
14
+
15
+ Upload files up to 1 GiB through verified Worker-proxied multipart transfers. Large uploads use 32 MiB parts with three concurrent requests and SHA-256 verification. Resume interrupted transfers with `scratchpad upload <file> --resume <session-id>` while the session remains valid. Repeat any `--ttl-days`, `--name`, and `--content-type` options from the original upload with the same values, using the same authenticated profile.
16
+
17
+ ### Honor expiry in public download caching
18
+
19
+ Expiring upload links and expired responses use `Cache-Control: no-store`, preventing caches from serving new copies past the configured expiry. Previously downloaded copies cannot be recalled.
20
+
21
+ ### Use stable Effect v4
22
+
23
+ Update the CLI runtime to stable Effect v4 while preserving existing commands.
24
+
1
25
  ## @aryasaatvik/scratchpad@0.2.1
2
26
 
3
27
  ### Report the released version
package/README.md CHANGED
@@ -7,7 +7,7 @@ matter; the first provider is GitHub. Artifacts and uploads target a deployed
7
7
  Worker (for example `scratchpad.arya.sh`). Codemaps stay on disk under
8
8
  `.scratchpad/codemaps/`.
9
9
 
10
- Status: 0.1.0 early release. Scratchpad is Bun-first.
10
+ Status: 0.2.1. Scratchpad is Bun-first.
11
11
 
12
12
  ## Packages
13
13
 
@@ -25,7 +25,7 @@ The SQLite store builds on drizzle-orm's native `effect-sqlite-bun` integration
25
25
 
26
26
  ## Install
27
27
 
28
- Run with Bun:
28
+ Run with Bun 1.4.4 or newer:
29
29
 
30
30
  ```sh
31
31
  bunx @aryasaatvik/scratchpad --help
@@ -110,7 +110,8 @@ the planned delete without mutating anything.
110
110
 
111
111
  Backlog files follow the Scratchpad skill's contract: `status` is free text in
112
112
  the repository's own vocabulary, the title is the first `# ` heading, and
113
- `milestone` / `depends_on` are relative paths. A status whose first word is in
113
+ `milestone` / `depends_on` are paths relative to the file that contains them, so issues
114
+ and milestones may be nested in subfolders of `backlog/issues/` and `backlog/milestones/`. A status whose first word is in
114
115
  `backlog.closedStatuses` (default `done`, `complete(d)`, `closed`, `merged`,
115
116
  `landed`, `delivered`, `cancel(l)ed`, `superseded`, `implemented`, `historical`,
116
117
  `moved`) syncs as closed; anything else is open. Files in the older shape
@@ -144,7 +145,11 @@ scratchpad archive <paths...> --reason "<why>" # move into archive/<date>-<re
144
145
  repository the project id is local to the directory. `--global` feedback lives in `~/.scratchpad`
145
146
  (override with `SCRATCHPAD_GLOBAL_HOME`).
146
147
 
147
- The classifier is opt-in: set `TYPESAFE_API_KEY` and optionally choose a model
148
+ The classifier is opt-in: store a key in
149
+ `$XDG_CONFIG_HOME/scratchpad/secrets/typesafe-api-key` (default
150
+ `~/.config/scratchpad/secrets/typesafe-api-key`), or set `TYPESAFE_API_KEY` to override it.
151
+ Keep the secrets directory private (`0700`) and the key file readable only by its owner (`0600`).
152
+ Relative `XDG_CONFIG_HOME` values are ignored. Optionally choose a model
148
153
  with `SCRATCHPAD_CLASSIFIER` or `classifier.model` in `scratchpad.config.ts`
149
154
  (`SCRATCHPAD_CLASSIFIER=none` disables it). Feedback is redacted before it is
150
155
  sent for classification. Feedback files are written first, and classifier
@@ -206,13 +211,40 @@ artifacts. Also require a profile or `--url`.
206
211
 
207
212
  ```
208
213
  scratchpad upload <file...> [--name <name>] [--ttl-days <n>] [--profile <name>]
214
+ scratchpad upload <file> --resume <session-id> # repeat the original name/type/TTL options
209
215
  scratchpad uploads list [--json]
210
216
  scratchpad uploads delete <id>
211
217
  ```
212
218
 
213
- Uploaded bodies are served under `/f/*`. Soft-deleted artifacts go to Trash via
214
- `artifact delete`; abandoned upload blobs are reclaimed with
215
- `artifact prune --sweep-orphans`.
219
+ Files up to 1 GiB can be uploaded from the CLI or Files view. The existing
220
+ single-request path handles files up to 100 MiB; larger files stream through
221
+ the Worker in 32 MiB parts. A public link appears only after R2 verifies the
222
+ whole file's SHA-256. Browser hashing reads bounded slices, and text previews
223
+ keep their separate 100 MiB ceiling.
224
+
225
+ Multipart sessions expire after 24 hours, or earlier if their `--ttl-days`
226
+ deadline passes. Requests retry transient failures without duplicating the
227
+ link. If a part's storage result is ambiguous, cancellation and a fresh upload
228
+ are safer than replacing a possibly in-flight part. Completion receipts let
229
+ API callers retry completion with the same session ID after a lost response.
230
+ The CLI's `--resume` flag resumes one unchanged file with its original options
231
+ and authenticated identity. Browser uploads retry in-process; they do not
232
+ persist a resumable session across page reloads.
233
+ `artifact prune --sweep-orphans` retries staging cleanup and removes old,
234
+ cleaned session records. See [the multipart upload design](docs/adr/0009-worker-multipart-uploads.md).
235
+
236
+ Uploaded bodies are served under `/f/*`. With `--ttl-days`, a link expires that
237
+ many days after registration, stops serving, and disappears from upload listings.
238
+ Expiring links use `Cache-Control: no-store` so subsequent requests recheck the
239
+ expiration; links without a TTL retain their one-year immutable caching policy.
240
+ Expiration cannot revoke copies already downloaded or responses cached under an
241
+ older cache policy.
242
+
243
+ Expiration is logical, not immediate storage deletion. Run
244
+ `artifact prune --sweep-orphans` to remove expired upload records and reclaim
245
+ unreferenced blobs after the orphan grace period. Blobs shared by another upload
246
+ or artifact remain available to that reference. Soft-deleted artifacts go to
247
+ Trash via `artifact delete`.
216
248
 
217
249
  Most commands accept `--json` for machine-readable output.
218
250
 
@@ -273,6 +305,6 @@ bun run test:worker-integration # ephemeral Worker + paired HTML bridge; require
273
305
  ## Release
274
306
 
275
307
  The npm package is `@aryasaatvik/scratchpad`. See
276
- [`docs/release.md`](docs/release.md) for the 0.1.0 preflight, publish, public
308
+ [`docs/release.md`](docs/release.md) for the preflight, publish, public
277
309
  repository, and tag checklist. Worker deploy steps live in
278
310
  [`docs/deploy.md`](docs/deploy.md).
package/SECURITY.md CHANGED
@@ -10,7 +10,7 @@ for this repository.
10
10
 
11
11
  | Version | Supported |
12
12
  | ------- | --------- |
13
- | 0.1.x | Yes |
13
+ | 0.2.x | Yes |
14
14
 
15
15
  ## Token Handling
16
16