@effect-agent/platform-cloudflare 0.1.0-beta.31 → 0.1.0-beta.33

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.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { BrowserQuickActionBrowserBinding, BrowserQuickActionCaptureOptions, BrowserQuickActionClient, BrowserQuickActionRpcError, BrowserQuickActionWorkersAi, BrowserQuickActionWorkersAiPolicy, BrowserQuickActionWorkersAiPolicyError, browserQuickActionCaptureLayer, browserQuickActionImplementation, browserQuickActionScreenshotLayer, browserQuickActionWorkersAiCaptureLayer } from "./browser-quick-action.mjs";
2
2
  import { BrowserRestCaptureOptions, browserRestCaptureImplementation, browserRestCaptureLayer, browserRestWorkersAiCaptureLayer } from "./browser-rest-capture.mjs";
3
3
  import { BrowserRestCrawlOptions, browserRestCrawlImplementation, browserRestCrawlLayer } from "./browser-rest-crawl.mjs";
4
- import { BrowserRunInteractiveBinding, BrowserRunInteractiveBrowser, BrowserRunInteractiveContext, BrowserRunInteractivePage, BrowserRunInteractiveRequest, BrowserRunInteractiveRequestListener, browserRunInteractiveImplementation, browserRunInteractiveLayer } from "./interactive-browser.mjs";
4
+ import { BrowserRunCloudflareCommand, BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunInteractiveBinding, BrowserRunInteractiveBrowser, BrowserRunInteractiveCdpSession, BrowserRunInteractiveContext, BrowserRunInteractiveHost, BrowserRunInteractivePage, BrowserRunInteractiveRequest, BrowserRunInteractiveRequestListener, BrowserRunInteractiveSession, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, browserRunInteractiveHostLayer, browserRunInteractiveImplementation, browserRunInteractiveLayer } from "./interactive-browser.mjs";
5
5
  import { Context, Crypto, Effect, Layer, Option, Schema, Scope } from "effect";
6
6
  import { AbortCommand, AbortIntent, AdmissionConflict, AgentBindingResolver, AppendConflict, ApprovalConflict, ApprovalDecisionCommand, ApprovalDecisionIntent, CanonicalRecordEnvelope, CanonicalSequence, ConversationNotMaterialized, ConversationStore, ConversationStoreError, DefinitionDigests, DigestError, DurableAgentRuntime, DurableBindingFailure, DurableRuntimeConfig, DurableRuntimeFailpointError, DurableRuntimeFailpointHandler, DurableSubmitAgent, DurableSubmitOptions, DurableWorkerFailure, FenceRejected, IntegrityReport, JoinedToHost, LedgerError, ObligationReport, ObligationThresholds, OperationAuthorizerService, OperationDenied, OwnershipLost, ProducerId, Receipt, RecoveryExplanation, RecoveryReport, ResolvedBinding, RetryCommand, RetryRefused, RunJournalError, Settlement, SettlementConflict, SubmissionLedger, ToolReconciler, UnknownResolutionCommand, UnknownResolutionConflict, UnknownResolutionIntent, WakeScheduler } from "@effect-agent/session";
7
7
  import { ConversationPortTransport, DoStorageFailpointHandler, DoStorageInitializationError, PortRequest, PortResponse } from "@effect-agent/storage-cloudflare";
