@useago/sdk 1.13.1 → 1.13.2

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/llms-full.txt CHANGED
@@ -1465,6 +1465,11 @@ This registers a `navigateToPage` function whose `page` parameter is an enum of
1465
1465
  your route names. React/Vue offer `useAgoNavigation(navigate, routes)` with
1466
1466
  lifecycle cleanup.
1467
1467
 
1468
+ Functions and page state can change with the route. The navigation tool
1469
+ instructs the agent to use the destination's functions for remaining actions.
1470
+ Use the [auto-continue helper](#navigate-then-change-the-page-in-one-go) to wait
1471
+ for destination page-state registration before continuing.
1472
+
1468
1473
  Paths can contain `:param` placeholders. Each placeholder becomes an explicit
1469
1474
  top-level argument of `navigateToPage` (`{ page: "orderDetail", id: "42" }`
1470
1475
  navigates to `/orders/42`), so one route covers every detail page of an entity.
@@ -1473,8 +1478,11 @@ and returns an error telling the agent what to retry with. Placeholders cannot
1473
1478
  be named `page` (that argument selects the route).
1474
1479
 
1475
1480
  It also registers a dynamic context entry ("Current page") that reports the page
1476
- the user is on (by route name, plus URL and title) on every message, so the agent
1477
- knows where it is after it navigates, not just how to navigate away. Call
1481
+ the user is on (by route name when matched, plus URL) on every message, so the
1482
+ agent knows where it is after it navigates, not just how to navigate away. It
1483
+ does not include `document.title`, which may describe a conversation instead of
1484
+ the application route. The separate opt-in `enableAutoPageContext()` feature
1485
+ still includes the URL and document title. Call
1478
1486
  `client.unregisterNavigationFunction()` to remove both the function and that
1479
1487
  context.
1480
1488
 
@@ -1496,7 +1504,8 @@ client.registerNavigationFunction(
1496
1504
  ```
1497
1505
 
1498
1506
  `navigateToPage` keeps the page names as its `page` enum, so a recognisable name
1499
- can still navigate in one call.
1507
+ can still navigate in one call. Both catalogue modes instruct the agent to use
1508
+ the destination page's functions and state to finish remaining requested actions.
1500
1509
 
1501
1510
  Give routes a `section` and `listPages` takes it as a required argument, so the
1502
1511
  agent asks for one group at a time and no single answer has to carry the whole
@@ -1564,6 +1573,12 @@ control names are rejected with the list of available controls. A value that
1564
1573
  matches the current `get()` value is skipped without calling `set()` and
1565
1574
  reported as `unchanged`.
1566
1575
 
1576
+ Empty enums are omitted from the advertised tool schema because providers
1577
+ reject them. Execution still rejects selections when no values are available.
1578
+ An empty array remains valid when only its item enum is empty, and a clearable
1579
+ string can still be cleared with `""`. Independent fields in the same request
1580
+ can still be applied.
1581
+
1567
1582
  React/Vue offer `useAgoPageState(controls, opts?)` with lifecycle cleanup;
1568
1583
  Angular exposes `agoService.registerPageStateFunction(...)`.
1569
1584
 
@@ -1704,7 +1719,8 @@ of reporting a diff, so a page switch never shows up as a spurious change.
1704
1719
  A request like "open the invoices page and show only the overdue ones" needs two
1705
1720
  steps: the agent navigates, then changes the new page's state. But the
1706
1721
  destination page only registers its `setPageState` (and current state) once it
1707
- mounts, so the agent can't do both in a single turn.
1722
+ mounts. Continuation must wait for that registration to use the new page's
1723
+ capabilities.
1708
1724
 
1709
1725
  `useAgoAutoContinueAfterNavigation()` closes the gap. Mount it once inside
1710
1726
  `AgoProvider`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useago/sdk",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "description": "Create In-APP AI agents that answers question and performs actions. Works with React, Vue, Angular and vanilla JS/TS.",
5
5
  "type": "module",
6
6
  "sideEffects": false,