@effect-agent/platform-cloudflare 0.1.0-beta.122 → 0.1.0-beta.123

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.
Files changed (34) hide show
  1. package/dist/BrowserCredentials.d.mts +91 -0
  2. package/dist/BrowserCredentials.mjs +120 -0
  3. package/dist/BrowserCredentials.mjs.map +1 -0
  4. package/dist/BrowserSession-DuOUcC6G.mjs +442 -0
  5. package/dist/BrowserSession-DuOUcC6G.mjs.map +1 -0
  6. package/dist/BrowserSession-DxCN-5F9.d.mts +109 -0
  7. package/dist/BrowserSession.d.mts +3 -0
  8. package/dist/BrowserSession.mjs +4 -0
  9. package/dist/CloudflareThreadClient.d.mts +50 -50
  10. package/dist/{InteractiveBrowser-Cm4xgiGy.d.mts → InteractiveBrowser-BnqY_Y-F.d.mts} +2 -2
  11. package/dist/{InteractiveBrowser-DXwmvWdA.mjs → InteractiveBrowser-DeOlcu-2.mjs} +4 -5
  12. package/dist/InteractiveBrowser-DeOlcu-2.mjs.map +1 -0
  13. package/dist/InteractiveBrowser.d.mts +1 -1
  14. package/dist/InteractiveBrowser.mjs +1 -1
  15. package/dist/{ThreadObject-mt0uxvZZ.d.mts → ThreadObject-BTo1jqab.d.mts} +33 -33
  16. package/dist/ThreadObject.d.mts +1 -1
  17. package/dist/index.d.mts +4 -2
  18. package/dist/index.mjs +3 -1
  19. package/package.json +1 -1
  20. package/src/BrowserCredentials.ts +146 -0
  21. package/src/BrowserSession.ts +589 -0
  22. package/src/index.ts +2 -0
  23. package/src/internal/browser-binding.ts +3 -3
  24. package/src/internal/browser-credentials.ts +362 -0
  25. package/dist/InteractiveBrowser-DXwmvWdA.mjs.map +0 -1
  26. package/dist/ProtectedBrowser.d.mts +0 -142
  27. package/dist/ProtectedBrowser.mjs +0 -1242
  28. package/dist/ProtectedBrowser.mjs.map +0 -1
  29. package/src/ProtectedBrowser.ts +0 -9
  30. package/src/protected-browser/binding.ts +0 -445
  31. package/src/protected-browser/host.ts +0 -398
  32. package/src/protected-browser/inspect-frame.ts +0 -140
  33. package/src/protected-browser/native.ts +0 -483
  34. package/src/protected-browser/policy.ts +0 -872