@@ -1603,32 +1603,14 @@ declare const encodeAdminResponse: (input: AdminFailed | ExplainedRecovery | Obl
1603
1603
  readonly conversationId?: string | undefined;
1604
1604
  readonly submissionId?: string | undefined;
1605
1605
  } | {
1606
- readonly _tag: "RetryRefused";
1607
- readonly submissionId: string;
1608
- readonly refusal: "await-approval-decision" | "await-unknown-resolution" | "settled";
1609
- readonly decisionTag: string;
1606
+ readonly _tag: "DigestError";
1610
1607
  readonly message: string;
1608
+ readonly cause?: Schema.Json | undefined;
1611
1609
  } | {
1612
1610
  readonly _tag: "LedgerError";
1613
1611
  readonly operation: string;
1614
1612
  readonly message: string;
1615
1613
  readonly cause?: Schema.Json | undefined;
1616
- } | {
1617
- readonly _tag: "RunJournalError";
1618
- readonly message: string;
1619
- readonly cause?: Schema.Json | undefined;
1620
- } | {
1621
- readonly _tag: "DigestError";
1622
- readonly message: string;
1623
- readonly cause?: Schema.Json | undefined;
1624
- } | {
1625
- readonly _tag: "OwnershipLost";
1626
- readonly submissionId: string;
1627
- readonly actualEpoch: number;
1628
- } | {
1629
- readonly _tag: "SettlementConflict";
1630
- readonly submissionId: string;
1631
- readonly existingOutcome: "aborted" | "completed" | "failed";
1632
1614
  } | {
1633
1615
  readonly _tag: "ConversationStoreError";
1634
1616
  readonly operation: string;
@@ -1660,6 +1642,24 @@ declare const encodeAdminResponse: (input: AdminFailed | ExplainedRecovery | Obl
1660
1642
  } | {
1661
1643
  readonly _tag: "HostProtocolError";
1662
1644
  readonly message: string;
1645
+ } | {
1646
+ readonly _tag: "SettlementConflict";
1647
+ readonly submissionId: string;
1648
+ readonly existingOutcome: "aborted" | "completed" | "failed";
1649
+ } | {
1650
+ readonly _tag: "RetryRefused";
1651
+ readonly submissionId: string;
1652
+ readonly refusal: "await-approval-decision" | "await-unknown-resolution" | "settled";
1653
+ readonly decisionTag: string;
1654
+ readonly message: string;
1655
+ } | {
1656
+ readonly _tag: "RunJournalError";
1657
+ readonly message: string;
1658
+ readonly cause?: Schema.Json | undefined;
1659
+ } | {
1660
+ readonly _tag: "OwnershipLost";
1661
+ readonly submissionId: string;
1662
+ readonly actualEpoch: number;
1663
1663
  };
1664
1664
  }, Schema.SchemaError, never>;
1665
1665
  declare const decodeAdminResponse: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AdminFailed | ExplainedRecovery | ObligationsScanned | RetryExecuted | VerifiedIntegrity, Schema.SchemaError, never>;
