Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@browserstack/ai-sdk-node

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@browserstack/ai-sdk-node - npm Package Compare versions

Comparing version 1.5.8 to 1.5.9

2

package.json

@@ -1,1 +0,1 @@

{"name":"@browserstack/ai-sdk-node","version":"1.5.8","description":"Browserstack integrations","main":"index.js","types":"types","scripts":{},"author":"","license":"SEE LICENSE IN LICENSE.md","dependencies":{"axios":"^1.6.2","uuid":"9.0.1"},"devDependencies":{},"exports":{".":{"require":"./index.js","import":"./index.js","types":"./types/index.d.ts"}}}
{"name":"@browserstack/ai-sdk-node","version":"1.5.9","description":"Browserstack integrations","main":"index.js","types":"types","scripts":{},"author":"","license":"SEE LICENSE IN LICENSE.md","dependencies":{"axios":"^1.7.4","uuid":"9.0.1"},"devDependencies":{},"exports":{".":{"require":"./index.js","import":"./index.js","types":"./types/index.d.ts"}}}

@@ -1,9 +0,16 @@

export interface AISdkConfig {
domain: string;
platform: string;
platform: "desktop"|"mobile"|"app";
connector: "direct"|"extension";
client: string;
}
export interface CompatibilityCheckDetails {
browserName: string;
version: string;
}
export class AISDK {
static configure(config: AISdkConfig): void;
static checkExtensionCompatibility(details: CompatibilityCheckDetails): boolean;
}

@@ -84,1 +91,148 @@

export interface VariableInput {
name: string;
id: string;
}
export interface InputValue {
type: 'variable' | 'function' | 'ai' | 'text';
value: string;
defaultValue: string | undefined;
args: InputArg[] | undefined;
}
export interface InputArg {
name: string;
value: any;
}
export interface FunctionDef {
name: string;
description: string;
args: { name: string; type: 'string' | 'boolean' | 'number' }[];
definition: string;
}
export namespace NLToSteps {
interface ModuleDefinition {
name: string;
description: string;
start: string;
}
interface NLToStepsFrameworkImpl {
executeScript: (script: (...data: any) => any, args: any[]) => any | Promise<any>;
executeAsyncScript?: (script: (...data: any) => any, args: any[]) => Promise<any>;
executeAllFrames?: (script: string) => Promise<void>;
getBrowser: () => string | Promise<string>;
getOS?: () => Promise<string>;
}
interface NLToStepsRequest {
id: string;
objective: string;
supportedActions?: string[];
variables?: VariableInput[];
functions?: FunctionDef[];
modules?: ModuleDefinition[];
useAIGenerator?: boolean;
waitForCustomActions?: boolean;
waitForNetworkCalls?: boolean;
waitAfterActions?: boolean;
waitCallback: (waitingAction: NLToStepsWaitAction) => Promise<any> | any;
authMethod: () => Promise<string> | string;
frameworkImplementation: NLToStepsFrameworkImpl;
}
interface NLToStepsInputRequest {
input: string;
parsedInput: InputValue[];
}
interface NLToStepsWaitStep {
action: Object;
stepId: string;
}
interface NLToStepsWaitAction {
type: 'INPUT' | 'MODULE' | 'STEP' | 'TCG' | 'WAIT_BEFORE_TCG_CALL' | 'WAIT_AFTER_TCG_CALL' | 'BEFORE_STEP';
id: string;
request: NLToStepsInputRequest | NLToStepsAction;
}
interface NLToStepsStatus {
state: 'RUNNING' | 'FAILED' | 'SUCCESS' | 'WAITING';
request: NLToStepsRequest;
failReason: string;
errorName: string;
currentWaitAction: NLToStepsWaitAction;
}
interface NLToStepsResponse {
id: string;
state: 'RUNNING' | 'FAILED' | 'SUCCESS' | 'WAITING';
failReason: string;
errorName: string;
performedActions: NLToStepsAction[];
}
export interface NLToStepsAction {
action_type: string;
element: ActionElement;
suggestionMeta: SuggestionMeta;
}
export interface ActionElement {
attributes: ActionElementAttributes;
coordinates: ActionElementCoordinates;
input_value: string;
selectorsObj: ActionElementSelectors;
tag_name: string;
xpath: string;
extracted_value: string;
}
export interface ActionElementAttributes {
heading: string;
id: string;
name: string;
}
export interface ActionElementCoordinates {
x: number;
y: number;
}
export interface ActionElementSelectors {
selectTagOptionAttributes: SelectTagOptionAttribute[];
}
export interface SelectTagOptionAttribute {
innerText: string;
}
export interface SuggestionMeta {
identifier: string;
rawAction: RawAction;
suggestionId: string;
}
export interface RawAction {
action: string;
id: number;
input: string;
thought: string;
value: string;
}
interface ExecutorActionHandler {
callTCG: (endpoint: string, method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH', request: any, timeout: number) => Promise<any>;
doAfterStepAction: (stepData: NLToStepsAction, timeout: number) => Promise<boolean>;
doBeforeStepAction: (stepData: NLToStepsAction, timeout: number) => Promise<boolean>;
waitForInput: (input: NLToStepsInputRequest, timeout: number) => Promise<string>;
}
function start(request: NLToStepsRequest): Promise<NLToStepsResponse>;
function cancelNL2StepsExecution(requestId: string, reason: string): Promise<NLToStepsResponse>;
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc