@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 53 lines 1.57 KB
Raw
1 import type * as agentcore from "@distilled.cloud/aws/bedrock-agentcore";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { BrowserCustom } from "./BrowserCustom.ts";
5
6 export interface UpdateBrowserStreamRequest extends Omit<
7 agentcore.UpdateBrowserStreamRequest,
8 "browserIdentifier"
9 > {}
10
11 /**
12 * Updates a browser session's automation stream.
13 *
14 * Bind a {@link BrowserCustom} inside a function runtime to call the
15 * AgentCore data-plane API against it. Provide `AgentCore.UpdateBrowserStreamHttp`
16 * on the Function effect to implement the binding.
17 *
18 * ### Browser Automation
19 * **Example:** Release the Automation Stream
20 * ```typescript
21 * // init
22 * const updateBrowserStream = yield* AgentCore.UpdateBrowserStream(browser);
23 *
24 * return {
25 * fetch: Effect.gen(function* () {
26 * // runtime
27 * yield* updateBrowserStream({
28 * sessionId,
29 * streamUpdate: {
30 * automationStreamUpdate: { streamStatus: "ENABLED" },
31 * },
32 * });
33 * return HttpServerResponse.json({ updated: true });
34 * }),
35 * };
36 * ```
37 *
38 * @binding
39 */
40 export interface UpdateBrowserStream extends Binding.Service<
41 UpdateBrowserStream,
42 "AWS.BedrockAgentCore.UpdateBrowserStream",
43 <R extends BrowserCustom>(
44 browser: R,
45 ) => Effect.Effect<
46 (
47 request: UpdateBrowserStreamRequest,
48 ) => Effect.Effect<agentcore.UpdateBrowserStreamResponse, agentcore.UpdateBrowserStreamError>
49 >
50 > {}
51 export const UpdateBrowserStream = Binding.Service<UpdateBrowserStream>(
52 "AWS.BedrockAgentCore.UpdateBrowserStream",
53 );