opensteer 0.8.14 → 0.8.15

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.d.cts CHANGED
@@ -1440,8 +1440,8 @@ interface CloudSessionRecordingState {
1440
1440
  interface CloudSelectorCacheImportEntry {
1441
1441
  readonly workspace: string;
1442
1442
  readonly method: string;
1443
- readonly nameHash: string;
1444
- readonly name?: string;
1443
+ readonly persistHash: string;
1444
+ readonly persist?: string;
1445
1445
  readonly path: unknown;
1446
1446
  readonly schemaHash?: string;
1447
1447
  readonly createdAt: number;
@@ -1832,7 +1832,7 @@ interface OpensteerTargetByElement {
1832
1832
  }
1833
1833
  interface OpensteerTargetByPersist {
1834
1834
  readonly kind: "persist";
1835
- readonly name: string;
1835
+ readonly persist: string;
1836
1836
  }
1837
1837
  interface OpensteerTargetBySelector {
1838
1838
  readonly kind: "selector";
@@ -1856,7 +1856,6 @@ interface OpensteerActionResult {
1856
1856
  readonly x: number;
1857
1857
  readonly y: number;
1858
1858
  };
1859
- readonly persisted?: string;
1860
1859
  }
1861
1860
  interface OpensteerSnapshotCounter {
1862
1861
  readonly element: number;
@@ -3393,7 +3392,7 @@ type ElementPath = ReplayElementPath;
3393
3392
  interface DomDescriptorPayload {
3394
3393
  readonly kind: "dom-target";
3395
3394
  readonly method: string;
3396
- readonly name: string;
3395
+ readonly persist: string;
3397
3396
  readonly path: ReplayElementPath;
3398
3397
  readonly sourceUrl?: string;
3399
3398
  }
@@ -3407,7 +3406,7 @@ interface DomDescriptorRecord {
3407
3406
  }
3408
3407
  interface DescriptorTargetRef {
3409
3408
  readonly kind: "descriptor";
3410
- readonly name: string;
3409
+ readonly persist: string;
3411
3410
  }
3412
3411
  interface LiveTargetRef {
3413
3412
  readonly kind: "live";
@@ -3459,7 +3458,7 @@ interface DomResolveTargetInput {
3459
3458
  }
3460
3459
  interface DomWriteDescriptorInput {
3461
3460
  readonly method: string;
3462
- readonly name: string;
3461
+ readonly persist: string;
3463
3462
  readonly path: ReplayElementPath;
3464
3463
  readonly sourceUrl?: string;
3465
3464
  readonly createdAt?: number;
@@ -3467,7 +3466,7 @@ interface DomWriteDescriptorInput {
3467
3466
  }
3468
3467
  interface DomReadDescriptorInput {
3469
3468
  readonly method: string;
3470
- readonly name: string;
3469
+ readonly persist: string;
3471
3470
  }
3472
3471
  interface DomActionOutcome {
3473
3472
  readonly resolved: ResolvedDomTarget;
@@ -3567,11 +3566,11 @@ declare function createDomDescriptorStore(options: {
3567
3566
  readonly root?: FilesystemOpensteerWorkspace;
3568
3567
  readonly namespace?: string;
3569
3568
  }): DomDescriptorStore;
3570
- declare function hashDomDescriptorName(name: string): string;
3569
+ declare function hashDomDescriptorPersist(persist: string): string;
3571
3570
  declare function buildDomDescriptorKey(options: {
3572
3571
  readonly namespace?: string;
3573
3572
  readonly method: string;
3574
- readonly name: string;
3573
+ readonly persist: string;
3575
3574
  }): string;
3576
3575
  declare function buildDomDescriptorPayload(input: DomWriteDescriptorInput): DomDescriptorPayload;
3577
3576
  declare function buildDomDescriptorVersion(payload: DomDescriptorPayload): string;
@@ -3915,10 +3914,13 @@ interface OpensteerScrollOptions extends OpensteerTargetOptions {
3915
3914
  readonly direction: "up" | "down" | "left" | "right";
3916
3915
  readonly amount: number;
3917
3916
  }
3918
- interface OpensteerExtractOptions {
3917
+ type OpensteerExtractOptions = {
3919
3918
  readonly persist: string;
3920
3919
  readonly schema?: Record<string, unknown>;
3921
- }
3920
+ } | {
3921
+ readonly persist?: string;
3922
+ readonly schema: Record<string, unknown>;
3923
+ };
3922
3924
  interface OpensteerWaitForNetworkOptions extends OpensteerNetworkQueryInput {
3923
3925
  readonly timeoutMs?: number;
3924
3926
  readonly pollIntervalMs?: number;
@@ -4296,4 +4298,4 @@ declare function discoverLocalCdpBrowsers(input?: {
4296
4298
  readonly timeoutMs?: number;
4297
4299
  }): Promise<readonly LocalCdpBrowserCandidate[]>;
4298
4300
 
4299
- export { type AnchorTargetRef, type AppendTraceEntryInput, type ArtifactManifest, type ArtifactPayloadType, type ArtifactScope, type BrowserProfileArchiveFormat, type BrowserProfileCreateRequest, type BrowserProfileDescriptor, type BrowserProfileImportCreateRequest, type BrowserProfileImportCreateResponse, type BrowserProfileImportDescriptor, type BrowserProfileImportStatus, type BrowserProfileListResponse, type BrowserProfileStatus, type CloudBrowserContextConfig, type CloudBrowserExtensionConfig, type CloudBrowserLaunchConfig, type CloudBrowserProfileLaunchPreference, type CloudBrowserProfilePreference, type CloudFingerprintMode, type CloudFingerprintPreference, type CloudGeolocation, type CloudProxyMode, type CloudProxyPreference, type CloudProxyProtocol, type CloudRegistryImportEntry, type CloudRegistryImportRequest, type CloudRegistryImportResponse, type CloudRequestPlanImportEntry, type CloudRequestPlanImportRequest, type CloudSelectorCacheImportEntry, type CloudSelectorCacheImportRequest, type CloudSelectorCacheImportResponse, type CloudSessionLaunchConfig, CloudSessionProxy, type CloudSessionProxyOptions, type CloudSessionSourceType, type CloudSessionStatus, type CloudSessionSummary, type CloudSessionVisibilityScope, type CloudViewport, type ContextHop, type CreateFilesystemOpensteerWorkspaceOptions, type CreateTraceRunInput, DEFAULT_OPENSTEER_ENGINE, DEFERRED_MATCH_ATTR_KEYS, type DescriptorRecord, type DescriptorRegistryStore, type DomActionBridge, type DomActionBridgeProvider, type DomActionOutcome, type DomActionPolicyOperation, type DomActionScrollAlignment, type DomActionScrollOptions, type DomActionSettleOptions, type DomActionTargetInspection, type DomArrayFieldSelector, type DomArrayRowMetadata, type DomArraySelector, type DomBuildPathInput, type DomClickInput, type DomDescriptorPayload, type DomDescriptorRecord, type DomDescriptorStore, type DomExtractArrayRowsInput, type DomExtractFieldSelector, type DomExtractFieldsInput, type DomExtractedArrayRow, type DomHoverInput, type DomInputInput, type DomPath, type DomReadDescriptorInput, type DomResolveTargetInput, type DomRuntime, type DomScrollInput, type DomTargetRef, type DomWriteDescriptorInput, type ElementPath, ElementPathError, type FallbackDecision, type FallbackEvaluationInput, type FallbackPolicy, FilesystemArtifactStore, type FilesystemObservationStore, type FilesystemOpensteerWorkspace, type InspectedCdpEndpoint, type InteractionTraceRecord, type InteractionTraceRegistryStore, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type ListObservationArtifactsInput, type ListObservationEventsInput, type LocalCdpBrowserCandidate, type LocalChromeProfileDescriptor, MATCH_ATTRIBUTE_PRIORITY, type MatchClause, OPENSTEER_DOM_ACTION_BRIDGE_SYMBOL, OPENSTEER_ENGINE_NAMES, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, Opensteer, type OpensteerAddInitScriptOptions, type OpensteerArtifactStore, OpensteerAttachAmbiguousError, type OpensteerBrowserCloneOptions, type OpensteerBrowserController, OpensteerBrowserManager, type OpensteerBrowserManagerOptions, type OpensteerBrowserState, type OpensteerBrowserStatus, type OpensteerClickOptions, OpensteerCloudClient, type OpensteerCloudConfig, type OpensteerCloudProviderOptions, type OpensteerCloudSessionCreateInput, type OpensteerCloudSessionDescriptor, type OpensteerComputerExecuteOptions, type OpensteerCookieJar, type OpensteerDisconnectableRuntime, type OpensteerDomController, type OpensteerEngineName, type OpensteerExtractOptions, type OpensteerExtractionDescriptorPayload, type OpensteerExtractionDescriptorRecord, type OpensteerExtractionDescriptorStore, type OpensteerFetchOptions, type OpensteerFetchedRouteResponse, type OpensteerGotoOptions, type OpensteerInputOptions, type OpensteerInterceptScriptOptions, type OpensteerLiveSessionProvider, type OpensteerLocalProviderOptions, type OpensteerNetworkController, type OpensteerNetworkDetailResult, type OpensteerNetworkQueryOptions, type OpensteerNetworkQueryResult, type OpensteerNetworkReplayOptions, type OpensteerNetworkReplayResult, type OpensteerOptions, type OpensteerPolicy, type OpensteerProviderMode, type OpensteerProviderOptions, type OpensteerProviderSource, type OpensteerResolvedProvider, type OpensteerRouteHandlerResult, type OpensteerRouteOptions, type OpensteerRouteRegistration, OpensteerRuntime, type OpensteerRuntimeOptions, type OpensteerScrollOptions, type OpensteerSemanticRuntime, OpensteerSessionRuntime, type OpensteerSessionRuntimeOptions, type OpensteerStorageMap, type OpensteerTargetOptions, type OpensteerTraceStore, type OpensteerWaitForNetworkOptions, type OpensteerWaitForPageOptions, type OpensteerWorkspaceManifest, type PathNode, type PersistedCloudSessionRecord, type PersistedLocalBrowserSessionRecord, type PersistedSessionRecord, type ProtocolArtifactDelivery, type RegistryProvenance, type RegistryRecord, type ReplayElementPath, type ResolveRegistryRecordInput, type ResolvedDomTarget, type RetryDecision, type RetryEvaluationInput, type RetryPolicy, STABLE_PRIMARY_ATTR_KEYS, type SavedNetworkQueryInput, type SavedNetworkStore, type SettleContext, type SettleDelayInput, type SettleObserver, type SettlePolicy, type SettleTrigger, type StoredArtifactPayload, type StoredArtifactRecord, type StructuralElementAnchor, type StructuredArtifactKind, type SyncBrowserProfileCookiesInput, type TimeoutExecutionContext, type TimeoutPolicy, type TimeoutResolutionInput, type TraceEntryRecord, type TraceRunManifest, type WorkspaceBrowserBootstrap, type WorkspaceBrowserManifest, type WorkspaceLiveBrowserRecord, type WriteBinaryArtifactInput, type WriteDescriptorInput, type WriteInteractionTraceInput, type WriteStructuredArtifactInput, assertProviderSupportsEngine, buildArrayFieldPathCandidates, buildDomDescriptorKey, buildDomDescriptorPayload, buildDomDescriptorVersion, buildPathCandidates, buildPathSelectorHint, buildSegmentSelector, clearPersistedSessionRecord, cloneElementPath, cloneReplayElementPath, cloneStructuralElementAnchor, createArtifactStore, createDomDescriptorStore, createDomRuntime, createFilesystemOpensteerWorkspace, createObservationStore, createOpensteerExtractionDescriptorStore, createOpensteerSemanticRuntime, defaultFallbackPolicy, defaultPolicy, defaultRetryPolicy, defaultSettlePolicy, defaultTimeoutPolicy, delayWithSignal, discoverLocalCdpBrowsers, dispatchSemanticOperation, hashDomDescriptorName, inspectCdpEndpoint, isCurrentUrlField, isValidCssAttributeKey, listLocalChromeProfiles, manifestToExternalBinaryLocation, normalizeExtractedValue, normalizeObservabilityConfig, normalizeOpensteerEngineName, normalizeOpensteerProviderMode, normalizeWorkspaceId, parseDomDescriptorRecord, parseExtractionDescriptorRecord, readPersistedCloudSessionRecord, readPersistedLocalBrowserSessionRecord, readPersistedSessionRecord, resolveCloudConfig, resolveCloudSessionRecordPath, resolveDomActionBridge, resolveExtractedValueInContext, resolveFilesystemWorkspacePath, resolveLiveSessionRecordPath, resolveLocalSessionRecordPath, resolveOpensteerEngineName, resolveOpensteerProvider, resolveOpensteerRuntimeConfig, runWithPolicyTimeout, sanitizeElementPath, sanitizeReplayElementPath, sanitizeStructuralElementAnchor, settleWithPolicy, shouldKeepAttributeForPath, writePersistedSessionRecord };
4301
+ export { type AnchorTargetRef, type AppendTraceEntryInput, type ArtifactManifest, type ArtifactPayloadType, type ArtifactScope, type BrowserProfileArchiveFormat, type BrowserProfileCreateRequest, type BrowserProfileDescriptor, type BrowserProfileImportCreateRequest, type BrowserProfileImportCreateResponse, type BrowserProfileImportDescriptor, type BrowserProfileImportStatus, type BrowserProfileListResponse, type BrowserProfileStatus, type CloudBrowserContextConfig, type CloudBrowserExtensionConfig, type CloudBrowserLaunchConfig, type CloudBrowserProfileLaunchPreference, type CloudBrowserProfilePreference, type CloudFingerprintMode, type CloudFingerprintPreference, type CloudGeolocation, type CloudProxyMode, type CloudProxyPreference, type CloudProxyProtocol, type CloudRegistryImportEntry, type CloudRegistryImportRequest, type CloudRegistryImportResponse, type CloudRequestPlanImportEntry, type CloudRequestPlanImportRequest, type CloudSelectorCacheImportEntry, type CloudSelectorCacheImportRequest, type CloudSelectorCacheImportResponse, type CloudSessionLaunchConfig, CloudSessionProxy, type CloudSessionProxyOptions, type CloudSessionSourceType, type CloudSessionStatus, type CloudSessionSummary, type CloudSessionVisibilityScope, type CloudViewport, type ContextHop, type CreateFilesystemOpensteerWorkspaceOptions, type CreateTraceRunInput, DEFAULT_OPENSTEER_ENGINE, DEFERRED_MATCH_ATTR_KEYS, type DescriptorRecord, type DescriptorRegistryStore, type DomActionBridge, type DomActionBridgeProvider, type DomActionOutcome, type DomActionPolicyOperation, type DomActionScrollAlignment, type DomActionScrollOptions, type DomActionSettleOptions, type DomActionTargetInspection, type DomArrayFieldSelector, type DomArrayRowMetadata, type DomArraySelector, type DomBuildPathInput, type DomClickInput, type DomDescriptorPayload, type DomDescriptorRecord, type DomDescriptorStore, type DomExtractArrayRowsInput, type DomExtractFieldSelector, type DomExtractFieldsInput, type DomExtractedArrayRow, type DomHoverInput, type DomInputInput, type DomPath, type DomReadDescriptorInput, type DomResolveTargetInput, type DomRuntime, type DomScrollInput, type DomTargetRef, type DomWriteDescriptorInput, type ElementPath, ElementPathError, type FallbackDecision, type FallbackEvaluationInput, type FallbackPolicy, FilesystemArtifactStore, type FilesystemObservationStore, type FilesystemOpensteerWorkspace, type InspectedCdpEndpoint, type InteractionTraceRecord, type InteractionTraceRegistryStore, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type ListObservationArtifactsInput, type ListObservationEventsInput, type LocalCdpBrowserCandidate, type LocalChromeProfileDescriptor, MATCH_ATTRIBUTE_PRIORITY, type MatchClause, OPENSTEER_DOM_ACTION_BRIDGE_SYMBOL, OPENSTEER_ENGINE_NAMES, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, Opensteer, type OpensteerAddInitScriptOptions, type OpensteerArtifactStore, OpensteerAttachAmbiguousError, type OpensteerBrowserCloneOptions, type OpensteerBrowserController, OpensteerBrowserManager, type OpensteerBrowserManagerOptions, type OpensteerBrowserState, type OpensteerBrowserStatus, type OpensteerClickOptions, OpensteerCloudClient, type OpensteerCloudConfig, type OpensteerCloudProviderOptions, type OpensteerCloudSessionCreateInput, type OpensteerCloudSessionDescriptor, type OpensteerComputerExecuteOptions, type OpensteerCookieJar, type OpensteerDisconnectableRuntime, type OpensteerDomController, type OpensteerEngineName, type OpensteerExtractOptions, type OpensteerExtractionDescriptorPayload, type OpensteerExtractionDescriptorRecord, type OpensteerExtractionDescriptorStore, type OpensteerFetchOptions, type OpensteerFetchedRouteResponse, type OpensteerGotoOptions, type OpensteerInputOptions, type OpensteerInterceptScriptOptions, type OpensteerLiveSessionProvider, type OpensteerLocalProviderOptions, type OpensteerNetworkController, type OpensteerNetworkDetailResult, type OpensteerNetworkQueryOptions, type OpensteerNetworkQueryResult, type OpensteerNetworkReplayOptions, type OpensteerNetworkReplayResult, type OpensteerOptions, type OpensteerPolicy, type OpensteerProviderMode, type OpensteerProviderOptions, type OpensteerProviderSource, type OpensteerResolvedProvider, type OpensteerRouteHandlerResult, type OpensteerRouteOptions, type OpensteerRouteRegistration, OpensteerRuntime, type OpensteerRuntimeOptions, type OpensteerScrollOptions, type OpensteerSemanticRuntime, OpensteerSessionRuntime, type OpensteerSessionRuntimeOptions, type OpensteerStorageMap, type OpensteerTargetOptions, type OpensteerTraceStore, type OpensteerWaitForNetworkOptions, type OpensteerWaitForPageOptions, type OpensteerWorkspaceManifest, type PathNode, type PersistedCloudSessionRecord, type PersistedLocalBrowserSessionRecord, type PersistedSessionRecord, type ProtocolArtifactDelivery, type RegistryProvenance, type RegistryRecord, type ReplayElementPath, type ResolveRegistryRecordInput, type ResolvedDomTarget, type RetryDecision, type RetryEvaluationInput, type RetryPolicy, STABLE_PRIMARY_ATTR_KEYS, type SavedNetworkQueryInput, type SavedNetworkStore, type SettleContext, type SettleDelayInput, type SettleObserver, type SettlePolicy, type SettleTrigger, type StoredArtifactPayload, type StoredArtifactRecord, type StructuralElementAnchor, type StructuredArtifactKind, type SyncBrowserProfileCookiesInput, type TimeoutExecutionContext, type TimeoutPolicy, type TimeoutResolutionInput, type TraceEntryRecord, type TraceRunManifest, type WorkspaceBrowserBootstrap, type WorkspaceBrowserManifest, type WorkspaceLiveBrowserRecord, type WriteBinaryArtifactInput, type WriteDescriptorInput, type WriteInteractionTraceInput, type WriteStructuredArtifactInput, assertProviderSupportsEngine, buildArrayFieldPathCandidates, buildDomDescriptorKey, buildDomDescriptorPayload, buildDomDescriptorVersion, buildPathCandidates, buildPathSelectorHint, buildSegmentSelector, clearPersistedSessionRecord, cloneElementPath, cloneReplayElementPath, cloneStructuralElementAnchor, createArtifactStore, createDomDescriptorStore, createDomRuntime, createFilesystemOpensteerWorkspace, createObservationStore, createOpensteerExtractionDescriptorStore, createOpensteerSemanticRuntime, defaultFallbackPolicy, defaultPolicy, defaultRetryPolicy, defaultSettlePolicy, defaultTimeoutPolicy, delayWithSignal, discoverLocalCdpBrowsers, dispatchSemanticOperation, hashDomDescriptorPersist, inspectCdpEndpoint, isCurrentUrlField, isValidCssAttributeKey, listLocalChromeProfiles, manifestToExternalBinaryLocation, normalizeExtractedValue, normalizeObservabilityConfig, normalizeOpensteerEngineName, normalizeOpensteerProviderMode, normalizeWorkspaceId, parseDomDescriptorRecord, parseExtractionDescriptorRecord, readPersistedCloudSessionRecord, readPersistedLocalBrowserSessionRecord, readPersistedSessionRecord, resolveCloudConfig, resolveCloudSessionRecordPath, resolveDomActionBridge, resolveExtractedValueInContext, resolveFilesystemWorkspacePath, resolveLiveSessionRecordPath, resolveLocalSessionRecordPath, resolveOpensteerEngineName, resolveOpensteerProvider, resolveOpensteerRuntimeConfig, runWithPolicyTimeout, sanitizeElementPath, sanitizeReplayElementPath, sanitizeStructuralElementAnchor, settleWithPolicy, shouldKeepAttributeForPath, writePersistedSessionRecord };
package/dist/index.d.ts CHANGED
@@ -1440,8 +1440,8 @@ interface CloudSessionRecordingState {
1440
1440
  interface CloudSelectorCacheImportEntry {
1441
1441
  readonly workspace: string;
1442
1442
  readonly method: string;
1443
- readonly nameHash: string;
1444
- readonly name?: string;
1443
+ readonly persistHash: string;
1444
+ readonly persist?: string;
1445
1445
  readonly path: unknown;
1446
1446
  readonly schemaHash?: string;
1447
1447
  readonly createdAt: number;
@@ -1832,7 +1832,7 @@ interface OpensteerTargetByElement {
1832
1832
  }
1833
1833
  interface OpensteerTargetByPersist {
1834
1834
  readonly kind: "persist";
1835
- readonly name: string;
1835
+ readonly persist: string;
1836
1836
  }
1837
1837
  interface OpensteerTargetBySelector {
1838
1838
  readonly kind: "selector";
@@ -1856,7 +1856,6 @@ interface OpensteerActionResult {
1856
1856
  readonly x: number;
1857
1857
  readonly y: number;
1858
1858
  };
1859
- readonly persisted?: string;
1860
1859
  }
1861
1860
  interface OpensteerSnapshotCounter {
1862
1861
  readonly element: number;
@@ -3393,7 +3392,7 @@ type ElementPath = ReplayElementPath;
3393
3392
  interface DomDescriptorPayload {
3394
3393
  readonly kind: "dom-target";
3395
3394
  readonly method: string;
3396
- readonly name: string;
3395
+ readonly persist: string;
3397
3396
  readonly path: ReplayElementPath;
3398
3397
  readonly sourceUrl?: string;
3399
3398
  }
@@ -3407,7 +3406,7 @@ interface DomDescriptorRecord {
3407
3406
  }
3408
3407
  interface DescriptorTargetRef {
3409
3408
  readonly kind: "descriptor";
3410
- readonly name: string;
3409
+ readonly persist: string;
3411
3410
  }
3412
3411
  interface LiveTargetRef {
3413
3412
  readonly kind: "live";
@@ -3459,7 +3458,7 @@ interface DomResolveTargetInput {
3459
3458
  }
3460
3459
  interface DomWriteDescriptorInput {
3461
3460
  readonly method: string;
3462
- readonly name: string;
3461
+ readonly persist: string;
3463
3462
  readonly path: ReplayElementPath;
3464
3463
  readonly sourceUrl?: string;
3465
3464
  readonly createdAt?: number;
@@ -3467,7 +3466,7 @@ interface DomWriteDescriptorInput {
3467
3466
  }
3468
3467
  interface DomReadDescriptorInput {
3469
3468
  readonly method: string;
3470
- readonly name: string;
3469
+ readonly persist: string;
3471
3470
  }
3472
3471
  interface DomActionOutcome {
3473
3472
  readonly resolved: ResolvedDomTarget;
@@ -3567,11 +3566,11 @@ declare function createDomDescriptorStore(options: {
3567
3566
  readonly root?: FilesystemOpensteerWorkspace;
3568
3567
  readonly namespace?: string;
3569
3568
  }): DomDescriptorStore;
3570
- declare function hashDomDescriptorName(name: string): string;
3569
+ declare function hashDomDescriptorPersist(persist: string): string;
3571
3570
  declare function buildDomDescriptorKey(options: {
3572
3571
  readonly namespace?: string;
3573
3572
  readonly method: string;
3574
- readonly name: string;
3573
+ readonly persist: string;
3575
3574
  }): string;
3576
3575
  declare function buildDomDescriptorPayload(input: DomWriteDescriptorInput): DomDescriptorPayload;
3577
3576
  declare function buildDomDescriptorVersion(payload: DomDescriptorPayload): string;
@@ -3915,10 +3914,13 @@ interface OpensteerScrollOptions extends OpensteerTargetOptions {
3915
3914
  readonly direction: "up" | "down" | "left" | "right";
3916
3915
  readonly amount: number;
3917
3916
  }
3918
- interface OpensteerExtractOptions {
3917
+ type OpensteerExtractOptions = {
3919
3918
  readonly persist: string;
3920
3919
  readonly schema?: Record<string, unknown>;
3921
- }
3920
+ } | {
3921
+ readonly persist?: string;
3922
+ readonly schema: Record<string, unknown>;
3923
+ };
3922
3924
  interface OpensteerWaitForNetworkOptions extends OpensteerNetworkQueryInput {
3923
3925
  readonly timeoutMs?: number;
3924
3926
  readonly pollIntervalMs?: number;
@@ -4296,4 +4298,4 @@ declare function discoverLocalCdpBrowsers(input?: {
4296
4298
  readonly timeoutMs?: number;
4297
4299
  }): Promise<readonly LocalCdpBrowserCandidate[]>;
4298
4300
 
4299
- export { type AnchorTargetRef, type AppendTraceEntryInput, type ArtifactManifest, type ArtifactPayloadType, type ArtifactScope, type BrowserProfileArchiveFormat, type BrowserProfileCreateRequest, type BrowserProfileDescriptor, type BrowserProfileImportCreateRequest, type BrowserProfileImportCreateResponse, type BrowserProfileImportDescriptor, type BrowserProfileImportStatus, type BrowserProfileListResponse, type BrowserProfileStatus, type CloudBrowserContextConfig, type CloudBrowserExtensionConfig, type CloudBrowserLaunchConfig, type CloudBrowserProfileLaunchPreference, type CloudBrowserProfilePreference, type CloudFingerprintMode, type CloudFingerprintPreference, type CloudGeolocation, type CloudProxyMode, type CloudProxyPreference, type CloudProxyProtocol, type CloudRegistryImportEntry, type CloudRegistryImportRequest, type CloudRegistryImportResponse, type CloudRequestPlanImportEntry, type CloudRequestPlanImportRequest, type CloudSelectorCacheImportEntry, type CloudSelectorCacheImportRequest, type CloudSelectorCacheImportResponse, type CloudSessionLaunchConfig, CloudSessionProxy, type CloudSessionProxyOptions, type CloudSessionSourceType, type CloudSessionStatus, type CloudSessionSummary, type CloudSessionVisibilityScope, type CloudViewport, type ContextHop, type CreateFilesystemOpensteerWorkspaceOptions, type CreateTraceRunInput, DEFAULT_OPENSTEER_ENGINE, DEFERRED_MATCH_ATTR_KEYS, type DescriptorRecord, type DescriptorRegistryStore, type DomActionBridge, type DomActionBridgeProvider, type DomActionOutcome, type DomActionPolicyOperation, type DomActionScrollAlignment, type DomActionScrollOptions, type DomActionSettleOptions, type DomActionTargetInspection, type DomArrayFieldSelector, type DomArrayRowMetadata, type DomArraySelector, type DomBuildPathInput, type DomClickInput, type DomDescriptorPayload, type DomDescriptorRecord, type DomDescriptorStore, type DomExtractArrayRowsInput, type DomExtractFieldSelector, type DomExtractFieldsInput, type DomExtractedArrayRow, type DomHoverInput, type DomInputInput, type DomPath, type DomReadDescriptorInput, type DomResolveTargetInput, type DomRuntime, type DomScrollInput, type DomTargetRef, type DomWriteDescriptorInput, type ElementPath, ElementPathError, type FallbackDecision, type FallbackEvaluationInput, type FallbackPolicy, FilesystemArtifactStore, type FilesystemObservationStore, type FilesystemOpensteerWorkspace, type InspectedCdpEndpoint, type InteractionTraceRecord, type InteractionTraceRegistryStore, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type ListObservationArtifactsInput, type ListObservationEventsInput, type LocalCdpBrowserCandidate, type LocalChromeProfileDescriptor, MATCH_ATTRIBUTE_PRIORITY, type MatchClause, OPENSTEER_DOM_ACTION_BRIDGE_SYMBOL, OPENSTEER_ENGINE_NAMES, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, Opensteer, type OpensteerAddInitScriptOptions, type OpensteerArtifactStore, OpensteerAttachAmbiguousError, type OpensteerBrowserCloneOptions, type OpensteerBrowserController, OpensteerBrowserManager, type OpensteerBrowserManagerOptions, type OpensteerBrowserState, type OpensteerBrowserStatus, type OpensteerClickOptions, OpensteerCloudClient, type OpensteerCloudConfig, type OpensteerCloudProviderOptions, type OpensteerCloudSessionCreateInput, type OpensteerCloudSessionDescriptor, type OpensteerComputerExecuteOptions, type OpensteerCookieJar, type OpensteerDisconnectableRuntime, type OpensteerDomController, type OpensteerEngineName, type OpensteerExtractOptions, type OpensteerExtractionDescriptorPayload, type OpensteerExtractionDescriptorRecord, type OpensteerExtractionDescriptorStore, type OpensteerFetchOptions, type OpensteerFetchedRouteResponse, type OpensteerGotoOptions, type OpensteerInputOptions, type OpensteerInterceptScriptOptions, type OpensteerLiveSessionProvider, type OpensteerLocalProviderOptions, type OpensteerNetworkController, type OpensteerNetworkDetailResult, type OpensteerNetworkQueryOptions, type OpensteerNetworkQueryResult, type OpensteerNetworkReplayOptions, type OpensteerNetworkReplayResult, type OpensteerOptions, type OpensteerPolicy, type OpensteerProviderMode, type OpensteerProviderOptions, type OpensteerProviderSource, type OpensteerResolvedProvider, type OpensteerRouteHandlerResult, type OpensteerRouteOptions, type OpensteerRouteRegistration, OpensteerRuntime, type OpensteerRuntimeOptions, type OpensteerScrollOptions, type OpensteerSemanticRuntime, OpensteerSessionRuntime, type OpensteerSessionRuntimeOptions, type OpensteerStorageMap, type OpensteerTargetOptions, type OpensteerTraceStore, type OpensteerWaitForNetworkOptions, type OpensteerWaitForPageOptions, type OpensteerWorkspaceManifest, type PathNode, type PersistedCloudSessionRecord, type PersistedLocalBrowserSessionRecord, type PersistedSessionRecord, type ProtocolArtifactDelivery, type RegistryProvenance, type RegistryRecord, type ReplayElementPath, type ResolveRegistryRecordInput, type ResolvedDomTarget, type RetryDecision, type RetryEvaluationInput, type RetryPolicy, STABLE_PRIMARY_ATTR_KEYS, type SavedNetworkQueryInput, type SavedNetworkStore, type SettleContext, type SettleDelayInput, type SettleObserver, type SettlePolicy, type SettleTrigger, type StoredArtifactPayload, type StoredArtifactRecord, type StructuralElementAnchor, type StructuredArtifactKind, type SyncBrowserProfileCookiesInput, type TimeoutExecutionContext, type TimeoutPolicy, type TimeoutResolutionInput, type TraceEntryRecord, type TraceRunManifest, type WorkspaceBrowserBootstrap, type WorkspaceBrowserManifest, type WorkspaceLiveBrowserRecord, type WriteBinaryArtifactInput, type WriteDescriptorInput, type WriteInteractionTraceInput, type WriteStructuredArtifactInput, assertProviderSupportsEngine, buildArrayFieldPathCandidates, buildDomDescriptorKey, buildDomDescriptorPayload, buildDomDescriptorVersion, buildPathCandidates, buildPathSelectorHint, buildSegmentSelector, clearPersistedSessionRecord, cloneElementPath, cloneReplayElementPath, cloneStructuralElementAnchor, createArtifactStore, createDomDescriptorStore, createDomRuntime, createFilesystemOpensteerWorkspace, createObservationStore, createOpensteerExtractionDescriptorStore, createOpensteerSemanticRuntime, defaultFallbackPolicy, defaultPolicy, defaultRetryPolicy, defaultSettlePolicy, defaultTimeoutPolicy, delayWithSignal, discoverLocalCdpBrowsers, dispatchSemanticOperation, hashDomDescriptorName, inspectCdpEndpoint, isCurrentUrlField, isValidCssAttributeKey, listLocalChromeProfiles, manifestToExternalBinaryLocation, normalizeExtractedValue, normalizeObservabilityConfig, normalizeOpensteerEngineName, normalizeOpensteerProviderMode, normalizeWorkspaceId, parseDomDescriptorRecord, parseExtractionDescriptorRecord, readPersistedCloudSessionRecord, readPersistedLocalBrowserSessionRecord, readPersistedSessionRecord, resolveCloudConfig, resolveCloudSessionRecordPath, resolveDomActionBridge, resolveExtractedValueInContext, resolveFilesystemWorkspacePath, resolveLiveSessionRecordPath, resolveLocalSessionRecordPath, resolveOpensteerEngineName, resolveOpensteerProvider, resolveOpensteerRuntimeConfig, runWithPolicyTimeout, sanitizeElementPath, sanitizeReplayElementPath, sanitizeStructuralElementAnchor, settleWithPolicy, shouldKeepAttributeForPath, writePersistedSessionRecord };
4301
+ export { type AnchorTargetRef, type AppendTraceEntryInput, type ArtifactManifest, type ArtifactPayloadType, type ArtifactScope, type BrowserProfileArchiveFormat, type BrowserProfileCreateRequest, type BrowserProfileDescriptor, type BrowserProfileImportCreateRequest, type BrowserProfileImportCreateResponse, type BrowserProfileImportDescriptor, type BrowserProfileImportStatus, type BrowserProfileListResponse, type BrowserProfileStatus, type CloudBrowserContextConfig, type CloudBrowserExtensionConfig, type CloudBrowserLaunchConfig, type CloudBrowserProfileLaunchPreference, type CloudBrowserProfilePreference, type CloudFingerprintMode, type CloudFingerprintPreference, type CloudGeolocation, type CloudProxyMode, type CloudProxyPreference, type CloudProxyProtocol, type CloudRegistryImportEntry, type CloudRegistryImportRequest, type CloudRegistryImportResponse, type CloudRequestPlanImportEntry, type CloudRequestPlanImportRequest, type CloudSelectorCacheImportEntry, type CloudSelectorCacheImportRequest, type CloudSelectorCacheImportResponse, type CloudSessionLaunchConfig, CloudSessionProxy, type CloudSessionProxyOptions, type CloudSessionSourceType, type CloudSessionStatus, type CloudSessionSummary, type CloudSessionVisibilityScope, type CloudViewport, type ContextHop, type CreateFilesystemOpensteerWorkspaceOptions, type CreateTraceRunInput, DEFAULT_OPENSTEER_ENGINE, DEFERRED_MATCH_ATTR_KEYS, type DescriptorRecord, type DescriptorRegistryStore, type DomActionBridge, type DomActionBridgeProvider, type DomActionOutcome, type DomActionPolicyOperation, type DomActionScrollAlignment, type DomActionScrollOptions, type DomActionSettleOptions, type DomActionTargetInspection, type DomArrayFieldSelector, type DomArrayRowMetadata, type DomArraySelector, type DomBuildPathInput, type DomClickInput, type DomDescriptorPayload, type DomDescriptorRecord, type DomDescriptorStore, type DomExtractArrayRowsInput, type DomExtractFieldSelector, type DomExtractFieldsInput, type DomExtractedArrayRow, type DomHoverInput, type DomInputInput, type DomPath, type DomReadDescriptorInput, type DomResolveTargetInput, type DomRuntime, type DomScrollInput, type DomTargetRef, type DomWriteDescriptorInput, type ElementPath, ElementPathError, type FallbackDecision, type FallbackEvaluationInput, type FallbackPolicy, FilesystemArtifactStore, type FilesystemObservationStore, type FilesystemOpensteerWorkspace, type InspectedCdpEndpoint, type InteractionTraceRecord, type InteractionTraceRegistryStore, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type ListObservationArtifactsInput, type ListObservationEventsInput, type LocalCdpBrowserCandidate, type LocalChromeProfileDescriptor, MATCH_ATTRIBUTE_PRIORITY, type MatchClause, OPENSTEER_DOM_ACTION_BRIDGE_SYMBOL, OPENSTEER_ENGINE_NAMES, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, Opensteer, type OpensteerAddInitScriptOptions, type OpensteerArtifactStore, OpensteerAttachAmbiguousError, type OpensteerBrowserCloneOptions, type OpensteerBrowserController, OpensteerBrowserManager, type OpensteerBrowserManagerOptions, type OpensteerBrowserState, type OpensteerBrowserStatus, type OpensteerClickOptions, OpensteerCloudClient, type OpensteerCloudConfig, type OpensteerCloudProviderOptions, type OpensteerCloudSessionCreateInput, type OpensteerCloudSessionDescriptor, type OpensteerComputerExecuteOptions, type OpensteerCookieJar, type OpensteerDisconnectableRuntime, type OpensteerDomController, type OpensteerEngineName, type OpensteerExtractOptions, type OpensteerExtractionDescriptorPayload, type OpensteerExtractionDescriptorRecord, type OpensteerExtractionDescriptorStore, type OpensteerFetchOptions, type OpensteerFetchedRouteResponse, type OpensteerGotoOptions, type OpensteerInputOptions, type OpensteerInterceptScriptOptions, type OpensteerLiveSessionProvider, type OpensteerLocalProviderOptions, type OpensteerNetworkController, type OpensteerNetworkDetailResult, type OpensteerNetworkQueryOptions, type OpensteerNetworkQueryResult, type OpensteerNetworkReplayOptions, type OpensteerNetworkReplayResult, type OpensteerOptions, type OpensteerPolicy, type OpensteerProviderMode, type OpensteerProviderOptions, type OpensteerProviderSource, type OpensteerResolvedProvider, type OpensteerRouteHandlerResult, type OpensteerRouteOptions, type OpensteerRouteRegistration, OpensteerRuntime, type OpensteerRuntimeOptions, type OpensteerScrollOptions, type OpensteerSemanticRuntime, OpensteerSessionRuntime, type OpensteerSessionRuntimeOptions, type OpensteerStorageMap, type OpensteerTargetOptions, type OpensteerTraceStore, type OpensteerWaitForNetworkOptions, type OpensteerWaitForPageOptions, type OpensteerWorkspaceManifest, type PathNode, type PersistedCloudSessionRecord, type PersistedLocalBrowserSessionRecord, type PersistedSessionRecord, type ProtocolArtifactDelivery, type RegistryProvenance, type RegistryRecord, type ReplayElementPath, type ResolveRegistryRecordInput, type ResolvedDomTarget, type RetryDecision, type RetryEvaluationInput, type RetryPolicy, STABLE_PRIMARY_ATTR_KEYS, type SavedNetworkQueryInput, type SavedNetworkStore, type SettleContext, type SettleDelayInput, type SettleObserver, type SettlePolicy, type SettleTrigger, type StoredArtifactPayload, type StoredArtifactRecord, type StructuralElementAnchor, type StructuredArtifactKind, type SyncBrowserProfileCookiesInput, type TimeoutExecutionContext, type TimeoutPolicy, type TimeoutResolutionInput, type TraceEntryRecord, type TraceRunManifest, type WorkspaceBrowserBootstrap, type WorkspaceBrowserManifest, type WorkspaceLiveBrowserRecord, type WriteBinaryArtifactInput, type WriteDescriptorInput, type WriteInteractionTraceInput, type WriteStructuredArtifactInput, assertProviderSupportsEngine, buildArrayFieldPathCandidates, buildDomDescriptorKey, buildDomDescriptorPayload, buildDomDescriptorVersion, buildPathCandidates, buildPathSelectorHint, buildSegmentSelector, clearPersistedSessionRecord, cloneElementPath, cloneReplayElementPath, cloneStructuralElementAnchor, createArtifactStore, createDomDescriptorStore, createDomRuntime, createFilesystemOpensteerWorkspace, createObservationStore, createOpensteerExtractionDescriptorStore, createOpensteerSemanticRuntime, defaultFallbackPolicy, defaultPolicy, defaultRetryPolicy, defaultSettlePolicy, defaultTimeoutPolicy, delayWithSignal, discoverLocalCdpBrowsers, dispatchSemanticOperation, hashDomDescriptorPersist, inspectCdpEndpoint, isCurrentUrlField, isValidCssAttributeKey, listLocalChromeProfiles, manifestToExternalBinaryLocation, normalizeExtractedValue, normalizeObservabilityConfig, normalizeOpensteerEngineName, normalizeOpensteerProviderMode, normalizeWorkspaceId, parseDomDescriptorRecord, parseExtractionDescriptorRecord, readPersistedCloudSessionRecord, readPersistedLocalBrowserSessionRecord, readPersistedSessionRecord, resolveCloudConfig, resolveCloudSessionRecordPath, resolveDomActionBridge, resolveExtractedValueInContext, resolveFilesystemWorkspacePath, resolveLiveSessionRecordPath, resolveLocalSessionRecordPath, resolveOpensteerEngineName, resolveOpensteerProvider, resolveOpensteerRuntimeConfig, runWithPolicyTimeout, sanitizeElementPath, sanitizeReplayElementPath, sanitizeStructuralElementAnchor, settleWithPolicy, shouldKeepAttributeForPath, writePersistedSessionRecord };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { resolveOpensteerEnvironment, resolveOpensteerRuntimeConfig, createOpensteerSemanticRuntime, OpensteerBrowserManager } from './chunk-BRUJHMWO.js';
2
- export { CloudSessionProxy, DEFAULT_OPENSTEER_ENGINE, DEFERRED_MATCH_ATTR_KEYS, ElementPathError, MATCH_ATTRIBUTE_PRIORITY, OPENSTEER_DOM_ACTION_BRIDGE_SYMBOL, OPENSTEER_ENGINE_NAMES, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, OpensteerAttachAmbiguousError, OpensteerBrowserManager, OpensteerCloudClient, OpensteerRuntime, OpensteerSessionRuntime, STABLE_PRIMARY_ATTR_KEYS, assertProviderSupportsEngine, buildArrayFieldPathCandidates, buildDomDescriptorKey, buildDomDescriptorPayload, buildDomDescriptorVersion, buildPathCandidates, buildPathSelectorHint, buildSegmentSelector, clearPersistedSessionRecord, cloneElementPath, cloneReplayElementPath, cloneStructuralElementAnchor, createArtifactStore, createDomDescriptorStore, createDomRuntime, createFilesystemOpensteerWorkspace, createObservationStore, createOpensteerExtractionDescriptorStore, createOpensteerSemanticRuntime, defaultFallbackPolicy, defaultPolicy, defaultRetryPolicy, defaultSettlePolicy, defaultTimeoutPolicy, delayWithSignal, discoverLocalCdpBrowsers, dispatchSemanticOperation, hashDomDescriptorName, inspectCdpEndpoint, isCurrentUrlField, isValidCssAttributeKey, listLocalChromeProfiles, manifestToExternalBinaryLocation, normalizeExtractedValue, normalizeObservabilityConfig, normalizeOpensteerEngineName, normalizeOpensteerProviderMode, normalizeWorkspaceId, parseDomDescriptorRecord, parseExtractionDescriptorRecord, readPersistedCloudSessionRecord, readPersistedLocalBrowserSessionRecord, readPersistedSessionRecord, resolveCloudConfig, resolveCloudSessionRecordPath, resolveDomActionBridge, resolveExtractedValueInContext, resolveFilesystemWorkspacePath, resolveLiveSessionRecordPath, resolveLocalSessionRecordPath, resolveOpensteerEngineName, resolveOpensteerProvider, resolveOpensteerRuntimeConfig, runWithPolicyTimeout, sanitizeElementPath, sanitizeReplayElementPath, sanitizeStructuralElementAnchor, settleWithPolicy, shouldKeepAttributeForPath, writePersistedSessionRecord } from './chunk-BRUJHMWO.js';
1
+ import { resolveOpensteerEnvironment, resolveOpensteerRuntimeConfig, createOpensteerSemanticRuntime, OpensteerBrowserManager } from './chunk-DFQCK2U6.js';
2
+ export { CloudSessionProxy, DEFAULT_OPENSTEER_ENGINE, DEFERRED_MATCH_ATTR_KEYS, ElementPathError, MATCH_ATTRIBUTE_PRIORITY, OPENSTEER_DOM_ACTION_BRIDGE_SYMBOL, OPENSTEER_ENGINE_NAMES, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, OpensteerAttachAmbiguousError, OpensteerBrowserManager, OpensteerCloudClient, OpensteerRuntime, OpensteerSessionRuntime, STABLE_PRIMARY_ATTR_KEYS, assertProviderSupportsEngine, buildArrayFieldPathCandidates, buildDomDescriptorKey, buildDomDescriptorPayload, buildDomDescriptorVersion, buildPathCandidates, buildPathSelectorHint, buildSegmentSelector, clearPersistedSessionRecord, cloneElementPath, cloneReplayElementPath, cloneStructuralElementAnchor, createArtifactStore, createDomDescriptorStore, createDomRuntime, createFilesystemOpensteerWorkspace, createObservationStore, createOpensteerExtractionDescriptorStore, createOpensteerSemanticRuntime, defaultFallbackPolicy, defaultPolicy, defaultRetryPolicy, defaultSettlePolicy, defaultTimeoutPolicy, delayWithSignal, discoverLocalCdpBrowsers, dispatchSemanticOperation, hashDomDescriptorPersist, inspectCdpEndpoint, isCurrentUrlField, isValidCssAttributeKey, listLocalChromeProfiles, manifestToExternalBinaryLocation, normalizeExtractedValue, normalizeObservabilityConfig, normalizeOpensteerEngineName, normalizeOpensteerProviderMode, normalizeWorkspaceId, parseDomDescriptorRecord, parseExtractionDescriptorRecord, readPersistedCloudSessionRecord, readPersistedLocalBrowserSessionRecord, readPersistedSessionRecord, resolveCloudConfig, resolveCloudSessionRecordPath, resolveDomActionBridge, resolveExtractedValueInContext, resolveFilesystemWorkspacePath, resolveLiveSessionRecordPath, resolveLocalSessionRecordPath, resolveOpensteerEngineName, resolveOpensteerProvider, resolveOpensteerRuntimeConfig, runWithPolicyTimeout, sanitizeElementPath, sanitizeReplayElementPath, sanitizeStructuralElementAnchor, settleWithPolicy, shouldKeepAttributeForPath, writePersistedSessionRecord } from './chunk-DFQCK2U6.js';
3
3
 
4
4
  // src/sdk/opensteer.ts
5
5
  var SessionCookieJar = class {
@@ -311,7 +311,7 @@ function normalizeTargetOptions(input) {
311
311
  return {
312
312
  target: {
313
313
  kind: "persist",
314
- name: input.persist
314
+ persist: input.persist
315
315
  },
316
316
  ...input.captureNetwork === void 0 ? {} : { captureNetwork: input.captureNetwork }
317
317
  };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/sdk/opensteer.ts"],"names":[],"mappings":";;;;AAwJA,IAAM,mBAAN,MAAqD;AAAA,EAC1C,MAAA;AAAA,EACQ,OAAA;AAAA,EAEjB,YAAY,MAAA,EAAoC;AAC9C,IAAA,IAAI,MAAA,CAAO,WAAW,MAAA,EAAW;AAC/B,MAAA,IAAA,CAAK,SAAS,MAAA,CAAO,MAAA;AAAA,IACvB;AACA,IAAA,IAAA,CAAK,UAAU,MAAA,CAAO,OAAA;AAAA,EACxB;AAAA,EAEA,IAAI,IAAA,EAAuB;AACzB,IAAA,OAA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AAS,MAAA,CAAO,WAAA,CAAY,QAAA,CAAS,QAAQ,GAAA,CAAI,CAAC,MAAA,KAAW,CAAC,MAAA,CAAO,IAAA,EAAM,MAAA,CAAO,KAAK,CAAC,CAAC;AAAA,GAC1F,CAAA;AACH;AAEA,SAAS,WAAW,QAAA,EAAkE;AACpF,EAAA,IAAI,QAAA,CAAS,SAAS,MAAA,EAAW;AAC/B,IAAA,OAAO,MAAA;AAAA,EACT;AACA,EAAA,OAAO,UAAA,CAAW,KAAK,MAAA,CAAO,IAAA,CAAK,SAAS,IAAA,CAAK,IAAA,EAAM,QAAQ,CAAC,CAAA;AAClE;AAEA,SAAS,MAAM,EAAA,EAA2B;AACxC,EAAA,OAAO,IAAI,OAAA,CAAQ,CAAC,YAAY,UAAA,CAAW,OAAA,EAAS,EAAE,CAAC,CAAA;AACzD","file":"index.js","sourcesContent":["import type {\n CookieRecord,\n OpensteerCookieQueryOutput,\n OpensteerActionResult,\n OpensteerAddInitScriptInput,\n OpensteerAddInitScriptOutput,\n OpensteerComputerExecuteInput,\n OpensteerComputerExecuteOutput,\n OpensteerComputerKeyModifier,\n OpensteerComputerMouseButton,\n OpensteerNetworkDetailOutput,\n OpensteerNetworkQueryInput,\n OpensteerNetworkQueryOutput,\n OpensteerNetworkReplayInput,\n OpensteerNetworkReplayOutput,\n OpensteerOpenInput,\n OpensteerOpenOutput,\n OpensteerPageActivateInput,\n OpensteerPageActivateOutput,\n OpensteerPageCloseInput,\n OpensteerPageCloseOutput,\n OpensteerPageEvaluateInput,\n OpensteerPageEvaluateOutput,\n OpensteerPageGotoInput,\n OpensteerPageGotoOutput,\n OpensteerPageListInput,\n OpensteerPageListOutput,\n OpensteerPageNewInput,\n OpensteerPageNewOutput,\n OpensteerRequestResponseResult,\n OpensteerSessionCloseOutput,\n OpensteerSessionFetchInput,\n OpensteerSessionInfo,\n OpensteerSnapshotMode,\n OpensteerStateQueryOutput,\n OpensteerStorageArea,\n OpensteerStorageDomainSnapshot,\n OpensteerTargetInput,\n} from \"@opensteer/protocol\";\n\nimport {\n OpensteerBrowserManager,\n type OpensteerBrowserStatus,\n type WorkspaceBrowserManifest,\n} from \"../browser-manager.js\";\nimport { resolveOpensteerEnvironment } from \"../env.js\";\nimport type { OpensteerProviderOptions } from \"../provider/config.js\";\nimport type {\n OpensteerInterceptScriptOptions,\n OpensteerInstrumentableRuntime,\n OpensteerRouteOptions,\n OpensteerRouteRegistration,\n} from \"./instrumentation.js\";\nimport type { OpensteerRuntimeOptions } from \"./runtime.js\";\nimport {\n createOpensteerSemanticRuntime,\n resolveOpensteerRuntimeConfig,\n} from \"./runtime-resolution.js\";\nimport type { OpensteerDisconnectableRuntime } from \"./semantic-runtime.js\";\n\nexport interface OpensteerTargetOptions {\n readonly element?: number;\n readonly selector?: string;\n readonly persist?: string;\n readonly captureNetwork?: string;\n}\n\nexport interface OpensteerClickOptions extends OpensteerTargetOptions {\n readonly button?: OpensteerComputerMouseButton;\n readonly clickCount?: number;\n readonly modifiers?: readonly OpensteerComputerKeyModifier[];\n}\n\nexport interface OpensteerInputOptions extends OpensteerTargetOptions {\n readonly text: string;\n readonly pressEnter?: boolean;\n}\n\nexport interface OpensteerScrollOptions extends OpensteerTargetOptions {\n readonly direction: \"up\" | \"down\" | \"left\" | \"right\";\n readonly amount: number;\n}\n\nexport interface OpensteerExtractOptions {\n readonly persist: string;\n readonly schema?: Record<string, unknown>;\n}\n\nexport interface OpensteerWaitForNetworkOptions extends OpensteerNetworkQueryInput {\n readonly timeoutMs?: number;\n readonly pollIntervalMs?: number;\n}\n\nexport interface OpensteerWaitForPageOptions {\n readonly openerPageRef?: string;\n readonly urlIncludes?: string;\n readonly timeoutMs?: number;\n readonly pollIntervalMs?: number;\n}\n\nexport type OpensteerAddInitScriptOptions = OpensteerAddInitScriptInput;\nexport type OpensteerGotoOptions = Omit<OpensteerPageGotoInput, \"url\">;\nexport type OpensteerNetworkQueryOptions = OpensteerNetworkQueryInput;\nexport type OpensteerNetworkQueryResult = OpensteerNetworkQueryOutput;\nexport type OpensteerNetworkDetailResult = OpensteerNetworkDetailOutput;\nexport type OpensteerNetworkReplayOptions = Omit<OpensteerNetworkReplayInput, \"recordId\">;\nexport type OpensteerNetworkReplayResult = OpensteerNetworkReplayOutput;\nexport type OpensteerFetchOptions = Omit<OpensteerSessionFetchInput, \"url\">;\nexport type OpensteerComputerExecuteOptions = OpensteerComputerExecuteInput;\nexport type OpensteerStorageMap = Readonly<Record<string, string>>;\nexport type OpensteerBrowserState = OpensteerStateQueryOutput;\n\nexport interface OpensteerCookieJar {\n readonly domain?: string;\n has(name: string): boolean;\n get(name: string): string | undefined;\n getAll(): readonly CookieRecord[];\n serialize(): string;\n}\n\nexport interface OpensteerDomController {\n click(input: OpensteerClickOptions): Promise<OpensteerActionResult>;\n hover(input: OpensteerTargetOptions): Promise<OpensteerActionResult>;\n input(input: OpensteerInputOptions): Promise<OpensteerActionResult>;\n scroll(input: OpensteerScrollOptions): Promise<OpensteerActionResult>;\n}\n\nexport interface OpensteerNetworkController {\n query(input?: OpensteerNetworkQueryOptions): Promise<OpensteerNetworkQueryResult>;\n detail(recordId: string): Promise<OpensteerNetworkDetailResult>;\n replay(\n recordId: string,\n overrides?: OpensteerNetworkReplayOptions,\n ): Promise<OpensteerNetworkReplayResult>;\n}\n\nexport interface OpensteerOptions extends OpensteerRuntimeOptions {\n readonly provider?: OpensteerProviderOptions;\n}\n\nexport interface OpensteerBrowserCloneOptions {\n readonly sourceUserDataDir: string;\n readonly sourceProfileDirectory?: string;\n}\n\nexport interface OpensteerBrowserController {\n status(): Promise<OpensteerBrowserStatus>;\n clone(input: OpensteerBrowserCloneOptions): Promise<WorkspaceBrowserManifest>;\n reset(): Promise<void>;\n delete(): Promise<void>;\n}\n\nclass SessionCookieJar implements OpensteerCookieJar {\n readonly domain?: string;\n private readonly cookies: readonly CookieRecord[];\n\n constructor(output: OpensteerCookieQueryOutput) {\n if (output.domain !== undefined) {\n this.domain = output.domain;\n }\n this.cookies = output.cookies;\n }\n\n has(name: string): boolean {\n return this.cookies.some((cookie) => cookie.name === name);\n }\n\n get(name: string): string | undefined {\n return this.cookies.find((cookie) => cookie.name === name)?.value;\n }\n\n getAll(): readonly CookieRecord[] {\n return this.cookies;\n }\n\n serialize(): string {\n return this.cookies.map((cookie) => `${cookie.name}=${cookie.value}`).join(\"; \");\n }\n}\n\nexport class Opensteer {\n private readonly runtime: OpensteerDisconnectableRuntime;\n private readonly browserManager: OpensteerBrowserManager | undefined;\n readonly browser: OpensteerBrowserController;\n readonly dom: OpensteerDomController;\n readonly network: OpensteerNetworkController;\n\n constructor(options: OpensteerOptions = {}) {\n const environment = resolveOpensteerEnvironment(options.rootDir);\n const { provider, engineName, ...runtimeOptions } = options;\n const runtimeConfig = resolveOpensteerRuntimeConfig({\n ...(provider === undefined ? {} : { provider }),\n environment,\n });\n\n if (runtimeConfig.provider.mode === \"cloud\") {\n this.browserManager = undefined;\n this.runtime = createOpensteerSemanticRuntime({\n ...(provider === undefined ? {} : { provider }),\n ...(engineName === undefined ? {} : { engine: engineName }),\n environment,\n runtimeOptions,\n });\n this.browser = createUnsupportedBrowserController();\n } else {\n this.browserManager = new OpensteerBrowserManager({\n ...(runtimeOptions.rootDir === undefined ? {} : { rootDir: runtimeOptions.rootDir }),\n ...(runtimeOptions.rootPath === undefined ? {} : { rootPath: runtimeOptions.rootPath }),\n ...(runtimeOptions.workspace === undefined ? {} : { workspace: runtimeOptions.workspace }),\n ...(engineName === undefined ? {} : { engineName }),\n ...(runtimeOptions.browser === undefined ? {} : { browser: runtimeOptions.browser }),\n ...(runtimeOptions.launch === undefined ? {} : { launch: runtimeOptions.launch }),\n ...(runtimeOptions.context === undefined ? {} : { context: runtimeOptions.context }),\n });\n this.runtime = createOpensteerSemanticRuntime({\n ...(provider === undefined ? {} : { provider }),\n ...(engineName === undefined ? {} : { engine: engineName }),\n environment,\n runtimeOptions: {\n ...runtimeOptions,\n rootPath: this.browserManager.rootPath,\n cleanupRootOnClose: this.browserManager.cleanupRootOnDisconnect,\n },\n });\n this.browser = {\n status: () => this.browserManager!.status(),\n clone: (input) => this.browserManager!.clonePersistentBrowser(input),\n reset: () => this.browserManager!.reset(),\n delete: () => this.browserManager!.delete(),\n };\n }\n\n this.dom = {\n click: (input) => this.click(input),\n hover: (input) => this.hover(input),\n input: (input) => this.input(input),\n scroll: (input) => this.scroll(input),\n };\n\n this.network = {\n query: (input = {}) => this.queryNetwork(input),\n detail: (recordId) => this.runtime.getNetworkDetail({ recordId }),\n replay: (recordId, overrides = {}) =>\n this.runtime.replayNetwork({\n recordId,\n ...overrides,\n }),\n };\n }\n\n async open(input: string | OpensteerOpenInput = {}): Promise<OpensteerOpenOutput> {\n return this.runtime.open(typeof input === \"string\" ? { url: input } : input);\n }\n\n async info(): Promise<OpensteerSessionInfo> {\n return this.runtime.info();\n }\n\n async listPages(input: OpensteerPageListInput = {}): Promise<OpensteerPageListOutput> {\n return this.runtime.listPages(input);\n }\n\n async newPage(input: OpensteerPageNewInput = {}): Promise<OpensteerPageNewOutput> {\n return this.runtime.newPage(input);\n }\n\n async activatePage(input: OpensteerPageActivateInput): Promise<OpensteerPageActivateOutput> {\n return this.runtime.activatePage(input);\n }\n\n async closePage(input: OpensteerPageCloseInput = {}): Promise<OpensteerPageCloseOutput> {\n return this.runtime.closePage(input);\n }\n\n async goto(url: string, options: OpensteerGotoOptions = {}): Promise<OpensteerPageGotoOutput> {\n return this.runtime.goto({\n url,\n ...options,\n });\n }\n\n async evaluate(\n input: string | OpensteerPageEvaluateInput,\n ): Promise<OpensteerPageEvaluateOutput[\"value\"]> {\n const normalized =\n typeof input === \"string\"\n ? {\n script: input,\n }\n : input;\n return (await this.runtime.evaluate(normalized)).value;\n }\n\n async evaluateJson(\n input: string | OpensteerPageEvaluateInput,\n ): Promise<OpensteerPageEvaluateOutput[\"value\"]> {\n return this.evaluate(input);\n }\n\n async addInitScript(\n input: string | OpensteerAddInitScriptInput,\n ): Promise<OpensteerAddInitScriptOutput> {\n return this.runtime.addInitScript(\n typeof input === \"string\"\n ? {\n script: input,\n }\n : input,\n );\n }\n\n async click(input: OpensteerClickOptions): Promise<OpensteerActionResult> {\n const { button, clickCount, modifiers, ...target } = input;\n return this.runtime.click({\n ...normalizeTargetOptions(target),\n ...(button === undefined ? {} : { button }),\n ...(clickCount === undefined ? {} : { clickCount }),\n ...(modifiers === undefined ? {} : { modifiers }),\n });\n }\n\n async hover(input: OpensteerTargetOptions): Promise<OpensteerActionResult> {\n return this.runtime.hover(normalizeTargetOptions(input));\n }\n\n async input(input: OpensteerInputOptions): Promise<OpensteerActionResult> {\n return this.runtime.input({\n ...normalizeTargetOptions(input),\n text: input.text,\n ...(input.pressEnter === undefined ? {} : { pressEnter: input.pressEnter }),\n });\n }\n\n async scroll(input: OpensteerScrollOptions): Promise<OpensteerActionResult> {\n return this.runtime.scroll({\n ...normalizeTargetOptions(input),\n direction: input.direction,\n amount: input.amount,\n });\n }\n\n async extract(input: OpensteerExtractOptions): Promise<unknown> {\n return (await this.runtime.extract(input)).data;\n }\n\n async queryNetwork(\n input: OpensteerNetworkQueryOptions = {},\n ): Promise<OpensteerNetworkQueryResult> {\n return this.runtime.queryNetwork(input);\n }\n\n async waitForNetwork(\n input: OpensteerWaitForNetworkOptions,\n ): Promise<OpensteerNetworkQueryResult[\"records\"][number]> {\n const { timeoutMs, pollIntervalMs, ...query } = input;\n const timeoutAt = Date.now() + (timeoutMs ?? 30_000);\n const pollInterval = pollIntervalMs ?? 100;\n const baseline = new Set(\n (await this.runtime.queryNetwork({ ...query, limit: 200 })).records.map(\n (record) => record.recordId,\n ),\n );\n\n while (true) {\n const next = (await this.runtime.queryNetwork({ ...query, limit: 200 })).records.find(\n (record) => !baseline.has(record.recordId),\n );\n if (next !== undefined) {\n return next;\n }\n if (Date.now() >= timeoutAt) {\n throw new Error(\"waitForNetwork timed out\");\n }\n await delay(pollInterval);\n }\n }\n\n async waitForResponse(\n input: OpensteerWaitForNetworkOptions,\n ): Promise<OpensteerNetworkQueryResult[\"records\"][number]> {\n return this.waitForNetwork(input);\n }\n\n async waitForPage(\n input: OpensteerWaitForPageOptions = {},\n ): Promise<OpensteerPageListOutput[\"pages\"][number]> {\n const baseline = new Set((await this.runtime.listPages()).pages.map((page) => page.pageRef));\n const timeoutAt = Date.now() + (input.timeoutMs ?? 30_000);\n const pollIntervalMs = input.pollIntervalMs ?? 100;\n\n while (true) {\n const match = (await this.runtime.listPages()).pages.find((page) => {\n if (baseline.has(page.pageRef)) {\n return false;\n }\n if (input.openerPageRef !== undefined && page.openerPageRef !== input.openerPageRef) {\n return false;\n }\n if (input.urlIncludes !== undefined && !page.url.includes(input.urlIncludes)) {\n return false;\n }\n return true;\n });\n if (match !== undefined) {\n return match;\n }\n if (Date.now() >= timeoutAt) {\n throw new Error(\"waitForPage timed out\");\n }\n await delay(pollIntervalMs);\n }\n }\n\n async snapshot(mode: OpensteerSnapshotMode = \"action\"): Promise<string> {\n return (await this.runtime.snapshot({ mode })).html;\n }\n\n async cookies(domain?: string): Promise<OpensteerCookieJar> {\n return new SessionCookieJar(\n await this.runtime.getCookies(domain === undefined ? {} : { domain }),\n );\n }\n\n async storage(\n domain?: string,\n type: OpensteerStorageArea = \"local\",\n ): Promise<OpensteerStorageMap> {\n const snapshot = await this.runtime.getStorageSnapshot(domain === undefined ? {} : { domain });\n const domainSnapshot = pickStorageDomainSnapshot(snapshot, domain);\n if (domainSnapshot === undefined) {\n return {};\n }\n const entries = type === \"local\" ? domainSnapshot.localStorage : domainSnapshot.sessionStorage;\n return Object.fromEntries(entries.map((entry) => [entry.key, entry.value]));\n }\n\n async state(domain?: string): Promise<OpensteerBrowserState> {\n return this.runtime.getBrowserState(domain === undefined ? {} : { domain });\n }\n\n async fetch(url: string, options: OpensteerFetchOptions = {}): Promise<Response> {\n const result = await this.runtime.fetch({\n url,\n ...options,\n });\n if (result.response === undefined) {\n throw new Error(result.note ?? `session.fetch did not produce a response for ${url}`);\n }\n return toResponse(result.response);\n }\n\n async computerExecute(\n input: OpensteerComputerExecuteOptions,\n ): Promise<OpensteerComputerExecuteOutput> {\n return this.runtime.computerExecute(input);\n }\n\n async route(input: OpensteerRouteOptions): Promise<OpensteerRouteRegistration> {\n return this.requireOwnedInstrumentationRuntime(\"route\").route(input);\n }\n\n async interceptScript(\n input: OpensteerInterceptScriptOptions,\n ): Promise<OpensteerRouteRegistration> {\n return this.requireOwnedInstrumentationRuntime(\"interceptScript\").interceptScript(input);\n }\n\n async close(): Promise<OpensteerSessionCloseOutput> {\n if (this.browserManager === undefined || this.browserManager.mode === \"temporary\") {\n return this.runtime.close();\n }\n\n const output = await this.runtime.close();\n await this.browserManager.close();\n return output;\n }\n\n async disconnect(): Promise<void> {\n await this.runtime.disconnect();\n }\n\n private requireOwnedInstrumentationRuntime(\n method: \"route\" | \"interceptScript\",\n ): OpensteerInstrumentableRuntime {\n if (\n typeof (this.runtime as Partial<OpensteerInstrumentableRuntime>).route === \"function\" &&\n typeof (this.runtime as Partial<OpensteerInstrumentableRuntime>).interceptScript ===\n \"function\"\n ) {\n return this.runtime as OpensteerDisconnectableRuntime & OpensteerInstrumentableRuntime;\n }\n throw new Error(`${method}() is not available for this session runtime.`);\n }\n}\n\nfunction createUnsupportedBrowserController(): OpensteerBrowserController {\n const fail = async (): Promise<never> => {\n throw new Error(\"browser.* helpers are only available in local mode.\");\n };\n\n return {\n status: fail,\n clone: fail,\n reset: fail,\n delete: fail,\n };\n}\n\nfunction normalizeTargetOptions(input: OpensteerTargetOptions): {\n readonly target: OpensteerTargetInput;\n readonly persist?: string;\n readonly captureNetwork?: string;\n} {\n const hasElement = input.element !== undefined;\n const hasSelector = input.selector !== undefined;\n if (hasElement && hasSelector) {\n throw new Error(\"Specify exactly one of element, selector, or persist.\");\n }\n\n if (hasElement) {\n return {\n target: {\n kind: \"element\",\n element: input.element,\n },\n ...(input.persist === undefined ? {} : { persist: input.persist }),\n ...(input.captureNetwork === undefined ? {} : { captureNetwork: input.captureNetwork }),\n };\n }\n\n if (hasSelector) {\n return {\n target: {\n kind: \"selector\",\n selector: input.selector,\n },\n ...(input.persist === undefined ? {} : { persist: input.persist }),\n ...(input.captureNetwork === undefined ? {} : { captureNetwork: input.captureNetwork }),\n };\n }\n\n if (input.persist === undefined) {\n throw new Error(\"Specify exactly one of element, selector, or persist.\");\n }\n\n return {\n target: {\n kind: \"persist\",\n name: input.persist,\n },\n ...(input.captureNetwork === undefined ? {} : { captureNetwork: input.captureNetwork }),\n };\n}\n\nfunction pickStorageDomainSnapshot(\n snapshot: {\n readonly domains: readonly OpensteerStorageDomainSnapshot[];\n },\n domain: string | undefined,\n): OpensteerStorageDomainSnapshot | undefined {\n if (snapshot.domains.length === 0) {\n return undefined;\n }\n if (domain === undefined) {\n return snapshot.domains[0];\n }\n return snapshot.domains.find((entry) => entry.domain === domain);\n}\n\nfunction toResponse(response: OpensteerRequestResponseResult): Response {\n return new Response(decodeBody(response), {\n status: response.status,\n statusText: response.statusText,\n headers: Object.fromEntries(response.headers.map((header) => [header.name, header.value])),\n });\n}\n\nfunction decodeBody(response: OpensteerRequestResponseResult): Uint8Array | undefined {\n if (response.body === undefined) {\n return undefined;\n }\n return Uint8Array.from(Buffer.from(response.body.data, \"base64\"));\n}\n\nfunction delay(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n"]}
1
+ {"version":3,"sources":["../src/sdk/opensteer.ts"],"names":[],"mappings":";;;;AA6JA,IAAM,mBAAN,MAAqD;AAAA,EAC1C,MAAA;AAAA,EACQ,OAAA;AAAA,EAEjB,YAAY,MAAA,EAAoC;AAC9C,IAAA,IAAI,MAAA,CAAO,WAAW,MAAA,EAAW;AAC/B,MAAA,IAAA,CAAK,SAAS,MAAA,CAAO,MAAA;AAAA,IACvB;AACA,IAAA,IAAA,CAAK,UAAU,MAAA,CAAO,OAAA;AAAA,EACxB;AAAA,EAEA,IAAI,IAAA,EAAuB;AACzB,IAAA,OAAO,KAAK,OAAA,CAAQ,IAAA,CAAK,CAA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AAS,QAAQ,GAAA,CAAI,CAAC,MAAA,KAAW,CAAC,MAAA,CAAO,IAAA,EAAM,MAAA,CAAO,KAAK,CAAC,CAAC;AAAA,GAC1F,CAAA;AACH;AAEA,SAAS,WAAW,QAAA,EAAkE;AACpF,EAAA,IAAI,QAAA,CAAS,SAAS,MAAA,EAAW;AAC/B,IAAA,OAAO,MAAA;AAAA,EACT;AACA,EAAA,OAAO,UAAA,CAAW,KAAK,MAAA,CAAO,IAAA,CAAK,SAAS,IAAA,CAAK,IAAA,EAAM,QAAQ,CAAC,CAAA;AAClE;AAEA,SAAS,MAAM,EAAA,EAA2B;AACxC,EAAA,OAAO,IAAI,OAAA,CAAQ,CAAC,YAAY,UAAA,CAAW,OAAA,EAAS,EAAE,CAAC,CAAA;AACzD","file":"index.js","sourcesContent":["import type {\n CookieRecord,\n OpensteerCookieQueryOutput,\n OpensteerActionResult,\n OpensteerAddInitScriptInput,\n OpensteerAddInitScriptOutput,\n OpensteerComputerExecuteInput,\n OpensteerComputerExecuteOutput,\n OpensteerComputerKeyModifier,\n OpensteerComputerMouseButton,\n OpensteerNetworkDetailOutput,\n OpensteerNetworkQueryInput,\n OpensteerNetworkQueryOutput,\n OpensteerNetworkReplayInput,\n OpensteerNetworkReplayOutput,\n OpensteerOpenInput,\n OpensteerOpenOutput,\n OpensteerPageActivateInput,\n OpensteerPageActivateOutput,\n OpensteerPageCloseInput,\n OpensteerPageCloseOutput,\n OpensteerPageEvaluateInput,\n OpensteerPageEvaluateOutput,\n OpensteerPageGotoInput,\n OpensteerPageGotoOutput,\n OpensteerPageListInput,\n OpensteerPageListOutput,\n OpensteerPageNewInput,\n OpensteerPageNewOutput,\n OpensteerRequestResponseResult,\n OpensteerSessionCloseOutput,\n OpensteerSessionFetchInput,\n OpensteerSessionInfo,\n OpensteerSnapshotMode,\n OpensteerStateQueryOutput,\n OpensteerStorageArea,\n OpensteerStorageDomainSnapshot,\n OpensteerTargetInput,\n} from \"@opensteer/protocol\";\n\nimport {\n OpensteerBrowserManager,\n type OpensteerBrowserStatus,\n type WorkspaceBrowserManifest,\n} from \"../browser-manager.js\";\nimport { resolveOpensteerEnvironment } from \"../env.js\";\nimport type { OpensteerProviderOptions } from \"../provider/config.js\";\nimport type {\n OpensteerInterceptScriptOptions,\n OpensteerInstrumentableRuntime,\n OpensteerRouteOptions,\n OpensteerRouteRegistration,\n} from \"./instrumentation.js\";\nimport type { OpensteerRuntimeOptions } from \"./runtime.js\";\nimport {\n createOpensteerSemanticRuntime,\n resolveOpensteerRuntimeConfig,\n} from \"./runtime-resolution.js\";\nimport type { OpensteerDisconnectableRuntime } from \"./semantic-runtime.js\";\n\nexport interface OpensteerTargetOptions {\n readonly element?: number;\n readonly selector?: string;\n readonly persist?: string;\n readonly captureNetwork?: string;\n}\n\nexport interface OpensteerClickOptions extends OpensteerTargetOptions {\n readonly button?: OpensteerComputerMouseButton;\n readonly clickCount?: number;\n readonly modifiers?: readonly OpensteerComputerKeyModifier[];\n}\n\nexport interface OpensteerInputOptions extends OpensteerTargetOptions {\n readonly text: string;\n readonly pressEnter?: boolean;\n}\n\nexport interface OpensteerScrollOptions extends OpensteerTargetOptions {\n readonly direction: \"up\" | \"down\" | \"left\" | \"right\";\n readonly amount: number;\n}\n\nexport type OpensteerExtractOptions =\n | {\n readonly persist: string;\n readonly schema?: Record<string, unknown>;\n }\n | {\n readonly persist?: string;\n readonly schema: Record<string, unknown>;\n };\n\nexport interface OpensteerWaitForNetworkOptions extends OpensteerNetworkQueryInput {\n readonly timeoutMs?: number;\n readonly pollIntervalMs?: number;\n}\n\nexport interface OpensteerWaitForPageOptions {\n readonly openerPageRef?: string;\n readonly urlIncludes?: string;\n readonly timeoutMs?: number;\n readonly pollIntervalMs?: number;\n}\n\nexport type OpensteerAddInitScriptOptions = OpensteerAddInitScriptInput;\nexport type OpensteerGotoOptions = Omit<OpensteerPageGotoInput, \"url\">;\nexport type OpensteerNetworkQueryOptions = OpensteerNetworkQueryInput;\nexport type OpensteerNetworkQueryResult = OpensteerNetworkQueryOutput;\nexport type OpensteerNetworkDetailResult = OpensteerNetworkDetailOutput;\nexport type OpensteerNetworkReplayOptions = Omit<OpensteerNetworkReplayInput, \"recordId\">;\nexport type OpensteerNetworkReplayResult = OpensteerNetworkReplayOutput;\nexport type OpensteerFetchOptions = Omit<OpensteerSessionFetchInput, \"url\">;\nexport type OpensteerComputerExecuteOptions = OpensteerComputerExecuteInput;\nexport type OpensteerStorageMap = Readonly<Record<string, string>>;\nexport type OpensteerBrowserState = OpensteerStateQueryOutput;\n\nexport interface OpensteerCookieJar {\n readonly domain?: string;\n has(name: string): boolean;\n get(name: string): string | undefined;\n getAll(): readonly CookieRecord[];\n serialize(): string;\n}\n\nexport interface OpensteerDomController {\n click(input: OpensteerClickOptions): Promise<OpensteerActionResult>;\n hover(input: OpensteerTargetOptions): Promise<OpensteerActionResult>;\n input(input: OpensteerInputOptions): Promise<OpensteerActionResult>;\n scroll(input: OpensteerScrollOptions): Promise<OpensteerActionResult>;\n}\n\nexport interface OpensteerNetworkController {\n query(input?: OpensteerNetworkQueryOptions): Promise<OpensteerNetworkQueryResult>;\n detail(recordId: string): Promise<OpensteerNetworkDetailResult>;\n replay(\n recordId: string,\n overrides?: OpensteerNetworkReplayOptions,\n ): Promise<OpensteerNetworkReplayResult>;\n}\n\nexport interface OpensteerOptions extends OpensteerRuntimeOptions {\n readonly provider?: OpensteerProviderOptions;\n}\n\nexport interface OpensteerBrowserCloneOptions {\n readonly sourceUserDataDir: string;\n readonly sourceProfileDirectory?: string;\n}\n\nexport interface OpensteerBrowserController {\n status(): Promise<OpensteerBrowserStatus>;\n clone(input: OpensteerBrowserCloneOptions): Promise<WorkspaceBrowserManifest>;\n reset(): Promise<void>;\n delete(): Promise<void>;\n}\n\nclass SessionCookieJar implements OpensteerCookieJar {\n readonly domain?: string;\n private readonly cookies: readonly CookieRecord[];\n\n constructor(output: OpensteerCookieQueryOutput) {\n if (output.domain !== undefined) {\n this.domain = output.domain;\n }\n this.cookies = output.cookies;\n }\n\n has(name: string): boolean {\n return this.cookies.some((cookie) => cookie.name === name);\n }\n\n get(name: string): string | undefined {\n return this.cookies.find((cookie) => cookie.name === name)?.value;\n }\n\n getAll(): readonly CookieRecord[] {\n return this.cookies;\n }\n\n serialize(): string {\n return this.cookies.map((cookie) => `${cookie.name}=${cookie.value}`).join(\"; \");\n }\n}\n\nexport class Opensteer {\n private readonly runtime: OpensteerDisconnectableRuntime;\n private readonly browserManager: OpensteerBrowserManager | undefined;\n readonly browser: OpensteerBrowserController;\n readonly dom: OpensteerDomController;\n readonly network: OpensteerNetworkController;\n\n constructor(options: OpensteerOptions = {}) {\n const environment = resolveOpensteerEnvironment(options.rootDir);\n const { provider, engineName, ...runtimeOptions } = options;\n const runtimeConfig = resolveOpensteerRuntimeConfig({\n ...(provider === undefined ? {} : { provider }),\n environment,\n });\n\n if (runtimeConfig.provider.mode === \"cloud\") {\n this.browserManager = undefined;\n this.runtime = createOpensteerSemanticRuntime({\n ...(provider === undefined ? {} : { provider }),\n ...(engineName === undefined ? {} : { engine: engineName }),\n environment,\n runtimeOptions,\n });\n this.browser = createUnsupportedBrowserController();\n } else {\n this.browserManager = new OpensteerBrowserManager({\n ...(runtimeOptions.rootDir === undefined ? {} : { rootDir: runtimeOptions.rootDir }),\n ...(runtimeOptions.rootPath === undefined ? {} : { rootPath: runtimeOptions.rootPath }),\n ...(runtimeOptions.workspace === undefined ? {} : { workspace: runtimeOptions.workspace }),\n ...(engineName === undefined ? {} : { engineName }),\n ...(runtimeOptions.browser === undefined ? {} : { browser: runtimeOptions.browser }),\n ...(runtimeOptions.launch === undefined ? {} : { launch: runtimeOptions.launch }),\n ...(runtimeOptions.context === undefined ? {} : { context: runtimeOptions.context }),\n });\n this.runtime = createOpensteerSemanticRuntime({\n ...(provider === undefined ? {} : { provider }),\n ...(engineName === undefined ? {} : { engine: engineName }),\n environment,\n runtimeOptions: {\n ...runtimeOptions,\n rootPath: this.browserManager.rootPath,\n cleanupRootOnClose: this.browserManager.cleanupRootOnDisconnect,\n },\n });\n this.browser = {\n status: () => this.browserManager!.status(),\n clone: (input) => this.browserManager!.clonePersistentBrowser(input),\n reset: () => this.browserManager!.reset(),\n delete: () => this.browserManager!.delete(),\n };\n }\n\n this.dom = {\n click: (input) => this.click(input),\n hover: (input) => this.hover(input),\n input: (input) => this.input(input),\n scroll: (input) => this.scroll(input),\n };\n\n this.network = {\n query: (input = {}) => this.queryNetwork(input),\n detail: (recordId) => this.runtime.getNetworkDetail({ recordId }),\n replay: (recordId, overrides = {}) =>\n this.runtime.replayNetwork({\n recordId,\n ...overrides,\n }),\n };\n }\n\n async open(input: string | OpensteerOpenInput = {}): Promise<OpensteerOpenOutput> {\n return this.runtime.open(typeof input === \"string\" ? { url: input } : input);\n }\n\n async info(): Promise<OpensteerSessionInfo> {\n return this.runtime.info();\n }\n\n async listPages(input: OpensteerPageListInput = {}): Promise<OpensteerPageListOutput> {\n return this.runtime.listPages(input);\n }\n\n async newPage(input: OpensteerPageNewInput = {}): Promise<OpensteerPageNewOutput> {\n return this.runtime.newPage(input);\n }\n\n async activatePage(input: OpensteerPageActivateInput): Promise<OpensteerPageActivateOutput> {\n return this.runtime.activatePage(input);\n }\n\n async closePage(input: OpensteerPageCloseInput = {}): Promise<OpensteerPageCloseOutput> {\n return this.runtime.closePage(input);\n }\n\n async goto(url: string, options: OpensteerGotoOptions = {}): Promise<OpensteerPageGotoOutput> {\n return this.runtime.goto({\n url,\n ...options,\n });\n }\n\n async evaluate(\n input: string | OpensteerPageEvaluateInput,\n ): Promise<OpensteerPageEvaluateOutput[\"value\"]> {\n const normalized =\n typeof input === \"string\"\n ? {\n script: input,\n }\n : input;\n return (await this.runtime.evaluate(normalized)).value;\n }\n\n async evaluateJson(\n input: string | OpensteerPageEvaluateInput,\n ): Promise<OpensteerPageEvaluateOutput[\"value\"]> {\n return this.evaluate(input);\n }\n\n async addInitScript(\n input: string | OpensteerAddInitScriptInput,\n ): Promise<OpensteerAddInitScriptOutput> {\n return this.runtime.addInitScript(\n typeof input === \"string\"\n ? {\n script: input,\n }\n : input,\n );\n }\n\n async click(input: OpensteerClickOptions): Promise<OpensteerActionResult> {\n const { button, clickCount, modifiers, ...target } = input;\n return this.runtime.click({\n ...normalizeTargetOptions(target),\n ...(button === undefined ? {} : { button }),\n ...(clickCount === undefined ? {} : { clickCount }),\n ...(modifiers === undefined ? {} : { modifiers }),\n });\n }\n\n async hover(input: OpensteerTargetOptions): Promise<OpensteerActionResult> {\n return this.runtime.hover(normalizeTargetOptions(input));\n }\n\n async input(input: OpensteerInputOptions): Promise<OpensteerActionResult> {\n return this.runtime.input({\n ...normalizeTargetOptions(input),\n text: input.text,\n ...(input.pressEnter === undefined ? {} : { pressEnter: input.pressEnter }),\n });\n }\n\n async scroll(input: OpensteerScrollOptions): Promise<OpensteerActionResult> {\n return this.runtime.scroll({\n ...normalizeTargetOptions(input),\n direction: input.direction,\n amount: input.amount,\n });\n }\n\n async extract(input: OpensteerExtractOptions): Promise<unknown> {\n return (await this.runtime.extract(input)).data;\n }\n\n async queryNetwork(\n input: OpensteerNetworkQueryOptions = {},\n ): Promise<OpensteerNetworkQueryResult> {\n return this.runtime.queryNetwork(input);\n }\n\n async waitForNetwork(\n input: OpensteerWaitForNetworkOptions,\n ): Promise<OpensteerNetworkQueryResult[\"records\"][number]> {\n const { timeoutMs, pollIntervalMs, ...query } = input;\n const timeoutAt = Date.now() + (timeoutMs ?? 30_000);\n const pollInterval = pollIntervalMs ?? 100;\n const baseline = new Set(\n (await this.runtime.queryNetwork({ ...query, limit: 200 })).records.map(\n (record) => record.recordId,\n ),\n );\n\n while (true) {\n const next = (await this.runtime.queryNetwork({ ...query, limit: 200 })).records.find(\n (record) => !baseline.has(record.recordId),\n );\n if (next !== undefined) {\n return next;\n }\n if (Date.now() >= timeoutAt) {\n throw new Error(\"waitForNetwork timed out\");\n }\n await delay(pollInterval);\n }\n }\n\n async waitForResponse(\n input: OpensteerWaitForNetworkOptions,\n ): Promise<OpensteerNetworkQueryResult[\"records\"][number]> {\n return this.waitForNetwork(input);\n }\n\n async waitForPage(\n input: OpensteerWaitForPageOptions = {},\n ): Promise<OpensteerPageListOutput[\"pages\"][number]> {\n const baseline = new Set((await this.runtime.listPages()).pages.map((page) => page.pageRef));\n const timeoutAt = Date.now() + (input.timeoutMs ?? 30_000);\n const pollIntervalMs = input.pollIntervalMs ?? 100;\n\n while (true) {\n const match = (await this.runtime.listPages()).pages.find((page) => {\n if (baseline.has(page.pageRef)) {\n return false;\n }\n if (input.openerPageRef !== undefined && page.openerPageRef !== input.openerPageRef) {\n return false;\n }\n if (input.urlIncludes !== undefined && !page.url.includes(input.urlIncludes)) {\n return false;\n }\n return true;\n });\n if (match !== undefined) {\n return match;\n }\n if (Date.now() >= timeoutAt) {\n throw new Error(\"waitForPage timed out\");\n }\n await delay(pollIntervalMs);\n }\n }\n\n async snapshot(mode: OpensteerSnapshotMode = \"action\"): Promise<string> {\n return (await this.runtime.snapshot({ mode })).html;\n }\n\n async cookies(domain?: string): Promise<OpensteerCookieJar> {\n return new SessionCookieJar(\n await this.runtime.getCookies(domain === undefined ? {} : { domain }),\n );\n }\n\n async storage(\n domain?: string,\n type: OpensteerStorageArea = \"local\",\n ): Promise<OpensteerStorageMap> {\n const snapshot = await this.runtime.getStorageSnapshot(domain === undefined ? {} : { domain });\n const domainSnapshot = pickStorageDomainSnapshot(snapshot, domain);\n if (domainSnapshot === undefined) {\n return {};\n }\n const entries = type === \"local\" ? domainSnapshot.localStorage : domainSnapshot.sessionStorage;\n return Object.fromEntries(entries.map((entry) => [entry.key, entry.value]));\n }\n\n async state(domain?: string): Promise<OpensteerBrowserState> {\n return this.runtime.getBrowserState(domain === undefined ? {} : { domain });\n }\n\n async fetch(url: string, options: OpensteerFetchOptions = {}): Promise<Response> {\n const result = await this.runtime.fetch({\n url,\n ...options,\n });\n if (result.response === undefined) {\n throw new Error(result.note ?? `session.fetch did not produce a response for ${url}`);\n }\n return toResponse(result.response);\n }\n\n async computerExecute(\n input: OpensteerComputerExecuteOptions,\n ): Promise<OpensteerComputerExecuteOutput> {\n return this.runtime.computerExecute(input);\n }\n\n async route(input: OpensteerRouteOptions): Promise<OpensteerRouteRegistration> {\n return this.requireOwnedInstrumentationRuntime(\"route\").route(input);\n }\n\n async interceptScript(\n input: OpensteerInterceptScriptOptions,\n ): Promise<OpensteerRouteRegistration> {\n return this.requireOwnedInstrumentationRuntime(\"interceptScript\").interceptScript(input);\n }\n\n async close(): Promise<OpensteerSessionCloseOutput> {\n if (this.browserManager === undefined || this.browserManager.mode === \"temporary\") {\n return this.runtime.close();\n }\n\n const output = await this.runtime.close();\n await this.browserManager.close();\n return output;\n }\n\n async disconnect(): Promise<void> {\n await this.runtime.disconnect();\n }\n\n private requireOwnedInstrumentationRuntime(\n method: \"route\" | \"interceptScript\",\n ): OpensteerInstrumentableRuntime {\n if (\n typeof (this.runtime as Partial<OpensteerInstrumentableRuntime>).route === \"function\" &&\n typeof (this.runtime as Partial<OpensteerInstrumentableRuntime>).interceptScript ===\n \"function\"\n ) {\n return this.runtime as OpensteerDisconnectableRuntime & OpensteerInstrumentableRuntime;\n }\n throw new Error(`${method}() is not available for this session runtime.`);\n }\n}\n\nfunction createUnsupportedBrowserController(): OpensteerBrowserController {\n const fail = async (): Promise<never> => {\n throw new Error(\"browser.* helpers are only available in local mode.\");\n };\n\n return {\n status: fail,\n clone: fail,\n reset: fail,\n delete: fail,\n };\n}\n\nfunction normalizeTargetOptions(input: OpensteerTargetOptions): {\n readonly target: OpensteerTargetInput;\n readonly persist?: string;\n readonly captureNetwork?: string;\n} {\n const hasElement = input.element !== undefined;\n const hasSelector = input.selector !== undefined;\n if (hasElement && hasSelector) {\n throw new Error(\"Specify exactly one of element, selector, or persist.\");\n }\n\n if (hasElement) {\n return {\n target: {\n kind: \"element\",\n element: input.element,\n },\n ...(input.persist === undefined ? {} : { persist: input.persist }),\n ...(input.captureNetwork === undefined ? {} : { captureNetwork: input.captureNetwork }),\n };\n }\n\n if (hasSelector) {\n return {\n target: {\n kind: \"selector\",\n selector: input.selector,\n },\n ...(input.persist === undefined ? {} : { persist: input.persist }),\n ...(input.captureNetwork === undefined ? {} : { captureNetwork: input.captureNetwork }),\n };\n }\n\n if (input.persist === undefined) {\n throw new Error(\"Specify exactly one of element, selector, or persist.\");\n }\n\n return {\n target: {\n kind: \"persist\",\n persist: input.persist,\n },\n ...(input.captureNetwork === undefined ? {} : { captureNetwork: input.captureNetwork }),\n };\n}\n\nfunction pickStorageDomainSnapshot(\n snapshot: {\n readonly domains: readonly OpensteerStorageDomainSnapshot[];\n },\n domain: string | undefined,\n): OpensteerStorageDomainSnapshot | undefined {\n if (snapshot.domains.length === 0) {\n return undefined;\n }\n if (domain === undefined) {\n return snapshot.domains[0];\n }\n return snapshot.domains.find((entry) => entry.domain === domain);\n}\n\nfunction toResponse(response: OpensteerRequestResponseResult): Response {\n return new Response(decodeBody(response), {\n status: response.status,\n statusText: response.statusText,\n headers: Object.fromEntries(response.headers.map((header) => [header.name, header.value])),\n });\n}\n\nfunction decodeBody(response: OpensteerRequestResponseResult): Uint8Array | undefined {\n if (response.body === undefined) {\n return undefined;\n }\n return Uint8Array.from(Buffer.from(response.body.data, \"base64\"));\n}\n\nfunction delay(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opensteer",
3
- "version": "0.8.14",
3
+ "version": "0.8.15",
4
4
  "description": "Opensteer browser automation, replay, and reverse-engineering toolkit.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -71,9 +71,9 @@
71
71
  }
72
72
  },
73
73
  "devDependencies": {
74
+ "@opensteer/protocol": "0.7.6",
74
75
  "@opensteer/browser-core": "0.7.6",
75
- "@opensteer/engine-abp": "0.8.7",
76
- "@opensteer/protocol": "0.7.6"
76
+ "@opensteer/engine-abp": "0.8.7"
77
77
  },
78
78
  "scripts": {
79
79
  "build": "tsup && node ../../scripts/sync-package-skills.mjs",
@@ -56,7 +56,7 @@ opensteer hover 3 --workspace demo --persist "menu trigger"
56
56
  opensteer scroll down 400 --workspace demo
57
57
  ```
58
58
 
59
- `--persist <name>` saves the element's structural DOM path for deterministic SDK replay. Element number is always required on CLI — persist is save-only, not a targeting mode.
59
+ `--persist <key>` saves the element's structural DOM path for deterministic SDK replay. Element number is always required on CLI — persist is save-only, not a targeting mode.
60
60
 
61
61
  ### Step 3: Extract
62
62
 
@@ -85,7 +85,7 @@ const opensteer = new Opensteer({ workspace: "demo", rootDir: process.cwd() });
85
85
  try {
86
86
  await opensteer.open("https://example.com");
87
87
 
88
- // Replay by persist name — no element numbers or snapshots needed
88
+ // Replay by persist key — no element numbers or snapshots needed
89
89
  await opensteer.input({ persist: "search input", text: "laptop", pressEnter: true });
90
90
  await opensteer.click({ persist: "search button" });
91
91
 
@@ -10,8 +10,8 @@ opensteer snapshot action --workspace demo
10
10
  opensteer input 5 laptop --workspace demo --persist "search input" --capture-network search
11
11
  opensteer click 7 --workspace demo --persist "search button" --capture-network search
12
12
  opensteer snapshot extraction --workspace demo
13
- opensteer extract "search results" --workspace demo \
14
- --schema '{"items":[{"name":{"element":13},"price":{"element":14}},{"name":{"element":22},"price":{"element":23}}]}'
13
+ opensteer extract '{"items":[{"name":{"element":13},"price":{"element":14}},{"name":{"element":22},"price":{"element":23}}]}' \
14
+ --workspace demo --persist "search results"
15
15
  opensteer close --workspace demo
16
16
  ```
17
17
 
@@ -47,13 +47,14 @@ opensteer hover 7 --workspace demo --persist "primary button"
47
47
  opensteer input 5 "search term" --workspace demo --persist "search input" --press-enter
48
48
  opensteer scroll down 400 --workspace demo
49
49
  opensteer scroll down 400 --workspace demo --element 12 --persist "results list"
50
- opensteer extract "page summary" --workspace demo --schema '{"title":{"element":3},"url":{"source":"current_url"}}'
50
+ opensteer extract '{"title":{"element":3},"url":{"source":"current_url"}}' --workspace demo \
51
+ --persist "page summary"
51
52
  ```
52
53
 
53
54
  Rules:
54
55
 
55
- - `--persist` caches DOM action targets by name.
56
- - `extract <description>` uses `description` because extraction descriptors are named by description.
56
+ - `--persist` caches reusable DOM targets and extraction descriptors by persist key.
57
+ - `extract <schema> [--persist <key>]` accepts the schema positionally and optionally saves it for replay.
57
58
  - There is no CLI `--selector`, `--description` target flag, `--text`, or `--input-json`.
58
59
 
59
60
  ### Network Discovery
@@ -47,11 +47,11 @@ await opensteer.click({ persist: "primary button" });
47
47
  await opensteer.input({ persist: "search input", text: "laptop", pressEnter: true });
48
48
  ```
49
49
 
50
- Extraction still uses `description`:
50
+ Persist works for extraction too:
51
51
 
52
52
  ```ts
53
53
  const summary = await opensteer.extract({
54
- description: "page summary",
54
+ persist: "page summary",
55
55
  schema: {
56
56
  title: { selector: "title" },
57
57
  url: { source: "current_url" },
@@ -61,8 +61,7 @@ const summary = await opensteer.extract({
61
61
 
62
62
  Rules:
63
63
 
64
- - Use `persist` for DOM actions.
65
- - Use `description` for extraction descriptors.
64
+ - Use `persist` for reusable DOM targets and extraction descriptors.
66
65
  - Use `selector` only as a low-level escape hatch.
67
66
 
68
67
  ## Network Discovery