opensteer 0.8.15 → 0.8.17
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/{chunk-DFQCK2U6.js → chunk-KBO7DDPF.js} +183 -255
- package/dist/chunk-KBO7DDPF.js.map +1 -0
- package/dist/chunk-KCINASQC.js +3 -0
- package/dist/chunk-KCINASQC.js.map +1 -0
- package/dist/chunk-Y3ULLNOS.js +359 -0
- package/dist/chunk-Y3ULLNOS.js.map +1 -0
- package/dist/cli/bin.cjs +25851 -23402
- package/dist/cli/bin.cjs.map +1 -1
- package/dist/cli/bin.js +117 -87
- package/dist/cli/bin.js.map +1 -1
- package/dist/index.cjs +101 -160
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -27
- package/dist/index.d.ts +20 -27
- package/dist/index.js +3 -345
- package/dist/index.js.map +1 -1
- package/dist/opensteer-3Q3LR5XM.js +4 -0
- package/dist/opensteer-3Q3LR5XM.js.map +1 -0
- package/package.json +10 -9
- package/skills/opensteer/SKILL.md +74 -75
- package/LICENSE +0 -21
- package/dist/chunk-DFQCK2U6.js.map +0 -1
- package/skills/opensteer/references/cli-reference.md +0 -118
- package/skills/opensteer/references/request-workflow.md +0 -153
- package/skills/opensteer/references/sdk-reference.md +0 -157
package/dist/index.d.cts
CHANGED
|
@@ -1205,6 +1205,10 @@ interface OpensteerNetworkDetailOutput {
|
|
|
1205
1205
|
};
|
|
1206
1206
|
readonly redirectChain?: readonly OpensteerNetworkRedirectHop[];
|
|
1207
1207
|
readonly notes?: readonly string[];
|
|
1208
|
+
readonly transportProbe?: {
|
|
1209
|
+
readonly recommended?: TransportKind;
|
|
1210
|
+
readonly attempts: readonly OpensteerReplayAttempt[];
|
|
1211
|
+
};
|
|
1208
1212
|
}
|
|
1209
1213
|
interface OpensteerReplayAttempt {
|
|
1210
1214
|
readonly transport: TransportKind;
|
|
@@ -1214,24 +1218,6 @@ interface OpensteerReplayAttempt {
|
|
|
1214
1218
|
readonly note?: string;
|
|
1215
1219
|
readonly error?: string;
|
|
1216
1220
|
}
|
|
1217
|
-
interface OpensteerNetworkReplayOverrides {
|
|
1218
|
-
readonly query?: OpensteerRequestScalarMap;
|
|
1219
|
-
readonly headers?: OpensteerRequestScalarMap;
|
|
1220
|
-
readonly body?: OpensteerRequestBodyInput;
|
|
1221
|
-
readonly variables?: JsonValue$1;
|
|
1222
|
-
}
|
|
1223
|
-
interface OpensteerNetworkReplayInput extends OpensteerNetworkReplayOverrides {
|
|
1224
|
-
readonly recordId: string;
|
|
1225
|
-
readonly pageRef?: PageRef;
|
|
1226
|
-
}
|
|
1227
|
-
interface OpensteerNetworkReplayOutput {
|
|
1228
|
-
readonly recordId: string;
|
|
1229
|
-
readonly transport?: TransportKind;
|
|
1230
|
-
readonly attempts: readonly OpensteerReplayAttempt[];
|
|
1231
|
-
readonly response?: OpensteerRequestResponseResult;
|
|
1232
|
-
readonly data?: JsonValue$1 | string;
|
|
1233
|
-
readonly note?: string;
|
|
1234
|
-
}
|
|
1235
1221
|
type OpensteerSessionFetchTransport = "auto" | "direct" | "matched-tls" | "page";
|
|
1236
1222
|
interface OpensteerSessionFetchInput {
|
|
1237
1223
|
readonly pageRef?: PageRef;
|
|
@@ -2089,7 +2075,7 @@ interface OpensteerComputerExecuteOutput {
|
|
|
2089
2075
|
readonly timing: OpensteerComputerExecuteTiming;
|
|
2090
2076
|
readonly trace?: OpensteerComputerTraceEnrichment;
|
|
2091
2077
|
}
|
|
2092
|
-
declare const opensteerSemanticOperationNames: readonly ["session.open", "page.list", "page.new", "page.activate", "page.close", "page.goto", "page.evaluate", "page.add-init-script", "page.snapshot", "dom.click", "dom.hover", "dom.input", "dom.scroll", "dom.extract", "network.query", "network.detail", "
|
|
2078
|
+
declare const opensteerSemanticOperationNames: readonly ["session.open", "page.list", "page.new", "page.activate", "page.close", "page.goto", "page.evaluate", "page.add-init-script", "page.snapshot", "dom.click", "dom.hover", "dom.input", "dom.scroll", "dom.extract", "network.query", "network.detail", "interaction.capture", "interaction.get", "interaction.diff", "interaction.replay", "artifact.read", "session.cookies", "session.storage", "session.state", "session.fetch", "scripts.capture", "scripts.beautify", "scripts.deobfuscate", "scripts.sandbox", "captcha.solve", "computer.execute", "session.close"];
|
|
2093
2079
|
type OpensteerSemanticOperationName = (typeof opensteerSemanticOperationNames)[number];
|
|
2094
2080
|
|
|
2095
2081
|
declare const opensteerSessionGrantKinds: readonly ["semantic", "automation", "view", "cdp"];
|
|
@@ -3936,9 +3922,15 @@ type OpensteerGotoOptions = Omit<OpensteerPageGotoInput, "url">;
|
|
|
3936
3922
|
type OpensteerNetworkQueryOptions = OpensteerNetworkQueryInput;
|
|
3937
3923
|
type OpensteerNetworkQueryResult = OpensteerNetworkQueryOutput;
|
|
3938
3924
|
type OpensteerNetworkDetailResult = OpensteerNetworkDetailOutput;
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3925
|
+
interface OpensteerFetchOptions {
|
|
3926
|
+
readonly method?: string;
|
|
3927
|
+
readonly headers?: Record<string, string>;
|
|
3928
|
+
readonly body?: string;
|
|
3929
|
+
readonly query?: Record<string, string | number | boolean>;
|
|
3930
|
+
readonly transport?: "auto" | "direct" | "matched-tls" | "page";
|
|
3931
|
+
readonly cookies?: boolean;
|
|
3932
|
+
readonly followRedirects?: boolean;
|
|
3933
|
+
}
|
|
3942
3934
|
type OpensteerComputerExecuteOptions = OpensteerComputerExecuteInput;
|
|
3943
3935
|
type OpensteerStorageMap = Readonly<Record<string, string>>;
|
|
3944
3936
|
type OpensteerBrowserState = OpensteerStateQueryOutput;
|
|
@@ -3957,8 +3949,9 @@ interface OpensteerDomController {
|
|
|
3957
3949
|
}
|
|
3958
3950
|
interface OpensteerNetworkController {
|
|
3959
3951
|
query(input?: OpensteerNetworkQueryOptions): Promise<OpensteerNetworkQueryResult>;
|
|
3960
|
-
detail(recordId: string
|
|
3961
|
-
|
|
3952
|
+
detail(recordId: string, options?: {
|
|
3953
|
+
probe?: boolean;
|
|
3954
|
+
}): Promise<OpensteerNetworkDetailResult>;
|
|
3962
3955
|
}
|
|
3963
3956
|
interface OpensteerOptions extends OpensteerRuntimeOptions {
|
|
3964
3957
|
readonly provider?: OpensteerProviderOptions;
|
|
@@ -4047,8 +4040,8 @@ interface OpensteerSemanticRuntime {
|
|
|
4047
4040
|
queryNetwork(input?: OpensteerNetworkQueryInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkQueryOutput>;
|
|
4048
4041
|
getNetworkDetail(input: {
|
|
4049
4042
|
readonly recordId: string;
|
|
4043
|
+
readonly probe?: boolean;
|
|
4050
4044
|
}, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkDetailOutput>;
|
|
4051
|
-
replayNetwork(input: OpensteerNetworkReplayInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkReplayOutput>;
|
|
4052
4045
|
captureInteraction(input: OpensteerInteractionCaptureInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerInteractionCaptureOutput>;
|
|
4053
4046
|
getInteraction(input: OpensteerInteractionGetInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerInteractionGetOutput>;
|
|
4054
4047
|
diffInteraction(input: OpensteerInteractionDiffInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerInteractionDiffOutput>;
|
|
@@ -4223,8 +4216,8 @@ declare class CloudSessionProxy implements OpensteerDisconnectableRuntime {
|
|
|
4223
4216
|
queryNetwork(input?: OpensteerNetworkQueryInput): Promise<OpensteerNetworkQueryOutput>;
|
|
4224
4217
|
getNetworkDetail(input: {
|
|
4225
4218
|
readonly recordId: string;
|
|
4219
|
+
readonly probe?: boolean;
|
|
4226
4220
|
}): Promise<OpensteerNetworkDetailOutput>;
|
|
4227
|
-
replayNetwork(input: OpensteerNetworkReplayInput): Promise<OpensteerNetworkReplayOutput>;
|
|
4228
4221
|
captureInteraction(input: OpensteerInteractionCaptureInput): Promise<OpensteerInteractionCaptureOutput>;
|
|
4229
4222
|
getInteraction(input: OpensteerInteractionGetInput): Promise<OpensteerInteractionGetOutput>;
|
|
4230
4223
|
diffInteraction(input: OpensteerInteractionDiffInput): Promise<OpensteerInteractionDiffOutput>;
|
|
@@ -4298,4 +4291,4 @@ declare function discoverLocalCdpBrowsers(input?: {
|
|
|
4298
4291
|
readonly timeoutMs?: number;
|
|
4299
4292
|
}): Promise<readonly LocalCdpBrowserCandidate[]>;
|
|
4300
4293
|
|
|
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
|
|
4294
|
+
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 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
|
@@ -1205,6 +1205,10 @@ interface OpensteerNetworkDetailOutput {
|
|
|
1205
1205
|
};
|
|
1206
1206
|
readonly redirectChain?: readonly OpensteerNetworkRedirectHop[];
|
|
1207
1207
|
readonly notes?: readonly string[];
|
|
1208
|
+
readonly transportProbe?: {
|
|
1209
|
+
readonly recommended?: TransportKind;
|
|
1210
|
+
readonly attempts: readonly OpensteerReplayAttempt[];
|
|
1211
|
+
};
|
|
1208
1212
|
}
|
|
1209
1213
|
interface OpensteerReplayAttempt {
|
|
1210
1214
|
readonly transport: TransportKind;
|
|
@@ -1214,24 +1218,6 @@ interface OpensteerReplayAttempt {
|
|
|
1214
1218
|
readonly note?: string;
|
|
1215
1219
|
readonly error?: string;
|
|
1216
1220
|
}
|
|
1217
|
-
interface OpensteerNetworkReplayOverrides {
|
|
1218
|
-
readonly query?: OpensteerRequestScalarMap;
|
|
1219
|
-
readonly headers?: OpensteerRequestScalarMap;
|
|
1220
|
-
readonly body?: OpensteerRequestBodyInput;
|
|
1221
|
-
readonly variables?: JsonValue$1;
|
|
1222
|
-
}
|
|
1223
|
-
interface OpensteerNetworkReplayInput extends OpensteerNetworkReplayOverrides {
|
|
1224
|
-
readonly recordId: string;
|
|
1225
|
-
readonly pageRef?: PageRef;
|
|
1226
|
-
}
|
|
1227
|
-
interface OpensteerNetworkReplayOutput {
|
|
1228
|
-
readonly recordId: string;
|
|
1229
|
-
readonly transport?: TransportKind;
|
|
1230
|
-
readonly attempts: readonly OpensteerReplayAttempt[];
|
|
1231
|
-
readonly response?: OpensteerRequestResponseResult;
|
|
1232
|
-
readonly data?: JsonValue$1 | string;
|
|
1233
|
-
readonly note?: string;
|
|
1234
|
-
}
|
|
1235
1221
|
type OpensteerSessionFetchTransport = "auto" | "direct" | "matched-tls" | "page";
|
|
1236
1222
|
interface OpensteerSessionFetchInput {
|
|
1237
1223
|
readonly pageRef?: PageRef;
|
|
@@ -2089,7 +2075,7 @@ interface OpensteerComputerExecuteOutput {
|
|
|
2089
2075
|
readonly timing: OpensteerComputerExecuteTiming;
|
|
2090
2076
|
readonly trace?: OpensteerComputerTraceEnrichment;
|
|
2091
2077
|
}
|
|
2092
|
-
declare const opensteerSemanticOperationNames: readonly ["session.open", "page.list", "page.new", "page.activate", "page.close", "page.goto", "page.evaluate", "page.add-init-script", "page.snapshot", "dom.click", "dom.hover", "dom.input", "dom.scroll", "dom.extract", "network.query", "network.detail", "
|
|
2078
|
+
declare const opensteerSemanticOperationNames: readonly ["session.open", "page.list", "page.new", "page.activate", "page.close", "page.goto", "page.evaluate", "page.add-init-script", "page.snapshot", "dom.click", "dom.hover", "dom.input", "dom.scroll", "dom.extract", "network.query", "network.detail", "interaction.capture", "interaction.get", "interaction.diff", "interaction.replay", "artifact.read", "session.cookies", "session.storage", "session.state", "session.fetch", "scripts.capture", "scripts.beautify", "scripts.deobfuscate", "scripts.sandbox", "captcha.solve", "computer.execute", "session.close"];
|
|
2093
2079
|
type OpensteerSemanticOperationName = (typeof opensteerSemanticOperationNames)[number];
|
|
2094
2080
|
|
|
2095
2081
|
declare const opensteerSessionGrantKinds: readonly ["semantic", "automation", "view", "cdp"];
|
|
@@ -3936,9 +3922,15 @@ type OpensteerGotoOptions = Omit<OpensteerPageGotoInput, "url">;
|
|
|
3936
3922
|
type OpensteerNetworkQueryOptions = OpensteerNetworkQueryInput;
|
|
3937
3923
|
type OpensteerNetworkQueryResult = OpensteerNetworkQueryOutput;
|
|
3938
3924
|
type OpensteerNetworkDetailResult = OpensteerNetworkDetailOutput;
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3925
|
+
interface OpensteerFetchOptions {
|
|
3926
|
+
readonly method?: string;
|
|
3927
|
+
readonly headers?: Record<string, string>;
|
|
3928
|
+
readonly body?: string;
|
|
3929
|
+
readonly query?: Record<string, string | number | boolean>;
|
|
3930
|
+
readonly transport?: "auto" | "direct" | "matched-tls" | "page";
|
|
3931
|
+
readonly cookies?: boolean;
|
|
3932
|
+
readonly followRedirects?: boolean;
|
|
3933
|
+
}
|
|
3942
3934
|
type OpensteerComputerExecuteOptions = OpensteerComputerExecuteInput;
|
|
3943
3935
|
type OpensteerStorageMap = Readonly<Record<string, string>>;
|
|
3944
3936
|
type OpensteerBrowserState = OpensteerStateQueryOutput;
|
|
@@ -3957,8 +3949,9 @@ interface OpensteerDomController {
|
|
|
3957
3949
|
}
|
|
3958
3950
|
interface OpensteerNetworkController {
|
|
3959
3951
|
query(input?: OpensteerNetworkQueryOptions): Promise<OpensteerNetworkQueryResult>;
|
|
3960
|
-
detail(recordId: string
|
|
3961
|
-
|
|
3952
|
+
detail(recordId: string, options?: {
|
|
3953
|
+
probe?: boolean;
|
|
3954
|
+
}): Promise<OpensteerNetworkDetailResult>;
|
|
3962
3955
|
}
|
|
3963
3956
|
interface OpensteerOptions extends OpensteerRuntimeOptions {
|
|
3964
3957
|
readonly provider?: OpensteerProviderOptions;
|
|
@@ -4047,8 +4040,8 @@ interface OpensteerSemanticRuntime {
|
|
|
4047
4040
|
queryNetwork(input?: OpensteerNetworkQueryInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkQueryOutput>;
|
|
4048
4041
|
getNetworkDetail(input: {
|
|
4049
4042
|
readonly recordId: string;
|
|
4043
|
+
readonly probe?: boolean;
|
|
4050
4044
|
}, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkDetailOutput>;
|
|
4051
|
-
replayNetwork(input: OpensteerNetworkReplayInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkReplayOutput>;
|
|
4052
4045
|
captureInteraction(input: OpensteerInteractionCaptureInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerInteractionCaptureOutput>;
|
|
4053
4046
|
getInteraction(input: OpensteerInteractionGetInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerInteractionGetOutput>;
|
|
4054
4047
|
diffInteraction(input: OpensteerInteractionDiffInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerInteractionDiffOutput>;
|
|
@@ -4223,8 +4216,8 @@ declare class CloudSessionProxy implements OpensteerDisconnectableRuntime {
|
|
|
4223
4216
|
queryNetwork(input?: OpensteerNetworkQueryInput): Promise<OpensteerNetworkQueryOutput>;
|
|
4224
4217
|
getNetworkDetail(input: {
|
|
4225
4218
|
readonly recordId: string;
|
|
4219
|
+
readonly probe?: boolean;
|
|
4226
4220
|
}): Promise<OpensteerNetworkDetailOutput>;
|
|
4227
|
-
replayNetwork(input: OpensteerNetworkReplayInput): Promise<OpensteerNetworkReplayOutput>;
|
|
4228
4221
|
captureInteraction(input: OpensteerInteractionCaptureInput): Promise<OpensteerInteractionCaptureOutput>;
|
|
4229
4222
|
getInteraction(input: OpensteerInteractionGetInput): Promise<OpensteerInteractionGetOutput>;
|
|
4230
4223
|
diffInteraction(input: OpensteerInteractionDiffInput): Promise<OpensteerInteractionDiffOutput>;
|
|
@@ -4298,4 +4291,4 @@ declare function discoverLocalCdpBrowsers(input?: {
|
|
|
4298
4291
|
readonly timeoutMs?: number;
|
|
4299
4292
|
}): Promise<readonly LocalCdpBrowserCandidate[]>;
|
|
4300
4293
|
|
|
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
|
|
4294
|
+
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 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,347 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
// src/sdk/opensteer.ts
|
|
5
|
-
var SessionCookieJar = class {
|
|
6
|
-
domain;
|
|
7
|
-
cookies;
|
|
8
|
-
constructor(output) {
|
|
9
|
-
if (output.domain !== void 0) {
|
|
10
|
-
this.domain = output.domain;
|
|
11
|
-
}
|
|
12
|
-
this.cookies = output.cookies;
|
|
13
|
-
}
|
|
14
|
-
has(name) {
|
|
15
|
-
return this.cookies.some((cookie) => cookie.name === name);
|
|
16
|
-
}
|
|
17
|
-
get(name) {
|
|
18
|
-
return this.cookies.find((cookie) => cookie.name === name)?.value;
|
|
19
|
-
}
|
|
20
|
-
getAll() {
|
|
21
|
-
return this.cookies;
|
|
22
|
-
}
|
|
23
|
-
serialize() {
|
|
24
|
-
return this.cookies.map((cookie) => `${cookie.name}=${cookie.value}`).join("; ");
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
var Opensteer = class {
|
|
28
|
-
runtime;
|
|
29
|
-
browserManager;
|
|
30
|
-
browser;
|
|
31
|
-
dom;
|
|
32
|
-
network;
|
|
33
|
-
constructor(options = {}) {
|
|
34
|
-
const environment = resolveOpensteerEnvironment(options.rootDir);
|
|
35
|
-
const { provider, engineName, ...runtimeOptions } = options;
|
|
36
|
-
const runtimeConfig = resolveOpensteerRuntimeConfig({
|
|
37
|
-
...provider === void 0 ? {} : { provider },
|
|
38
|
-
environment
|
|
39
|
-
});
|
|
40
|
-
if (runtimeConfig.provider.mode === "cloud") {
|
|
41
|
-
this.browserManager = void 0;
|
|
42
|
-
this.runtime = createOpensteerSemanticRuntime({
|
|
43
|
-
...provider === void 0 ? {} : { provider },
|
|
44
|
-
...engineName === void 0 ? {} : { engine: engineName },
|
|
45
|
-
environment,
|
|
46
|
-
runtimeOptions
|
|
47
|
-
});
|
|
48
|
-
this.browser = createUnsupportedBrowserController();
|
|
49
|
-
} else {
|
|
50
|
-
this.browserManager = new OpensteerBrowserManager({
|
|
51
|
-
...runtimeOptions.rootDir === void 0 ? {} : { rootDir: runtimeOptions.rootDir },
|
|
52
|
-
...runtimeOptions.rootPath === void 0 ? {} : { rootPath: runtimeOptions.rootPath },
|
|
53
|
-
...runtimeOptions.workspace === void 0 ? {} : { workspace: runtimeOptions.workspace },
|
|
54
|
-
...engineName === void 0 ? {} : { engineName },
|
|
55
|
-
...runtimeOptions.browser === void 0 ? {} : { browser: runtimeOptions.browser },
|
|
56
|
-
...runtimeOptions.launch === void 0 ? {} : { launch: runtimeOptions.launch },
|
|
57
|
-
...runtimeOptions.context === void 0 ? {} : { context: runtimeOptions.context }
|
|
58
|
-
});
|
|
59
|
-
this.runtime = createOpensteerSemanticRuntime({
|
|
60
|
-
...provider === void 0 ? {} : { provider },
|
|
61
|
-
...engineName === void 0 ? {} : { engine: engineName },
|
|
62
|
-
environment,
|
|
63
|
-
runtimeOptions: {
|
|
64
|
-
...runtimeOptions,
|
|
65
|
-
rootPath: this.browserManager.rootPath,
|
|
66
|
-
cleanupRootOnClose: this.browserManager.cleanupRootOnDisconnect
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
this.browser = {
|
|
70
|
-
status: () => this.browserManager.status(),
|
|
71
|
-
clone: (input) => this.browserManager.clonePersistentBrowser(input),
|
|
72
|
-
reset: () => this.browserManager.reset(),
|
|
73
|
-
delete: () => this.browserManager.delete()
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
this.dom = {
|
|
77
|
-
click: (input) => this.click(input),
|
|
78
|
-
hover: (input) => this.hover(input),
|
|
79
|
-
input: (input) => this.input(input),
|
|
80
|
-
scroll: (input) => this.scroll(input)
|
|
81
|
-
};
|
|
82
|
-
this.network = {
|
|
83
|
-
query: (input = {}) => this.queryNetwork(input),
|
|
84
|
-
detail: (recordId) => this.runtime.getNetworkDetail({ recordId }),
|
|
85
|
-
replay: (recordId, overrides = {}) => this.runtime.replayNetwork({
|
|
86
|
-
recordId,
|
|
87
|
-
...overrides
|
|
88
|
-
})
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
async open(input = {}) {
|
|
92
|
-
return this.runtime.open(typeof input === "string" ? { url: input } : input);
|
|
93
|
-
}
|
|
94
|
-
async info() {
|
|
95
|
-
return this.runtime.info();
|
|
96
|
-
}
|
|
97
|
-
async listPages(input = {}) {
|
|
98
|
-
return this.runtime.listPages(input);
|
|
99
|
-
}
|
|
100
|
-
async newPage(input = {}) {
|
|
101
|
-
return this.runtime.newPage(input);
|
|
102
|
-
}
|
|
103
|
-
async activatePage(input) {
|
|
104
|
-
return this.runtime.activatePage(input);
|
|
105
|
-
}
|
|
106
|
-
async closePage(input = {}) {
|
|
107
|
-
return this.runtime.closePage(input);
|
|
108
|
-
}
|
|
109
|
-
async goto(url, options = {}) {
|
|
110
|
-
return this.runtime.goto({
|
|
111
|
-
url,
|
|
112
|
-
...options
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
async evaluate(input) {
|
|
116
|
-
const normalized = typeof input === "string" ? {
|
|
117
|
-
script: input
|
|
118
|
-
} : input;
|
|
119
|
-
return (await this.runtime.evaluate(normalized)).value;
|
|
120
|
-
}
|
|
121
|
-
async evaluateJson(input) {
|
|
122
|
-
return this.evaluate(input);
|
|
123
|
-
}
|
|
124
|
-
async addInitScript(input) {
|
|
125
|
-
return this.runtime.addInitScript(
|
|
126
|
-
typeof input === "string" ? {
|
|
127
|
-
script: input
|
|
128
|
-
} : input
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
async click(input) {
|
|
132
|
-
const { button, clickCount, modifiers, ...target } = input;
|
|
133
|
-
return this.runtime.click({
|
|
134
|
-
...normalizeTargetOptions(target),
|
|
135
|
-
...button === void 0 ? {} : { button },
|
|
136
|
-
...clickCount === void 0 ? {} : { clickCount },
|
|
137
|
-
...modifiers === void 0 ? {} : { modifiers }
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
async hover(input) {
|
|
141
|
-
return this.runtime.hover(normalizeTargetOptions(input));
|
|
142
|
-
}
|
|
143
|
-
async input(input) {
|
|
144
|
-
return this.runtime.input({
|
|
145
|
-
...normalizeTargetOptions(input),
|
|
146
|
-
text: input.text,
|
|
147
|
-
...input.pressEnter === void 0 ? {} : { pressEnter: input.pressEnter }
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
async scroll(input) {
|
|
151
|
-
return this.runtime.scroll({
|
|
152
|
-
...normalizeTargetOptions(input),
|
|
153
|
-
direction: input.direction,
|
|
154
|
-
amount: input.amount
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
async extract(input) {
|
|
158
|
-
return (await this.runtime.extract(input)).data;
|
|
159
|
-
}
|
|
160
|
-
async queryNetwork(input = {}) {
|
|
161
|
-
return this.runtime.queryNetwork(input);
|
|
162
|
-
}
|
|
163
|
-
async waitForNetwork(input) {
|
|
164
|
-
const { timeoutMs, pollIntervalMs, ...query } = input;
|
|
165
|
-
const timeoutAt = Date.now() + (timeoutMs ?? 3e4);
|
|
166
|
-
const pollInterval = pollIntervalMs ?? 100;
|
|
167
|
-
const baseline = new Set(
|
|
168
|
-
(await this.runtime.queryNetwork({ ...query, limit: 200 })).records.map(
|
|
169
|
-
(record) => record.recordId
|
|
170
|
-
)
|
|
171
|
-
);
|
|
172
|
-
while (true) {
|
|
173
|
-
const next = (await this.runtime.queryNetwork({ ...query, limit: 200 })).records.find(
|
|
174
|
-
(record) => !baseline.has(record.recordId)
|
|
175
|
-
);
|
|
176
|
-
if (next !== void 0) {
|
|
177
|
-
return next;
|
|
178
|
-
}
|
|
179
|
-
if (Date.now() >= timeoutAt) {
|
|
180
|
-
throw new Error("waitForNetwork timed out");
|
|
181
|
-
}
|
|
182
|
-
await delay(pollInterval);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
async waitForResponse(input) {
|
|
186
|
-
return this.waitForNetwork(input);
|
|
187
|
-
}
|
|
188
|
-
async waitForPage(input = {}) {
|
|
189
|
-
const baseline = new Set((await this.runtime.listPages()).pages.map((page) => page.pageRef));
|
|
190
|
-
const timeoutAt = Date.now() + (input.timeoutMs ?? 3e4);
|
|
191
|
-
const pollIntervalMs = input.pollIntervalMs ?? 100;
|
|
192
|
-
while (true) {
|
|
193
|
-
const match = (await this.runtime.listPages()).pages.find((page) => {
|
|
194
|
-
if (baseline.has(page.pageRef)) {
|
|
195
|
-
return false;
|
|
196
|
-
}
|
|
197
|
-
if (input.openerPageRef !== void 0 && page.openerPageRef !== input.openerPageRef) {
|
|
198
|
-
return false;
|
|
199
|
-
}
|
|
200
|
-
if (input.urlIncludes !== void 0 && !page.url.includes(input.urlIncludes)) {
|
|
201
|
-
return false;
|
|
202
|
-
}
|
|
203
|
-
return true;
|
|
204
|
-
});
|
|
205
|
-
if (match !== void 0) {
|
|
206
|
-
return match;
|
|
207
|
-
}
|
|
208
|
-
if (Date.now() >= timeoutAt) {
|
|
209
|
-
throw new Error("waitForPage timed out");
|
|
210
|
-
}
|
|
211
|
-
await delay(pollIntervalMs);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
async snapshot(mode = "action") {
|
|
215
|
-
return (await this.runtime.snapshot({ mode })).html;
|
|
216
|
-
}
|
|
217
|
-
async cookies(domain) {
|
|
218
|
-
return new SessionCookieJar(
|
|
219
|
-
await this.runtime.getCookies(domain === void 0 ? {} : { domain })
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
async storage(domain, type = "local") {
|
|
223
|
-
const snapshot = await this.runtime.getStorageSnapshot(domain === void 0 ? {} : { domain });
|
|
224
|
-
const domainSnapshot = pickStorageDomainSnapshot(snapshot, domain);
|
|
225
|
-
if (domainSnapshot === void 0) {
|
|
226
|
-
return {};
|
|
227
|
-
}
|
|
228
|
-
const entries = type === "local" ? domainSnapshot.localStorage : domainSnapshot.sessionStorage;
|
|
229
|
-
return Object.fromEntries(entries.map((entry) => [entry.key, entry.value]));
|
|
230
|
-
}
|
|
231
|
-
async state(domain) {
|
|
232
|
-
return this.runtime.getBrowserState(domain === void 0 ? {} : { domain });
|
|
233
|
-
}
|
|
234
|
-
async fetch(url, options = {}) {
|
|
235
|
-
const result = await this.runtime.fetch({
|
|
236
|
-
url,
|
|
237
|
-
...options
|
|
238
|
-
});
|
|
239
|
-
if (result.response === void 0) {
|
|
240
|
-
throw new Error(result.note ?? `session.fetch did not produce a response for ${url}`);
|
|
241
|
-
}
|
|
242
|
-
return toResponse(result.response);
|
|
243
|
-
}
|
|
244
|
-
async computerExecute(input) {
|
|
245
|
-
return this.runtime.computerExecute(input);
|
|
246
|
-
}
|
|
247
|
-
async route(input) {
|
|
248
|
-
return this.requireOwnedInstrumentationRuntime("route").route(input);
|
|
249
|
-
}
|
|
250
|
-
async interceptScript(input) {
|
|
251
|
-
return this.requireOwnedInstrumentationRuntime("interceptScript").interceptScript(input);
|
|
252
|
-
}
|
|
253
|
-
async close() {
|
|
254
|
-
if (this.browserManager === void 0 || this.browserManager.mode === "temporary") {
|
|
255
|
-
return this.runtime.close();
|
|
256
|
-
}
|
|
257
|
-
const output = await this.runtime.close();
|
|
258
|
-
await this.browserManager.close();
|
|
259
|
-
return output;
|
|
260
|
-
}
|
|
261
|
-
async disconnect() {
|
|
262
|
-
await this.runtime.disconnect();
|
|
263
|
-
}
|
|
264
|
-
requireOwnedInstrumentationRuntime(method) {
|
|
265
|
-
if (typeof this.runtime.route === "function" && typeof this.runtime.interceptScript === "function") {
|
|
266
|
-
return this.runtime;
|
|
267
|
-
}
|
|
268
|
-
throw new Error(`${method}() is not available for this session runtime.`);
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
function createUnsupportedBrowserController() {
|
|
272
|
-
const fail = async () => {
|
|
273
|
-
throw new Error("browser.* helpers are only available in local mode.");
|
|
274
|
-
};
|
|
275
|
-
return {
|
|
276
|
-
status: fail,
|
|
277
|
-
clone: fail,
|
|
278
|
-
reset: fail,
|
|
279
|
-
delete: fail
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
function normalizeTargetOptions(input) {
|
|
283
|
-
const hasElement = input.element !== void 0;
|
|
284
|
-
const hasSelector = input.selector !== void 0;
|
|
285
|
-
if (hasElement && hasSelector) {
|
|
286
|
-
throw new Error("Specify exactly one of element, selector, or persist.");
|
|
287
|
-
}
|
|
288
|
-
if (hasElement) {
|
|
289
|
-
return {
|
|
290
|
-
target: {
|
|
291
|
-
kind: "element",
|
|
292
|
-
element: input.element
|
|
293
|
-
},
|
|
294
|
-
...input.persist === void 0 ? {} : { persist: input.persist },
|
|
295
|
-
...input.captureNetwork === void 0 ? {} : { captureNetwork: input.captureNetwork }
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
if (hasSelector) {
|
|
299
|
-
return {
|
|
300
|
-
target: {
|
|
301
|
-
kind: "selector",
|
|
302
|
-
selector: input.selector
|
|
303
|
-
},
|
|
304
|
-
...input.persist === void 0 ? {} : { persist: input.persist },
|
|
305
|
-
...input.captureNetwork === void 0 ? {} : { captureNetwork: input.captureNetwork }
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
if (input.persist === void 0) {
|
|
309
|
-
throw new Error("Specify exactly one of element, selector, or persist.");
|
|
310
|
-
}
|
|
311
|
-
return {
|
|
312
|
-
target: {
|
|
313
|
-
kind: "persist",
|
|
314
|
-
persist: input.persist
|
|
315
|
-
},
|
|
316
|
-
...input.captureNetwork === void 0 ? {} : { captureNetwork: input.captureNetwork }
|
|
317
|
-
};
|
|
318
|
-
}
|
|
319
|
-
function pickStorageDomainSnapshot(snapshot, domain) {
|
|
320
|
-
if (snapshot.domains.length === 0) {
|
|
321
|
-
return void 0;
|
|
322
|
-
}
|
|
323
|
-
if (domain === void 0) {
|
|
324
|
-
return snapshot.domains[0];
|
|
325
|
-
}
|
|
326
|
-
return snapshot.domains.find((entry) => entry.domain === domain);
|
|
327
|
-
}
|
|
328
|
-
function toResponse(response) {
|
|
329
|
-
return new Response(decodeBody(response), {
|
|
330
|
-
status: response.status,
|
|
331
|
-
statusText: response.statusText,
|
|
332
|
-
headers: Object.fromEntries(response.headers.map((header) => [header.name, header.value]))
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
function decodeBody(response) {
|
|
336
|
-
if (response.body === void 0) {
|
|
337
|
-
return void 0;
|
|
338
|
-
}
|
|
339
|
-
return Uint8Array.from(Buffer.from(response.body.data, "base64"));
|
|
340
|
-
}
|
|
341
|
-
function delay(ms) {
|
|
342
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
export { Opensteer };
|
|
1
|
+
import './chunk-KCINASQC.js';
|
|
2
|
+
export { Opensteer } from './chunk-Y3ULLNOS.js';
|
|
3
|
+
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-KBO7DDPF.js';
|
|
346
4
|
//# sourceMappingURL=index.js.map
|
|
347
5
|
//# sourceMappingURL=index.js.map
|