@@ -0,0 +1,109 @@
1
+ import { BrowserCredentialAccess, CredentialFillError, CredentialFillResult, FillCredentialRequest } from "./BrowserCredentials.mjs";
2
+ import { A as BrowserRunSessionLifecycle, O as BrowserRunCleanupError, _ as BrowserRunLiveViewRequest, i as BrowserRunHandoffState, k as BrowserRunLifecycleOptions, n as BrowserRunHandoffRequest, r as BrowserRunHandoffResult, v as BrowserRunLiveViewResult } from "./InteractiveBrowser-BnqY_Y-F.mjs";
3
+ import { Cause, Context, Effect, ErrorReporter, Layer, Redacted, Schema, Scope } from "effect";
4
+ import { Browser, Page } from "puppeteer-core/lib/esm/puppeteer/puppeteer-core-browser.js";
5
+ //#region src/internal/browser-failure.d.ts
6
+ declare const BrowserRunFailure_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Cause.YieldableError & {
7
+ readonly _tag: "BrowserRunFailure";
8
+ } & Readonly<A>;
9
+ /** Source-authored stages and classifications only; never retain SDK text or session capabilities. */
10
+ declare class BrowserRunFailure extends BrowserRunFailure_base<{
11
+ readonly operation: string;
12
+ readonly reason: "provider" | "timeout" | "malformed" | "configuration" | "authorization" | "rate-limited" | "pending";
13
+ readonly status?: number;
14
+ readonly cause?: BrowserRunFailure | {
15
+ readonly name: string;
16
+ };
17
+ }> {
18
+ readonly [ErrorReporter.severity]: "Error";
19
+ }
20
+ //#endregion
21
+ //#region src/internal/browser-binding.d.ts
22
+ /** Private attachment ownership is available before asynchronous SDK initialization completes. */
23
+ interface BrowserRunAttachment {
24
+ readonly browser: Promise<Browser>;
25
+ /** Fence SDK dispatch/callbacks and await local socket closure; never terminate the provider. */
26
+ readonly retire: Effect.Effect<void, BrowserRunFailure>;
27
+ }
28
+ declare const BrowserRunBinding_base: Context.ServiceClass<BrowserRunBinding, "@effect-agent/platform-cloudflare/internal/BrowserRunBinding", {
29
+ readonly acquire: (keepAliveMillis: number, operation: "interactive.acquire" | "session.acquire") => Promise<string>;
30
+ readonly connect: (sessionId: string, operation: string, signal?: AbortSignal) => BrowserRunAttachment;
31
+ readonly keepAlive: (sessionId: string) => Effect.Effect<void, BrowserRunFailure>;
32
+ }>;
33
+ /** Native transport port shared by both scoped adapters; the Layer owns the foreign binding. */
34
+ declare class BrowserRunBinding extends BrowserRunBinding_base {
35
+ static layer(browser: Pick<BrowserRun, "fetch">): Layer.Layer<BrowserRunBinding, never, never>;
36
+ }
37
+ declare namespace BrowserSession_d_exports {
38
+ export { BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, BrowserSession, BrowserSessionError, BrowserSessionOptions, BrowserSessionReference, BrowserSessions, BrowserSessionsOptions };
39
+ }
40
+ declare const BrowserSessionReference_base: Schema.Class<BrowserSessionReference, Schema.Struct<{
41
+ readonly version: Schema.Literal<1>;
42
+ readonly sessionId: Schema.Redacted<Schema.String>;
43
+ readonly contextId: Schema.Redacted<Schema.NonEmptyString>;
44
+ readonly targetId: Schema.Redacted<Schema.NonEmptyString>;
45
+ readonly expiresAt: Schema.Int;
46
+ readonly commandTimeoutMillis: Schema.Int;
47
+ }>, {}>;
48
+ /** Private host record, not a model capability. Persist together with the owner's controller state. */
49
+ declare class BrowserSessionReference extends BrowserSessionReference_base {}
50
+ declare const BrowserSessionOptions_base: Schema.Class<BrowserSessionOptions, Schema.Struct<{
51
+ readonly maxElapsedMillis: Schema.Int;
52
+ readonly keepAliveMillis: Schema.optionalKey<Schema.Int>;
53
+ readonly commandTimeoutMillis: Schema.optionalKey<Schema.Int>;
54
+ }>, {}>;
55
+ declare class BrowserSessionOptions extends BrowserSessionOptions_base {}
56
+ declare const BrowserSessionError_base: Schema.Class<BrowserSessionError, Schema.TaggedStruct<"BrowserSessionError", {
57
+ readonly reason: Schema.Literals<readonly ["invalid", "expired", "missing-page", "busy", "closed", "provider", "timeout", "cleanup"]>;
58
+ readonly dispatch: Schema.Literals<readonly ["not-dispatched", "possibly-dispatched"]>;
59
+ readonly cleanup: Schema.Literals<readonly ["not-requested", "confirmed", "unconfirmed"]>;
60
+ }>, Cause.YieldableError>;
61
+ /** No SDK text, selectors, page data, or credential values are retained in public failures. */
62
+ declare class BrowserSessionError extends BrowserSessionError_base {}
63
+ /**
64
+ * One local attachment to an application-owned browser. Scope release disconnects; it never
65
+ * transfers ownership or closes a healthy remote session. The owner serializes attachments,
66
+ * fences old attempts, authorizes human access, and calls BrowserSessions.close on expiry/stop.
67
+ * Native callbacks are trusted host code: never retain SDK handles or start unawaited work.
68
+ */
69
+ interface BrowserSession {
70
+ readonly reference: BrowserSessionReference;
71
+ /**
72
+ * Check current authority under the lock before native dispatch. A settled SDK rejection leaves
73
+ * the session available for inspection, but may have changed the website; never retry blindly.
74
+ * Timeout/interruption fences outstanding SDK work and terminates the exact browser.
75
+ */
76
+ readonly run: <A, E, R>(authorize: Effect.Effect<void, E, R>, action: (page: Page) => Promise<A>) => Effect.Effect<A, E | BrowserSessionError, R>;
77
+ /**
78
+ * Resolves host-owned material under fresh credential grants. Never submits or retries a write.
79
+ * Credential timeouts retain acknowledged writes and dispatch evidence alongside cleanup.
80
+ */
81
+ readonly fillCredential: (request: FillCredentialRequest) => Effect.Effect<CredentialFillResult, CredentialFillError | BrowserSessionError, BrowserCredentialAccess>;
82
+ readonly handoff: <E, R>(authorize: Effect.Effect<void, E, R>, request: BrowserRunHandoffRequest) => Effect.Effect<BrowserRunHandoffResult, E | BrowserSessionError, R>;
83
+ readonly getLiveView: <E, R>(authorize: Effect.Effect<void, E, R>, request: BrowserRunLiveViewRequest) => Effect.Effect<BrowserRunLiveViewResult, E | BrowserSessionError, R>;
84
+ readonly getHandoffState: <E, R>(authorize: Effect.Effect<void, E, R>) => Effect.Effect<BrowserRunHandoffState, E | BrowserSessionError, R>;
85
+ }
86
+ interface BrowserSessionsOptions extends BrowserRunLifecycleOptions {
87
+ readonly browser: Pick<BrowserRun, "fetch">;
88
+ }
89
+ declare const BrowserSessions_base: Context.ServiceClass<BrowserSessions, "@effect-agent/platform-cloudflare/BrowserSessions", {
90
+ /**
91
+ * Allocate once and commit its private reference in retain. Failed/uncommitted creation closes
92
+ * the allocation. After retain succeeds the application owns remote cleanup, independent of
93
+ * attempt Scopes. A lost allocation reply can remain indeterminate until provider idle expiry.
94
+ */
95
+ readonly create: <E, R>(options: BrowserSessionOptions, retain: (reference: BrowserSessionReference) => Effect.Effect<void, E, R>) => Effect.Effect<BrowserSessionReference, E | BrowserSessionError, R>;
96
+ /** Attach only the exact saved context/page. Never recreate missing/expired state. */
97
+ readonly attach: (reference: BrowserSessionReference) => Effect.Effect<BrowserSession, BrowserSessionError, Scope.Scope>;
98
+ /** Refresh provider inactivity only; the owner must still enforce its expiresAt. */
99
+ readonly keepAlive: (sessionId: Redacted.Redacted<string>) => Effect.Effect<void, BrowserSessionError>;
100
+ readonly close: (sessionId: Redacted.Redacted<string>) => Effect.Effect<void, BrowserSessionError>;
101
+ }>;
102
+ /** Native Cloudflare sessions; no framework browser workflow, checkpoint transfer, or observation policy. */
103
+ declare class BrowserSessions extends BrowserSessions_base {
104
+ static readonly layerNoDeps: Layer.Layer<BrowserSessions, never, BrowserRunBinding | BrowserRunSessionLifecycle>;
105
+ static layer(options: BrowserSessionsOptions): Layer.Layer<BrowserSessions, BrowserRunCleanupError, import("effect/unstable/http/HttpClient").HttpClient>;
106
+ }
107
+ //#endregion
108
+ export { BrowserSession_d_exports as a, BrowserSessionReference as i, BrowserSessionError as n, BrowserSessions as o, BrowserSessionOptions as r, BrowserSessionsOptions as s, BrowserSession as t };
109
+ //# sourceMappingURL=BrowserSession-DxCN-5F9.d.mts.map
@@ -0,0 +1,3 @@
1
+ import { _ as BrowserRunLiveViewRequest, i as BrowserRunHandoffState, n as BrowserRunHandoffRequest, r as BrowserRunHandoffResult, v as BrowserRunLiveViewResult } from "./InteractiveBrowser-BnqY_Y-F.mjs";
2
+ import { i as BrowserSessionReference, n as BrowserSessionError, o as BrowserSessions, r as BrowserSessionOptions, s as BrowserSessionsOptions, t as BrowserSession } from "./BrowserSession-DxCN-5F9.mjs";
3
+ export { BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, BrowserSession, BrowserSessionError, BrowserSessionOptions, BrowserSessionReference, BrowserSessions, BrowserSessionsOptions };
@@ -0,0 +1,4 @@
1
+ import "./BrowserCredentials.mjs";
2
+ import { c as BrowserRunLiveViewResult, n as BrowserRunHandoffResult, r as BrowserRunHandoffState, s as BrowserRunLiveViewRequest, t as BrowserRunHandoffRequest } from "./InteractiveBrowser-DeOlcu-2.mjs";
3
+ import { a as BrowserSessions, n as BrowserSessionOptions, r as BrowserSessionReference, t as BrowserSessionError } from "./BrowserSession-DuOUcC6G.mjs";
4
+ export { BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, BrowserSessionError, BrowserSessionOptions, BrowserSessionReference, BrowserSessions };
@@ -1545,50 +1545,8 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
1545
1545
  readonly message: string;
