exa-js 2.27.0 → 2.28.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 -1
- package/dist/index.d.mts +38 -10
- package/dist/index.d.ts +38 -10
- package/dist/index.js +17 -19
- package/dist/index.mjs +9 -11
- package/package.json +7 -8
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -80,7 +80,7 @@ Search `outputSchema` modes:
|
|
|
80
80
|
- `type: "text"`: return plain text in `output.content` (optionally guided by `description`)
|
|
81
81
|
- `type: "object"`: return structured JSON in `output.content`
|
|
82
82
|
|
|
83
|
-
`systemPrompt` and `outputSchema` are supported on every search type
|
|
83
|
+
`systemPrompt` and `outputSchema` are supported on every search type except `lite`.
|
|
84
84
|
Search streaming is available via `streamSearch(...)`, which yields OpenAI-style chat completion chunks.
|
|
85
85
|
A search without `outputSchema` has no text to stream. Its stream yields one chunk with the results as `citations`.
|
|
86
86
|
|
|
@@ -89,6 +89,8 @@ For `type: "object"`, search currently enforces:
|
|
|
89
89
|
- max nesting depth: `2`
|
|
90
90
|
- max total properties: `10`
|
|
91
91
|
|
|
92
|
+
A schema can be declared outside the call (`as const`, or `satisfies DeepOutputSchema`).
|
|
93
|
+
|
|
92
94
|
Deep search variants that also support `additionalQueries`:
|
|
93
95
|
|
|
94
96
|
- `deep-lite`
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z } from 'zod/v3';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Transport-level options for a single request.
|
|
@@ -86,6 +86,18 @@ declare abstract class RequestScopedClient {
|
|
|
86
86
|
protected forNextPage(): this;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
/**
|
|
90
|
+
* A zod 3 schema whose output is `T`, typed by shape rather than as zod's
|
|
91
|
+
* `ZodType`: under `moduleResolution: node`, zod 3.25 resolves `zod` and
|
|
92
|
+
* `zod/v3` to different declaration files, and comparing a caller's schema
|
|
93
|
+
* across them exhausts the TypeScript checker. `_parse` exists only on zod 3
|
|
94
|
+
* schemas, so zod 4 schemas are still rejected at compile time.
|
|
95
|
+
*/
|
|
96
|
+
type ZodSchema<T = any> = {
|
|
97
|
+
readonly _output: T;
|
|
98
|
+
_parse(input: any): any;
|
|
99
|
+
};
|
|
100
|
+
|
|
89
101
|
/**
|
|
90
102
|
* Types for the Exa Agent API.
|
|
91
103
|
*/
|
|
@@ -920,10 +932,10 @@ interface GroundingEntry {
|
|
|
920
932
|
interface SearchMonitorRunOutput {
|
|
921
933
|
results?: Record<string, unknown>[] | null;
|
|
922
934
|
/**
|
|
923
|
-
* Synthesized output.
|
|
924
|
-
* the
|
|
935
|
+
* Synthesized output. Text for a text `outputSchema`, otherwise JSON matching
|
|
936
|
+
* the schema.
|
|
925
937
|
*/
|
|
926
|
-
content?: string | Record<string, unknown> | null;
|
|
938
|
+
content?: string | number | boolean | Record<string, unknown> | unknown[] | null;
|
|
927
939
|
grounding?: GroundingEntry[] | null;
|
|
928
940
|
}
|
|
929
941
|
interface SearchMonitor {
|
|
@@ -4773,6 +4785,7 @@ type DeepTextOutputSchema = {
|
|
|
4773
4785
|
};
|
|
4774
4786
|
/**
|
|
4775
4787
|
* Deep search output schema mode for structured JSON object responses.
|
|
4788
|
+
* Accepts any other JSON Schema keyword, and schemas declared `as const`.
|
|
4776
4789
|
*/
|
|
4777
4790
|
type DeepObjectOutputSchema = {
|
|
4778
4791
|
type: "object";
|
|
@@ -4783,7 +4796,9 @@ type DeepObjectOutputSchema = {
|
|
|
4783
4796
|
/**
|
|
4784
4797
|
* Required property names.
|
|
4785
4798
|
*/
|
|
4786
|
-
required?: string[];
|
|
4799
|
+
required?: readonly string[];
|
|
4800
|
+
additionalProperties?: boolean;
|
|
4801
|
+
[keyword: string]: unknown;
|
|
4787
4802
|
};
|
|
4788
4803
|
/**
|
|
4789
4804
|
* Search output schema.
|
|
@@ -4981,10 +4996,11 @@ type TextResponse = {
|
|
|
4981
4996
|
/**
|
|
4982
4997
|
* @typedef {Object} HighlightsResponse
|
|
4983
4998
|
* @property {string[]} highlights - The highlights as an array of strings.
|
|
4984
|
-
* @property {number[]} [highlightScores] -
|
|
4999
|
+
* @property {number[]} [highlightScores] - Legacy field. The API no longer returns it.
|
|
4985
5000
|
*/
|
|
4986
5001
|
type HighlightsResponse = {
|
|
4987
5002
|
highlights: string[];
|
|
5003
|
+
/** @deprecated The API no longer returns this field. */
|
|
4988
5004
|
highlightScores?: number[];
|
|
4989
5005
|
};
|
|
4990
5006
|
/**
|
|
@@ -5178,7 +5194,7 @@ type Entity = CompanyEntity | PersonEntity;
|
|
|
5178
5194
|
* @property {string} url - The URL of the search result.
|
|
5179
5195
|
* @property {string} [publishedDate] - The estimated creation date of the content.
|
|
5180
5196
|
* @property {string} [author] - The author of the content, if available.
|
|
5181
|
-
* @property {number} [score] -
|
|
5197
|
+
* @property {number} [score] - Legacy field. Current search types, including the default "auto", do not return it. Results arrive in relevance order, so keep that order instead of sorting by score.
|
|
5182
5198
|
* @property {string} id - The temporary ID for the document.
|
|
5183
5199
|
* @property {string} [image] - A representative image for the content, if any.
|
|
5184
5200
|
* @property {string} [favicon] - A favicon for the site, if any.
|
|
@@ -5298,11 +5314,23 @@ type ContentStatusError = {
|
|
|
5298
5314
|
tag?: string;
|
|
5299
5315
|
httpStatusCode?: number | null;
|
|
5300
5316
|
};
|
|
5317
|
+
type KnownContentFetchStatus = "success" | "error";
|
|
5318
|
+
/**
|
|
5319
|
+
* Status of the content fetch operation. A value not in
|
|
5320
|
+
* `KnownContentFetchStatus` is kept as a string.
|
|
5321
|
+
*/
|
|
5322
|
+
type ContentFetchStatus = KnownContentFetchStatus | (string & {});
|
|
5323
|
+
type KnownContentSource = "cached" | "crawled";
|
|
5324
|
+
/**
|
|
5325
|
+
* Where the returned content was sourced from. A value not in
|
|
5326
|
+
* `KnownContentSource` is kept as a string.
|
|
5327
|
+
*/
|
|
5328
|
+
type ContentSource = KnownContentSource | (string & {});
|
|
5301
5329
|
/** Status information for a requested URL. */
|
|
5302
5330
|
type Status = {
|
|
5303
5331
|
id: string;
|
|
5304
|
-
status:
|
|
5305
|
-
source?:
|
|
5332
|
+
status: ContentFetchStatus;
|
|
5333
|
+
source?: ContentSource;
|
|
5306
5334
|
error?: ContentStatusError | null;
|
|
5307
5335
|
};
|
|
5308
5336
|
/**
|
|
@@ -5765,4 +5793,4 @@ declare class Exa {
|
|
|
5765
5793
|
private parseSSEStream;
|
|
5766
5794
|
}
|
|
5767
5795
|
|
|
5768
|
-
export { AGENT_BETA_HEADER, AGENT_MAX_EFFORT_BETA, AGENT_MONITORS_BETA_HEADER, type AddAgentMonitorEntitiesParams, AgentBetaClient, type AgentBetaOptions, type AgentBudget, AgentClient, type AgentConfidence, type AgentCostDollars, type AgentCreateOptions, type AgentDataSource, type AgentDataSourceProvider, type AgentEffort, type AgentError, type AgentEvent, type AgentGroundingCitation, type AgentGroundingEntry, type AgentInput, type AgentMonitor, type AgentMonitorBacktest, type AgentMonitorBacktestContent, type AgentMonitorBacktestEntity, AgentMonitorBacktestFailedError, type AgentMonitorBacktestResult, type AgentMonitorBacktestStatus, type AgentMonitorBacktestWaitOptions, AgentMonitorBacktestsClient, type AgentMonitorChange, type AgentMonitorChangeEntity, type AgentMonitorChangeField, AgentMonitorChangesClient, type AgentMonitorCitation, type AgentMonitorContent, type AgentMonitorCreation, AgentMonitorEntitiesClient, type AgentMonitorEntity, type AgentMonitorEntityView, type AgentMonitorField, type AgentMonitorFieldMode, type AgentMonitorFieldValueType, type AgentMonitorRefresh, type AgentMonitorStatus, type AgentMonitorUsage, type AgentMonitorsBetaOptions, AgentMonitorsClient, type AgentOutput, type AgentRun, AgentRunCancelledError, AgentRunEventsClient, AgentRunFailedError, type AgentRunStatus, type AgentRunTyped, AgentRunsClient, type AgentStopReason, type AgentUsage, type AgentWaitOptions, type AnswerOptions, type AnswerOptionsTyped, type AnswerResponse, type AnswerResponseTyped, type AnswerStreamChunk, type AnswerStreamResponse, type AnthropicToolResult, AnthropicTools, type ApiWarning, type ApiWarningCode, type ApiWarningContext, type ArticleEntity, type BaseSearchOptions, BetaClient, type BetaOptions, type CompanyEntity, type ContentStatusError, type ContentsOptions, type ContentsResultComponent, type ContextOptions, type CostDollars, type CostDollarsContents, type CostDollarsSeearch, type CreateAgentMonitorBacktestParams, type CreateAgentMonitorEntityParams, type CreateAgentMonitorFieldParams, type CreateAgentMonitorOptions, type CreateAgentMonitorParams, type CreateAgentRunParams, type CreateAgentRunParamsTyped, type CreateCriterionParameters, type CreateEnrichmentParameters, CreateEnrichmentParametersFormat, type CreateImportParameters, CreateImportParametersFormat, type CreateImportResponse, type CreateImportWithCsvParameters, type CreateMonitorParameters, type CreateSearchMonitorParams, type CreateSearchMonitorResponse, type CreateWebhookParameters, type CreateWebsetParameters, type CreateWebsetSearchParameters, type CsvDataInput, type CustomEntity, DEFAULT_GET_CONTENTS_TOOL_DESCRIPTION, DEFAULT_WEB_SEARCH_TOOL_DESCRIPTION, DYNAMIC_HIGHLIGHTS_BETA, type DeepObjectOutputSchema, type DeepOutputSchema, type DeepSearchOutput, type DeepSearchOutputGrounding, type DeepSearchOutputGroundingCitation, type DeepSearchOutputGroundingConfidence, type DeepSearchType, type DeepTextOutputSchema, type Default, type DeletedAgentMonitor, type DeletedAgentRun, type EnrichmentResult, type Entity, type EntityCompanyProperties, type EntityCompanyPropertiesFinancials, type EntityCompanyPropertiesFundingRound, type EntityCompanyPropertiesHeadquarters, type EntityCompanyPropertiesWebTraffic, type EntityCompanyPropertiesWorkforce, type EntityDateRange, type EntityPersonProperties, type EntityPersonPropertiesCompanyRef, type EntityPersonPropertiesEducationHistoryEntry, type EntityPersonPropertiesInstitutionRef, type EntityPersonPropertiesNotableWork, type EntityPersonPropertiesResearch, type EntityPersonPropertiesWorkHistoryEntry, type Event, EventType, EventsClient, Exa, ExaAbortError, type ExaClientOptions, ExaError, type ExaErrorEnvelope, ExaTimeoutError, type ExaToolSpec, type ExtrasOptions, type ExtrasResponse, type FindSimilarOptions, type GetContentsTool, type GetContentsToolConfig, type GetWebsetResponse, type GroundingCitation, type GroundingEntry, type HighlightsContentsOptions, type HighlightsResponse, HttpStatusCode, type Import, ImportFailedReason, ImportFormat, ImportObject, ImportStatus, ImportsClient, type JSONSchema, type KnownAgentConfidence, type KnownAgentMonitorStatus, type KnownAgentRunStatus, type KnownAgentStopReason, type KnownSearchMonitorRunFailReason, type KnownSearchMonitorRunStatus, type KnownSearchMonitorStatus, type KnownSearchMonitorWebhookEvent, type ListAgentMonitorChangesParams, type ListAgentMonitorChangesResponse, type ListAgentMonitorEntitiesParams, type ListAgentMonitorEntitiesResponse, type ListAgentMonitorsParams, type ListAgentMonitorsResponse, type ListAgentRunEventsParams, type ListAgentRunEventsResponse, type ListAgentRunsParams, type ListAgentRunsResponse, type ListEventsResponse, type ListImportsResponse, type ListMonitorRunsResponse, type ListMonitorsOptions, type ListMonitorsResponse, type ListResearchRequest, type ListResearchResponse, type ListSearchMonitorRunsParams, type ListSearchMonitorRunsResponse, type ListSearchMonitorsParams, type ListSearchMonitorsResponse, type ListWebhookAttemptsResponse, type ListWebhooksResponse, type ListWebsetItemResponse, type ListWebsetItemsOptions, type ListWebsetsResponse, type LivecrawlOptions, type Monitor, type MonitorBehavior, type MonitorCadence, MonitorObject, type MonitorRun, MonitorRunObject, MonitorRunStatus, MonitorRunType, MonitorStatus, OpenAIResponsesTools, type OpenAIToolMessage, OpenAITools, type PersonEntity, type PreviewWebsetParameters, type PreviewWebsetResponse, type RegularSearchOptions, type RequestOptions, type Research, type ResearchCreateParamsTyped, type ResearchCreateRequest, type ResearchCreateResponse, type ResearchDefinitionEvent, type ResearchEvent, type ResearchOperation, type ResearchOutputEvent, type ResearchPaperEntity, type ResearchPlanDefinitionEvent, type ResearchPlanOperationEvent, type ResearchPlanOutputEvent, type ResearchStatus, type ResearchStreamEvent, type ResearchStreamEventTyped, type ResearchTaskDefinitionEvent, type ResearchTaskOperationEvent, type ResearchTaskOutputEvent, type ResearchTyped, type ResponsesFunctionCallOutput, SEARCH_OBJECTIVE_TOOL_DESCRIPTION, type SearchMonitor, type SearchMonitorRun, type SearchMonitorRunFailReason, type SearchMonitorRunOutput, type SearchMonitorRunStatus, SearchMonitorRunsClient, type SearchMonitorSearch, type SearchMonitorStatus, type SearchMonitorTrigger, type SearchMonitorWebhook, type SearchMonitorWebhookEvent, SearchMonitorsClient, type SearchNotice, type SearchNoticeCode, type SearchResponse, type SearchResult, type SearchStreamChunk, type SearchWarning, type SearchWarningCode, type SectionTag, type Status, type SubpagesResponse, type SummaryContentsOptions, type SummaryContentsOptionsTyped, type SummaryResponse, type TextContentsOptions, type TextResponse, type ToolDefinition, type ToolJsonSchema, type ToolNamespace, ToolRegistry, type TransportRequestOptions, type TriggerSearchMonitorResponse, type UpdateEnrichmentParameters, type UpdateImport, type UpdateMonitor, UpdateMonitorStatus, type UpdateSearchMonitorParams, type UpdateWebhookParameters, type UpdateWebsetRequest, type UserIdentifierOptions, type UserLocation, type VerbosityOptions, type WaitUntilCompletedOptions, type WarningsOption, type WebSearchTool, type WebSearchToolConfig, type Webhook, type WebhookAttempt, WebhookStatus, type Webset, type WebsetEnrichment, WebsetEnrichmentFormat, WebsetEnrichmentStatus, WebsetEnrichmentsClient, WebsetExcludeSource, type WebsetHeadersLike, WebsetImportSource, type WebsetItem, type WebsetItemArticleProperties, type WebsetItemCompanyProperties, type WebsetItemCustomProperties, type WebsetItemEvaluation, WebsetItemEvaluationSatisfied, type WebsetItemPersonProperties, type WebsetItemResearchPaperProperties, WebsetItemSource, WebsetItemsClient, WebsetMonitorsClient, type WebsetSearch, WebsetSearchBehavior, WebsetSearchCanceledReason, WebsetSearchScopeSource, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, createGetContentsTool, createWebSearchTool, Exa as default };
|
|
5796
|
+
export { AGENT_BETA_HEADER, AGENT_MAX_EFFORT_BETA, AGENT_MONITORS_BETA_HEADER, type AddAgentMonitorEntitiesParams, AgentBetaClient, type AgentBetaOptions, type AgentBudget, AgentClient, type AgentConfidence, type AgentCostDollars, type AgentCreateOptions, type AgentDataSource, type AgentDataSourceProvider, type AgentEffort, type AgentError, type AgentEvent, type AgentGroundingCitation, type AgentGroundingEntry, type AgentInput, type AgentMonitor, type AgentMonitorBacktest, type AgentMonitorBacktestContent, type AgentMonitorBacktestEntity, AgentMonitorBacktestFailedError, type AgentMonitorBacktestResult, type AgentMonitorBacktestStatus, type AgentMonitorBacktestWaitOptions, AgentMonitorBacktestsClient, type AgentMonitorChange, type AgentMonitorChangeEntity, type AgentMonitorChangeField, AgentMonitorChangesClient, type AgentMonitorCitation, type AgentMonitorContent, type AgentMonitorCreation, AgentMonitorEntitiesClient, type AgentMonitorEntity, type AgentMonitorEntityView, type AgentMonitorField, type AgentMonitorFieldMode, type AgentMonitorFieldValueType, type AgentMonitorRefresh, type AgentMonitorStatus, type AgentMonitorUsage, type AgentMonitorsBetaOptions, AgentMonitorsClient, type AgentOutput, type AgentRun, AgentRunCancelledError, AgentRunEventsClient, AgentRunFailedError, type AgentRunStatus, type AgentRunTyped, AgentRunsClient, type AgentStopReason, type AgentUsage, type AgentWaitOptions, type AnswerOptions, type AnswerOptionsTyped, type AnswerResponse, type AnswerResponseTyped, type AnswerStreamChunk, type AnswerStreamResponse, type AnthropicToolResult, AnthropicTools, type ApiWarning, type ApiWarningCode, type ApiWarningContext, type ArticleEntity, type BaseSearchOptions, BetaClient, type BetaOptions, type CompanyEntity, type ContentFetchStatus, type ContentSource, type ContentStatusError, type ContentsOptions, type ContentsResultComponent, type ContextOptions, type CostDollars, type CostDollarsContents, type CostDollarsSeearch, type CreateAgentMonitorBacktestParams, type CreateAgentMonitorEntityParams, type CreateAgentMonitorFieldParams, type CreateAgentMonitorOptions, type CreateAgentMonitorParams, type CreateAgentRunParams, type CreateAgentRunParamsTyped, type CreateCriterionParameters, type CreateEnrichmentParameters, CreateEnrichmentParametersFormat, type CreateImportParameters, CreateImportParametersFormat, type CreateImportResponse, type CreateImportWithCsvParameters, type CreateMonitorParameters, type CreateSearchMonitorParams, type CreateSearchMonitorResponse, type CreateWebhookParameters, type CreateWebsetParameters, type CreateWebsetSearchParameters, type CsvDataInput, type CustomEntity, DEFAULT_GET_CONTENTS_TOOL_DESCRIPTION, DEFAULT_WEB_SEARCH_TOOL_DESCRIPTION, DYNAMIC_HIGHLIGHTS_BETA, type DeepObjectOutputSchema, type DeepOutputSchema, type DeepSearchOutput, type DeepSearchOutputGrounding, type DeepSearchOutputGroundingCitation, type DeepSearchOutputGroundingConfidence, type DeepSearchType, type DeepTextOutputSchema, type Default, type DeletedAgentMonitor, type DeletedAgentRun, type EnrichmentResult, type Entity, type EntityCompanyProperties, type EntityCompanyPropertiesFinancials, type EntityCompanyPropertiesFundingRound, type EntityCompanyPropertiesHeadquarters, type EntityCompanyPropertiesWebTraffic, type EntityCompanyPropertiesWorkforce, type EntityDateRange, type EntityPersonProperties, type EntityPersonPropertiesCompanyRef, type EntityPersonPropertiesEducationHistoryEntry, type EntityPersonPropertiesInstitutionRef, type EntityPersonPropertiesNotableWork, type EntityPersonPropertiesResearch, type EntityPersonPropertiesWorkHistoryEntry, type Event, EventType, EventsClient, Exa, ExaAbortError, type ExaClientOptions, ExaError, type ExaErrorEnvelope, ExaTimeoutError, type ExaToolSpec, type ExtrasOptions, type ExtrasResponse, type FindSimilarOptions, type GetContentsTool, type GetContentsToolConfig, type GetWebsetResponse, type GroundingCitation, type GroundingEntry, type HighlightsContentsOptions, type HighlightsResponse, HttpStatusCode, type Import, ImportFailedReason, ImportFormat, ImportObject, ImportStatus, ImportsClient, type JSONSchema, type KnownAgentConfidence, type KnownAgentMonitorStatus, type KnownAgentRunStatus, type KnownAgentStopReason, type KnownContentFetchStatus, type KnownContentSource, type KnownSearchMonitorRunFailReason, type KnownSearchMonitorRunStatus, type KnownSearchMonitorStatus, type KnownSearchMonitorWebhookEvent, type ListAgentMonitorChangesParams, type ListAgentMonitorChangesResponse, type ListAgentMonitorEntitiesParams, type ListAgentMonitorEntitiesResponse, type ListAgentMonitorsParams, type ListAgentMonitorsResponse, type ListAgentRunEventsParams, type ListAgentRunEventsResponse, type ListAgentRunsParams, type ListAgentRunsResponse, type ListEventsResponse, type ListImportsResponse, type ListMonitorRunsResponse, type ListMonitorsOptions, type ListMonitorsResponse, type ListResearchRequest, type ListResearchResponse, type ListSearchMonitorRunsParams, type ListSearchMonitorRunsResponse, type ListSearchMonitorsParams, type ListSearchMonitorsResponse, type ListWebhookAttemptsResponse, type ListWebhooksResponse, type ListWebsetItemResponse, type ListWebsetItemsOptions, type ListWebsetsResponse, type LivecrawlOptions, type Monitor, type MonitorBehavior, type MonitorCadence, MonitorObject, type MonitorRun, MonitorRunObject, MonitorRunStatus, MonitorRunType, MonitorStatus, OpenAIResponsesTools, type OpenAIToolMessage, OpenAITools, type PersonEntity, type PreviewWebsetParameters, type PreviewWebsetResponse, type RegularSearchOptions, type RequestOptions, type Research, type ResearchCreateParamsTyped, type ResearchCreateRequest, type ResearchCreateResponse, type ResearchDefinitionEvent, type ResearchEvent, type ResearchOperation, type ResearchOutputEvent, type ResearchPaperEntity, type ResearchPlanDefinitionEvent, type ResearchPlanOperationEvent, type ResearchPlanOutputEvent, type ResearchStatus, type ResearchStreamEvent, type ResearchStreamEventTyped, type ResearchTaskDefinitionEvent, type ResearchTaskOperationEvent, type ResearchTaskOutputEvent, type ResearchTyped, type ResponsesFunctionCallOutput, SEARCH_OBJECTIVE_TOOL_DESCRIPTION, type SearchMonitor, type SearchMonitorRun, type SearchMonitorRunFailReason, type SearchMonitorRunOutput, type SearchMonitorRunStatus, SearchMonitorRunsClient, type SearchMonitorSearch, type SearchMonitorStatus, type SearchMonitorTrigger, type SearchMonitorWebhook, type SearchMonitorWebhookEvent, SearchMonitorsClient, type SearchNotice, type SearchNoticeCode, type SearchResponse, type SearchResult, type SearchStreamChunk, type SearchWarning, type SearchWarningCode, type SectionTag, type Status, type SubpagesResponse, type SummaryContentsOptions, type SummaryContentsOptionsTyped, type SummaryResponse, type TextContentsOptions, type TextResponse, type ToolDefinition, type ToolJsonSchema, type ToolNamespace, ToolRegistry, type TransportRequestOptions, type TriggerSearchMonitorResponse, type UpdateEnrichmentParameters, type UpdateImport, type UpdateMonitor, UpdateMonitorStatus, type UpdateSearchMonitorParams, type UpdateWebhookParameters, type UpdateWebsetRequest, type UserIdentifierOptions, type UserLocation, type VerbosityOptions, type WaitUntilCompletedOptions, type WarningsOption, type WebSearchTool, type WebSearchToolConfig, type Webhook, type WebhookAttempt, WebhookStatus, type Webset, type WebsetEnrichment, WebsetEnrichmentFormat, WebsetEnrichmentStatus, WebsetEnrichmentsClient, WebsetExcludeSource, type WebsetHeadersLike, WebsetImportSource, type WebsetItem, type WebsetItemArticleProperties, type WebsetItemCompanyProperties, type WebsetItemCustomProperties, type WebsetItemEvaluation, WebsetItemEvaluationSatisfied, type WebsetItemPersonProperties, type WebsetItemResearchPaperProperties, WebsetItemSource, WebsetItemsClient, WebsetMonitorsClient, type WebsetSearch, WebsetSearchBehavior, WebsetSearchCanceledReason, WebsetSearchScopeSource, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, createGetContentsTool, createWebSearchTool, Exa as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z } from 'zod/v3';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Transport-level options for a single request.
|
|
@@ -86,6 +86,18 @@ declare abstract class RequestScopedClient {
|
|
|
86
86
|
protected forNextPage(): this;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
/**
|
|
90
|
+
* A zod 3 schema whose output is `T`, typed by shape rather than as zod's
|
|
91
|
+
* `ZodType`: under `moduleResolution: node`, zod 3.25 resolves `zod` and
|
|
92
|
+
* `zod/v3` to different declaration files, and comparing a caller's schema
|
|
93
|
+
* across them exhausts the TypeScript checker. `_parse` exists only on zod 3
|
|
94
|
+
* schemas, so zod 4 schemas are still rejected at compile time.
|
|
95
|
+
*/
|
|
96
|
+
type ZodSchema<T = any> = {
|
|
97
|
+
readonly _output: T;
|
|
98
|
+
_parse(input: any): any;
|
|
99
|
+
};
|
|
100
|
+
|
|
89
101
|
/**
|
|
90
102
|
* Types for the Exa Agent API.
|
|
91
103
|
*/
|
|
@@ -920,10 +932,10 @@ interface GroundingEntry {
|
|
|
920
932
|
interface SearchMonitorRunOutput {
|
|
921
933
|
results?: Record<string, unknown>[] | null;
|
|
922
934
|
/**
|
|
923
|
-
* Synthesized output.
|
|
924
|
-
* the
|
|
935
|
+
* Synthesized output. Text for a text `outputSchema`, otherwise JSON matching
|
|
936
|
+
* the schema.
|
|
925
937
|
*/
|
|
926
|
-
content?: string | Record<string, unknown> | null;
|
|
938
|
+
content?: string | number | boolean | Record<string, unknown> | unknown[] | null;
|
|
927
939
|
grounding?: GroundingEntry[] | null;
|
|
928
940
|
}
|
|
929
941
|
interface SearchMonitor {
|
|
@@ -4773,6 +4785,7 @@ type DeepTextOutputSchema = {
|
|
|
4773
4785
|
};
|
|
4774
4786
|
/**
|
|
4775
4787
|
* Deep search output schema mode for structured JSON object responses.
|
|
4788
|
+
* Accepts any other JSON Schema keyword, and schemas declared `as const`.
|
|
4776
4789
|
*/
|
|
4777
4790
|
type DeepObjectOutputSchema = {
|
|
4778
4791
|
type: "object";
|
|
@@ -4783,7 +4796,9 @@ type DeepObjectOutputSchema = {
|
|
|
4783
4796
|
/**
|
|
4784
4797
|
* Required property names.
|
|
4785
4798
|
*/
|
|
4786
|
-
required?: string[];
|
|
4799
|
+
required?: readonly string[];
|
|
4800
|
+
additionalProperties?: boolean;
|
|
4801
|
+
[keyword: string]: unknown;
|
|
4787
4802
|
};
|
|
4788
4803
|
/**
|
|
4789
4804
|
* Search output schema.
|
|
@@ -4981,10 +4996,11 @@ type TextResponse = {
|
|
|
4981
4996
|
/**
|
|
4982
4997
|
* @typedef {Object} HighlightsResponse
|
|
4983
4998
|
* @property {string[]} highlights - The highlights as an array of strings.
|
|
4984
|
-
* @property {number[]} [highlightScores] -
|
|
4999
|
+
* @property {number[]} [highlightScores] - Legacy field. The API no longer returns it.
|
|
4985
5000
|
*/
|
|
4986
5001
|
type HighlightsResponse = {
|
|
4987
5002
|
highlights: string[];
|
|
5003
|
+
/** @deprecated The API no longer returns this field. */
|
|
4988
5004
|
highlightScores?: number[];
|
|
4989
5005
|
};
|
|
4990
5006
|
/**
|
|
@@ -5178,7 +5194,7 @@ type Entity = CompanyEntity | PersonEntity;
|
|
|
5178
5194
|
* @property {string} url - The URL of the search result.
|
|
5179
5195
|
* @property {string} [publishedDate] - The estimated creation date of the content.
|
|
5180
5196
|
* @property {string} [author] - The author of the content, if available.
|
|
5181
|
-
* @property {number} [score] -
|
|
5197
|
+
* @property {number} [score] - Legacy field. Current search types, including the default "auto", do not return it. Results arrive in relevance order, so keep that order instead of sorting by score.
|
|
5182
5198
|
* @property {string} id - The temporary ID for the document.
|
|
5183
5199
|
* @property {string} [image] - A representative image for the content, if any.
|
|
5184
5200
|
* @property {string} [favicon] - A favicon for the site, if any.
|
|
@@ -5298,11 +5314,23 @@ type ContentStatusError = {
|
|
|
5298
5314
|
tag?: string;
|
|
5299
5315
|
httpStatusCode?: number | null;
|
|
5300
5316
|
};
|
|
5317
|
+
type KnownContentFetchStatus = "success" | "error";
|
|
5318
|
+
/**
|
|
5319
|
+
* Status of the content fetch operation. A value not in
|
|
5320
|
+
* `KnownContentFetchStatus` is kept as a string.
|
|
5321
|
+
*/
|
|
5322
|
+
type ContentFetchStatus = KnownContentFetchStatus | (string & {});
|
|
5323
|
+
type KnownContentSource = "cached" | "crawled";
|
|
5324
|
+
/**
|
|
5325
|
+
* Where the returned content was sourced from. A value not in
|
|
5326
|
+
* `KnownContentSource` is kept as a string.
|
|
5327
|
+
*/
|
|
5328
|
+
type ContentSource = KnownContentSource | (string & {});
|
|
5301
5329
|
/** Status information for a requested URL. */
|
|
5302
5330
|
type Status = {
|
|
5303
5331
|
id: string;
|
|
5304
|
-
status:
|
|
5305
|
-
source?:
|
|
5332
|
+
status: ContentFetchStatus;
|
|
5333
|
+
source?: ContentSource;
|
|
5306
5334
|
error?: ContentStatusError | null;
|
|
5307
5335
|
};
|
|
5308
5336
|
/**
|
|
@@ -5765,4 +5793,4 @@ declare class Exa {
|
|
|
5765
5793
|
private parseSSEStream;
|
|
5766
5794
|
}
|
|
5767
5795
|
|
|
5768
|
-
export { AGENT_BETA_HEADER, AGENT_MAX_EFFORT_BETA, AGENT_MONITORS_BETA_HEADER, type AddAgentMonitorEntitiesParams, AgentBetaClient, type AgentBetaOptions, type AgentBudget, AgentClient, type AgentConfidence, type AgentCostDollars, type AgentCreateOptions, type AgentDataSource, type AgentDataSourceProvider, type AgentEffort, type AgentError, type AgentEvent, type AgentGroundingCitation, type AgentGroundingEntry, type AgentInput, type AgentMonitor, type AgentMonitorBacktest, type AgentMonitorBacktestContent, type AgentMonitorBacktestEntity, AgentMonitorBacktestFailedError, type AgentMonitorBacktestResult, type AgentMonitorBacktestStatus, type AgentMonitorBacktestWaitOptions, AgentMonitorBacktestsClient, type AgentMonitorChange, type AgentMonitorChangeEntity, type AgentMonitorChangeField, AgentMonitorChangesClient, type AgentMonitorCitation, type AgentMonitorContent, type AgentMonitorCreation, AgentMonitorEntitiesClient, type AgentMonitorEntity, type AgentMonitorEntityView, type AgentMonitorField, type AgentMonitorFieldMode, type AgentMonitorFieldValueType, type AgentMonitorRefresh, type AgentMonitorStatus, type AgentMonitorUsage, type AgentMonitorsBetaOptions, AgentMonitorsClient, type AgentOutput, type AgentRun, AgentRunCancelledError, AgentRunEventsClient, AgentRunFailedError, type AgentRunStatus, type AgentRunTyped, AgentRunsClient, type AgentStopReason, type AgentUsage, type AgentWaitOptions, type AnswerOptions, type AnswerOptionsTyped, type AnswerResponse, type AnswerResponseTyped, type AnswerStreamChunk, type AnswerStreamResponse, type AnthropicToolResult, AnthropicTools, type ApiWarning, type ApiWarningCode, type ApiWarningContext, type ArticleEntity, type BaseSearchOptions, BetaClient, type BetaOptions, type CompanyEntity, type ContentStatusError, type ContentsOptions, type ContentsResultComponent, type ContextOptions, type CostDollars, type CostDollarsContents, type CostDollarsSeearch, type CreateAgentMonitorBacktestParams, type CreateAgentMonitorEntityParams, type CreateAgentMonitorFieldParams, type CreateAgentMonitorOptions, type CreateAgentMonitorParams, type CreateAgentRunParams, type CreateAgentRunParamsTyped, type CreateCriterionParameters, type CreateEnrichmentParameters, CreateEnrichmentParametersFormat, type CreateImportParameters, CreateImportParametersFormat, type CreateImportResponse, type CreateImportWithCsvParameters, type CreateMonitorParameters, type CreateSearchMonitorParams, type CreateSearchMonitorResponse, type CreateWebhookParameters, type CreateWebsetParameters, type CreateWebsetSearchParameters, type CsvDataInput, type CustomEntity, DEFAULT_GET_CONTENTS_TOOL_DESCRIPTION, DEFAULT_WEB_SEARCH_TOOL_DESCRIPTION, DYNAMIC_HIGHLIGHTS_BETA, type DeepObjectOutputSchema, type DeepOutputSchema, type DeepSearchOutput, type DeepSearchOutputGrounding, type DeepSearchOutputGroundingCitation, type DeepSearchOutputGroundingConfidence, type DeepSearchType, type DeepTextOutputSchema, type Default, type DeletedAgentMonitor, type DeletedAgentRun, type EnrichmentResult, type Entity, type EntityCompanyProperties, type EntityCompanyPropertiesFinancials, type EntityCompanyPropertiesFundingRound, type EntityCompanyPropertiesHeadquarters, type EntityCompanyPropertiesWebTraffic, type EntityCompanyPropertiesWorkforce, type EntityDateRange, type EntityPersonProperties, type EntityPersonPropertiesCompanyRef, type EntityPersonPropertiesEducationHistoryEntry, type EntityPersonPropertiesInstitutionRef, type EntityPersonPropertiesNotableWork, type EntityPersonPropertiesResearch, type EntityPersonPropertiesWorkHistoryEntry, type Event, EventType, EventsClient, Exa, ExaAbortError, type ExaClientOptions, ExaError, type ExaErrorEnvelope, ExaTimeoutError, type ExaToolSpec, type ExtrasOptions, type ExtrasResponse, type FindSimilarOptions, type GetContentsTool, type GetContentsToolConfig, type GetWebsetResponse, type GroundingCitation, type GroundingEntry, type HighlightsContentsOptions, type HighlightsResponse, HttpStatusCode, type Import, ImportFailedReason, ImportFormat, ImportObject, ImportStatus, ImportsClient, type JSONSchema, type KnownAgentConfidence, type KnownAgentMonitorStatus, type KnownAgentRunStatus, type KnownAgentStopReason, type KnownSearchMonitorRunFailReason, type KnownSearchMonitorRunStatus, type KnownSearchMonitorStatus, type KnownSearchMonitorWebhookEvent, type ListAgentMonitorChangesParams, type ListAgentMonitorChangesResponse, type ListAgentMonitorEntitiesParams, type ListAgentMonitorEntitiesResponse, type ListAgentMonitorsParams, type ListAgentMonitorsResponse, type ListAgentRunEventsParams, type ListAgentRunEventsResponse, type ListAgentRunsParams, type ListAgentRunsResponse, type ListEventsResponse, type ListImportsResponse, type ListMonitorRunsResponse, type ListMonitorsOptions, type ListMonitorsResponse, type ListResearchRequest, type ListResearchResponse, type ListSearchMonitorRunsParams, type ListSearchMonitorRunsResponse, type ListSearchMonitorsParams, type ListSearchMonitorsResponse, type ListWebhookAttemptsResponse, type ListWebhooksResponse, type ListWebsetItemResponse, type ListWebsetItemsOptions, type ListWebsetsResponse, type LivecrawlOptions, type Monitor, type MonitorBehavior, type MonitorCadence, MonitorObject, type MonitorRun, MonitorRunObject, MonitorRunStatus, MonitorRunType, MonitorStatus, OpenAIResponsesTools, type OpenAIToolMessage, OpenAITools, type PersonEntity, type PreviewWebsetParameters, type PreviewWebsetResponse, type RegularSearchOptions, type RequestOptions, type Research, type ResearchCreateParamsTyped, type ResearchCreateRequest, type ResearchCreateResponse, type ResearchDefinitionEvent, type ResearchEvent, type ResearchOperation, type ResearchOutputEvent, type ResearchPaperEntity, type ResearchPlanDefinitionEvent, type ResearchPlanOperationEvent, type ResearchPlanOutputEvent, type ResearchStatus, type ResearchStreamEvent, type ResearchStreamEventTyped, type ResearchTaskDefinitionEvent, type ResearchTaskOperationEvent, type ResearchTaskOutputEvent, type ResearchTyped, type ResponsesFunctionCallOutput, SEARCH_OBJECTIVE_TOOL_DESCRIPTION, type SearchMonitor, type SearchMonitorRun, type SearchMonitorRunFailReason, type SearchMonitorRunOutput, type SearchMonitorRunStatus, SearchMonitorRunsClient, type SearchMonitorSearch, type SearchMonitorStatus, type SearchMonitorTrigger, type SearchMonitorWebhook, type SearchMonitorWebhookEvent, SearchMonitorsClient, type SearchNotice, type SearchNoticeCode, type SearchResponse, type SearchResult, type SearchStreamChunk, type SearchWarning, type SearchWarningCode, type SectionTag, type Status, type SubpagesResponse, type SummaryContentsOptions, type SummaryContentsOptionsTyped, type SummaryResponse, type TextContentsOptions, type TextResponse, type ToolDefinition, type ToolJsonSchema, type ToolNamespace, ToolRegistry, type TransportRequestOptions, type TriggerSearchMonitorResponse, type UpdateEnrichmentParameters, type UpdateImport, type UpdateMonitor, UpdateMonitorStatus, type UpdateSearchMonitorParams, type UpdateWebhookParameters, type UpdateWebsetRequest, type UserIdentifierOptions, type UserLocation, type VerbosityOptions, type WaitUntilCompletedOptions, type WarningsOption, type WebSearchTool, type WebSearchToolConfig, type Webhook, type WebhookAttempt, WebhookStatus, type Webset, type WebsetEnrichment, WebsetEnrichmentFormat, WebsetEnrichmentStatus, WebsetEnrichmentsClient, WebsetExcludeSource, type WebsetHeadersLike, WebsetImportSource, type WebsetItem, type WebsetItemArticleProperties, type WebsetItemCompanyProperties, type WebsetItemCustomProperties, type WebsetItemEvaluation, WebsetItemEvaluationSatisfied, type WebsetItemPersonProperties, type WebsetItemResearchPaperProperties, WebsetItemSource, WebsetItemsClient, WebsetMonitorsClient, type WebsetSearch, WebsetSearchBehavior, WebsetSearchCanceledReason, WebsetSearchScopeSource, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, createGetContentsTool, createWebSearchTool, Exa as default };
|
|
5796
|
+
export { AGENT_BETA_HEADER, AGENT_MAX_EFFORT_BETA, AGENT_MONITORS_BETA_HEADER, type AddAgentMonitorEntitiesParams, AgentBetaClient, type AgentBetaOptions, type AgentBudget, AgentClient, type AgentConfidence, type AgentCostDollars, type AgentCreateOptions, type AgentDataSource, type AgentDataSourceProvider, type AgentEffort, type AgentError, type AgentEvent, type AgentGroundingCitation, type AgentGroundingEntry, type AgentInput, type AgentMonitor, type AgentMonitorBacktest, type AgentMonitorBacktestContent, type AgentMonitorBacktestEntity, AgentMonitorBacktestFailedError, type AgentMonitorBacktestResult, type AgentMonitorBacktestStatus, type AgentMonitorBacktestWaitOptions, AgentMonitorBacktestsClient, type AgentMonitorChange, type AgentMonitorChangeEntity, type AgentMonitorChangeField, AgentMonitorChangesClient, type AgentMonitorCitation, type AgentMonitorContent, type AgentMonitorCreation, AgentMonitorEntitiesClient, type AgentMonitorEntity, type AgentMonitorEntityView, type AgentMonitorField, type AgentMonitorFieldMode, type AgentMonitorFieldValueType, type AgentMonitorRefresh, type AgentMonitorStatus, type AgentMonitorUsage, type AgentMonitorsBetaOptions, AgentMonitorsClient, type AgentOutput, type AgentRun, AgentRunCancelledError, AgentRunEventsClient, AgentRunFailedError, type AgentRunStatus, type AgentRunTyped, AgentRunsClient, type AgentStopReason, type AgentUsage, type AgentWaitOptions, type AnswerOptions, type AnswerOptionsTyped, type AnswerResponse, type AnswerResponseTyped, type AnswerStreamChunk, type AnswerStreamResponse, type AnthropicToolResult, AnthropicTools, type ApiWarning, type ApiWarningCode, type ApiWarningContext, type ArticleEntity, type BaseSearchOptions, BetaClient, type BetaOptions, type CompanyEntity, type ContentFetchStatus, type ContentSource, type ContentStatusError, type ContentsOptions, type ContentsResultComponent, type ContextOptions, type CostDollars, type CostDollarsContents, type CostDollarsSeearch, type CreateAgentMonitorBacktestParams, type CreateAgentMonitorEntityParams, type CreateAgentMonitorFieldParams, type CreateAgentMonitorOptions, type CreateAgentMonitorParams, type CreateAgentRunParams, type CreateAgentRunParamsTyped, type CreateCriterionParameters, type CreateEnrichmentParameters, CreateEnrichmentParametersFormat, type CreateImportParameters, CreateImportParametersFormat, type CreateImportResponse, type CreateImportWithCsvParameters, type CreateMonitorParameters, type CreateSearchMonitorParams, type CreateSearchMonitorResponse, type CreateWebhookParameters, type CreateWebsetParameters, type CreateWebsetSearchParameters, type CsvDataInput, type CustomEntity, DEFAULT_GET_CONTENTS_TOOL_DESCRIPTION, DEFAULT_WEB_SEARCH_TOOL_DESCRIPTION, DYNAMIC_HIGHLIGHTS_BETA, type DeepObjectOutputSchema, type DeepOutputSchema, type DeepSearchOutput, type DeepSearchOutputGrounding, type DeepSearchOutputGroundingCitation, type DeepSearchOutputGroundingConfidence, type DeepSearchType, type DeepTextOutputSchema, type Default, type DeletedAgentMonitor, type DeletedAgentRun, type EnrichmentResult, type Entity, type EntityCompanyProperties, type EntityCompanyPropertiesFinancials, type EntityCompanyPropertiesFundingRound, type EntityCompanyPropertiesHeadquarters, type EntityCompanyPropertiesWebTraffic, type EntityCompanyPropertiesWorkforce, type EntityDateRange, type EntityPersonProperties, type EntityPersonPropertiesCompanyRef, type EntityPersonPropertiesEducationHistoryEntry, type EntityPersonPropertiesInstitutionRef, type EntityPersonPropertiesNotableWork, type EntityPersonPropertiesResearch, type EntityPersonPropertiesWorkHistoryEntry, type Event, EventType, EventsClient, Exa, ExaAbortError, type ExaClientOptions, ExaError, type ExaErrorEnvelope, ExaTimeoutError, type ExaToolSpec, type ExtrasOptions, type ExtrasResponse, type FindSimilarOptions, type GetContentsTool, type GetContentsToolConfig, type GetWebsetResponse, type GroundingCitation, type GroundingEntry, type HighlightsContentsOptions, type HighlightsResponse, HttpStatusCode, type Import, ImportFailedReason, ImportFormat, ImportObject, ImportStatus, ImportsClient, type JSONSchema, type KnownAgentConfidence, type KnownAgentMonitorStatus, type KnownAgentRunStatus, type KnownAgentStopReason, type KnownContentFetchStatus, type KnownContentSource, type KnownSearchMonitorRunFailReason, type KnownSearchMonitorRunStatus, type KnownSearchMonitorStatus, type KnownSearchMonitorWebhookEvent, type ListAgentMonitorChangesParams, type ListAgentMonitorChangesResponse, type ListAgentMonitorEntitiesParams, type ListAgentMonitorEntitiesResponse, type ListAgentMonitorsParams, type ListAgentMonitorsResponse, type ListAgentRunEventsParams, type ListAgentRunEventsResponse, type ListAgentRunsParams, type ListAgentRunsResponse, type ListEventsResponse, type ListImportsResponse, type ListMonitorRunsResponse, type ListMonitorsOptions, type ListMonitorsResponse, type ListResearchRequest, type ListResearchResponse, type ListSearchMonitorRunsParams, type ListSearchMonitorRunsResponse, type ListSearchMonitorsParams, type ListSearchMonitorsResponse, type ListWebhookAttemptsResponse, type ListWebhooksResponse, type ListWebsetItemResponse, type ListWebsetItemsOptions, type ListWebsetsResponse, type LivecrawlOptions, type Monitor, type MonitorBehavior, type MonitorCadence, MonitorObject, type MonitorRun, MonitorRunObject, MonitorRunStatus, MonitorRunType, MonitorStatus, OpenAIResponsesTools, type OpenAIToolMessage, OpenAITools, type PersonEntity, type PreviewWebsetParameters, type PreviewWebsetResponse, type RegularSearchOptions, type RequestOptions, type Research, type ResearchCreateParamsTyped, type ResearchCreateRequest, type ResearchCreateResponse, type ResearchDefinitionEvent, type ResearchEvent, type ResearchOperation, type ResearchOutputEvent, type ResearchPaperEntity, type ResearchPlanDefinitionEvent, type ResearchPlanOperationEvent, type ResearchPlanOutputEvent, type ResearchStatus, type ResearchStreamEvent, type ResearchStreamEventTyped, type ResearchTaskDefinitionEvent, type ResearchTaskOperationEvent, type ResearchTaskOutputEvent, type ResearchTyped, type ResponsesFunctionCallOutput, SEARCH_OBJECTIVE_TOOL_DESCRIPTION, type SearchMonitor, type SearchMonitorRun, type SearchMonitorRunFailReason, type SearchMonitorRunOutput, type SearchMonitorRunStatus, SearchMonitorRunsClient, type SearchMonitorSearch, type SearchMonitorStatus, type SearchMonitorTrigger, type SearchMonitorWebhook, type SearchMonitorWebhookEvent, SearchMonitorsClient, type SearchNotice, type SearchNoticeCode, type SearchResponse, type SearchResult, type SearchStreamChunk, type SearchWarning, type SearchWarningCode, type SectionTag, type Status, type SubpagesResponse, type SummaryContentsOptions, type SummaryContentsOptionsTyped, type SummaryResponse, type TextContentsOptions, type TextResponse, type ToolDefinition, type ToolJsonSchema, type ToolNamespace, ToolRegistry, type TransportRequestOptions, type TriggerSearchMonitorResponse, type UpdateEnrichmentParameters, type UpdateImport, type UpdateMonitor, UpdateMonitorStatus, type UpdateSearchMonitorParams, type UpdateWebhookParameters, type UpdateWebsetRequest, type UserIdentifierOptions, type UserLocation, type VerbosityOptions, type WaitUntilCompletedOptions, type WarningsOption, type WebSearchTool, type WebSearchToolConfig, type Webhook, type WebhookAttempt, WebhookStatus, type Webset, type WebsetEnrichment, WebsetEnrichmentFormat, WebsetEnrichmentStatus, WebsetEnrichmentsClient, WebsetExcludeSource, type WebsetHeadersLike, WebsetImportSource, type WebsetItem, type WebsetItemArticleProperties, type WebsetItemCompanyProperties, type WebsetItemCustomProperties, type WebsetItemEvaluation, WebsetItemEvaluationSatisfied, type WebsetItemPersonProperties, type WebsetItemResearchPaperProperties, WebsetItemSource, WebsetItemsClient, WebsetMonitorsClient, type WebsetSearch, WebsetSearchBehavior, WebsetSearchCanceledReason, WebsetSearchScopeSource, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, createGetContentsTool, createWebSearchTool, Exa as default };
|
package/dist/index.js
CHANGED
|
@@ -103,7 +103,7 @@ var import_cross_fetch = __toESM(require("cross-fetch"));
|
|
|
103
103
|
// package.json
|
|
104
104
|
var package_default = {
|
|
105
105
|
name: "exa-js",
|
|
106
|
-
version: "2.
|
|
106
|
+
version: "2.28.0",
|
|
107
107
|
description: "Exa SDK for Node.js and the browser",
|
|
108
108
|
publishConfig: {
|
|
109
109
|
access: "public"
|
|
@@ -152,23 +152,22 @@ var package_default = {
|
|
|
152
152
|
license: "MIT",
|
|
153
153
|
devDependencies: {
|
|
154
154
|
"@anthropic-ai/sdk": "^0.115.0",
|
|
155
|
-
"@types/node": "~22.14.
|
|
155
|
+
"@types/node": "~22.14.1",
|
|
156
156
|
"cross-env": "~7.0.3",
|
|
157
|
+
openai: "^6.49.0",
|
|
157
158
|
"openapi-typescript": "~7.6.1",
|
|
158
159
|
prettier: "~3.5.3",
|
|
159
160
|
"ts-morph": "^27.0.2",
|
|
160
161
|
"ts-node": "~10.9.2",
|
|
161
162
|
tsup: "~8.4.0",
|
|
162
|
-
tsx: "^4.
|
|
163
|
+
tsx: "^4.23.15",
|
|
163
164
|
typescript: "~5.8.3",
|
|
164
|
-
vitest: "~
|
|
165
|
+
vitest: "~4.1.12"
|
|
165
166
|
},
|
|
166
167
|
dependencies: {
|
|
167
168
|
"cross-fetch": "~4.1.0",
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
zod: "^3.22.0",
|
|
171
|
-
"zod-to-json-schema": "^3.20.0"
|
|
169
|
+
zod: "^3.25.28 || ^4.6.6",
|
|
170
|
+
"zod-to-json-schema": "^3.25.2"
|
|
172
171
|
},
|
|
173
172
|
directories: {
|
|
174
173
|
test: "test"
|
|
@@ -341,10 +340,10 @@ async function exaErrorFromResponse(response, path) {
|
|
|
341
340
|
}
|
|
342
341
|
|
|
343
342
|
// src/zod-utils.ts
|
|
344
|
-
var
|
|
343
|
+
var import_v3 = require("zod/v3");
|
|
345
344
|
var import_zod_to_json_schema = require("zod-to-json-schema");
|
|
346
345
|
function isZodSchema(obj) {
|
|
347
|
-
return obj instanceof
|
|
346
|
+
return obj instanceof import_v3.ZodType;
|
|
348
347
|
}
|
|
349
348
|
function zodToJsonSchema(schema) {
|
|
350
349
|
return (0, import_zod_to_json_schema.zodToJsonSchema)(schema, {
|
|
@@ -3156,7 +3155,7 @@ var WebsetsClient = class extends WebsetsBaseClient {
|
|
|
3156
3155
|
};
|
|
3157
3156
|
|
|
3158
3157
|
// src/tools/core.ts
|
|
3159
|
-
var
|
|
3158
|
+
var import_v32 = require("zod/v3");
|
|
3160
3159
|
var DEFAULT_WEB_SEARCH_TOOL_DESCRIPTION = "Search the web for up-to-date, relevant information. Describe the ideal page rather than listing keywords.";
|
|
3161
3160
|
var DEFAULT_GET_CONTENTS_TOOL_DESCRIPTION = "Read the full contents of web pages you already have URLs for, such as pages returned by a search or mentioned by the user.";
|
|
3162
3161
|
var SEARCH_OBJECTIVE_TOOL_DESCRIPTION = "Goal for this search turn; say which documents should rank first, which should be excluded, and what specific facts or figures to pull from them.";
|
|
@@ -3221,7 +3220,7 @@ function createTool(registry, params) {
|
|
|
3221
3220
|
};
|
|
3222
3221
|
return registerTool(registry, tool);
|
|
3223
3222
|
}
|
|
3224
|
-
var AdvertisedRequiredOptional = class extends
|
|
3223
|
+
var AdvertisedRequiredOptional = class extends import_v32.z.ZodOptional {
|
|
3225
3224
|
isOptional() {
|
|
3226
3225
|
return false;
|
|
3227
3226
|
}
|
|
@@ -3229,7 +3228,7 @@ var AdvertisedRequiredOptional = class extends import_zod2.z.ZodOptional {
|
|
|
3229
3228
|
function advertisedRequired(inner) {
|
|
3230
3229
|
return new AdvertisedRequiredOptional({
|
|
3231
3230
|
innerType: inner,
|
|
3232
|
-
typeName:
|
|
3231
|
+
typeName: import_v32.z.ZodFirstPartyTypeKind.ZodOptional
|
|
3233
3232
|
});
|
|
3234
3233
|
}
|
|
3235
3234
|
function createWebSearchTool(exa, registry, config = {}) {
|
|
@@ -3238,14 +3237,14 @@ function createWebSearchTool(exa, registry, config = {}) {
|
|
|
3238
3237
|
description = DEFAULT_WEB_SEARCH_TOOL_DESCRIPTION,
|
|
3239
3238
|
...searchOptions
|
|
3240
3239
|
} = config;
|
|
3241
|
-
const inputSchema =
|
|
3242
|
-
query:
|
|
3240
|
+
const inputSchema = import_v32.z.object({
|
|
3241
|
+
query: import_v32.z.string().describe(
|
|
3243
3242
|
"Natural language search query. Should be a semantically rich description of the ideal page, not just keywords."
|
|
3244
3243
|
),
|
|
3245
3244
|
// Length limits are validated but not advertised: strict tool use on some
|
|
3246
3245
|
// providers rejects `minLength`/`maxLength` in the schema.
|
|
3247
3246
|
objective: advertisedRequired(
|
|
3248
|
-
|
|
3247
|
+
import_v32.z.string().trim().refine((value) => value.length > 0, "objective must not be empty").refine(
|
|
3249
3248
|
(value) => value.length <= MAX_OBJECTIVE_LENGTH,
|
|
3250
3249
|
`objective must be at most ${MAX_OBJECTIVE_LENGTH} characters`
|
|
3251
3250
|
)
|
|
@@ -3282,8 +3281,8 @@ function createGetContentsTool(exa, registry, config = {}) {
|
|
|
3282
3281
|
description = DEFAULT_GET_CONTENTS_TOOL_DESCRIPTION,
|
|
3283
3282
|
...contentsOptions
|
|
3284
3283
|
} = config;
|
|
3285
|
-
const inputSchema =
|
|
3286
|
-
urls:
|
|
3284
|
+
const inputSchema = import_v32.z.object({
|
|
3285
|
+
urls: import_v32.z.array(import_v32.z.string()).describe(
|
|
3287
3286
|
"Absolute URLs of the pages to read, including the scheme. Pass several URLs to read them in a single call."
|
|
3288
3287
|
)
|
|
3289
3288
|
});
|
|
@@ -4461,4 +4460,3 @@ var index_default = Exa2;
|
|
|
4461
4460
|
createGetContentsTool,
|
|
4462
4461
|
createWebSearchTool
|
|
4463
4462
|
});
|
|
4464
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import fetch2, { Headers } from "cross-fetch";
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "exa-js",
|
|
7
|
-
version: "2.
|
|
7
|
+
version: "2.28.0",
|
|
8
8
|
description: "Exa SDK for Node.js and the browser",
|
|
9
9
|
publishConfig: {
|
|
10
10
|
access: "public"
|
|
@@ -53,23 +53,22 @@ var package_default = {
|
|
|
53
53
|
license: "MIT",
|
|
54
54
|
devDependencies: {
|
|
55
55
|
"@anthropic-ai/sdk": "^0.115.0",
|
|
56
|
-
"@types/node": "~22.14.
|
|
56
|
+
"@types/node": "~22.14.1",
|
|
57
57
|
"cross-env": "~7.0.3",
|
|
58
|
+
openai: "^6.49.0",
|
|
58
59
|
"openapi-typescript": "~7.6.1",
|
|
59
60
|
prettier: "~3.5.3",
|
|
60
61
|
"ts-morph": "^27.0.2",
|
|
61
62
|
"ts-node": "~10.9.2",
|
|
62
63
|
tsup: "~8.4.0",
|
|
63
|
-
tsx: "^4.
|
|
64
|
+
tsx: "^4.23.15",
|
|
64
65
|
typescript: "~5.8.3",
|
|
65
|
-
vitest: "~
|
|
66
|
+
vitest: "~4.1.12"
|
|
66
67
|
},
|
|
67
68
|
dependencies: {
|
|
68
69
|
"cross-fetch": "~4.1.0",
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
zod: "^3.22.0",
|
|
72
|
-
"zod-to-json-schema": "^3.20.0"
|
|
70
|
+
zod: "^3.25.28 || ^4.6.6",
|
|
71
|
+
"zod-to-json-schema": "^3.25.2"
|
|
73
72
|
},
|
|
74
73
|
directories: {
|
|
75
74
|
test: "test"
|
|
@@ -242,7 +241,7 @@ async function exaErrorFromResponse(response, path) {
|
|
|
242
241
|
}
|
|
243
242
|
|
|
244
243
|
// src/zod-utils.ts
|
|
245
|
-
import { ZodType } from "zod";
|
|
244
|
+
import { ZodType } from "zod/v3";
|
|
246
245
|
import { zodToJsonSchema as convertZodToJsonSchema } from "zod-to-json-schema";
|
|
247
246
|
function isZodSchema(obj) {
|
|
248
247
|
return obj instanceof ZodType;
|
|
@@ -3057,7 +3056,7 @@ var WebsetsClient = class extends WebsetsBaseClient {
|
|
|
3057
3056
|
};
|
|
3058
3057
|
|
|
3059
3058
|
// src/tools/core.ts
|
|
3060
|
-
import { z } from "zod";
|
|
3059
|
+
import { z } from "zod/v3";
|
|
3061
3060
|
var DEFAULT_WEB_SEARCH_TOOL_DESCRIPTION = "Search the web for up-to-date, relevant information. Describe the ideal page rather than listing keywords.";
|
|
3062
3061
|
var DEFAULT_GET_CONTENTS_TOOL_DESCRIPTION = "Read the full contents of web pages you already have URLs for, such as pages returned by a search or mentioned by the user.";
|
|
3063
3062
|
var SEARCH_OBJECTIVE_TOOL_DESCRIPTION = "Goal for this search turn; say which documents should rank first, which should be excluded, and what specific facts or figures to pull from them.";
|
|
@@ -4362,4 +4361,3 @@ export {
|
|
|
4362
4361
|
createWebSearchTool,
|
|
4363
4362
|
index_default as default
|
|
4364
4363
|
};
|
|
4365
|
-
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exa-js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.28.0",
|
|
4
4
|
"description": "Exa SDK for Node.js and the browser",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -49,23 +49,22 @@
|
|
|
49
49
|
"license": "MIT",
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@anthropic-ai/sdk": "^0.115.0",
|
|
52
|
-
"@types/node": "~22.14.
|
|
52
|
+
"@types/node": "~22.14.1",
|
|
53
53
|
"cross-env": "~7.0.3",
|
|
54
|
+
"openai": "^6.49.0",
|
|
54
55
|
"openapi-typescript": "~7.6.1",
|
|
55
56
|
"prettier": "~3.5.3",
|
|
56
57
|
"ts-morph": "^27.0.2",
|
|
57
58
|
"ts-node": "~10.9.2",
|
|
58
59
|
"tsup": "~8.4.0",
|
|
59
|
-
"tsx": "^4.
|
|
60
|
+
"tsx": "^4.23.15",
|
|
60
61
|
"typescript": "~5.8.3",
|
|
61
|
-
"vitest": "~
|
|
62
|
+
"vitest": "~4.1.12"
|
|
62
63
|
},
|
|
63
64
|
"dependencies": {
|
|
64
65
|
"cross-fetch": "~4.1.0",
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"zod": "^3.22.0",
|
|
68
|
-
"zod-to-json-schema": "^3.20.0"
|
|
66
|
+
"zod": "^3.25.28 || ^4.6.6",
|
|
67
|
+
"zod-to-json-schema": "^3.25.2"
|
|
69
68
|
},
|
|
70
69
|
"directories": {
|
|
71
70
|
"test": "test"
|