@agent-native/core 0.157.28 → 0.158.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.
@@ -11,6 +11,7 @@ const CONTROL_ACTIONS = new Set([
11
11
  "type",
12
12
  "key",
13
13
  "navigate",
14
+ "open-tab",
14
15
  "scroll",
15
16
  ]);
16
17
  const BROWSER_KEYS = new Set([
@@ -142,7 +143,7 @@ function buildReadAction(args) {
142
143
  function buildControlAction(args) {
143
144
  const action = readString(args, "action");
144
145
  if (!action || (!CONTROL_ACTIONS.has(action) && action !== "stop")) {
145
- throw new Error("Control action must be attach, click, type, key, navigate, scroll, or stop");
146
+ throw new Error("Control action must be attach, click, type, key, navigate, open-tab, scroll, or stop");
146
147
  }
147
148
  if (action === "attach") {
148
149
  return {
@@ -201,6 +202,16 @@ function buildControlAction(args) {
201
202
  input: { url },
202
203
  };
203
204
  }
205
+ if (action === "open-tab") {
206
+ const url = readString(args, "url");
207
+ if (!url)
208
+ throw new Error("url is required");
209
+ return {
210
+ type: "browser.open-tab",
211
+ target: null,
212
+ input: { url },
213
+ };
214
+ }
204
215
  if (action === "scroll") {
205
216
  return {
206
217
  type: "browser.scroll",
@@ -388,7 +399,7 @@ export function createRemoteBrowserActionEntries(options) {
388
399
  timeoutMs: 30_000,
389
400
  needsApproval: (args) => args.action !== "stop",
390
401
  tool: {
391
- description: "Attach to and control a user-granted Chrome page. Attach once per conversation before observing or acting. Targets must come from the latest observation. Control actions require inline user approval.",
402
+ description: "Attach to and control a user-granted Chrome page. Attach once per conversation before observing or acting. Targets must come from the latest observation. The approved open-tab action creates an inactive same-origin tab and moves the lease without focusing Chrome. Control actions require inline user approval.",
392
403
  parameters: {
393
404
  type: "object",
394
405
  properties: {
@@ -401,6 +412,7 @@ export function createRemoteBrowserActionEntries(options) {
401
412
  "type",
402
413
  "key",
403
414
  "navigate",
415
+ "open-tab",
404
416
  "scroll",
405
417
  "stop",
406
418
  ],
@@ -15,6 +15,6 @@ export declare function createProgressHandler(): import("h3").EventHandlerWithFe
15
15
  error: string;
16
16
  ok?: undefined;
17
17
  } | {
18
- ok: boolean;
19
18
  error?: undefined;
19
+ ok: boolean;
20
20
  }>>;
@@ -48,8 +48,8 @@ export declare function handleUpdateResource(event: any): Promise<import("./stor
48
48
  }>;
49
49
  /** DELETE /_agent-native/resources/:id — delete a resource */
50
50
  export declare function handleDeleteResource(event: any): Promise<{
51
- error: string;
52
51
  ok?: undefined;
52
+ error: string;
53
53
  } | {
54
54
  error?: undefined;
55
55
  ok: boolean;
@@ -26,8 +26,8 @@ export declare function createRealtimeTokenHandler(): import("h3").EventHandlerW
26
26
  expiresAt?: undefined;
27
27
  ttlSeconds?: undefined;
28
28
  } | {
29
+ error?: undefined;
29
30
  token: string;
30
31
  expiresAt: string;
31
32
  ttlSeconds: number;
32
- error?: undefined;
33
33
  }>>;
@@ -20,6 +20,6 @@ export declare function createTranscribeVoiceHandler(): import("h3").EventHandle
20
20
  error: string;
21
21
  text?: undefined;
22
22
  } | {
23
- text: string;
24
23
  error?: undefined;
24
+ text: string;
25
25
  }>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.157.28",
3
+ "version": "0.158.0",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -425,8 +425,8 @@
425
425
  "y-protocols": "^1.0.7",
426
426
  "yjs": "^13.6.31",
427
427
  "zod": "^4.3.6",
428
- "@agent-native/recap-cli": "0.5.4",
429
- "@agent-native/toolkit": "^0.16.3"
428
+ "@agent-native/toolkit": "^0.16.3",
429
+ "@agent-native/recap-cli": "0.5.4"
430
430
  },
431
431
  "devDependencies": {
432
432
  "@ai-sdk/anthropic": "^3.0.71",