opensteer 0.8.10 → 0.8.12

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.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/sdk/opensteer.ts"],"names":[],"mappings":";;;;AA2OO,IAAM,YAAN,MAAgB;AAAA,EACJ,OAAA;AAAA,EACA,cAAA;AAAA,EACR,OAAA;AAAA,EAET,WAAA,CAAY,OAAA,GAA4B,EAAC,EAAG;AAC1C,IAAA,MAAM,WAAA,GAAc,2BAAA,CAA4B,OAAA,CAAQ,OAAO,CAAA;AAC/D,IAAA,MAAM,EAAE,QAAA,EAAU,UAAA,EAAY,GAAG,gBAAe,GAAI,OAAA;AACpD,IAAA,MAAM,gBAAgB,6BAAA,CAA8B;AAAA,MAClD,GAAI,QAAA,KAAa,MAAA,GAAY,EAAC,GAAI,EAAE,QAAA,EAAS;AAAA,MAC7C;AAAA,KACD,CAAA;AAED,IAAA,IAAI,aAAA,CAAc,QAAA,CAAS,IAAA,KAAS,OAAA,EAAS;AAC3C,MAAA,IAAA,CAAK,cAAA,GAAiB,MAAA;AACtB,MAAA,IAAA,CAAK,UAAU,8BAAA,CAA+B;AAAA,QAC5C,GAAI,QAAA,KAAa,MAAA,GAAY,EAAC,GAAI,EAAE,QAAA,EAAS;AAAA,QAC7C,GAAI,UAAA,KAAe,MAAA,GAAY,EAAC,GAAI,EAAE,QAAQ,UAAA,EAAW;AAAA,QACzD,WAAA;AAAA,QACA,cAAA,EAAgB;AAAA,UACd,GAAG;AAAA;AACL,OACD,CAAA;AACD,MAAA,IAAA,CAAK,UAAU,kCAAA,EAAmC;AAClD,MAAA;AAAA,IACF;AAEA,IAAA,IAAA,CAAK,cAAA,GAAiB,IAAI,uBAAA,CAAwB;AAAA,MAChD,GAAI,eAAe,OAAA,KAAY,MAAA,GAAY,EAAC,GAAI,EAAE,OAAA,EAAS,cAAA,CAAe,OAAA,EAAQ;AAAA,MA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,GAAI,EAAE,oBAAA,EAAsB,KAAA,CAAM,WAAA,EAAY;AAAA,MACrF,GAAI,MAAM,cAAA,KAAmB,MAAA,GAAY,EAAC,GAAI,EAAE,cAAA,EAAgB,KAAA,CAAM,cAAA;AAAe,KACvF;AAAA,EACF;AAEA,EAAA,IAAI,WAAA,EAAa;AACf,IAAA,OAAO;AAAA,MACL,MAAA,EAAQ;AAAA,QACN,IAAA,EAAM,UAAA;AAAA,QACN,UAAU,KAAA,CAAM;AAAA,OAClB;AAAA,MACA,GAAI,MAAM,WAAA,KAAgB,MAAA,GAAY,EAAC,GAAI,EAAE,oBAAA,EAAsB,KAAA,CAAM,WAAA,EAAY;AAAA,MACrF,GAAI,MAAM,cAAA,KAAmB,MAAA,GAAY,EAAC,GAAI,EAAE,cAAA,EAAgB,KAAA,CAAM,cAAA;AAAe,KACvF;AAAA,EACF;AAEA,EAAA,IAAI,KAAA,CAAM,gBAAgB,MAAA,EAAW;AACnC,IAAA,MAAM,IAAI,MAAM,2DAA2D,CAAA;AAAA,EAC7E;AAEA,EAAA,OAAO;AAAA,IACL,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,aAAA;AAAA,MACN,aAAa,KAAA,CAAM;AAAA,KACrB;AAAA,IACA,GAAI,MAAM,cAAA,KAAmB,MAAA,GAAY,EAAC,GAAI,EAAE,cAAA,EAAgB,KAAA,CAAM,cAAA;AAAe,GACvF;AACF;AAEA,SAAS,MAAM,EAAA,EAA2B;AACxC,EAAA,OAAO,IAAI,OAAA,CAAQ,CAAC,YAAY,UAAA,CAAW,OAAA,EAAS,EAAE,CAAC,CAAA;AACzD","file":"index.js","sourcesContent":["import type {\n OpensteerArtifactReadInput,\n OpensteerArtifactReadOutput,\n CookieRecord,\n OpensteerAddInitScriptInput,\n OpensteerAddInitScriptOutput,\n OpensteerCaptchaSolveInput,\n OpensteerCaptchaSolveOutput,\n OpensteerCaptureScriptsInput,\n OpensteerCaptureScriptsOutput,\n OpensteerGetRecipeInput,\n OpensteerGetAuthRecipeInput,\n OpensteerActionResult,\n OpensteerComputerExecuteInput,\n OpensteerComputerExecuteOutput,\n OpensteerDomExtractOutput,\n OpensteerGetRequestPlanInput,\n OpensteerInferRequestPlanInput,\n OpensteerListRecipesInput,\n OpensteerListRecipesOutput,\n OpensteerListAuthRecipesInput,\n OpensteerListAuthRecipesOutput,\n OpensteerNetworkClearInput,\n OpensteerNetworkClearOutput,\n OpensteerNetworkDiffInput,\n OpensteerNetworkDiffOutput,\n OpensteerNetworkMinimizeInput,\n OpensteerNetworkMinimizeOutput,\n OpensteerNetworkQueryInput,\n OpensteerNetworkQueryOutput,\n OpensteerNetworkTagInput,\n OpensteerNetworkTagOutput,\n OpensteerInteractionCaptureInput,\n OpensteerInteractionCaptureOutput,\n OpensteerInteractionDiffInput,\n OpensteerInteractionDiffOutput,\n OpensteerInteractionGetInput,\n OpensteerInteractionGetOutput,\n OpensteerInteractionReplayInput,\n OpensteerInteractionReplayOutput,\n OpensteerPageActivateInput,\n OpensteerPageActivateOutput,\n OpensteerPageCloseInput,\n OpensteerPageCloseOutput,\n OpensteerPageEvaluateInput,\n OpensteerPageEvaluateOutput,\n OpensteerPageGotoInput,\n OpensteerPageGotoOutput,\n OpensteerPageListInput,\n OpensteerPageListOutput,\n OpensteerPageNewInput,\n OpensteerPageNewOutput,\n OpensteerPageSnapshotInput,\n OpensteerPageSnapshotOutput,\n OpensteerListRequestPlansInput,\n OpensteerListRequestPlansOutput,\n OpensteerRawRequestInput,\n OpensteerRawRequestOutput,\n OpensteerRequestExecuteInput,\n OpensteerRequestExecuteOutput,\n OpensteerRunRecipeInput,\n OpensteerRunRecipeOutput,\n OpensteerRunAuthRecipeInput,\n OpensteerRunAuthRecipeOutput,\n OpensteerSessionInfo,\n OpensteerScriptBeautifyInput,\n OpensteerScriptBeautifyOutput,\n OpensteerScriptDeobfuscateInput,\n OpensteerScriptDeobfuscateOutput,\n OpensteerScriptSandboxInput,\n OpensteerScriptSandboxOutput,\n OpensteerReverseExportInput,\n OpensteerReverseExportOutput,\n OpensteerReverseDiscoverInput,\n OpensteerReverseDiscoverOutput,\n OpensteerReverseQueryInput,\n OpensteerReverseQueryOutput,\n OpensteerReversePackageCreateInput,\n OpensteerReversePackageCreateOutput,\n OpensteerReversePackageGetInput,\n OpensteerReversePackageGetOutput,\n OpensteerReversePackageListInput,\n OpensteerReversePackageListOutput,\n OpensteerReversePackagePatchInput,\n OpensteerReversePackagePatchOutput,\n OpensteerReversePackageRunInput,\n OpensteerReversePackageRunOutput,\n OpensteerReverseReportInput,\n OpensteerReverseReportOutput,\n OpensteerSessionCloseOutput,\n OpensteerOpenInput,\n OpensteerOpenOutput,\n OpensteerSnapshotMode,\n OpensteerTargetInput,\n OpensteerTransportProbeInput,\n OpensteerTransportProbeOutput,\n OpensteerWriteRecipeInput,\n OpensteerWriteAuthRecipeInput,\n OpensteerWriteRequestPlanInput,\n StorageSnapshot,\n} from \"@opensteer/protocol\";\n\nimport type { AuthRecipeRecord, RecipeRecord, RequestPlanRecord } from \"../registry.js\";\nimport {\n OpensteerBrowserManager,\n type OpensteerBrowserStatus,\n type WorkspaceBrowserManifest,\n} from \"../browser-manager.js\";\nimport { resolveOpensteerEnvironment } from \"../env.js\";\nimport { OpensteerRuntime, type OpensteerRuntimeOptions } from \"./runtime.js\";\nimport {\n createOpensteerSemanticRuntime,\n resolveOpensteerRuntimeConfig,\n} from \"./runtime-resolution.js\";\nimport type { OpensteerProviderOptions } from \"../provider/config.js\";\nimport type {\n OpensteerInterceptScriptOptions,\n OpensteerInstrumentableRuntime,\n OpensteerRouteOptions,\n OpensteerRouteRegistration,\n} from \"./instrumentation.js\";\nimport type { OpensteerDisconnectableRuntime } from \"./semantic-runtime.js\";\n\nexport interface OpensteerTargetOptions {\n readonly element?: number;\n readonly selector?: string;\n readonly description?: string;\n readonly captureNetwork?: string;\n}\n\nexport interface OpensteerInputOptions extends OpensteerTargetOptions {\n readonly text: string;\n readonly pressEnter?: boolean;\n}\n\nexport interface OpensteerScrollOptions extends OpensteerTargetOptions {\n readonly direction: \"up\" | \"down\" | \"left\" | \"right\";\n readonly amount: number;\n}\n\nexport interface OpensteerExtractOptions {\n readonly description: string;\n readonly schema?: Record<string, unknown>;\n}\n\nexport interface OpensteerWaitForNetworkOptions extends OpensteerNetworkQueryInput {\n readonly timeoutMs?: number;\n readonly pollIntervalMs?: number;\n}\n\nexport interface OpensteerWaitForPageOptions {\n readonly openerPageRef?: string;\n readonly urlIncludes?: string;\n readonly timeoutMs?: number;\n readonly pollIntervalMs?: number;\n}\n\nexport type OpensteerGotoOptions = OpensteerPageGotoInput;\nexport type OpensteerSnapshotOptions = OpensteerSnapshotMode | OpensteerPageSnapshotInput;\nexport type OpensteerSnapshotResult = OpensteerPageSnapshotOutput;\n\nexport type OpensteerComputerExecuteOptions = OpensteerComputerExecuteInput;\nexport type OpensteerComputerExecuteResult = OpensteerComputerExecuteOutput;\nexport type OpensteerNetworkQueryOptions = OpensteerNetworkQueryInput;\nexport type OpensteerNetworkQueryResult = OpensteerNetworkQueryOutput;\nexport type OpensteerNetworkTagOptions = OpensteerNetworkTagInput;\nexport type OpensteerNetworkTagResult = OpensteerNetworkTagOutput;\nexport type OpensteerNetworkMinimizeOptions = OpensteerNetworkMinimizeInput;\nexport type OpensteerNetworkMinimizeResult = OpensteerNetworkMinimizeOutput;\nexport type OpensteerNetworkDiffOptions = OpensteerNetworkDiffInput;\nexport type OpensteerNetworkDiffResult = OpensteerNetworkDiffOutput;\nexport type OpensteerNetworkProbeOptions = OpensteerTransportProbeInput;\nexport type OpensteerNetworkProbeResult = OpensteerTransportProbeOutput;\nexport type OpensteerReverseDiscoverOptions = OpensteerReverseDiscoverInput;\nexport type OpensteerReverseDiscoverResult = OpensteerReverseDiscoverOutput;\nexport type OpensteerReverseQueryOptions = OpensteerReverseQueryInput;\nexport type OpensteerReverseQueryResult = OpensteerReverseQueryOutput;\nexport type OpensteerReversePackageCreateOptions = OpensteerReversePackageCreateInput;\nexport type OpensteerReversePackageCreateResult = OpensteerReversePackageCreateOutput;\nexport type OpensteerReversePackageRunOptions = OpensteerReversePackageRunInput;\nexport type OpensteerReversePackageRunResult = OpensteerReversePackageRunOutput;\nexport type OpensteerReverseExportOptions = OpensteerReverseExportInput;\nexport type OpensteerReverseExportResult = OpensteerReverseExportOutput;\nexport type OpensteerReverseReportOptions = OpensteerReverseReportInput;\nexport type OpensteerReverseReportResult = OpensteerReverseReportOutput;\nexport type OpensteerReversePackageGetOptions = OpensteerReversePackageGetInput;\nexport type OpensteerReversePackageGetResult = OpensteerReversePackageGetOutput;\nexport type OpensteerReversePackageListOptions = OpensteerReversePackageListInput;\nexport type OpensteerReversePackageListResult = OpensteerReversePackageListOutput;\nexport type OpensteerReversePackagePatchOptions = OpensteerReversePackagePatchInput;\nexport type OpensteerReversePackagePatchResult = OpensteerReversePackagePatchOutput;\nexport type OpensteerInteractionCaptureOptions = OpensteerInteractionCaptureInput;\nexport type OpensteerInteractionCaptureResult = OpensteerInteractionCaptureOutput;\nexport type OpensteerInteractionGetOptions = OpensteerInteractionGetInput;\nexport type OpensteerInteractionGetResult = OpensteerInteractionGetOutput;\nexport type OpensteerInteractionDiffOptions = OpensteerInteractionDiffInput;\nexport type OpensteerInteractionDiffResult = OpensteerInteractionDiffOutput;\nexport type OpensteerInteractionReplayOptions = OpensteerInteractionReplayInput;\nexport type OpensteerInteractionReplayResult = OpensteerInteractionReplayOutput;\nexport type OpensteerNetworkClearOptions = OpensteerNetworkClearInput;\nexport type OpensteerNetworkClearResult = OpensteerNetworkClearOutput;\nexport type OpensteerRawRequestOptions = OpensteerRawRequestInput;\nexport type OpensteerRawRequestResult = OpensteerRawRequestOutput;\nexport type OpensteerRequestOptions = Omit<OpensteerRequestExecuteInput, \"key\">;\nexport type OpensteerRequestResult = OpensteerRequestExecuteOutput;\nexport type OpensteerCaptureScriptsOptions = OpensteerCaptureScriptsInput;\nexport type OpensteerCaptureScriptsResult = OpensteerCaptureScriptsOutput;\nexport type OpensteerScriptBeautifyOptions = OpensteerScriptBeautifyInput;\nexport type OpensteerScriptBeautifyResult = OpensteerScriptBeautifyOutput;\nexport type OpensteerScriptDeobfuscateOptions = OpensteerScriptDeobfuscateInput;\nexport type OpensteerScriptDeobfuscateResult = OpensteerScriptDeobfuscateOutput;\nexport type OpensteerScriptSandboxOptions = OpensteerScriptSandboxInput;\nexport type OpensteerScriptSandboxResult = OpensteerScriptSandboxOutput;\nexport type OpensteerArtifactReadOptions = OpensteerArtifactReadInput;\nexport type OpensteerArtifactReadResult = OpensteerArtifactReadOutput;\nexport type OpensteerCaptchaSolveOptions = OpensteerCaptchaSolveInput;\nexport type OpensteerCaptchaSolveResult = OpensteerCaptchaSolveOutput;\nexport type OpensteerAddInitScriptOptions = OpensteerAddInitScriptInput;\n\nexport interface OpensteerOptions extends OpensteerRuntimeOptions {\n readonly provider?: OpensteerProviderOptions;\n}\n\nexport interface OpensteerBrowserCloneOptions {\n readonly sourceUserDataDir: string;\n readonly sourceProfileDirectory?: string;\n}\n\nexport interface OpensteerBrowserController {\n status(): Promise<OpensteerBrowserStatus>;\n clone(input: OpensteerBrowserCloneOptions): Promise<WorkspaceBrowserManifest>;\n reset(): Promise<void>;\n delete(): Promise<void>;\n}\n\nexport class Opensteer {\n private readonly runtime: OpensteerDisconnectableRuntime;\n private readonly browserManager: OpensteerBrowserManager | undefined;\n readonly browser: OpensteerBrowserController;\n\n constructor(options: OpensteerOptions = {}) {\n const environment = resolveOpensteerEnvironment(options.rootDir);\n const { provider, engineName, ...runtimeOptions } = options;\n const runtimeConfig = resolveOpensteerRuntimeConfig({\n ...(provider === undefined ? {} : { provider }),\n environment,\n });\n\n if (runtimeConfig.provider.mode === \"cloud\") {\n this.browserManager = undefined;\n this.runtime = createOpensteerSemanticRuntime({\n ...(provider === undefined ? {} : { provider }),\n ...(engineName === undefined ? {} : { engine: engineName }),\n environment,\n runtimeOptions: {\n ...runtimeOptions,\n },\n });\n this.browser = createUnsupportedBrowserController();\n return;\n }\n\n this.browserManager = new OpensteerBrowserManager({\n ...(runtimeOptions.rootDir === undefined ? {} : { rootDir: runtimeOptions.rootDir }),\n ...(runtimeOptions.rootPath === undefined ? {} : { rootPath: runtimeOptions.rootPath }),\n ...(runtimeOptions.workspace === undefined ? {} : { workspace: runtimeOptions.workspace }),\n ...(engineName === undefined ? {} : { engineName }),\n ...(runtimeOptions.browser === undefined ? {} : { browser: runtimeOptions.browser }),\n ...(runtimeOptions.launch === undefined ? {} : { launch: runtimeOptions.launch }),\n ...(runtimeOptions.context === undefined ? {} : { context: runtimeOptions.context }),\n });\n this.runtime = createOpensteerSemanticRuntime({\n ...(provider === undefined ? {} : { provider }),\n ...(engineName === undefined ? {} : { engine: engineName }),\n environment,\n runtimeOptions: {\n ...runtimeOptions,\n rootPath: this.browserManager.rootPath,\n cleanupRootOnClose: this.browserManager.cleanupRootOnDisconnect,\n },\n });\n this.browser = {\n status: () => this.browserManager!.status(),\n clone: (input) => this.browserManager!.clonePersistentBrowser(input),\n reset: () => this.browserManager!.reset(),\n delete: () => this.browserManager!.delete(),\n };\n }\n\n async open(input: string | OpensteerOpenInput = {}): Promise<OpensteerOpenOutput> {\n return this.runtime.open(typeof input === \"string\" ? { url: input } : input);\n }\n\n async info(): Promise<OpensteerSessionInfo> {\n return this.runtime.info();\n }\n\n async listPages(input: OpensteerPageListInput = {}): Promise<OpensteerPageListOutput> {\n return this.runtime.listPages(input);\n }\n\n async newPage(input: OpensteerPageNewInput = {}): Promise<OpensteerPageNewOutput> {\n return this.runtime.newPage(input);\n }\n\n async activatePage(input: OpensteerPageActivateInput): Promise<OpensteerPageActivateOutput> {\n return this.runtime.activatePage(input);\n }\n\n async closePage(input: OpensteerPageCloseInput = {}): Promise<OpensteerPageCloseOutput> {\n return this.runtime.closePage(input);\n }\n\n async goto(input: string | OpensteerGotoOptions): Promise<OpensteerPageGotoOutput> {\n return this.runtime.goto(typeof input === \"string\" ? { url: input } : input);\n }\n\n async evaluate(\n input: string | OpensteerPageEvaluateInput,\n ): Promise<OpensteerPageEvaluateOutput[\"value\"]> {\n const normalized =\n typeof input === \"string\"\n ? {\n script: input,\n }\n : input;\n const result = await this.runtime.evaluate(normalized);\n return result.value;\n }\n\n async evaluateJson(\n input: string | OpensteerPageEvaluateInput,\n ): Promise<OpensteerPageEvaluateOutput[\"value\"]> {\n return this.evaluate(input);\n }\n\n async addInitScript(\n input: string | OpensteerAddInitScriptInput,\n ): Promise<OpensteerAddInitScriptOutput> {\n const normalized =\n typeof input === \"string\"\n ? {\n script: input,\n }\n : input;\n return this.runtime.addInitScript(normalized);\n }\n\n async click(input: OpensteerTargetOptions): Promise<OpensteerActionResult> {\n const normalized = normalizeTargetOptions(input);\n return this.runtime.click(normalized);\n }\n\n async hover(input: OpensteerTargetOptions): Promise<OpensteerActionResult> {\n const normalized = normalizeTargetOptions(input);\n return this.runtime.hover(normalized);\n }\n\n async input(input: OpensteerInputOptions): Promise<OpensteerActionResult> {\n const normalized = normalizeTargetOptions(input);\n return this.runtime.input({\n ...normalized,\n text: input.text,\n ...(input.pressEnter === undefined ? {} : { pressEnter: input.pressEnter }),\n });\n }\n\n async scroll(input: OpensteerScrollOptions): Promise<OpensteerActionResult> {\n const normalized = normalizeTargetOptions(input);\n return this.runtime.scroll({\n ...normalized,\n direction: input.direction,\n amount: input.amount,\n });\n }\n\n async extract(input: OpensteerExtractOptions): Promise<OpensteerDomExtractOutput[\"data\"]> {\n const result = await this.runtime.extract(input);\n return result.data;\n }\n\n async queryNetwork(\n input: OpensteerNetworkQueryOptions = {},\n ): Promise<OpensteerNetworkQueryResult> {\n return this.runtime.queryNetwork(input);\n }\n\n async waitForNetwork(\n input: OpensteerWaitForNetworkOptions,\n ): Promise<OpensteerNetworkQueryResult[\"records\"][number]> {\n const { timeoutMs, pollIntervalMs, ...query } = input;\n const timeoutAt = Date.now() + (timeoutMs ?? 30_000);\n const pollInterval = pollIntervalMs ?? 100;\n const baseline = new Set(\n (\n await this.runtime.queryNetwork({\n ...query,\n limit: 200,\n })\n ).records.map((record) => record.recordId),\n );\n\n while (true) {\n const { records } = await this.runtime.queryNetwork({\n ...query,\n limit: 200,\n });\n const next = records.find((record) => !baseline.has(record.recordId));\n if (next !== undefined) {\n return next;\n }\n if (Date.now() >= timeoutAt) {\n throw new Error(\"waitForNetwork timed out\");\n }\n await delay(pollInterval);\n }\n }\n\n async waitForResponse(\n input: OpensteerWaitForNetworkOptions,\n ): Promise<OpensteerNetworkQueryResult[\"records\"][number]> {\n return this.waitForNetwork(input);\n }\n\n async waitForPage(\n input: OpensteerWaitForPageOptions = {},\n ): Promise<OpensteerPageListOutput[\"pages\"][number]> {\n const baseline = new Set((await this.runtime.listPages()).pages.map((page) => page.pageRef));\n const timeoutAt = Date.now() + (input.timeoutMs ?? 30_000);\n const pollIntervalMs = input.pollIntervalMs ?? 100;\n\n while (true) {\n const { pages } = await this.runtime.listPages();\n const match = pages.find((page) => {\n if (baseline.has(page.pageRef)) {\n return false;\n }\n if (input.openerPageRef !== undefined && page.openerPageRef !== input.openerPageRef) {\n return false;\n }\n if (input.urlIncludes !== undefined && !page.url.includes(input.urlIncludes)) {\n return false;\n }\n return true;\n });\n if (match !== undefined) {\n return match;\n }\n if (Date.now() >= timeoutAt) {\n throw new Error(\"waitForPage timed out\");\n }\n await delay(pollIntervalMs);\n }\n }\n\n async snapshot(input: OpensteerSnapshotOptions = {}): Promise<OpensteerSnapshotResult> {\n return this.runtime.snapshot(typeof input === \"string\" ? { mode: input } : input);\n }\n\n async tagNetwork(input: OpensteerNetworkTagOptions): Promise<OpensteerNetworkTagResult> {\n return this.runtime.tagNetwork(input);\n }\n\n async minimizeNetwork(\n input: OpensteerNetworkMinimizeOptions,\n ): Promise<OpensteerNetworkMinimizeResult> {\n return this.runtime.minimizeNetwork(input);\n }\n\n async diffNetwork(input: OpensteerNetworkDiffOptions): Promise<OpensteerNetworkDiffResult> {\n return this.runtime.diffNetwork(input);\n }\n\n async probeNetwork(input: OpensteerNetworkProbeOptions): Promise<OpensteerNetworkProbeResult> {\n return this.runtime.probeNetwork(input);\n }\n\n async reverseDiscover(\n input: OpensteerReverseDiscoverOptions = {},\n ): Promise<OpensteerReverseDiscoverResult> {\n return this.runtime.discoverReverse(input);\n }\n\n async reverseQuery(input: OpensteerReverseQueryOptions): Promise<OpensteerReverseQueryResult> {\n return this.runtime.queryReverse(input);\n }\n\n async createReversePackage(\n input: OpensteerReversePackageCreateOptions,\n ): Promise<OpensteerReversePackageCreateResult> {\n return this.runtime.createReversePackage(input);\n }\n\n async runReversePackage(\n input: OpensteerReversePackageRunOptions,\n ): Promise<OpensteerReversePackageRunResult> {\n return this.runtime.runReversePackage(input);\n }\n\n async reverseExport(input: OpensteerReverseExportOptions): Promise<OpensteerReverseExportResult> {\n return this.runtime.exportReverse(input);\n }\n\n async reverseReport(input: OpensteerReverseReportOptions): Promise<OpensteerReverseReportResult> {\n return this.runtime.getReverseReport(input);\n }\n\n async getReversePackage(\n input: OpensteerReversePackageGetOptions,\n ): Promise<OpensteerReversePackageGetResult> {\n return this.runtime.getReversePackage(input);\n }\n\n async listReversePackages(\n input: OpensteerReversePackageListOptions = {},\n ): Promise<OpensteerReversePackageListResult> {\n return this.runtime.listReversePackages(input);\n }\n\n async patchReversePackage(\n input: OpensteerReversePackagePatchOptions,\n ): Promise<OpensteerReversePackagePatchResult> {\n return this.runtime.patchReversePackage(input);\n }\n\n async interactionCapture(\n input: OpensteerInteractionCaptureOptions,\n ): Promise<OpensteerInteractionCaptureResult> {\n return this.runtime.captureInteraction(input);\n }\n\n async getInteraction(\n input: OpensteerInteractionGetOptions,\n ): Promise<OpensteerInteractionGetResult> {\n return this.runtime.getInteraction(input);\n }\n\n async interactionDiff(\n input: OpensteerInteractionDiffOptions,\n ): Promise<OpensteerInteractionDiffResult> {\n return this.runtime.diffInteraction(input);\n }\n\n async interactionReplay(\n input: OpensteerInteractionReplayOptions,\n ): Promise<OpensteerInteractionReplayResult> {\n return this.runtime.replayInteraction(input);\n }\n\n async clearNetwork(\n input: OpensteerNetworkClearOptions = {},\n ): Promise<OpensteerNetworkClearResult> {\n return this.runtime.clearNetwork(input);\n }\n\n async captureScripts(\n input: OpensteerCaptureScriptsOptions = {},\n ): Promise<OpensteerCaptureScriptsResult> {\n return this.runtime.captureScripts(input);\n }\n\n async readArtifact(input: OpensteerArtifactReadOptions): Promise<OpensteerArtifactReadResult> {\n return this.runtime.readArtifact(input);\n }\n\n async beautifyScript(\n input: OpensteerScriptBeautifyOptions,\n ): Promise<OpensteerScriptBeautifyResult> {\n return this.runtime.beautifyScript(input);\n }\n\n async deobfuscateScript(\n input: OpensteerScriptDeobfuscateOptions,\n ): Promise<OpensteerScriptDeobfuscateResult> {\n return this.runtime.deobfuscateScript(input);\n }\n\n async sandboxScript(input: OpensteerScriptSandboxOptions): Promise<OpensteerScriptSandboxResult> {\n return this.runtime.sandboxScript(input);\n }\n\n async solveCaptcha(input: OpensteerCaptchaSolveOptions): Promise<OpensteerCaptchaSolveResult> {\n return this.runtime.solveCaptcha(input);\n }\n\n async getCookies(\n input: { readonly urls?: readonly string[] } = {},\n ): Promise<readonly CookieRecord[]> {\n return this.runtime.getCookies(input);\n }\n\n async getStorageSnapshot(\n input: {\n readonly includeSessionStorage?: boolean;\n readonly includeIndexedDb?: boolean;\n } = {},\n ): Promise<StorageSnapshot> {\n return this.runtime.getStorageSnapshot(input);\n }\n\n async writeRequestPlan(input: OpensteerWriteRequestPlanInput): Promise<RequestPlanRecord> {\n return this.runtime.writeRequestPlan(input);\n }\n\n async inferRequestPlan(input: OpensteerInferRequestPlanInput): Promise<RequestPlanRecord> {\n return this.runtime.inferRequestPlan(input);\n }\n\n async getRequestPlan(input: OpensteerGetRequestPlanInput): Promise<RequestPlanRecord> {\n return this.runtime.getRequestPlan(input);\n }\n\n async listRequestPlans(\n input: OpensteerListRequestPlansInput = {},\n ): Promise<OpensteerListRequestPlansOutput> {\n return this.runtime.listRequestPlans(input);\n }\n\n async writeAuthRecipe(input: OpensteerWriteAuthRecipeInput): Promise<AuthRecipeRecord> {\n return this.runtime.writeAuthRecipe(input);\n }\n\n async writeRecipe(input: OpensteerWriteRecipeInput): Promise<RecipeRecord> {\n return this.runtime.writeRecipe(input);\n }\n\n async getAuthRecipe(input: OpensteerGetAuthRecipeInput): Promise<AuthRecipeRecord> {\n return this.runtime.getAuthRecipe(input);\n }\n\n async getRecipe(input: OpensteerGetRecipeInput): Promise<RecipeRecord> {\n return this.runtime.getRecipe(input);\n }\n\n async listAuthRecipes(\n input: OpensteerListAuthRecipesInput = {},\n ): Promise<OpensteerListAuthRecipesOutput> {\n return this.runtime.listAuthRecipes(input);\n }\n\n async listRecipes(input: OpensteerListRecipesInput = {}): Promise<OpensteerListRecipesOutput> {\n return this.runtime.listRecipes(input);\n }\n\n async runAuthRecipe(input: OpensteerRunAuthRecipeInput): Promise<OpensteerRunAuthRecipeOutput> {\n return this.runtime.runAuthRecipe(input);\n }\n\n async runRecipe(input: OpensteerRunRecipeInput): Promise<OpensteerRunRecipeOutput> {\n return this.runtime.runRecipe(input);\n }\n\n async request(key: string, input: OpensteerRequestOptions = {}): Promise<OpensteerRequestResult> {\n return this.runtime.request({\n key,\n ...input,\n });\n }\n\n async rawRequest(input: OpensteerRawRequestOptions): Promise<OpensteerRawRequestResult> {\n return this.runtime.rawRequest(input);\n }\n\n async route(input: OpensteerRouteOptions): Promise<OpensteerRouteRegistration> {\n return this.requireOwnedInstrumentationRuntime(\"route\").route(input);\n }\n\n async interceptScript(\n input: OpensteerInterceptScriptOptions,\n ): Promise<OpensteerRouteRegistration> {\n return this.requireOwnedInstrumentationRuntime(\"interceptScript\").interceptScript(input);\n }\n\n async computerExecute(\n input: OpensteerComputerExecuteOptions,\n ): Promise<OpensteerComputerExecuteResult> {\n return this.runtime.computerExecute(input);\n }\n\n async close(): Promise<OpensteerSessionCloseOutput> {\n if (this.browserManager === undefined || this.browserManager.mode === \"temporary\") {\n return this.runtime.close();\n }\n\n const output = await this.runtime.close();\n await this.browserManager.close();\n return output;\n }\n\n async disconnect(): Promise<void> {\n await this.runtime.disconnect();\n }\n\n private requireOwnedInstrumentationRuntime(\n method: \"route\" | \"interceptScript\",\n ): OpensteerInstrumentableRuntime {\n if (isInstrumentableRuntime(this.runtime)) {\n return this.runtime;\n }\n throw new Error(`${method}() is not available for this session runtime.`);\n }\n}\n\nfunction isInstrumentableRuntime(\n runtime: OpensteerDisconnectableRuntime,\n): runtime is OpensteerDisconnectableRuntime & OpensteerInstrumentableRuntime {\n return (\n typeof (runtime as Partial<OpensteerInstrumentableRuntime>).route === \"function\" &&\n typeof (runtime as Partial<OpensteerInstrumentableRuntime>).interceptScript === \"function\"\n );\n}\n\nfunction createUnsupportedBrowserController(): OpensteerBrowserController {\n const fail = async (): Promise<never> => {\n throw new Error(\"browser.* helpers are only available in local mode.\");\n };\n\n return {\n status: fail,\n clone: fail,\n reset: fail,\n delete: fail,\n };\n}\n\nfunction normalizeTargetOptions(input: OpensteerTargetOptions): {\n readonly target: OpensteerTargetInput;\n readonly persistAsDescription?: string;\n readonly captureNetwork?: string;\n} {\n const hasElement = input.element !== undefined;\n const hasSelector = input.selector !== undefined;\n if (hasElement && hasSelector) {\n throw new Error(\"Specify exactly one of element, selector, or description.\");\n }\n\n if (hasElement) {\n return {\n target: {\n kind: \"element\",\n element: input.element!,\n },\n ...(input.description === undefined ? {} : { persistAsDescription: input.description }),\n ...(input.captureNetwork === undefined ? {} : { captureNetwork: input.captureNetwork }),\n };\n }\n\n if (hasSelector) {\n return {\n target: {\n kind: \"selector\",\n selector: input.selector!,\n },\n ...(input.description === undefined ? {} : { persistAsDescription: input.description }),\n ...(input.captureNetwork === undefined ? {} : { captureNetwork: input.captureNetwork }),\n };\n }\n\n if (input.description === undefined) {\n throw new Error(\"Specify exactly one of element, selector, or description.\");\n }\n\n return {\n target: {\n kind: \"description\",\n description: input.description,\n },\n ...(input.captureNetwork === undefined ? {} : { captureNetwork: input.captureNetwork }),\n };\n}\n\nfunction delay(ms: number): Promise<void> {\n return new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js","sourcesContent":["import type {\n OpensteerArtifactReadInput,\n OpensteerArtifactReadOutput,\n CookieRecord,\n OpensteerAddInitScriptInput,\n OpensteerAddInitScriptOutput,\n OpensteerCaptchaSolveInput,\n OpensteerCaptchaSolveOutput,\n OpensteerCaptureScriptsInput,\n OpensteerCaptureScriptsOutput,\n OpensteerGetRecipeInput,\n OpensteerGetAuthRecipeInput,\n OpensteerActionResult,\n OpensteerComputerExecuteInput,\n OpensteerComputerExecuteOutput,\n OpensteerComputerKeyModifier,\n OpensteerComputerMouseButton,\n OpensteerDomExtractOutput,\n OpensteerGetRequestPlanInput,\n OpensteerInferRequestPlanInput,\n OpensteerListRecipesInput,\n OpensteerListRecipesOutput,\n OpensteerListAuthRecipesInput,\n OpensteerListAuthRecipesOutput,\n OpensteerNetworkClearInput,\n OpensteerNetworkClearOutput,\n OpensteerNetworkDiffInput,\n OpensteerNetworkDiffOutput,\n OpensteerNetworkMinimizeInput,\n OpensteerNetworkMinimizeOutput,\n OpensteerNetworkQueryInput,\n OpensteerNetworkQueryOutput,\n OpensteerNetworkTagInput,\n OpensteerNetworkTagOutput,\n OpensteerInteractionCaptureInput,\n OpensteerInteractionCaptureOutput,\n OpensteerInteractionDiffInput,\n OpensteerInteractionDiffOutput,\n OpensteerInteractionGetInput,\n OpensteerInteractionGetOutput,\n OpensteerInteractionReplayInput,\n OpensteerInteractionReplayOutput,\n OpensteerPageActivateInput,\n OpensteerPageActivateOutput,\n OpensteerPageCloseInput,\n OpensteerPageCloseOutput,\n OpensteerPageEvaluateInput,\n OpensteerPageEvaluateOutput,\n OpensteerPageGotoInput,\n OpensteerPageGotoOutput,\n OpensteerPageListInput,\n OpensteerPageListOutput,\n OpensteerPageNewInput,\n OpensteerPageNewOutput,\n OpensteerPageSnapshotInput,\n OpensteerPageSnapshotOutput,\n OpensteerListRequestPlansInput,\n OpensteerListRequestPlansOutput,\n OpensteerRawRequestInput,\n OpensteerRawRequestOutput,\n OpensteerRequestExecuteInput,\n OpensteerRequestExecuteOutput,\n OpensteerRunRecipeInput,\n OpensteerRunRecipeOutput,\n OpensteerRunAuthRecipeInput,\n OpensteerRunAuthRecipeOutput,\n OpensteerSessionInfo,\n OpensteerScriptBeautifyInput,\n OpensteerScriptBeautifyOutput,\n OpensteerScriptDeobfuscateInput,\n OpensteerScriptDeobfuscateOutput,\n OpensteerScriptSandboxInput,\n OpensteerScriptSandboxOutput,\n OpensteerReverseExportInput,\n OpensteerReverseExportOutput,\n OpensteerReverseDiscoverInput,\n OpensteerReverseDiscoverOutput,\n OpensteerReverseQueryInput,\n OpensteerReverseQueryOutput,\n OpensteerReversePackageCreateInput,\n OpensteerReversePackageCreateOutput,\n OpensteerReversePackageGetInput,\n OpensteerReversePackageGetOutput,\n OpensteerReversePackageListInput,\n OpensteerReversePackageListOutput,\n OpensteerReversePackagePatchInput,\n OpensteerReversePackagePatchOutput,\n OpensteerReversePackageRunInput,\n OpensteerReversePackageRunOutput,\n OpensteerReverseReportInput,\n OpensteerReverseReportOutput,\n OpensteerSessionCloseOutput,\n OpensteerOpenInput,\n OpensteerOpenOutput,\n OpensteerSnapshotMode,\n OpensteerTargetInput,\n OpensteerTransportProbeInput,\n OpensteerTransportProbeOutput,\n OpensteerWriteRecipeInput,\n OpensteerWriteAuthRecipeInput,\n OpensteerWriteRequestPlanInput,\n StorageSnapshot,\n} from \"@opensteer/protocol\";\n\nimport type { AuthRecipeRecord, RecipeRecord, RequestPlanRecord } from \"../registry.js\";\nimport {\n OpensteerBrowserManager,\n type OpensteerBrowserStatus,\n type WorkspaceBrowserManifest,\n} from \"../browser-manager.js\";\nimport { resolveOpensteerEnvironment } from \"../env.js\";\nimport { OpensteerRuntime, type OpensteerRuntimeOptions } from \"./runtime.js\";\nimport {\n createOpensteerSemanticRuntime,\n resolveOpensteerRuntimeConfig,\n} from \"./runtime-resolution.js\";\nimport type { OpensteerProviderOptions } from \"../provider/config.js\";\nimport type {\n OpensteerInterceptScriptOptions,\n OpensteerInstrumentableRuntime,\n OpensteerRouteOptions,\n OpensteerRouteRegistration,\n} from \"./instrumentation.js\";\nimport type { OpensteerDisconnectableRuntime } from \"./semantic-runtime.js\";\n\nexport interface OpensteerTargetOptions {\n readonly element?: number;\n readonly selector?: string;\n readonly description?: string;\n readonly captureNetwork?: string;\n}\n\nexport interface OpensteerClickOptions extends OpensteerTargetOptions {\n readonly button?: OpensteerComputerMouseButton;\n readonly clickCount?: number;\n readonly modifiers?: readonly OpensteerComputerKeyModifier[];\n}\n\nexport interface OpensteerInputOptions extends OpensteerTargetOptions {\n readonly text: string;\n readonly pressEnter?: boolean;\n}\n\nexport interface OpensteerScrollOptions extends OpensteerTargetOptions {\n readonly direction: \"up\" | \"down\" | \"left\" | \"right\";\n readonly amount: number;\n}\n\nexport interface OpensteerExtractOptions {\n readonly description: string;\n readonly schema?: Record<string, unknown>;\n}\n\nexport interface OpensteerWaitForNetworkOptions extends OpensteerNetworkQueryInput {\n readonly timeoutMs?: number;\n readonly pollIntervalMs?: number;\n}\n\nexport interface OpensteerWaitForPageOptions {\n readonly openerPageRef?: string;\n readonly urlIncludes?: string;\n readonly timeoutMs?: number;\n readonly pollIntervalMs?: number;\n}\n\nexport type OpensteerGotoOptions = OpensteerPageGotoInput;\nexport type OpensteerSnapshotOptions = OpensteerSnapshotMode | OpensteerPageSnapshotInput;\nexport type OpensteerSnapshotResult = OpensteerPageSnapshotOutput;\n\nexport type OpensteerComputerExecuteOptions = OpensteerComputerExecuteInput;\nexport type OpensteerComputerExecuteResult = OpensteerComputerExecuteOutput;\nexport type OpensteerNetworkQueryOptions = OpensteerNetworkQueryInput;\nexport type OpensteerNetworkQueryResult = OpensteerNetworkQueryOutput;\nexport type OpensteerNetworkTagOptions = OpensteerNetworkTagInput;\nexport type OpensteerNetworkTagResult = OpensteerNetworkTagOutput;\nexport type OpensteerNetworkMinimizeOptions = OpensteerNetworkMinimizeInput;\nexport type OpensteerNetworkMinimizeResult = OpensteerNetworkMinimizeOutput;\nexport type OpensteerNetworkDiffOptions = OpensteerNetworkDiffInput;\nexport type OpensteerNetworkDiffResult = OpensteerNetworkDiffOutput;\nexport type OpensteerNetworkProbeOptions = OpensteerTransportProbeInput;\nexport type OpensteerNetworkProbeResult = OpensteerTransportProbeOutput;\nexport type OpensteerReverseDiscoverOptions = OpensteerReverseDiscoverInput;\nexport type OpensteerReverseDiscoverResult = OpensteerReverseDiscoverOutput;\nexport type OpensteerReverseQueryOptions = OpensteerReverseQueryInput;\nexport type OpensteerReverseQueryResult = OpensteerReverseQueryOutput;\nexport type OpensteerReversePackageCreateOptions = OpensteerReversePackageCreateInput;\nexport type OpensteerReversePackageCreateResult = OpensteerReversePackageCreateOutput;\nexport type OpensteerReversePackageRunOptions = OpensteerReversePackageRunInput;\nexport type OpensteerReversePackageRunResult = OpensteerReversePackageRunOutput;\nexport type OpensteerReverseExportOptions = OpensteerReverseExportInput;\nexport type OpensteerReverseExportResult = OpensteerReverseExportOutput;\nexport type OpensteerReverseReportOptions = OpensteerReverseReportInput;\nexport type OpensteerReverseReportResult = OpensteerReverseReportOutput;\nexport type OpensteerReversePackageGetOptions = OpensteerReversePackageGetInput;\nexport type OpensteerReversePackageGetResult = OpensteerReversePackageGetOutput;\nexport type OpensteerReversePackageListOptions = OpensteerReversePackageListInput;\nexport type OpensteerReversePackageListResult = OpensteerReversePackageListOutput;\nexport type OpensteerReversePackagePatchOptions = OpensteerReversePackagePatchInput;\nexport type OpensteerReversePackagePatchResult = OpensteerReversePackagePatchOutput;\nexport type OpensteerInteractionCaptureOptions = OpensteerInteractionCaptureInput;\nexport type OpensteerInteractionCaptureResult = OpensteerInteractionCaptureOutput;\nexport type OpensteerInteractionGetOptions = OpensteerInteractionGetInput;\nexport type OpensteerInteractionGetResult = OpensteerInteractionGetOutput;\nexport type OpensteerInteractionDiffOptions = OpensteerInteractionDiffInput;\nexport type OpensteerInteractionDiffResult = OpensteerInteractionDiffOutput;\nexport type OpensteerInteractionReplayOptions = OpensteerInteractionReplayInput;\nexport type OpensteerInteractionReplayResult = OpensteerInteractionReplayOutput;\nexport type OpensteerNetworkClearOptions = OpensteerNetworkClearInput;\nexport type OpensteerNetworkClearResult = OpensteerNetworkClearOutput;\nexport type OpensteerRawRequestOptions = OpensteerRawRequestInput;\nexport type OpensteerRawRequestResult = OpensteerRawRequestOutput;\nexport type OpensteerRequestOptions = Omit<OpensteerRequestExecuteInput, \"key\">;\nexport type OpensteerRequestResult = OpensteerRequestExecuteOutput;\nexport type OpensteerCaptureScriptsOptions = OpensteerCaptureScriptsInput;\nexport type OpensteerCaptureScriptsResult = OpensteerCaptureScriptsOutput;\nexport type OpensteerScriptBeautifyOptions = OpensteerScriptBeautifyInput;\nexport type OpensteerScriptBeautifyResult = OpensteerScriptBeautifyOutput;\nexport type OpensteerScriptDeobfuscateOptions = OpensteerScriptDeobfuscateInput;\nexport type OpensteerScriptDeobfuscateResult = OpensteerScriptDeobfuscateOutput;\nexport type OpensteerScriptSandboxOptions = OpensteerScriptSandboxInput;\nexport type OpensteerScriptSandboxResult = OpensteerScriptSandboxOutput;\nexport type OpensteerArtifactReadOptions = OpensteerArtifactReadInput;\nexport type OpensteerArtifactReadResult = OpensteerArtifactReadOutput;\nexport type OpensteerCaptchaSolveOptions = OpensteerCaptchaSolveInput;\nexport type OpensteerCaptchaSolveResult = OpensteerCaptchaSolveOutput;\nexport type OpensteerAddInitScriptOptions = OpensteerAddInitScriptInput;\n\nexport interface OpensteerOptions extends OpensteerRuntimeOptions {\n readonly provider?: OpensteerProviderOptions;\n}\n\nexport interface OpensteerBrowserCloneOptions {\n readonly sourceUserDataDir: string;\n readonly sourceProfileDirectory?: string;\n}\n\nexport interface OpensteerBrowserController {\n status(): Promise<OpensteerBrowserStatus>;\n clone(input: OpensteerBrowserCloneOptions): Promise<WorkspaceBrowserManifest>;\n reset(): Promise<void>;\n delete(): Promise<void>;\n}\n\nexport class Opensteer {\n private readonly runtime: OpensteerDisconnectableRuntime;\n private readonly browserManager: OpensteerBrowserManager | undefined;\n readonly browser: OpensteerBrowserController;\n\n constructor(options: OpensteerOptions = {}) {\n const environment = resolveOpensteerEnvironment(options.rootDir);\n const { provider, engineName, ...runtimeOptions } = options;\n const runtimeConfig = resolveOpensteerRuntimeConfig({\n ...(provider === undefined ? {} : { provider }),\n environment,\n });\n\n if (runtimeConfig.provider.mode === \"cloud\") {\n this.browserManager = undefined;\n this.runtime = createOpensteerSemanticRuntime({\n ...(provider === undefined ? {} : { provider }),\n ...(engineName === undefined ? {} : { engine: engineName }),\n environment,\n runtimeOptions: {\n ...runtimeOptions,\n },\n });\n this.browser = createUnsupportedBrowserController();\n return;\n }\n\n this.browserManager = new OpensteerBrowserManager({\n ...(runtimeOptions.rootDir === undefined ? {} : { rootDir: runtimeOptions.rootDir }),\n ...(runtimeOptions.rootPath === undefined ? {} : { rootPath: runtimeOptions.rootPath }),\n ...(runtimeOptions.workspace === undefined ? {} : { workspace: runtimeOptions.workspace }),\n ...(engineName === undefined ? {} : { engineName }),\n ...(runtimeOptions.browser === undefined ? {} : { browser: runtimeOptions.browser }),\n ...(runtimeOptions.launch === undefined ? {} : { launch: runtimeOptions.launch }),\n ...(runtimeOptions.context === undefined ? {} : { context: runtimeOptions.context }),\n });\n this.runtime = createOpensteerSemanticRuntime({\n ...(provider === undefined ? {} : { provider }),\n ...(engineName === undefined ? {} : { engine: engineName }),\n environment,\n runtimeOptions: {\n ...runtimeOptions,\n rootPath: this.browserManager.rootPath,\n cleanupRootOnClose: this.browserManager.cleanupRootOnDisconnect,\n },\n });\n this.browser = {\n status: () => this.browserManager!.status(),\n clone: (input) => this.browserManager!.clonePersistentBrowser(input),\n reset: () => this.browserManager!.reset(),\n delete: () => this.browserManager!.delete(),\n };\n }\n\n async open(input: string | OpensteerOpenInput = {}): Promise<OpensteerOpenOutput> {\n return this.runtime.open(typeof input === \"string\" ? { url: input } : input);\n }\n\n async info(): Promise<OpensteerSessionInfo> {\n return this.runtime.info();\n }\n\n async listPages(input: OpensteerPageListInput = {}): Promise<OpensteerPageListOutput> {\n return this.runtime.listPages(input);\n }\n\n async newPage(input: OpensteerPageNewInput = {}): Promise<OpensteerPageNewOutput> {\n return this.runtime.newPage(input);\n }\n\n async activatePage(input: OpensteerPageActivateInput): Promise<OpensteerPageActivateOutput> {\n return this.runtime.activatePage(input);\n }\n\n async closePage(input: OpensteerPageCloseInput = {}): Promise<OpensteerPageCloseOutput> {\n return this.runtime.closePage(input);\n }\n\n async goto(input: string | OpensteerGotoOptions): Promise<OpensteerPageGotoOutput> {\n return this.runtime.goto(typeof input === \"string\" ? { url: input } : input);\n }\n\n async evaluate(\n input: string | OpensteerPageEvaluateInput,\n ): Promise<OpensteerPageEvaluateOutput[\"value\"]> {\n const normalized =\n typeof input === \"string\"\n ? {\n script: input,\n }\n : input;\n const result = await this.runtime.evaluate(normalized);\n return result.value;\n }\n\n async evaluateJson(\n input: string | OpensteerPageEvaluateInput,\n ): Promise<OpensteerPageEvaluateOutput[\"value\"]> {\n return this.evaluate(input);\n }\n\n async addInitScript(\n input: string | OpensteerAddInitScriptInput,\n ): Promise<OpensteerAddInitScriptOutput> {\n const normalized =\n typeof input === \"string\"\n ? {\n script: input,\n }\n : input;\n return this.runtime.addInitScript(normalized);\n }\n\n async click(input: OpensteerClickOptions): Promise<OpensteerActionResult> {\n const { button, clickCount, modifiers, ...target } = input;\n const normalized = {\n ...normalizeTargetOptions(target),\n ...(button === undefined ? {} : { button }),\n ...(clickCount === undefined ? {} : { clickCount }),\n ...(modifiers === undefined ? {} : { modifiers }),\n };\n return this.runtime.click(normalized);\n }\n\n async hover(input: OpensteerTargetOptions): Promise<OpensteerActionResult> {\n const normalized = normalizeTargetOptions(input);\n return this.runtime.hover(normalized);\n }\n\n async input(input: OpensteerInputOptions): Promise<OpensteerActionResult> {\n const normalized = normalizeTargetOptions(input);\n return this.runtime.input({\n ...normalized,\n text: input.text,\n ...(input.pressEnter === undefined ? {} : { pressEnter: input.pressEnter }),\n });\n }\n\n async scroll(input: OpensteerScrollOptions): Promise<OpensteerActionResult> {\n const normalized = normalizeTargetOptions(input);\n return this.runtime.scroll({\n ...normalized,\n direction: input.direction,\n amount: input.amount,\n });\n }\n\n async extract(input: OpensteerExtractOptions): Promise<OpensteerDomExtractOutput[\"data\"]> {\n const result = await this.runtime.extract(input);\n return result.data;\n }\n\n async queryNetwork(\n input: OpensteerNetworkQueryOptions = {},\n ): Promise<OpensteerNetworkQueryResult> {\n return this.runtime.queryNetwork(input);\n }\n\n async waitForNetwork(\n input: OpensteerWaitForNetworkOptions,\n ): Promise<OpensteerNetworkQueryResult[\"records\"][number]> {\n const { timeoutMs, pollIntervalMs, ...query } = input;\n const timeoutAt = Date.now() + (timeoutMs ?? 30_000);\n const pollInterval = pollIntervalMs ?? 100;\n const baseline = new Set(\n (\n await this.runtime.queryNetwork({\n ...query,\n limit: 200,\n })\n ).records.map((record) => record.recordId),\n );\n\n while (true) {\n const { records } = await this.runtime.queryNetwork({\n ...query,\n limit: 200,\n });\n const next = records.find((record) => !baseline.has(record.recordId));\n if (next !== undefined) {\n return next;\n }\n if (Date.now() >= timeoutAt) {\n throw new Error(\"waitForNetwork timed out\");\n }\n await delay(pollInterval);\n }\n }\n\n async waitForResponse(\n input: OpensteerWaitForNetworkOptions,\n ): Promise<OpensteerNetworkQueryResult[\"records\"][number]> {\n return this.waitForNetwork(input);\n }\n\n async waitForPage(\n input: OpensteerWaitForPageOptions = {},\n ): Promise<OpensteerPageListOutput[\"pages\"][number]> {\n const baseline = new Set((await this.runtime.listPages()).pages.map((page) => page.pageRef));\n const timeoutAt = Date.now() + (input.timeoutMs ?? 30_000);\n const pollIntervalMs = input.pollIntervalMs ?? 100;\n\n while (true) {\n const { pages } = await this.runtime.listPages();\n const match = pages.find((page) => {\n if (baseline.has(page.pageRef)) {\n return false;\n }\n if (input.openerPageRef !== undefined && page.openerPageRef !== input.openerPageRef) {\n return false;\n }\n if (input.urlIncludes !== undefined && !page.url.includes(input.urlIncludes)) {\n return false;\n }\n return true;\n });\n if (match !== undefined) {\n return match;\n }\n if (Date.now() >= timeoutAt) {\n throw new Error(\"waitForPage timed out\");\n }\n await delay(pollIntervalMs);\n }\n }\n\n async snapshot(input: OpensteerSnapshotOptions = {}): Promise<OpensteerSnapshotResult> {\n return this.runtime.snapshot(typeof input === \"string\" ? { mode: input } : input);\n }\n\n async tagNetwork(input: OpensteerNetworkTagOptions): Promise<OpensteerNetworkTagResult> {\n return this.runtime.tagNetwork(input);\n }\n\n async minimizeNetwork(\n input: OpensteerNetworkMinimizeOptions,\n ): Promise<OpensteerNetworkMinimizeResult> {\n return this.runtime.minimizeNetwork(input);\n }\n\n async diffNetwork(input: OpensteerNetworkDiffOptions): Promise<OpensteerNetworkDiffResult> {\n return this.runtime.diffNetwork(input);\n }\n\n async probeNetwork(input: OpensteerNetworkProbeOptions): Promise<OpensteerNetworkProbeResult> {\n return this.runtime.probeNetwork(input);\n }\n\n async reverseDiscover(\n input: OpensteerReverseDiscoverOptions = {},\n ): Promise<OpensteerReverseDiscoverResult> {\n return this.runtime.discoverReverse(input);\n }\n\n async reverseQuery(input: OpensteerReverseQueryOptions): Promise<OpensteerReverseQueryResult> {\n return this.runtime.queryReverse(input);\n }\n\n async createReversePackage(\n input: OpensteerReversePackageCreateOptions,\n ): Promise<OpensteerReversePackageCreateResult> {\n return this.runtime.createReversePackage(input);\n }\n\n async runReversePackage(\n input: OpensteerReversePackageRunOptions,\n ): Promise<OpensteerReversePackageRunResult> {\n return this.runtime.runReversePackage(input);\n }\n\n async reverseExport(input: OpensteerReverseExportOptions): Promise<OpensteerReverseExportResult> {\n return this.runtime.exportReverse(input);\n }\n\n async reverseReport(input: OpensteerReverseReportOptions): Promise<OpensteerReverseReportResult> {\n return this.runtime.getReverseReport(input);\n }\n\n async getReversePackage(\n input: OpensteerReversePackageGetOptions,\n ): Promise<OpensteerReversePackageGetResult> {\n return this.runtime.getReversePackage(input);\n }\n\n async listReversePackages(\n input: OpensteerReversePackageListOptions = {},\n ): Promise<OpensteerReversePackageListResult> {\n return this.runtime.listReversePackages(input);\n }\n\n async patchReversePackage(\n input: OpensteerReversePackagePatchOptions,\n ): Promise<OpensteerReversePackagePatchResult> {\n return this.runtime.patchReversePackage(input);\n }\n\n async interactionCapture(\n input: OpensteerInteractionCaptureOptions,\n ): Promise<OpensteerInteractionCaptureResult> {\n return this.runtime.captureInteraction(input);\n }\n\n async getInteraction(\n input: OpensteerInteractionGetOptions,\n ): Promise<OpensteerInteractionGetResult> {\n return this.runtime.getInteraction(input);\n }\n\n async interactionDiff(\n input: OpensteerInteractionDiffOptions,\n ): Promise<OpensteerInteractionDiffResult> {\n return this.runtime.diffInteraction(input);\n }\n\n async interactionReplay(\n input: OpensteerInteractionReplayOptions,\n ): Promise<OpensteerInteractionReplayResult> {\n return this.runtime.replayInteraction(input);\n }\n\n async clearNetwork(\n input: OpensteerNetworkClearOptions = {},\n ): Promise<OpensteerNetworkClearResult> {\n return this.runtime.clearNetwork(input);\n }\n\n async captureScripts(\n input: OpensteerCaptureScriptsOptions = {},\n ): Promise<OpensteerCaptureScriptsResult> {\n return this.runtime.captureScripts(input);\n }\n\n async readArtifact(input: OpensteerArtifactReadOptions): Promise<OpensteerArtifactReadResult> {\n return this.runtime.readArtifact(input);\n }\n\n async beautifyScript(\n input: OpensteerScriptBeautifyOptions,\n ): Promise<OpensteerScriptBeautifyResult> {\n return this.runtime.beautifyScript(input);\n }\n\n async deobfuscateScript(\n input: OpensteerScriptDeobfuscateOptions,\n ): Promise<OpensteerScriptDeobfuscateResult> {\n return this.runtime.deobfuscateScript(input);\n }\n\n async sandboxScript(input: OpensteerScriptSandboxOptions): Promise<OpensteerScriptSandboxResult> {\n return this.runtime.sandboxScript(input);\n }\n\n async solveCaptcha(input: OpensteerCaptchaSolveOptions): Promise<OpensteerCaptchaSolveResult> {\n return this.runtime.solveCaptcha(input);\n }\n\n async getCookies(\n input: { readonly urls?: readonly string[] } = {},\n ): Promise<readonly CookieRecord[]> {\n return this.runtime.getCookies(input);\n }\n\n async getStorageSnapshot(\n input: {\n readonly includeSessionStorage?: boolean;\n readonly includeIndexedDb?: boolean;\n } = {},\n ): Promise<StorageSnapshot> {\n return this.runtime.getStorageSnapshot(input);\n }\n\n async writeRequestPlan(input: OpensteerWriteRequestPlanInput): Promise<RequestPlanRecord> {\n return this.runtime.writeRequestPlan(input);\n }\n\n async inferRequestPlan(input: OpensteerInferRequestPlanInput): Promise<RequestPlanRecord> {\n return this.runtime.inferRequestPlan(input);\n }\n\n async getRequestPlan(input: OpensteerGetRequestPlanInput): Promise<RequestPlanRecord> {\n return this.runtime.getRequestPlan(input);\n }\n\n async listRequestPlans(\n input: OpensteerListRequestPlansInput = {},\n ): Promise<OpensteerListRequestPlansOutput> {\n return this.runtime.listRequestPlans(input);\n }\n\n async writeAuthRecipe(input: OpensteerWriteAuthRecipeInput): Promise<AuthRecipeRecord> {\n return this.runtime.writeAuthRecipe(input);\n }\n\n async writeRecipe(input: OpensteerWriteRecipeInput): Promise<RecipeRecord> {\n return this.runtime.writeRecipe(input);\n }\n\n async getAuthRecipe(input: OpensteerGetAuthRecipeInput): Promise<AuthRecipeRecord> {\n return this.runtime.getAuthRecipe(input);\n }\n\n async getRecipe(input: OpensteerGetRecipeInput): Promise<RecipeRecord> {\n return this.runtime.getRecipe(input);\n }\n\n async listAuthRecipes(\n input: OpensteerListAuthRecipesInput = {},\n ): Promise<OpensteerListAuthRecipesOutput> {\n return this.runtime.listAuthRecipes(input);\n }\n\n async listRecipes(input: OpensteerListRecipesInput = {}): Promise<OpensteerListRecipesOutput> {\n return this.runtime.listRecipes(input);\n }\n\n async runAuthRecipe(input: OpensteerRunAuthRecipeInput): Promise<OpensteerRunAuthRecipeOutput> {\n return this.runtime.runAuthRecipe(input);\n }\n\n async runRecipe(input: OpensteerRunRecipeInput): Promise<OpensteerRunRecipeOutput> {\n return this.runtime.runRecipe(input);\n }\n\n async request(key: string, input: OpensteerRequestOptions = {}): Promise<OpensteerRequestResult> {\n return this.runtime.request({\n key,\n ...input,\n });\n }\n\n async rawRequest(input: OpensteerRawRequestOptions): Promise<OpensteerRawRequestResult> {\n return this.runtime.rawRequest(input);\n }\n\n async route(input: OpensteerRouteOptions): Promise<OpensteerRouteRegistration> {\n return this.requireOwnedInstrumentationRuntime(\"route\").route(input);\n }\n\n async interceptScript(\n input: OpensteerInterceptScriptOptions,\n ): Promise<OpensteerRouteRegistration> {\n return this.requireOwnedInstrumentationRuntime(\"interceptScript\").interceptScript(input);\n }\n\n async computerExecute(\n input: OpensteerComputerExecuteOptions,\n ): Promise<OpensteerComputerExecuteResult> {\n return this.runtime.computerExecute(input);\n }\n\n async close(): Promise<OpensteerSessionCloseOutput> {\n if (this.browserManager === undefined || this.browserManager.mode === \"temporary\") {\n return this.runtime.close();\n }\n\n const output = await this.runtime.close();\n await this.browserManager.close();\n return output;\n }\n\n async disconnect(): Promise<void> {\n await this.runtime.disconnect();\n }\n\n private requireOwnedInstrumentationRuntime(\n method: \"route\" | \"interceptScript\",\n ): OpensteerInstrumentableRuntime {\n if (isInstrumentableRuntime(this.runtime)) {\n return this.runtime;\n }\n throw new Error(`${method}() is not available for this session runtime.`);\n }\n}\n\nfunction isInstrumentableRuntime(\n runtime: OpensteerDisconnectableRuntime,\n): runtime is OpensteerDisconnectableRuntime & OpensteerInstrumentableRuntime {\n return (\n typeof (runtime as Partial<OpensteerInstrumentableRuntime>).route === \"function\" &&\n typeof (runtime as Partial<OpensteerInstrumentableRuntime>).interceptScript === \"function\"\n );\n}\n\nfunction createUnsupportedBrowserController(): OpensteerBrowserController {\n const fail = async (): Promise<never> => {\n throw new Error(\"browser.* helpers are only available in local mode.\");\n };\n\n return {\n status: fail,\n clone: fail,\n reset: fail,\n delete: fail,\n };\n}\n\nfunction normalizeTargetOptions(input: OpensteerTargetOptions): {\n readonly target: OpensteerTargetInput;\n readonly persistAsDescription?: string;\n readonly captureNetwork?: string;\n} {\n const hasElement = input.element !== undefined;\n const hasSelector = input.selector !== undefined;\n if (hasElement && hasSelector) {\n throw new Error(\"Specify exactly one of element, selector, or description.\");\n }\n\n if (hasElement) {\n return {\n target: {\n kind: \"element\",\n element: input.element!,\n },\n ...(input.description === undefined ? {} : { persistAsDescription: input.description }),\n ...(input.captureNetwork === undefined ? {} : { captureNetwork: input.captureNetwork }),\n };\n }\n\n if (hasSelector) {\n return {\n target: {\n kind: \"selector\",\n selector: input.selector!,\n },\n ...(input.description === undefined ? {} : { persistAsDescription: input.description }),\n ...(input.captureNetwork === undefined ? {} : { captureNetwork: input.captureNetwork }),\n };\n }\n\n if (input.description === undefined) {\n throw new Error(\"Specify exactly one of element, selector, or description.\");\n }\n\n return {\n target: {\n kind: \"description\",\n description: input.description,\n },\n ...(input.captureNetwork === undefined ? {} : { captureNetwork: input.captureNetwork }),\n };\n}\n\nfunction delay(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opensteer",
3
- "version": "0.8.10",
3
+ "version": "0.8.12",
4
4
  "description": "Opensteer browser automation, replay, and reverse-engineering toolkit.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -56,14 +56,14 @@
56
56
  "sharp": "^0.34.5",
57
57
  "skills": "^1.4.6",
58
58
  "ws": "^8.18.0",
59
- "@opensteer/runtime-core": "0.1.2",
60
- "@opensteer/engine-playwright": "0.8.2"
59
+ "@opensteer/engine-playwright": "0.8.4",
60
+ "@opensteer/runtime-core": "0.1.4"
61
61
  },
