@mindstudio-ai/agent 0.1.130 → 0.1.132

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
@@ -320,6 +320,14 @@ Create a draft email in the connected Gmail account.
320
320
  - Input: `{ to: string, subject: string, message: string, connectionId?: string, messageType: "plain" | "html" | "markdown" }`
321
321
  - Output: `{ draftId: string }`
322
322
 
323
+ #### decomposeImage
324
+ Split an image into a base image and transparent layers.
325
+ - Uses Seedream 5.0 Flash layer decomposition. There is no model picker.
326
+ - An optional prompt can name the objects or groupings to separate.
327
+ - The output is an array of hosted image URLs. PNG output keeps layer transparency.
328
+ - Input: `{ image: string, prompt?: string, intermediateAsset?: boolean }`
329
+ - Output: `{ imageUrls: string[] }`
330
+
323
331
  #### deleteDataSource
324
332
  Legacy v1 data sources. v2 apps should use `dataSources.defineDataSource()` from @mindstudio-ai/agent instead, which owns parsing, chunking, embedding and citations. Delete a vector data source from the current app.
325
333
  - Soft-deletes a data source (vector database) by marking it as deleted.
@@ -1672,7 +1680,7 @@ const { url } = await mindstudio.uploadFile(readFileSync('photo.png'), { extensi
1672
1680
  Output: `{ url: string }` — The permanent public CDN URL.
1673
1681
 
1674
1682
  #### `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.
1683
+ 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
1684
 
1677
1685
  ```typescript
1678
1686
  import { files } from '@mindstudio-ai/agent';
@@ -1688,7 +1696,7 @@ await file.shareUrl(); // absolute signed URL that works with NO session (email/
1688
1696
  ```
1689
1697
 
1690
1698
  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`).
1699
+ - `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
1700
  - `get(key)` → `Buffer` · `head(key)` → `StoredFile` · `exists(key)` → `boolean`
1693
1701
  - `list({ prefix?, cursor?, limit? })` → `{ files: StoredFile[]; cursor? }`
1694
1702
  - `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.132",
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
  }