exa-js 2.22.1 → 2.23.0
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 +3 -6
- package/dist/index.d.mts +20 -8
- package/dist/index.d.ts +20 -8
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -223,17 +223,14 @@ console.log(
|
|
|
223
223
|
);
|
|
224
224
|
```
|
|
225
225
|
|
|
226
|
-
For Agent
|
|
226
|
+
For Agent Ultra, set `effort: "ultra"`:
|
|
227
227
|
|
|
228
228
|
```ts
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
const maxRun = await exa.beta.agent.runs.create({
|
|
229
|
+
const ultraRun = await exa.agent.runs.create({
|
|
232
230
|
query:
|
|
233
231
|
"Find all companies building browser automation tools in the United States.",
|
|
234
|
-
effort: "
|
|
232
|
+
effort: "ultra",
|
|
235
233
|
budget: { maxCostDollars: 10 },
|
|
236
|
-
betas: [AGENT_MAX_EFFORT_BETA],
|
|
237
234
|
});
|
|
238
235
|
```
|
|
239
236
|
|
package/dist/index.d.mts
CHANGED
|
@@ -18,17 +18,21 @@ interface AgentBetaOptions {
|
|
|
18
18
|
betas?: string[];
|
|
19
19
|
}
|
|
20
20
|
type AgentRunStatus = "queued" | "running" | "completed" | "failed" | "cancelled";
|
|
21
|
-
type AgentStopReason = "schema_satisfied" | "budget_reached" | "stopped" | "error" | "cancelled";
|
|
21
|
+
type AgentStopReason = "schema_satisfied" | "budget_reached" | "time_limit_reached" | "stopped" | "error" | "cancelled";
|
|
22
22
|
type AgentConfidence = "low" | "medium" | "high";
|
|
23
|
-
type AgentEffort = "minimal" | "low" | "medium" | "high" | "xhigh" | "auto" | "max";
|
|
24
|
-
/** Per-run spend ceiling for the metered `auto` and `
|
|
23
|
+
type AgentEffort = "minimal" | "low" | "medium" | "high" | "xhigh" | "auto" | "ultra" | "max";
|
|
24
|
+
/** Per-run spend ceiling for the metered `auto` and `ultra` efforts. */
|
|
25
25
|
interface AgentBudget {
|
|
26
26
|
/**
|
|
27
27
|
* Maximum spend for the run in US dollars.
|
|
28
|
-
* Only accepted by the API for `auto` and `
|
|
28
|
+
* Only accepted by the API for `auto` and `ultra`; the server validates the
|
|
29
29
|
* allowed range and applies defaults when omitted.
|
|
30
30
|
*/
|
|
31
31
|
maxCostDollars?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Soft wall-clock ceiling in seconds (300–10,800). Only accepted for `ultra`.
|
|
34
|
+
*/
|
|
35
|
+
maxDurationSeconds?: number;
|
|
32
36
|
}
|
|
33
37
|
/**
|
|
34
38
|
* Identifier of an Exa Connect data provider, e.g. `"fiber_ai"`,
|
|
@@ -657,6 +661,11 @@ declare class AgentRunsClient extends AgentBaseClient {
|
|
|
657
661
|
* Cancel a queued or running Agent run.
|
|
658
662
|
*/
|
|
659
663
|
cancel(runId: string): Promise<AgentRun>;
|
|
664
|
+
/**
|
|
665
|
+
* Stop a running Agent run, completing it early with the results
|
|
666
|
+
* gathered so far. Only supported for `ultra` effort runs.
|
|
667
|
+
*/
|
|
668
|
+
stop(runId: string): Promise<AgentRun>;
|
|
660
669
|
/**
|
|
661
670
|
* Delete a stored Agent run.
|
|
662
671
|
*/
|
|
@@ -710,7 +719,7 @@ declare class AgentBetaRunsClient extends AgentRunsClient {
|
|
|
710
719
|
cancel(runId: string, options?: AgentBetaOptions): Promise<AgentRun>;
|
|
711
720
|
/**
|
|
712
721
|
* Stop a running Agent run, completing it early with the results
|
|
713
|
-
* gathered so far. Only supported for `
|
|
722
|
+
* gathered so far. Only supported for `ultra` effort runs.
|
|
714
723
|
*/
|
|
715
724
|
stop(runId: string, options?: AgentBetaOptions): Promise<AgentRun>;
|
|
716
725
|
delete(runId: string, options?: AgentBetaOptions): Promise<DeletedAgentRun>;
|
|
@@ -3219,7 +3228,8 @@ declare enum CreateImportResponseStatus {
|
|
|
3219
3228
|
pending = "pending",
|
|
3220
3229
|
processing = "processing",
|
|
3221
3230
|
completed = "completed",
|
|
3222
|
-
failed = "failed"
|
|
3231
|
+
failed = "failed",
|
|
3232
|
+
canceled = "canceled"
|
|
3223
3233
|
}
|
|
3224
3234
|
declare enum WebsetImportSource {
|
|
3225
3235
|
import = "import",
|
|
@@ -3267,7 +3277,8 @@ declare enum ImportStatus {
|
|
|
3267
3277
|
pending = "pending",
|
|
3268
3278
|
processing = "processing",
|
|
3269
3279
|
completed = "completed",
|
|
3270
|
-
failed = "failed"
|
|
3280
|
+
failed = "failed",
|
|
3281
|
+
canceled = "canceled"
|
|
3271
3282
|
}
|
|
3272
3283
|
declare enum MonitorObject {
|
|
3273
3284
|
monitor = "monitor"
|
|
@@ -3353,7 +3364,8 @@ declare enum WebsetSearchBehavior {
|
|
|
3353
3364
|
}
|
|
3354
3365
|
declare enum WebsetSearchCanceledReason {
|
|
3355
3366
|
webset_deleted = "webset_deleted",
|
|
3356
|
-
webset_canceled = "webset_canceled"
|
|
3367
|
+
webset_canceled = "webset_canceled",
|
|
3368
|
+
out_of_credits = "out_of_credits"
|
|
3357
3369
|
}
|
|
3358
3370
|
|
|
3359
3371
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -18,17 +18,21 @@ interface AgentBetaOptions {
|
|
|
18
18
|
betas?: string[];
|
|
19
19
|
}
|
|
20
20
|
type AgentRunStatus = "queued" | "running" | "completed" | "failed" | "cancelled";
|
|
21
|
-
type AgentStopReason = "schema_satisfied" | "budget_reached" | "stopped" | "error" | "cancelled";
|
|
21
|
+
type AgentStopReason = "schema_satisfied" | "budget_reached" | "time_limit_reached" | "stopped" | "error" | "cancelled";
|
|
22
22
|
type AgentConfidence = "low" | "medium" | "high";
|
|
23
|
-
type AgentEffort = "minimal" | "low" | "medium" | "high" | "xhigh" | "auto" | "max";
|
|
24
|
-
/** Per-run spend ceiling for the metered `auto` and `
|
|
23
|
+
type AgentEffort = "minimal" | "low" | "medium" | "high" | "xhigh" | "auto" | "ultra" | "max";
|
|
24
|
+
/** Per-run spend ceiling for the metered `auto` and `ultra` efforts. */
|
|
25
25
|
interface AgentBudget {
|
|
26
26
|
/**
|
|
27
27
|
* Maximum spend for the run in US dollars.
|
|
28
|
-
* Only accepted by the API for `auto` and `
|
|
28
|
+
* Only accepted by the API for `auto` and `ultra`; the server validates the
|
|
29
29
|
* allowed range and applies defaults when omitted.
|
|
30
30
|
*/
|
|
31
31
|
maxCostDollars?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Soft wall-clock ceiling in seconds (300–10,800). Only accepted for `ultra`.
|
|
34
|
+
*/
|
|
35
|
+
maxDurationSeconds?: number;
|
|
32
36
|
}
|
|
33
37
|
/**
|
|
34
38
|
* Identifier of an Exa Connect data provider, e.g. `"fiber_ai"`,
|
|
@@ -657,6 +661,11 @@ declare class AgentRunsClient extends AgentBaseClient {
|
|
|
657
661
|
* Cancel a queued or running Agent run.
|
|
658
662
|
*/
|
|
659
663
|
cancel(runId: string): Promise<AgentRun>;
|
|
664
|
+
/**
|
|
665
|
+
* Stop a running Agent run, completing it early with the results
|
|
666
|
+
* gathered so far. Only supported for `ultra` effort runs.
|
|
667
|
+
*/
|
|
668
|
+
stop(runId: string): Promise<AgentRun>;
|
|
660
669
|
/**
|
|
661
670
|
* Delete a stored Agent run.
|
|
662
671
|
*/
|
|
@@ -710,7 +719,7 @@ declare class AgentBetaRunsClient extends AgentRunsClient {
|
|
|
710
719
|
cancel(runId: string, options?: AgentBetaOptions): Promise<AgentRun>;
|
|
711
720
|
/**
|
|
712
721
|
* Stop a running Agent run, completing it early with the results
|
|
713
|
-
* gathered so far. Only supported for `
|
|
722
|
+
* gathered so far. Only supported for `ultra` effort runs.
|
|
714
723
|
*/
|
|
715
724
|
stop(runId: string, options?: AgentBetaOptions): Promise<AgentRun>;
|
|
716
725
|
delete(runId: string, options?: AgentBetaOptions): Promise<DeletedAgentRun>;
|
|
@@ -3219,7 +3228,8 @@ declare enum CreateImportResponseStatus {
|
|
|
3219
3228
|
pending = "pending",
|
|
3220
3229
|
processing = "processing",
|
|
3221
3230
|
completed = "completed",
|
|
3222
|
-
failed = "failed"
|
|
3231
|
+
failed = "failed",
|
|
3232
|
+
canceled = "canceled"
|
|
3223
3233
|
}
|
|
3224
3234
|
declare enum WebsetImportSource {
|
|
3225
3235
|
import = "import",
|
|
@@ -3267,7 +3277,8 @@ declare enum ImportStatus {
|
|
|
3267
3277
|
pending = "pending",
|
|
3268
3278
|
processing = "processing",
|
|
3269
3279
|
completed = "completed",
|
|
3270
|
-
failed = "failed"
|
|
3280
|
+
failed = "failed",
|
|
3281
|
+
canceled = "canceled"
|
|
3271
3282
|
}
|
|
3272
3283
|
declare enum MonitorObject {
|
|
3273
3284
|
monitor = "monitor"
|
|
@@ -3353,7 +3364,8 @@ declare enum WebsetSearchBehavior {
|
|
|
3353
3364
|
}
|
|
3354
3365
|
declare enum WebsetSearchCanceledReason {
|
|
3355
3366
|
webset_deleted = "webset_deleted",
|
|
3356
|
-
webset_canceled = "webset_canceled"
|
|
3367
|
+
webset_canceled = "webset_canceled",
|
|
3368
|
+
out_of_credits = "out_of_credits"
|
|
3357
3369
|
}
|
|
3358
3370
|
|
|
3359
3371
|
/**
|
package/dist/index.js
CHANGED
|
@@ -100,7 +100,7 @@ var import_cross_fetch = __toESM(require("cross-fetch"));
|
|
|
100
100
|
// package.json
|
|
101
101
|
var package_default = {
|
|
102
102
|
name: "exa-js",
|
|
103
|
-
version: "2.
|
|
103
|
+
version: "2.23.0",
|
|
104
104
|
description: "Exa SDK for Node.js and the browser",
|
|
105
105
|
publishConfig: {
|
|
106
106
|
access: "public"
|
|
@@ -768,6 +768,13 @@ var AgentRunsClient = class extends AgentBaseClient {
|
|
|
768
768
|
async cancel(runId) {
|
|
769
769
|
return this.request(`/${runId}/cancel`, "POST");
|
|
770
770
|
}
|
|
771
|
+
/**
|
|
772
|
+
* Stop a running Agent run, completing it early with the results
|
|
773
|
+
* gathered so far. Only supported for `ultra` effort runs.
|
|
774
|
+
*/
|
|
775
|
+
async stop(runId) {
|
|
776
|
+
return this.request(`/${runId}/stop`, "POST");
|
|
777
|
+
}
|
|
771
778
|
/**
|
|
772
779
|
* Delete a stored Agent run.
|
|
773
780
|
*/
|
|
@@ -920,7 +927,7 @@ var AgentBetaRunsClient = class extends AgentRunsClient {
|
|
|
920
927
|
}
|
|
921
928
|
/**
|
|
922
929
|
* Stop a running Agent run, completing it early with the results
|
|
923
|
-
* gathered so far. Only supported for `
|
|
930
|
+
* gathered so far. Only supported for `ultra` effort runs.
|
|
924
931
|
*/
|
|
925
932
|
async stop(runId, options) {
|
|
926
933
|
return this.request(
|
|
@@ -1575,6 +1582,7 @@ var ImportStatus = /* @__PURE__ */ ((ImportStatus2) => {
|
|
|
1575
1582
|
ImportStatus2["processing"] = "processing";
|
|
1576
1583
|
ImportStatus2["completed"] = "completed";
|
|
1577
1584
|
ImportStatus2["failed"] = "failed";
|
|
1585
|
+
ImportStatus2["canceled"] = "canceled";
|
|
1578
1586
|
return ImportStatus2;
|
|
1579
1587
|
})(ImportStatus || {});
|
|
1580
1588
|
var MonitorObject = /* @__PURE__ */ ((MonitorObject2) => {
|
|
@@ -1673,6 +1681,7 @@ var WebsetSearchBehavior = /* @__PURE__ */ ((WebsetSearchBehavior2) => {
|
|
|
1673
1681
|
var WebsetSearchCanceledReason = /* @__PURE__ */ ((WebsetSearchCanceledReason2) => {
|
|
1674
1682
|
WebsetSearchCanceledReason2["webset_deleted"] = "webset_deleted";
|
|
1675
1683
|
WebsetSearchCanceledReason2["webset_canceled"] = "webset_canceled";
|
|
1684
|
+
WebsetSearchCanceledReason2["out_of_credits"] = "out_of_credits";
|
|
1676
1685
|
return WebsetSearchCanceledReason2;
|
|
1677
1686
|
})(WebsetSearchCanceledReason || {});
|
|
1678
1687
|
|