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

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";
@@ -704,6 +704,14 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
704
704
  readonly createdAt: string;
705
705
  readonly deploymentId: string;
706
706
  readonly payload: {
707
+ readonly _tag: "SubagentStarted";
708
+ readonly runId: string;
709
+ readonly toolCallId: string;
710
+ readonly childConversationId: string;
711
+ readonly childSubmissionId: string;
712
+ readonly childReceiptId: string;
713
+ readonly childRunId: string;
714
+ } | {
707
715
  readonly _tag: "ConversationCreated";
708
716
  readonly agentId: string;
709
717
  readonly definitions: {
@@ -899,14 +907,6 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
899
907
  readonly childConversationId: string;
900
908
  readonly childPrincipal: string;
901
909
  readonly childIdempotencyKey: string;
902
- } | {
903
- readonly _tag: "SubagentStarted";
904
- readonly runId: string;
905
- readonly toolCallId: string;
906
- readonly childConversationId: string;
907
- readonly childSubmissionId: string;
908
- readonly childReceiptId: string;
909
- readonly childRunId: string;
910
910
  } | {
911
911
  readonly _tag: "SubagentJoined";
912
912
  readonly runId: string;
@@ -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