agentfootprint 9.68.0 → 9.69.0

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.
@@ -0,0 +1,203 @@
1
+ "use strict";
2
+ /**
3
+ * agentCoreBrowser — AWS Bedrock AgentCore **Browser** as a {@link BrowserRunner}.
4
+ *
5
+ * A managed Chrome in AWS's account that an agent can drive, a person can watch
6
+ * live, and — the part this adapter exists for — a person can TAKE OVER
7
+ * mid-session and hand back.
8
+ *
9
+ * ── Two channels, and only one of them is here ───────────────────────────────
10
+ * A browser session has two doors, and confusing them wastes a day:
11
+ *
12
+ * 1. **The automation stream** — a CDP WebSocket. Navigate, find an element,
13
+ * fill a form: everything page-shaped happens here, driven by Playwright
14
+ * or another CDP client. This adapter hands you
15
+ * {@link BrowserSession.automationEndpoint} and stays out of the way. It
16
+ * does not depend on Playwright and does not drive the page for you.
17
+ * 2. **`InvokeBrowser`** — the data-plane operation this adapter calls. It is
18
+ * OS-LEVEL input ABOVE the page: mouse, keyboard, screenshots. Its action
19
+ * union, read off the SDK rather than remembered, is exactly
20
+ * `mouseClick | mouseMove | mouseDrag | mouseScroll | keyType | keyPress |
21
+ * keyShortcut | screenshot`. **There is no navigate action**, and a reader
22
+ * expecting one is looking at the wrong door.
23
+ *
24
+ * ── The takeover ─────────────────────────────────────────────────────────────
25
+ * `UpdateBrowserStream` with `automationStreamUpdate.streamStatus` set to
26
+ * `DISABLED` stops the automation channel and leaves the live-view user in
27
+ * control; `ENABLED` gives it back. That is `handControlTo('person' | 'agent')`
28
+ * here, and it composes with this library's check-in: the agent pauses, a
29
+ * person finishes the login, the agent resumes on the page they left — and both
30
+ * handovers are ordinary events in the trace.
31
+ *
32
+ * ── How this talks to the SDK (the 9.4.0 law) ────────────────────────────────
33
+ * Through `client.send(new SomeCommand(input))`, never a method on the client —
34
+ * a bare `@aws-sdk/client-*` Client carries `send` and `destroy` and nothing
35
+ * else. Every command name and request shape below was read off a real install
36
+ * of `@aws-sdk/client-bedrock-agentcore` **3.1118.0**, including the action
37
+ * union above and `ScreenshotResult`'s `{ status, error?, data? }`.
38
+ *
39
+ * ── One documented contradiction, left as AWS wrote it ───────────────────────
40
+ * The devguide says a session defaults to 15 minutes; `StartBrowserSession`'s
41
+ * API reference says 3600 seconds. This adapter sends nothing unless you pass
42
+ * `sessionTimeoutSeconds`, so the default is whatever the service applies —
43
+ * rather than this file picking a side in somebody else's disagreement.
44
+ *
45
+ * Pattern: Adapter (GoF) + lazy peer-dep load — the SDK is required only when
46
+ * `start()` first runs, or never, if you inject `_client` / `_sdk`.
47
+ */
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.agentCoreBrowser = exports.AWS_SYSTEM_BROWSER = void 0;
50
+ const lazyRequire_js_1 = require("../../lib/lazyRequire.js");
51
+ /** AWS's managed browser. A custom `CreateBrowser` resource id goes here instead. */
52
+ exports.AWS_SYSTEM_BROWSER = 'aws.browser.v1';
53
+ const BUTTONS = { left: 'LEFT', middle: 'MIDDLE', right: 'RIGHT' };
54
+ function createBrowserClient(options) {
55
+ let mod;
56
+ if (options._sdk) {
57
+ mod = options._sdk;
58
+ }
59
+ else {
60
+ try {
61
+ mod = (0, lazyRequire_js_1.lazyRequire)('@aws-sdk/client-bedrock-agentcore');
62
+ }
63
+ catch {
64
+ throw new Error('agentCoreBrowser requires the `@aws-sdk/client-bedrock-agentcore` peer dependency.\n' +
65
+ ' Install: npm install @aws-sdk/client-bedrock-agentcore\n' +
66
+ ' Or pass `_client` for a pre-built or mock client.');
67
+ }
68
+ }
69
+ if (!mod.BedrockAgentCoreClient) {
70
+ throw new Error('agentCoreBrowser: `@aws-sdk/client-bedrock-agentcore` is installed but ' +
71
+ '`BedrockAgentCoreClient` was not found. Update the SDK.');
72
+ }
73
+ const sdk = new mod.BedrockAgentCoreClient({ ...(options.region && { region: options.region }) });
74
+ const send = async (Ctor, name, input) => {
75
+ if (!Ctor) {
76
+ throw new Error(`agentCoreBrowser: \`@aws-sdk/client-bedrock-agentcore\` is missing ${name}. ` +
77
+ 'Upgrade the SDK, or pass `_client` with your own mapping.');
78
+ }
79
+ return sdk.send(new Ctor(input));
80
+ };
81
+ return {
82
+ async startBrowserSession(input) {
83
+ return (await send(mod.StartBrowserSessionCommand, 'StartBrowserSessionCommand', input));
84
+ },
85
+ async invokeBrowser(input) {
86
+ return (await send(mod.InvokeBrowserCommand, 'InvokeBrowserCommand', input));
87
+ },
88
+ async updateBrowserStream(input) {
89
+ await send(mod.UpdateBrowserStreamCommand, 'UpdateBrowserStreamCommand', input);
90
+ },
91
+ async stopBrowserSession(input) {
92
+ await send(mod.StopBrowserSessionCommand, 'StopBrowserSessionCommand', input);
93
+ },
94
+ };
95
+ }
96
+ /**
97
+ * Build a {@link BrowserRunner} backed by AgentCore Browser.
98
+ *
99
+ * @example A session, a person taking over, and the agent resuming
100
+ * const browser = agentCoreBrowser({ region: 'us-east-1' });
101
+ * const session = await browser.start({ key: toolSessionKey(ctx, 'run') });
102
+ *
103
+ * // Page work goes over CDP, not through this adapter:
104
+ * // const page = await chromium.connectOverCDP(session.automationEndpoint!)
105
+ *
106
+ * await session.handControlTo?.('person'); // they finish the login
107
+ * await session.handControlTo?.('agent'); // and the agent carries on
108
+ * await session.stop();
109
+ */
110
+ function agentCoreBrowser(options = {}) {
111
+ const browserIdentifier = options.browserIdentifier ?? exports.AWS_SYSTEM_BROWSER;
112
+ let client;
113
+ const getClient = () => {
114
+ client ??= options._client ?? createBrowserClient(options);
115
+ return client;
116
+ };
117
+ return {
118
+ id: options.id ?? 'agentcore-browser',
119
+ async start(req) {
120
+ const c = getClient();
121
+ const started = await c.startBrowserSession({
122
+ browserIdentifier,
123
+ name: req.key,
124
+ ...(options.sessionTimeoutSeconds !== undefined && {
125
+ sessionTimeoutSeconds: options.sessionTimeoutSeconds,
126
+ }),
127
+ ...(options.viewport !== undefined && { viewPort: options.viewport }),
128
+ });
129
+ const sessionId = started.sessionId;
130
+ if (!sessionId) {
131
+ throw new Error('agentCoreBrowser: StartBrowserSession returned no sessionId, so there is no session ' +
132
+ 'to drive. Check the browser identifier and the execution role.');
133
+ }
134
+ const act = async (action) => {
135
+ const answer = await c.invokeBrowser({ browserIdentifier, sessionId, action });
136
+ return answer.result;
137
+ };
138
+ const automationEndpoint = started.streams?.automationStream?.streamEndpoint;
139
+ const liveViewEndpoint = started.streams?.liveViewStream?.streamEndpoint;
140
+ const session = {
141
+ id: sessionId,
142
+ ...(automationEndpoint !== undefined && { automationEndpoint }),
143
+ ...(liveViewEndpoint !== undefined && { liveViewEndpoint }),
144
+ async click({ x, y, button, clicks }) {
145
+ await act({
146
+ mouseClick: {
147
+ x,
148
+ y,
149
+ ...(button !== undefined && { button: BUTTONS[button] }),
150
+ ...(clicks !== undefined && { clickCount: clicks }),
151
+ },
152
+ });
153
+ },
154
+ async type(text) {
155
+ await act({ keyType: { text } });
156
+ },
157
+ async press({ key, times }) {
158
+ await act({ keyPress: { key, ...(times !== undefined && { presses: times }) } });
159
+ },
160
+ async screenshot() {
161
+ const result = await act({ screenshot: { format: 'PNG' } });
162
+ const shot = result?.screenshot;
163
+ if (!shot?.data) {
164
+ // The result member carries its own status and error, so a failed
165
+ // screenshot says what the service said rather than answering with
166
+ // an empty image that reads as a blank page.
167
+ throw new Error(`agentCoreBrowser: the screenshot did not produce image data` +
168
+ `${shot?.status ? ` (status ${shot.status})` : ''}` +
169
+ `${shot?.error ? `: ${shot.error}` : '.'}`);
170
+ }
171
+ return { data: shot.data, format: 'png' };
172
+ },
173
+ async handControlTo(driver) {
174
+ // The person takes over by DISABLING automation: the live-view user
175
+ // is already connected, and stopping the automation stream is what
176
+ // lets their input through.
177
+ await c.updateBrowserStream({
178
+ browserIdentifier,
179
+ sessionId,
180
+ streamUpdate: {
181
+ automationStreamUpdate: {
182
+ streamStatus: driver === 'person' ? 'DISABLED' : 'ENABLED',
183
+ },
184
+ },
185
+ });
186
+ },
187
+ async stop() {
188
+ try {
189
+ await c.stopBrowserSession({ browserIdentifier, sessionId });
190
+ }
191
+ catch {
192
+ // A managed session reaped by its own idle timeout is the ordinary
193
+ // case, and stopping one that is already gone is a no-op — the port
194
+ // says so, and a throw here would fail a teardown that succeeded.
195
+ }
196
+ },
197
+ };
198
+ return session;
199
+ },
200
+ };
201
+ }
202
+ exports.agentCoreBrowser = agentCoreBrowser;
203
+ //# sourceMappingURL=agentcore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentcore.js","sourceRoot":"","sources":["../../../src/adapters/browser/agentcore.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;;;AAGH,6DAAuD;AAEvD,qFAAqF;AACxE,QAAA,kBAAkB,GAAG,gBAAgB,CAAC;AAkEnD,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAW,CAAC;AAE5E,SAAS,mBAAmB,CAAC,OAAgC;IAC3D,IAAI,GAAqC,CAAC;IAC1C,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IACrB,CAAC;SAAM,CAAC;QACN,IAAI,CAAC;YACH,GAAG,GAAG,IAAA,4BAAW,EAAmC,mCAAmC,CAAC,CAAC;QAC3F,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,KAAK,CACb,sFAAsF;gBACpF,6DAA6D;gBAC7D,qDAAqD,CACxD,CAAC;QACJ,CAAC;IACH,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,sBAAsB,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,yEAAyE;YACvE,yDAAyD,CAC5D,CAAC;IACJ,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,sBAAsB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAA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,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;AACxD,CAAC;AAPD,wCAOC;AAqDD;;;;;;;;;GASG;AACU,QAAA,iBAAiB,GAAG,kBAAkB,CAAC;AAgGpD;uDACuD;AACvD,SAAgB,kBAAkB,CAChC,OAAoB;IAEpB,OAAO,OAAO,OAAO,CAAC,WAAW,KAAK,UAAU,CAAC;AACnD,CAAC;AAJD,gDAIC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/adapters/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAsHH;;;;GAIG;AACU,QAAA,2BAA2B,GAAwB,MAAM,CAAC,MAAM,CAAC;IAC5E,MAAM;IACN,WAAW;CACZ,CAAC,CAAC;AAqsBH;;;;;;GAMG;AACH,SAAgB,cAAc,CAC5B,OAAsC,EACtC,UAAgC;IAEhC,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,IAAI,UAAU,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC5C,OAAO,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;AACxD,CAAC;AAPD,wCAOC;AAqID;;;;;;;;;GASG;AACU,QAAA,iBAAiB,GAAG,kBAAkB,CAAC;AAgGpD;uDACuD;AACvD,SAAgB,kBAAkB,CAChC,OAAoB;IAEpB,OAAO,OAAO,OAAO,CAAC,WAAW,KAAK,UAAU,CAAC;AACnD,CAAC;AAJD,gDAIC"}
@@ -41,7 +41,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
41
41
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
42
42
  };