@@ -1718,5 +1718,5 @@ interface DynamicWorkerCodeExecutorOptions {
1718
1718
  /** Layer building the Dynamic Worker `CodeExecutor` from resolved bindings. */
1719
1719
  declare const dynamicWorkerCodeExecutorLayer: (options: DynamicWorkerCodeExecutorOptions) => Layer.Layer<CodeExecutor>;
1720
1720
  //#endregion
1721
- export { AbortRecorded, AdminExplainRequest, AdminFailed, AdminFailure, AdminResponse, AdminVerifyRequest, AdmissionLimitExceeded, ApprovalRecorded, AwaitProgressRequest, BrowserQuickActionBrowserBinding, BrowserQuickActionCaptureOptions, BrowserQuickActionClient, BrowserQuickActionRpcError, BrowserQuickActionWorkersAi, BrowserQuickActionWorkersAiPolicy, BrowserQuickActionWorkersAiPolicyError, BrowserRestCaptureOptions, BrowserRestCrawlOptions, BrowserRunInteractiveBinding, BrowserRunInteractiveBrowser, BrowserRunInteractiveContext, BrowserRunInteractivePage, BrowserRunInteractiveRequest, BrowserRunInteractiveRequestListener, CLOUDFLARE_DATABASE_CAP_BYTES, CLOUDFLARE_RUNTIME_DEFAULTS, CancelProgressRequest, ClientAbortFailure, ClientApprovalFailure, ClientAwaitFailure, ClientObserveFailure, ClientProgressFailure, ClientSubmitFailure, ClientUnknownFailure, CloudflareAdmissionLimitsValue, CloudflareBindingError, CloudflareBindingSource, CloudflareBindingSourceContext, CloudflareConversationClient, CloudflareDurableRuntime, CloudflareDurableRuntimeConfig, CloudflareDurableRuntimeConfigValue, CloudflareDurableRuntimeInitializationError, CloudflareDurableRuntimeOptions, CloudflareDurableRuntimeServices, CloudflarePlatformConfigError, CloudflareRunContextLayer, CloudflareRunContextSource, CloudflareRuntimeSourceContext, ConversationClientError, ConversationMaintenance, ConversationMaintenanceFailpoint, ConversationMaintenanceFailpointHandler, ConversationMaintenanceFailpointLocation, ConversationObjectClass, ConversationObjectIdentity, ConversationObjectInstance, ConversationObjectNamespace, ConversationObjectOptions, ConversationObjectPorts, ConversationObjectRpc, DEFAULT_MAX_DATABASE_BYTES, DurableAlarmError, DurableAlarmService, DurableObjectContext, DynamicWorkerCodeExecutorOptions, ExplainedRecovery, HostFailed, HostFailure, HostProtocolError, HostResponse, MaintenancePassFailure, MaintenancePassReport, ObligationsScanned, ObservePageRequest, ObservedPage, ProgressCancelled, ProgressObserved, ProgressWaitRegistry, RetryExecuted, SettlementReached, SubmitRequest, SubmitSucceeded, UnknownResolutionRecorded, VerifiedIntegrity, boundHostDiagnostic, browserQuickActionCaptureLayer, browserQuickActionImplementation, browserQuickActionScreenshotLayer, browserQuickActionWorkersAiCaptureLayer, browserRestCaptureImplementation, browserRestCaptureLayer, browserRestCrawlImplementation, browserRestCrawlLayer, browserRestWorkersAiCaptureLayer, browserRunInteractiveImplementation, browserRunInteractiveLayer, cloudflareWakeSchedulerLayer, conversationNamespaceFromEnv, conversationNamespaceLayer, conversationPortTransportLayer, decodeAbortCommand, decodeAdminExplainRequest, decodeAdminResponse, decodeAdminVerifyRequest, decodeApprovalDecisionCommand, decodeAwaitProgressRequest, decodeCancelProgressRequest, decodeHostResponse, decodeObligationThresholds, decodeObservePageRequest, decodeReceipt, decodeRetryCommand, decodeSubmitRequest, decodeUnknownResolutionCommand, disposeRpcHandle, dynamicWorkerCodeExecutorLayer, dynamicWorkerImplementation, encodeAbortCommand, encodeAdminResponse, encodeApprovalDecisionCommand, encodeAwaitProgressRequest, encodeCancelProgressRequest, encodeHostResponse, encodeObservePageRequest, encodeReceipt, encodeSubmitRequest, encodeUnknownResolutionCommand, makeConversationObjectClass };
1721
+ export { AbortRecorded, AdminExplainRequest, AdminFailed, AdminFailure, AdminResponse, AdminVerifyRequest, AdmissionLimitExceeded, ApprovalRecorded, AwaitProgressRequest, BrowserQuickActionBrowserBinding, BrowserQuickActionCaptureOptions, BrowserQuickActionClient, BrowserQuickActionRpcError, BrowserQuickActionWorkersAi, BrowserQuickActionWorkersAiPolicy, BrowserQuickActionWorkersAiPolicyError, BrowserRestCaptureOptions, BrowserRestCrawlOptions, BrowserRunCloudflareCommand, BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunInteractiveBinding, BrowserRunInteractiveBrowser, BrowserRunInteractiveCdpSession, BrowserRunInteractiveContext, BrowserRunInteractiveHost, BrowserRunInteractivePage, BrowserRunInteractiveRequest, BrowserRunInteractiveRequestListener, BrowserRunInteractiveSession, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, CLOUDFLARE_DATABASE_CAP_BYTES, CLOUDFLARE_RUNTIME_DEFAULTS, CancelProgressRequest, ClientAbortFailure, ClientApprovalFailure, ClientAwaitFailure, ClientObserveFailure, ClientProgressFailure, ClientSubmitFailure, ClientUnknownFailure, CloudflareAdmissionLimitsValue, CloudflareBindingError, CloudflareBindingSource, CloudflareBindingSourceContext, CloudflareConversationClient, CloudflareDurableRuntime, CloudflareDurableRuntimeConfig, CloudflareDurableRuntimeConfigValue, CloudflareDurableRuntimeInitializationError, CloudflareDurableRuntimeOptions, CloudflareDurableRuntimeServices, CloudflarePlatformConfigError, CloudflareRunContextLayer, CloudflareRunContextSource, CloudflareRuntimeSourceContext, ConversationClientError, ConversationMaintenance, ConversationMaintenanceFailpoint, ConversationMaintenanceFailpointHandler, ConversationMaintenanceFailpointLocation, ConversationObjectClass, ConversationObjectIdentity, ConversationObjectInstance, ConversationObjectNamespace, ConversationObjectOptions, ConversationObjectPorts, ConversationObjectRpc, DEFAULT_MAX_DATABASE_BYTES, DurableAlarmError, DurableAlarmService, DurableObjectContext, DynamicWorkerCodeExecutorOptions, ExplainedRecovery, HostFailed, HostFailure, HostProtocolError, HostResponse, MaintenancePassFailure, MaintenancePassReport, ObligationsScanned, ObservePageRequest, ObservedPage, ProgressCancelled, ProgressObserved, ProgressWaitRegistry, RetryExecuted, SettlementReached, SubmitRequest, SubmitSucceeded, UnknownResolutionRecorded, VerifiedIntegrity, boundHostDiagnostic, browserQuickActionCaptureLayer, browserQuickActionImplementation, browserQuickActionScreenshotLayer, browserQuickActionWorkersAiCaptureLayer, browserRestCaptureImplementation, browserRestCaptureLayer, browserRestCrawlImplementation, browserRestCrawlLayer, browserRestWorkersAiCaptureLayer, browserRunInteractiveHostLayer, browserRunInteractiveImplementation, browserRunInteractiveLayer, cloudflareWakeSchedulerLayer, conversationNamespaceFromEnv, conversationNamespaceLayer, conversationPortTransportLayer, decodeAbortCommand, decodeAdminExplainRequest, decodeAdminResponse, decodeAdminVerifyRequest, decodeApprovalDecisionCommand, decodeAwaitProgressRequest, decodeCancelProgressRequest, decodeHostResponse, decodeObligationThresholds, decodeObservePageRequest, decodeReceipt, decodeRetryCommand, decodeSubmitRequest, decodeUnknownResolutionCommand, disposeRpcHandle, dynamicWorkerCodeExecutorLayer, dynamicWorkerImplementation, encodeAbortCommand, encodeAdminResponse, encodeApprovalDecisionCommand, encodeAwaitProgressRequest, encodeCancelProgressRequest, encodeHostResponse, encodeObservePageRequest, encodeReceipt, encodeSubmitRequest, encodeUnknownResolutionCommand, makeConversationObjectClass };
1722
1722
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { BrowserQuickActionBrowserBinding, BrowserQuickActionRpcError, BrowserQuickActionWorkersAi, BrowserQuickActionWorkersAiPolicyError, browserQuickActionCaptureLayer, browserQuickActionImplementation, browserQuickActionScreenshotLayer, browserQuickActionWorkersAiCaptureLayer } from "./browser-quick-action.mjs";
2
2
  import { browserRestCaptureImplementation, browserRestCaptureLayer, browserRestWorkersAiCaptureLayer } from "./browser-rest-capture.mjs";
3
- import { BrowserRunInteractiveBinding, browserRunInteractiveImplementation, browserRunInteractiveLayer } from "./interactive-browser.mjs";
3
+ import { BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunInteractiveBinding, BrowserRunInteractiveHost, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, browserRunInteractiveHostLayer, browserRunInteractiveImplementation, browserRunInteractiveLayer } from "./interactive-browser.mjs";
4
4
  import { browserRestCrawlImplementation, browserRestCrawlLayer } from "./browser-rest-crawl.mjs";
5
5
  import { Clock, Context, Crypto, Deferred, Duration, Effect, Exit, Fiber, Layer, Option, Predicate, PubSub, Queue, Random, Ref, Schema, Semaphore, Stream } from "effect";
6
6
  import { AbortCommand, AbortIntent, AdmissionConflict, AgentBindingResolver, AppendConflict, ApprovalConflict, ApprovalDecisionCommand, ApprovalDecisionIntent, CanonicalRecordEnvelope, CanonicalSequence, ConversationNotMaterialized, ConversationRead, ConversationStore, ConversationStoreError, DEFAULT_OWNERSHIP_LEASE_DURATION, DefinitionDigests, DeploymentId, DigestError, DurableAgentRuntime, DurableRuntimeConfig, DurableRuntimeFailpoint, DurableRuntimeFailpointError, FenceRejected, IdempotencyKey, IntegrityReport, JoinedToHost, LedgerError, ObligationReport, ObligationThresholds, OperationAuthorizationRequest, OperationAuthorizer, OperationDenied, OwnershipLost, PersistedJson, Principal, ProducerId, Receipt, RecoveryExplanation, RecoveryReport, RetryCommand, RetryRefused, RunJournalError, Settlement, SettlementConflict, SubmissionLedger, SubmissionLookupByKey, ToolReconciler, UnknownResolutionCommand, UnknownResolutionConflict, UnknownResolutionIntent, WakeScheduler, makeWakeSubscriptionHub, operationAuthorizerLayer } from "@effect-agent/session";
@@ -1981,6 +1981,6 @@ const dynamicWorkerCodeExecutorLayer = (options) => Layer.effect(CodeExecutor, E
1981
1981
  return CodeExecutor.of({ execute: makeExecute(options, clock) });
1982
1982
  }));