1546
1546
  readonly cause?: Schema.Json | undefined;
1547
1547
  } | {
1548
- readonly _tag: "HostProtocolError";
1549
- readonly message: string;
1550
- } | {
1551
- readonly _tag: "AgentInputError";
1552
- readonly message: string;
1553
- } | {
1554
- readonly _tag: "DigestError";
1555
- readonly message: string;
1556
- readonly cause?: Schema.Json | undefined;
1557
- } | {
1558
- readonly _tag: "AdmissionConflict";
1548
+ readonly _tag: "ThreadNotMaterialized";
1559
1549
  readonly threadId: string;
1560
- readonly principal: string;
1561
- readonly idempotencyKey: string;
1562
- readonly existingInputDigest: string;
1563
- readonly attemptedInputDigest: string;
1564
- } | {
1565
- readonly _tag: "AdmissionPolicyError";
1566
- readonly reason: "occupied" | "refused" | "unavailable";
1567
- readonly code: string;
1568
- readonly cause?: import("effect-agent/failure-diagnostic").Diagnostic | undefined;
1569
- readonly stack?: string | undefined;
1570
- } | {
1571
- readonly _tag: "SettlementConflict";
1572
- readonly submissionId: string;
1573
- readonly existingOutcome: "aborted" | "completed" | "failed";
1574
- } | {
1575
- readonly _tag: "ApprovalConflict";
1576
- readonly submissionId: string;
1577
- readonly toolCallId: string;
1578
- readonly existingDecision: "approved" | "denied";
1579
- } | {
1580
- readonly _tag: "UnknownResolutionConflict";
1581
- readonly submissionId: string;
1582
- readonly toolCallId: string;
1583
- } | {
1584
- readonly _tag: "JoinedToHost";
1585
- readonly submissionId: string;
1586
- readonly hostSubmissionId: string;
1587
- } | {
1588
- readonly _tag: "LedgerError";
1589
- readonly operation: string;
1590
- readonly message: string;
1591
- readonly cause?: import("effect-agent/failure-diagnostic").Diagnostic | undefined;
1592
1550
  } | {
1593
1551
  readonly _tag: "ThreadStoreError";
1594
1552
  readonly operation: string;
@@ -1602,8 +1560,10 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
1602
1560
  readonly sequence?: number | undefined;
1603
1561
  } | undefined;
