@mindstudio-ai/agent 0.1.101 → 0.1.103
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 +6 -0
- package/dist/cli.js +37 -19
- package/dist/index.d.ts +58 -0
- package/dist/index.js +48 -14
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +37 -19
- package/llms.txt +7 -5
- package/package.json +1 -1
package/llms.txt
CHANGED
|
@@ -776,8 +776,10 @@ Search the web using Google and return structured results.
|
|
|
776
776
|
- Defaults to us/english, but can optionally specify country and/or language.
|
|
777
777
|
- Defaults to any time, but can optionally specify last hour, last day, week, month, or year.
|
|
778
778
|
- Defaults to top 30 results, but can specify 1 to 100 results to return.
|
|
779
|
-
-
|
|
780
|
-
-
|
|
779
|
+
- Set fetchTopN to also read the page content of the first N results in the same step, instead of following up with a separate Scrape URL step per result. Costs meaningfully more (each page is a full scrape), so ask for the fewest you need.
|
|
780
|
+
- Also returns Google's "people also ask" and related searches when available, which are useful for choosing a follow-up query.
|
|
781
|
+
- Input: `{ query: string, exportType: "text" | "json", countryCode?: string, languageCode?: string, dateRange?: "hour" | "day" | "week" | "month" | "year" | "any", numResults?: number, fetchTopN?: number }`
|
|
782
|
+
- Output: `{ results: { title: string, description: string, url: string, content?: string }[], peopleAlsoAsk?: { question?: string, snippet?: string, link?: string }[], relatedSearches?: string[] }`
|
|
781
783
|
|
|
782
784
|
#### searchGoogleImages
|
|
783
785
|
Search Google Images and return image results with URLs and metadata.
|
|
@@ -1810,7 +1812,7 @@ const { url } = await mindstudio.uploadFile(readFileSync('photo.png'), { extensi
|
|
|
1810
1812
|
Output: `{ url: string }` — The permanent public CDN URL.
|
|
1811
1813
|
|
|
1812
1814
|
#### `files` — per-app file storage (private by default)
|
|
1813
|
-
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. 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.
|
|
1815
|
+
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.
|
|
1814
1816
|
|
|
1815
1817
|
```typescript
|
|
1816
1818
|
import { files } from '@mindstudio-ai/agent';
|
|
@@ -1826,7 +1828,7 @@ await file.shareUrl(); // absolute signed URL that works with NO session (email/
|
|
|
1826
1828
|
```
|
|
1827
1829
|
|
|
1828
1830
|
Store methods:
|
|
1829
|
-
- `put(content, { key?, contentType?, filename?, contentAddressed? })` → `StoredFile`. `content` is `Buffer | Uint8Array | string`. Omit `key` for a random UUID; `contentAddressed: true` derives an immutable `<sha256>.<ext>` key.
|
|
1831
|
+
- `put(content, { key?, contentType?, filename?, contentAddressed?, cacheControl? })` → `StoredFile`. `content` is `Buffer | Uint8Array | string`. 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`).
|
|
1830
1832
|
- `get(key)` → `Buffer` · `head(key)` → `StoredFile` · `exists(key)` → `boolean`
|
|
1831
1833
|
- `list({ prefix?, cursor?, limit? })` → `{ files: StoredFile[]; cursor? }`
|
|
1832
1834
|
- `delete(key)` → `void`
|
|
@@ -1839,7 +1841,7 @@ Store methods:
|
|
|
1839
1841
|
User uploads (client-direct — bytes go straight to storage, never through the app backend): a backend method mints a token, the frontend submits it with `@mindstudio-ai/interface`.
|
|
1840
1842
|
```typescript
|
|
1841
1843
|
// backend method
|
|
1842
|
-
const token = await Uploads.createUploadToken({ contentType, maxSize: 25 * 1024 * 1024 });
|
|
1844
|
+
const token = await Uploads.createUploadToken({ contentType, maxSize: 25 * 1024 * 1024 }); // also accepts cacheControl
|
|
1843
1845
|
return token;
|
|
1844
1846
|
// frontend (@mindstudio-ai/interface)
|
|
1845
1847
|
import { platform } from '@mindstudio-ai/interface';
|