@effect-agent/platform-cloudflare 0.1.0-beta.12 → 0.1.0-beta.120
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/Alarm.d.mts +243 -0
- package/dist/Alarm.mjs +882 -0
- package/dist/Alarm.mjs.map +1 -0
- package/dist/BrowserRestCapture.d.mts +34 -0
- package/dist/BrowserRestCapture.mjs +238 -0
- package/dist/BrowserRestCapture.mjs.map +1 -0
- package/dist/BrowserRestCrawl.d.mts +16 -0
- package/dist/BrowserRestCrawl.mjs +244 -0
- package/dist/BrowserRestCrawl.mjs.map +1 -0
- package/dist/CloudflareAiGateway.d.mts +64 -0
- package/dist/CloudflareAiGateway.mjs +70 -0
- package/dist/CloudflareAiGateway.mjs.map +1 -0
- package/dist/CloudflareBindings.d.mts +115 -0
- package/dist/CloudflareBindings.mjs +113 -0
- package/dist/CloudflareBindings.mjs.map +1 -0
- package/dist/CloudflareBrowser-DV6kya1H.mjs +495 -0
- package/dist/CloudflareBrowser-DV6kya1H.mjs.map +1 -0
- package/dist/CloudflareBrowser-Doe1M7R5.d.mts +80 -0
- package/dist/CloudflareBrowser.d.mts +2 -0
- package/dist/CloudflareBrowser.mjs +2 -0
- package/dist/CloudflareCodeMode.d.mts +44 -0
- package/dist/CloudflareCodeMode.mjs +616 -0
- package/dist/CloudflareCodeMode.mjs.map +1 -0
- package/dist/CloudflareConfig-DKXGo8L3.d.mts +106 -0
- package/dist/CloudflareConfig.d.mts +2 -0
- package/dist/CloudflareConfig.mjs +128 -0
- package/dist/CloudflareConfig.mjs.map +1 -0
- package/dist/CloudflareMemory.d.mts +142 -0
- package/dist/CloudflareMemory.mjs +202 -0
- package/dist/CloudflareMemory.mjs.map +1 -0
- package/dist/CloudflareScheduling.d.mts +52 -0
- package/dist/CloudflareScheduling.mjs +396 -0
- package/dist/CloudflareScheduling.mjs.map +1 -0
- package/dist/CloudflareSubscriptions.d.mts +87 -0
- package/dist/CloudflareSubscriptions.mjs +530 -0
- package/dist/CloudflareSubscriptions.mjs.map +1 -0
- package/dist/CloudflareThreadClient.d.mts +1697 -0
- package/dist/CloudflareThreadClient.mjs +382 -0
- package/dist/CloudflareThreadClient.mjs.map +1 -0
- package/dist/InteractiveBrowser-BQo7QKaP.d.mts +228 -0
- package/dist/InteractiveBrowser-CBUFAECo.mjs +1749 -0
- package/dist/InteractiveBrowser-CBUFAECo.mjs.map +1 -0
- package/dist/InteractiveBrowser.d.mts +2 -0
- package/dist/InteractiveBrowser.mjs +2 -0
- package/dist/ProtectedBrowser.d.mts +128 -0
- package/dist/ProtectedBrowser.mjs +1201 -0
- package/dist/ProtectedBrowser.mjs.map +1 -0
- package/dist/ThreadObject-9IVibJM7.d.mts +839 -0
- package/dist/ThreadObject-DaC-IhCm.mjs +849 -0
- package/dist/ThreadObject-DaC-IhCm.mjs.map +1 -0
- package/dist/ThreadObject.d.mts +2 -0
- package/dist/ThreadObject.mjs +3 -0
- package/dist/WakeScheduler.d.mts +23 -0
- package/dist/WakeScheduler.mjs +57 -0
- package/dist/WakeScheduler.mjs.map +1 -0
- package/dist/boundary-BguazVkh.mjs +42 -0
- package/dist/boundary-BguazVkh.mjs.map +1 -0
- package/dist/index.d.mts +13 -1548
- package/dist/index.mjs +13 -1636
- package/dist/prepared-admission-DU0_T-ev.mjs +73 -0
- package/dist/prepared-admission-DU0_T-ev.mjs.map +1 -0
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/package.json +1 -56
- package/src/Alarm.ts +1830 -0
- package/src/BrowserRestCapture.ts +477 -0
- package/src/BrowserRestCrawl.ts +540 -0
- package/src/CloudflareAiGateway.ts +170 -0
- package/src/CloudflareBindings.ts +199 -0
- package/src/CloudflareBrowser.ts +15 -0
- package/src/{code-mode-executor.ts → CloudflareCodeMode.ts} +372 -204
- package/src/{config.ts → CloudflareConfig.ts} +19 -12
- package/src/CloudflareMemory.ts +420 -0
- package/src/CloudflareScheduling.ts +747 -0
- package/src/CloudflareSubscriptions.ts +1041 -0
- package/src/CloudflareThreadClient.ts +809 -0
- package/src/InteractiveBrowser.ts +3241 -0
- package/src/ProtectedBrowser.ts +9 -0
- package/src/ThreadObject.ts +1190 -0
- package/src/{wake-scheduler.ts → WakeScheduler.ts} +32 -26
- package/src/index.ts +12 -23
- package/src/internal/boundary.ts +55 -0
- package/src/internal/browser-binding.ts +82 -0
- package/src/internal/browser-failure.ts +92 -0
- package/src/internal/browser-file-selection.ts +126 -0
- package/src/internal/browser-quick-action.ts +857 -0
- package/src/internal/browser-session-lifecycle.ts +193 -0
- package/src/internal/layers.ts +773 -0
- package/src/internal/message-delivery.ts +131 -0
- package/src/internal/prepared-admission.ts +116 -0
- package/src/internal/progress-wait.ts +121 -0
- package/src/internal/transport.ts +44 -0
- package/src/protected-browser/binding.ts +354 -0
- package/src/protected-browser/host.ts +382 -0
- package/src/protected-browser/inspect-frame.ts +140 -0
- package/src/protected-browser/native.ts +485 -0
- package/src/protected-browser/policy.ts +872 -0
- package/dist/index.mjs.map +0 -1
- package/src/alarm.ts +0 -334
- package/src/bindings.ts +0 -145
- package/src/client.ts +0 -646
- package/src/conversation-object.ts +0 -768
- package/src/layers.ts +0 -376
- package/src/transport.ts +0 -38
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { Context, Effect, Layer, Redacted, Schema, Scope } from "effect";
|
|
2
|
+
import { SandboxImplementation } from "effect-agent/sandbox";
|
|
3
|
+
import { HttpClient } from "effect/unstable/http";
|
|
4
|
+
import { BrowserExpectedTarget, BrowserHandle, BrowserSelectFileRequest, InteractiveBrowser, InteractiveBrowserError, InteractiveBrowserPolicy, InteractiveBrowserPolicyDeniedError } from "effect-agent/interactive-browser";
|
|
5
|
+
//#region src/internal/browser-session-lifecycle.d.ts
|
|
6
|
+
declare const BrowserRunCleanupError_base: Schema.Class<BrowserRunCleanupError, Schema.TaggedStruct<"BrowserRunCleanupError", {
|
|
7
|
+
readonly reason: Schema.Literals<readonly ["configuration", "authorization", "rate-limited", "provider", "malformed", "timeout", "pending"]>;
|
|
8
|
+
readonly status: Schema.optionalKey<Schema.Int>;
|
|
9
|
+
readonly cause: Schema.optionalKey<Schema.Defect>;
|
|
10
|
+
}>, import("effect/Cause").YieldableError>;
|
|
11
|
+
declare class BrowserRunCleanupError extends BrowserRunCleanupError_base {}
|
|
12
|
+
interface BrowserRunLifecycleOptions {
|
|
13
|
+
readonly accountId: string;
|
|
14
|
+
readonly apiToken: Redacted.Redacted<string>;
|
|
15
|
+
}
|
|
16
|
+
declare const BrowserRunSessionLifecycle_base: Context.ServiceClass<BrowserRunSessionLifecycle, "@effect-agent/platform-cloudflare/BrowserRunSessionLifecycle", {
|
|
17
|
+
readonly close: (sessionId: Redacted.Redacted<string>) => Effect.Effect<void, BrowserRunCleanupError>;
|
|
18
|
+
}>;
|
|
19
|
+
declare class BrowserRunSessionLifecycle extends BrowserRunSessionLifecycle_base {
|
|
20
|
+
static layer(options: BrowserRunLifecycleOptions): Layer.Layer<BrowserRunSessionLifecycle, BrowserRunCleanupError, HttpClient.HttpClient>;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/InteractiveBrowser.d.ts
|
|
24
|
+
declare const browserRunInteractiveImplementation: SandboxImplementation;
|
|
25
|
+
declare const BrowserRunPageObservation: Schema.fromJsonString<Schema.Struct<{
|
|
26
|
+
readonly documentId: Schema.NonEmptyString;
|
|
27
|
+
readonly pageText: Schema.String;
|
|
28
|
+
readonly selectorMatchCount: Schema.Natural;
|
|
29
|
+
readonly controlsTruncated: Schema.Boolean;
|
|
30
|
+
readonly controls: Schema.$Array<Schema.Struct<{
|
|
31
|
+
readonly kind: Schema.String;
|
|
32
|
+
readonly inputType: Schema.optionalKey<Schema.String>;
|
|
33
|
+
readonly label: Schema.optionalKey<Schema.String>;
|
|
34
|
+
readonly checked: Schema.optionalKey<Schema.Boolean>;
|
|
35
|
+
readonly selected: Schema.optionalKey<Schema.Boolean>;
|
|
36
|
+
readonly disabled: Schema.optionalKey<Schema.Boolean>;
|
|
37
|
+
readonly required: Schema.optionalKey<Schema.Boolean>;
|
|
38
|
+
readonly valid: Schema.optionalKey<Schema.Boolean>;
|
|
39
|
+
readonly formValid: Schema.optionalKey<Schema.Boolean>;
|
|
40
|
+
readonly nodeId: Schema.NonEmptyString;
|
|
41
|
+
readonly selector: Schema.String;
|
|
42
|
+
}>>;
|
|
43
|
+
}>>;
|
|
44
|
+
declare const BrowserRunViewport_base: Schema.Class<BrowserRunViewport, Schema.Struct<{
|
|
45
|
+
readonly width: Schema.Int;
|
|
46
|
+
readonly height: Schema.Int;
|
|
47
|
+
readonly deviceScaleFactor: Schema.optionalKey<Schema.Finite>;
|
|
48
|
+
}>, {}>;
|
|
49
|
+
/**
|
|
50
|
+
* Host presentation state in CSS pixels. Dimensions are integers in 1..2048,
|
|
51
|
+
* density is finite in 1..2 (default 1), and neither scaled dimension may exceed
|
|
52
|
+
* 2048 pixels. Mobile, touch, and orientation emulation are not supported.
|
|
53
|
+
*/
|
|
54
|
+
declare class BrowserRunViewport extends BrowserRunViewport_base {}
|
|
55
|
+
declare const BrowserRunLiveViewRequest_base: Schema.Class<BrowserRunLiveViewRequest, Schema.Struct<{
|
|
56
|
+
readonly mode: Schema.Literal<"tab">;
|
|
57
|
+
readonly expiresInMs: Schema.Int;
|
|
58
|
+
}>, {}>;
|
|
59
|
+
/** Host-only request for a redacted Cloudflare Live View URL. */
|
|
60
|
+
declare class BrowserRunLiveViewRequest extends BrowserRunLiveViewRequest_base {}
|
|
61
|
+
declare const BrowserRunLiveViewResult_base: Schema.Class<BrowserRunLiveViewResult, Schema.Struct<{
|
|
62
|
+
readonly devtoolsFrontendUrl: Schema.Redacted<Schema.String>;
|
|
63
|
+
}>, {}>;
|
|
64
|
+
declare class BrowserRunLiveViewResult extends BrowserRunLiveViewResult_base {}
|
|
65
|
+
declare const BrowserRunHandoffRequest_base: Schema.Class<BrowserRunHandoffRequest, Schema.Struct<{
|
|
66
|
+
readonly instructions: Schema.String;
|
|
67
|
+
readonly timeout: Schema.Int;
|
|
68
|
+
}>, {}>;
|
|
69
|
+
/** Start one bounded handoff; controller ownership remains a consumer concern. */
|
|
70
|
+
declare class BrowserRunHandoffRequest extends BrowserRunHandoffRequest_base {}
|
|
71
|
+
declare const BrowserRunHandoffResult_base: Schema.Class<BrowserRunHandoffResult, Schema.Struct<{
|
|
72
|
+
readonly handoffId: Schema.Redacted<Schema.String>;
|
|
73
|
+
}>, {}>;
|
|
74
|
+
declare class BrowserRunHandoffResult extends BrowserRunHandoffResult_base {}
|
|
75
|
+
declare const BrowserRunHandoffState_base: Schema.Class<BrowserRunHandoffState, Schema.Struct<{
|
|
76
|
+
readonly active: Schema.Boolean;
|
|
77
|
+
readonly handoffId: Schema.optionalKey<Schema.Redacted<Schema.String>>;
|
|
78
|
+
readonly durationMs: Schema.optionalKey<Schema.Natural>;
|
|
79
|
+
}>, {}>;
|
|
80
|
+
declare class BrowserRunHandoffState extends BrowserRunHandoffState_base {}
|
|
81
|
+
/** One intercepted Puppeteer request, narrowed to the policy-relevant surface. */
|
|
82
|
+
interface BrowserRunInteractiveRequest {
|
|
83
|
+
readonly url: () => string;
|
|
84
|
+
readonly abort: () => Promise<void>;
|
|
85
|
+
readonly continue: () => Promise<void>;
|
|
86
|
+
}
|
|
87
|
+
type BrowserRunInteractiveRequestListener = (request: BrowserRunInteractiveRequest) => void;
|
|
88
|
+
type BrowserRunCloudflareCommand = "Cloudflare.getLiveView" | "Cloudflare.handoff" | "Cloudflare.getHandoffState";
|
|
89
|
+
/** Narrow CDP boundary for Cloudflare commands absent from the pinned protocol types. */
|
|
90
|
+
interface BrowserRunInteractiveCdpSession {
|
|
91
|
+
readonly send: (command: BrowserRunCloudflareCommand, parameters: unknown) => Promise<unknown>;
|
|
92
|
+
readonly detach: () => Promise<void>;
|
|
93
|
+
}
|
|
94
|
+
/** Narrow page boundary used by deterministic tests; SDK values remain in this package. */
|
|
95
|
+
interface BrowserRunInteractivePage {
|
|
96
|
+
readonly identity?: () => Promise<BrowserRunPageIdentity>;
|
|
97
|
+
readonly close: () => Promise<void>;
|
|
98
|
+
readonly setBypassServiceWorker: (enabled: boolean) => Promise<void>;
|
|
99
|
+
readonly setRequestInterception: (enabled: boolean) => Promise<void>;
|
|
100
|
+
readonly onRequest: (listener: BrowserRunInteractiveRequestListener) => void;
|
|
101
|
+
readonly offRequest: (listener: BrowserRunInteractiveRequestListener) => void;
|
|
102
|
+
readonly goto: (url: string) => Promise<void>;
|
|
103
|
+
readonly url: () => unknown;
|
|
104
|
+
readonly readText: (selector: string | undefined, maximumBytes: number) => Promise<unknown>;
|
|
105
|
+
readonly fill: (selector: string, value: string, signal: AbortSignal, onDispatch: () => void, onComplete?: () => void, expectedTarget?: BrowserExpectedTarget) => Promise<unknown>;
|
|
106
|
+
readonly click: (selector: string, signal: AbortSignal, onDispatch: () => void, onComplete?: () => void, expectedTarget?: BrowserExpectedTarget) => Promise<unknown>;
|
|
107
|
+
readonly selectFile: (request: BrowserSelectFileRequest, signal: AbortSignal, onDispatch: () => void, onComplete?: () => void) => Promise<unknown>;
|
|
108
|
+
readonly screenshot: (fullPage: boolean) => Promise<unknown>;
|
|
109
|
+
readonly scroll: (deltaX: number, deltaY: number) => Promise<void>;
|
|
110
|
+
readonly setViewport: (viewport: BrowserRunViewport) => Promise<void>;
|
|
111
|
+
readonly createCdpSession: () => Promise<BrowserRunInteractiveCdpSession>;
|
|
112
|
+
}
|
|
113
|
+
interface BrowserRunInteractiveContext {
|
|
114
|
+
readonly newPage: () => Promise<BrowserRunInteractivePage>;
|
|
115
|
+
readonly close: () => Promise<void>;
|
|
116
|
+
}
|
|
117
|
+
interface BrowserRunInteractiveBrowser {
|
|
118
|
+
readonly detach?: () => Promise<void>;
|
|
119
|
+
readonly reattach?: (identity: BrowserRunPageIdentity) => Promise<{
|
|
120
|
+
readonly context: BrowserRunInteractiveContext;
|
|
121
|
+
readonly page: BrowserRunInteractivePage;
|
|
122
|
+
} | undefined>;
|
|
123
|
+
readonly createContext: () => Promise<BrowserRunInteractiveContext>;
|
|
124
|
+
readonly close: () => Promise<void>;
|
|
125
|
+
readonly sessionId: () => unknown;
|
|
126
|
+
readonly isConnected: () => boolean;
|
|
127
|
+
readonly onDisconnected: (listener: () => void) => void;
|
|
128
|
+
readonly offDisconnected: (listener: () => void) => void;
|
|
129
|
+
}
|
|
130
|
+
declare const BrowserRunInteractiveBinding_base: Context.ServiceClass<BrowserRunInteractiveBinding, "@effect-agent/platform-cloudflare/BrowserRunInteractiveBinding", {
|
|
131
|
+
readonly acquire: (keepAliveMillis: number) => Promise<unknown>;
|
|
132
|
+
readonly connect: (sessionId: string) => Promise<BrowserRunInteractiveBrowser>;
|
|
133
|
+
/** Success proves whole-browser termination or exact-session absence. */
|
|
134
|
+
readonly closeSession: (sessionId: Redacted.Redacted<string>) => Effect.Effect<void, InteractiveBrowserError>;
|
|
135
|
+
}>;
|
|
136
|
+
/** Host-supplied Browser Run allocation and connection transport. */
|
|
137
|
+
declare class BrowserRunInteractiveBinding extends BrowserRunInteractiveBinding_base {
|
|
138
|
+
static layer(options: {
|
|
139
|
+
readonly browser: BrowserRun;
|
|
140
|
+
readonly viewport?: BrowserRunViewport;
|
|
141
|
+
}): Layer.Layer<BrowserRunInteractiveBinding, InteractiveBrowserPolicyDeniedError, BrowserRunSessionLifecycle>;
|
|
142
|
+
}
|
|
143
|
+
declare const BrowserRunPageIdentity_base: Schema.Class<BrowserRunPageIdentity, Schema.Struct<{
|
|
144
|
+
readonly contextId: Schema.String;
|
|
145
|
+
readonly targetId: Schema.String;
|
|
146
|
+
}>, {}>;
|
|
147
|
+
/** Private target identity; never include this checkpoint in model-visible records. */
|
|
148
|
+
declare class BrowserRunPageIdentity extends BrowserRunPageIdentity_base {}
|
|
149
|
+
declare const BrowserRunInteractiveCheckpoint_base: Schema.Class<BrowserRunInteractiveCheckpoint, Schema.Struct<{
|
|
150
|
+
readonly sessionId: Schema.RedactedFromValue<Schema.String>;
|
|
151
|
+
readonly page: typeof BrowserRunPageIdentity;
|
|
152
|
+
readonly policy: typeof InteractiveBrowserPolicy;
|
|
153
|
+
readonly startedAt: Schema.Natural;
|
|
154
|
+
readonly consumedActions: Schema.Natural;
|
|
155
|
+
readonly inputState: Schema.Literals<readonly ["idle", "running", "unknown"]>;
|
|
156
|
+
}>, {}>;
|
|
157
|
+
/** Host-owned recovery data. Persist with the application's input receipts and ownership fence. */
|
|
158
|
+
declare class BrowserRunInteractiveCheckpoint extends BrowserRunInteractiveCheckpoint_base {}
|
|
159
|
+
type BrowserRunInputState = "idle" | "running" | "unknown";
|
|
160
|
+
interface BrowserRunInteractiveSession {
|
|
161
|
+
readonly handle: BrowserHandle;
|
|
162
|
+
readonly checkpoint: Effect.Effect<BrowserRunInteractiveCheckpoint, InteractiveBrowserError>;
|
|
163
|
+
/** Invalidate this owner and disconnect locally, retaining the exact remote page until its deadline.
|
|
164
|
+
* Checkpoint and durable input receipts must be persisted first. Never grants another owner authority.
|
|
165
|
+
*/
|
|
166
|
+
readonly detach: Effect.Effect<void, InteractiveBrowserError>;
|
|
167
|
+
readonly inputState: Effect.Effect<BrowserRunInputState>;
|
|
168
|
+
/** Wait at most 500 ms for local SDK input. A restart/transport-unknown fence cannot be drained. */
|
|
169
|
+
readonly drainInput: Effect.Effect<BrowserRunInputState>;
|
|
170
|
+
readonly sessionId: Redacted.Redacted<string>;
|
|
171
|
+
/**
|
|
172
|
+
* Resize without charging an agent action or changing emulation modes. Shares
|
|
173
|
+
* the handle's fail-fast lock, page-policy preflight, and elapsed deadline.
|
|
174
|
+
* An interrupted resize fences further input until the SDK settles; no resize is retried.
|
|
175
|
+
* The host must authorize callers. No viewer ownership or durable state is added.
|
|
176
|
+
*/
|
|
177
|
+
readonly resizeViewport: (viewport: BrowserRunViewport) => Effect.Effect<void, InteractiveBrowserError>;
|
|
178
|
+
readonly getLiveView: (request: BrowserRunLiveViewRequest) => Effect.Effect<BrowserRunLiveViewResult, InteractiveBrowserError>;
|
|
179
|
+
readonly handoff: (request: BrowserRunHandoffRequest) => Effect.Effect<BrowserRunHandoffResult, InteractiveBrowserError>;
|
|
180
|
+
readonly getHandoffState: Effect.Effect<BrowserRunHandoffState, InteractiveBrowserError>;
|
|
181
|
+
readonly close: Effect.Effect<void, InteractiveBrowserError>;
|
|
182
|
+
}
|
|
183
|
+
/** Persist the private cleanup identity before connecting or creating a page. */
|
|
184
|
+
interface BrowserRunInteractiveAcquisition {
|
|
185
|
+
readonly sessionId: Redacted.Redacted<string>;
|
|
186
|
+
/** Connect at most once, within the acquisition's original scope and elapsed deadline. */
|
|
187
|
+
readonly connect: Effect.Effect<BrowserRunInteractiveSession, InteractiveBrowserError>;
|
|
188
|
+
}
|
|
189
|
+
declare const BrowserRunInteractiveHost_base: Context.ServiceClass<BrowserRunInteractiveHost, "@effect-agent/platform-cloudflare/BrowserRunInteractiveHost", {
|
|
190
|
+
readonly cleanupSemantics?: "confirmed-terminal";
|
|
191
|
+
readonly acquire: (policy: InteractiveBrowserPolicy) => Effect.Effect<BrowserRunInteractiveAcquisition, InteractiveBrowserError, Scope.Scope>;
|
|
192
|
+
readonly open: (policy: InteractiveBrowserPolicy) => Effect.Effect<BrowserRunInteractiveSession, InteractiveBrowserError, Scope.Scope>;
|
|
193
|
+
/** Requires exclusive host ownership. Never allocates a replacement page or replays an action.
|
|
194
|
+
* pendingInput must include durable receipts written after the checkpoint. Unknown input keeps
|
|
195
|
+
* mutations and human control fenced; reads remain available. Only confirmed close ends that fence.
|
|
196
|
+
*/
|
|
197
|
+
readonly resume: (checkpoint: BrowserRunInteractiveCheckpoint, options: {
|
|
198
|
+
readonly pendingInput: boolean;
|
|
199
|
+
}) => Effect.Effect<BrowserRunInteractiveSession, InteractiveBrowserError, Scope.Scope>;
|
|
200
|
+
readonly closeSession: (sessionId: Redacted.Redacted<string>) => Effect.Effect<void, InteractiveBrowserError>;
|
|
201
|
+
}>;
|
|
202
|
+
/** Cloudflare host authority kept separate from the provider-neutral browser handle. */
|
|
203
|
+
declare class BrowserRunInteractiveHost extends BrowserRunInteractiveHost_base {}
|
|
204
|
+
/** Recognizes a local pre-dispatch refusal without exposing selector or page content. */
|
|
205
|
+
declare const isBrowserRunUndispatchedActionError: (error: unknown) => boolean;
|
|
206
|
+
/** Cloudflare host controls and private session identity for one scoped Browser Run pass. */
|
|
207
|
+
declare const browserRunInteractiveHostLayer: () => Layer.Layer<BrowserRunInteractiveHost, never, BrowserRunInteractiveBinding>;
|
|
208
|
+
/** Worker-only generic adapter; Cloudflare identity and controls remain host-only. */
|
|
209
|
+
declare const browserRunInteractiveLayer: () => Layer.Layer<InteractiveBrowser, never, BrowserRunInteractiveBinding>;
|
|
210
|
+
/** Resolved Worker binding, cleanup credentials, and optional initial viewport. */
|
|
211
|
+
interface CloudflareInteractiveBrowserOptions extends BrowserRunLifecycleOptions {
|
|
212
|
+
readonly browser: BrowserRun;
|
|
213
|
+
readonly viewport?: BrowserRunViewport;
|
|
214
|
+
}
|
|
215
|
+
/** Worker-only assembly; importing ordinary capture never loads Puppeteer. */
|
|
216
|
+
declare const CloudflareInteractiveBrowser: {
|
|
217
|
+
/**
|
|
218
|
+
* Assemble binding, confirmed-session cleanup, and the generic browser service.
|
|
219
|
+
* HttpClient and construction errors remain visible. Opening a pass still requires
|
|
220
|
+
* an explicit policy and Scope; no browser is launched during Layer construction.
|
|
221
|
+
*/
|
|
222
|
+
layer: (options: CloudflareInteractiveBrowserOptions) => Layer.Layer<InteractiveBrowser, BrowserRunCleanupError | InteractiveBrowserPolicyDeniedError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
223
|
+
/** Opt into private host controls instead of exposing them through the generic service. */
|
|
224
|
+
hostLayer: (options: CloudflareInteractiveBrowserOptions) => Layer.Layer<BrowserRunInteractiveHost, BrowserRunCleanupError | InteractiveBrowserPolicyDeniedError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
225
|
+
};
|
|
226
|
+
//#endregion
|
|
227
|
+
export { CloudflareInteractiveBrowserOptions as C, isBrowserRunUndispatchedActionError as D, browserRunInteractiveLayer as E, BrowserRunCleanupError as O, CloudflareInteractiveBrowser as S, browserRunInteractiveImplementation as T, BrowserRunLiveViewRequest as _, BrowserRunInputState as a, BrowserRunPageObservation as b, BrowserRunInteractiveBrowser as c, BrowserRunInteractiveContext as d, BrowserRunInteractiveHost as f, BrowserRunInteractiveSession as g, BrowserRunInteractiveRequestListener as h, BrowserRunHandoffState as i, BrowserRunSessionLifecycle as k, BrowserRunInteractiveCdpSession as l, BrowserRunInteractiveRequest as m, BrowserRunHandoffRequest as n, BrowserRunInteractiveAcquisition as o, BrowserRunInteractivePage as p, BrowserRunHandoffResult as r, BrowserRunInteractiveBinding as s, BrowserRunCloudflareCommand as t, BrowserRunInteractiveCheckpoint as u, BrowserRunLiveViewResult as v, browserRunInteractiveHostLayer as w, BrowserRunViewport as x, BrowserRunPageIdentity as y };
|
|
228
|
+
//# sourceMappingURL=InteractiveBrowser-BQo7QKaP.d.mts.map
|