@airtop/sdk 1.0.0-alpha2.7 → 1.0.0-alpha2.8
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 +25 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +57 -46
- package/dist/index.d.ts +57 -46
- package/dist/index.js +25 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
@@ -11,7 +11,7 @@ import * as _airtop_core_resources_shared_js from '@airtop/core/resources/shared
|
|
11
11
|
import { SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, Issue, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse } from '@airtop/core/resources/shared.js';
|
12
12
|
export { AIResponseEnvelope, AirtopPagination, ExternalSessionAIResponseMetadata, ExternalSessionWithConnectionInfo, Issue, OperationOutcomeResponse, WindowIDDataResponse } from '@airtop/core/resources/shared.js';
|
13
13
|
import * as _airtop_core_resources_sessions_mjs from '@airtop/core/resources/sessions.mjs';
|
14
|
-
import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams } from '@airtop/core/resources/windows.js';
|
14
|
+
import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams } from '@airtop/core/resources/windows.js';
|
15
15
|
|
16
16
|
/**
|
17
17
|
* Shared configuration between Airtop classes.
|
@@ -361,6 +361,51 @@ interface AirtopWindowGetInfoResponse extends AirtopWindowCreateResponse {
|
|
361
361
|
data: WindowInfoData;
|
362
362
|
}
|
363
363
|
|
364
|
+
declare class AirtopNodeImpl {
|
365
|
+
/**
|
366
|
+
* The window client
|
367
|
+
*/
|
368
|
+
protected windowClient: AirtopWindowClient;
|
369
|
+
/**
|
370
|
+
* The node handle id to use for all requests
|
371
|
+
*/
|
372
|
+
protected nodeHandleId: string;
|
373
|
+
/**
|
374
|
+
* Constructor
|
375
|
+
* @param client - The window client
|
376
|
+
* @param nodeHandleId - The node handle id to use for all requests
|
377
|
+
*/
|
378
|
+
constructor(client: AirtopWindowClient, nodeHandleId: string);
|
379
|
+
/**
|
380
|
+
* Extract content from the node
|
381
|
+
* @param prompt - The prompt to use for the extraction
|
382
|
+
* @param config - The configuration to use for the extraction
|
383
|
+
* @param requestOptions - The request options to use for the extraction
|
384
|
+
*/
|
385
|
+
extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
386
|
+
/**
|
387
|
+
* Act on the node
|
388
|
+
* @param prompt - The prompt to use for the action
|
389
|
+
* @param config - The configuration to use for the action
|
390
|
+
* @param requestOptions - The request options to use for the action
|
391
|
+
*/
|
392
|
+
act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
393
|
+
/**
|
394
|
+
* Execute an LLM call on the node
|
395
|
+
* @param prompt - The prompt to use for the LLM call
|
396
|
+
* @param config - The configuration to use for the LLM call
|
397
|
+
* @param requestOptions - The request options to use for the LLM call
|
398
|
+
*/
|
399
|
+
llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
400
|
+
/**
|
401
|
+
* Find one element in the node
|
402
|
+
* @param prompt - The prompt to use for the find one
|
403
|
+
* @param config - The configuration to use for the find one
|
404
|
+
* @param requestOptions - The request options to use for the find one
|
405
|
+
*/
|
406
|
+
findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
|
407
|
+
}
|
408
|
+
|
364
409
|
/**
|
365
410
|
* Configuration parameters for typing text in a window.
|
366
411
|
* Excludes session ID and text content which are provided separately.
|
@@ -455,50 +500,15 @@ interface WindowLlmConfig extends Omit<WindowLlmParams, "sessionId" | "prompt">
|
|
455
500
|
*/
|
456
501
|
interface WindowFindOneConfig extends Omit<WindowFindOneParams, "sessionId" | "prompt" | "jobId"> {
|
457
502
|
}
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
protected nodeHandleId: string;
|
468
|
-
/**
|
469
|
-
* Constructor
|
470
|
-
* @param client - The window client
|
471
|
-
* @param nodeHandleId - The node handle id to use for all requests
|
472
|
-
*/
|
473
|
-
constructor(client: AirtopWindowClient, nodeHandleId: string);
|
474
|
-
/**
|
475
|
-
* Extract content from the node
|
476
|
-
* @param prompt - The prompt to use for the extraction
|
477
|
-
* @param config - The configuration to use for the extraction
|
478
|
-
* @param requestOptions - The request options to use for the extraction
|
479
|
-
*/
|
480
|
-
extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
481
|
-
/**
|
482
|
-
* Act on the node
|
483
|
-
* @param prompt - The prompt to use for the action
|
484
|
-
* @param config - The configuration to use for the action
|
485
|
-
* @param requestOptions - The request options to use for the action
|
486
|
-
*/
|
487
|
-
act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
488
|
-
/**
|
489
|
-
* Execute an LLM call on the node
|
490
|
-
* @param prompt - The prompt to use for the LLM call
|
491
|
-
* @param config - The configuration to use for the LLM call
|
492
|
-
* @param requestOptions - The request options to use for the LLM call
|
493
|
-
*/
|
494
|
-
llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
495
|
-
/**
|
496
|
-
* Find one element in the node
|
497
|
-
* @param prompt - The prompt to use for the find one
|
498
|
-
* @param config - The configuration to use for the find one
|
499
|
-
* @param requestOptions - The request options to use for the find one
|
500
|
-
*/
|
501
|
-
findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
|
503
|
+
/**
|
504
|
+
* Configuration parameters for finding multiple elements in a window.
|
505
|
+
*/
|
506
|
+
interface WindowFindManyConfig extends Omit<WindowFindManyParams, "sessionId" | "prompt" | "jobId"> {
|
507
|
+
}
|
508
|
+
/**
|
509
|
+
* Response for finding one element in a window.
|
510
|
+
*/
|
511
|
+
interface AirtopNode extends AirtopNodeImpl {
|
502
512
|
}
|
503
513
|
|
504
514
|
/**
|
@@ -667,6 +677,7 @@ declare class AirtopWindowClient extends AirtopBase {
|
|
667
677
|
act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
668
678
|
llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
669
679
|
findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
|
680
|
+
findMany(prompt: string, config?: WindowFindManyConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
|
670
681
|
}
|
671
682
|
|
672
683
|
/**
|
@@ -1107,4 +1118,4 @@ declare class AirtopMocks {
|
|
1107
1118
|
}): AirtopWindow<AirtopWindowGetInfoResponse>;
|
1108
1119
|
}
|
1109
1120
|
|
1110
|
-
export { type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, AirtopMocks, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, 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 SessionWarning, type WindowActConfig, type WindowClickConfig, type WindowCreateData, type WindowError, type WindowExtractConfig, type WindowFindOneConfig, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWarning, registerAirtopPlugin };
|
1121
|
+
export { type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, AirtopMocks, type AirtopNode, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, 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 SessionWarning, type WindowActConfig, type WindowClickConfig, type WindowCreateData, type WindowError, type WindowExtractConfig, type WindowFindManyConfig, type WindowFindOneConfig, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWarning, registerAirtopPlugin };
|
package/dist/index.d.ts
CHANGED
@@ -11,7 +11,7 @@ import * as _airtop_core_resources_shared_js from '@airtop/core/resources/shared
|
|
11
11
|
import { SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, Issue, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse } from '@airtop/core/resources/shared.js';
|
12
12
|
export { AIResponseEnvelope, AirtopPagination, ExternalSessionAIResponseMetadata, ExternalSessionWithConnectionInfo, Issue, OperationOutcomeResponse, WindowIDDataResponse } from '@airtop/core/resources/shared.js';
|
13
13
|
import * as _airtop_core_resources_sessions_mjs from '@airtop/core/resources/sessions.mjs';
|
14
|
-
import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams } from '@airtop/core/resources/windows.js';
|
14
|
+
import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams } from '@airtop/core/resources/windows.js';
|
15
15
|
|
16
16
|
/**
|
17
17
|
* Shared configuration between Airtop classes.
|
@@ -361,6 +361,51 @@ interface AirtopWindowGetInfoResponse extends AirtopWindowCreateResponse {
|
|
361
361
|
data: WindowInfoData;
|
362
362
|
}
|
363
363
|
|
364
|
+
declare class AirtopNodeImpl {
|
365
|
+
/**
|
366
|
+
* The window client
|
367
|
+
*/
|
368
|
+
protected windowClient: AirtopWindowClient;
|
369
|
+
/**
|
370
|
+
* The node handle id to use for all requests
|
371
|
+
*/
|
372
|
+
protected nodeHandleId: string;
|
373
|
+
/**
|
374
|
+
* Constructor
|
375
|
+
* @param client - The window client
|
376
|
+
* @param nodeHandleId - The node handle id to use for all requests
|
377
|
+
*/
|
378
|
+
constructor(client: AirtopWindowClient, nodeHandleId: string);
|
379
|
+
/**
|
380
|
+
* Extract content from the node
|
381
|
+
* @param prompt - The prompt to use for the extraction
|
382
|
+
* @param config - The configuration to use for the extraction
|
383
|
+
* @param requestOptions - The request options to use for the extraction
|
384
|
+
*/
|
385
|
+
extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
386
|
+
/**
|
387
|
+
* Act on the node
|
388
|
+
* @param prompt - The prompt to use for the action
|
389
|
+
* @param config - The configuration to use for the action
|
390
|
+
* @param requestOptions - The request options to use for the action
|
391
|
+
*/
|
392
|
+
act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
393
|
+
/**
|
394
|
+
* Execute an LLM call on the node
|
395
|
+
* @param prompt - The prompt to use for the LLM call
|
396
|
+
* @param config - The configuration to use for the LLM call
|
397
|
+
* @param requestOptions - The request options to use for the LLM call
|
398
|
+
*/
|
399
|
+
llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
400
|
+
/**
|
401
|
+
* Find one element in the node
|
402
|
+
* @param prompt - The prompt to use for the find one
|
403
|
+
* @param config - The configuration to use for the find one
|
404
|
+
* @param requestOptions - The request options to use for the find one
|
405
|
+
*/
|
406
|
+
findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
|
407
|
+
}
|
408
|
+
|
364
409
|
/**
|
365
410
|
* Configuration parameters for typing text in a window.
|
366
411
|
* Excludes session ID and text content which are provided separately.
|
@@ -455,50 +500,15 @@ interface WindowLlmConfig extends Omit<WindowLlmParams, "sessionId" | "prompt">
|
|
455
500
|
*/
|
456
501
|
interface WindowFindOneConfig extends Omit<WindowFindOneParams, "sessionId" | "prompt" | "jobId"> {
|
457
502
|
}
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
protected nodeHandleId: string;
|
468
|
-
/**
|
469
|
-
* Constructor
|
470
|
-
* @param client - The window client
|
471
|
-
* @param nodeHandleId - The node handle id to use for all requests
|
472
|
-
*/
|
473
|
-
constructor(client: AirtopWindowClient, nodeHandleId: string);
|
474
|
-
/**
|
475
|
-
* Extract content from the node
|
476
|
-
* @param prompt - The prompt to use for the extraction
|
477
|
-
* @param config - The configuration to use for the extraction
|
478
|
-
* @param requestOptions - The request options to use for the extraction
|
479
|
-
*/
|
480
|
-
extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
481
|
-
/**
|
482
|
-
* Act on the node
|
483
|
-
* @param prompt - The prompt to use for the action
|
484
|
-
* @param config - The configuration to use for the action
|
485
|
-
* @param requestOptions - The request options to use for the action
|
486
|
-
*/
|
487
|
-
act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
488
|
-
/**
|
489
|
-
* Execute an LLM call on the node
|
490
|
-
* @param prompt - The prompt to use for the LLM call
|
491
|
-
* @param config - The configuration to use for the LLM call
|
492
|
-
* @param requestOptions - The request options to use for the LLM call
|
493
|
-
*/
|
494
|
-
llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
495
|
-
/**
|
496
|
-
* Find one element in the node
|
497
|
-
* @param prompt - The prompt to use for the find one
|
498
|
-
* @param config - The configuration to use for the find one
|
499
|
-
* @param requestOptions - The request options to use for the find one
|
500
|
-
*/
|
501
|
-
findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
|
503
|
+
/**
|
504
|
+
* Configuration parameters for finding multiple elements in a window.
|
505
|
+
*/
|
506
|
+
interface WindowFindManyConfig extends Omit<WindowFindManyParams, "sessionId" | "prompt" | "jobId"> {
|
507
|
+
}
|
508
|
+
/**
|
509
|
+
* Response for finding one element in a window.
|
510
|
+
*/
|
511
|
+
interface AirtopNode extends AirtopNodeImpl {
|
502
512
|
}
|
503
513
|
|
504
514
|
/**
|
@@ -667,6 +677,7 @@ declare class AirtopWindowClient extends AirtopBase {
|
|
667
677
|
act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
668
678
|
llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
669
679
|
findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
|
680
|
+
findMany(prompt: string, config?: WindowFindManyConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
|
670
681
|
}
|
671
682
|
|
672
683
|
/**
|
@@ -1107,4 +1118,4 @@ declare class AirtopMocks {
|
|
1107
1118
|
}): AirtopWindow<AirtopWindowGetInfoResponse>;
|
1108
1119
|
}
|
1109
1120
|
|
1110
|
-
export { type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, AirtopMocks, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, 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 SessionWarning, type WindowActConfig, type WindowClickConfig, type WindowCreateData, type WindowError, type WindowExtractConfig, type WindowFindOneConfig, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWarning, registerAirtopPlugin };
|
1121
|
+
export { type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, AirtopMocks, type AirtopNode, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, 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 SessionWarning, type WindowActConfig, type WindowClickConfig, type WindowCreateData, type WindowError, type WindowExtractConfig, type WindowFindManyConfig, type WindowFindOneConfig, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, 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.8",
|
13
13
|
type: "module",
|
14
14
|
main: "./dist/index.cjs",
|
15
15
|
module: "./dist/index.js",
|
@@ -47,7 +47,7 @@ var require_package = __commonJS({
|
|
47
47
|
},
|
48
48
|
dependencies: {
|
49
49
|
"@airtop/json-schema-adapter": "workspace:*",
|
50
|
-
"@airtop/core": "0.1.0-alpha.
|
50
|
+
"@airtop/core": "0.1.0-alpha.26",
|
51
51
|
"date-fns": "4.1.0",
|
52
52
|
loglayer: "6.3.3",
|
53
53
|
"serialize-error": "12.0.0",
|
@@ -269,7 +269,7 @@ async function withRequestCompletionPolling(client, fn, requestOptions) {
|
|
269
269
|
}
|
270
270
|
|
271
271
|
// src/window/AirtopNode.ts
|
272
|
-
var
|
272
|
+
var AirtopNodeImpl = class {
|
273
273
|
/**
|
274
274
|
* The window client
|
275
275
|
*/
|
@@ -784,7 +784,28 @@ var AirtopWindowClient = class extends AirtopBase {
|
|
784
784
|
)
|
785
785
|
);
|
786
786
|
const nodeHandleId = apiResponse.data.modelResponse;
|
787
|
-
return new
|
787
|
+
return new AirtopNodeImpl(this, nodeHandleId);
|
788
|
+
}
|
789
|
+
async findMany(prompt, config, requestOptions = {}) {
|
790
|
+
this.log.withMetadata({ prompt }).info("Executing LLM call");
|
791
|
+
const apiResponse = await withRequestCompletionPolling(
|
792
|
+
this.client,
|
793
|
+
() => this.client.windows.findMany(
|
794
|
+
this.getWindowId(),
|
795
|
+
{
|
796
|
+
prompt,
|
797
|
+
sessionId: this.sessionId,
|
798
|
+
jobId: this.jobId,
|
799
|
+
...config || {}
|
800
|
+
},
|
801
|
+
{
|
802
|
+
timeout: secondsToMilliseconds3(600),
|
803
|
+
...this.resolveRequestOptions(requestOptions)
|
804
|
+
}
|
805
|
+
)
|
806
|
+
);
|
807
|
+
const nodeHandleIds = apiResponse.data.modelResponse.split(",");
|
808
|
+
return nodeHandleIds.map((nodeHandleId) => new AirtopNodeImpl(this, nodeHandleId));
|
788
809
|
}
|
789
810
|
};
|
790
811
|
|