@mindstudio-ai/agent 0.1.182 → 0.1.184

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
@@ -425,6 +425,7 @@ Ask structured questions about text, JSON, or images and get calibrated answers
425
425
  - mercury-decide runs Inception's Mercury Decide, which reads up to 64k tokens and up to 16 PNG, JPEG, WebP, or GIF images, each at most 10 MiB and 14 MiB together.
426
426
  - drex-max, drex-v2.0 and drex-v1.5 run Nace.AI's Drex, served by DeepInfra, and take at most 16 questions. drex-max reads up to 262k tokens and up to 4 PNG, JPEG, WebP, or GIF images, 9 MiB together. drex-v2.0 and drex-v1.5 read text only, up to 128k tokens. nace-ai/drex-max, nace-ai/drex-v2.0 and nace-ai/drex-v1.5 name the same three.
427
427
  - gpt-6-luna-decisions runs OpenAI's Decisions API (in beta), which reads up to 922k tokens and PNG, JPEG, WebP, or GIF images of up to 20 MB each. It takes up to 200 questions, and a choice needs at least 2 options. gpt-6-luna names it too.
428
+ - gemini-decision-1 runs Google's Gemini Decision 1, which reads up to 262k tokens and PNG, JPEG, WebP, or GIF images, up to 100 MB of image data in one request. It takes 1 to 1,000 questions. A question id uses only letters, digits, underscore, and hyphen, up to 64 characters, and a choice needs 2 to 255 options. A yes/no probability is between 0.01 and 0.99.
428
429
  - images is for a model that reads them. Pass URLs or data URLs. A model that reads none refuses the call.
429
430
  - The response model field is the version that answered.
430
431
  - Billed per input token. Output tokens are free. Each model has its own rate, and GPT-6 Luna Decisions bills a prompt over 272k tokens at twice its rate.
@@ -450,7 +451,7 @@ Download a file from a URL and extract its text content. Supports PDFs (includin
450
451
  - `mistral-document-ai-2512`: Mistral Document AI on Microsoft Foundry, up to 30 MB and 30 pages, with typed blocks.
451
452
  - `llamaparse`: LlamaParse's agentic mode, up to 100 MB and 1,000 pages, markdown without blocks.
452
453
  - `google-document-ai`: Google Document AI OCR, up to 500 pages, where the deployment has set it up.
453
- - Maximum file size is 50MB per URL.
454
+ - A URL that isn't one of the app's own files is downloaded first, and can be at most 50 MB. One of the app's own files is read where it sits: up to the model's limit when a model reads it (a PDF, an image), and up to 50 MB for a kind read without a model (text, HTML, spreadsheets and office documents).
454
455
  - Input: `{ url: string | string[], extractionModelOverride?: { model: string, config?: object }, model?: string, includeBlocks?: boolean }`
455
456
  - Output: `{ text: string | string[], documents: { url: string, text: string, pages: { pageNumber: number, markdown: string, blocks?: unknown[], dimensions?: { width: number, height: number, dpi?: number } }[], pagesProcessed: number }[] }`
456
457
 
@@ -1967,6 +1968,8 @@ Other methods: `stats()`, `documents()` (the first thousand, or `documents({ ids
1967
1968
 
1968
1969
  `removeWhere({ metadata?, filename?, documentIds?, externalIdPrefix? })` removes every matching document (vectors, row and bytes) in pages of a thousand and returns `{ deleted, remaining }`. Chunk-level filter fields, `entities` and an empty selector are refused; deleting a whole source is an owner operation (`remy-admin datasources delete`), not something app code does.
1969
1970
 
1971
+ `addMany(documents, { budgetDollars? })` adds many records at once: rows of the app's own tables rendered to text, as an array or any iterable or async iterable of `{ externalId, title, markdown, metadata?, entities?, replaces? }` (what a mapper's `documents()` returns), in any number. It returns `{ documentCount, job }`: one job builds them, priced before it runs and starting on its own within the budget; follow it with `job(id)`. An `externalId` the source already holds is superseded when the job finishes, unchanged markdown builds nothing, and new metadata or entities on unchanged markdown update in place. A document that fails validation is left out and counted on the job. It throws `data_source_busy` while another job runs on the source and `data_source_mapped` on a source with a mapper. `add()` is for one document at a time and is rate-limited per app (`rate_limited`, 429).
1972
+
1970
1973
  Keeping a corpus in sync with an S3 bucket: the owner connects the bucket once with `remy-admin datasources connect --source <slug> --bucket <b> --region <r> --prefix <p> --access-key-secret <NAME> --secret-key-secret <NAME>` (the two names are app secrets set with `remy-admin secrets set`; credentials are never written in code or pasted in chat). From then on `await Source.sync()` lists the bucket, diffs it by ETag against what was ingested, and runs a job over what changed — returning `{ job }` immediately; poll `Source.job(id)` or list `Source.jobs()`. A nightly sync is an ordinary cron interface job whose method calls `sync()`; nothing is spent when nothing changed. The job auto-approves under the connector's per-sync budget; a plan over it waits in `planned` for the owner to `remy-admin datasources jobs approve <id>`.
1971
1974
 
1972
1975
  When the file is not the document — a JSON record that should become markdown plus metadata, a JSONL object holding many articles, a kill notice that means "remove this story" — give the source a MAPPER: `datasources/<slug>.mapper.ts` exporting `defineMapper(Source, { map })` from `@mindstudio-ai/agent`, declared in mindstudio.json as `"dataSources": [{ "slug": "<slug>", "mapper": { "path": "dist/datasources/<slug>.mapper.ts" } }]`. `map(object)` gets `{ key, size, contentType, etag, lastModified, metadata, entities, bytes(), text(), json() }` and returns one of `documents([{ externalId, title, markdown, metadata?, entities?, replaces? }])`, `passthrough({ metadata?, entities? })` (ingest the raw object as-is), `skip(reason)`, or `deletes([externalId, ...])`; throwing is the object's error. `documents()` takes an array or any iterable or async iterable with no cap on its length, so a generator that yields a document per row streams an export of any size; a document that fails validation is left out and named, the rest go in. Everything entering a mapped source is mapped — jobs, syncs and `add()` alike — so `add()` on a mapped source returns `documents` (possibly several, with `invalid` naming any that failed) and throws `mapper_skipped` for an object the mapper refused; an object that maps to more than a thousand documents registers the first thousand and returns `job`, which takes the rest (`documentCount` is the total). A mapper may call models (`runTask`) or `fetch`; every call is spend per object. The owner tests one with `remy-admin datasources map test --source <slug> --dev` before deploying, reads what a job skipped with `datasources jobs quarantine <id>`, and re-applies a fixed mapper with `datasources remap --source <slug>`. See the dataSources skill for the authoring loop.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/agent",
3
- "version": "0.1.182",
3
+ "version": "0.1.184",
4
4
  "description": "TypeScript SDK for MindStudio direct step execution",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",