43
43
  Object.defineProperty(exports, "__esModule", { value: true });
44
- exports.agentCoreCodeRunner = exports.localCodeRunner = void 0;
44
+ exports.agentCoreCodeRunner = exports.AWS_SYSTEM_BROWSER = exports.agentCoreBrowser = exports.localCodeRunner = void 0;
45
45
  __exportStar(require("../llm-providers.js"), exports);
46
46
  __exportStar(require("../embedders/index.js"), exports);
47
47
  __exportStar(require("../tool-providers/index.js"), exports);
@@ -51,6 +51,12 @@ __exportStar(require("../thinking/index.js"), exports);
51
51
  // other adapter ports.
52
52
  var local_js_1 = require("../adapters/code/local.js");
53
53
  Object.defineProperty(exports, "localCodeRunner", { enumerable: true, get: function () { return local_js_1.localCodeRunner; } });
54
- var agentcore_js_1 = require("../adapters/code/agentcore.js");
55
- Object.defineProperty(exports, "agentCoreCodeRunner", { enumerable: true, get: function () { return agentcore_js_1.agentCoreCodeRunner; } });
54
+ // A managed browser behind the `BrowserRunner` port (9.68.0). Page work goes
55
+ // over CDP through `session.automationEndpoint`; what this carries is the
56
+ // session, the OS-level input above the page, and the human takeover.
57
+ var agentcore_js_1 = require("../adapters/browser/agentcore.js");
58
+ Object.defineProperty(exports, "agentCoreBrowser", { enumerable: true, get: function () { return agentcore_js_1.agentCoreBrowser; } });
59
+ Object.defineProperty(exports, "AWS_SYSTEM_BROWSER", { enumerable: true, get: function () { return agentcore_js_1.AWS_SYSTEM_BROWSER; } });
60
+ var agentcore_js_2 = require("../adapters/code/agentcore.js");
61
+ Object.defineProperty(exports, "agentCoreCodeRunner", { enumerable: true, get: function () { return agentcore_js_2.agentCoreCodeRunner; } });
56
62
  //# sourceMappingURL=providers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"providers.js","sourceRoot":"","sources":["../../src/doors/providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;;;;;;;;;;;;;;;;;AAEH,sDAAoC;AACpC,wDAAsC;AACtC,6DAA2C;AAC3C,uDAAqC;AAErC,6EAA6E;AAC7E,gFAAgF;AAChF,uBAAuB;AACvB,sDAAyF;AAAhF,2GAAA,eAAe,OAAA;AACxB,8DAMuC;AALrC,mHAAA,mBAAmB,OAAA"}
