@opensteer/runtime-core 0.1.6 → 0.2.0
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/README.md +13 -0
- package/dist/index.cjs +298 -234
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -16
- package/dist/index.d.ts +21 -16
- package/dist/index.js +296 -234
- package/dist/index.js.map +1 -1
- package/package.json +18 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OpensteerArtifactKind, ArtifactProvenance, TraceContext, HtmlSnapshot, DomSnapshot, CookieRecord, StorageSnapshot, ScriptSourceArtifactData, ArtifactRelation, ArtifactReference, OpensteerArtifact, ExternalBinaryLocation, OpensteerSemanticOperationName, OpensteerRequestPlanPayload, OpensteerRequestPlanFreshness, OpensteerAuthRecipePayload, OpensteerRecipePayload, OpensteerReverseCasePayload, OpensteerInteractionTracePayload, OpensteerReversePackagePayload, OpensteerReverseReportPayload, NetworkQueryRecord, NetworkResourceType, ObservationSink, ObservationSession, ObservationEvent, ObservationArtifact, ObservabilityConfig, ObservabilityProfile, TraceOutcome, OpensteerEvent, OpensteerError, TraceRecord, TraceBundle, ReplayElementPath, OpensteerBrowserOptions, OpensteerBrowserLaunchOptions, OpensteerBrowserContextOptions, OpensteerSessionInfo, OpensteerOpenInput, OpensteerOpenOutput, OpensteerPageListInput, OpensteerPageListOutput, OpensteerPageNewInput, OpensteerPageNewOutput, OpensteerPageActivateInput, OpensteerPageActivateOutput, OpensteerPageCloseInput, OpensteerPageCloseOutput, OpensteerPageGotoInput, OpensteerPageGotoOutput, OpensteerPageEvaluateInput, OpensteerPageEvaluateOutput, OpensteerAddInitScriptInput, OpensteerAddInitScriptOutput, OpensteerPageSnapshotInput, OpensteerPageSnapshotOutput, OpensteerDomClickInput, OpensteerActionResult, OpensteerDomHoverInput, OpensteerDomInputInput, OpensteerDomScrollInput, OpensteerDomExtractInput, OpensteerDomExtractOutput, OpensteerNetworkQueryInput, OpensteerNetworkQueryOutput,
|
|
1
|
+
import { OpensteerArtifactKind, ArtifactProvenance, TraceContext, HtmlSnapshot, DomSnapshot, CookieRecord, StorageSnapshot, ScriptSourceArtifactData, ArtifactRelation, ArtifactReference, OpensteerArtifact, ExternalBinaryLocation, OpensteerSemanticOperationName, OpensteerRequestPlanPayload, OpensteerRequestPlanFreshness, OpensteerAuthRecipePayload, OpensteerRecipePayload, OpensteerReverseCasePayload, OpensteerInteractionTracePayload, OpensteerReversePackagePayload, OpensteerReverseReportPayload, NetworkQueryRecord, NetworkResourceType, ObservationSink, ObservationSession, ObservationEvent, ObservationArtifact, ObservabilityConfig, ObservabilityProfile, TraceOutcome, OpensteerEvent, OpensteerError, TraceRecord, TraceBundle, ReplayElementPath, OpensteerBrowserOptions, OpensteerBrowserLaunchOptions, OpensteerBrowserContextOptions, OpensteerSessionInfo, OpensteerOpenInput, OpensteerOpenOutput, OpensteerPageListInput, OpensteerPageListOutput, OpensteerPageNewInput, OpensteerPageNewOutput, OpensteerPageActivateInput, OpensteerPageActivateOutput, OpensteerPageCloseInput, OpensteerPageCloseOutput, OpensteerPageGotoInput, OpensteerPageGotoOutput, OpensteerPageEvaluateInput, OpensteerPageEvaluateOutput, OpensteerAddInitScriptInput, OpensteerAddInitScriptOutput, OpensteerPageSnapshotInput, OpensteerPageSnapshotOutput, OpensteerDomClickInput, OpensteerActionResult, OpensteerDomHoverInput, OpensteerDomInputInput, OpensteerDomScrollInput, OpensteerDomExtractInput, OpensteerDomExtractOutput, OpensteerNetworkQueryInput, OpensteerNetworkQueryOutput, OpensteerNetworkDetailInput, OpensteerNetworkDetailOutput, OpensteerCaptureScriptsInput, OpensteerCaptureScriptsOutput, OpensteerArtifactReadInput, OpensteerArtifactReadOutput, OpensteerInteractionCaptureInput, OpensteerInteractionCaptureOutput, OpensteerInteractionGetInput, OpensteerInteractionGetOutput, OpensteerInteractionDiffInput, OpensteerInteractionDiffOutput, OpensteerInteractionReplayInput, OpensteerInteractionReplayOutput, OpensteerScriptBeautifyInput, OpensteerScriptBeautifyOutput, OpensteerScriptDeobfuscateInput, OpensteerScriptDeobfuscateOutput, OpensteerScriptSandboxInput, OpensteerScriptSandboxOutput, OpensteerCaptchaSolveInput, OpensteerCaptchaSolveOutput, OpensteerCookieQueryInput, OpensteerCookieQueryOutput, OpensteerStorageQueryInput, OpensteerStorageQueryOutput, OpensteerStateQueryInput, OpensteerStateQueryOutput, OpensteerSessionFetchInput, OpensteerSessionFetchOutput, OpensteerComputerExecuteInput, OpensteerComputerExecuteOutput, OpensteerSessionCloseOutput } from '@opensteer/protocol';
|
|
2
2
|
export { ReplayElementPath } from '@opensteer/protocol';
|
|
3
3
|
import { BrowserCoreEngine, PageRef, NetworkRecord, HeaderEntry, BodyPayload, SessionRef } from '@opensteer/browser-core';
|
|
4
4
|
|
|
@@ -329,6 +329,12 @@ interface SavedNetworkStore {
|
|
|
329
329
|
readonly tag?: string;
|
|
330
330
|
}): Promise<number>;
|
|
331
331
|
}
|
|
332
|
+
interface IterateSavedNetworkRecordBatchesOptions {
|
|
333
|
+
readonly batchSize?: number;
|
|
334
|
+
readonly includeBodies?: boolean;
|
|
335
|
+
}
|
|
336
|
+
declare function createSavedNetworkStore(rootPath: string): SavedNetworkStore;
|
|
337
|
+
declare function iterateSavedNetworkRecordBatches(rootPath: string, options?: IterateSavedNetworkRecordBatchesOptions): AsyncGenerator<readonly NetworkQueryRecord[]>;
|
|
332
338
|
|
|
333
339
|
interface ListObservationEventsInput {
|
|
334
340
|
readonly kind?: ObservationEvent["kind"];
|
|
@@ -477,7 +483,7 @@ type ElementPath = ReplayElementPath;
|
|
|
477
483
|
interface DomDescriptorPayload {
|
|
478
484
|
readonly kind: "dom-target";
|
|
479
485
|
readonly method: string;
|
|
480
|
-
readonly
|
|
486
|
+
readonly persist: string;
|
|
481
487
|
readonly path: ReplayElementPath;
|
|
482
488
|
readonly sourceUrl?: string;
|
|
483
489
|
}
|
|
@@ -491,7 +497,7 @@ interface DomDescriptorRecord {
|
|
|
491
497
|
}
|
|
492
498
|
interface DomWriteDescriptorInput {
|
|
493
499
|
readonly method: string;
|
|
494
|
-
readonly
|
|
500
|
+
readonly persist: string;
|
|
495
501
|
readonly path: ReplayElementPath;
|
|
496
502
|
readonly sourceUrl?: string;
|
|
497
503
|
readonly createdAt?: number;
|
|
@@ -499,7 +505,7 @@ interface DomWriteDescriptorInput {
|
|
|
499
505
|
}
|
|
500
506
|
interface DomReadDescriptorInput {
|
|
501
507
|
readonly method: string;
|
|
502
|
-
readonly
|
|
508
|
+
readonly persist: string;
|
|
503
509
|
}
|
|
504
510
|
|
|
505
511
|
interface DomDescriptorStore {
|
|
@@ -510,11 +516,11 @@ declare function createDomDescriptorStore(options: {
|
|
|
510
516
|
readonly root?: FilesystemOpensteerWorkspace;
|
|
511
517
|
readonly namespace?: string;
|
|
512
518
|
}): DomDescriptorStore;
|
|
513
|
-
declare function
|
|
519
|
+
declare function hashDomDescriptorPersist(persist: string): string;
|
|
514
520
|
declare function buildDomDescriptorKey(options: {
|
|
515
521
|
readonly namespace?: string;
|
|
516
522
|
readonly method: string;
|
|
517
|
-
readonly
|
|
523
|
+
readonly persist: string;
|
|
518
524
|
}): string;
|
|
519
525
|
declare function buildDomDescriptorPayload(input: DomWriteDescriptorInput): DomDescriptorPayload;
|
|
520
526
|
declare function buildDomDescriptorVersion(payload: DomDescriptorPayload): string;
|
|
@@ -658,6 +664,7 @@ interface OpensteerSessionRuntimeOptions {
|
|
|
658
664
|
}
|
|
659
665
|
interface RuntimeOperationOptions {
|
|
660
666
|
readonly signal?: AbortSignal;
|
|
667
|
+
readonly timeoutMs?: number;
|
|
661
668
|
}
|
|
662
669
|
declare class OpensteerSessionRuntime {
|
|
663
670
|
readonly workspace: string;
|
|
@@ -704,10 +711,7 @@ declare class OpensteerSessionRuntime {
|
|
|
704
711
|
scroll(input: OpensteerDomScrollInput, options?: RuntimeOperationOptions): Promise<OpensteerActionResult>;
|
|
705
712
|
extract(input: OpensteerDomExtractInput, options?: RuntimeOperationOptions): Promise<OpensteerDomExtractOutput>;
|
|
706
713
|
queryNetwork(input?: OpensteerNetworkQueryInput, options?: RuntimeOperationOptions): Promise<OpensteerNetworkQueryOutput>;
|
|
707
|
-
getNetworkDetail(input:
|
|
708
|
-
readonly recordId: string;
|
|
709
|
-
}, options?: RuntimeOperationOptions): Promise<OpensteerNetworkDetailOutput>;
|
|
710
|
-
replayNetwork(input: OpensteerNetworkReplayInput, options?: RuntimeOperationOptions): Promise<OpensteerNetworkReplayOutput>;
|
|
714
|
+
getNetworkDetail(input: OpensteerNetworkDetailInput, options?: RuntimeOperationOptions): Promise<OpensteerNetworkDetailOutput>;
|
|
711
715
|
captureScripts(input?: OpensteerCaptureScriptsInput, options?: RuntimeOperationOptions): Promise<OpensteerCaptureScriptsOutput>;
|
|
712
716
|
readArtifact(input: OpensteerArtifactReadInput, options?: RuntimeOperationOptions): Promise<OpensteerArtifactReadOutput>;
|
|
713
717
|
captureInteraction(input: OpensteerInteractionCaptureInput, options?: RuntimeOperationOptions): Promise<OpensteerInteractionCaptureOutput>;
|
|
@@ -733,6 +737,7 @@ declare class OpensteerSessionRuntime {
|
|
|
733
737
|
private runDomAction;
|
|
734
738
|
private prepareDomTarget;
|
|
735
739
|
private queryLiveNetwork;
|
|
740
|
+
private invalidateLiveSnapshotCounters;
|
|
736
741
|
private captureScriptsInternal;
|
|
737
742
|
private materializeCapturedScript;
|
|
738
743
|
private runMutationCapturedOperation;
|
|
@@ -742,13 +747,14 @@ declare class OpensteerSessionRuntime {
|
|
|
742
747
|
private resolveNetworkRecordByRecordId;
|
|
743
748
|
private buildNetworkSummaryRecords;
|
|
744
749
|
private buildNetworkDetail;
|
|
750
|
+
private probeTransportsForRecord;
|
|
745
751
|
private buildRedirectChain;
|
|
746
752
|
private readCookieQueryOutput;
|
|
747
753
|
private readStorageQueryOutput;
|
|
748
754
|
private readBrowserStateOutput;
|
|
749
|
-
private executeNetworkReplay;
|
|
750
755
|
private executeSessionFetch;
|
|
751
756
|
private executeReplayTransportAttempt;
|
|
757
|
+
private executeReplayTransportAttemptWithinBudget;
|
|
752
758
|
private executeFetchTransportAttempt;
|
|
753
759
|
private resolveInteractionTraceById;
|
|
754
760
|
private captureReverseStateSnapshot;
|
|
@@ -808,6 +814,7 @@ declare class OpensteerSessionRuntime {
|
|
|
808
814
|
|
|
809
815
|
interface OpensteerRuntimeOperationOptions {
|
|
810
816
|
readonly signal?: AbortSignal;
|
|
817
|
+
readonly timeoutMs?: number;
|
|
811
818
|
}
|
|
812
819
|
interface OpensteerSemanticRuntime {
|
|
813
820
|
info(options?: OpensteerRuntimeOperationOptions): Promise<OpensteerSessionInfo>;
|
|
@@ -826,10 +833,7 @@ interface OpensteerSemanticRuntime {
|
|
|
826
833
|
scroll(input: OpensteerDomScrollInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerActionResult>;
|
|
827
834
|
extract(input: OpensteerDomExtractInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerDomExtractOutput>;
|
|
828
835
|
queryNetwork(input?: OpensteerNetworkQueryInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkQueryOutput>;
|
|
829
|
-
getNetworkDetail(input:
|
|
830
|
-
readonly recordId: string;
|
|
831
|
-
}, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkDetailOutput>;
|
|
832
|
-
replayNetwork(input: OpensteerNetworkReplayInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkReplayOutput>;
|
|
836
|
+
getNetworkDetail(input: OpensteerNetworkDetailInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkDetailOutput>;
|
|
833
837
|
captureInteraction(input: OpensteerInteractionCaptureInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerInteractionCaptureOutput>;
|
|
834
838
|
getInteraction(input: OpensteerInteractionGetInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerInteractionGetOutput>;
|
|
835
839
|
diffInteraction(input: OpensteerInteractionDiffInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerInteractionDiffOutput>;
|
|
@@ -850,6 +854,7 @@ interface OpensteerSemanticRuntime {
|
|
|
850
854
|
|
|
851
855
|
declare function dispatchSemanticOperation(runtime: OpensteerSemanticRuntime, operation: OpensteerSemanticOperationName, input: unknown, options?: {
|
|
852
856
|
readonly signal?: AbortSignal;
|
|
857
|
+
readonly timeoutMs?: number;
|
|
853
858
|
}): Promise<unknown>;
|
|
854
859
|
|
|
855
860
|
type RecordedActionKind = "navigate" | "click" | "dblclick" | "type" | "keypress" | "scroll" | "select-option" | "new-tab" | "close-tab" | "switch-tab" | "go-back" | "go-forward" | "reload";
|
|
@@ -1095,4 +1100,4 @@ declare class FlowRecorderCollector {
|
|
|
1095
1100
|
|
|
1096
1101
|
declare function generateReplayScript(options: CodegenOptions): string;
|
|
1097
1102
|
|
|
1098
|
-
export { type ArtifactManifest, type ArtifactPayloadType, type ArtifactScope, type ClickRecordedActionDetail, type CloseTabRecordedActionDetail, type CloudReplayTarget, type CodegenOptions, type CreateFilesystemOpensteerWorkspaceOptions, type DblclickRecordedActionDetail, type DescriptorRecord, type DescriptorRegistryStore, type DomDescriptorPayload, type DomDescriptorRecord, type DomDescriptorStore, type DomReadDescriptorInput, type DomWriteDescriptorInput, FLOW_RECORDER_DRAIN_SCRIPT, FLOW_RECORDER_INSTALL_SCRIPT, FilesystemArtifactStore, type FilesystemObservationStore, type FilesystemOpensteerWorkspace, FlowRecorderCollector, type FlowRecorderCollectorOptions, type FlowRecorderSnapshot, type GoBackRecordedActionDetail, type GoForwardRecordedActionDetail, type InteractionTraceRecord, type InteractionTraceRegistryStore, type KeypressRecordedActionDetail, type ListObservationArtifactsInput, type ListObservationEventsInput, type ListRegistryRecordsInput, type LocalReplayTarget, type NavigateRecordedActionDetail, type NewTabRecordedActionDetail, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, OPENSTEER_RUNTIME_CORE_VERSION, type OpensteerArtifactStore, type OpensteerEngineFactory, type OpensteerEngineFactoryOptions, type OpensteerExtractionDescriptorPayload, type OpensteerExtractionDescriptorRecord, type OpensteerExtractionDescriptorStore, type OpensteerRuntimeOperationOptions, type OpensteerRuntimeWorkspace, type OpensteerSemanticRuntime, OpensteerSessionRuntime, type OpensteerSessionRuntimeOptions, type OpensteerWorkspaceManifest, type ProtocolArtifactDelivery, type RawFlowRecorderClickEvent, type RawFlowRecorderDblclickEvent, type RawFlowRecorderEvent, type RawFlowRecorderGoBackEvent, type RawFlowRecorderGoForwardEvent, type RawFlowRecorderKeypressEvent, type RawFlowRecorderNavigateEvent, type RawFlowRecorderReloadEvent, type RawFlowRecorderScrollEvent, type RawFlowRecorderSelectOptionEvent, type RawFlowRecorderTypeEvent, type RecordedAction, type RecordedActionDetail, type RecordedActionKind, type RecorderInitialPageState, type RecorderPageState, type RecorderRuntimeAdapter, type RecordingOptions, type RegistryProvenance, type ReloadRecordedActionDetail, type ReplayTarget, type ResolveRegistryRecordInput, type ScrollRecordedActionDetail, type SelectOptionRecordedActionDetail, type StoredArtifactPayload, type StoredArtifactRecord, type StructuredArtifactKind, type SwitchTabRecordedActionDetail, type TypeRecordedActionDetail, type WriteBinaryArtifactInput, type WriteDescriptorInput, type WriteInteractionTraceInput, type WriteStructuredArtifactInput, buildDomDescriptorKey, buildDomDescriptorPayload, buildDomDescriptorVersion, createArtifactStore, createDomDescriptorStore, createFilesystemOpensteerWorkspace, createFlowRecorderInstallScript, createObservationStore, createOpensteerExtractionDescriptorStore, dispatchSemanticOperation, generateReplayScript,
|
|
1103
|
+
export { type ArtifactManifest, type ArtifactPayloadType, type ArtifactScope, type ClickRecordedActionDetail, type CloseTabRecordedActionDetail, type CloudReplayTarget, type CodegenOptions, type CreateFilesystemOpensteerWorkspaceOptions, type DblclickRecordedActionDetail, type DescriptorRecord, type DescriptorRegistryStore, type DomDescriptorPayload, type DomDescriptorRecord, type DomDescriptorStore, type DomReadDescriptorInput, type DomWriteDescriptorInput, FLOW_RECORDER_DRAIN_SCRIPT, FLOW_RECORDER_INSTALL_SCRIPT, FilesystemArtifactStore, type FilesystemObservationStore, type FilesystemOpensteerWorkspace, FlowRecorderCollector, type FlowRecorderCollectorOptions, type FlowRecorderSnapshot, type GoBackRecordedActionDetail, type GoForwardRecordedActionDetail, type InteractionTraceRecord, type InteractionTraceRegistryStore, type IterateSavedNetworkRecordBatchesOptions, type KeypressRecordedActionDetail, type ListObservationArtifactsInput, type ListObservationEventsInput, type ListRegistryRecordsInput, type LocalReplayTarget, type NavigateRecordedActionDetail, type NewTabRecordedActionDetail, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, OPENSTEER_RUNTIME_CORE_VERSION, type OpensteerArtifactStore, type OpensteerEngineFactory, type OpensteerEngineFactoryOptions, type OpensteerExtractionDescriptorPayload, type OpensteerExtractionDescriptorRecord, type OpensteerExtractionDescriptorStore, type OpensteerRuntimeOperationOptions, type OpensteerRuntimeWorkspace, type OpensteerSemanticRuntime, OpensteerSessionRuntime, type OpensteerSessionRuntimeOptions, type OpensteerWorkspaceManifest, type ProtocolArtifactDelivery, type RawFlowRecorderClickEvent, type RawFlowRecorderDblclickEvent, type RawFlowRecorderEvent, type RawFlowRecorderGoBackEvent, type RawFlowRecorderGoForwardEvent, type RawFlowRecorderKeypressEvent, type RawFlowRecorderNavigateEvent, type RawFlowRecorderReloadEvent, type RawFlowRecorderScrollEvent, type RawFlowRecorderSelectOptionEvent, type RawFlowRecorderTypeEvent, type RecordedAction, type RecordedActionDetail, type RecordedActionKind, type RecorderInitialPageState, type RecorderPageState, type RecorderRuntimeAdapter, type RecordingOptions, type RegistryProvenance, type ReloadRecordedActionDetail, type ReplayTarget, type RequestPlanRecord, type RequestPlanRegistryStore, type ResolveRegistryRecordInput, type SavedNetworkBodyWriteMode, type SavedNetworkQueryInput, type SavedNetworkSaveOptions, type SavedNetworkStore, type ScrollRecordedActionDetail, type SelectOptionRecordedActionDetail, type StoredArtifactPayload, type StoredArtifactRecord, type StructuredArtifactKind, type SwitchTabRecordedActionDetail, type TypeRecordedActionDetail, type UpdateRequestPlanFreshnessInput, type WriteBinaryArtifactInput, type WriteDescriptorInput, type WriteInteractionTraceInput, type WriteRequestPlanInput, type WriteStructuredArtifactInput, buildDomDescriptorKey, buildDomDescriptorPayload, buildDomDescriptorVersion, createArtifactStore, createDomDescriptorStore, createFilesystemOpensteerWorkspace, createFlowRecorderInstallScript, createObservationStore, createOpensteerExtractionDescriptorStore, createSavedNetworkStore, dispatchSemanticOperation, generateReplayScript, hashDomDescriptorPersist, iterateSavedNetworkRecordBatches, manifestToExternalBinaryLocation, normalizeObservabilityConfig, normalizeWorkspaceId, parseDomDescriptorRecord, parseExtractionDescriptorRecord, resolveFilesystemWorkspacePath, sanitizeReplayElementPath };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OpensteerArtifactKind, ArtifactProvenance, TraceContext, HtmlSnapshot, DomSnapshot, CookieRecord, StorageSnapshot, ScriptSourceArtifactData, ArtifactRelation, ArtifactReference, OpensteerArtifact, ExternalBinaryLocation, OpensteerSemanticOperationName, OpensteerRequestPlanPayload, OpensteerRequestPlanFreshness, OpensteerAuthRecipePayload, OpensteerRecipePayload, OpensteerReverseCasePayload, OpensteerInteractionTracePayload, OpensteerReversePackagePayload, OpensteerReverseReportPayload, NetworkQueryRecord, NetworkResourceType, ObservationSink, ObservationSession, ObservationEvent, ObservationArtifact, ObservabilityConfig, ObservabilityProfile, TraceOutcome, OpensteerEvent, OpensteerError, TraceRecord, TraceBundle, ReplayElementPath, OpensteerBrowserOptions, OpensteerBrowserLaunchOptions, OpensteerBrowserContextOptions, OpensteerSessionInfo, OpensteerOpenInput, OpensteerOpenOutput, OpensteerPageListInput, OpensteerPageListOutput, OpensteerPageNewInput, OpensteerPageNewOutput, OpensteerPageActivateInput, OpensteerPageActivateOutput, OpensteerPageCloseInput, OpensteerPageCloseOutput, OpensteerPageGotoInput, OpensteerPageGotoOutput, OpensteerPageEvaluateInput, OpensteerPageEvaluateOutput, OpensteerAddInitScriptInput, OpensteerAddInitScriptOutput, OpensteerPageSnapshotInput, OpensteerPageSnapshotOutput, OpensteerDomClickInput, OpensteerActionResult, OpensteerDomHoverInput, OpensteerDomInputInput, OpensteerDomScrollInput, OpensteerDomExtractInput, OpensteerDomExtractOutput, OpensteerNetworkQueryInput, OpensteerNetworkQueryOutput,
|
|
1
|
+
import { OpensteerArtifactKind, ArtifactProvenance, TraceContext, HtmlSnapshot, DomSnapshot, CookieRecord, StorageSnapshot, ScriptSourceArtifactData, ArtifactRelation, ArtifactReference, OpensteerArtifact, ExternalBinaryLocation, OpensteerSemanticOperationName, OpensteerRequestPlanPayload, OpensteerRequestPlanFreshness, OpensteerAuthRecipePayload, OpensteerRecipePayload, OpensteerReverseCasePayload, OpensteerInteractionTracePayload, OpensteerReversePackagePayload, OpensteerReverseReportPayload, NetworkQueryRecord, NetworkResourceType, ObservationSink, ObservationSession, ObservationEvent, ObservationArtifact, ObservabilityConfig, ObservabilityProfile, TraceOutcome, OpensteerEvent, OpensteerError, TraceRecord, TraceBundle, ReplayElementPath, OpensteerBrowserOptions, OpensteerBrowserLaunchOptions, OpensteerBrowserContextOptions, OpensteerSessionInfo, OpensteerOpenInput, OpensteerOpenOutput, OpensteerPageListInput, OpensteerPageListOutput, OpensteerPageNewInput, OpensteerPageNewOutput, OpensteerPageActivateInput, OpensteerPageActivateOutput, OpensteerPageCloseInput, OpensteerPageCloseOutput, OpensteerPageGotoInput, OpensteerPageGotoOutput, OpensteerPageEvaluateInput, OpensteerPageEvaluateOutput, OpensteerAddInitScriptInput, OpensteerAddInitScriptOutput, OpensteerPageSnapshotInput, OpensteerPageSnapshotOutput, OpensteerDomClickInput, OpensteerActionResult, OpensteerDomHoverInput, OpensteerDomInputInput, OpensteerDomScrollInput, OpensteerDomExtractInput, OpensteerDomExtractOutput, OpensteerNetworkQueryInput, OpensteerNetworkQueryOutput, OpensteerNetworkDetailInput, OpensteerNetworkDetailOutput, OpensteerCaptureScriptsInput, OpensteerCaptureScriptsOutput, OpensteerArtifactReadInput, OpensteerArtifactReadOutput, OpensteerInteractionCaptureInput, OpensteerInteractionCaptureOutput, OpensteerInteractionGetInput, OpensteerInteractionGetOutput, OpensteerInteractionDiffInput, OpensteerInteractionDiffOutput, OpensteerInteractionReplayInput, OpensteerInteractionReplayOutput, OpensteerScriptBeautifyInput, OpensteerScriptBeautifyOutput, OpensteerScriptDeobfuscateInput, OpensteerScriptDeobfuscateOutput, OpensteerScriptSandboxInput, OpensteerScriptSandboxOutput, OpensteerCaptchaSolveInput, OpensteerCaptchaSolveOutput, OpensteerCookieQueryInput, OpensteerCookieQueryOutput, OpensteerStorageQueryInput, OpensteerStorageQueryOutput, OpensteerStateQueryInput, OpensteerStateQueryOutput, OpensteerSessionFetchInput, OpensteerSessionFetchOutput, OpensteerComputerExecuteInput, OpensteerComputerExecuteOutput, OpensteerSessionCloseOutput } from '@opensteer/protocol';
|
|
2
2
|
export { ReplayElementPath } from '@opensteer/protocol';
|
|
3
3
|
import { BrowserCoreEngine, PageRef, NetworkRecord, HeaderEntry, BodyPayload, SessionRef } from '@opensteer/browser-core';
|
|
4
4
|
|
|
@@ -329,6 +329,12 @@ interface SavedNetworkStore {
|
|
|
329
329
|
readonly tag?: string;
|
|
330
330
|
}): Promise<number>;
|
|
331
331
|
}
|
|
332
|
+
interface IterateSavedNetworkRecordBatchesOptions {
|
|
333
|
+
readonly batchSize?: number;
|
|
334
|
+
readonly includeBodies?: boolean;
|
|
335
|
+
}
|
|
336
|
+
declare function createSavedNetworkStore(rootPath: string): SavedNetworkStore;
|
|
337
|
+
declare function iterateSavedNetworkRecordBatches(rootPath: string, options?: IterateSavedNetworkRecordBatchesOptions): AsyncGenerator<readonly NetworkQueryRecord[]>;
|
|
332
338
|
|
|
333
339
|
interface ListObservationEventsInput {
|
|
334
340
|
readonly kind?: ObservationEvent["kind"];
|
|
@@ -477,7 +483,7 @@ type ElementPath = ReplayElementPath;
|
|
|
477
483
|
interface DomDescriptorPayload {
|
|
478
484
|
readonly kind: "dom-target";
|
|
479
485
|
readonly method: string;
|
|
480
|
-
readonly
|
|
486
|
+
readonly persist: string;
|
|
481
487
|
readonly path: ReplayElementPath;
|
|
482
488
|
readonly sourceUrl?: string;
|
|
483
489
|
}
|
|
@@ -491,7 +497,7 @@ interface DomDescriptorRecord {
|
|
|
491
497
|
}
|
|
492
498
|
interface DomWriteDescriptorInput {
|
|
493
499
|
readonly method: string;
|
|
494
|
-
readonly
|
|
500
|
+
readonly persist: string;
|
|
495
501
|
readonly path: ReplayElementPath;
|
|
496
502
|
readonly sourceUrl?: string;
|
|
497
503
|
readonly createdAt?: number;
|
|
@@ -499,7 +505,7 @@ interface DomWriteDescriptorInput {
|
|
|
499
505
|
}
|
|
500
506
|
interface DomReadDescriptorInput {
|
|
501
507
|
readonly method: string;
|
|
502
|
-
readonly
|
|
508
|
+
readonly persist: string;
|
|
503
509
|
}
|
|
504
510
|
|
|
505
511
|
interface DomDescriptorStore {
|
|
@@ -510,11 +516,11 @@ declare function createDomDescriptorStore(options: {
|
|
|
510
516
|
readonly root?: FilesystemOpensteerWorkspace;
|
|
511
517
|
readonly namespace?: string;
|
|
512
518
|
}): DomDescriptorStore;
|
|
513
|
-
declare function
|
|
519
|
+
declare function hashDomDescriptorPersist(persist: string): string;
|
|
514
520
|
declare function buildDomDescriptorKey(options: {
|
|
515
521
|
readonly namespace?: string;
|
|
516
522
|
readonly method: string;
|
|
517
|
-
readonly
|
|
523
|
+
readonly persist: string;
|
|
518
524
|
}): string;
|
|
519
525
|
declare function buildDomDescriptorPayload(input: DomWriteDescriptorInput): DomDescriptorPayload;
|
|
520
526
|
declare function buildDomDescriptorVersion(payload: DomDescriptorPayload): string;
|
|
@@ -658,6 +664,7 @@ interface OpensteerSessionRuntimeOptions {
|
|
|
658
664
|
}
|
|
659
665
|
interface RuntimeOperationOptions {
|
|
660
666
|
readonly signal?: AbortSignal;
|
|
667
|
+
readonly timeoutMs?: number;
|
|
661
668
|
}
|
|
662
669
|
declare class OpensteerSessionRuntime {
|
|
663
670
|
readonly workspace: string;
|
|
@@ -704,10 +711,7 @@ declare class OpensteerSessionRuntime {
|
|
|
704
711
|
scroll(input: OpensteerDomScrollInput, options?: RuntimeOperationOptions): Promise<OpensteerActionResult>;
|
|
705
712
|
extract(input: OpensteerDomExtractInput, options?: RuntimeOperationOptions): Promise<OpensteerDomExtractOutput>;
|
|
706
713
|
queryNetwork(input?: OpensteerNetworkQueryInput, options?: RuntimeOperationOptions): Promise<OpensteerNetworkQueryOutput>;
|
|
707
|
-
getNetworkDetail(input:
|
|
708
|
-
readonly recordId: string;
|
|
709
|
-
}, options?: RuntimeOperationOptions): Promise<OpensteerNetworkDetailOutput>;
|
|
710
|
-
replayNetwork(input: OpensteerNetworkReplayInput, options?: RuntimeOperationOptions): Promise<OpensteerNetworkReplayOutput>;
|
|
714
|
+
getNetworkDetail(input: OpensteerNetworkDetailInput, options?: RuntimeOperationOptions): Promise<OpensteerNetworkDetailOutput>;
|
|
711
715
|
captureScripts(input?: OpensteerCaptureScriptsInput, options?: RuntimeOperationOptions): Promise<OpensteerCaptureScriptsOutput>;
|
|
712
716
|
readArtifact(input: OpensteerArtifactReadInput, options?: RuntimeOperationOptions): Promise<OpensteerArtifactReadOutput>;
|
|
713
717
|
captureInteraction(input: OpensteerInteractionCaptureInput, options?: RuntimeOperationOptions): Promise<OpensteerInteractionCaptureOutput>;
|
|
@@ -733,6 +737,7 @@ declare class OpensteerSessionRuntime {
|
|
|
733
737
|
private runDomAction;
|
|
734
738
|
private prepareDomTarget;
|
|
735
739
|
private queryLiveNetwork;
|
|
740
|
+
private invalidateLiveSnapshotCounters;
|
|
736
741
|
private captureScriptsInternal;
|
|
737
742
|
private materializeCapturedScript;
|
|
738
743
|
private runMutationCapturedOperation;
|
|
@@ -742,13 +747,14 @@ declare class OpensteerSessionRuntime {
|
|
|
742
747
|
private resolveNetworkRecordByRecordId;
|
|
743
748
|
private buildNetworkSummaryRecords;
|
|
744
749
|
private buildNetworkDetail;
|
|
750
|
+
private probeTransportsForRecord;
|
|
745
751
|
private buildRedirectChain;
|
|
746
752
|
private readCookieQueryOutput;
|
|
747
753
|
private readStorageQueryOutput;
|
|
748
754
|
private readBrowserStateOutput;
|
|
749
|
-
private executeNetworkReplay;
|
|
750
755
|
private executeSessionFetch;
|
|
751
756
|
private executeReplayTransportAttempt;
|
|
757
|
+
private executeReplayTransportAttemptWithinBudget;
|
|
752
758
|
private executeFetchTransportAttempt;
|
|
753
759
|
private resolveInteractionTraceById;
|
|
754
760
|
private captureReverseStateSnapshot;
|
|
@@ -808,6 +814,7 @@ declare class OpensteerSessionRuntime {
|
|
|
808
814
|
|
|
809
815
|
interface OpensteerRuntimeOperationOptions {
|
|
810
816
|
readonly signal?: AbortSignal;
|
|
817
|
+
readonly timeoutMs?: number;
|
|
811
818
|
}
|
|
812
819
|
interface OpensteerSemanticRuntime {
|
|
813
820
|
info(options?: OpensteerRuntimeOperationOptions): Promise<OpensteerSessionInfo>;
|
|
@@ -826,10 +833,7 @@ interface OpensteerSemanticRuntime {
|
|
|
826
833
|
scroll(input: OpensteerDomScrollInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerActionResult>;
|
|
827
834
|
extract(input: OpensteerDomExtractInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerDomExtractOutput>;
|
|
828
835
|
queryNetwork(input?: OpensteerNetworkQueryInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkQueryOutput>;
|
|
829
|
-
getNetworkDetail(input:
|
|
830
|
-
readonly recordId: string;
|
|
831
|
-
}, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkDetailOutput>;
|
|
832
|
-
replayNetwork(input: OpensteerNetworkReplayInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkReplayOutput>;
|
|
836
|
+
getNetworkDetail(input: OpensteerNetworkDetailInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkDetailOutput>;
|
|
833
837
|
captureInteraction(input: OpensteerInteractionCaptureInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerInteractionCaptureOutput>;
|
|
834
838
|
getInteraction(input: OpensteerInteractionGetInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerInteractionGetOutput>;
|
|
835
839
|
diffInteraction(input: OpensteerInteractionDiffInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerInteractionDiffOutput>;
|
|
@@ -850,6 +854,7 @@ interface OpensteerSemanticRuntime {
|
|
|
850
854
|
|
|
851
855
|
declare function dispatchSemanticOperation(runtime: OpensteerSemanticRuntime, operation: OpensteerSemanticOperationName, input: unknown, options?: {
|
|
852
856
|
readonly signal?: AbortSignal;
|
|
857
|
+
readonly timeoutMs?: number;
|
|
853
858
|
}): Promise<unknown>;
|
|
854
859
|
|
|
855
860
|
type RecordedActionKind = "navigate" | "click" | "dblclick" | "type" | "keypress" | "scroll" | "select-option" | "new-tab" | "close-tab" | "switch-tab" | "go-back" | "go-forward" | "reload";
|
|
@@ -1095,4 +1100,4 @@ declare class FlowRecorderCollector {
|
|
|
1095
1100
|
|
|
1096
1101
|
declare function generateReplayScript(options: CodegenOptions): string;
|
|
1097
1102
|
|
|
1098
|
-
export { type ArtifactManifest, type ArtifactPayloadType, type ArtifactScope, type ClickRecordedActionDetail, type CloseTabRecordedActionDetail, type CloudReplayTarget, type CodegenOptions, type CreateFilesystemOpensteerWorkspaceOptions, type DblclickRecordedActionDetail, type DescriptorRecord, type DescriptorRegistryStore, type DomDescriptorPayload, type DomDescriptorRecord, type DomDescriptorStore, type DomReadDescriptorInput, type DomWriteDescriptorInput, FLOW_RECORDER_DRAIN_SCRIPT, FLOW_RECORDER_INSTALL_SCRIPT, FilesystemArtifactStore, type FilesystemObservationStore, type FilesystemOpensteerWorkspace, FlowRecorderCollector, type FlowRecorderCollectorOptions, type FlowRecorderSnapshot, type GoBackRecordedActionDetail, type GoForwardRecordedActionDetail, type InteractionTraceRecord, type InteractionTraceRegistryStore, type KeypressRecordedActionDetail, type ListObservationArtifactsInput, type ListObservationEventsInput, type ListRegistryRecordsInput, type LocalReplayTarget, type NavigateRecordedActionDetail, type NewTabRecordedActionDetail, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, OPENSTEER_RUNTIME_CORE_VERSION, type OpensteerArtifactStore, type OpensteerEngineFactory, type OpensteerEngineFactoryOptions, type OpensteerExtractionDescriptorPayload, type OpensteerExtractionDescriptorRecord, type OpensteerExtractionDescriptorStore, type OpensteerRuntimeOperationOptions, type OpensteerRuntimeWorkspace, type OpensteerSemanticRuntime, OpensteerSessionRuntime, type OpensteerSessionRuntimeOptions, type OpensteerWorkspaceManifest, type ProtocolArtifactDelivery, type RawFlowRecorderClickEvent, type RawFlowRecorderDblclickEvent, type RawFlowRecorderEvent, type RawFlowRecorderGoBackEvent, type RawFlowRecorderGoForwardEvent, type RawFlowRecorderKeypressEvent, type RawFlowRecorderNavigateEvent, type RawFlowRecorderReloadEvent, type RawFlowRecorderScrollEvent, type RawFlowRecorderSelectOptionEvent, type RawFlowRecorderTypeEvent, type RecordedAction, type RecordedActionDetail, type RecordedActionKind, type RecorderInitialPageState, type RecorderPageState, type RecorderRuntimeAdapter, type RecordingOptions, type RegistryProvenance, type ReloadRecordedActionDetail, type ReplayTarget, type ResolveRegistryRecordInput, type ScrollRecordedActionDetail, type SelectOptionRecordedActionDetail, type StoredArtifactPayload, type StoredArtifactRecord, type StructuredArtifactKind, type SwitchTabRecordedActionDetail, type TypeRecordedActionDetail, type WriteBinaryArtifactInput, type WriteDescriptorInput, type WriteInteractionTraceInput, type WriteStructuredArtifactInput, buildDomDescriptorKey, buildDomDescriptorPayload, buildDomDescriptorVersion, createArtifactStore, createDomDescriptorStore, createFilesystemOpensteerWorkspace, createFlowRecorderInstallScript, createObservationStore, createOpensteerExtractionDescriptorStore, dispatchSemanticOperation, generateReplayScript,
|
|
1103
|
+
export { type ArtifactManifest, type ArtifactPayloadType, type ArtifactScope, type ClickRecordedActionDetail, type CloseTabRecordedActionDetail, type CloudReplayTarget, type CodegenOptions, type CreateFilesystemOpensteerWorkspaceOptions, type DblclickRecordedActionDetail, type DescriptorRecord, type DescriptorRegistryStore, type DomDescriptorPayload, type DomDescriptorRecord, type DomDescriptorStore, type DomReadDescriptorInput, type DomWriteDescriptorInput, FLOW_RECORDER_DRAIN_SCRIPT, FLOW_RECORDER_INSTALL_SCRIPT, FilesystemArtifactStore, type FilesystemObservationStore, type FilesystemOpensteerWorkspace, FlowRecorderCollector, type FlowRecorderCollectorOptions, type FlowRecorderSnapshot, type GoBackRecordedActionDetail, type GoForwardRecordedActionDetail, type InteractionTraceRecord, type InteractionTraceRegistryStore, type IterateSavedNetworkRecordBatchesOptions, type KeypressRecordedActionDetail, type ListObservationArtifactsInput, type ListObservationEventsInput, type ListRegistryRecordsInput, type LocalReplayTarget, type NavigateRecordedActionDetail, type NewTabRecordedActionDetail, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, OPENSTEER_RUNTIME_CORE_VERSION, type OpensteerArtifactStore, type OpensteerEngineFactory, type OpensteerEngineFactoryOptions, type OpensteerExtractionDescriptorPayload, type OpensteerExtractionDescriptorRecord, type OpensteerExtractionDescriptorStore, type OpensteerRuntimeOperationOptions, type OpensteerRuntimeWorkspace, type OpensteerSemanticRuntime, OpensteerSessionRuntime, type OpensteerSessionRuntimeOptions, type OpensteerWorkspaceManifest, type ProtocolArtifactDelivery, type RawFlowRecorderClickEvent, type RawFlowRecorderDblclickEvent, type RawFlowRecorderEvent, type RawFlowRecorderGoBackEvent, type RawFlowRecorderGoForwardEvent, type RawFlowRecorderKeypressEvent, type RawFlowRecorderNavigateEvent, type RawFlowRecorderReloadEvent, type RawFlowRecorderScrollEvent, type RawFlowRecorderSelectOptionEvent, type RawFlowRecorderTypeEvent, type RecordedAction, type RecordedActionDetail, type RecordedActionKind, type RecorderInitialPageState, type RecorderPageState, type RecorderRuntimeAdapter, type RecordingOptions, type RegistryProvenance, type ReloadRecordedActionDetail, type ReplayTarget, type RequestPlanRecord, type RequestPlanRegistryStore, type ResolveRegistryRecordInput, type SavedNetworkBodyWriteMode, type SavedNetworkQueryInput, type SavedNetworkSaveOptions, type SavedNetworkStore, type ScrollRecordedActionDetail, type SelectOptionRecordedActionDetail, type StoredArtifactPayload, type StoredArtifactRecord, type StructuredArtifactKind, type SwitchTabRecordedActionDetail, type TypeRecordedActionDetail, type UpdateRequestPlanFreshnessInput, type WriteBinaryArtifactInput, type WriteDescriptorInput, type WriteInteractionTraceInput, type WriteRequestPlanInput, type WriteStructuredArtifactInput, buildDomDescriptorKey, buildDomDescriptorPayload, buildDomDescriptorVersion, createArtifactStore, createDomDescriptorStore, createFilesystemOpensteerWorkspace, createFlowRecorderInstallScript, createObservationStore, createOpensteerExtractionDescriptorStore, createSavedNetworkStore, dispatchSemanticOperation, generateReplayScript, hashDomDescriptorPersist, iterateSavedNetworkRecordBatches, manifestToExternalBinaryLocation, normalizeObservabilityConfig, normalizeWorkspaceId, parseDomDescriptorRecord, parseExtractionDescriptorRecord, resolveFilesystemWorkspacePath, sanitizeReplayElementPath };
|