1983
1983
  //#endregion
1984
- export { AbortRecorded, AdminExplainRequest, AdminFailed, AdminFailure, AdminResponse, AdminVerifyRequest, AdmissionLimitExceeded, ApprovalRecorded, AwaitProgressRequest, BrowserQuickActionBrowserBinding, BrowserQuickActionRpcError, BrowserQuickActionWorkersAi, BrowserQuickActionWorkersAiPolicyError, BrowserRunInteractiveBinding, CLOUDFLARE_DATABASE_CAP_BYTES, CLOUDFLARE_RUNTIME_DEFAULTS, CancelProgressRequest, CloudflareAdmissionLimitsValue, CloudflareBindingError, CloudflareConversationClient, CloudflareDurableRuntime, CloudflareDurableRuntimeConfig, CloudflareDurableRuntimeConfigValue, CloudflarePlatformConfigError, ConversationClientError, ConversationMaintenance, ConversationMaintenanceFailpoint, ConversationObjectIdentity, ConversationObjectNamespace, ConversationObjectPorts, DEFAULT_MAX_DATABASE_BYTES, DurableAlarmError, DurableAlarmService, DurableObjectContext, ExplainedRecovery, HostFailed, HostFailure, HostProtocolError, HostResponse, MaintenancePassReport, ObligationsScanned, ObservePageRequest, ObservedPage, ProgressCancelled, ProgressObserved, ProgressWaitRegistry, RetryExecuted, SettlementReached, SubmitRequest, SubmitSucceeded, UnknownResolutionRecorded, VerifiedIntegrity, boundHostDiagnostic, browserQuickActionCaptureLayer, browserQuickActionImplementation, browserQuickActionScreenshotLayer, browserQuickActionWorkersAiCaptureLayer, browserRestCaptureImplementation, browserRestCaptureLayer, browserRestCrawlImplementation, browserRestCrawlLayer, browserRestWorkersAiCaptureLayer, browserRunInteractiveImplementation, browserRunInteractiveLayer, cloudflareWakeSchedulerLayer, conversationNamespaceFromEnv, conversationNamespaceLayer, conversationPortTransportLayer, decodeAbortCommand, decodeAdminExplainRequest, decodeAdminResponse, decodeAdminVerifyRequest, decodeApprovalDecisionCommand, decodeAwaitProgressRequest, decodeCancelProgressRequest, decodeHostResponse, decodeObligationThresholds, decodeObservePageRequest, decodeReceipt, decodeRetryCommand, decodeSubmitRequest, decodeUnknownResolutionCommand, disposeRpcHandle, dynamicWorkerCodeExecutorLayer, dynamicWorkerImplementation, encodeAbortCommand, encodeAdminResponse, encodeApprovalDecisionCommand, encodeAwaitProgressRequest, encodeCancelProgressRequest, encodeHostResponse, encodeObservePageRequest, encodeReceipt, encodeSubmitRequest, encodeUnknownResolutionCommand, makeConversationObjectClass };
1984
+ export { AbortRecorded, AdminExplainRequest, AdminFailed, AdminFailure, AdminResponse, AdminVerifyRequest, AdmissionLimitExceeded, ApprovalRecorded, AwaitProgressRequest, BrowserQuickActionBrowserBinding, BrowserQuickActionRpcError, BrowserQuickActionWorkersAi, BrowserQuickActionWorkersAiPolicyError, BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunInteractiveBinding, BrowserRunInteractiveHost, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, CLOUDFLARE_DATABASE_CAP_BYTES, CLOUDFLARE_RUNTIME_DEFAULTS, CancelProgressRequest, CloudflareAdmissionLimitsValue, CloudflareBindingError, CloudflareConversationClient, CloudflareDurableRuntime, CloudflareDurableRuntimeConfig, CloudflareDurableRuntimeConfigValue, CloudflarePlatformConfigError, ConversationClientError, ConversationMaintenance, ConversationMaintenanceFailpoint, ConversationObjectIdentity, ConversationObjectNamespace, ConversationObjectPorts, DEFAULT_MAX_DATABASE_BYTES, DurableAlarmError, DurableAlarmService, DurableObjectContext, ExplainedRecovery, HostFailed, HostFailure, HostProtocolError, HostResponse, MaintenancePassReport, ObligationsScanned, ObservePageRequest, ObservedPage, ProgressCancelled, ProgressObserved, ProgressWaitRegistry, RetryExecuted, SettlementReached, SubmitRequest, SubmitSucceeded, UnknownResolutionRecorded, VerifiedIntegrity, boundHostDiagnostic, browserQuickActionCaptureLayer, browserQuickActionImplementation, browserQuickActionScreenshotLayer, browserQuickActionWorkersAiCaptureLayer, browserRestCaptureImplementation, browserRestCaptureLayer, browserRestCrawlImplementation, browserRestCrawlLayer, browserRestWorkersAiCaptureLayer, browserRunInteractiveHostLayer, browserRunInteractiveImplementation, browserRunInteractiveLayer, cloudflareWakeSchedulerLayer, conversationNamespaceFromEnv, conversationNamespaceLayer, conversationPortTransportLayer, decodeAbortCommand, decodeAdminExplainRequest, decodeAdminResponse, decodeAdminVerifyRequest, decodeApprovalDecisionCommand, decodeAwaitProgressRequest, decodeCancelProgressRequest, decodeHostResponse, decodeObligationThresholds, decodeObservePageRequest, decodeReceipt, decodeRetryCommand, decodeSubmitRequest, decodeUnknownResolutionCommand, disposeRpcHandle, dynamicWorkerCodeExecutorLayer, dynamicWorkerImplementation, encodeAbortCommand, encodeAdminResponse, encodeApprovalDecisionCommand, encodeAwaitProgressRequest, encodeCancelProgressRequest, encodeHostResponse, encodeObservePageRequest, encodeReceipt, encodeSubmitRequest, encodeUnknownResolutionCommand, makeConversationObjectClass };
1985
1985
 