1604
1562
  } | {
1605
- readonly _tag: "ThreadNotMaterialized";
1606
- readonly threadId: string;
1563
+ readonly _tag: "LedgerError";
1564
+ readonly operation: string;
1565
+ readonly message: string;
1566
+ readonly cause?: import("effect-agent/failure-diagnostic").Diagnostic | undefined;
1607
1567
  } | {
1608
1568
  readonly _tag: "AppendConflict";
1609
1569
  readonly threadId: string;
@@ -1616,20 +1576,60 @@ export declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorde
1616
1576
  readonly threadId: string;
1617
1577
  readonly actualEpoch: number;
1618
1578
  readonly attemptedEpoch: number;
1579
+ } | {
1580
+ readonly _tag: "OperationDenied";
1581
+ readonly operation: "abort" | "awaitSettlement" | "explain" | "observe" | "resolveApproval" | "resolveUnknown" | "retry" | "scanObligations" | "verify" | "wake";
1582
+ readonly reason: string;
1583
+ readonly threadId?: string | undefined;
1584
+ readonly submissionId?: string | undefined;
1585
+ } | {
1586
+ readonly _tag: "AdmissionConflict";
1587
+ readonly threadId: string;
1588
+ readonly principal: string;
1589
+ readonly idempotencyKey: string;
1590
+ readonly existingInputDigest: string;
1591
+ readonly attemptedInputDigest: string;
1592
+ } | {
1593
+ readonly _tag: "AdmissionPolicyError";
1594
+ readonly reason: "occupied" | "refused" | "unavailable";
1595
+ readonly code: string;
1596
+ readonly cause?: import("effect-agent/failure-diagnostic").Diagnostic | undefined;
1597
+ readonly stack?: string | undefined;
1598
+ } | {
1599
+ readonly _tag: "AgentInputError";
1600
+ readonly message: string;
1601
+ } | {
1602
+ readonly _tag: "DigestError";
1603
+ readonly message: string;
1604
+ readonly cause?: Schema.Json | undefined;
1619
1605
  } | {
1620
1606
  readonly _tag: "DurableRuntimeFailpointError";
1621
1607
  readonly location: "abort:after-intent" | "approval:after-request-append" | "approval:after-suspend" | "checkpoint:after-save" | "checkpoint:before-save" | "claim:after-claim" | "compaction:after-canonical-append" | "compaction:before-canonical-append" | "input:after-canonical-append" | "join:after-canonical-append" | "join:after-claim" | "policy:after-reservation-append" | "policy:before-reservation-append" | "resolve:after-intent" | "run:after-duration-append" | "run:after-start-append" | "run:before-duration-append" | "run:before-start-append" | "step:after-step-append" | "subagent:after-admit" | "subagent:after-child-abort-intent" | "subagent:after-child-ready" | "subagent:after-join-append" | "subagent:after-release" | "subagent:after-release-pending" | "subagent:after-request-append" | "subagent:after-reserve" | "subagent:after-sibling-settle" | "subagent:after-start-append" | "subagent:after-suspend" | "subagent:before-join-append" | "submit:after-admit" | "submit:after-materialize" | "terminalize:after-canonical-append" | "terminalize:after-reserve" | "tools:after-prepared-append" | "tools:after-unavailable-append" | "tools:before-prepared-append" | "tools:before-unavailable-append" | "turn:after-canonical-append" | "turn:after-response-append" | "turn:after-results-append" | "update:after-canonical-append" | "update:after-delivery-insert" | "update:before-canonical-append" | "update:before-delivery-insert" | "worker:after-completion-append" | "worker:after-origin-append" | "worker:after-report-append" | "worker:after-report-delivery" | "worker:after-source-append" | "worker:after-stop-append" | "worker:after-stop-seal" | "worker:after-subtree-append" | "worker:before-completion-append" | "worker:before-origin-append" | "worker:before-report-append" | "worker:before-report-delivery" | "worker:before-source-append" | "worker:before-stop-append" | "worker:before-stop-seal" | "worker:before-subtree-append";
1608
+ } | {
1609
+ readonly _tag: "SettlementConflict";
1610
+ readonly submissionId: string;
1611
+ readonly existingOutcome: "aborted" | "completed" | "failed";
1612
+ } | {
1613
+ readonly _tag: "JoinedToHost";
1614
+ readonly submissionId: string;
1615
+ readonly hostSubmissionId: string;
1622
1616
  } | {
1623
1617
  readonly _tag: "AdmissionLimitExceeded";
1624
1618
  readonly limit: "database-bytes" | "input-bytes" | "queue-depth";
1625
1619
  readonly actual: number;
1626
1620
  readonly maximum: number;
1627
1621
  } | {
1628
- readonly _tag: "OperationDenied";
1629
- readonly operation: "abort" | "awaitSettlement" | "explain" | "observe" | "resolveApproval" | "resolveUnknown" | "retry" | "scanObligations" | "verify" | "wake";
1630
- readonly reason: string;
1631
- readonly threadId?: string | undefined;
1632
- readonly submissionId?: string | undefined;
1622
+ readonly _tag: "HostProtocolError";
1623
+ readonly message: string;
1624
+ } | {
1625
+ readonly _tag: "ApprovalConflict";
1626
+ readonly submissionId: string;
1627
+ readonly toolCallId: string;
1628
+ readonly existingDecision: "approved" | "denied";
1629
+ } | {
1630
+ readonly _tag: "UnknownResolutionConflict";
1631
+ readonly submissionId: string;
1632
+ readonly toolCallId: string;
1633
1633
  };
