@opensteer/runtime-core 0.1.0 → 0.1.1
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 +434 -294
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +122 -11
- package/dist/index.d.ts +122 -11
- package/dist/index.js +427 -296
- 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, OpensteerNetworkSaveInput, OpensteerNetworkSaveOutput, 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;
|
|
@@ -389,8 +387,8 @@ interface FilesystemOpensteerWorkspace {
|
|
|
389
387
|
readonly browserManifestPath: string;
|
|
390
388
|
readonly browserUserDataDir: string;
|
|
391
389
|
readonly livePath: string;
|
|
392
|
-
readonly
|
|
393
|
-
readonly
|
|
390
|
+
readonly liveLocalPath: string;
|
|
391
|
+
readonly liveCloudPath: string;
|
|
394
392
|
readonly artifactsPath: string;
|
|
395
393
|
readonly tracesPath: string;
|
|
396
394
|
readonly registryPath: string;
|
|
@@ -417,6 +415,55 @@ declare function resolveFilesystemWorkspacePath(input: {
|
|
|
417
415
|
}): string;
|
|
418
416
|
declare function createFilesystemOpensteerWorkspace(options: CreateFilesystemOpensteerWorkspaceOptions): Promise<FilesystemOpensteerWorkspace>;
|
|
419
417
|
|
|
418
|
+
type ElementPath = ReplayElementPath;
|
|
419
|
+
interface DomDescriptorPayload {
|
|
420
|
+
readonly kind: "dom-target";
|
|
421
|
+
readonly method: string;
|
|
422
|
+
readonly description: string;
|
|
423
|
+
readonly path: ReplayElementPath;
|
|
424
|
+
readonly sourceUrl?: string;
|
|
425
|
+
}
|
|
426
|
+
interface DomDescriptorRecord {
|
|
427
|
+
readonly id: string;
|
|
428
|
+
readonly key: string;
|
|
429
|
+
readonly version: string;
|
|
430
|
+
readonly createdAt: number;
|
|
431
|
+
readonly updatedAt: number;
|
|
432
|
+
readonly payload: DomDescriptorPayload;
|
|
433
|
+
}
|
|
434
|
+
interface DomWriteDescriptorInput {
|
|
435
|
+
readonly method: string;
|
|
436
|
+
readonly description: string;
|
|
437
|
+
readonly path: ReplayElementPath;
|
|
438
|
+
readonly sourceUrl?: string;
|
|
439
|
+
readonly createdAt?: number;
|
|
440
|
+
readonly updatedAt?: number;
|
|
441
|
+
}
|
|
442
|
+
interface DomReadDescriptorInput {
|
|
443
|
+
readonly method: string;
|
|
444
|
+
readonly description: string;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
interface DomDescriptorStore {
|
|
448
|
+
read(input: DomReadDescriptorInput): Promise<DomDescriptorRecord | undefined>;
|
|
449
|
+
write(input: DomWriteDescriptorInput): Promise<DomDescriptorRecord>;
|
|
450
|
+
}
|
|
451
|
+
declare function createDomDescriptorStore(options: {
|
|
452
|
+
readonly root?: FilesystemOpensteerWorkspace;
|
|
453
|
+
readonly namespace?: string;
|
|
454
|
+
}): DomDescriptorStore;
|
|
455
|
+
declare function hashDomDescriptorDescription(description: string): string;
|
|
456
|
+
declare function buildDomDescriptorKey(options: {
|
|
457
|
+
readonly namespace?: string;
|
|
458
|
+
readonly method: string;
|
|
459
|
+
readonly description: string;
|
|
460
|
+
}): string;
|
|
461
|
+
declare function buildDomDescriptorPayload(input: DomWriteDescriptorInput): DomDescriptorPayload;
|
|
462
|
+
declare function buildDomDescriptorVersion(payload: DomDescriptorPayload): string;
|
|
463
|
+
declare function parseDomDescriptorRecord(record: DescriptorRecord): DomDescriptorRecord | undefined;
|
|
464
|
+
|
|
465
|
+
declare function sanitizeReplayElementPath(path: ReplayElementPath): ReplayElementPath;
|
|
466
|
+
|
|
420
467
|
interface OpensteerRouteRequest {
|
|
421
468
|
readonly url: string;
|
|
422
469
|
readonly method: string;
|
|
@@ -473,6 +520,61 @@ interface OpensteerInterceptScriptOptions {
|
|
|
473
520
|
}) => string | Promise<string>;
|
|
474
521
|
}
|
|
475
522
|
|
|
523
|
+
interface PersistedOpensteerExtractionValueNode {
|
|
524
|
+
readonly $path: ElementPath;
|
|
525
|
+
readonly attribute?: string;
|
|
526
|
+
}
|
|
527
|
+
interface PersistedOpensteerExtractionSourceNode {
|
|
528
|
+
readonly $source: "current_url";
|
|
529
|
+
}
|
|
530
|
+
interface PersistedOpensteerExtractionArrayVariantNode {
|
|
531
|
+
readonly itemParentPath: ElementPath;
|
|
532
|
+
readonly item: PersistedOpensteerExtractionNode;
|
|
533
|
+
}
|
|
534
|
+
interface PersistedOpensteerExtractionArrayNode {
|
|
535
|
+
readonly $array: {
|
|
536
|
+
readonly variants: readonly PersistedOpensteerExtractionArrayVariantNode[];
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
interface PersistedOpensteerExtractionObjectNode {
|
|
540
|
+
readonly [key: string]: PersistedOpensteerExtractionNode;
|
|
541
|
+
}
|
|
542
|
+
type PersistedOpensteerExtractionNode = PersistedOpensteerExtractionValueNode | PersistedOpensteerExtractionSourceNode | PersistedOpensteerExtractionArrayNode | PersistedOpensteerExtractionObjectNode;
|
|
543
|
+
type PersistedOpensteerExtractionPayload = PersistedOpensteerExtractionObjectNode;
|
|
544
|
+
interface OpensteerExtractionDescriptorPayload {
|
|
545
|
+
readonly kind: "dom-extraction";
|
|
546
|
+
readonly description: string;
|
|
547
|
+
readonly root: PersistedOpensteerExtractionPayload;
|
|
548
|
+
readonly schemaHash?: string;
|
|
549
|
+
readonly sourceUrl?: string;
|
|
550
|
+
}
|
|
551
|
+
interface OpensteerExtractionDescriptorRecord {
|
|
552
|
+
readonly id: string;
|
|
553
|
+
readonly key: string;
|
|
554
|
+
readonly version: string;
|
|
555
|
+
readonly createdAt: number;
|
|
556
|
+
readonly updatedAt: number;
|
|
557
|
+
readonly payload: OpensteerExtractionDescriptorPayload;
|
|
558
|
+
}
|
|
559
|
+
interface OpensteerExtractionDescriptorStore {
|
|
560
|
+
read(input: {
|
|
561
|
+
readonly description: string;
|
|
562
|
+
}): Promise<OpensteerExtractionDescriptorRecord | undefined>;
|
|
563
|
+
write(input: {
|
|
564
|
+
readonly description: string;
|
|
565
|
+
readonly root: PersistedOpensteerExtractionPayload;
|
|
566
|
+
readonly schemaHash?: string;
|
|
567
|
+
readonly sourceUrl?: string;
|
|
568
|
+
readonly createdAt?: number;
|
|
569
|
+
readonly updatedAt?: number;
|
|
570
|
+
}): Promise<OpensteerExtractionDescriptorRecord>;
|
|
571
|
+
}
|
|
572
|
+
declare function createOpensteerExtractionDescriptorStore(options: {
|
|
573
|
+
readonly root?: FilesystemOpensteerWorkspace;
|
|
574
|
+
readonly namespace?: string;
|
|
575
|
+
}): OpensteerExtractionDescriptorStore;
|
|
576
|
+
declare function parseExtractionDescriptorRecord(record: DescriptorRecord): OpensteerExtractionDescriptorRecord | undefined;
|
|
577
|
+
|
|
476
578
|
interface OpensteerEngineFactoryOptions {
|
|
477
579
|
readonly browser?: OpensteerBrowserOptions;
|
|
478
580
|
readonly launch?: OpensteerBrowserLaunchOptions;
|
|
@@ -488,6 +590,13 @@ interface OpensteerSessionRuntimeOptions {
|
|
|
488
590
|
readonly engine?: BrowserCoreEngine;
|
|
489
591
|
readonly engineFactory?: OpensteerEngineFactory;
|
|
490
592
|
readonly policy?: OpensteerPolicy;
|
|
593
|
+
readonly descriptorStore?: DomDescriptorStore;
|
|
594
|
+
readonly extractionDescriptorStore?: OpensteerExtractionDescriptorStore;
|
|
595
|
+
readonly registryOverrides?: {
|
|
596
|
+
readonly requestPlans?: RequestPlanRegistryStore;
|
|
597
|
+
readonly authRecipes?: AuthRecipeRegistryStore;
|
|
598
|
+
readonly recipes?: RecipeRegistryStore;
|
|
599
|
+
};
|
|
491
600
|
readonly cleanupRootOnClose?: boolean;
|
|
492
601
|
readonly sessionInfo?: Partial<Omit<OpensteerSessionInfo, "sessionId" | "activePageRef">>;
|
|
493
602
|
}
|
|
@@ -501,6 +610,9 @@ declare class OpensteerSessionRuntime {
|
|
|
501
610
|
private readonly injectedEngine;
|
|
502
611
|
private readonly engineFactory;
|
|
503
612
|
private readonly policy;
|
|
613
|
+
private readonly injectedDescriptorStore;
|
|
614
|
+
private readonly injectedExtractionDescriptorStore;
|
|
615
|
+
private readonly registryOverrides;
|
|
504
616
|
private readonly cleanupRootOnClose;
|
|
505
617
|
private readonly sessionInfoBase;
|
|
506
618
|
private root;
|
|
@@ -512,7 +624,6 @@ declare class OpensteerSessionRuntime {
|
|
|
512
624
|
private sessionRef;
|
|
513
625
|
private pageRef;
|
|
514
626
|
private runId;
|
|
515
|
-
private latestSnapshot;
|
|
516
627
|
private readonly backgroundNetworkPersistence;
|
|
517
628
|
private readonly cookieJars;
|
|
518
629
|
private readonly recipeCache;
|
|
@@ -763,4 +874,4 @@ declare function dispatchSemanticOperation(runtime: OpensteerSemanticRuntime, op
|
|
|
763
874
|
readonly signal?: AbortSignal;
|
|
764
875
|
}): Promise<unknown>;
|
|
765
876
|
|
|
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 };
|
|
877
|
+
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 UpdateRequestPlanFreshnessInput, type WriteAuthRecipeInput, type WriteRecipeInput, type WriteRequestPlanInput, 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, OpensteerNetworkSaveInput, OpensteerNetworkSaveOutput, 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;
|
|
@@ -389,8 +387,8 @@ interface FilesystemOpensteerWorkspace {
|
|
|
389
387
|
readonly browserManifestPath: string;
|
|
390
388
|
readonly browserUserDataDir: string;
|
|
391
389
|
readonly livePath: string;
|
|
392
|
-
readonly
|
|
393
|
-
readonly
|
|
390
|
+
readonly liveLocalPath: string;
|
|
391
|
+
readonly liveCloudPath: string;
|
|
394
392
|
readonly artifactsPath: string;
|
|
395
393
|
readonly tracesPath: string;
|
|
396
394
|
readonly registryPath: string;
|
|
@@ -417,6 +415,55 @@ declare function resolveFilesystemWorkspacePath(input: {
|
|
|
417
415
|
}): string;
|
|
418
416
|
declare function createFilesystemOpensteerWorkspace(options: CreateFilesystemOpensteerWorkspaceOptions): Promise<FilesystemOpensteerWorkspace>;
|
|
419
417
|
|
|
418
|
+
type ElementPath = ReplayElementPath;
|
|
419
|
+
interface DomDescriptorPayload {
|
|
420
|
+
readonly kind: "dom-target";
|
|
421
|
+
readonly method: string;
|
|
422
|
+
readonly description: string;
|
|
423
|
+
readonly path: ReplayElementPath;
|
|
424
|
+
readonly sourceUrl?: string;
|
|
425
|
+
}
|
|
426
|
+
interface DomDescriptorRecord {
|
|
427
|
+
readonly id: string;
|
|
428
|
+
readonly key: string;
|
|
429
|
+
readonly version: string;
|
|
430
|
+
readonly createdAt: number;
|
|
431
|
+
readonly updatedAt: number;
|
|
432
|
+
readonly payload: DomDescriptorPayload;
|
|
433
|
+
}
|
|
434
|
+
interface DomWriteDescriptorInput {
|
|
435
|
+
readonly method: string;
|
|
436
|
+
readonly description: string;
|
|
437
|
+
readonly path: ReplayElementPath;
|
|
438
|
+
readonly sourceUrl?: string;
|
|
439
|
+
readonly createdAt?: number;
|
|
440
|
+
readonly updatedAt?: number;
|
|
441
|
+
}
|
|
442
|
+
interface DomReadDescriptorInput {
|
|
443
|
+
readonly method: string;
|
|
444
|
+
readonly description: string;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
interface DomDescriptorStore {
|
|
448
|
+
read(input: DomReadDescriptorInput): Promise<DomDescriptorRecord | undefined>;
|
|
449
|
+
write(input: DomWriteDescriptorInput): Promise<DomDescriptorRecord>;
|
|
450
|
+
}
|
|
451
|
+
declare function createDomDescriptorStore(options: {
|
|
452
|
+
readonly root?: FilesystemOpensteerWorkspace;
|
|
453
|
+
readonly namespace?: string;
|
|
454
|
+
}): DomDescriptorStore;
|
|
455
|
+
declare function hashDomDescriptorDescription(description: string): string;
|
|
456
|
+
declare function buildDomDescriptorKey(options: {
|
|
457
|
+
readonly namespace?: string;
|
|
458
|
+
readonly method: string;
|
|
459
|
+
readonly description: string;
|
|
460
|
+
}): string;
|
|
461
|
+
declare function buildDomDescriptorPayload(input: DomWriteDescriptorInput): DomDescriptorPayload;
|
|
462
|
+
declare function buildDomDescriptorVersion(payload: DomDescriptorPayload): string;
|
|
463
|
+
declare function parseDomDescriptorRecord(record: DescriptorRecord): DomDescriptorRecord | undefined;
|
|
464
|
+
|
|
465
|
+
declare function sanitizeReplayElementPath(path: ReplayElementPath): ReplayElementPath;
|
|
466
|
+
|
|
420
467
|
interface OpensteerRouteRequest {
|
|
421
468
|
readonly url: string;
|
|
422
469
|
readonly method: string;
|
|
@@ -473,6 +520,61 @@ interface OpensteerInterceptScriptOptions {
|
|
|
473
520
|
}) => string | Promise<string>;
|
|
474
521
|
}
|
|
475
522
|
|
|
523
|
+
interface PersistedOpensteerExtractionValueNode {
|
|
524
|
+
readonly $path: ElementPath;
|
|
525
|
+
readonly attribute?: string;
|
|
526
|
+
}
|
|
527
|
+
interface PersistedOpensteerExtractionSourceNode {
|
|
528
|
+
readonly $source: "current_url";
|
|
529
|
+
}
|
|
530
|
+
interface PersistedOpensteerExtractionArrayVariantNode {
|
|
531
|
+
readonly itemParentPath: ElementPath;
|
|
532
|
+
readonly item: PersistedOpensteerExtractionNode;
|
|
533
|
+
}
|
|
534
|
+
interface PersistedOpensteerExtractionArrayNode {
|
|
535
|
+
readonly $array: {
|
|
536
|
+
readonly variants: readonly PersistedOpensteerExtractionArrayVariantNode[];
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
interface PersistedOpensteerExtractionObjectNode {
|
|
540
|
+
readonly [key: string]: PersistedOpensteerExtractionNode;
|
|
541
|
+
}
|
|
542
|
+
type PersistedOpensteerExtractionNode = PersistedOpensteerExtractionValueNode | PersistedOpensteerExtractionSourceNode | PersistedOpensteerExtractionArrayNode | PersistedOpensteerExtractionObjectNode;
|
|
543
|
+
type PersistedOpensteerExtractionPayload = PersistedOpensteerExtractionObjectNode;
|
|
544
|
+
interface OpensteerExtractionDescriptorPayload {
|
|
545
|
+
readonly kind: "dom-extraction";
|
|
546
|
+
readonly description: string;
|
|
547
|
+
readonly root: PersistedOpensteerExtractionPayload;
|
|
548
|
+
readonly schemaHash?: string;
|
|
549
|
+
readonly sourceUrl?: string;
|
|
550
|
+
}
|
|
551
|
+
interface OpensteerExtractionDescriptorRecord {
|
|
552
|
+
readonly id: string;
|
|
553
|
+
readonly key: string;
|
|
554
|
+
readonly version: string;
|
|
555
|
+
readonly createdAt: number;
|
|
556
|
+
readonly updatedAt: number;
|
|
557
|
+
readonly payload: OpensteerExtractionDescriptorPayload;
|
|
558
|
+
}
|
|
559
|
+
interface OpensteerExtractionDescriptorStore {
|
|
560
|
+
read(input: {
|
|
561
|
+
readonly description: string;
|
|
562
|
+
}): Promise<OpensteerExtractionDescriptorRecord | undefined>;
|
|
563
|
+
write(input: {
|
|
564
|
+
readonly description: string;
|
|
565
|
+
readonly root: PersistedOpensteerExtractionPayload;
|
|
566
|
+
readonly schemaHash?: string;
|
|
567
|
+
readonly sourceUrl?: string;
|
|
568
|
+
readonly createdAt?: number;
|
|
569
|
+
readonly updatedAt?: number;
|
|
570
|
+
}): Promise<OpensteerExtractionDescriptorRecord>;
|
|
571
|
+
}
|
|
572
|
+
declare function createOpensteerExtractionDescriptorStore(options: {
|
|
573
|
+
readonly root?: FilesystemOpensteerWorkspace;
|
|
574
|
+
readonly namespace?: string;
|
|
575
|
+
}): OpensteerExtractionDescriptorStore;
|
|
576
|
+
declare function parseExtractionDescriptorRecord(record: DescriptorRecord): OpensteerExtractionDescriptorRecord | undefined;
|
|
577
|
+
|
|
476
578
|
interface OpensteerEngineFactoryOptions {
|
|
477
579
|
readonly browser?: OpensteerBrowserOptions;
|
|
478
580
|
readonly launch?: OpensteerBrowserLaunchOptions;
|
|
@@ -488,6 +590,13 @@ interface OpensteerSessionRuntimeOptions {
|
|
|
488
590
|
readonly engine?: BrowserCoreEngine;
|
|
489
591
|
readonly engineFactory?: OpensteerEngineFactory;
|
|
490
592
|
readonly policy?: OpensteerPolicy;
|
|
593
|
+
readonly descriptorStore?: DomDescriptorStore;
|
|
594
|
+
readonly extractionDescriptorStore?: OpensteerExtractionDescriptorStore;
|
|
595
|
+
readonly registryOverrides?: {
|
|
596
|
+
readonly requestPlans?: RequestPlanRegistryStore;
|
|
597
|
+
readonly authRecipes?: AuthRecipeRegistryStore;
|
|
598
|
+
readonly recipes?: RecipeRegistryStore;
|
|
599
|
+
};
|
|
491
600
|
readonly cleanupRootOnClose?: boolean;
|
|
492
601
|
readonly sessionInfo?: Partial<Omit<OpensteerSessionInfo, "sessionId" | "activePageRef">>;
|
|
493
602
|
}
|
|
@@ -501,6 +610,9 @@ declare class OpensteerSessionRuntime {
|
|
|
501
610
|
private readonly injectedEngine;
|
|
502
611
|
private readonly engineFactory;
|
|
503
612
|
private readonly policy;
|
|
613
|
+
private readonly injectedDescriptorStore;
|
|
614
|
+
private readonly injectedExtractionDescriptorStore;
|
|
615
|
+
private readonly registryOverrides;
|
|
504
616
|
private readonly cleanupRootOnClose;
|
|
505
617
|
private readonly sessionInfoBase;
|
|
506
618
|
private root;
|
|
@@ -512,7 +624,6 @@ declare class OpensteerSessionRuntime {
|
|
|
512
624
|
private sessionRef;
|
|
513
625
|
private pageRef;
|
|
514
626
|
private runId;
|
|
515
|
-
private latestSnapshot;
|
|
516
627
|
private readonly backgroundNetworkPersistence;
|
|
517
628
|
private readonly cookieJars;
|
|
518
629
|
private readonly recipeCache;
|
|
@@ -763,4 +874,4 @@ declare function dispatchSemanticOperation(runtime: OpensteerSemanticRuntime, op
|
|
|
763
874
|
readonly signal?: AbortSignal;
|
|
764
875
|
}): Promise<unknown>;
|
|
765
876
|
|
|
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 };
|
|
877
|
+
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 UpdateRequestPlanFreshnessInput, type WriteAuthRecipeInput, type WriteRecipeInput, type WriteRequestPlanInput, buildDomDescriptorKey, buildDomDescriptorPayload, buildDomDescriptorVersion, createDomDescriptorStore, createFilesystemOpensteerWorkspace, createOpensteerExtractionDescriptorStore, dispatchSemanticOperation, hashDomDescriptorDescription, normalizeWorkspaceId, parseDomDescriptorRecord, parseExtractionDescriptorRecord, resolveFilesystemWorkspacePath, sanitizeReplayElementPath };
|