1986
1986
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,33 @@
1
- import { Context, Layer } from "effect";
2
- import { InteractiveBrowser, SandboxImplementation } from "@effect-agent/sandbox";
1
+ import { Context, Effect, Layer, Redacted, Schema, Scope } from "effect";
2
+ import { BrowserHandle, InteractiveBrowser, InteractiveBrowserError, InteractiveBrowserPolicy, SandboxImplementation } from "@effect-agent/sandbox";
3
3
  //#region src/interactive-browser.d.ts
4
4
  declare const browserRunInteractiveImplementation: SandboxImplementation;
5
+ declare const BrowserRunLiveViewRequest_base: Schema.Class<BrowserRunLiveViewRequest, Schema.Struct<{
6
+ readonly mode: Schema.Literal<"tab">;
7
+ readonly expiresInMs: Schema.Int;
8
+ }>, {}>;
9
+ /** Host-only request for a redacted Cloudflare Live View URL. */
10
+ declare class BrowserRunLiveViewRequest extends BrowserRunLiveViewRequest_base {}
11
+ declare const BrowserRunLiveViewResult_base: Schema.Class<BrowserRunLiveViewResult, Schema.Struct<{
12
+ readonly devtoolsFrontendUrl: Schema.Redacted<Schema.String>;
13
+ }>, {}>;
14
+ declare class BrowserRunLiveViewResult extends BrowserRunLiveViewResult_base {}
15
+ declare const BrowserRunHandoffRequest_base: Schema.Class<BrowserRunHandoffRequest, Schema.Struct<{
16
+ readonly instructions: Schema.String;
17
+ readonly timeout: Schema.Int;
18
+ }>, {}>;
19
+ /** Start one bounded handoff; controller ownership remains a consumer concern. */
20
+ declare class BrowserRunHandoffRequest extends BrowserRunHandoffRequest_base {}
21
+ declare const BrowserRunHandoffResult_base: Schema.Class<BrowserRunHandoffResult, Schema.Struct<{
22
+ readonly handoffId: Schema.Redacted<Schema.String>;
23
+ }>, {}>;
24
+ declare class BrowserRunHandoffResult extends BrowserRunHandoffResult_base {}
25
+ declare const BrowserRunHandoffState_base: Schema.Class<BrowserRunHandoffState, Schema.Struct<{
26
+ readonly active: Schema.Boolean;
27
+ readonly handoffId: Schema.optionalKey<Schema.Redacted<Schema.String>>;
28
+ readonly durationMs: Schema.optionalKey<Schema.Natural>;
29
+ }>, {}>;
30
+ declare class BrowserRunHandoffState extends BrowserRunHandoffState_base {}
5
31
  /** One intercepted Puppeteer request, narrowed to the policy-relevant surface. */
