@mindstudio-ai/agent 0.1.183 → 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/CHANGELOG.md +12 -0
- package/dist/cli.js +124 -9
- package/dist/datasources/index.d.ts +1 -1
- package/dist/datasources/parts.d.ts +14 -0
- package/dist/datasources/source.d.ts +63 -2
- package/dist/generated/steps.d.ts +1 -0
- package/dist/generated/types.d.ts +3 -3
- package/dist/index.js +114 -27
- package/dist/index.js.map +4 -4
- package/llms.txt +3 -0
- package/package.json +1 -1
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.
|
|
@@ -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.
|