@airtop/sdk 1.0.0-alpha2.24 → 1.0.0-alpha2.26
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/index.cjs +39 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -5
- package/dist/index.d.ts +26 -5
- package/dist/index.js +39 -19
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
@@ -4,7 +4,7 @@ import { AirtopJsonSchemaAdapter } from '@airtop/json-schema-adapter';
|
|
4
4
|
export { AirtopJsonSchemaAdapter } from '@airtop/json-schema-adapter';
|
5
5
|
import { ILogLayer } from 'loglayer';
|
6
6
|
export { ILogLayer } from 'loglayer';
|
7
|
-
import { Issue, SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ServicePromptActionResponseEnvelope, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, ExtractActionResponseEnvelope, ActActionResponseEnvelope, LlmActionResponseEnvelope, NodeHandle, WaitForPageActionResponseEnvelope, NavigateActionResponseEnvelope, FindOneActionResponseEnvelope, FindManyActionResponseEnvelope, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse, WindowsResponse } from '@airtop/core/resources/shared.js';
|
7
|
+
import { Issue, SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ServicePromptActionResponseEnvelope, ServicePromptParameters, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, ExtractActionResponseEnvelope, ActActionResponseEnvelope, LlmActionResponseEnvelope, NodeHandle, WaitForPageActionResponseEnvelope, NavigateActionResponseEnvelope, FindOneActionResponseEnvelope, FindManyActionResponseEnvelope, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse, WindowsResponse } from '@airtop/core/resources/shared.js';
|
8
8
|
export { AIResponseEnvelope, ActActionResponseData, AgentInvocationData, AgentVersionData, AirtopPagination, AsyncConfig, AsyncSessionAIResponseEnvelope, BrowserWaitNavigationConfig, ClickConfig, ClientProvidedResponseMetadata, CreateFileData, EnvelopeDefaultMeta, ExternalSessionAIResponseMetadata, ExternalSessionAIResponseMetadataUsage, ExternalSessionConfig, ExternalSessionWithConnectionInfo, ExtractActionResponseData, FindManyActionResponseData, FindOneActionResponseData, GetFileData, IntervalMonitorConfig, Issue, LlmActionResponseData, MicroInteractionConfig, MonitorConfig, NavigateActionResponseData, OperationOutcome, OperationOutcomeResponse, PageQueryConfig, PageQueryExperimentalConfig, PaginatedExtractionConfig, ScrapeResponseContent, ScrapeResponseEnvelope, ScrapeResponseOutput, ScreenshotConfig, ScreenshotMetadata, ScreenshotRequestConfig, ScreenshotScrollPosition, ScreenshotViewportDimensions, ScrollByConfig, ScrollToEdgeConfig, ServicePromptActionResponseData, SummaryExperimentalConfig, VisualAnalysisConfig, WaitForPageActionResponseData, WindowIDData, WindowIDDataResponse, WindowInfo, WindowResponse, WindowsResponse, WindowsWithMeta } from '@airtop/core/resources/shared.js';
|
9
9
|
import * as _airtop_core_resources_shared_mjs from '@airtop/core/resources/shared.mjs';
|
10
10
|
import { AutomationUpdateDescriptionParams } from '@airtop/core/resources/automations.js';
|
@@ -343,6 +343,20 @@ interface AirtopSessionResponse {
|
|
343
343
|
*/
|
344
344
|
interface CreateFileConfig extends Omit<FileCreateFileParams, "sessionId" | "fileName"> {
|
345
345
|
}
|
346
|
+
/**
|
347
|
+
* Extended service prompt parameters that allow outputSchema to be either a string or an object.
|
348
|
+
* The SDK will automatically convert object schemas to JSON strings.
|
349
|
+
*/
|
350
|
+
interface ExtendedServicePromptParameters extends Omit<ServicePromptParameters, 'outputSchema'> {
|
351
|
+
/**
|
352
|
+
* JSON schema for structured output. Can be provided as a JSON string or as an object.
|
353
|
+
* If provided as an object, it will be automatically stringified.
|
354
|
+
*
|
355
|
+
* Requirements: root must be object, all fields required, every object needs
|
356
|
+
* additionalProperties:false. No format/pattern keywords. Include 'error' field for failures.
|
357
|
+
*/
|
358
|
+
outputSchema?: string | Record<string, any>;
|
359
|
+
}
|
346
360
|
/**
|
347
361
|
* Response from a session service call.
|
348
362
|
*/
|
@@ -941,12 +955,19 @@ declare class AirtopSessionClient extends AirtopBase {
|
|
941
955
|
createFile(fileName: string, config?: CreateFileConfig, requestOptions?: AirtopRequestOptions): _airtop_core.APIPromise<_airtop_core_resources_shared_mjs.CreateFileResponse>;
|
942
956
|
llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowLlmResponse>;
|
943
957
|
/**
|
944
|
-
* Calls the service endpoint.
|
945
|
-
* @param prompt -
|
946
|
-
* @param service - The service
|
958
|
+
* Calls the service endpoint with a string prompt.
|
959
|
+
* @param prompt - Natural language description of the task to perform with third-party services (e.g., "read data from Google Sheets", "create a HubSpot lead", "update this document")
|
960
|
+
* @param service - The service id or array of service ids that will be leveraged to achieve the intent of the prompt
|
947
961
|
* @param requestOptions - Request options
|
962
|
+
* @deprecated Use `service(args: ExtendedServicePromptParameters, requestOptions?: AirtopRequestOptions)` instead
|
948
963
|
*/
|
949
964
|
service(prompt: string, service?: string, requestOptions?: AirtopRequestOptions): Promise<SessionServiceResponse>;
|
965
|
+
/**
|
966
|
+
* Calls the service endpoint with ExtendedServicePromptParameters.
|
967
|
+
* @param parameters - The service parameters object
|
968
|
+
* @param requestOptions - Request options
|
969
|
+
*/
|
970
|
+
service(parameters: ExtendedServicePromptParameters, requestOptions?: AirtopRequestOptions): Promise<SessionServiceResponse>;
|
950
971
|
/**
|
951
972
|
* Retrieves the list of connected services available for the current session.
|
952
973
|
* @param requestOptions - Request options
|
@@ -1440,4 +1461,4 @@ interface AirtopPluginRegistration {
|
|
1440
1461
|
*/
|
1441
1462
|
declare function registerAirtopPlugin(plugin: AirtopPluginRegistration): void;
|
1442
1463
|
|
1443
|
-
export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type AirtopAgentDeleteAgentsParams, type AirtopAgentGetAgentParams, type AirtopAgentGetAgentsParams, type AirtopAgentGetInvocationsParams, type AirtopAgentGetVersionDataParams, type AirtopAgentPublishAgentParams, type AirtopAgentResponse, type AirtopAgentUpdateAgentParams, type AirtopAgentUpdateVersionDataParams, type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopCreateAgentInvocationResponse, type AirtopCreateAgentResponse, type AirtopCreateNewAgentDraftResponse, type AirtopDeleteAgentsResponse, AirtopError, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, type AirtopGetAgentInvocationsResponse, type AirtopGetAgentResponse, type AirtopGetAgentVersionDataResponse, type AirtopGetAgentsResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopPublishNewAgentResponse, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, type AirtopUpdateAgentResponse, type AirtopUpdateVersionDataResponse, AirtopWindow, AirtopWindowClient, type AirtopWindowClientPlugin, type AirtopWindowCreateResponse, type AirtopWindowGetInfoResponse, type AirtopWindowPlugin, AirtopWindowScreenshot, type AirtopWindowScreenshotPlugin, type AirtopWindowScreenshotResponse, type CommonAirtopConfig, type CommonResponse, type CommonWindowResponse, type CreateFileConfig, type CreateSessionConfig, type GetFilesConfig, type GetSessionsConfig, type OutputJsonSchemaConfig, type ScreenshotData, type SessionData, type SessionError, type SessionMetadata, type SessionServiceResponse, type SessionWarning, type WindowActConfig, type WindowActResponse, type WindowClickConfig, type WindowCreateData, type WindowCreateOptions, type WindowError, type WindowExtractConfig, type WindowExtractResponse, type WindowFillFormConfig, type WindowFindManyConfig, type WindowFindManyResponse, type WindowFindOneConfig, type WindowFindOneResponse, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLlmResponse, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowNavigateConfig, WindowNavigateDirection, type WindowNavigateResponse, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWaitForPageConfig, type WindowWaitForPageResponse, type WindowWarning, registerAirtopPlugin };
|
1464
|
+
export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type AirtopAgentDeleteAgentsParams, type AirtopAgentGetAgentParams, type AirtopAgentGetAgentsParams, type AirtopAgentGetInvocationsParams, type AirtopAgentGetVersionDataParams, type AirtopAgentPublishAgentParams, type AirtopAgentResponse, type AirtopAgentUpdateAgentParams, type AirtopAgentUpdateVersionDataParams, type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopCreateAgentInvocationResponse, type AirtopCreateAgentResponse, type AirtopCreateNewAgentDraftResponse, type AirtopDeleteAgentsResponse, AirtopError, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, type AirtopGetAgentInvocationsResponse, type AirtopGetAgentResponse, type AirtopGetAgentVersionDataResponse, type AirtopGetAgentsResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopPublishNewAgentResponse, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, type AirtopUpdateAgentResponse, type AirtopUpdateVersionDataResponse, AirtopWindow, AirtopWindowClient, type AirtopWindowClientPlugin, type AirtopWindowCreateResponse, type AirtopWindowGetInfoResponse, type AirtopWindowPlugin, AirtopWindowScreenshot, type AirtopWindowScreenshotPlugin, type AirtopWindowScreenshotResponse, type CommonAirtopConfig, type CommonResponse, type CommonWindowResponse, type CreateFileConfig, type CreateSessionConfig, type ExtendedServicePromptParameters, type GetFilesConfig, type GetSessionsConfig, type OutputJsonSchemaConfig, type ScreenshotData, type SessionData, type SessionError, type SessionMetadata, type SessionServiceResponse, type SessionWarning, type WindowActConfig, type WindowActResponse, type WindowClickConfig, type WindowCreateData, type WindowCreateOptions, type WindowError, type WindowExtractConfig, type WindowExtractResponse, type WindowFillFormConfig, type WindowFindManyConfig, type WindowFindManyResponse, type WindowFindOneConfig, type WindowFindOneResponse, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLlmResponse, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowNavigateConfig, WindowNavigateDirection, type WindowNavigateResponse, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWaitForPageConfig, type WindowWaitForPageResponse, type WindowWarning, registerAirtopPlugin };
|
package/dist/index.d.ts
CHANGED
@@ -4,7 +4,7 @@ import { AirtopJsonSchemaAdapter } from '@airtop/json-schema-adapter';
|
|
4
4
|
export { AirtopJsonSchemaAdapter } from '@airtop/json-schema-adapter';
|
5
5
|
import { ILogLayer } from 'loglayer';
|
6
6
|
export { ILogLayer } from 'loglayer';
|
7
|
-
import { Issue, SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ServicePromptActionResponseEnvelope, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, ExtractActionResponseEnvelope, ActActionResponseEnvelope, LlmActionResponseEnvelope, NodeHandle, WaitForPageActionResponseEnvelope, NavigateActionResponseEnvelope, FindOneActionResponseEnvelope, FindManyActionResponseEnvelope, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse, WindowsResponse } from '@airtop/core/resources/shared.js';
|
7
|
+
import { Issue, SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ServicePromptActionResponseEnvelope, ServicePromptParameters, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, ExtractActionResponseEnvelope, ActActionResponseEnvelope, LlmActionResponseEnvelope, NodeHandle, WaitForPageActionResponseEnvelope, NavigateActionResponseEnvelope, FindOneActionResponseEnvelope, FindManyActionResponseEnvelope, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse, WindowsResponse } from '@airtop/core/resources/shared.js';
|
8
8
|
export { AIResponseEnvelope, ActActionResponseData, AgentInvocationData, AgentVersionData, AirtopPagination, AsyncConfig, AsyncSessionAIResponseEnvelope, BrowserWaitNavigationConfig, ClickConfig, ClientProvidedResponseMetadata, CreateFileData, EnvelopeDefaultMeta, ExternalSessionAIResponseMetadata, ExternalSessionAIResponseMetadataUsage, ExternalSessionConfig, ExternalSessionWithConnectionInfo, ExtractActionResponseData, FindManyActionResponseData, FindOneActionResponseData, GetFileData, IntervalMonitorConfig, Issue, LlmActionResponseData, MicroInteractionConfig, MonitorConfig, NavigateActionResponseData, OperationOutcome, OperationOutcomeResponse, PageQueryConfig, PageQueryExperimentalConfig, PaginatedExtractionConfig, ScrapeResponseContent, ScrapeResponseEnvelope, ScrapeResponseOutput, ScreenshotConfig, ScreenshotMetadata, ScreenshotRequestConfig, ScreenshotScrollPosition, ScreenshotViewportDimensions, ScrollByConfig, ScrollToEdgeConfig, ServicePromptActionResponseData, SummaryExperimentalConfig, VisualAnalysisConfig, WaitForPageActionResponseData, WindowIDData, WindowIDDataResponse, WindowInfo, WindowResponse, WindowsResponse, WindowsWithMeta } from '@airtop/core/resources/shared.js';
|
9
9
|
import * as _airtop_core_resources_shared_mjs from '@airtop/core/resources/shared.mjs';
|
10
10
|
import { AutomationUpdateDescriptionParams } from '@airtop/core/resources/automations.js';
|
@@ -343,6 +343,20 @@ interface AirtopSessionResponse {
|
|
343
343
|
*/
|
344
344
|
interface CreateFileConfig extends Omit<FileCreateFileParams, "sessionId" | "fileName"> {
|
345
345
|
}
|
346
|
+
/**
|
347
|
+
* Extended service prompt parameters that allow outputSchema to be either a string or an object.
|
348
|
+
* The SDK will automatically convert object schemas to JSON strings.
|
349
|
+
*/
|
350
|
+
interface ExtendedServicePromptParameters extends Omit<ServicePromptParameters, 'outputSchema'> {
|
351
|
+
/**
|
352
|
+
* JSON schema for structured output. Can be provided as a JSON string or as an object.
|
353
|
+
* If provided as an object, it will be automatically stringified.
|
354
|
+
*
|
355
|
+
* Requirements: root must be object, all fields required, every object needs
|
356
|
+
* additionalProperties:false. No format/pattern keywords. Include 'error' field for failures.
|
357
|
+
*/
|
358
|
+
outputSchema?: string | Record<string, any>;
|
359
|
+
}
|
346
360
|
/**
|
347
361
|
* Response from a session service call.
|
348
362
|
*/
|
@@ -941,12 +955,19 @@ declare class AirtopSessionClient extends AirtopBase {
|
|
941
955
|
createFile(fileName: string, config?: CreateFileConfig, requestOptions?: AirtopRequestOptions): _airtop_core.APIPromise<_airtop_core_resources_shared_mjs.CreateFileResponse>;
|
942
956
|
llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowLlmResponse>;
|
943
957
|
/**
|
944
|
-
* Calls the service endpoint.
|
945
|
-
* @param prompt -
|
946
|
-
* @param service - The service
|
958
|
+
* Calls the service endpoint with a string prompt.
|
959
|
+
* @param prompt - Natural language description of the task to perform with third-party services (e.g., "read data from Google Sheets", "create a HubSpot lead", "update this document")
|
960
|
+
* @param service - The service id or array of service ids that will be leveraged to achieve the intent of the prompt
|
947
961
|
* @param requestOptions - Request options
|
962
|
+
* @deprecated Use `service(args: ExtendedServicePromptParameters, requestOptions?: AirtopRequestOptions)` instead
|
948
963
|
*/
|
949
964
|
service(prompt: string, service?: string, requestOptions?: AirtopRequestOptions): Promise<SessionServiceResponse>;
|
965
|
+
/**
|
966
|
+
* Calls the service endpoint with ExtendedServicePromptParameters.
|
967
|
+
* @param parameters - The service parameters object
|
968
|
+
* @param requestOptions - Request options
|
969
|
+
*/
|
970
|
+
service(parameters: ExtendedServicePromptParameters, requestOptions?: AirtopRequestOptions): Promise<SessionServiceResponse>;
|
950
971
|
/**
|
951
972
|
* Retrieves the list of connected services available for the current session.
|
952
973
|
* @param requestOptions - Request options
|
@@ -1440,4 +1461,4 @@ interface AirtopPluginRegistration {
|
|
1440
1461
|
*/
|
1441
1462
|
declare function registerAirtopPlugin(plugin: AirtopPluginRegistration): void;
|
1442
1463
|
|
1443
|
-
export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type AirtopAgentDeleteAgentsParams, type AirtopAgentGetAgentParams, type AirtopAgentGetAgentsParams, type AirtopAgentGetInvocationsParams, type AirtopAgentGetVersionDataParams, type AirtopAgentPublishAgentParams, type AirtopAgentResponse, type AirtopAgentUpdateAgentParams, type AirtopAgentUpdateVersionDataParams, type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopCreateAgentInvocationResponse, type AirtopCreateAgentResponse, type AirtopCreateNewAgentDraftResponse, type AirtopDeleteAgentsResponse, AirtopError, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, type AirtopGetAgentInvocationsResponse, type AirtopGetAgentResponse, type AirtopGetAgentVersionDataResponse, type AirtopGetAgentsResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopPublishNewAgentResponse, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, type AirtopUpdateAgentResponse, type AirtopUpdateVersionDataResponse, AirtopWindow, AirtopWindowClient, type AirtopWindowClientPlugin, type AirtopWindowCreateResponse, type AirtopWindowGetInfoResponse, type AirtopWindowPlugin, AirtopWindowScreenshot, type AirtopWindowScreenshotPlugin, type AirtopWindowScreenshotResponse, type CommonAirtopConfig, type CommonResponse, type CommonWindowResponse, type CreateFileConfig, type CreateSessionConfig, type GetFilesConfig, type GetSessionsConfig, type OutputJsonSchemaConfig, type ScreenshotData, type SessionData, type SessionError, type SessionMetadata, type SessionServiceResponse, type SessionWarning, type WindowActConfig, type WindowActResponse, type WindowClickConfig, type WindowCreateData, type WindowCreateOptions, type WindowError, type WindowExtractConfig, type WindowExtractResponse, type WindowFillFormConfig, type WindowFindManyConfig, type WindowFindManyResponse, type WindowFindOneConfig, type WindowFindOneResponse, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLlmResponse, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowNavigateConfig, WindowNavigateDirection, type WindowNavigateResponse, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWaitForPageConfig, type WindowWaitForPageResponse, type WindowWarning, registerAirtopPlugin };
|
1464
|
+
export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type AirtopAgentDeleteAgentsParams, type AirtopAgentGetAgentParams, type AirtopAgentGetAgentsParams, type AirtopAgentGetInvocationsParams, type AirtopAgentGetVersionDataParams, type AirtopAgentPublishAgentParams, type AirtopAgentResponse, type AirtopAgentUpdateAgentParams, type AirtopAgentUpdateVersionDataParams, type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopCreateAgentInvocationResponse, type AirtopCreateAgentResponse, type AirtopCreateNewAgentDraftResponse, type AirtopDeleteAgentsResponse, AirtopError, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, type AirtopGetAgentInvocationsResponse, type AirtopGetAgentResponse, type AirtopGetAgentVersionDataResponse, type AirtopGetAgentsResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopPublishNewAgentResponse, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, type AirtopUpdateAgentResponse, type AirtopUpdateVersionDataResponse, AirtopWindow, AirtopWindowClient, type AirtopWindowClientPlugin, type AirtopWindowCreateResponse, type AirtopWindowGetInfoResponse, type AirtopWindowPlugin, AirtopWindowScreenshot, type AirtopWindowScreenshotPlugin, type AirtopWindowScreenshotResponse, type CommonAirtopConfig, type CommonResponse, type CommonWindowResponse, type CreateFileConfig, type CreateSessionConfig, type ExtendedServicePromptParameters, type GetFilesConfig, type GetSessionsConfig, type OutputJsonSchemaConfig, type ScreenshotData, type SessionData, type SessionError, type SessionMetadata, type SessionServiceResponse, type SessionWarning, type WindowActConfig, type WindowActResponse, type WindowClickConfig, type WindowCreateData, type WindowCreateOptions, type WindowError, type WindowExtractConfig, type WindowExtractResponse, type WindowFillFormConfig, type WindowFindManyConfig, type WindowFindManyResponse, type WindowFindOneConfig, type WindowFindOneResponse, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLlmResponse, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowNavigateConfig, WindowNavigateDirection, type WindowNavigateResponse, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWaitForPageConfig, type WindowWaitForPageResponse, type WindowWarning, registerAirtopPlugin };
|
package/dist/index.js
CHANGED
@@ -9,7 +9,7 @@ var require_package = __commonJS({
|
|
9
9
|
module.exports = {
|
10
10
|
name: "@airtop/sdk",
|
11
11
|
description: "Airtop SDK for TypeScript",
|
12
|
-
version: "1.0.0-alpha2.
|
12
|
+
version: "1.0.0-alpha2.26",
|
13
13
|
type: "module",
|
14
14
|
main: "./dist/index.cjs",
|
15
15
|
module: "./dist/index.js",
|
@@ -47,16 +47,16 @@ var require_package = __commonJS({
|
|
47
47
|
"verify-types": "tsc --noEmit && tsc --noEmit --project tsconfig.e2e.json"
|
48
48
|
},
|
49
49
|
dependencies: {
|
50
|
+
"@airtop/core": "0.1.0-alpha.42",
|
50
51
|
"@airtop/json-schema-adapter": "workspace:*",
|
51
|
-
"@airtop/core": "0.1.0-alpha.40",
|
52
52
|
"date-fns": "4.1.0",
|
53
|
-
loglayer: "6.
|
53
|
+
loglayer: "6.7.0",
|
54
54
|
"serialize-error": "12.0.0",
|
55
55
|
uuid: "11.1.0"
|
56
56
|
},
|
57
57
|
devDependencies: {
|
58
|
-
"@biomejs/biome": "2.2.
|
59
|
-
"@dotenvx/dotenvx": "1.
|
58
|
+
"@biomejs/biome": "2.2.4",
|
59
|
+
"@dotenvx/dotenvx": "1.49.1",
|
60
60
|
"@internal/tsconfig": "workspace:*",
|
61
61
|
"deep-utility-types": "1.3.1",
|
62
62
|
"env-var": "7.5.0",
|
@@ -80,7 +80,7 @@ var require_package = __commonJS({
|
|
80
80
|
optionalDependencies: {
|
81
81
|
"@airtop/json-schema-adapter-zod": "workspace:*"
|
82
82
|
},
|
83
|
-
packageManager: "pnpm@10.
|
83
|
+
packageManager: "pnpm@10.17.0"
|
84
84
|
};
|
85
85
|
}
|
86
86
|
});
|
@@ -1261,18 +1261,38 @@ var AirtopSessionClient = class extends AirtopBase {
|
|
1261
1261
|
);
|
1262
1262
|
}
|
1263
1263
|
/**
|
1264
|
-
*
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1264
|
+
* Implementation for the overloaded service method.
|
1265
|
+
*/
|
1266
|
+
async service(promptOrArgs, serviceOrRequestOptions, requestOptions = {}) {
|
1267
|
+
if (typeof promptOrArgs === "string") {
|
1268
|
+
const prompt = promptOrArgs;
|
1269
|
+
const service = typeof serviceOrRequestOptions === "string" ? serviceOrRequestOptions : void 0;
|
1270
|
+
const options = typeof serviceOrRequestOptions === "object" ? serviceOrRequestOptions : requestOptions;
|
1271
|
+
this.log.withMetadata({ prompt }).info("Service");
|
1272
|
+
const parameters = { prompt, services: service };
|
1273
|
+
const body = { parameters };
|
1274
|
+
return withRequestCompletionPolling(
|
1275
|
+
this.client,
|
1276
|
+
() => this.client.sessions.service(this.sessionId, body),
|
1277
|
+
options
|
1278
|
+
);
|
1279
|
+
} else {
|
1280
|
+
const parameters = promptOrArgs;
|
1281
|
+
const options = serviceOrRequestOptions || {};
|
1282
|
+
this.log.withMetadata({ parameters }).info("Service");
|
1283
|
+
const body = {
|
1284
|
+
parameters: {
|
1285
|
+
prompt: parameters.prompt,
|
1286
|
+
services: parameters.services,
|
1287
|
+
outputSchema: parameters.outputSchema ? this.convertToJsonSchema(parameters.outputSchema) : void 0
|
1288
|
+
}
|
1289
|
+
};
|
1290
|
+
return withRequestCompletionPolling(
|
1291
|
+
this.client,
|
1292
|
+
() => this.client.sessions.service(this.sessionId, body),
|
1293
|
+
options
|
1294
|
+
);
|
1295
|
+
}
|
1276
1296
|
}
|
1277
1297
|
/**
|
1278
1298
|
* Retrieves the list of connected services available for the current session.
|
@@ -1731,7 +1751,7 @@ var AirtopAgentClient = class extends AirtopBase {
|
|
1731
1751
|
*/
|
1732
1752
|
async createNewAgentDraftVersion(agentId, requestOptions = {}) {
|
1733
1753
|
this.log.withMetadata({ agentId }).info("Creating new draft version of agent");
|
1734
|
-
return this.client.agents.createAgentDraft(agentId, this.resolveRequestOptions(requestOptions));
|
1754
|
+
return this.client.agents.createAgentDraft(agentId, {}, this.resolveRequestOptions(requestOptions));
|
1735
1755
|
}
|
1736
1756
|
/**
|
1737
1757
|
* Publishes a new version of an agent from the current draft.
|