62
62
  "optionalDependencies": {
63
63
  "webcrack": "^2.15.1"
64
64
  },
65
65
  "peerDependencies": {
66
- "@opensteer/engine-abp": "0.8.3"
66
+ "@opensteer/engine-abp": "0.8.5"
67
67
  },
68
68
  "peerDependenciesMeta": {
69
69
  "@opensteer/engine-abp": {
@@ -71,9 +71,9 @@
71
71
  }
72
72
  },
73
73
  "devDependencies": {
74
- "@opensteer/browser-core": "0.7.2",
75
- "@opensteer/protocol": "0.7.2",
76
- "@opensteer/engine-abp": "0.8.3"
74
+ "@opensteer/browser-core": "0.7.4",
75
+ "@opensteer/engine-abp": "0.8.5",
76
+ "@opensteer/protocol": "0.7.4"
77
77
  },
78
78
  "scripts": {
79
79
  "build": "tsup && node ../../scripts/sync-package-skills.mjs",
@@ -1,52 +1,82 @@
1
1
  ---
2
2
  name: recorder
3
- description: "Use when the user wants to record a live browser workflow and turn it into a deterministic Opensteer replay script. Prefer this for manual browser capture, multi-tab flow recording, and agent-guided record-and-replay setup with the Opensteer CLI."
3
+ description: Use when the user wants to record a live browser workflow and turn it into a replayable Opensteer script. Prefer this for manual browser capture, multi-tab recording, and record-then-rerun workflows with the Opensteer CLI.
4
4
  argument-hint: "[url]"
5
5
  ---
6
6
 
7
7
  # Recorder
8
8
 
9
- Use the Opensteer recorder to open a headed local Playwright browser, capture DOM-level actions, and write a replayable TypeScript script.
9
+ Use the Opensteer recorder when the user wants to perform a real browser flow manually and save it as a deterministic replay script.
10
10
 
11
- ## When to use
11
+ ## Inputs
12
12
 
13
- - Record a real browser flow for later replay.
14
- - Turn a manual QA walkthrough into Opensteer SDK code.
15
- - Capture a multi-tab browsing session as a starting point for automation.
13
+ - `url`: starting URL to open
14
+ - `workspace`: target Opensteer workspace id
15
+ - `provider`: `local` or `cloud`
16
+ - optional `output`: explicit output path
16
17
 
17
- ## Quick start
18
+ ## Quick Start
19
+
20
+ Local recording:
18
21
 
19
22
  ```bash
20
23
  opensteer record --workspace <id> --url <url>
21
- opensteer record --workspace <id> --url <url> --output <path>
22
24
  ```
23
25
 
24
- 1. Start recording with `opensteer record --workspace <id> --url <url>`.
25
- 2. Perform the workflow in the headed browser.
26
- 3. Stop recording with the injected `Stop recording` button in the browser.
27
- 4. Wait for the CLI to write the script path and close the browser session.
28
- 5. Inspect the generated file before replaying or editing it.
26
+ Cloud recording:
27
+
28
+ ```bash
29
+ opensteer record --provider cloud --workspace <id> --url <url>
30
+ ```
31
+
32
+ Cloud recording requires:
33
+
34
+ - `OPENSTEER_BASE_URL`
35
+ - `OPENSTEER_API_KEY`
36
+ - `OPENSTEER_CLOUD_APP_BASE_URL`
37
+
38
+ ## Mode Selection
39
+
40
+ - Use `provider=local` when the user wants to interact with a local Playwright browser window.
41
+ - Use `provider=cloud` when the user wants to interact through the cloud browser session UI.
42
+ - Keep local recording on the default headed persistent browser flow.
43
+ - In cloud mode, do not force `headless=false`. Use the normal cloud launch behavior unless the user explicitly overrides it.
44
+
45
+ ## Workflow
46
+
47
+ 1. Start the recorder with `opensteer record`.
48
+ 2. If the provider is `cloud`, give the user the browser session URL printed by the CLI.
49
+ 3. Tell the user to perform the workflow manually.
50
+ 4. Tell the user exactly how to stop:
51
+ - local: click the injected `Stop recording` button in the browser page
52
+ - cloud: click `Stop recording` in the browser session toolbar UI
53
+ 5. Wait for the recorder process to finish. Do not assume recording is complete just because the browser URL was printed.
54
+ 6. Only after the CLI exits, read the generated script from disk and inspect what was captured.
55
+ 7. If the user wants verification, rerun the generated script instead of only reviewing the file.
29
56
 
30
57
  ## Guardrails
31
58
 
32
- - Recording requires `provider=local`.
33
59
  - Recording requires `engine=playwright`.
34
- - Recording always uses a headed persistent browser for the target workspace.
35
- - Stopping is browser-driven. Do not rely on `Ctrl+C` or removed timeout flags.
60
+ - Local recording only supports a persistent browser.
61
+ - Local recording requires a headed browser. Do not pass `--headless true` in local mode.
62
+ - Cloud recording does not support `browser.mode="attach"`.
63
+ - Do not stop recording with `Ctrl+C` unless the user explicitly wants to abort the run.
64
+ - Do not use removed timeout flags such as `--record-timeout-ms`.
36
65
  - If a launch argument value starts with `--`, pass it as `--arg=...`, not `--arg ...`.
66
+ - If the flow depends on recorder limits such as iframes, file upload, drag-and-drop, or canvas behavior, read the reference file before promising support.
37
67
 
38
- ## Output
68
+ ## Output Contract
39
69
 
40
70
  - Default output path: `.opensteer/workspaces/<id>/recorded-flow.ts`
41
- - The generated script imports `Opensteer` from `opensteer`.
42
- - Replay uses public SDK methods such as `open`, `goto`, `click`, `input`, `scroll`, `newPage`, `closePage`, `activatePage`, and `evaluate`.
71
+ - The CLI writes the replay script locally after recording completes in both local and cloud modes.
72
+ - Generated scripts use the public Opensteer SDK surface. Cloud recordings bootstrap `provider.mode = "cloud"` and local recordings bootstrap the workspace-backed local flow.
43
73
 
44
- ## Agent workflow
74
+ ## Agent Guidance
45
75
 
46
- - Use the browser stop button as the primary stop path.
47
- - After recording, read the generated script and summarize what was captured before changing it.
48
- - If the user asks for replay verification, run the generated script instead of only inspecting the file.
49
- - If the flow depends on recorder limits such as iframes or file upload, read the reference file before promising support.
76
+ - Keep the `record` command alive while the user is recording.
77
+ - If the user is actively driving the session, avoid mixing in extra agent actions unless they explicitly ask for help recording a combined flow.
78
+ - After recording completes, summarize the captured flow before editing it.
79
+ - If replay fails, debug the generated script and rerun it instead of re-recording immediately.
50
80
 
51
81
  ## References
52
82