@mindstudio-ai/agent 0.1.120 → 0.1.121
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/dist/cli.js +16 -8
- package/dist/index.d.ts +20 -0
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +16 -8
- package/llms.txt +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2755,6 +2755,13 @@ declare class DataSource {
|
|
|
2755
2755
|
* corpora reload inside the search and never raise it. Sources on dedicated
|
|
2756
2756
|
* capacity are never evicted, so they never raise it either; they raise
|
|
2757
2757
|
* `capacity_hibernated` and friends instead when their capacity is parked.
|
|
2758
|
+
*
|
|
2759
|
+
* **Throws `index_building`** (HTTP 503) on dedicated capacity while a bulk
|
|
2760
|
+
* load runs and after one finishes: the index is not built behind every
|
|
2761
|
+
* write during a load, it is built once at the end, and until then a search
|
|
2762
|
+
* would scan the corpus unindexed. The message carries "N of M vectors
|
|
2763
|
+
* indexed". Handle it like `index_warming`: the knowledge base is being
|
|
2764
|
+
* built, never empty; say so and retry later.
|
|
2758
2765
|
*/
|
|
2759
2766
|
search(query: string, options?: SearchOptions): Promise<{
|
|
2760
2767
|
results: SearchHit[];
|
|
@@ -2917,6 +2924,12 @@ declare class DataSource {
|
|
|
2917
2924
|
sync(options?: {
|
|
2918
2925
|
/** Override the connector's per-sync budget for this run, in dollars. */
|
|
2919
2926
|
budgetDollars?: number;
|
|
2927
|
+
/**
|
|
2928
|
+
* Embed at the provider's priority tier for this run: calls are admitted
|
|
2929
|
+
* ahead of the provider's queue at 1.5x the embedding price. For the sync
|
|
2930
|
+
* where the clock matters more than the price; off by default.
|
|
2931
|
+
*/
|
|
2932
|
+
priority?: boolean;
|
|
2920
2933
|
}): Promise<{
|
|
2921
2934
|
job: DataSourceJob;
|
|
2922
2935
|
}>;
|
|
@@ -11848,6 +11861,13 @@ interface MapRunObject {
|
|
|
11848
11861
|
metadata: DocumentMetadata | null;
|
|
11849
11862
|
/** Short-lived read URL for the object's bytes. */
|
|
11850
11863
|
url: string;
|
|
11864
|
+
/**
|
|
11865
|
+
* The object's bytes, base64, when the platform already held them (it
|
|
11866
|
+
* hashes and lands every object before mapping, and small objects ride
|
|
11867
|
+
* along). Present, it is the bytes; `url` is the fallback for large objects
|
|
11868
|
+
* and for frames from a platform that predates it.
|
|
11869
|
+
*/
|
|
11870
|
+
content?: string;
|
|
11851
11871
|
}
|
|
11852
11872
|
interface MapRunParams {
|
|
11853
11873
|
v: 1;
|
package/dist/index.js
CHANGED
|
@@ -2874,6 +2874,13 @@ var DataSource = class {
|
|
|
2874
2874
|
* corpora reload inside the search and never raise it. Sources on dedicated
|
|
2875
2875
|
* capacity are never evicted, so they never raise it either; they raise
|
|
2876
2876
|
* `capacity_hibernated` and friends instead when their capacity is parked.
|
|
2877
|
+
*
|
|
2878
|
+
* **Throws `index_building`** (HTTP 503) on dedicated capacity while a bulk
|
|
2879
|
+
* load runs and after one finishes: the index is not built behind every
|
|
2880
|
+
* write during a load, it is built once at the end, and until then a search
|
|
2881
|
+
* would scan the corpus unindexed. The message carries "N of M vectors
|
|
2882
|
+
* indexed". Handle it like `index_warming`: the knowledge base is being
|
|
2883
|
+
* built, never empty; say so and retry later.
|
|
2877
2884
|
*/
|
|
2878
2885
|
async search(query, options) {
|
|
2879
2886
|
const { results, mode, latencyMs } = await this._call("search", {
|
|
@@ -3102,7 +3109,8 @@ var DataSource = class {
|
|
|
3102
3109
|
async sync(options) {
|
|
3103
3110
|
return this._call("sync", {
|
|
3104
3111
|
slug: this._slug,
|
|
3105
|
-
...options?.budgetDollars !== void 0 ? { budgetDollars: options.budgetDollars } : {}
|
|
3112
|
+
...options?.budgetDollars !== void 0 ? { budgetDollars: options.budgetDollars } : {},
|
|
3113
|
+
...options?.priority ? { priority: true } : {}
|
|
3106
3114
|
});
|
|
3107
3115
|
}
|
|
3108
3116
|
/** Recent ingestion jobs on this source (syncs and CLI loads), newest first. */
|
|
@@ -7955,7 +7963,9 @@ function objectFor(input) {
|
|
|
7955
7963
|
let cached = null;
|
|
7956
7964
|
const bytes = () => {
|
|
7957
7965
|
if (!cached) {
|
|
7958
|
-
cached =
|
|
7966
|
+
cached = input.content !== void 0 ? Promise.resolve(
|
|
7967
|
+
new Uint8Array(Buffer.from(input.content, "base64"))
|
|
7968
|
+
) : (async () => {
|
|
7959
7969
|
const response = await fetch(input.url);
|
|
7960
7970
|
if (!response.ok) {
|
|
7961
7971
|
throw new Error(
|