@mindstudio-ai/remy 0.1.252 → 0.1.253

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.
@@ -1,13 +1,31 @@
1
1
  # Files & Storage
2
2
 
3
- Per-app blob storage the twin of `db` (`db` stores rows; `files` stores files: user uploads,
4
- generated documents, images, marketing assets). **Private by default.** Files serve on the app's own
5
- domain.
6
-
7
- **File stores are always live there is no dev copy.** Every `put`/`delete`/overwrite hits
8
- production storage immediately and irreversibly. And unlike the database, **scenarios never reset file
9
- stores** — a scenario truncates DB tables but leaves files untouched, so files are not a "clean slate"
10
- you can re-seed, and orphaned files accumulate across runs. Delete deliberately.
3
+ Per-app blob storage: user uploads, generated documents, images, marketing assets. **Think of a store
4
+ as a CDN-backed bucket the app talks to not app-defined state like the database.** You declare the
5
+ store; what lands in it is arbitrary durable blobs the app doesn't model — no schema, nothing to
6
+ migrate, no dev/prod sync. **Private by default**, served on the app's own domain. (The API is
7
+ *shaped* like `db` `defineStore` at module scope, import the handle, like `defineTable` — but the
8
+ mental model is a bucket, not rows.)
9
+
10
+ ## How a store behaves (read before the API)
11
+
12
+ - **One store, shared across dev and prod — on purpose.** There's no dev copy: a file you upload in
13
+ the dev editor (a marketing image, a corpus to vectorize) is *already there in prod* at the same
14
+ stable URL. That continuity is a feature — don't fork buckets per environment.
15
+ - **Creates are safe by default**, because keys default to unique — `put()` mints a UUID (or a
16
+ content-addressed hash) when you don't pass one, so a dev write and a prod write land at different
17
+ keys and coexist. A collision only happens when you *choose* a fixed key.
18
+ - **Care goes on the destructive / fixed-key operations**, not on writing in general: `delete(key)`
19
+ and overwriting a **stable key** (e.g. `config/latest.json`) reach the one live store, so a dev run
20
+ can clobber what prod serves. A `put()` with a default key can't. (There's intentionally no bulk
21
+ "clear the store".)
22
+ - **Scenarios don't touch files — and that's correct.** A scenario truncates DB tables to seed test
23
+ *rows*; files are durable and left alone. A store isn't a "clean slate" you re-seed each run — upload
24
+ a test file once in dev and it stays. Accumulation is normal for an asset store; don't write
25
+ `clear()`-style reset helpers.
26
+ - **Need dev and prod to *not* share** something (mutable fixed-key state, or sensitive uploads a
27
+ developer shouldn't see)? There's no per-store isolation switch — scope the key yourself (e.g.
28
+ `config/${env}/…`). Rare; the shared default is right almost always.
11
29
 
12
30
  ## Defining a store
13
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/remy",
3
- "version": "0.1.252",
3
+ "version": "0.1.253",
4
4
  "description": "Remy coding agent",
5
5
  "repository": {
6
6
  "type": "git",