6
32
  interface BrowserRunInteractiveRequest {
7
33
  readonly url: () => string;
@@ -9,6 +35,12 @@ interface BrowserRunInteractiveRequest {
9
35
  readonly continue: () => Promise<void>;
10
36
  }
11
37
  type BrowserRunInteractiveRequestListener = (request: BrowserRunInteractiveRequest) => void;
38
+ type BrowserRunCloudflareCommand = "Cloudflare.getLiveView" | "Cloudflare.handoff" | "Cloudflare.getHandoffState";
39
+ /** Narrow CDP boundary for Cloudflare commands absent from the pinned protocol types. */
40
+ interface BrowserRunInteractiveCdpSession {
41
+ readonly send: (command: BrowserRunCloudflareCommand, parameters: unknown) => Promise<unknown>;
42
+ readonly detach: () => Promise<void>;
43
+ }
12
44
  /** Narrow page boundary used by deterministic tests; SDK values remain in this package. */
13
45
  interface BrowserRunInteractivePage {
14
46
  readonly close: () => Promise<void>;
@@ -21,6 +53,9 @@ interface BrowserRunInteractivePage {
21
53
  readonly readText: (selector: string | undefined, maximumBytes: number) => Promise<unknown>;
22
54
  readonly fill: (selector: string, value: string) => Promise<void>;
23
55
  readonly click: (selector: string) => Promise<void>;
56
+ readonly screenshot: (fullPage: boolean) => Promise<unknown>;
57
+ readonly scroll: (deltaX: number, deltaY: number) => Promise<void>;
58
+ readonly createCdpSession: () => Promise<BrowserRunInteractiveCdpSession>;
24
59
  }
25
60
  interface BrowserRunInteractiveContext {
26
61
  readonly newPage: () => Promise<BrowserRunInteractivePage>;
@@ -29,12 +64,14 @@ interface BrowserRunInteractiveContext {
29
64
  interface BrowserRunInteractiveBrowser {
30
65
  readonly createContext: () => Promise<BrowserRunInteractiveContext>;
31
66
  readonly close: () => Promise<void>;
67
+ readonly sessionId: () => unknown;
32
68
  readonly isConnected: () => boolean;
33
69
  readonly onDisconnected: (listener: () => void) => void;
34
70
  readonly offDisconnected: (listener: () => void) => void;
35
71
  }
36
72
  declare const BrowserRunInteractiveBinding_base: Context.ServiceClass<BrowserRunInteractiveBinding, "@effect-agent/platform-cloudflare/BrowserRunInteractiveBinding", {
37
73
  readonly launch: (keepAliveMillis: number) => Promise<BrowserRunInteractiveBrowser>;
74
+ readonly connect: (sessionId: string) => Promise<BrowserRunInteractiveBrowser>;
38
75
  }>;
39
76
  /** Host-supplied Browser Run binding projected into one fakeable launch operation. */
40
77
  declare class BrowserRunInteractiveBinding extends BrowserRunInteractiveBinding_base {
@@ -42,8 +79,24 @@ declare class BrowserRunInteractiveBinding extends BrowserRunInteractiveBinding_
42
79
  readonly browser: BrowserRun;
43
80
  }): Layer.Layer<BrowserRunInteractiveBinding>;
44
81
  }
45
- /** Worker-only Cloudflare Puppeteer adapter; the caller supplies the Browser Run binding Layer. */
82
+ interface BrowserRunInteractiveSession {
83
+ readonly handle: BrowserHandle;
84
+ readonly sessionId: Redacted.Redacted<string>;
85
+ readonly getLiveView: (request: BrowserRunLiveViewRequest) => Effect.Effect<BrowserRunLiveViewResult, InteractiveBrowserError>;
86
+ readonly handoff: (request: BrowserRunHandoffRequest) => Effect.Effect<BrowserRunHandoffResult, InteractiveBrowserError>;
87
+ readonly getHandoffState: Effect.Effect<BrowserRunHandoffState, InteractiveBrowserError>;
88
+ readonly close: Effect.Effect<void, InteractiveBrowserError>;
89
+ }
90
+ declare const BrowserRunInteractiveHost_base: Context.ServiceClass<BrowserRunInteractiveHost, "@effect-agent/platform-cloudflare/BrowserRunInteractiveHost", {
91
+ readonly open: (policy: InteractiveBrowserPolicy) => Effect.Effect<BrowserRunInteractiveSession, InteractiveBrowserError, Scope.Scope>;
92
+ readonly closeSession: (sessionId: Redacted.Redacted<string>) => Effect.Effect<void, InteractiveBrowserError>;
93
+ }>;
94
+ /** Cloudflare host authority kept separate from the provider-neutral browser handle. */
95
+ declare class BrowserRunInteractiveHost extends BrowserRunInteractiveHost_base {}
96
+ /** Cloudflare host controls and private session identity for one scoped Browser Run pass. */
97
+ declare const browserRunInteractiveHostLayer: () => Layer.Layer<BrowserRunInteractiveHost, never, BrowserRunInteractiveBinding>;
98
+ /** Worker-only generic adapter; Cloudflare identity and controls remain host-only. */
46
99
  declare const browserRunInteractiveLayer: () => Layer.Layer<InteractiveBrowser, never, BrowserRunInteractiveBinding>;
47
100
  //#endregion
48
- export { BrowserRunInteractiveBinding, BrowserRunInteractiveBrowser, BrowserRunInteractiveContext, BrowserRunInteractivePage, BrowserRunInteractiveRequest, BrowserRunInteractiveRequestListener, browserRunInteractiveImplementation, browserRunInteractiveLayer };
101
+ export { BrowserRunCloudflareCommand, BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunInteractiveBinding, BrowserRunInteractiveBrowser, BrowserRunInteractiveCdpSession, BrowserRunInteractiveContext, BrowserRunInteractiveHost, BrowserRunInteractivePage, BrowserRunInteractiveRequest, BrowserRunInteractiveRequestListener, BrowserRunInteractiveSession, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, browserRunInteractiveHostLayer, browserRunInteractiveImplementation, browserRunInteractiveLayer };
49
102
  //# sourceMappingURL=interactive-browser.d.mts.map