1634
1634
  }, Schema.SchemaError, never>;
1635
1635
  export declare const decodeHostResponse: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AbortRecorded | ApprovalRecorded | HostFailed | ObservedPage | ProgressCancelled | ProgressObserved | SettlementReached | SubmissionStatusResponse | SubmitSucceeded | UnknownResolutionRecorded, Schema.SchemaError, never>;
@@ -224,5 +224,5 @@ declare const CloudflareInteractiveBrowser: {
224
224
  hostLayer: (options: CloudflareInteractiveBrowserOptions) => Layer.Layer<BrowserRunInteractiveHost, BrowserRunCleanupError | InteractiveBrowserPolicyDeniedError, import("effect/unstable/http/HttpClient").HttpClient>;
225
225
  };
226
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-Cm4xgiGy.d.mts.map
227
+ export { BrowserRunSessionLifecycle as A, 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, BrowserRunLifecycleOptions 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-BnqY_Y-F.d.mts.map
@@ -11,7 +11,6 @@ var BrowserRunFailure = class extends Data.TaggedError("BrowserRunFailure") {
11
11
  };
12
12
  /** A public projection of an already reported private failure must not produce another issue. */
13
13
  const reportedBrowserError = (error) => Object.assign(error, { [ErrorReporter.ignore]: true });
14
- const inheritBrowserReport = (original, error) => ErrorReporter.isIgnored(original) ? reportedBrowserError(error) : error;
15
14
  const reasonSchema = Schema.Literals([
16
15
  "provider",
17
16
  "timeout",
@@ -105,7 +104,7 @@ var BrowserRunBinding = class extends Context.Service()("@effect-agent/platform-
105
104
  let retired = false;
106
105
  let closedByAbort = false;
107
106
  let retirementFailure;
108
- const disconnectOperation = operation === "protected.connect" ? "protected.disconnect" : "interactive.disconnect";
107
+ const disconnectOperation = operation === "session.connect" ? "session.disconnect" : "interactive.disconnect";
109
108
  const transport = {
110
109
  send: (message) => {
111
110
  if (retired || socket === void 0) throw new BrowserRunFailure({
@@ -199,7 +198,7 @@ var BrowserRunBinding = class extends Context.Service()("@effect-agent/platform-
199
198
  };
200
199
  },
201
200
  keepAlive: Effect.fnUntraced(function* (sessionId) {
202
- const operation = "protected.keepAlive";
201
+ const operation = "session.keepAlive";
203
202
  const runReport = Effect.runPromiseWith(yield* Effect.context());
204
203
  const release = (socket) => Effect.sync(() => socket.close()).pipe(Effect.catchCause((cause) => reportBrowserCause(operation, cause)));
205
204
  const socket = yield* Effect.acquireRelease(Effect.tryPromise({
@@ -1916,6 +1915,6 @@ const CloudflareInteractiveBrowser = {
1916
1915
  hostLayer: (options) => browserRunInteractiveHostLayer().pipe(Layer.provide(interactiveBindingLayer(options)))
1917
1916
  };
1918
1917
  //#endregion
1919
- export { reportBrowserCause as C, inheritBrowserReport as S, BrowserRunCleanupError as _, BrowserRunInteractiveCheckpoint as a, BrowserRunFailure as b, BrowserRunLiveViewResult as c, BrowserRunViewport as d, CloudflareInteractiveBrowser as f, isBrowserRunUndispatchedActionError as g, browserRunInteractiveLayer as h, BrowserRunInteractiveBinding as i, BrowserRunPageIdentity as l, browserRunInteractiveImplementation as m, BrowserRunHandoffResult as n, BrowserRunInteractiveHost as o, browserRunInteractiveHostLayer as p, BrowserRunHandoffState as r, BrowserRunLiveViewRequest as s, BrowserRunHandoffRequest as t, BrowserRunPageObservation as u, BrowserRunSessionLifecycle as v, reportedBrowserError as w, browserFailure as x, BrowserRunBinding as y };
1918
+ export { BrowserRunCleanupError as _, BrowserRunInteractiveCheckpoint as a, reportBrowserCause as b, BrowserRunLiveViewResult as c, BrowserRunViewport as d, CloudflareInteractiveBrowser as f, isBrowserRunUndispatchedActionError as g, browserRunInteractiveLayer as h, BrowserRunInteractiveBinding as i, BrowserRunPageIdentity as l, browserRunInteractiveImplementation as m, BrowserRunHandoffResult as n, BrowserRunInteractiveHost as o, browserRunInteractiveHostLayer as p, BrowserRunHandoffState as r, BrowserRunLiveViewRequest as s, BrowserRunHandoffRequest as t, BrowserRunPageObservation as u, BrowserRunSessionLifecycle as v, reportedBrowserError as x, BrowserRunBinding as y };
1920
1919
 
1921
- //# sourceMappingURL=InteractiveBrowser-DXwmvWdA.mjs.map
1920
+ //# sourceMappingURL=InteractiveBrowser-DeOlcu-2.mjs.map