1
+ {"version":3,"file":"providers.js","sourceRoot":"","sources":["../../src/doors/providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;;;;;;;;;;;;;;;;;AAEH,sDAAoC;AACpC,wDAAsC;AACtC,6DAA2C;AAC3C,uDAAqC;AAErC,6EAA6E;AAC7E,gFAAgF;AAChF,uBAAuB;AACvB,sDAAyF;AAAhF,2GAAA,eAAe,OAAA;AACxB,6EAA6E;AAC7E,0EAA0E;AAC1E,sEAAsE;AACtE,iEAM0C;AALxC,gHAAA,gBAAgB,OAAA;AAChB,kHAAA,kBAAkB,OAAA;AAKpB,8DAMuC;AALrC,mHAAA,mBAAmB,OAAA"}
@@ -0,0 +1,141 @@
1
+ /**
2
+ * agentCoreBrowser — AWS Bedrock AgentCore **Browser** as a {@link BrowserRunner}.
3
+ *
4
+ * A managed Chrome in AWS's account that an agent can drive, a person can watch
5
+ * live, and — the part this adapter exists for — a person can TAKE OVER
6
+ * mid-session and hand back.
7
+ *
8
+ * ── Two channels, and only one of them is here ───────────────────────────────
9
+ * A browser session has two doors, and confusing them wastes a day:
10
+ *
11
+ * 1. **The automation stream** — a CDP WebSocket. Navigate, find an element,
12
+ * fill a form: everything page-shaped happens here, driven by Playwright
13
+ * or another CDP client. This adapter hands you
14
+ * {@link BrowserSession.automationEndpoint} and stays out of the way. It
15
+ * does not depend on Playwright and does not drive the page for you.
16
+ * 2. **`InvokeBrowser`** — the data-plane operation this adapter calls. It is
17
+ * OS-LEVEL input ABOVE the page: mouse, keyboard, screenshots. Its action
18
+ * union, read off the SDK rather than remembered, is exactly
19
+ * `mouseClick | mouseMove | mouseDrag | mouseScroll | keyType | keyPress |
20
+ * keyShortcut | screenshot`. **There is no navigate action**, and a reader
21
+ * expecting one is looking at the wrong door.
22
+ *
23
+ * ── The takeover ─────────────────────────────────────────────────────────────
24
+ * `UpdateBrowserStream` with `automationStreamUpdate.streamStatus` set to
25
+ * `DISABLED` stops the automation channel and leaves the live-view user in
26
+ * control; `ENABLED` gives it back. That is `handControlTo('person' | 'agent')`
27
+ * here, and it composes with this library's check-in: the agent pauses, a
28
+ * person finishes the login, the agent resumes on the page they left — and both
29
+ * handovers are ordinary events in the trace.
30
+ *
31
+ * ── How this talks to the SDK (the 9.4.0 law) ────────────────────────────────
32
+ * Through `client.send(new SomeCommand(input))`, never a method on the client —
33
+ * a bare `@aws-sdk/client-*` Client carries `send` and `destroy` and nothing
34
+ * else. Every command name and request shape below was read off a real install
35
+ * of `@aws-sdk/client-bedrock-agentcore` **3.1118.0**, including the action
36
+ * union above and `ScreenshotResult`'s `{ status, error?, data? }`.
37
+ *
38
+ * ── One documented contradiction, left as AWS wrote it ───────────────────────
39
+ * The devguide says a session defaults to 15 minutes; `StartBrowserSession`'s
40
+ * API reference says 3600 seconds. This adapter sends nothing unless you pass
41
+ * `sessionTimeoutSeconds`, so the default is whatever the service applies —
42
+ * rather than this file picking a side in somebody else's disagreement.
43
+ *
44
+ * Pattern: Adapter (GoF) + lazy peer-dep load — the SDK is required only when
45
+ * `start()` first runs, or never, if you inject `_client` / `_sdk`.
46
+ */
47
+ import type { BrowserRunner } from '../types.js';
48
+ /** AWS's managed browser. A custom `CreateBrowser` resource id goes here instead. */
49
+ export declare const AWS_SYSTEM_BROWSER = "aws.browser.v1";
50
+ export interface AgentCoreBrowserOptions {
51
+ /** AWS region. Falls back to the SDK's own resolution when omitted. */
52
+ readonly region?: string;
53
+ /** Which browser resource. Default {@link AWS_SYSTEM_BROWSER}. */
54
+ readonly browserIdentifier?: string;
55
+ /**
56
+ * Session lifetime in seconds. **Left unset by default on purpose** — AWS's
57
+ * own devguide (15 minutes) and API reference (3600 seconds) disagree, so
58
+ * sending nothing lets the service apply whichever it actually means.
59
+ */
60
+ readonly sessionTimeoutSeconds?: number;
61
+ /** Viewport for the session, when you want one that is not the default. */
62
+ readonly viewport?: {
63
+ readonly width: number;
64
+ readonly height: number;
65
+ };
66
+ /** Stable runner id (default `'agentcore-browser'`). */
67
+ readonly id?: string;
68
+ /** Test seam — inject a client implementing {@link AgentCoreBrowserClientLike}. */
69
+ readonly _client?: AgentCoreBrowserClientLike;
70
+ /** @internal Test injection — the AWS SDK module. */
71
+ readonly _sdk?: BedrockAgentCoreBrowserSdkModule;
72
+ }
73
+ /** The operation-semantic surface this adapter calls. */
74
+ export interface AgentCoreBrowserClientLike {
75
+ startBrowserSession(input: {
76
+ readonly browserIdentifier: string;
77
+ readonly name?: string;
78
+ readonly sessionTimeoutSeconds?: number;
79
+ readonly viewPort?: {
80
+ readonly width: number;
81
+ readonly height: number;
82
+ };
83
+ }): Promise<{
84
+ readonly sessionId?: string;
85
+ readonly streams?: {
86
+ readonly automationStream?: {
87
+ readonly streamEndpoint?: string;
88
+ };
89
+ readonly liveViewStream?: {
90
+ readonly streamEndpoint?: string;
91
+ };
92
+ };
93
+ }>;
94
+ invokeBrowser(input: {
95
+ readonly browserIdentifier: string;
96
+ readonly sessionId: string;
97
+ readonly action: Readonly<Record<string, unknown>>;
98
+ }): Promise<{
99
+ readonly result?: Readonly<Record<string, unknown>>;
100
+ }>;
101
+ updateBrowserStream(input: {
102
+ readonly browserIdentifier: string;
103
+ readonly sessionId: string;
104
+ readonly streamUpdate: {
105
+ readonly automationStreamUpdate: {
106
+ readonly streamStatus: 'ENABLED' | 'DISABLED';
107
+ };
108
+ };
109
+ }): Promise<void>;
110
+ stopBrowserSession(input: {
111
+ readonly browserIdentifier: string;
112
+ readonly sessionId: string;
113
+ }): Promise<void>;
114
+ }
115
+ /** The slice of `@aws-sdk/client-bedrock-agentcore` this shim touches. */
116
+ export interface BedrockAgentCoreBrowserSdkModule {
117
+ readonly BedrockAgentCoreClient?: new (config: {
118
+ region?: string;
119
+ }) => {
120
+ send(cmd: unknown): Promise<unknown>;
121
+ };
122
+ readonly StartBrowserSessionCommand?: new (input: unknown) => unknown;
123
+ readonly InvokeBrowserCommand?: new (input: unknown) => unknown;
124
+ readonly UpdateBrowserStreamCommand?: new (input: unknown) => unknown;
125
+ readonly StopBrowserSessionCommand?: new (input: unknown) => unknown;
126
+ }
127
+ /**
128
+ * Build a {@link BrowserRunner} backed by AgentCore Browser.
129
+ *
130
+ * @example A session, a person taking over, and the agent resuming
131
+ * const browser = agentCoreBrowser({ region: 'us-east-1' });
132
+ * const session = await browser.start({ key: toolSessionKey(ctx, 'run') });
133
+ *
134
+ * // Page work goes over CDP, not through this adapter:
135
+ * // const page = await chromium.connectOverCDP(session.automationEndpoint!)
136
+ *
137
+ * await session.handControlTo?.('person'); // they finish the login
138
+ * await session.handControlTo?.('agent'); // and the agent carries on
139
+ * await session.stop();
140
+ */
141
+ export declare function agentCoreBrowser(options?: AgentCoreBrowserOptions): BrowserRunner;
@@ -0,0 +1,199 @@
1
+ /**
2
+ * agentCoreBrowser — AWS Bedrock AgentCore **Browser** as a {@link BrowserRunner}.
3
+ *
4
+ * A managed Chrome in AWS's account that an agent can drive, a person can watch
5
+ * live, and — the part this adapter exists for — a person can TAKE OVER
6
+ * mid-session and hand back.
7
+ *
8
+ * ── Two channels, and only one of them is here ───────────────────────────────
9
+ * A browser session has two doors, and confusing them wastes a day:
10
+ *
11
+ * 1. **The automation stream** — a CDP WebSocket. Navigate, find an element,
12
+ * fill a form: everything page-shaped happens here, driven by Playwright
13
+ * or another CDP client. This adapter hands you
14
+ * {@link BrowserSession.automationEndpoint} and stays out of the way. It
15
+ * does not depend on Playwright and does not drive the page for you.
16
+ * 2. **`InvokeBrowser`** — the data-plane operation this adapter calls. It is
17
+ * OS-LEVEL input ABOVE the page: mouse, keyboard, screenshots. Its action
18
+ * union, read off the SDK rather than remembered, is exactly
19
+ * `mouseClick | mouseMove | mouseDrag | mouseScroll | keyType | keyPress |
20
+ * keyShortcut | screenshot`. **There is no navigate action**, and a reader
21
+ * expecting one is looking at the wrong door.
22
+ *
23
+ * ── The takeover ─────────────────────────────────────────────────────────────
24
+ * `UpdateBrowserStream` with `automationStreamUpdate.streamStatus` set to
25
+ * `DISABLED` stops the automation channel and leaves the live-view user in
26
+ * control; `ENABLED` gives it back. That is `handControlTo('person' | 'agent')`
27
+ * here, and it composes with this library's check-in: the agent pauses, a
28
+ * person finishes the login, the agent resumes on the page they left — and both
29
+ * handovers are ordinary events in the trace.
30
+ *
31
+ * ── How this talks to the SDK (the 9.4.0 law) ────────────────────────────────
32
+ * Through `client.send(new SomeCommand(input))`, never a method on the client —
33
+ * a bare `@aws-sdk/client-*` Client carries `send` and `destroy` and nothing
34
+ * else. Every command name and request shape below was read off a real install
35
+ * of `@aws-sdk/client-bedrock-agentcore` **3.1118.0**, including the action
36
+ * union above and `ScreenshotResult`'s `{ status, error?, data? }`.
37
+ *
38
+ * ── One documented contradiction, left as AWS wrote it ───────────────────────
39
+ * The devguide says a session defaults to 15 minutes; `StartBrowserSession`'s
40
+ * API reference says 3600 seconds. This adapter sends nothing unless you pass
41
+ * `sessionTimeoutSeconds`, so the default is whatever the service applies —
42
+ * rather than this file picking a side in somebody else's disagreement.
43
+ *
44
+ * Pattern: Adapter (GoF) + lazy peer-dep load — the SDK is required only when
45
+ * `start()` first runs, or never, if you inject `_client` / `_sdk`.
46
+ */
47
+ import { lazyRequire } from '../../lib/lazyRequire.js';
48
+ /** AWS's managed browser. A custom `CreateBrowser` resource id goes here instead. */
49
+ export const AWS_SYSTEM_BROWSER = 'aws.browser.v1';
50
+ const BUTTONS = { left: 'LEFT', middle: 'MIDDLE', right: 'RIGHT' };
51
+ function createBrowserClient(options) {
52
+ let mod;
53
+ if (options._sdk) {
54
+ mod = options._sdk;
55
+ }
56
+ else {
57
+ try {
58
+ mod = lazyRequire('@aws-sdk/client-bedrock-agentcore');
59
+ }
60
+ catch {
61
+ throw new Error('agentCoreBrowser requires the `@aws-sdk/client-bedrock-agentcore` peer dependency.\n' +
62
+ ' Install: npm install @aws-sdk/client-bedrock-agentcore\n' +
63
+ ' Or pass `_client` for a pre-built or mock client.');
64
+ }
65
+ }
66
+ if (!mod.BedrockAgentCoreClient) {
67
+ throw new Error('agentCoreBrowser: `@aws-sdk/client-bedrock-agentcore` is installed but ' +
68
+ '`BedrockAgentCoreClient` was not found. Update the SDK.');
69
+ }
70
+ const sdk = new mod.BedrockAgentCoreClient({ ...(options.region && { region: options.region }) });
71
+ const send = async (Ctor, name, input) => {
72
+ if (!Ctor) {
73
+ throw new Error(`agentCoreBrowser: \`@aws-sdk/client-bedrock-agentcore\` is missing ${name}. ` +
74
+ 'Upgrade the SDK, or pass `_client` with your own mapping.');
75
+ }
76
+ return sdk.send(new Ctor(input));
77
+ };
78
+ return {
79
+ async startBrowserSession(input) {
80
+ return (await send(mod.StartBrowserSessionCommand, 'StartBrowserSessionCommand', input));
81
+ },
82
+ async invokeBrowser(input) {
83
+ return (await send(mod.InvokeBrowserCommand, 'InvokeBrowserCommand', input));
84
+ },
85
+ async updateBrowserStream(input) {
86
+ await send(mod.UpdateBrowserStreamCommand, 'UpdateBrowserStreamCommand', input);
87
+ },
88
+ async stopBrowserSession(input) {
89
+ await send(mod.StopBrowserSessionCommand, 'StopBrowserSessionCommand', input);
90
+ },
91
+ };
92
+ }
93
+ /**
94
+ * Build a {@link BrowserRunner} backed by AgentCore Browser.
95
+ *
96
+ * @example A session, a person taking over, and the agent resuming
97
+ * const browser = agentCoreBrowser({ region: 'us-east-1' });
98
+ * const session = await browser.start({ key: toolSessionKey(ctx, 'run') });
99
+ *
100
+ * // Page work goes over CDP, not through this adapter:
101
+ * // const page = await chromium.connectOverCDP(session.automationEndpoint!)
102
+ *
103
+ * await session.handControlTo?.('person'); // they finish the login
104
+ * await session.handControlTo?.('agent'); // and the agent carries on
105
+ * await session.stop();
106
+ */
107
+ export function agentCoreBrowser(options = {}) {
108
+ const browserIdentifier = options.browserIdentifier ?? AWS_SYSTEM_BROWSER;
109
+ let client;
110
+ const getClient = () => {
111
+ client ??= options._client ?? createBrowserClient(options);
112
+ return client;
113
+ };
114
+ return {
115
+ id: options.id ?? 'agentcore-browser',
116
+ async start(req) {
117
+ const c = getClient();
118
+ const started = await c.startBrowserSession({
119
+ browserIdentifier,
120
+ name: req.key,
121
+ ...(options.sessionTimeoutSeconds !== undefined && {
122
+ sessionTimeoutSeconds: options.sessionTimeoutSeconds,
123
+ }),
124
+ ...(options.viewport !== undefined && { viewPort: options.viewport }),
125
+ });
126
+ const sessionId = started.sessionId;
127
+ if (!sessionId) {
128
+ throw new Error('agentCoreBrowser: StartBrowserSession returned no sessionId, so there is no session ' +
129
+ 'to drive. Check the browser identifier and the execution role.');
130
+ }
131
+ const act = async (action) => {
132
+ const answer = await c.invokeBrowser({ browserIdentifier, sessionId, action });
133
+ return answer.result;
134
+ };
135
+ const automationEndpoint = started.streams?.automationStream?.streamEndpoint;
136
+ const liveViewEndpoint = started.streams?.liveViewStream?.streamEndpoint;
137
+ const session = {
138
+ id: sessionId,
139
+ ...(automationEndpoint !== undefined && { automationEndpoint }),
140
+ ...(liveViewEndpoint !== undefined && { liveViewEndpoint }),
141
+ async click({ x, y, button, clicks }) {
142
+ await act({
143
+ mouseClick: {
144
+ x,
145
+ y,
146
+ ...(button !== undefined && { button: BUTTONS[button] }),
147
+ ...(clicks !== undefined && { clickCount: clicks }),
148
+ },
149
+ });
150
+ },
151
+ async type(text) {
152
+ await act({ keyType: { text } });
153
+ },
154
+ async press({ key, times }) {
155
+ await act({ keyPress: { key, ...(times !== undefined && { presses: times }) } });
156
+ },
157
+ async screenshot() {
158
+ const result = await act({ screenshot: { format: 'PNG' } });
159
+ const shot = result?.screenshot;
160
+ if (!shot?.data) {
161
+ // The result member carries its own status and error, so a failed
162
+ // screenshot says what the service said rather than answering with
163
+ // an empty image that reads as a blank page.
164
+ throw new Error(`agentCoreBrowser: the screenshot did not produce image data` +
165
+ `${shot?.status ? ` (status ${shot.status})` : ''}` +
166
+ `${shot?.error ? `: ${shot.error}` : '.'}`);
167
+ }
168
+ return { data: shot.data, format: 'png' };
169
+ },
170
+ async handControlTo(driver) {
171
+ // The person takes over by DISABLING automation: the live-view user
172
+ // is already connected, and stopping the automation stream is what
173
+ // lets their input through.
174
+ await c.updateBrowserStream({
175
+ browserIdentifier,
176
+ sessionId,
177
+ streamUpdate: {
178
+ automationStreamUpdate: {
179
+ streamStatus: driver === 'person' ? 'DISABLED' : 'ENABLED',
180
+ },
181
+ },
182
+ });
183
+ },
184
+ async stop() {
185
+ try {
186
+ await c.stopBrowserSession({ browserIdentifier, sessionId });
187
+ }
188
+ catch {
189
+ // A managed session reaped by its own idle timeout is the ordinary
190
+ // case, and stopping one that is already gone is a no-op — the port
191
+ // says so, and a throw here would fail a teardown that succeeded.
192
+ }
193
+ },
194
+ };
195
+ return session;
196
+ },
197
+ };
198
+ }
199
+ //# sourceMappingURL=agentcore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentcore.js","sourceRoot":"","sources":["../../../../src/adapters/browser/agentcore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,qFAAqF;AACrF,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAkEnD,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAW,CAAC;AAE5E,SAAS,mBAAmB,CAAC,OAAgC;IAC3D,IAAI,GAAqC,CAAC;IAC1C,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IACrB,CAAC;SAAM,CAAC;QACN,IAAI,CAAC;YACH,GAAG,GAAG,WAAW,CAAmC,mCAAmC,CAAC,CAAC;QAC3F,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,KAAK,CACb,sFAAsF;gBACpF,6DAA6D;gBAC7D,qDAAqD,CACxD,CAAC;QACJ,CAAC;IACH,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,sBAAsB,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,yEAAyE;YACvE,yDAAyD,CAC5D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AAM,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;4BACnD,GAAG,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAC7C,CAAC;oBACJ,CAAC;oBACD,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;gBAC5C,CAAC;gBAED,KAAK,CAAC,aAAa,CAAC,MAAqB;oBACvC,oEAAoE;oBACpE,mEAAmE;oBACnE,4BAA4B;oBAC5B,MAAM,CAAC,CAAC,mBAAmB,CAAC;wBAC1B,iBAAiB;wBACjB,SAAS;wBACT,YAAY,EAAE;4BACZ,sBAAsB,EAAE;gCACtB,YAAY,EAAE,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;6BAC3D;yBACF;qBACF,CAAC,CAAC;gBACL,CAAC;gBAED,KAAK,CAAC,IAAI;oBACR,IAAI,CAAC;wBACH,MAAM,CAAC,CAAC,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,SAAS,EAAE,CAAC,CAAC;oBAC/D,CAAC;oBAAC,MAAM,CAAC;wBACP,mEAAmE;wBACnE,oEAAoE;wBACpE,kEAAkE;oBACpE,CAAC;gBACH,CAAC;aACF,CAAC;YACF,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -811,6 +811,88 @@ export interface PricingTable {
811
811
  *
812
812
  * Implement it for your own backend; ship it to `codeRunnerTool({ runner })`.
813
813
  */
814
+ /** One screenshot a browser session took. */
815
+ export interface BrowserShot {
816
+ /** Image bytes. */
817
+ readonly data: Uint8Array;
818
+ /** Image format, lower-case (`'png'`). */
819
+ readonly format: string;
820
+ }
821
+ /** Who is driving a browser session right now. */
822
+ export type BrowserDriver = 'agent' | 'person';
823
+ /**
824
+ * A browser an agent can drive — the PORT (9.68.0).
825
+ *
826
+ * Deliberately small, and deliberately not a browser automation API. Page-level
827
+ * work (navigate, find an element, fill a form) is what CDP and Playwright
828
+ * already do far better than any interface here would; a session exposes
829
+ * {@link BrowserSession.automationEndpoint} so those attach directly. What this
830
+ * port carries is what an automation library CANNOT do on its own: open and
831
+ * release a managed session, reach the operating system above the page, and —
832
+ * the one that matters — hand the controls to a person and take them back.
833
+ */
834
+ export interface BrowserRunner {
835
+ /** Stable id — reported on every tool-session event, so a row names its backend. */
836
+ readonly id: string;
837
+ /**
838
+ * Open a session.
839
+ *
840
+ * `key` is the ISOLATION key the caller derived. An adapter may use it to
841
+ * name the remote session; it must never widen it.
842
+ */
843
+ start(req: {
844
+ readonly key: string;
845
+ readonly signal?: AbortSignal;
846
+ }): Promise<BrowserSession>;
847
+ }
848
+ /** One open browser session. */
849
+ export interface BrowserSession {
850
+ /** The backend's own id for this session. */
851
+ readonly id: string;
852
+ /**
853
+ * Where an automation client attaches — a CDP WebSocket, for Playwright and
854
+ * friends. Absent on a backend that offers no such channel.
855
+ *
856
+ * This library does not drive the page for you and does not depend on
857
+ * Playwright; it hands you the endpoint and stays out of the way.
858
+ */
859
+ readonly automationEndpoint?: string;
860
+ /** Where a PERSON can watch this session, when the backend offers a view. */
861
+ readonly liveViewEndpoint?: string;
862
+ /** Click at a point, in the operating system rather than in the page. */
863
+ click(req: {
864
+ readonly x: number;
865
+ readonly y: number;
866
+ readonly button?: 'left' | 'middle' | 'right';
867
+ readonly clicks?: number;
868
+ }): Promise<void>;
869
+ /** Type text, as a keyboard would. */
870
+ type(text: string): Promise<void>;
871
+ /** Press a named key, optionally more than once. */
872
+ press(req: {
873
+ readonly key: string;
874
+ readonly times?: number;
875
+ }): Promise<void>;
876
+ /** Take a screenshot of the session as it is now. */
877
+ screenshot(): Promise<BrowserShot>;
878
+ /**
879
+ * Hand the controls to a person, or take them back (optional).
880
+ *
881
+ * This is the seam a human-in-the-loop browsing flow is built on: the agent
882
+ * stops driving, a person finishes the step that needed them — a login, a
883
+ * consent screen, a CAPTCHA — and the agent resumes on the page they left.
884
+ * Absent on a backend with no such notion; feature-detect before offering it.
885
+ */
886
+ handControlTo?(driver: BrowserDriver): Promise<void>;
887
+ /**
888
+ * Release the session.
889
+ *
890
+ * Must tolerate a session the far side already reaped — an idle timeout is
891
+ * the reality on every managed backend, and a stop on a dead session is a
892
+ * no-op, not an error.
893
+ */
894
+ stop(): Promise<void>;
895
+ }
814
896
  export interface CodeRunner {
815
897
  /** Stable id — reported on every `agentfootprint.tools.session_*` event so a
816
898
  * row names its backend, not just its tool. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/adapters/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAsHH;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAwB,MAAM,CAAC,MAAM,CAAC;IAC5E,MAAM;IACN,WAAW;CACZ,CAAC,CAAC;AAqsBH;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAsC,EACtC,UAAgC;IAEhC,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,IAAI,UAAU,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC5C,OAAO,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;AACxD,CAAC;AAqDD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAgGpD;uDACuD;AACvD,MAAM,UAAU,kBAAkB,CAChC,OAAoB;IAEpB,OAAO,OAAO,OAAO,CAAC,WAAW,KAAK,UAAU,CAAC;AACnD,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/adapters/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAsHH;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAwB,MAAM,CAAC,MAAM,CAAC;IAC5E,MAAM;IACN,WAAW;CACZ,CAAC,CAAC;AAqsBH;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAsC,EACtC,UAAgC;IAEhC,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,IAAI,UAAU,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC5C,OAAO,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;AACxD,CAAC;AAqID;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAgGpD;uDACuD;AACvD,MAAM,UAAU,kBAAkB,CAChC,OAAoB;IAEpB,OAAO,OAAO,OAAO,CAAC,WAAW,KAAK,UAAU,CAAC;AACnD,CAAC"}
@@ -30,4 +30,5 @@ export * from '../embedders/index.js';
30
30
  export * from '../tool-providers/index.js';
31
31
  export * from '../thinking/index.js';
32
32
  export { localCodeRunner, type LocalCodeRunnerOptions } from '../adapters/code/local.js';
33
+ export { agentCoreBrowser, AWS_SYSTEM_BROWSER, type AgentCoreBrowserOptions, type AgentCoreBrowserClientLike, type BedrockAgentCoreBrowserSdkModule, } from '../adapters/browser/agentcore.js';
33
34
  export { agentCoreCodeRunner, type AgentCoreCodeRunnerOptions, type AgentCoreCodeClientLike, type AgentCoreInvokeAnswer, type BedrockAgentCoreCodeSdkModule, } from '../adapters/code/agentcore.js';
@@ -33,5 +33,9 @@ export * from '../thinking/index.js';
33
33
  // types themselves live on the main barrel with `codeRunnerTool`, alongside the
34
34
  // other adapter ports.
35
35
  export { localCodeRunner } from '../adapters/code/local.js';
36
+ // A managed browser behind the `BrowserRunner` port (9.68.0). Page work goes
37
+ // over CDP through `session.automationEndpoint`; what this carries is the
38
+ // session, the OS-level input above the page, and the human takeover.
39
+ export { agentCoreBrowser, AWS_SYSTEM_BROWSER, } from '../adapters/browser/agentcore.js';
36
40
  export { agentCoreCodeRunner, } from '../adapters/code/agentcore.js';
37
41
  //# sourceMappingURL=providers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"providers.js","sourceRoot":"","sources":["../../../src/doors/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AAErC,6EAA6E;AAC7E,gFAAgF;AAChF,uBAAuB;AACvB,OAAO,EAAE,eAAe,EAA+B,MAAM,2BAA2B,CAAC;AACzF,OAAO,EACL,mBAAmB,GAKpB,MAAM,+BAA+B,CAAC"}
1
+ {"version":3,"file":"providers.js","sourceRoot":"","sources":["../../../src/doors/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AAErC,6EAA6E;AAC7E,gFAAgF;AAChF,uBAAuB;AACvB,OAAO,EAAE,eAAe,EAA+B,MAAM,2BAA2B,CAAC;AACzF,6EAA6E;AAC7E,0EAA0E;AAC1E,sEAAsE;AACtE,OAAO,EACL,gBAAgB,EAChB,kBAAkB,GAInB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,mBAAmB,GAKpB,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,142 @@
1
+ /**
2
+ * agentCoreBrowser — AWS Bedrock AgentCore **Browser** as a {@link BrowserRunner}.
3
+ *
4
+ * A managed Chrome in AWS's account that an agent can drive, a person can watch
5
+ * live, and — the part this adapter exists for — a person can TAKE OVER
6
+ * mid-session and hand back.
7
+ *
8
+ * ── Two channels, and only one of them is here ───────────────────────────────
9
+ * A browser session has two doors, and confusing them wastes a day:
10
+ *
11
+ * 1. **The automation stream** — a CDP WebSocket. Navigate, find an element,
12
+ * fill a form: everything page-shaped happens here, driven by Playwright
13
+ * or another CDP client. This adapter hands you
14
+ * {@link BrowserSession.automationEndpoint} and stays out of the way. It
15
+ * does not depend on Playwright and does not drive the page for you.
16
+ * 2. **`InvokeBrowser`** — the data-plane operation this adapter calls. It is
17
+ * OS-LEVEL input ABOVE the page: mouse, keyboard, screenshots. Its action
18
+ * union, read off the SDK rather than remembered, is exactly
19
+ * `mouseClick | mouseMove | mouseDrag | mouseScroll | keyType | keyPress |
20
+ * keyShortcut | screenshot`. **There is no navigate action**, and a reader
21
+ * expecting one is looking at the wrong door.
22
+ *
23
+ * ── The takeover ─────────────────────────────────────────────────────────────
24
+ * `UpdateBrowserStream` with `automationStreamUpdate.streamStatus` set to
25
+ * `DISABLED` stops the automation channel and leaves the live-view user in
26
+ * control; `ENABLED` gives it back. That is `handControlTo('person' | 'agent')`
27
+ * here, and it composes with this library's check-in: the agent pauses, a
28
+ * person finishes the login, the agent resumes on the page they left — and both
29
+ * handovers are ordinary events in the trace.
30
+ *
31
+ * ── How this talks to the SDK (the 9.4.0 law) ────────────────────────────────
32
+ * Through `client.send(new SomeCommand(input))`, never a method on the client —
33
+ * a bare `@aws-sdk/client-*` Client carries `send` and `destroy` and nothing
34
+ * else. Every command name and request shape below was read off a real install
35
+ * of `@aws-sdk/client-bedrock-agentcore` **3.1118.0**, including the action
36
+ * union above and `ScreenshotResult`'s `{ status, error?, data? }`.
37
+ *
38
+ * ── One documented contradiction, left as AWS wrote it ───────────────────────
39
+ * The devguide says a session defaults to 15 minutes; `StartBrowserSession`'s
40
+ * API reference says 3600 seconds. This adapter sends nothing unless you pass
41
+ * `sessionTimeoutSeconds`, so the default is whatever the service applies —
42
+ * rather than this file picking a side in somebody else's disagreement.
43
+ *
44
+ * Pattern: Adapter (GoF) + lazy peer-dep load — the SDK is required only when
45
+ * `start()` first runs, or never, if you inject `_client` / `_sdk`.
46
+ */
47
+ import type { BrowserRunner } from '../types.js';
48
+ /** AWS's managed browser. A custom `CreateBrowser` resource id goes here instead. */
49
+ export declare const AWS_SYSTEM_BROWSER = "aws.browser.v1";
50
+ export interface AgentCoreBrowserOptions {
51
+ /** AWS region. Falls back to the SDK's own resolution when omitted. */
52
+ readonly region?: string;
53
+ /** Which browser resource. Default {@link AWS_SYSTEM_BROWSER}. */
54
+ readonly browserIdentifier?: string;
55
+ /**
56
+ * Session lifetime in seconds. **Left unset by default on purpose** — AWS's
57
+ * own devguide (15 minutes) and API reference (3600 seconds) disagree, so
58
+ * sending nothing lets the service apply whichever it actually means.
59
+ */
60
+ readonly sessionTimeoutSeconds?: number;
61
+ /** Viewport for the session, when you want one that is not the default. */
62
+ readonly viewport?: {
63
+ readonly width: number;
64
+ readonly height: number;
65
+ };
66
+ /** Stable runner id (default `'agentcore-browser'`). */
67
+ readonly id?: string;
68
+ /** Test seam — inject a client implementing {@link AgentCoreBrowserClientLike}. */
69
+ readonly _client?: AgentCoreBrowserClientLike;
70
+ /** @internal Test injection — the AWS SDK module. */
71
+ readonly _sdk?: BedrockAgentCoreBrowserSdkModule;
72
+ }
73
+ /** The operation-semantic surface this adapter calls. */
74
+ export interface AgentCoreBrowserClientLike {
75
+ startBrowserSession(input: {
76
+ readonly browserIdentifier: string;
77
+ readonly name?: string;
78
+ readonly sessionTimeoutSeconds?: number;
79
+ readonly viewPort?: {
80
+ readonly width: number;
81
+ readonly height: number;
82
+ };
83
+ }): Promise<{
84
+ readonly sessionId?: string;
85
+ readonly streams?: {
86
+ readonly automationStream?: {
87
+ readonly streamEndpoint?: string;
88
+ };
89
+ readonly liveViewStream?: {
90
+ readonly streamEndpoint?: string;
91
+ };
92
+ };
93
+ }>;
94
+ invokeBrowser(input: {
95
+ readonly browserIdentifier: string;
96
+ readonly sessionId: string;
97
+ readonly action: Readonly<Record<string, unknown>>;
98
+ }): Promise<{
99
+ readonly result?: Readonly<Record<string, unknown>>;
100
+ }>;
101
+ updateBrowserStream(input: {
102
+ readonly browserIdentifier: string;
103
+ readonly sessionId: string;
104
+ readonly streamUpdate: {
105
+ readonly automationStreamUpdate: {
106
+ readonly streamStatus: 'ENABLED' | 'DISABLED';
107
+ };
108
+ };
109
+ }): Promise<void>;
110
+ stopBrowserSession(input: {
111
+ readonly browserIdentifier: string;
112
+ readonly sessionId: string;
113
+ }): Promise<void>;
114
+ }
115
+ /** The slice of `@aws-sdk/client-bedrock-agentcore` this shim touches. */
116
+ export interface BedrockAgentCoreBrowserSdkModule {
117
+ readonly BedrockAgentCoreClient?: new (config: {
118
+ region?: string;
119
+ }) => {
120
+ send(cmd: unknown): Promise<unknown>;
121
+ };
122
+ readonly StartBrowserSessionCommand?: new (input: unknown) => unknown;
123
+ readonly InvokeBrowserCommand?: new (input: unknown) => unknown;
124
+ readonly UpdateBrowserStreamCommand?: new (input: unknown) => unknown;
125
+ readonly StopBrowserSessionCommand?: new (input: unknown) => unknown;
126
+ }
127
+ /**
128
+ * Build a {@link BrowserRunner} backed by AgentCore Browser.
129
+ *
130
+ * @example A session, a person taking over, and the agent resuming
131
+ * const browser = agentCoreBrowser({ region: 'us-east-1' });
132
+ * const session = await browser.start({ key: toolSessionKey(ctx, 'run') });
133
+ *
134
+ * // Page work goes over CDP, not through this adapter:
135
+ * // const page = await chromium.connectOverCDP(session.automationEndpoint!)
136
+ *
137
+ * await session.handControlTo?.('person'); // they finish the login
138
+ * await session.handControlTo?.('agent'); // and the agent carries on
139
+ * await session.stop();
140
+ */
141
+ export declare function agentCoreBrowser(options?: AgentCoreBrowserOptions): BrowserRunner;
142
+ //# sourceMappingURL=agentcore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentcore.d.ts","sourceRoot":"","sources":["../../../../src/adapters/browser/agentcore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,KAAK,EAAiB,aAAa,EAA+B,MAAM,aAAa,CAAC;AAG7F,qFAAqF;AACrF,eAAO,MAAM,kBAA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AoB,CAAC,EAAE,KAAK,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IAChE,QAAQ,CAAC,0BAA0B,CAAC,EAAE,KAAK,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IACtE,QAAQ,CAAC,yBAAyB,CAAC,EAAE,KAAK,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CACtE;AA+DD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,uBAA4B,GAAG,aAAa,CA4GrF"}
@@ -811,6 +811,88 @@ export interface PricingTable {
811
811
  *
812
812
  * Implement it for your own backend; ship it to `codeRunnerTool({ runner })`.
813
813
  */
814
+ /** One screenshot a browser session took. */
815
+ export interface BrowserShot {
816
+ /** Image bytes. */
817
+ readonly data: Uint8Array;
818
+ /** Image format, lower-case (`'png'`). */
819
+ readonly format: string;
820
+ }
821
+ /** Who is driving a browser session right now. */
822
+ export type BrowserDriver = 'agent' | 'person';
823
+ /**
824
+ * A browser an agent can drive — the PORT (9.68.0).
825
+ *
826
+ * Deliberately small, and deliberately not a browser automation API. Page-level
827
+ * work (navigate, find an element, fill a form) is what CDP and Playwright
828
+ * already do far better than any interface here would; a session exposes
829
+ * {@link BrowserSession.automationEndpoint} so those attach directly. What this
830
+ * port carries is what an automation library CANNOT do on its own: open and
831
+ * release a managed session, reach the operating system above the page, and —
832
+ * the one that matters — hand the controls to a person and take them back.
833
+ */
834
+ export interface BrowserRunner {
835
+ /** Stable id — reported on every tool-session event, so a row names its backend. */
836
+ readonly id: string;
837
+ /**
838
+ * Open a session.
839
+ *
840
+ * `key` is the ISOLATION key the caller derived. An adapter may use it to
841
+ * name the remote session; it must never widen it.
842
+ */
843
+ start(req: {
844
+ readonly key: string;
845
+ readonly signal?: AbortSignal;
846
+ }): Promise<BrowserSession>;
847
+ }
848
+ /** One open browser session. */
849
+ export interface BrowserSession {
850
+ /** The backend's own id for this session. */
851
+ readonly id: string;
852
+ /**
853
+ * Where an automation client attaches — a CDP WebSocket, for Playwright and
854
+ * friends. Absent on a backend that offers no such channel.
855
+ *
856
+ * This library does not drive the page for you and does not depend on
857
+ * Playwright; it hands you the endpoint and stays out of the way.
858
+ */
859
+ readonly automationEndpoint?: string;
860
+ /** Where a PERSON can watch this session, when the backend offers a view. */
861
+ readonly liveViewEndpoint?: string;
862
+ /** Click at a point, in the operating system rather than in the page. */
863
+ click(req: {
864
+ readonly x: number;
865
+ readonly y: number;
866
+ readonly button?: 'left' | 'middle' | 'right';
867
+ readonly clicks?: number;
868
+ }): Promise<void>;
869
+ /** Type text, as a keyboard would. */
870
+ type(text: string): Promise<void>;
871
+ /** Press a named key, optionally more than once. */
872
+ press(req: {
873
+ readonly key: string;
874
+ readonly times?: number;
875
+ }): Promise<void>;
876
+ /** Take a screenshot of the session as it is now. */
877
+ screenshot(): Promise<BrowserShot>;
878
+ /**
879
+ * Hand the controls to a person, or take them back (optional).
880
+ *
881
+ * This is the seam a human-in-the-loop browsing flow is built on: the agent
882
+ * stops driving, a person finishes the step that needed them — a login, a
883
+ * consent screen, a CAPTCHA — and the agent resumes on the page they left.
884
+ * Absent on a backend with no such notion; feature-detect before offering it.
885
+ */
886
+ handControlTo?(driver: BrowserDriver): Promise<void>;
887
+ /**
888
+ * Release the session.
889
+ *
890
+ * Must tolerate a session the far side already reaped — an idle timeout is
891
+ * the reality on every managed backend, and a stop on a dead session is a
892
+ * no-op, not an error.
893
+ */
894
+ stop(): Promise<void>;
895
+ }
814
896
  export interface CodeRunner {
815
897
  /** Stable id — reported on every `agentfootprint.tools.session_*` event so a
816
898
  * row names its backend, not just its tool. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/adapters/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM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@ -30,5 +30,6 @@ export * from '../embedders/index.js';
30
30
  export * from '../tool-providers/index.js';
31
31
  export * from '../thinking/index.js';
32
32
  export { localCodeRunner, type LocalCodeRunnerOptions } from '../adapters/code/local.js';
33
+ export { agentCoreBrowser, AWS_SYSTEM_BROWSER, type AgentCoreBrowserOptions, type AgentCoreBrowserClientLike, type BedrockAgentCoreBrowserSdkModule, } from '../adapters/browser/agentcore.js';
33
34
  export { agentCoreCodeRunner, type AgentCoreCodeRunnerOptions, type AgentCoreCodeClientLike, type AgentCoreInvokeAnswer, type BedrockAgentCoreCodeSdkModule, } from '../adapters/code/agentcore.js';
34
35
  //# sourceMappingURL=providers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../src/doors/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AAKrC,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACzF,OAAO,EACL,mBAAmB,EACnB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,GACnC,MAAM,+BAA+B,CAAC"}
1
+ {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../src/doors/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AAKrC,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAIzF,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,GACtC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,mBAAmB,EACnB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,GACnC,MAAM,+BAA+B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentfootprint",
3
- "version": "9.68.0",
3
+ "version": "9.69.0",
4
4
  "description": "The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",