opensteer 0.6.6 → 0.6.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/browser-profile-client-CGXc0-P9.d.cts +228 -0
- package/dist/browser-profile-client-DHLzMf-K.d.ts +228 -0
- package/dist/{chunk-H27BERRF.js → chunk-C6AJL5XU.js} +7828 -7641
- package/dist/{chunk-KPPOTU3D.js → chunk-LTREUXLO.js} +140 -12
- package/dist/{chunk-6B6LOYU3.js → chunk-O4HVMKX2.js} +1 -1
- package/dist/{chunk-54KNQTOL.js → chunk-UQYVMJOZ.js} +27 -12
- package/dist/cli/auth.cjs +108 -11
- package/dist/cli/auth.d.cts +1 -1
- package/dist/cli/auth.d.ts +1 -1
- package/dist/cli/auth.js +2 -2
- package/dist/cli/profile.cjs +472 -186
- package/dist/cli/profile.d.cts +2 -2
- package/dist/cli/profile.d.ts +2 -2
- package/dist/cli/profile.js +4 -4
- package/dist/cli/server.cjs +453 -167
- package/dist/cli/server.js +2 -2
- package/dist/index.cjs +482 -165
- package/dist/index.d.cts +48 -5
- package/dist/index.d.ts +48 -5
- package/dist/index.js +34 -5
- package/dist/{types-BWItZPl_.d.cts → types-Cr10igF3.d.cts} +1 -1
- package/dist/{types-BWItZPl_.d.ts → types-Cr10igF3.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/browser-profile-client-D6PuRefA.d.cts +0 -168
- package/dist/browser-profile-client-OUHaODro.d.ts +0 -168
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as playwright from 'playwright';
|
|
2
2
|
import { Page, BrowserContext, ElementHandle, Cookie, Browser } from 'playwright';
|
|
3
|
-
import { a as OpensteerConfig, L as LaunchOptions, b as OpensteerLocalProfileDescriptor, c as OpensteerRealBrowserOptions, G as GotoOptions, S as SnapshotOptions, d as StateResult, e as ScreenshotOptions, f as ClickOptions, A as ActionResult, H as HoverOptions, I as InputOptions, g as SelectOptions, h as ScrollOptions, T as TabInfo, C as CookieParam, B as BaseActionOptions, i as BoundingBox, F as FileUploadOptions, E as ExtractOptions, j as ExtractFromPlanOptions, k as ExtractionRunResult, l as OpensteerCursorState, m as OpensteerAgentConfig, n as OpensteerAgentInstance, o as ElementPath, p as SnapshotMode, q as AiResolveCallback, r as AiExtractCallback, O as OpensteerAuthScheme, s as OpensteerAgentProvider, t as OpensteerAgentAction, u as OpensteerAgentResult, v as OpensteerAgentUsage, w as OpensteerCursorStyle, x as OpensteerCursorConfig, y as OpensteerAgentExecuteOptions } from './types-
|
|
4
|
-
export {
|
|
5
|
-
import { A as ActionFailure, e as ActionFailureCode, C as CloudErrorCode, f as CloudActionFailureDetails, g as CloudSessionCreateRequest, h as CloudSessionCreateResponse, i as CloudSelectorCacheImportRequest, j as CloudSelectorCacheImportResponse, k as CloudActionMethod, l as CloudSelectorCacheImportEntry } from './browser-profile-client-
|
|
6
|
-
export { m as ActionFailureBlocker, n as ActionFailureClassificationSource, o as ActionFailureDetails, p as BrowserProfileArchiveFormat, q as BrowserProfileClient, c as BrowserProfileCreateRequest, d as BrowserProfileDescriptor, a as BrowserProfileListRequest, b as BrowserProfileListResponse, r as BrowserProfileProxyPolicy, B as BrowserProfileStatus, s as CloudActionFailure, t as CloudActionRequest, u as CloudActionResponse, v as CloudActionSuccess, w as
|
|
3
|
+
import { a as OpensteerConfig, L as LaunchOptions, b as OpensteerLocalProfileDescriptor, c as OpensteerRealBrowserOptions, G as GotoOptions, S as SnapshotOptions, d as StateResult, e as ScreenshotOptions, f as ClickOptions, A as ActionResult, H as HoverOptions, I as InputOptions, g as SelectOptions, h as ScrollOptions, T as TabInfo, C as CookieParam, B as BaseActionOptions, i as BoundingBox, F as FileUploadOptions, E as ExtractOptions, j as ExtractFromPlanOptions, k as ExtractionRunResult, l as OpensteerCursorState, m as OpensteerAgentConfig, n as OpensteerAgentInstance, o as ElementPath, p as SnapshotMode, q as AiResolveCallback, r as AiExtractCallback, O as OpensteerAuthScheme, s as OpensteerAgentProvider, t as OpensteerAgentAction, u as OpensteerAgentResult, v as OpensteerAgentUsage, w as OpensteerCursorStyle, x as OpensteerCursorConfig, y as OpensteerAgentExecuteOptions, z as OpensteerBrowserConfig } from './types-Cr10igF3.cjs';
|
|
4
|
+
export { D as ActionWaitOptions, J as AiExtractArgs, K as AiExtractResult, M as AiResolveArgs, N as AiResolveCallbackResult, P as AiResolveResult, Q as AttributeMatchClause, R as ContextHop, U as DomPath, V as ExtractSchema, W as ExtractSchemaField, X as ExtractSchemaValue, Y as ExtractionFieldPlan, Z as ExtractionPlan, _ as MatchClause, $ as MatchOperator, a0 as OpensteerAgentMode, a1 as OpensteerAgentModelConfig, a2 as OpensteerCloudAnnouncePolicy, a3 as OpensteerCloudBrowserProfileOptions, a4 as OpensteerCloudConfig, a5 as OpensteerCloudOptions, a6 as OpensteerCursorColor, a7 as OpensteerCursorProfile, a8 as OpensteerLocalBrowserMode, a9 as OpensteerStorageConfig, aa as PathNode, ab as PathNodePosition, ac as PositionMatchClause } from './types-Cr10igF3.cjs';
|
|
5
|
+
import { A as ActionFailure, e as ActionFailureCode, C as CloudErrorCode, f as CloudActionFailureDetails, g as CloudSessionCreateRequest, h as CloudSessionCreateResponse, i as CloudSelectorCacheImportRequest, j as CloudSelectorCacheImportResponse, k as CloudActionMethod, l as CloudSelectorCacheImportEntry } from './browser-profile-client-CGXc0-P9.cjs';
|
|
6
|
+
export { m as ActionFailureBlocker, n as ActionFailureClassificationSource, o as ActionFailureDetails, p as BrowserProfileArchiveFormat, q as BrowserProfileClient, c as BrowserProfileCreateRequest, d as BrowserProfileDescriptor, a as BrowserProfileListRequest, b as BrowserProfileListResponse, r as BrowserProfileProxyPolicy, B as BrowserProfileStatus, s as CloudActionFailure, t as CloudActionRequest, u as CloudActionResponse, v as CloudActionSuccess, w as CloudBrowserContextConfig, x as CloudBrowserExtensionConfig, y as CloudBrowserLaunchConfig, z as CloudBrowserProfileLaunchPreference, D as CloudFingerprintMode, E as CloudFingerprintPreference, F as CloudGeolocation, G as CloudProxyMode, H as CloudProxyPreference, I as CloudProxyProtocol, J as CloudSessionContractVersion, K as CloudSessionLaunchConfig, L as CloudSessionSourceType, M as CloudSessionStatus, N as CloudSessionSummary, O as CloudSessionVisibilityScope, P as CloudViewport, Q as cloudActionMethods, R as cloudErrorCodes, S as cloudSessionContractVersion, T as cloudSessionSourceTypes, U as cloudSessionStatuses, V as isCloudActionMethod, W as isCloudErrorCode, X as isCloudSessionSourceType, Y as isCloudSessionStatus } from './browser-profile-client-CGXc0-P9.cjs';
|
|
7
7
|
|
|
8
8
|
interface RegistryEntry {
|
|
9
9
|
file: string;
|
|
@@ -647,4 +647,47 @@ declare class SvgCursorRenderer implements CursorRenderer {
|
|
|
647
647
|
private handleError;
|
|
648
648
|
}
|
|
649
649
|
|
|
650
|
-
|
|
650
|
+
interface BrowserSession {
|
|
651
|
+
browser: Browser;
|
|
652
|
+
context: BrowserContext;
|
|
653
|
+
page: Page;
|
|
654
|
+
/** True when connected to an external browser. close() disconnects without killing it. */
|
|
655
|
+
isExternal: boolean;
|
|
656
|
+
}
|
|
657
|
+
declare class BrowserPool {
|
|
658
|
+
private browser;
|
|
659
|
+
private cdpProxy;
|
|
660
|
+
private launchedProcess;
|
|
661
|
+
private managedUserDataDir;
|
|
662
|
+
private persistentProfile;
|
|
663
|
+
private readonly defaults;
|
|
664
|
+
constructor(defaults?: OpensteerBrowserConfig);
|
|
665
|
+
launch(options?: LaunchOptions): Promise<BrowserSession>;
|
|
666
|
+
close(): Promise<void>;
|
|
667
|
+
private connectToRunning;
|
|
668
|
+
private launchOwnedRealBrowser;
|
|
669
|
+
private launchSandbox;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
interface ChromePaths {
|
|
673
|
+
executable: string | null;
|
|
674
|
+
defaultUserDataDir: string;
|
|
675
|
+
}
|
|
676
|
+
interface LocalChromeProfileDescriptor {
|
|
677
|
+
directory: string;
|
|
678
|
+
name: string;
|
|
679
|
+
}
|
|
680
|
+
/** Resolve platform-specific Chrome paths. */
|
|
681
|
+
declare function detectChromePaths(): ChromePaths;
|
|
682
|
+
/** Expand ~ to home directory in a path. */
|
|
683
|
+
declare function expandHome(p: string): string;
|
|
684
|
+
declare function listLocalChromeProfiles(userDataDir?: string): LocalChromeProfileDescriptor[];
|
|
685
|
+
|
|
686
|
+
interface PersistentProfileResult {
|
|
687
|
+
created: boolean;
|
|
688
|
+
userDataDir: string;
|
|
689
|
+
}
|
|
690
|
+
declare function getOrCreatePersistentProfile(sourceUserDataDir: string, profileDirectory: string, profilesRootDir?: string): Promise<PersistentProfileResult>;
|
|
691
|
+
declare function clearPersistentProfileSingletons(userDataDir: string): Promise<void>;
|
|
692
|
+
|
|
693
|
+
export { type ActionExecutionResult, ActionFailure, ActionFailureCode, ActionResult, ActionWsClient, AiExtractCallback, type AiModelConfig, AiResolveCallback, type ArrayExtractedRow, type ArrayRowMetadata, type ArraySelector, BaseActionOptions, BoundingBox, BrowserPool, type BrowserSession, CdpOverlayCursorRenderer, ClickOptions, CloudActionFailureDetails, CloudActionMethod, CloudCdpClient, type CloudCdpConnectArgs, type CloudCdpConnection, CloudErrorCode, CloudSelectorCacheImportEntry, CloudSelectorCacheImportRequest, CloudSelectorCacheImportResponse, CloudSessionClient, CloudSessionCreateRequest, CloudSessionCreateResponse, CookieParam, type CounterRequest, CounterResolutionError, type CounterResolutionErrorCode, type CursorCapabilityReason, CursorController, type CursorIntent, type CursorMotionPlan, type CursorPoint, type CursorRenderer, type CursorStatus, ElementPath, ElementPathError, type ElementPathErrorCode, ExtractFromPlanOptions, ExtractOptions, ExtractionRunResult, type FieldSelector, FileUploadOptions, GotoOptions, HoverOptions, InputOptions, LaunchOptions, type LocalChromeProfileDescriptor, LocalSelectorStorage, type MarkInteractivityOptions, OPENSTEER_HIDDEN_ATTR, OPENSTEER_INTERACTIVE_ATTR, OPENSTEER_SCROLLABLE_ATTR, OS_BOUNDARY_ATTR, OS_IFRAME_BOUNDARY_TAG, OS_NODE_ID_ATTR, OS_SHADOW_BOUNDARY_TAG, OS_UNAVAILABLE_ATTR, Opensteer, OpensteerActionError, OpensteerAgentAction, OpensteerAgentActionError, OpensteerAgentApiError, OpensteerAgentBusyError, OpensteerAgentConfig, OpensteerAgentConfigError, OpensteerAgentError, OpensteerAgentExecuteOptions, OpensteerAgentExecutionError, OpensteerAgentInstance, OpensteerAgentProvider, OpensteerAgentProviderError, OpensteerAgentResult, OpensteerAgentUsage, OpensteerAuthScheme, OpensteerBrowserConfig, OpensteerCloudError, OpensteerConfig, OpensteerCuaAgentHandler, OpensteerCursorConfig, OpensteerCursorState, OpensteerCursorStyle, OpensteerLocalProfileDescriptor, OpensteerRealBrowserOptions, type PersistentProfileResult, type PreparedSnapshot, type RegistryEntry, type ResolvedElementPath, ScreenshotOptions, ScrollOptions, SelectOptions, type SelectorFile, type SelectorRegistry, type SerializeOptions, type SerializedNodeMeta, type SerializedPageHTML, SnapshotMode, SnapshotOptions, StateResult, SvgCursorRenderer, TabInfo, buildArrayFieldPathCandidates, buildElementPathFromHandle, buildElementPathFromSelector, buildPathSelectorHint, cleanForAction, cleanForClickable, cleanForExtraction, cleanForFull, cleanForScrollable, clearCookies, clearPersistentProfileSingletons, cloneElementPath, closeTab, cloudNotLaunchedError, cloudUnsupportedMethodError, collectLocalSelectorCacheEntries, countArrayItemsWithPath, createCuaClient, createEmptyRegistry, createExtractCallback, createResolveCallback, createTab, detectChromePaths, expandHome, exportCookies, extractArrayRowsWithPaths, extractArrayWithPaths, extractWithPaths, getCookies, getElementAttributes, getElementBoundingBox, getElementText, getElementValue, getModelProvider, getOrCreatePersistentProfile, getPageHtml, getPageTitle, importCookies, listLocalChromeProfiles, listTabs, markInteractiveElements, normalizeNamespace, performClick, performFileUpload, performHover, performInput, performScroll, performSelect, planSnappyCursorMotion, prepareSnapshot, pressKey, queryAllByElementPath, resolveAgentConfig, resolveCounterElement, resolveCountersBatch, resolveElementPath, resolveNamespaceDir, sanitizeElementPath, serializePageHTML, setCookie, switchTab, typeText, waitForVisualStability };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as playwright from 'playwright';
|
|
2
2
|
import { Page, BrowserContext, ElementHandle, Cookie, Browser } from 'playwright';
|
|
3
|
-
import { a as OpensteerConfig, L as LaunchOptions, b as OpensteerLocalProfileDescriptor, c as OpensteerRealBrowserOptions, G as GotoOptions, S as SnapshotOptions, d as StateResult, e as ScreenshotOptions, f as ClickOptions, A as ActionResult, H as HoverOptions, I as InputOptions, g as SelectOptions, h as ScrollOptions, T as TabInfo, C as CookieParam, B as BaseActionOptions, i as BoundingBox, F as FileUploadOptions, E as ExtractOptions, j as ExtractFromPlanOptions, k as ExtractionRunResult, l as OpensteerCursorState, m as OpensteerAgentConfig, n as OpensteerAgentInstance, o as ElementPath, p as SnapshotMode, q as AiResolveCallback, r as AiExtractCallback, O as OpensteerAuthScheme, s as OpensteerAgentProvider, t as OpensteerAgentAction, u as OpensteerAgentResult, v as OpensteerAgentUsage, w as OpensteerCursorStyle, x as OpensteerCursorConfig, y as OpensteerAgentExecuteOptions } from './types-
|
|
4
|
-
export {
|
|
5
|
-
import { A as ActionFailure, e as ActionFailureCode, C as CloudErrorCode, f as CloudActionFailureDetails, g as CloudSessionCreateRequest, h as CloudSessionCreateResponse, i as CloudSelectorCacheImportRequest, j as CloudSelectorCacheImportResponse, k as CloudActionMethod, l as CloudSelectorCacheImportEntry } from './browser-profile-client-
|
|
6
|
-
export { m as ActionFailureBlocker, n as ActionFailureClassificationSource, o as ActionFailureDetails, p as BrowserProfileArchiveFormat, q as BrowserProfileClient, c as BrowserProfileCreateRequest, d as BrowserProfileDescriptor, a as BrowserProfileListRequest, b as BrowserProfileListResponse, r as BrowserProfileProxyPolicy, B as BrowserProfileStatus, s as CloudActionFailure, t as CloudActionRequest, u as CloudActionResponse, v as CloudActionSuccess, w as
|
|
3
|
+
import { a as OpensteerConfig, L as LaunchOptions, b as OpensteerLocalProfileDescriptor, c as OpensteerRealBrowserOptions, G as GotoOptions, S as SnapshotOptions, d as StateResult, e as ScreenshotOptions, f as ClickOptions, A as ActionResult, H as HoverOptions, I as InputOptions, g as SelectOptions, h as ScrollOptions, T as TabInfo, C as CookieParam, B as BaseActionOptions, i as BoundingBox, F as FileUploadOptions, E as ExtractOptions, j as ExtractFromPlanOptions, k as ExtractionRunResult, l as OpensteerCursorState, m as OpensteerAgentConfig, n as OpensteerAgentInstance, o as ElementPath, p as SnapshotMode, q as AiResolveCallback, r as AiExtractCallback, O as OpensteerAuthScheme, s as OpensteerAgentProvider, t as OpensteerAgentAction, u as OpensteerAgentResult, v as OpensteerAgentUsage, w as OpensteerCursorStyle, x as OpensteerCursorConfig, y as OpensteerAgentExecuteOptions, z as OpensteerBrowserConfig } from './types-Cr10igF3.js';
|
|
4
|
+
export { D as ActionWaitOptions, J as AiExtractArgs, K as AiExtractResult, M as AiResolveArgs, N as AiResolveCallbackResult, P as AiResolveResult, Q as AttributeMatchClause, R as ContextHop, U as DomPath, V as ExtractSchema, W as ExtractSchemaField, X as ExtractSchemaValue, Y as ExtractionFieldPlan, Z as ExtractionPlan, _ as MatchClause, $ as MatchOperator, a0 as OpensteerAgentMode, a1 as OpensteerAgentModelConfig, a2 as OpensteerCloudAnnouncePolicy, a3 as OpensteerCloudBrowserProfileOptions, a4 as OpensteerCloudConfig, a5 as OpensteerCloudOptions, a6 as OpensteerCursorColor, a7 as OpensteerCursorProfile, a8 as OpensteerLocalBrowserMode, a9 as OpensteerStorageConfig, aa as PathNode, ab as PathNodePosition, ac as PositionMatchClause } from './types-Cr10igF3.js';
|
|
5
|
+
import { A as ActionFailure, e as ActionFailureCode, C as CloudErrorCode, f as CloudActionFailureDetails, g as CloudSessionCreateRequest, h as CloudSessionCreateResponse, i as CloudSelectorCacheImportRequest, j as CloudSelectorCacheImportResponse, k as CloudActionMethod, l as CloudSelectorCacheImportEntry } from './browser-profile-client-DHLzMf-K.js';
|
|
6
|
+
export { m as ActionFailureBlocker, n as ActionFailureClassificationSource, o as ActionFailureDetails, p as BrowserProfileArchiveFormat, q as BrowserProfileClient, c as BrowserProfileCreateRequest, d as BrowserProfileDescriptor, a as BrowserProfileListRequest, b as BrowserProfileListResponse, r as BrowserProfileProxyPolicy, B as BrowserProfileStatus, s as CloudActionFailure, t as CloudActionRequest, u as CloudActionResponse, v as CloudActionSuccess, w as CloudBrowserContextConfig, x as CloudBrowserExtensionConfig, y as CloudBrowserLaunchConfig, z as CloudBrowserProfileLaunchPreference, D as CloudFingerprintMode, E as CloudFingerprintPreference, F as CloudGeolocation, G as CloudProxyMode, H as CloudProxyPreference, I as CloudProxyProtocol, J as CloudSessionContractVersion, K as CloudSessionLaunchConfig, L as CloudSessionSourceType, M as CloudSessionStatus, N as CloudSessionSummary, O as CloudSessionVisibilityScope, P as CloudViewport, Q as cloudActionMethods, R as cloudErrorCodes, S as cloudSessionContractVersion, T as cloudSessionSourceTypes, U as cloudSessionStatuses, V as isCloudActionMethod, W as isCloudErrorCode, X as isCloudSessionSourceType, Y as isCloudSessionStatus } from './browser-profile-client-DHLzMf-K.js';
|
|
7
7
|
|
|
8
8
|
interface RegistryEntry {
|
|
9
9
|
file: string;
|
|
@@ -647,4 +647,47 @@ declare class SvgCursorRenderer implements CursorRenderer {
|
|
|
647
647
|
private handleError;
|
|
648
648
|
}
|
|
649
649
|
|
|
650
|
-
|
|
650
|
+
interface BrowserSession {
|
|
651
|
+
browser: Browser;
|
|
652
|
+
context: BrowserContext;
|
|
653
|
+
page: Page;
|
|
654
|
+
/** True when connected to an external browser. close() disconnects without killing it. */
|
|
655
|
+
isExternal: boolean;
|
|
656
|
+
}
|
|
657
|
+
declare class BrowserPool {
|
|
658
|
+
private browser;
|
|
659
|
+
private cdpProxy;
|
|
660
|
+
private launchedProcess;
|
|
661
|
+
private managedUserDataDir;
|
|
662
|
+
private persistentProfile;
|
|
663
|
+
private readonly defaults;
|
|
664
|
+
constructor(defaults?: OpensteerBrowserConfig);
|
|
665
|
+
launch(options?: LaunchOptions): Promise<BrowserSession>;
|
|
666
|
+
close(): Promise<void>;
|
|
667
|
+
private connectToRunning;
|
|
668
|
+
private launchOwnedRealBrowser;
|
|
669
|
+
private launchSandbox;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
interface ChromePaths {
|
|
673
|
+
executable: string | null;
|
|
674
|
+
defaultUserDataDir: string;
|
|
675
|
+
}
|
|
676
|
+
interface LocalChromeProfileDescriptor {
|
|
677
|
+
directory: string;
|
|
678
|
+
name: string;
|
|
679
|
+
}
|
|
680
|
+
/** Resolve platform-specific Chrome paths. */
|
|
681
|
+
declare function detectChromePaths(): ChromePaths;
|
|
682
|
+
/** Expand ~ to home directory in a path. */
|
|
683
|
+
declare function expandHome(p: string): string;
|
|
684
|
+
declare function listLocalChromeProfiles(userDataDir?: string): LocalChromeProfileDescriptor[];
|
|
685
|
+
|
|
686
|
+
interface PersistentProfileResult {
|
|
687
|
+
created: boolean;
|
|
688
|
+
userDataDir: string;
|
|
689
|
+
}
|
|
690
|
+
declare function getOrCreatePersistentProfile(sourceUserDataDir: string, profileDirectory: string, profilesRootDir?: string): Promise<PersistentProfileResult>;
|
|
691
|
+
declare function clearPersistentProfileSingletons(userDataDir: string): Promise<void>;
|
|
692
|
+
|
|
693
|
+
export { type ActionExecutionResult, ActionFailure, ActionFailureCode, ActionResult, ActionWsClient, AiExtractCallback, type AiModelConfig, AiResolveCallback, type ArrayExtractedRow, type ArrayRowMetadata, type ArraySelector, BaseActionOptions, BoundingBox, BrowserPool, type BrowserSession, CdpOverlayCursorRenderer, ClickOptions, CloudActionFailureDetails, CloudActionMethod, CloudCdpClient, type CloudCdpConnectArgs, type CloudCdpConnection, CloudErrorCode, CloudSelectorCacheImportEntry, CloudSelectorCacheImportRequest, CloudSelectorCacheImportResponse, CloudSessionClient, CloudSessionCreateRequest, CloudSessionCreateResponse, CookieParam, type CounterRequest, CounterResolutionError, type CounterResolutionErrorCode, type CursorCapabilityReason, CursorController, type CursorIntent, type CursorMotionPlan, type CursorPoint, type CursorRenderer, type CursorStatus, ElementPath, ElementPathError, type ElementPathErrorCode, ExtractFromPlanOptions, ExtractOptions, ExtractionRunResult, type FieldSelector, FileUploadOptions, GotoOptions, HoverOptions, InputOptions, LaunchOptions, type LocalChromeProfileDescriptor, LocalSelectorStorage, type MarkInteractivityOptions, OPENSTEER_HIDDEN_ATTR, OPENSTEER_INTERACTIVE_ATTR, OPENSTEER_SCROLLABLE_ATTR, OS_BOUNDARY_ATTR, OS_IFRAME_BOUNDARY_TAG, OS_NODE_ID_ATTR, OS_SHADOW_BOUNDARY_TAG, OS_UNAVAILABLE_ATTR, Opensteer, OpensteerActionError, OpensteerAgentAction, OpensteerAgentActionError, OpensteerAgentApiError, OpensteerAgentBusyError, OpensteerAgentConfig, OpensteerAgentConfigError, OpensteerAgentError, OpensteerAgentExecuteOptions, OpensteerAgentExecutionError, OpensteerAgentInstance, OpensteerAgentProvider, OpensteerAgentProviderError, OpensteerAgentResult, OpensteerAgentUsage, OpensteerAuthScheme, OpensteerBrowserConfig, OpensteerCloudError, OpensteerConfig, OpensteerCuaAgentHandler, OpensteerCursorConfig, OpensteerCursorState, OpensteerCursorStyle, OpensteerLocalProfileDescriptor, OpensteerRealBrowserOptions, type PersistentProfileResult, type PreparedSnapshot, type RegistryEntry, type ResolvedElementPath, ScreenshotOptions, ScrollOptions, SelectOptions, type SelectorFile, type SelectorRegistry, type SerializeOptions, type SerializedNodeMeta, type SerializedPageHTML, SnapshotMode, SnapshotOptions, StateResult, SvgCursorRenderer, TabInfo, buildArrayFieldPathCandidates, buildElementPathFromHandle, buildElementPathFromSelector, buildPathSelectorHint, cleanForAction, cleanForClickable, cleanForExtraction, cleanForFull, cleanForScrollable, clearCookies, clearPersistentProfileSingletons, cloneElementPath, closeTab, cloudNotLaunchedError, cloudUnsupportedMethodError, collectLocalSelectorCacheEntries, countArrayItemsWithPath, createCuaClient, createEmptyRegistry, createExtractCallback, createResolveCallback, createTab, detectChromePaths, expandHome, exportCookies, extractArrayRowsWithPaths, extractArrayWithPaths, extractWithPaths, getCookies, getElementAttributes, getElementBoundingBox, getElementText, getElementValue, getModelProvider, getOrCreatePersistentProfile, getPageHtml, getPageTitle, importCookies, listLocalChromeProfiles, listTabs, markInteractiveElements, normalizeNamespace, performClick, performFileUpload, performHover, performInput, performScroll, performSelect, planSnappyCursorMotion, prepareSnapshot, pressKey, queryAllByElementPath, resolveAgentConfig, resolveCounterElement, resolveCountersBatch, resolveElementPath, resolveNamespaceDir, sanitizeElementPath, serializePageHTML, setCookie, switchTab, typeText, waitForVisualStability };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BrowserProfileClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-O4HVMKX2.js";
|
|
4
4
|
import {
|
|
5
5
|
ActionWsClient,
|
|
6
|
+
BrowserPool,
|
|
6
7
|
CounterResolutionError,
|
|
7
8
|
CursorController,
|
|
8
9
|
ElementPathError,
|
|
@@ -36,9 +37,9 @@ import {
|
|
|
36
37
|
cleanForFull,
|
|
37
38
|
cleanForScrollable,
|
|
38
39
|
clearCookies,
|
|
40
|
+
clearPersistentProfileSingletons,
|
|
39
41
|
cloneElementPath,
|
|
40
42
|
closeTab,
|
|
41
|
-
cloudSessionContractVersion,
|
|
42
43
|
collectLocalSelectorCacheEntries,
|
|
43
44
|
countArrayItemsWithPath,
|
|
44
45
|
createCuaClient,
|
|
@@ -53,6 +54,7 @@ import {
|
|
|
53
54
|
getElementBoundingBox,
|
|
54
55
|
getElementText,
|
|
55
56
|
getElementValue,
|
|
57
|
+
getOrCreatePersistentProfile,
|
|
56
58
|
getPageHtml,
|
|
57
59
|
getPageTitle,
|
|
58
60
|
importCookies,
|
|
@@ -78,17 +80,30 @@ import {
|
|
|
78
80
|
switchTab,
|
|
79
81
|
typeText,
|
|
80
82
|
waitForVisualStability
|
|
81
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-C6AJL5XU.js";
|
|
82
84
|
import {
|
|
83
85
|
CloudCdpClient,
|
|
84
86
|
CloudSessionClient,
|
|
85
87
|
OpensteerCloudError,
|
|
88
|
+
cloudActionMethods,
|
|
89
|
+
cloudErrorCodes,
|
|
86
90
|
cloudNotLaunchedError,
|
|
91
|
+
cloudSessionContractVersion,
|
|
92
|
+
cloudSessionSourceTypes,
|
|
93
|
+
cloudSessionStatuses,
|
|
87
94
|
cloudUnsupportedMethodError,
|
|
95
|
+
isCloudActionMethod,
|
|
96
|
+
isCloudErrorCode,
|
|
97
|
+
isCloudSessionSourceType,
|
|
98
|
+
isCloudSessionStatus,
|
|
88
99
|
normalizeNamespace,
|
|
89
100
|
resolveNamespaceDir
|
|
90
|
-
} from "./chunk-
|
|
91
|
-
import
|
|
101
|
+
} from "./chunk-LTREUXLO.js";
|
|
102
|
+
import {
|
|
103
|
+
detectChromePaths,
|
|
104
|
+
expandHome,
|
|
105
|
+
listLocalChromeProfiles
|
|
106
|
+
} from "./chunk-K5CL76MG.js";
|
|
92
107
|
import {
|
|
93
108
|
createResolveCallback
|
|
94
109
|
} from "./chunk-DN3GI5CH.js";
|
|
@@ -283,6 +298,7 @@ function sleep(ms) {
|
|
|
283
298
|
}
|
|
284
299
|
export {
|
|
285
300
|
ActionWsClient,
|
|
301
|
+
BrowserPool,
|
|
286
302
|
BrowserProfileClient,
|
|
287
303
|
CdpOverlayCursorRenderer,
|
|
288
304
|
CloudCdpClient,
|
|
@@ -321,10 +337,15 @@ export {
|
|
|
321
337
|
cleanForFull,
|
|
322
338
|
cleanForScrollable,
|
|
323
339
|
clearCookies,
|
|
340
|
+
clearPersistentProfileSingletons,
|
|
324
341
|
cloneElementPath,
|
|
325
342
|
closeTab,
|
|
343
|
+
cloudActionMethods,
|
|
344
|
+
cloudErrorCodes,
|
|
326
345
|
cloudNotLaunchedError,
|
|
327
346
|
cloudSessionContractVersion,
|
|
347
|
+
cloudSessionSourceTypes,
|
|
348
|
+
cloudSessionStatuses,
|
|
328
349
|
cloudUnsupportedMethodError,
|
|
329
350
|
collectLocalSelectorCacheEntries,
|
|
330
351
|
countArrayItemsWithPath,
|
|
@@ -333,6 +354,8 @@ export {
|
|
|
333
354
|
createExtractCallback,
|
|
334
355
|
createResolveCallback,
|
|
335
356
|
createTab,
|
|
357
|
+
detectChromePaths,
|
|
358
|
+
expandHome,
|
|
336
359
|
exportCookies,
|
|
337
360
|
extractArrayRowsWithPaths,
|
|
338
361
|
extractArrayWithPaths,
|
|
@@ -343,9 +366,15 @@ export {
|
|
|
343
366
|
getElementText,
|
|
344
367
|
getElementValue,
|
|
345
368
|
getModelProvider,
|
|
369
|
+
getOrCreatePersistentProfile,
|
|
346
370
|
getPageHtml,
|
|
347
371
|
getPageTitle,
|
|
348
372
|
importCookies,
|
|
373
|
+
isCloudActionMethod,
|
|
374
|
+
isCloudErrorCode,
|
|
375
|
+
isCloudSessionSourceType,
|
|
376
|
+
isCloudSessionStatus,
|
|
377
|
+
listLocalChromeProfiles,
|
|
349
378
|
listTabs,
|
|
350
379
|
markInteractiveElements,
|
|
351
380
|
normalizeNamespace,
|
|
@@ -342,4 +342,4 @@ interface OpensteerAgentInstance {
|
|
|
342
342
|
execute(instructionOrOptions: string | OpensteerAgentExecuteOptions): Promise<OpensteerAgentResult>;
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
-
export type {
|
|
345
|
+
export type { MatchOperator as $, ActionResult as A, BaseActionOptions as B, CookieParam as C, ActionWaitOptions as D, ExtractOptions as E, FileUploadOptions as F, GotoOptions as G, HoverOptions as H, InputOptions as I, AiExtractArgs as J, AiExtractResult as K, LaunchOptions as L, AiResolveArgs as M, AiResolveCallbackResult as N, OpensteerAuthScheme as O, AiResolveResult as P, AttributeMatchClause as Q, ContextHop as R, SnapshotOptions as S, TabInfo as T, DomPath as U, ExtractSchema as V, ExtractSchemaField as W, ExtractSchemaValue as X, ExtractionFieldPlan as Y, ExtractionPlan as Z, MatchClause as _, OpensteerConfig as a, OpensteerAgentMode as a0, OpensteerAgentModelConfig as a1, OpensteerCloudAnnouncePolicy as a2, OpensteerCloudBrowserProfileOptions as a3, OpensteerCloudConfig as a4, OpensteerCloudOptions as a5, OpensteerCursorColor as a6, OpensteerCursorProfile as a7, OpensteerLocalBrowserMode as a8, OpensteerStorageConfig as a9, PathNode as aa, PathNodePosition as ab, PositionMatchClause as ac, OpensteerLocalProfileDescriptor as b, OpensteerRealBrowserOptions as c, StateResult as d, ScreenshotOptions as e, ClickOptions as f, SelectOptions as g, ScrollOptions as h, BoundingBox as i, ExtractFromPlanOptions as j, ExtractionRunResult as k, OpensteerCursorState as l, OpensteerAgentConfig as m, OpensteerAgentInstance as n, ElementPath as o, SnapshotMode as p, AiResolveCallback as q, AiExtractCallback as r, OpensteerAgentProvider as s, OpensteerAgentAction as t, OpensteerAgentResult as u, OpensteerAgentUsage as v, OpensteerCursorStyle as w, OpensteerCursorConfig as x, OpensteerAgentExecuteOptions as y, OpensteerBrowserConfig as z };
|
|
@@ -342,4 +342,4 @@ interface OpensteerAgentInstance {
|
|
|
342
342
|
execute(instructionOrOptions: string | OpensteerAgentExecuteOptions): Promise<OpensteerAgentResult>;
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
-
export type {
|
|
345
|
+
export type { MatchOperator as $, ActionResult as A, BaseActionOptions as B, CookieParam as C, ActionWaitOptions as D, ExtractOptions as E, FileUploadOptions as F, GotoOptions as G, HoverOptions as H, InputOptions as I, AiExtractArgs as J, AiExtractResult as K, LaunchOptions as L, AiResolveArgs as M, AiResolveCallbackResult as N, OpensteerAuthScheme as O, AiResolveResult as P, AttributeMatchClause as Q, ContextHop as R, SnapshotOptions as S, TabInfo as T, DomPath as U, ExtractSchema as V, ExtractSchemaField as W, ExtractSchemaValue as X, ExtractionFieldPlan as Y, ExtractionPlan as Z, MatchClause as _, OpensteerConfig as a, OpensteerAgentMode as a0, OpensteerAgentModelConfig as a1, OpensteerCloudAnnouncePolicy as a2, OpensteerCloudBrowserProfileOptions as a3, OpensteerCloudConfig as a4, OpensteerCloudOptions as a5, OpensteerCursorColor as a6, OpensteerCursorProfile as a7, OpensteerLocalBrowserMode as a8, OpensteerStorageConfig as a9, PathNode as aa, PathNodePosition as ab, PositionMatchClause as ac, OpensteerLocalProfileDescriptor as b, OpensteerRealBrowserOptions as c, StateResult as d, ScreenshotOptions as e, ClickOptions as f, SelectOptions as g, ScrollOptions as h, BoundingBox as i, ExtractFromPlanOptions as j, ExtractionRunResult as k, OpensteerCursorState as l, OpensteerAgentConfig as m, OpensteerAgentInstance as n, ElementPath as o, SnapshotMode as p, AiResolveCallback as q, AiExtractCallback as r, OpensteerAgentProvider as s, OpensteerAgentAction as t, OpensteerAgentResult as u, OpensteerAgentUsage as v, OpensteerCursorStyle as w, OpensteerCursorConfig as x, OpensteerAgentExecuteOptions as y, OpensteerBrowserConfig as z };
|
package/package.json
CHANGED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { O as OpensteerAuthScheme } from './types-BWItZPl_.cjs';
|
|
2
|
-
|
|
3
|
-
type ActionFailureCode = 'TARGET_NOT_FOUND' | 'TARGET_UNAVAILABLE' | 'TARGET_STALE' | 'TARGET_AMBIGUOUS' | 'BLOCKED_BY_INTERCEPTOR' | 'NOT_VISIBLE' | 'NOT_ENABLED' | 'NOT_EDITABLE' | 'INVALID_TARGET' | 'INVALID_OPTIONS' | 'ACTION_TIMEOUT' | 'UNKNOWN';
|
|
4
|
-
type ActionFailureClassificationSource = 'typed_error' | 'playwright_call_log' | 'dom_probe' | 'message_heuristic' | 'unknown';
|
|
5
|
-
interface ActionFailureBlocker {
|
|
6
|
-
tag: string;
|
|
7
|
-
id: string | null;
|
|
8
|
-
classes: string[];
|
|
9
|
-
role: string | null;
|
|
10
|
-
text: string | null;
|
|
11
|
-
}
|
|
12
|
-
interface ActionFailureDetails {
|
|
13
|
-
blocker?: ActionFailureBlocker;
|
|
14
|
-
observation?: string;
|
|
15
|
-
}
|
|
16
|
-
interface ActionFailure {
|
|
17
|
-
code: ActionFailureCode;
|
|
18
|
-
message: string;
|
|
19
|
-
retryable: boolean;
|
|
20
|
-
classificationSource: ActionFailureClassificationSource;
|
|
21
|
-
details?: ActionFailureDetails;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
type CloudActionMethod = 'goto' | 'snapshot' | 'state' | 'click' | 'dblclick' | 'rightclick' | 'hover' | 'input' | 'select' | 'scroll' | 'tabs' | 'newTab' | 'switchTab' | 'closeTab' | 'getCookies' | 'setCookie' | 'clearCookies' | 'pressKey' | 'type' | 'getElementText' | 'getElementValue' | 'getElementAttributes' | 'getElementBoundingBox' | 'getHtml' | 'getTitle' | 'waitForText' | 'extract' | 'extractFromPlan' | 'clearCache' | 'uploadFile' | 'exportCookies' | 'importCookies' | 'screenshot';
|
|
25
|
-
type CloudErrorCode = 'CLOUD_AUTH_FAILED' | 'CLOUD_SESSION_NOT_FOUND' | 'CLOUD_SESSION_CLOSED' | 'CLOUD_UNSUPPORTED_METHOD' | 'CLOUD_INVALID_REQUEST' | 'CLOUD_MODEL_NOT_ALLOWED' | 'CLOUD_ACTION_FAILED' | 'CLOUD_CAPACITY_EXHAUSTED' | 'CLOUD_RUNTIME_UNAVAILABLE' | 'CLOUD_RUNTIME_MISMATCH' | 'CLOUD_SESSION_STALE' | 'CLOUD_CONTROL_PLANE_ERROR' | 'CLOUD_CONTRACT_MISMATCH' | 'CLOUD_PROXY_UNAVAILABLE' | 'CLOUD_PROXY_REQUIRED' | 'CLOUD_BILLING_LIMIT_REACHED' | 'CLOUD_RATE_LIMITED' | 'CLOUD_BROWSER_PROFILE_NOT_FOUND' | 'CLOUD_BROWSER_PROFILE_BUSY' | 'CLOUD_BROWSER_PROFILE_DISABLED' | 'CLOUD_BROWSER_PROFILE_PROXY_UNAVAILABLE' | 'CLOUD_BROWSER_PROFILE_SYNC_FAILED' | 'CLOUD_INTERNAL';
|
|
26
|
-
declare const cloudSessionContractVersion: "v3";
|
|
27
|
-
type CloudSessionContractVersion = typeof cloudSessionContractVersion;
|
|
28
|
-
type CloudSessionSourceType = 'agent-thread' | 'agent-run' | 'local-cloud' | 'manual';
|
|
29
|
-
interface CloudBrowserProfileLaunchPreference {
|
|
30
|
-
profileId: string;
|
|
31
|
-
reuseIfActive?: boolean;
|
|
32
|
-
}
|
|
33
|
-
interface CloudSessionLaunchConfig {
|
|
34
|
-
browserProfile?: CloudBrowserProfileLaunchPreference;
|
|
35
|
-
}
|
|
36
|
-
interface CloudSessionCreateRequest {
|
|
37
|
-
cloudSessionContractVersion: CloudSessionContractVersion;
|
|
38
|
-
sourceType: 'local-cloud';
|
|
39
|
-
clientSessionHint: string;
|
|
40
|
-
localRunId: string;
|
|
41
|
-
name?: string;
|
|
42
|
-
model?: string;
|
|
43
|
-
launchContext?: Record<string, unknown>;
|
|
44
|
-
launchConfig?: CloudSessionLaunchConfig;
|
|
45
|
-
}
|
|
46
|
-
interface CloudSessionSummary {
|
|
47
|
-
sessionId: string;
|
|
48
|
-
workspaceId: string;
|
|
49
|
-
state: string;
|
|
50
|
-
createdAt: number;
|
|
51
|
-
sourceType: CloudSessionSourceType;
|
|
52
|
-
sourceRef?: string;
|
|
53
|
-
label?: string;
|
|
54
|
-
}
|
|
55
|
-
interface CloudSessionCreateResponse {
|
|
56
|
-
sessionId: string;
|
|
57
|
-
actionWsUrl: string;
|
|
58
|
-
cdpWsUrl: string;
|
|
59
|
-
actionToken: string;
|
|
60
|
-
cdpToken: string;
|
|
61
|
-
expiresAt?: number;
|
|
62
|
-
cloudSessionUrl: string;
|
|
63
|
-
cloudSession: CloudSessionSummary;
|
|
64
|
-
}
|
|
65
|
-
interface CloudSelectorCacheImportEntry {
|
|
66
|
-
namespace: string;
|
|
67
|
-
siteOrigin: string;
|
|
68
|
-
method: string;
|
|
69
|
-
descriptionHash: string;
|
|
70
|
-
path: unknown;
|
|
71
|
-
schemaHash?: string;
|
|
72
|
-
createdAt: number;
|
|
73
|
-
updatedAt: number;
|
|
74
|
-
}
|
|
75
|
-
interface CloudSelectorCacheImportRequest {
|
|
76
|
-
entries: CloudSelectorCacheImportEntry[];
|
|
77
|
-
}
|
|
78
|
-
interface CloudSelectorCacheImportResponse {
|
|
79
|
-
imported: number;
|
|
80
|
-
inserted: number;
|
|
81
|
-
updated: number;
|
|
82
|
-
skipped: number;
|
|
83
|
-
}
|
|
84
|
-
interface CloudActionRequest {
|
|
85
|
-
id: number;
|
|
86
|
-
method: CloudActionMethod;
|
|
87
|
-
args: Record<string, unknown>;
|
|
88
|
-
sessionId: string;
|
|
89
|
-
token: string;
|
|
90
|
-
}
|
|
91
|
-
interface CloudActionSuccess {
|
|
92
|
-
id: number;
|
|
93
|
-
ok: true;
|
|
94
|
-
result: unknown;
|
|
95
|
-
}
|
|
96
|
-
interface CloudActionFailure {
|
|
97
|
-
id: number;
|
|
98
|
-
ok: false;
|
|
99
|
-
error: string;
|
|
100
|
-
code: CloudErrorCode;
|
|
101
|
-
details?: CloudActionFailureDetails;
|
|
102
|
-
}
|
|
103
|
-
type CloudActionResponse = CloudActionSuccess | CloudActionFailure;
|
|
104
|
-
interface CloudActionFailureDetails {
|
|
105
|
-
actionFailure?: ActionFailure;
|
|
106
|
-
}
|
|
107
|
-
type BrowserProfileStatus = 'active' | 'archived' | 'error';
|
|
108
|
-
type BrowserProfileProxyPolicy = 'strict_sticky';
|
|
109
|
-
type CloudFingerprintMode = 'off' | 'auto';
|
|
110
|
-
type BrowserProfileArchiveFormat = 'tar.gz';
|
|
111
|
-
interface BrowserProfileDescriptor {
|
|
112
|
-
profileId: string;
|
|
113
|
-
teamId: string;
|
|
114
|
-
ownerUserId: string;
|
|
115
|
-
name: string;
|
|
116
|
-
status: BrowserProfileStatus;
|
|
117
|
-
proxyPolicy: BrowserProfileProxyPolicy;
|
|
118
|
-
stickyProxyId?: string;
|
|
119
|
-
proxyCountryCode?: string;
|
|
120
|
-
proxyRegion?: string;
|
|
121
|
-
proxyCity?: string;
|
|
122
|
-
fingerprintMode: CloudFingerprintMode;
|
|
123
|
-
fingerprintHash?: string;
|
|
124
|
-
activeSessionId?: string;
|
|
125
|
-
lastSessionId?: string;
|
|
126
|
-
lastLaunchedAt?: number;
|
|
127
|
-
latestRevision?: number;
|
|
128
|
-
latestStorageId?: string;
|
|
129
|
-
latestSizeBytes?: number;
|
|
130
|
-
latestArchiveSha256?: string;
|
|
131
|
-
latestArchiveFormat?: BrowserProfileArchiveFormat;
|
|
132
|
-
createdAt: number;
|
|
133
|
-
updatedAt: number;
|
|
134
|
-
lastError?: string;
|
|
135
|
-
}
|
|
136
|
-
interface BrowserProfileListResponse {
|
|
137
|
-
profiles: BrowserProfileDescriptor[];
|
|
138
|
-
nextCursor?: string;
|
|
139
|
-
}
|
|
140
|
-
interface BrowserProfileCreateRequest {
|
|
141
|
-
name: string;
|
|
142
|
-
proxy?: {
|
|
143
|
-
proxyId?: string;
|
|
144
|
-
countryCode?: string;
|
|
145
|
-
region?: string;
|
|
146
|
-
city?: string;
|
|
147
|
-
};
|
|
148
|
-
fingerprint?: {
|
|
149
|
-
mode?: CloudFingerprintMode;
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
interface BrowserProfileListRequest {
|
|
154
|
-
cursor?: string;
|
|
155
|
-
limit?: number;
|
|
156
|
-
status?: BrowserProfileStatus;
|
|
157
|
-
}
|
|
158
|
-
declare class BrowserProfileClient {
|
|
159
|
-
private readonly baseUrl;
|
|
160
|
-
private readonly key;
|
|
161
|
-
private readonly authScheme;
|
|
162
|
-
constructor(baseUrl: string, key: string, authScheme?: OpensteerAuthScheme);
|
|
163
|
-
list(request?: BrowserProfileListRequest): Promise<BrowserProfileListResponse>;
|
|
164
|
-
get(profileId: string): Promise<BrowserProfileDescriptor>;
|
|
165
|
-
create(request: BrowserProfileCreateRequest): Promise<BrowserProfileDescriptor>;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export { type ActionFailure as A, type BrowserProfileStatus as B, type CloudErrorCode as C, type CloudSessionSourceType as D, type CloudSessionSummary as E, cloudSessionContractVersion as F, type BrowserProfileListRequest as a, type BrowserProfileListResponse as b, type BrowserProfileCreateRequest as c, type BrowserProfileDescriptor as d, type ActionFailureCode as e, type CloudActionFailureDetails as f, type CloudSessionCreateRequest as g, type CloudSessionCreateResponse as h, type CloudSelectorCacheImportRequest as i, type CloudSelectorCacheImportResponse as j, type CloudActionMethod as k, type CloudSelectorCacheImportEntry as l, type ActionFailureBlocker as m, type ActionFailureClassificationSource as n, type ActionFailureDetails as o, type BrowserProfileArchiveFormat as p, BrowserProfileClient as q, type BrowserProfileProxyPolicy as r, type CloudActionFailure as s, type CloudActionRequest as t, type CloudActionResponse as u, type CloudActionSuccess as v, type CloudBrowserProfileLaunchPreference as w, type CloudFingerprintMode as x, type CloudSessionContractVersion as y, type CloudSessionLaunchConfig as z };
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { O as OpensteerAuthScheme } from './types-BWItZPl_.js';
|
|
2
|
-
|
|
3
|
-
type ActionFailureCode = 'TARGET_NOT_FOUND' | 'TARGET_UNAVAILABLE' | 'TARGET_STALE' | 'TARGET_AMBIGUOUS' | 'BLOCKED_BY_INTERCEPTOR' | 'NOT_VISIBLE' | 'NOT_ENABLED' | 'NOT_EDITABLE' | 'INVALID_TARGET' | 'INVALID_OPTIONS' | 'ACTION_TIMEOUT' | 'UNKNOWN';
|
|
4
|
-
type ActionFailureClassificationSource = 'typed_error' | 'playwright_call_log' | 'dom_probe' | 'message_heuristic' | 'unknown';
|
|
5
|
-
interface ActionFailureBlocker {
|
|
6
|
-
tag: string;
|
|
7
|
-
id: string | null;
|
|
8
|
-
classes: string[];
|
|
9
|
-
role: string | null;
|
|
10
|
-
text: string | null;
|
|
11
|
-
}
|
|
12
|
-
interface ActionFailureDetails {
|
|
13
|
-
blocker?: ActionFailureBlocker;
|
|
14
|
-
observation?: string;
|
|
15
|
-
}
|
|
16
|
-
interface ActionFailure {
|
|
17
|
-
code: ActionFailureCode;
|
|
18
|
-
message: string;
|
|
19
|
-
retryable: boolean;
|
|
20
|
-
classificationSource: ActionFailureClassificationSource;
|
|
21
|
-
details?: ActionFailureDetails;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
type CloudActionMethod = 'goto' | 'snapshot' | 'state' | 'click' | 'dblclick' | 'rightclick' | 'hover' | 'input' | 'select' | 'scroll' | 'tabs' | 'newTab' | 'switchTab' | 'closeTab' | 'getCookies' | 'setCookie' | 'clearCookies' | 'pressKey' | 'type' | 'getElementText' | 'getElementValue' | 'getElementAttributes' | 'getElementBoundingBox' | 'getHtml' | 'getTitle' | 'waitForText' | 'extract' | 'extractFromPlan' | 'clearCache' | 'uploadFile' | 'exportCookies' | 'importCookies' | 'screenshot';
|
|
25
|
-
type CloudErrorCode = 'CLOUD_AUTH_FAILED' | 'CLOUD_SESSION_NOT_FOUND' | 'CLOUD_SESSION_CLOSED' | 'CLOUD_UNSUPPORTED_METHOD' | 'CLOUD_INVALID_REQUEST' | 'CLOUD_MODEL_NOT_ALLOWED' | 'CLOUD_ACTION_FAILED' | 'CLOUD_CAPACITY_EXHAUSTED' | 'CLOUD_RUNTIME_UNAVAILABLE' | 'CLOUD_RUNTIME_MISMATCH' | 'CLOUD_SESSION_STALE' | 'CLOUD_CONTROL_PLANE_ERROR' | 'CLOUD_CONTRACT_MISMATCH' | 'CLOUD_PROXY_UNAVAILABLE' | 'CLOUD_PROXY_REQUIRED' | 'CLOUD_BILLING_LIMIT_REACHED' | 'CLOUD_RATE_LIMITED' | 'CLOUD_BROWSER_PROFILE_NOT_FOUND' | 'CLOUD_BROWSER_PROFILE_BUSY' | 'CLOUD_BROWSER_PROFILE_DISABLED' | 'CLOUD_BROWSER_PROFILE_PROXY_UNAVAILABLE' | 'CLOUD_BROWSER_PROFILE_SYNC_FAILED' | 'CLOUD_INTERNAL';
|
|
26
|
-
declare const cloudSessionContractVersion: "v3";
|
|
27
|
-
type CloudSessionContractVersion = typeof cloudSessionContractVersion;
|
|
28
|
-
type CloudSessionSourceType = 'agent-thread' | 'agent-run' | 'local-cloud' | 'manual';
|
|
29
|
-
interface CloudBrowserProfileLaunchPreference {
|
|
30
|
-
profileId: string;
|
|
31
|
-
reuseIfActive?: boolean;
|
|
32
|
-
}
|
|
33
|
-
interface CloudSessionLaunchConfig {
|
|
34
|
-
browserProfile?: CloudBrowserProfileLaunchPreference;
|
|
35
|
-
}
|
|
36
|
-
interface CloudSessionCreateRequest {
|
|
37
|
-
cloudSessionContractVersion: CloudSessionContractVersion;
|
|
38
|
-
sourceType: 'local-cloud';
|
|
39
|
-
clientSessionHint: string;
|
|
40
|
-
localRunId: string;
|
|
41
|
-
name?: string;
|
|
42
|
-
model?: string;
|
|
43
|
-
launchContext?: Record<string, unknown>;
|
|
44
|
-
launchConfig?: CloudSessionLaunchConfig;
|
|
45
|
-
}
|
|
46
|
-
interface CloudSessionSummary {
|
|
47
|
-
sessionId: string;
|
|
48
|
-
workspaceId: string;
|
|
49
|
-
state: string;
|
|
50
|
-
createdAt: number;
|
|
51
|
-
sourceType: CloudSessionSourceType;
|
|
52
|
-
sourceRef?: string;
|
|
53
|
-
label?: string;
|
|
54
|
-
}
|
|
55
|
-
interface CloudSessionCreateResponse {
|
|
56
|
-
sessionId: string;
|
|
57
|
-
actionWsUrl: string;
|
|
58
|
-
cdpWsUrl: string;
|
|
59
|
-
actionToken: string;
|
|
60
|
-
cdpToken: string;
|
|
61
|
-
expiresAt?: number;
|
|
62
|
-
cloudSessionUrl: string;
|
|
63
|
-
cloudSession: CloudSessionSummary;
|
|
64
|
-
}
|
|
65
|
-
interface CloudSelectorCacheImportEntry {
|
|
66
|
-
namespace: string;
|
|
67
|
-
siteOrigin: string;
|
|
68
|
-
method: string;
|
|
69
|
-
descriptionHash: string;
|
|
70
|
-
path: unknown;
|
|
71
|
-
schemaHash?: string;
|
|
72
|
-
createdAt: number;
|
|
73
|
-
updatedAt: number;
|
|
74
|
-
}
|
|
75
|
-
interface CloudSelectorCacheImportRequest {
|
|
76
|
-
entries: CloudSelectorCacheImportEntry[];
|
|
77
|
-
}
|
|
78
|
-
interface CloudSelectorCacheImportResponse {
|
|
79
|
-
imported: number;
|
|
80
|
-
inserted: number;
|
|
81
|
-
updated: number;
|
|
82
|
-
skipped: number;
|
|
83
|
-
}
|
|
84
|
-
interface CloudActionRequest {
|
|
85
|
-
id: number;
|
|
86
|
-
method: CloudActionMethod;
|
|
87
|
-
args: Record<string, unknown>;
|
|
88
|
-
sessionId: string;
|
|
89
|
-
token: string;
|
|
90
|
-
}
|
|
91
|
-
interface CloudActionSuccess {
|
|
92
|
-
id: number;
|
|
93
|
-
ok: true;
|
|
94
|
-
result: unknown;
|
|
95
|
-
}
|
|
96
|
-
interface CloudActionFailure {
|
|
97
|
-
id: number;
|
|
98
|
-
ok: false;
|
|
99
|
-
error: string;
|
|
100
|
-
code: CloudErrorCode;
|
|
101
|
-
details?: CloudActionFailureDetails;
|
|
102
|
-
}
|
|
103
|
-
type CloudActionResponse = CloudActionSuccess | CloudActionFailure;
|
|
104
|
-
interface CloudActionFailureDetails {
|
|
105
|
-
actionFailure?: ActionFailure;
|
|
106
|
-
}
|
|
107
|
-
type BrowserProfileStatus = 'active' | 'archived' | 'error';
|
|
108
|
-
type BrowserProfileProxyPolicy = 'strict_sticky';
|
|
109
|
-
type CloudFingerprintMode = 'off' | 'auto';
|
|
110
|
-
type BrowserProfileArchiveFormat = 'tar.gz';
|
|
111
|
-
interface BrowserProfileDescriptor {
|
|
112
|
-
profileId: string;
|
|
113
|
-
teamId: string;
|
|
114
|
-
ownerUserId: string;
|
|
115
|
-
name: string;
|
|
116
|
-
status: BrowserProfileStatus;
|
|
117
|
-
proxyPolicy: BrowserProfileProxyPolicy;
|
|
118
|
-
stickyProxyId?: string;
|
|
119
|
-
proxyCountryCode?: string;
|
|
120
|
-
proxyRegion?: string;
|
|
121
|
-
proxyCity?: string;
|
|
122
|
-
fingerprintMode: CloudFingerprintMode;
|
|
123
|
-
fingerprintHash?: string;
|
|
124
|
-
activeSessionId?: string;
|
|
125
|
-
lastSessionId?: string;
|
|
126
|
-
lastLaunchedAt?: number;
|
|
127
|
-
latestRevision?: number;
|
|
128
|
-
latestStorageId?: string;
|
|
129
|
-
latestSizeBytes?: number;
|
|
130
|
-
latestArchiveSha256?: string;
|
|
131
|
-
latestArchiveFormat?: BrowserProfileArchiveFormat;
|
|
132
|
-
createdAt: number;
|
|
133
|
-
updatedAt: number;
|
|
134
|
-
lastError?: string;
|
|
135
|
-
}
|
|
136
|
-
interface BrowserProfileListResponse {
|
|
137
|
-
profiles: BrowserProfileDescriptor[];
|
|
138
|
-
nextCursor?: string;
|
|
139
|
-
}
|
|
140
|
-
interface BrowserProfileCreateRequest {
|
|
141
|
-
name: string;
|
|
142
|
-
proxy?: {
|
|
143
|
-
proxyId?: string;
|
|
144
|
-
countryCode?: string;
|
|
145
|
-
region?: string;
|
|
146
|
-
city?: string;
|
|
147
|
-
};
|
|
148
|
-
fingerprint?: {
|
|
149
|
-
mode?: CloudFingerprintMode;
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
interface BrowserProfileListRequest {
|
|
154
|
-
cursor?: string;
|
|
155
|
-
limit?: number;
|
|
156
|
-
status?: BrowserProfileStatus;
|
|
157
|
-
}
|
|
158
|
-
declare class BrowserProfileClient {
|
|
159
|
-
private readonly baseUrl;
|
|
160
|
-
private readonly key;
|
|
161
|
-
private readonly authScheme;
|
|
162
|
-
constructor(baseUrl: string, key: string, authScheme?: OpensteerAuthScheme);
|
|
163
|
-
list(request?: BrowserProfileListRequest): Promise<BrowserProfileListResponse>;
|
|
164
|
-
get(profileId: string): Promise<BrowserProfileDescriptor>;
|
|
165
|
-
create(request: BrowserProfileCreateRequest): Promise<BrowserProfileDescriptor>;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export { type ActionFailure as A, type BrowserProfileStatus as B, type CloudErrorCode as C, type CloudSessionSourceType as D, type CloudSessionSummary as E, cloudSessionContractVersion as F, type BrowserProfileListRequest as a, type BrowserProfileListResponse as b, type BrowserProfileCreateRequest as c, type BrowserProfileDescriptor as d, type ActionFailureCode as e, type CloudActionFailureDetails as f, type CloudSessionCreateRequest as g, type CloudSessionCreateResponse as h, type CloudSelectorCacheImportRequest as i, type CloudSelectorCacheImportResponse as j, type CloudActionMethod as k, type CloudSelectorCacheImportEntry as l, type ActionFailureBlocker as m, type ActionFailureClassificationSource as n, type ActionFailureDetails as o, type BrowserProfileArchiveFormat as p, BrowserProfileClient as q, type BrowserProfileProxyPolicy as r, type CloudActionFailure as s, type CloudActionRequest as t, type CloudActionResponse as u, type CloudActionSuccess as v, type CloudBrowserProfileLaunchPreference as w, type CloudFingerprintMode as x, type CloudSessionContractVersion as y, type CloudSessionLaunchConfig as z };
|