@opensteer/runtime-core 0.1.0 → 0.1.2
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.cjs +1290 -776
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +147 -20
- package/dist/index.d.ts +147 -20
- package/dist/index.js +1283 -778
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BrowserCoreEngine, PageRef, NetworkRecord, HeaderEntry, BodyPayload, SessionRef } from '@opensteer/browser-core';
|
|
2
|
-
import { OpensteerSemanticOperationName, OpensteerArtifactKind, ArtifactProvenance, TraceContext, HtmlSnapshot, DomSnapshot, CookieRecord, StorageSnapshot, ScriptSourceArtifactData, ArtifactRelation, ArtifactReference, OpensteerArtifact,
|
|
2
|
+
import { OpensteerSemanticOperationName, OpensteerArtifactKind, ArtifactProvenance, TraceContext, HtmlSnapshot, DomSnapshot, CookieRecord, StorageSnapshot, ScriptSourceArtifactData, ArtifactRelation, ArtifactReference, OpensteerArtifact, OpensteerAuthRecipePayload, OpensteerRequestPlanPayload, OpensteerRequestPlanFreshness, OpensteerRecipePayload, OpensteerReverseCasePayload, OpensteerInteractionTracePayload, OpensteerReversePackagePayload, OpensteerReverseReportPayload, NetworkQueryRecord, NetworkResourceType, 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, OpensteerNetworkTagInput, OpensteerNetworkTagOutput, OpensteerNetworkClearInput, OpensteerNetworkClearOutput, OpensteerCaptureScriptsInput, OpensteerCaptureScriptsOutput, OpensteerNetworkMinimizeInput, OpensteerNetworkMinimizeOutput, OpensteerNetworkDiffInput, OpensteerNetworkDiffOutput, OpensteerArtifactReadInput, OpensteerArtifactReadOutput, OpensteerTransportProbeInput, OpensteerTransportProbeOutput, OpensteerReverseDiscoverInput, OpensteerReverseDiscoverOutput, OpensteerReverseQueryInput, OpensteerReverseQueryOutput, OpensteerReversePackageCreateInput, OpensteerReversePackageCreateOutput, OpensteerReversePackageRunInput, OpensteerReversePackageRunOutput, OpensteerReverseExportInput, OpensteerReverseExportOutput, OpensteerReverseReportInput, OpensteerReverseReportOutput, OpensteerReversePackageGetInput, OpensteerReversePackageGetOutput, OpensteerReversePackageListInput, OpensteerReversePackageListOutput, OpensteerReversePackagePatchInput, OpensteerReversePackagePatchOutput, OpensteerInteractionCaptureInput, OpensteerInteractionCaptureOutput, OpensteerInteractionGetInput, OpensteerInteractionGetOutput, OpensteerInteractionDiffInput, OpensteerInteractionDiffOutput, OpensteerInteractionReplayInput, OpensteerInteractionReplayOutput, OpensteerScriptBeautifyInput, OpensteerScriptBeautifyOutput, OpensteerScriptDeobfuscateInput, OpensteerScriptDeobfuscateOutput, OpensteerScriptSandboxInput, OpensteerScriptSandboxOutput, OpensteerCaptchaSolveInput, OpensteerCaptchaSolveOutput, OpensteerInferRequestPlanInput, OpensteerWriteRequestPlanInput, OpensteerGetRequestPlanInput, OpensteerListRequestPlansInput, OpensteerListRequestPlansOutput, OpensteerWriteAuthRecipeInput, OpensteerWriteRecipeInput, OpensteerGetAuthRecipeInput, OpensteerGetRecipeInput, OpensteerListAuthRecipesInput, OpensteerListAuthRecipesOutput, OpensteerListRecipesInput, OpensteerListRecipesOutput, OpensteerRunAuthRecipeInput, OpensteerRunAuthRecipeOutput, OpensteerRunRecipeInput, OpensteerRunRecipeOutput, OpensteerRawRequestInput, OpensteerRawRequestOutput, OpensteerRequestExecuteInput, OpensteerRequestExecuteOutput, OpensteerComputerExecuteInput, OpensteerComputerExecuteOutput, OpensteerSessionCloseOutput } from '@opensteer/protocol';
|
|
3
|
+
export { ReplayElementPath } from '@opensteer/protocol';
|
|
3
4
|
|
|
4
5
|
declare const OPENSTEER_RUNTIME_CORE_VERSION: string;
|
|
5
6
|
|
|
@@ -163,10 +164,8 @@ type InteractionTraceRecord = RegistryRecord<OpensteerInteractionTracePayload>;
|
|
|
163
164
|
type ReverseCaseRecord = RegistryRecord<OpensteerReverseCasePayload>;
|
|
164
165
|
type ReversePackageRecord = RegistryRecord<OpensteerReversePackagePayload>;
|
|
165
166
|
type ReverseReportRecord = RegistryRecord<OpensteerReverseReportPayload>;
|
|
166
|
-
type RequestPlanLifecycle = OpensteerRequestPlanLifecycle;
|
|
167
167
|
type RequestPlanFreshness = OpensteerRequestPlanFreshness;
|
|
168
168
|
interface RequestPlanRecord extends RegistryRecord<OpensteerRequestPlanPayload> {
|
|
169
|
-
readonly lifecycle: RequestPlanLifecycle;
|
|
170
169
|
readonly freshness?: RequestPlanFreshness;
|
|
171
170
|
}
|
|
172
171
|
interface ResolveRegistryRecordInput {
|
|
@@ -184,7 +183,6 @@ interface WriteDescriptorInput<TPayload = JsonValue> {
|
|
|
184
183
|
readonly payload: TPayload;
|
|
185
184
|
}
|
|
186
185
|
interface WriteRequestPlanInput extends WriteDescriptorInput<OpensteerRequestPlanPayload> {
|
|
187
|
-
readonly lifecycle?: RequestPlanLifecycle;
|
|
188
186
|
readonly freshness?: RequestPlanFreshness;
|
|
189
187
|
}
|
|
190
188
|
interface WriteAuthRecipeInput extends WriteDescriptorInput<OpensteerAuthRecipePayload> {
|
|
@@ -202,10 +200,9 @@ interface WriteReverseReportInput extends WriteDescriptorInput<OpensteerReverseR
|
|
|
202
200
|
interface ListRegistryRecordsInput {
|
|
203
201
|
readonly key?: string;
|
|
204
202
|
}
|
|
205
|
-
interface
|
|
203
|
+
interface UpdateRequestPlanFreshnessInput {
|
|
206
204
|
readonly id: string;
|
|
207
205
|
readonly updatedAt?: number;
|
|
208
|
-
readonly lifecycle?: RequestPlanLifecycle;
|
|
209
206
|
readonly freshness?: RequestPlanFreshness;
|
|
210
207
|
}
|
|
211
208
|
interface UpdateReverseCaseInput {
|
|
@@ -220,6 +217,7 @@ interface DescriptorRegistryStore {
|
|
|
220
217
|
readonly indexesDirectory: string;
|
|
221
218
|
write(input: WriteDescriptorInput): Promise<DescriptorRecord>;
|
|
222
219
|
getById(id: string): Promise<DescriptorRecord | undefined>;
|
|
220
|
+
list(input?: ListRegistryRecordsInput): Promise<readonly DescriptorRecord[]>;
|
|
223
221
|
resolve(input: ResolveRegistryRecordInput): Promise<DescriptorRecord | undefined>;
|
|
224
222
|
}
|
|
225
223
|
interface RequestPlanRegistryStore {
|
|
@@ -229,7 +227,7 @@ interface RequestPlanRegistryStore {
|
|
|
229
227
|
getById(id: string): Promise<RequestPlanRecord | undefined>;
|
|
230
228
|
list(input?: ListRegistryRecordsInput): Promise<readonly RequestPlanRecord[]>;
|
|
231
229
|
resolve(input: ResolveRegistryRecordInput): Promise<RequestPlanRecord | undefined>;
|
|
232
|
-
|
|
230
|
+
updateFreshness(input: UpdateRequestPlanFreshnessInput): Promise<RequestPlanRecord>;
|
|
233
231
|
}
|
|
234
232
|
interface AuthRecipeRegistryStore {
|
|
235
233
|
readonly recordsDirectory: string;
|
|
@@ -280,9 +278,10 @@ interface ReverseReportRegistryStore {
|
|
|
280
278
|
}
|
|
281
279
|
|
|
282
280
|
interface SavedNetworkQueryInput {
|
|
281
|
+
readonly pageRef?: NetworkQueryRecord["record"]["pageRef"];
|
|
283
282
|
readonly recordId?: string;
|
|
284
283
|
readonly requestId?: string;
|
|
285
|
-
readonly
|
|
284
|
+
readonly capture?: string;
|
|
286
285
|
readonly tag?: string;
|
|
287
286
|
readonly url?: string;
|
|
288
287
|
readonly hostname?: string;
|
|
@@ -293,15 +292,22 @@ interface SavedNetworkQueryInput {
|
|
|
293
292
|
readonly includeBodies?: boolean;
|
|
294
293
|
readonly limit?: number;
|
|
295
294
|
}
|
|
295
|
+
type SavedNetworkBodyWriteMode = "authoritative" | "metadata-only";
|
|
296
|
+
interface SavedNetworkSaveOptions {
|
|
297
|
+
readonly bodyWriteMode: SavedNetworkBodyWriteMode;
|
|
298
|
+
readonly tag?: string;
|
|
299
|
+
}
|
|
296
300
|
interface SavedNetworkStore {
|
|
297
301
|
readonly databasePath: string;
|
|
298
302
|
initialize(): Promise<void>;
|
|
299
|
-
save(records: readonly NetworkQueryRecord[],
|
|
303
|
+
save(records: readonly NetworkQueryRecord[], options: SavedNetworkSaveOptions): Promise<number>;
|
|
304
|
+
tagByFilter(filter: SavedNetworkQueryInput, tag: string): Promise<number>;
|
|
300
305
|
query(input?: SavedNetworkQueryInput): Promise<readonly NetworkQueryRecord[]>;
|
|
301
306
|
getByRecordId(recordId: string, options?: {
|
|
302
307
|
readonly includeBodies?: boolean;
|
|
303
308
|
}): Promise<NetworkQueryRecord | undefined>;
|
|
304
309
|
clear(input?: {
|
|
310
|
+
readonly capture?: string;
|
|
305
311
|
readonly tag?: string;
|
|
306
312
|
}): Promise<number>;
|
|
307
313
|
}
|
|
@@ -389,8 +395,8 @@ interface FilesystemOpensteerWorkspace {
|
|
|
389
395
|
readonly browserManifestPath: string;
|
|
390
396
|
readonly browserUserDataDir: string;
|
|
391
397
|
readonly livePath: string;
|
|
392
|
-
readonly
|
|
393
|
-
readonly
|
|
398
|
+
readonly liveLocalPath: string;
|
|
399
|
+
readonly liveCloudPath: string;
|
|
394
400
|
readonly artifactsPath: string;
|
|
395
401
|
readonly tracesPath: string;
|
|
396
402
|
readonly registryPath: string;
|
|
@@ -417,6 +423,55 @@ declare function resolveFilesystemWorkspacePath(input: {
|
|
|
417
423
|
}): string;
|
|
418
424
|
declare function createFilesystemOpensteerWorkspace(options: CreateFilesystemOpensteerWorkspaceOptions): Promise<FilesystemOpensteerWorkspace>;
|
|
419
425
|
|
|
426
|
+
type ElementPath = ReplayElementPath;
|
|
427
|
+
interface DomDescriptorPayload {
|
|
428
|
+
readonly kind: "dom-target";
|
|
429
|
+
readonly method: string;
|
|
430
|
+
readonly description: string;
|
|
431
|
+
readonly path: ReplayElementPath;
|
|
432
|
+
readonly sourceUrl?: string;
|
|
433
|
+
}
|
|
434
|
+
interface DomDescriptorRecord {
|
|
435
|
+
readonly id: string;
|
|
436
|
+
readonly key: string;
|
|
437
|
+
readonly version: string;
|
|
438
|
+
readonly createdAt: number;
|
|
439
|
+
readonly updatedAt: number;
|
|
440
|
+
readonly payload: DomDescriptorPayload;
|
|
441
|
+
}
|
|
442
|
+
interface DomWriteDescriptorInput {
|
|
443
|
+
readonly method: string;
|
|
444
|
+
readonly description: string;
|
|
445
|
+
readonly path: ReplayElementPath;
|
|
446
|
+
readonly sourceUrl?: string;
|
|
447
|
+
readonly createdAt?: number;
|
|
448
|
+
readonly updatedAt?: number;
|
|
449
|
+
}
|
|
450
|
+
interface DomReadDescriptorInput {
|
|
451
|
+
readonly method: string;
|
|
452
|
+
readonly description: string;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
interface DomDescriptorStore {
|
|
456
|
+
read(input: DomReadDescriptorInput): Promise<DomDescriptorRecord | undefined>;
|
|
457
|
+
write(input: DomWriteDescriptorInput): Promise<DomDescriptorRecord>;
|
|
458
|
+
}
|
|
459
|
+
declare function createDomDescriptorStore(options: {
|
|
460
|
+
readonly root?: FilesystemOpensteerWorkspace;
|
|
461
|
+
readonly namespace?: string;
|
|
462
|
+
}): DomDescriptorStore;
|
|
463
|
+
declare function hashDomDescriptorDescription(description: string): string;
|
|
464
|
+
declare function buildDomDescriptorKey(options: {
|
|
465
|
+
readonly namespace?: string;
|
|
466
|
+
readonly method: string;
|
|
467
|
+
readonly description: string;
|
|
468
|
+
}): string;
|
|
469
|
+
declare function buildDomDescriptorPayload(input: DomWriteDescriptorInput): DomDescriptorPayload;
|
|
470
|
+
declare function buildDomDescriptorVersion(payload: DomDescriptorPayload): string;
|
|
471
|
+
declare function parseDomDescriptorRecord(record: DescriptorRecord): DomDescriptorRecord | undefined;
|
|
472
|
+
|
|
473
|
+
declare function sanitizeReplayElementPath(path: ReplayElementPath): ReplayElementPath;
|
|
474
|
+
|
|
420
475
|
interface OpensteerRouteRequest {
|
|
421
476
|
readonly url: string;
|
|
422
477
|
readonly method: string;
|
|
@@ -473,6 +528,61 @@ interface OpensteerInterceptScriptOptions {
|
|
|
473
528
|
}) => string | Promise<string>;
|
|
474
529
|
}
|
|
475
530
|
|
|
531
|
+
interface PersistedOpensteerExtractionValueNode {
|
|
532
|
+
readonly $path: ElementPath;
|
|
533
|
+
readonly attribute?: string;
|
|
534
|
+
}
|
|
535
|
+
interface PersistedOpensteerExtractionSourceNode {
|
|
536
|
+
readonly $source: "current_url";
|
|
537
|
+
}
|
|
538
|
+
interface PersistedOpensteerExtractionArrayVariantNode {
|
|
539
|
+
readonly itemParentPath: ElementPath;
|
|
540
|
+
readonly item: PersistedOpensteerExtractionNode;
|
|
541
|
+
}
|
|
542
|
+
interface PersistedOpensteerExtractionArrayNode {
|
|
543
|
+
readonly $array: {
|
|
544
|
+
readonly variants: readonly PersistedOpensteerExtractionArrayVariantNode[];
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
interface PersistedOpensteerExtractionObjectNode {
|
|
548
|
+
readonly [key: string]: PersistedOpensteerExtractionNode;
|
|
549
|
+
}
|
|
550
|
+
type PersistedOpensteerExtractionNode = PersistedOpensteerExtractionValueNode | PersistedOpensteerExtractionSourceNode | PersistedOpensteerExtractionArrayNode | PersistedOpensteerExtractionObjectNode;
|
|
551
|
+
type PersistedOpensteerExtractionPayload = PersistedOpensteerExtractionObjectNode;
|
|
552
|
+
interface OpensteerExtractionDescriptorPayload {
|
|
553
|
+
readonly kind: "dom-extraction";
|
|
554
|
+
readonly description: string;
|
|
555
|
+
readonly root: PersistedOpensteerExtractionPayload;
|
|
556
|
+
readonly schemaHash?: string;
|
|
557
|
+
readonly sourceUrl?: string;
|
|
558
|
+
}
|
|
559
|
+
interface OpensteerExtractionDescriptorRecord {
|
|
560
|
+
readonly id: string;
|
|
561
|
+
readonly key: string;
|
|
562
|
+
readonly version: string;
|
|
563
|
+
readonly createdAt: number;
|
|
564
|
+
readonly updatedAt: number;
|
|
565
|
+
readonly payload: OpensteerExtractionDescriptorPayload;
|
|
566
|
+
}
|
|
567
|
+
interface OpensteerExtractionDescriptorStore {
|
|
568
|
+
read(input: {
|
|
569
|
+
readonly description: string;
|
|
570
|
+
}): Promise<OpensteerExtractionDescriptorRecord | undefined>;
|
|
571
|
+
write(input: {
|
|
572
|
+
readonly description: string;
|
|
573
|
+
readonly root: PersistedOpensteerExtractionPayload;
|
|
574
|
+
readonly schemaHash?: string;
|
|
575
|
+
readonly sourceUrl?: string;
|
|
576
|
+
readonly createdAt?: number;
|
|
577
|
+
readonly updatedAt?: number;
|
|
578
|
+
}): Promise<OpensteerExtractionDescriptorRecord>;
|
|
579
|
+
}
|
|
580
|
+
declare function createOpensteerExtractionDescriptorStore(options: {
|
|
581
|
+
readonly root?: FilesystemOpensteerWorkspace;
|
|
582
|
+
readonly namespace?: string;
|
|
583
|
+
}): OpensteerExtractionDescriptorStore;
|
|
584
|
+
declare function parseExtractionDescriptorRecord(record: DescriptorRecord): OpensteerExtractionDescriptorRecord | undefined;
|
|
585
|
+
|
|
476
586
|
interface OpensteerEngineFactoryOptions {
|
|
477
587
|
readonly browser?: OpensteerBrowserOptions;
|
|
478
588
|
readonly launch?: OpensteerBrowserLaunchOptions;
|
|
@@ -488,6 +598,15 @@ interface OpensteerSessionRuntimeOptions {
|
|
|
488
598
|
readonly engine?: BrowserCoreEngine;
|
|
489
599
|
readonly engineFactory?: OpensteerEngineFactory;
|
|
490
600
|
readonly policy?: OpensteerPolicy;
|
|
601
|
+
readonly descriptorStore?: DomDescriptorStore;
|
|
602
|
+
readonly extractionDescriptorStore?: OpensteerExtractionDescriptorStore;
|
|
603
|
+
readonly registryOverrides?: {
|
|
604
|
+
readonly requestPlans?: RequestPlanRegistryStore;
|
|
605
|
+
readonly authRecipes?: AuthRecipeRegistryStore;
|
|
606
|
+
readonly recipes?: RecipeRegistryStore;
|
|
607
|
+
readonly reverseCases?: ReverseCaseRegistryStore;
|
|
608
|
+
readonly reversePackages?: ReversePackageRegistryStore;
|
|
609
|
+
};
|
|
491
610
|
readonly cleanupRootOnClose?: boolean;
|
|
492
611
|
readonly sessionInfo?: Partial<Omit<OpensteerSessionInfo, "sessionId" | "activePageRef">>;
|
|
493
612
|
}
|
|
@@ -501,19 +620,20 @@ declare class OpensteerSessionRuntime {
|
|
|
501
620
|
private readonly injectedEngine;
|
|
502
621
|
private readonly engineFactory;
|
|
503
622
|
private readonly policy;
|
|
623
|
+
private readonly injectedDescriptorStore;
|
|
624
|
+
private readonly injectedExtractionDescriptorStore;
|
|
625
|
+
private readonly registryOverrides;
|
|
504
626
|
private readonly cleanupRootOnClose;
|
|
505
627
|
private readonly sessionInfoBase;
|
|
506
628
|
private root;
|
|
507
629
|
private engine;
|
|
508
630
|
private dom;
|
|
509
631
|
private computer;
|
|
510
|
-
private readonly
|
|
632
|
+
private readonly networkHistory;
|
|
511
633
|
private extractionDescriptors;
|
|
512
634
|
private sessionRef;
|
|
513
635
|
private pageRef;
|
|
514
636
|
private runId;
|
|
515
|
-
private latestSnapshot;
|
|
516
|
-
private readonly backgroundNetworkPersistence;
|
|
517
637
|
private readonly cookieJars;
|
|
518
638
|
private readonly recipeCache;
|
|
519
639
|
private ownsEngine;
|
|
@@ -534,7 +654,7 @@ declare class OpensteerSessionRuntime {
|
|
|
534
654
|
scroll(input: OpensteerDomScrollInput, options?: RuntimeOperationOptions): Promise<OpensteerActionResult>;
|
|
535
655
|
extract(input: OpensteerDomExtractInput, options?: RuntimeOperationOptions): Promise<OpensteerDomExtractOutput>;
|
|
536
656
|
queryNetwork(input?: OpensteerNetworkQueryInput, options?: RuntimeOperationOptions): Promise<OpensteerNetworkQueryOutput>;
|
|
537
|
-
|
|
657
|
+
tagNetwork(input: OpensteerNetworkTagInput, options?: RuntimeOperationOptions): Promise<OpensteerNetworkTagOutput>;
|
|
538
658
|
clearNetwork(input?: OpensteerNetworkClearInput, options?: RuntimeOperationOptions): Promise<OpensteerNetworkClearOutput>;
|
|
539
659
|
captureScripts(input?: OpensteerCaptureScriptsInput, options?: RuntimeOperationOptions): Promise<OpensteerCaptureScriptsOutput>;
|
|
540
660
|
minimizeNetwork(input: OpensteerNetworkMinimizeInput, options?: RuntimeOperationOptions): Promise<OpensteerNetworkMinimizeOutput>;
|
|
@@ -609,8 +729,10 @@ declare class OpensteerSessionRuntime {
|
|
|
609
729
|
private queryLiveNetwork;
|
|
610
730
|
private captureScriptsInternal;
|
|
611
731
|
private materializeCapturedScript;
|
|
732
|
+
private runMutationCapturedOperation;
|
|
612
733
|
private beginMutationCapture;
|
|
613
|
-
private
|
|
734
|
+
private finalizeMutationCaptureBestEffort;
|
|
735
|
+
private completeMutationCaptureWithSignal;
|
|
614
736
|
private resolveNetworkRecordByRecordId;
|
|
615
737
|
private resolveCurrentStateSource;
|
|
616
738
|
private resolveReverseCaseById;
|
|
@@ -626,7 +748,13 @@ declare class OpensteerSessionRuntime {
|
|
|
626
748
|
private waitForMatchingReplayRecord;
|
|
627
749
|
private isObservedReplayRecordSettled;
|
|
628
750
|
private replayInteractionTraceById;
|
|
751
|
+
private readBrowserNetworkRecords;
|
|
629
752
|
private readLiveNetworkRecords;
|
|
753
|
+
private persistLiveRequestIds;
|
|
754
|
+
private persistLiveRequestIdsWithSignal;
|
|
755
|
+
private syncPersistedNetworkSelection;
|
|
756
|
+
private toSavedNetworkQueryInput;
|
|
757
|
+
private toQueryInputFromTagInput;
|
|
630
758
|
private readLiveRequestIds;
|
|
631
759
|
private observeLiveTransportDelta;
|
|
632
760
|
private executeTransportRequestWithJournal;
|
|
@@ -666,8 +794,7 @@ declare class OpensteerSessionRuntime {
|
|
|
666
794
|
private updateCookieJarFromResponse;
|
|
667
795
|
private readCookieValue;
|
|
668
796
|
private readStorageValue;
|
|
669
|
-
private
|
|
670
|
-
private flushBackgroundNetworkPersistence;
|
|
797
|
+
private flushPersistedNetworkHistory;
|
|
671
798
|
private toDomTargetRef;
|
|
672
799
|
private ensureRoot;
|
|
673
800
|
private ensureEngine;
|
|
@@ -710,7 +837,7 @@ interface OpensteerSemanticRuntime {
|
|
|
710
837
|
scroll(input: OpensteerDomScrollInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerActionResult>;
|
|
711
838
|
extract(input: OpensteerDomExtractInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerDomExtractOutput>;
|
|
712
839
|
queryNetwork(input?: OpensteerNetworkQueryInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkQueryOutput>;
|
|
713
|
-
|
|
840
|
+
tagNetwork(input: OpensteerNetworkTagInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkTagOutput>;
|
|
714
841
|
minimizeNetwork(input: OpensteerNetworkMinimizeInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkMinimizeOutput>;
|
|
715
842
|
diffNetwork(input: OpensteerNetworkDiffInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkDiffOutput>;
|
|
716
843
|
probeNetwork(input: OpensteerTransportProbeInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerTransportProbeOutput>;
|
|
@@ -763,4 +890,4 @@ declare function dispatchSemanticOperation(runtime: OpensteerSemanticRuntime, op
|
|
|
763
890
|
readonly signal?: AbortSignal;
|
|
764
891
|
}): Promise<unknown>;
|
|
765
892
|
|
|
766
|
-
export { type CreateFilesystemOpensteerWorkspaceOptions, type FilesystemOpensteerWorkspace, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, OPENSTEER_RUNTIME_CORE_VERSION, type OpensteerEngineFactory, type OpensteerEngineFactoryOptions, type OpensteerRuntimeOperationOptions, type OpensteerRuntimeWorkspace, type OpensteerSemanticRuntime, OpensteerSessionRuntime, type OpensteerSessionRuntimeOptions, type OpensteerWorkspaceManifest, createFilesystemOpensteerWorkspace, dispatchSemanticOperation, normalizeWorkspaceId, resolveFilesystemWorkspacePath };
|
|
893
|
+
export { type AuthRecipeRecord, type AuthRecipeRegistryStore, type CreateFilesystemOpensteerWorkspaceOptions, type DescriptorRecord, type DescriptorRegistryStore, type DomDescriptorPayload, type DomDescriptorRecord, type DomDescriptorStore, type DomReadDescriptorInput, type DomWriteDescriptorInput, type FilesystemOpensteerWorkspace, type InteractionTraceRecord, type InteractionTraceRegistryStore, type ListRegistryRecordsInput, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, OPENSTEER_RUNTIME_CORE_VERSION, type OpensteerEngineFactory, type OpensteerEngineFactoryOptions, type OpensteerExtractionDescriptorPayload, type OpensteerExtractionDescriptorRecord, type OpensteerExtractionDescriptorStore, type OpensteerRuntimeOperationOptions, type OpensteerRuntimeWorkspace, type OpensteerSemanticRuntime, OpensteerSessionRuntime, type OpensteerSessionRuntimeOptions, type OpensteerWorkspaceManifest, type RecipeRecord, type RecipeRegistryStore, type RegistryProvenance, type RequestPlanFreshness, type RequestPlanRecord, type RequestPlanRegistryStore, type ResolveRegistryRecordInput, type ReverseCaseRecord, type ReverseCaseRegistryStore, type ReversePackageRecord, type ReversePackageRegistryStore, type ReverseReportRecord, type ReverseReportRegistryStore, type UpdateRequestPlanFreshnessInput, type UpdateReverseCaseInput, type WriteAuthRecipeInput, type WriteDescriptorInput, type WriteInteractionTraceInput, type WriteRecipeInput, type WriteRequestPlanInput, type WriteReverseCaseInput, type WriteReversePackageInput, type WriteReverseReportInput, buildDomDescriptorKey, buildDomDescriptorPayload, buildDomDescriptorVersion, createDomDescriptorStore, createFilesystemOpensteerWorkspace, createOpensteerExtractionDescriptorStore, dispatchSemanticOperation, hashDomDescriptorDescription, normalizeWorkspaceId, parseDomDescriptorRecord, parseExtractionDescriptorRecord, resolveFilesystemWorkspacePath, sanitizeReplayElementPath };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BrowserCoreEngine, PageRef, NetworkRecord, HeaderEntry, BodyPayload, SessionRef } from '@opensteer/browser-core';
|
|
2
|
-
import { OpensteerSemanticOperationName, OpensteerArtifactKind, ArtifactProvenance, TraceContext, HtmlSnapshot, DomSnapshot, CookieRecord, StorageSnapshot, ScriptSourceArtifactData, ArtifactRelation, ArtifactReference, OpensteerArtifact,
|
|
2
|
+
import { OpensteerSemanticOperationName, OpensteerArtifactKind, ArtifactProvenance, TraceContext, HtmlSnapshot, DomSnapshot, CookieRecord, StorageSnapshot, ScriptSourceArtifactData, ArtifactRelation, ArtifactReference, OpensteerArtifact, OpensteerAuthRecipePayload, OpensteerRequestPlanPayload, OpensteerRequestPlanFreshness, OpensteerRecipePayload, OpensteerReverseCasePayload, OpensteerInteractionTracePayload, OpensteerReversePackagePayload, OpensteerReverseReportPayload, NetworkQueryRecord, NetworkResourceType, 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, OpensteerNetworkTagInput, OpensteerNetworkTagOutput, OpensteerNetworkClearInput, OpensteerNetworkClearOutput, OpensteerCaptureScriptsInput, OpensteerCaptureScriptsOutput, OpensteerNetworkMinimizeInput, OpensteerNetworkMinimizeOutput, OpensteerNetworkDiffInput, OpensteerNetworkDiffOutput, OpensteerArtifactReadInput, OpensteerArtifactReadOutput, OpensteerTransportProbeInput, OpensteerTransportProbeOutput, OpensteerReverseDiscoverInput, OpensteerReverseDiscoverOutput, OpensteerReverseQueryInput, OpensteerReverseQueryOutput, OpensteerReversePackageCreateInput, OpensteerReversePackageCreateOutput, OpensteerReversePackageRunInput, OpensteerReversePackageRunOutput, OpensteerReverseExportInput, OpensteerReverseExportOutput, OpensteerReverseReportInput, OpensteerReverseReportOutput, OpensteerReversePackageGetInput, OpensteerReversePackageGetOutput, OpensteerReversePackageListInput, OpensteerReversePackageListOutput, OpensteerReversePackagePatchInput, OpensteerReversePackagePatchOutput, OpensteerInteractionCaptureInput, OpensteerInteractionCaptureOutput, OpensteerInteractionGetInput, OpensteerInteractionGetOutput, OpensteerInteractionDiffInput, OpensteerInteractionDiffOutput, OpensteerInteractionReplayInput, OpensteerInteractionReplayOutput, OpensteerScriptBeautifyInput, OpensteerScriptBeautifyOutput, OpensteerScriptDeobfuscateInput, OpensteerScriptDeobfuscateOutput, OpensteerScriptSandboxInput, OpensteerScriptSandboxOutput, OpensteerCaptchaSolveInput, OpensteerCaptchaSolveOutput, OpensteerInferRequestPlanInput, OpensteerWriteRequestPlanInput, OpensteerGetRequestPlanInput, OpensteerListRequestPlansInput, OpensteerListRequestPlansOutput, OpensteerWriteAuthRecipeInput, OpensteerWriteRecipeInput, OpensteerGetAuthRecipeInput, OpensteerGetRecipeInput, OpensteerListAuthRecipesInput, OpensteerListAuthRecipesOutput, OpensteerListRecipesInput, OpensteerListRecipesOutput, OpensteerRunAuthRecipeInput, OpensteerRunAuthRecipeOutput, OpensteerRunRecipeInput, OpensteerRunRecipeOutput, OpensteerRawRequestInput, OpensteerRawRequestOutput, OpensteerRequestExecuteInput, OpensteerRequestExecuteOutput, OpensteerComputerExecuteInput, OpensteerComputerExecuteOutput, OpensteerSessionCloseOutput } from '@opensteer/protocol';
|
|
3
|
+
export { ReplayElementPath } from '@opensteer/protocol';
|
|
3
4
|
|
|
4
5
|
declare const OPENSTEER_RUNTIME_CORE_VERSION: string;
|
|
5
6
|
|
|
@@ -163,10 +164,8 @@ type InteractionTraceRecord = RegistryRecord<OpensteerInteractionTracePayload>;
|
|
|
163
164
|
type ReverseCaseRecord = RegistryRecord<OpensteerReverseCasePayload>;
|
|
164
165
|
type ReversePackageRecord = RegistryRecord<OpensteerReversePackagePayload>;
|
|
165
166
|
type ReverseReportRecord = RegistryRecord<OpensteerReverseReportPayload>;
|
|
166
|
-
type RequestPlanLifecycle = OpensteerRequestPlanLifecycle;
|
|
167
167
|
type RequestPlanFreshness = OpensteerRequestPlanFreshness;
|
|
168
168
|
interface RequestPlanRecord extends RegistryRecord<OpensteerRequestPlanPayload> {
|
|
169
|
-
readonly lifecycle: RequestPlanLifecycle;
|
|
170
169
|
readonly freshness?: RequestPlanFreshness;
|
|
171
170
|
}
|
|
172
171
|
interface ResolveRegistryRecordInput {
|
|
@@ -184,7 +183,6 @@ interface WriteDescriptorInput<TPayload = JsonValue> {
|
|
|
184
183
|
readonly payload: TPayload;
|
|
185
184
|
}
|
|
186
185
|
interface WriteRequestPlanInput extends WriteDescriptorInput<OpensteerRequestPlanPayload> {
|
|
187
|
-
readonly lifecycle?: RequestPlanLifecycle;
|
|
188
186
|
readonly freshness?: RequestPlanFreshness;
|
|
189
187
|
}
|
|
190
188
|
interface WriteAuthRecipeInput extends WriteDescriptorInput<OpensteerAuthRecipePayload> {
|
|
@@ -202,10 +200,9 @@ interface WriteReverseReportInput extends WriteDescriptorInput<OpensteerReverseR
|
|
|
202
200
|
interface ListRegistryRecordsInput {
|
|
203
201
|
readonly key?: string;
|
|
204
202
|
}
|
|
205
|
-
interface
|
|
203
|
+
interface UpdateRequestPlanFreshnessInput {
|
|
206
204
|
readonly id: string;
|
|
207
205
|
readonly updatedAt?: number;
|
|
208
|
-
readonly lifecycle?: RequestPlanLifecycle;
|
|
209
206
|
readonly freshness?: RequestPlanFreshness;
|
|
210
207
|
}
|
|
211
208
|
interface UpdateReverseCaseInput {
|
|
@@ -220,6 +217,7 @@ interface DescriptorRegistryStore {
|
|
|
220
217
|
readonly indexesDirectory: string;
|
|
221
218
|
write(input: WriteDescriptorInput): Promise<DescriptorRecord>;
|
|
222
219
|
getById(id: string): Promise<DescriptorRecord | undefined>;
|
|
220
|
+
list(input?: ListRegistryRecordsInput): Promise<readonly DescriptorRecord[]>;
|
|
223
221
|
resolve(input: ResolveRegistryRecordInput): Promise<DescriptorRecord | undefined>;
|
|
224
222
|
}
|
|
225
223
|
interface RequestPlanRegistryStore {
|
|
@@ -229,7 +227,7 @@ interface RequestPlanRegistryStore {
|
|
|
229
227
|
getById(id: string): Promise<RequestPlanRecord | undefined>;
|
|
230
228
|
list(input?: ListRegistryRecordsInput): Promise<readonly RequestPlanRecord[]>;
|
|
231
229
|
resolve(input: ResolveRegistryRecordInput): Promise<RequestPlanRecord | undefined>;
|
|
232
|
-
|
|
230
|
+
updateFreshness(input: UpdateRequestPlanFreshnessInput): Promise<RequestPlanRecord>;
|
|
233
231
|
}
|
|
234
232
|
interface AuthRecipeRegistryStore {
|
|
235
233
|
readonly recordsDirectory: string;
|
|
@@ -280,9 +278,10 @@ interface ReverseReportRegistryStore {
|
|
|
280
278
|
}
|
|
281
279
|
|
|
282
280
|
interface SavedNetworkQueryInput {
|
|
281
|
+
readonly pageRef?: NetworkQueryRecord["record"]["pageRef"];
|
|
283
282
|
readonly recordId?: string;
|
|
284
283
|
readonly requestId?: string;
|
|
285
|
-
readonly
|
|
284
|
+
readonly capture?: string;
|
|
286
285
|
readonly tag?: string;
|
|
287
286
|
readonly url?: string;
|
|
288
287
|
readonly hostname?: string;
|
|
@@ -293,15 +292,22 @@ interface SavedNetworkQueryInput {
|
|
|
293
292
|
readonly includeBodies?: boolean;
|
|
294
293
|
readonly limit?: number;
|
|
295
294
|
}
|
|
295
|
+
type SavedNetworkBodyWriteMode = "authoritative" | "metadata-only";
|
|
296
|
+
interface SavedNetworkSaveOptions {
|
|
297
|
+
readonly bodyWriteMode: SavedNetworkBodyWriteMode;
|
|
298
|
+
readonly tag?: string;
|
|
299
|
+
}
|
|
296
300
|
interface SavedNetworkStore {
|
|
297
301
|
readonly databasePath: string;
|
|
298
302
|
initialize(): Promise<void>;
|
|
299
|
-
save(records: readonly NetworkQueryRecord[],
|
|
303
|
+
save(records: readonly NetworkQueryRecord[], options: SavedNetworkSaveOptions): Promise<number>;
|
|
304
|
+
tagByFilter(filter: SavedNetworkQueryInput, tag: string): Promise<number>;
|
|
300
305
|
query(input?: SavedNetworkQueryInput): Promise<readonly NetworkQueryRecord[]>;
|
|
301
306
|
getByRecordId(recordId: string, options?: {
|
|
302
307
|
readonly includeBodies?: boolean;
|
|
303
308
|
}): Promise<NetworkQueryRecord | undefined>;
|
|
304
309
|
clear(input?: {
|
|
310
|
+
readonly capture?: string;
|
|
305
311
|
readonly tag?: string;
|
|
306
312
|
}): Promise<number>;
|
|
307
313
|
}
|
|
@@ -389,8 +395,8 @@ interface FilesystemOpensteerWorkspace {
|
|
|
389
395
|
readonly browserManifestPath: string;
|
|
390
396
|
readonly browserUserDataDir: string;
|
|
391
397
|
readonly livePath: string;
|
|
392
|
-
readonly
|
|
393
|
-
readonly
|
|
398
|
+
readonly liveLocalPath: string;
|
|
399
|
+
readonly liveCloudPath: string;
|
|
394
400
|
readonly artifactsPath: string;
|
|
395
401
|
readonly tracesPath: string;
|
|
396
402
|
readonly registryPath: string;
|
|
@@ -417,6 +423,55 @@ declare function resolveFilesystemWorkspacePath(input: {
|
|
|
417
423
|
}): string;
|
|
418
424
|
declare function createFilesystemOpensteerWorkspace(options: CreateFilesystemOpensteerWorkspaceOptions): Promise<FilesystemOpensteerWorkspace>;
|
|
419
425
|
|
|
426
|
+
type ElementPath = ReplayElementPath;
|
|
427
|
+
interface DomDescriptorPayload {
|
|
428
|
+
readonly kind: "dom-target";
|
|
429
|
+
readonly method: string;
|
|
430
|
+
readonly description: string;
|
|
431
|
+
readonly path: ReplayElementPath;
|
|
432
|
+
readonly sourceUrl?: string;
|
|
433
|
+
}
|
|
434
|
+
interface DomDescriptorRecord {
|
|
435
|
+
readonly id: string;
|
|
436
|
+
readonly key: string;
|
|
437
|
+
readonly version: string;
|
|
438
|
+
readonly createdAt: number;
|
|
439
|
+
readonly updatedAt: number;
|
|
440
|
+
readonly payload: DomDescriptorPayload;
|
|
441
|
+
}
|
|
442
|
+
interface DomWriteDescriptorInput {
|
|
443
|
+
readonly method: string;
|
|
444
|
+
readonly description: string;
|
|
445
|
+
readonly path: ReplayElementPath;
|
|
446
|
+
readonly sourceUrl?: string;
|
|
447
|
+
readonly createdAt?: number;
|
|
448
|
+
readonly updatedAt?: number;
|
|
449
|
+
}
|
|
450
|
+
interface DomReadDescriptorInput {
|
|
451
|
+
readonly method: string;
|
|
452
|
+
readonly description: string;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
interface DomDescriptorStore {
|
|
456
|
+
read(input: DomReadDescriptorInput): Promise<DomDescriptorRecord | undefined>;
|
|
457
|
+
write(input: DomWriteDescriptorInput): Promise<DomDescriptorRecord>;
|
|
458
|
+
}
|
|
459
|
+
declare function createDomDescriptorStore(options: {
|
|
460
|
+
readonly root?: FilesystemOpensteerWorkspace;
|
|
461
|
+
readonly namespace?: string;
|
|
462
|
+
}): DomDescriptorStore;
|
|
463
|
+
declare function hashDomDescriptorDescription(description: string): string;
|
|
464
|
+
declare function buildDomDescriptorKey(options: {
|
|
465
|
+
readonly namespace?: string;
|
|
466
|
+
readonly method: string;
|
|
467
|
+
readonly description: string;
|
|
468
|
+
}): string;
|
|
469
|
+
declare function buildDomDescriptorPayload(input: DomWriteDescriptorInput): DomDescriptorPayload;
|
|
470
|
+
declare function buildDomDescriptorVersion(payload: DomDescriptorPayload): string;
|
|
471
|
+
declare function parseDomDescriptorRecord(record: DescriptorRecord): DomDescriptorRecord | undefined;
|
|
472
|
+
|
|
473
|
+
declare function sanitizeReplayElementPath(path: ReplayElementPath): ReplayElementPath;
|
|
474
|
+
|
|
420
475
|
interface OpensteerRouteRequest {
|
|
421
476
|
readonly url: string;
|
|
422
477
|
readonly method: string;
|
|
@@ -473,6 +528,61 @@ interface OpensteerInterceptScriptOptions {
|
|
|
473
528
|
}) => string | Promise<string>;
|
|
474
529
|
}
|
|
475
530
|
|
|
531
|
+
interface PersistedOpensteerExtractionValueNode {
|
|
532
|
+
readonly $path: ElementPath;
|
|
533
|
+
readonly attribute?: string;
|
|
534
|
+
}
|
|
535
|
+
interface PersistedOpensteerExtractionSourceNode {
|
|
536
|
+
readonly $source: "current_url";
|
|
537
|
+
}
|
|
538
|
+
interface PersistedOpensteerExtractionArrayVariantNode {
|
|
539
|
+
readonly itemParentPath: ElementPath;
|
|
540
|
+
readonly item: PersistedOpensteerExtractionNode;
|
|
541
|
+
}
|
|
542
|
+
interface PersistedOpensteerExtractionArrayNode {
|
|
543
|
+
readonly $array: {
|
|
544
|
+
readonly variants: readonly PersistedOpensteerExtractionArrayVariantNode[];
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
interface PersistedOpensteerExtractionObjectNode {
|
|
548
|
+
readonly [key: string]: PersistedOpensteerExtractionNode;
|
|
549
|
+
}
|
|
550
|
+
type PersistedOpensteerExtractionNode = PersistedOpensteerExtractionValueNode | PersistedOpensteerExtractionSourceNode | PersistedOpensteerExtractionArrayNode | PersistedOpensteerExtractionObjectNode;
|
|
551
|
+
type PersistedOpensteerExtractionPayload = PersistedOpensteerExtractionObjectNode;
|
|
552
|
+
interface OpensteerExtractionDescriptorPayload {
|
|
553
|
+
readonly kind: "dom-extraction";
|
|
554
|
+
readonly description: string;
|
|
555
|
+
readonly root: PersistedOpensteerExtractionPayload;
|
|
556
|
+
readonly schemaHash?: string;
|
|
557
|
+
readonly sourceUrl?: string;
|
|
558
|
+
}
|
|
559
|
+
interface OpensteerExtractionDescriptorRecord {
|
|
560
|
+
readonly id: string;
|
|
561
|
+
readonly key: string;
|
|
562
|
+
readonly version: string;
|
|
563
|
+
readonly createdAt: number;
|
|
564
|
+
readonly updatedAt: number;
|
|
565
|
+
readonly payload: OpensteerExtractionDescriptorPayload;
|
|
566
|
+
}
|
|
567
|
+
interface OpensteerExtractionDescriptorStore {
|
|
568
|
+
read(input: {
|
|
569
|
+
readonly description: string;
|
|
570
|
+
}): Promise<OpensteerExtractionDescriptorRecord | undefined>;
|
|
571
|
+
write(input: {
|
|
572
|
+
readonly description: string;
|
|
573
|
+
readonly root: PersistedOpensteerExtractionPayload;
|
|
574
|
+
readonly schemaHash?: string;
|
|
575
|
+
readonly sourceUrl?: string;
|
|
576
|
+
readonly createdAt?: number;
|
|
577
|
+
readonly updatedAt?: number;
|
|
578
|
+
}): Promise<OpensteerExtractionDescriptorRecord>;
|
|
579
|
+
}
|
|
580
|
+
declare function createOpensteerExtractionDescriptorStore(options: {
|
|
581
|
+
readonly root?: FilesystemOpensteerWorkspace;
|
|
582
|
+
readonly namespace?: string;
|
|
583
|
+
}): OpensteerExtractionDescriptorStore;
|
|
584
|
+
declare function parseExtractionDescriptorRecord(record: DescriptorRecord): OpensteerExtractionDescriptorRecord | undefined;
|
|
585
|
+
|
|
476
586
|
interface OpensteerEngineFactoryOptions {
|
|
477
587
|
readonly browser?: OpensteerBrowserOptions;
|
|
478
588
|
readonly launch?: OpensteerBrowserLaunchOptions;
|
|
@@ -488,6 +598,15 @@ interface OpensteerSessionRuntimeOptions {
|
|
|
488
598
|
readonly engine?: BrowserCoreEngine;
|
|
489
599
|
readonly engineFactory?: OpensteerEngineFactory;
|
|
490
600
|
readonly policy?: OpensteerPolicy;
|
|
601
|
+
readonly descriptorStore?: DomDescriptorStore;
|
|
602
|
+
readonly extractionDescriptorStore?: OpensteerExtractionDescriptorStore;
|
|
603
|
+
readonly registryOverrides?: {
|
|
604
|
+
readonly requestPlans?: RequestPlanRegistryStore;
|
|
605
|
+
readonly authRecipes?: AuthRecipeRegistryStore;
|
|
606
|
+
readonly recipes?: RecipeRegistryStore;
|
|
607
|
+
readonly reverseCases?: ReverseCaseRegistryStore;
|
|
608
|
+
readonly reversePackages?: ReversePackageRegistryStore;
|
|
609
|
+
};
|
|
491
610
|
readonly cleanupRootOnClose?: boolean;
|
|
492
611
|
readonly sessionInfo?: Partial<Omit<OpensteerSessionInfo, "sessionId" | "activePageRef">>;
|
|
493
612
|
}
|
|
@@ -501,19 +620,20 @@ declare class OpensteerSessionRuntime {
|
|
|
501
620
|
private readonly injectedEngine;
|
|
502
621
|
private readonly engineFactory;
|
|
503
622
|
private readonly policy;
|
|
623
|
+
private readonly injectedDescriptorStore;
|
|
624
|
+
private readonly injectedExtractionDescriptorStore;
|
|
625
|
+
private readonly registryOverrides;
|
|
504
626
|
private readonly cleanupRootOnClose;
|
|
505
627
|
private readonly sessionInfoBase;
|
|
506
628
|
private root;
|
|
507
629
|
private engine;
|
|
508
630
|
private dom;
|
|
509
631
|
private computer;
|
|
510
|
-
private readonly
|
|
632
|
+
private readonly networkHistory;
|
|
511
633
|
private extractionDescriptors;
|
|
512
634
|
private sessionRef;
|
|
513
635
|
private pageRef;
|
|
514
636
|
private runId;
|
|
515
|
-
private latestSnapshot;
|
|
516
|
-
private readonly backgroundNetworkPersistence;
|
|
517
637
|
private readonly cookieJars;
|
|
518
638
|
private readonly recipeCache;
|
|
519
639
|
private ownsEngine;
|
|
@@ -534,7 +654,7 @@ declare class OpensteerSessionRuntime {
|
|
|
534
654
|
scroll(input: OpensteerDomScrollInput, options?: RuntimeOperationOptions): Promise<OpensteerActionResult>;
|
|
535
655
|
extract(input: OpensteerDomExtractInput, options?: RuntimeOperationOptions): Promise<OpensteerDomExtractOutput>;
|
|
536
656
|
queryNetwork(input?: OpensteerNetworkQueryInput, options?: RuntimeOperationOptions): Promise<OpensteerNetworkQueryOutput>;
|
|
537
|
-
|
|
657
|
+
tagNetwork(input: OpensteerNetworkTagInput, options?: RuntimeOperationOptions): Promise<OpensteerNetworkTagOutput>;
|
|
538
658
|
clearNetwork(input?: OpensteerNetworkClearInput, options?: RuntimeOperationOptions): Promise<OpensteerNetworkClearOutput>;
|
|
539
659
|
captureScripts(input?: OpensteerCaptureScriptsInput, options?: RuntimeOperationOptions): Promise<OpensteerCaptureScriptsOutput>;
|
|
540
660
|
minimizeNetwork(input: OpensteerNetworkMinimizeInput, options?: RuntimeOperationOptions): Promise<OpensteerNetworkMinimizeOutput>;
|
|
@@ -609,8 +729,10 @@ declare class OpensteerSessionRuntime {
|
|
|
609
729
|
private queryLiveNetwork;
|
|
610
730
|
private captureScriptsInternal;
|
|
611
731
|
private materializeCapturedScript;
|
|
732
|
+
private runMutationCapturedOperation;
|
|
612
733
|
private beginMutationCapture;
|
|
613
|
-
private
|
|
734
|
+
private finalizeMutationCaptureBestEffort;
|
|
735
|
+
private completeMutationCaptureWithSignal;
|
|
614
736
|
private resolveNetworkRecordByRecordId;
|
|
615
737
|
private resolveCurrentStateSource;
|
|
616
738
|
private resolveReverseCaseById;
|
|
@@ -626,7 +748,13 @@ declare class OpensteerSessionRuntime {
|
|
|
626
748
|
private waitForMatchingReplayRecord;
|
|
627
749
|
private isObservedReplayRecordSettled;
|
|
628
750
|
private replayInteractionTraceById;
|
|
751
|
+
private readBrowserNetworkRecords;
|
|
629
752
|
private readLiveNetworkRecords;
|
|
753
|
+
private persistLiveRequestIds;
|
|
754
|
+
private persistLiveRequestIdsWithSignal;
|
|
755
|
+
private syncPersistedNetworkSelection;
|
|
756
|
+
private toSavedNetworkQueryInput;
|
|
757
|
+
private toQueryInputFromTagInput;
|
|
630
758
|
private readLiveRequestIds;
|
|
631
759
|
private observeLiveTransportDelta;
|
|
632
760
|
private executeTransportRequestWithJournal;
|
|
@@ -666,8 +794,7 @@ declare class OpensteerSessionRuntime {
|
|
|
666
794
|
private updateCookieJarFromResponse;
|
|
667
795
|
private readCookieValue;
|
|
668
796
|
private readStorageValue;
|
|
669
|
-
private
|
|
670
|
-
private flushBackgroundNetworkPersistence;
|
|
797
|
+
private flushPersistedNetworkHistory;
|
|
671
798
|
private toDomTargetRef;
|
|
672
799
|
private ensureRoot;
|
|
673
800
|
private ensureEngine;
|
|
@@ -710,7 +837,7 @@ interface OpensteerSemanticRuntime {
|
|
|
710
837
|
scroll(input: OpensteerDomScrollInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerActionResult>;
|
|
711
838
|
extract(input: OpensteerDomExtractInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerDomExtractOutput>;
|
|
712
839
|
queryNetwork(input?: OpensteerNetworkQueryInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkQueryOutput>;
|
|
713
|
-
|
|
840
|
+
tagNetwork(input: OpensteerNetworkTagInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkTagOutput>;
|
|
714
841
|
minimizeNetwork(input: OpensteerNetworkMinimizeInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkMinimizeOutput>;
|
|
715
842
|
diffNetwork(input: OpensteerNetworkDiffInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerNetworkDiffOutput>;
|
|
716
843
|
probeNetwork(input: OpensteerTransportProbeInput, options?: OpensteerRuntimeOperationOptions): Promise<OpensteerTransportProbeOutput>;
|
|
@@ -763,4 +890,4 @@ declare function dispatchSemanticOperation(runtime: OpensteerSemanticRuntime, op
|
|
|
763
890
|
readonly signal?: AbortSignal;
|
|
764
891
|
}): Promise<unknown>;
|
|
765
892
|
|
|
766
|
-
export { type CreateFilesystemOpensteerWorkspaceOptions, type FilesystemOpensteerWorkspace, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, OPENSTEER_RUNTIME_CORE_VERSION, type OpensteerEngineFactory, type OpensteerEngineFactoryOptions, type OpensteerRuntimeOperationOptions, type OpensteerRuntimeWorkspace, type OpensteerSemanticRuntime, OpensteerSessionRuntime, type OpensteerSessionRuntimeOptions, type OpensteerWorkspaceManifest, createFilesystemOpensteerWorkspace, dispatchSemanticOperation, normalizeWorkspaceId, resolveFilesystemWorkspacePath };
|
|
893
|
+
export { type AuthRecipeRecord, type AuthRecipeRegistryStore, type CreateFilesystemOpensteerWorkspaceOptions, type DescriptorRecord, type DescriptorRegistryStore, type DomDescriptorPayload, type DomDescriptorRecord, type DomDescriptorStore, type DomReadDescriptorInput, type DomWriteDescriptorInput, type FilesystemOpensteerWorkspace, type InteractionTraceRecord, type InteractionTraceRegistryStore, type ListRegistryRecordsInput, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, OPENSTEER_RUNTIME_CORE_VERSION, type OpensteerEngineFactory, type OpensteerEngineFactoryOptions, type OpensteerExtractionDescriptorPayload, type OpensteerExtractionDescriptorRecord, type OpensteerExtractionDescriptorStore, type OpensteerRuntimeOperationOptions, type OpensteerRuntimeWorkspace, type OpensteerSemanticRuntime, OpensteerSessionRuntime, type OpensteerSessionRuntimeOptions, type OpensteerWorkspaceManifest, type RecipeRecord, type RecipeRegistryStore, type RegistryProvenance, type RequestPlanFreshness, type RequestPlanRecord, type RequestPlanRegistryStore, type ResolveRegistryRecordInput, type ReverseCaseRecord, type ReverseCaseRegistryStore, type ReversePackageRecord, type ReversePackageRegistryStore, type ReverseReportRecord, type ReverseReportRegistryStore, type UpdateRequestPlanFreshnessInput, type UpdateReverseCaseInput, type WriteAuthRecipeInput, type WriteDescriptorInput, type WriteInteractionTraceInput, type WriteRecipeInput, type WriteRequestPlanInput, type WriteReverseCaseInput, type WriteReversePackageInput, type WriteReverseReportInput, buildDomDescriptorKey, buildDomDescriptorPayload, buildDomDescriptorVersion, createDomDescriptorStore, createFilesystemOpensteerWorkspace, createOpensteerExtractionDescriptorStore, dispatchSemanticOperation, hashDomDescriptorDescription, normalizeWorkspaceId, parseDomDescriptorRecord, parseExtractionDescriptorRecord, resolveFilesystemWorkspacePath, sanitizeReplayElementPath };
|