@effect-agent/platform-cloudflare 0.1.0-beta.39 → 0.1.0-beta.41
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/{bindings-C00ZfjsX.d.mts → bindings-BrVEOkfe.d.mts} +4 -2
- package/dist/browser-quick-action.d.mts +18 -1
- package/dist/browser-quick-action.mjs +14 -1
- package/dist/browser-quick-action.mjs.map +1 -1
- package/dist/browser-rest-capture.d.mts +17 -2
- package/dist/browser-rest-capture.mjs +12 -1
- package/dist/browser-rest-capture.mjs.map +1 -1
- package/dist/browser-rest-crawl.mjs +2 -2
- package/dist/browser-rest-crawl.mjs.map +1 -1
- package/dist/index.d.mts +204 -22
- package/dist/index.mjs +161 -7
- package/dist/index.mjs.map +1 -1
- package/dist/interactive-browser.d.mts +17 -1
- package/dist/interactive-browser.mjs +18 -6
- package/dist/interactive-browser.mjs.map +1 -1
- package/dist/{prepared-admission-D5hQ-ofV.mjs → prepared-admission-BKp_Upw2.mjs} +16 -4
- package/dist/prepared-admission-BKp_Upw2.mjs.map +1 -0
- package/dist/scheduling.d.mts +1 -1
- package/dist/scheduling.mjs +1 -1
- package/dist/subscriptions.d.mts +1 -1
- package/dist/subscriptions.mjs +2 -2
- package/dist/subscriptions.mjs.map +1 -1
- package/package.json +10 -10
- package/src/bindings.ts +5 -1
- package/src/browser-quick-action.ts +31 -0
- package/src/browser-rest-capture.ts +27 -0
- package/src/client.ts +21 -7
- package/src/code-mode-executor.ts +19 -0
- package/src/index.ts +2 -0
- package/src/interactive-browser.ts +29 -1
- package/src/memory.ts +317 -0
- package/dist/prepared-admission-D5hQ-ofV.mjs.map +0 -1
|
@@ -139,6 +139,22 @@ declare const isBrowserRunUndispatchedActionError: (error: unknown) => boolean;
|
|
|
139
139
|
declare const browserRunInteractiveHostLayer: () => Layer.Layer<BrowserRunInteractiveHost, never, BrowserRunInteractiveBinding>;
|
|
140
140
|
/** Worker-only generic adapter; Cloudflare identity and controls remain host-only. */
|
|
141
141
|
declare const browserRunInteractiveLayer: () => Layer.Layer<InteractiveBrowser, never, BrowserRunInteractiveBinding>;
|
|
142
|
+
/** Resolved Worker binding, cleanup credentials, and optional initial viewport. */
|
|
143
|
+
interface CloudflareInteractiveBrowserOptions extends BrowserRunLifecycleOptions {
|
|
144
|
+
readonly browser: BrowserRun;
|
|
145
|
+
readonly viewport?: BrowserRunViewport;
|
|
146
|
+
}
|
|
147
|
+
/** Worker-only assembly; importing ordinary capture never loads Puppeteer. */
|
|
148
|
+
declare const CloudflareInteractiveBrowser: {
|
|
149
|
+
/**
|
|
150
|
+
* Assemble binding, confirmed-session cleanup, and the generic browser service.
|
|
151
|
+
* HttpClient and construction errors remain visible. Opening a pass still requires
|
|
152
|
+
* an explicit policy and Scope; no browser is launched during Layer construction.
|
|
153
|
+
*/
|
|
154
|
+
layer: (options: CloudflareInteractiveBrowserOptions) => Layer.Layer<InteractiveBrowser, BrowserRunCleanupError | InteractiveBrowserPolicyDeniedError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
155
|
+
/** Opt into private host controls instead of exposing them through the generic service. */
|
|
156
|
+
hostLayer: (options: CloudflareInteractiveBrowserOptions) => Layer.Layer<BrowserRunInteractiveHost, BrowserRunCleanupError | InteractiveBrowserPolicyDeniedError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
157
|
+
};
|
|
142
158
|
//#endregion
|
|
143
|
-
export { BrowserRunCleanupError, BrowserRunCloudflareCommand, BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunInteractiveBinding, BrowserRunInteractiveBrowser, BrowserRunInteractiveCdpSession, BrowserRunInteractiveContext, BrowserRunInteractiveHost, BrowserRunInteractivePage, BrowserRunInteractiveRequest, BrowserRunInteractiveRequestListener, BrowserRunInteractiveSession, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, BrowserRunSessionLifecycle, BrowserRunViewport, browserRunInteractiveHostLayer, browserRunInteractiveImplementation, browserRunInteractiveLayer, isBrowserRunUndispatchedActionError };
|
|
159
|
+
export { BrowserRunCleanupError, BrowserRunCloudflareCommand, BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunInteractiveBinding, BrowserRunInteractiveBrowser, BrowserRunInteractiveCdpSession, BrowserRunInteractiveContext, BrowserRunInteractiveHost, BrowserRunInteractivePage, BrowserRunInteractiveRequest, BrowserRunInteractiveRequestListener, BrowserRunInteractiveSession, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, BrowserRunSessionLifecycle, BrowserRunViewport, CloudflareInteractiveBrowser, CloudflareInteractiveBrowserOptions, browserRunInteractiveHostLayer, browserRunInteractiveImplementation, browserRunInteractiveLayer, isBrowserRunUndispatchedActionError };
|
|
144
160
|
//# sourceMappingURL=interactive-browser.d.mts.map
|
|
@@ -88,12 +88,12 @@ const browserRunInteractiveImplementation = SandboxImplementation.make({
|
|
|
88
88
|
});
|
|
89
89
|
const MIN_KEEP_ALIVE_MILLIS = 1e4;
|
|
90
90
|
const MAX_KEEP_ALIVE_MILLIS = 6e5;
|
|
91
|
-
const MAX_TEXT_LENGTH =
|
|
92
|
-
const MAX_SCREENSHOT_BYTES =
|
|
91
|
+
const MAX_TEXT_LENGTH = 8388608;
|
|
92
|
+
const MAX_SCREENSHOT_BYTES = 8388608;
|
|
93
93
|
const MIN_LIVE_VIEW_EXPIRY_MILLIS = 6e4;
|
|
94
|
-
const MAX_LIVE_VIEW_EXPIRY_MILLIS =
|
|
95
|
-
const MAX_HANDOFF_TIMEOUT_MILLIS =
|
|
96
|
-
const MAX_HOST_TEXT_LENGTH =
|
|
94
|
+
const MAX_LIVE_VIEW_EXPIRY_MILLIS = 36e5;
|
|
95
|
+
const MAX_HANDOFF_TIMEOUT_MILLIS = 18e5;
|
|
96
|
+
const MAX_HOST_TEXT_LENGTH = 8192;
|
|
97
97
|
const CLEANUP_STEP_TIMEOUT_MILLIS = 1e4;
|
|
98
98
|
const ACTION_NETWORK_QUIET_MILLIS = 200;
|
|
99
99
|
const ACTION_NETWORK_SETTLE_MILLIS = 2e3;
|
|
@@ -1148,7 +1148,19 @@ const browserRunInteractiveLayer = () => Layer.effect(InteractiveBrowser, Effect
|
|
|
1148
1148
|
const host = makeHostService(binding);
|
|
1149
1149
|
return InteractiveBrowser.of({ open: (policy) => host.open(policy).pipe(Effect.map((session) => session.handle)) });
|
|
1150
1150
|
}));
|
|
1151
|
+
const interactiveBindingLayer = (options) => BrowserRunInteractiveBinding.layer(options).pipe(Layer.provide(BrowserRunSessionLifecycle.layer(options)));
|
|
1152
|
+
/** Worker-only assembly; importing ordinary capture never loads Puppeteer. */
|
|
1153
|
+
const CloudflareInteractiveBrowser = {
|
|
1154
|
+
/**
|
|
1155
|
+
* Assemble binding, confirmed-session cleanup, and the generic browser service.
|
|
1156
|
+
* HttpClient and construction errors remain visible. Opening a pass still requires
|
|
1157
|
+
* an explicit policy and Scope; no browser is launched during Layer construction.
|
|
1158
|
+
*/
|
|
1159
|
+
layer: (options) => browserRunInteractiveLayer().pipe(Layer.provide(interactiveBindingLayer(options))),
|
|
1160
|
+
/** Opt into private host controls instead of exposing them through the generic service. */
|
|
1161
|
+
hostLayer: (options) => browserRunInteractiveHostLayer().pipe(Layer.provide(interactiveBindingLayer(options)))
|
|
1162
|
+
};
|
|
1151
1163
|
//#endregion
|
|
1152
|
-
export { BrowserRunCleanupError, BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunInteractiveBinding, BrowserRunInteractiveHost, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, BrowserRunSessionLifecycle, BrowserRunViewport, browserRunInteractiveHostLayer, browserRunInteractiveImplementation, browserRunInteractiveLayer, isBrowserRunUndispatchedActionError };
|
|
1164
|
+
export { BrowserRunCleanupError, BrowserRunHandoffRequest, BrowserRunHandoffResult, BrowserRunHandoffState, BrowserRunInteractiveBinding, BrowserRunInteractiveHost, BrowserRunLiveViewRequest, BrowserRunLiveViewResult, BrowserRunSessionLifecycle, BrowserRunViewport, CloudflareInteractiveBrowser, browserRunInteractiveHostLayer, browserRunInteractiveImplementation, browserRunInteractiveLayer, isBrowserRunUndispatchedActionError };
|
|
1153
1165
|
|
|
1154
1166
|
//# sourceMappingURL=interactive-browser.mjs.map
|