@mindstudio-ai/agent 0.1.130 → 0.1.131

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/llms.txt CHANGED
@@ -1672,7 +1672,7 @@ const { url } = await mindstudio.uploadFile(readFileSync('photo.png'), { extensi
1672
1672
  Output: `{ url: string }` — The permanent public CDN URL.
1673
1673
 
1674
1674
  #### `files` — per-app file storage (private by default)
1675
- Typed per-app file storage: user uploads, generated documents, images, marketing assets. Think of a store as a CDN-backed bucket the app talks to — NOT app-defined state like a `db` table. The API is *shaped* like the `db` namespace (define a store at module scope, then read/write), but its contents aren't modeled by code, and one store is shared across dev and prod (a file uploaded in the dev editor is already live in prod at the same URL). Creates are safe by default because keys default to unique (UUID, or a content-addressed hash); the operations to treat with care are `delete(key)` and overwriting a fixed key. Public objects are CDN-cached per their `Cache-Control`, set at put time via `cacheControl`: auto-minted keys default to immutable (cache-forever — the key is never reused), and named keys default to `public, max-age=300`, so overwriting one propagates publicly within ~5 minutes; pass `cacheControl` to tune (e.g. `'public, max-age=60'` for near-live config, `'no-store'` to revalidate every read). Files are served on the app's own domain: private stores (the default) are signed / session-authorized; public stores are world-readable, CDN-served, and images resize via query params (e.g. `?w=400&h=300&fit=cover`). Prefer this over the deprecated `uploadFile()` for app storage.
1675
+ Typed per-app file storage: user uploads, generated documents, images, marketing assets. Think of a store as a CDN-backed bucket the app talks to — NOT app-defined state like a `db` table. The API is *shaped* like the `db` namespace (define a store at module scope, then read/write), but its contents aren't modeled by code, and one store is shared across dev and prod (a file uploaded in the dev editor is already live in prod at the same URL). Creates are safe by default because keys default to unique (UUID, or a content-addressed hash); the operations to treat with care are `delete(key)` and overwriting a fixed key. Public objects are CDN-cached, and the CDN drops one when it is overwritten or deleted; its `Cache-Control`, set at put time via `cacheControl`, is how long a browser may keep a copy, at most an hour: auto-minted keys get the hour (the key is never reused), and named keys default to `public, max-age=300`, so an overwrite reaches every browser within ~5 minutes; pass `cacheControl` to tune (e.g. `'public, max-age=60'` for near-live config, `'no-store'` to revalidate every read). Files are served on the app's own domain: private stores (the default) are signed / session-authorized; public stores are world-readable, CDN-served, and images resize via query params (e.g. `?w=400&h=300&fit=cover`). Prefer this over the deprecated `uploadFile()` for app storage.
1676
1676
 
1677
1677
  ```typescript
1678
1678
  import { files } from '@mindstudio-ai/agent';
@@ -1688,7 +1688,7 @@ await file.shareUrl(); // absolute signed URL that works with NO session (email/
1688
1688
  ```
1689
1689
 
1690
1690
  Store methods:
1691
- - `put(content, { key?, contentType?, filename?, contentAddressed?, cacheControl? })` → `StoredFile`. `content` is `Buffer | Uint8Array | string` — any size up to 5 GiB (large content transparently uploads direct to storage via a presigned POST, so there is no request-body cap). Omit `key` for a random UUID; `contentAddressed: true` derives an immutable `<sha256>.<ext>` key. `cacheControl` sets the CDN caching of a public object (defaults: auto-minted keys immutable, named keys `public, max-age=300`).
1691
+ - `put(content, { key?, contentType?, filename?, contentAddressed?, cacheControl? })` → `StoredFile`. `content` is `Buffer | Uint8Array | string` — any size up to 5 GiB (large content transparently uploads direct to storage via a presigned POST, so there is no request-body cap). Omit `key` for a random UUID; `contentAddressed: true` derives an immutable `<sha256>.<ext>` key. `cacheControl` sets how long a browser may keep a public object, at most an hour (defaults: auto-minted keys an hour, named keys `public, max-age=300`).
1692
1692
  - `get(key)` → `Buffer` · `head(key)` → `StoredFile` · `exists(key)` → `boolean`
1693
1693
  - `list({ prefix?, cursor?, limit? })` → `{ files: StoredFile[]; cursor? }`
1694
1694
  - `delete(key)` → `void`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/agent",
3
- "version": "0.1.130",
3
+ "version": "0.1.131",
4
4
  "description": "TypeScript SDK for MindStudio direct step execution",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "build": "npm run codegen && tsup",
24
24
  "dev": "tsup --watch",
25
25
  "codegen": "tsx scripts/codegen.ts",
26
- "typecheck": "npm run tsc -- --noEmit",
26
+ "typecheck": "npm run codegen && npm run tsc -- --noEmit",
27
27
  "postinstall": "node dist/postinstall.js || true",
28
28
  "prepublishOnly": "npm run build",
29
29
  "tsc": "node node_modules/@typescript/native/bin/tsc",
@@ -62,11 +62,10 @@
62
62
  },
63
63
  "sideEffects": false,
64
64
  "devDependencies": {
65
- "@eslint/js": "^10.0.1",
66
65
  "@types/node": "^25.3.2",
67
66
  "@typescript/native": "npm:typescript@^7.0.2",
68
67
  "tsup": "^8",
69
- "tsx": "^4",
68
+ "tsx": "^4.23.15",
70
69
  "typescript": "npm:@typescript/typescript6@^6.0.2"
71
70
  }
72
71
  }