@useago/sdk 1.13.0 → 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.
Files changed (37) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/angular.cjs +1 -1
  3. package/dist/angular.d.cts +43 -10
  4. package/dist/angular.d.ts +43 -10
  5. package/dist/angular.js +4 -4
  6. package/dist/autoContinue-C3UsCvT5.cjs +1 -0
  7. package/dist/{autoContinue-CC8K9mBU.js → autoContinue-Cb4_iEbO.js} +1 -1
  8. package/dist/{createConversationSession-CiOXKWl0.cjs → createConversationSession-Digvn0GQ.cjs} +1 -1
  9. package/dist/{createConversationSession-BfJg0WyA.js → createConversationSession-DrmOaZdO.js} +1 -1
  10. package/dist/{createFormCollector-DnQl77Ko.cjs → createFormCollector-Cq7HWjtU.cjs} +1 -1
  11. package/dist/{createFormCollector-DN1xjAv5.js → createFormCollector-ki_GTlp9.js} +1 -1
  12. package/dist/devtools.d.cts +34 -5
  13. package/dist/devtools.d.ts +34 -5
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.d.cts +34 -5
  16. package/dist/index.d.ts +34 -5
  17. package/dist/index.js +4 -4
  18. package/dist/react.cjs +3 -3
  19. package/dist/react.d.cts +40 -6
  20. package/dist/react.d.ts +40 -6
  21. package/dist/react.js +290 -284
  22. package/dist/testing.d.cts +34 -5
  23. package/dist/testing.d.ts +34 -5
  24. package/dist/{types-Q7t1peH-.js → types-D1ZrqVhr.js} +884 -776
  25. package/dist/types-DNr6XEwI.cjs +10 -0
  26. package/dist/vue.cjs +1 -1
  27. package/dist/vue.d.cts +38 -7
  28. package/dist/vue.d.ts +38 -7
  29. package/dist/vue.js +57 -57
  30. package/dist/widget.cjs +6 -6
  31. package/dist/widget.d.cts +34 -5
  32. package/dist/widget.d.ts +34 -5
  33. package/dist/widget.js +136 -136
  34. package/llms-full.txt +56 -3
  35. package/package.json +1 -1
  36. package/dist/autoContinue-CP9pJR-V.cjs +0 -1
  37. package/dist/types-a7teDBnC.cjs +0 -10
package/dist/widget.d.cts CHANGED
@@ -58,6 +58,8 @@ declare class AgoClient {
58
58
  private config;
59
59
  /** Conversations already warned about an empty reply (one warning each). */
60
60
  private warnedEmptyConversations;
61
+ /** Client functions the backend has accepted from a WebMCP call report. */
62
+ private declaredExternally;
61
63
  /** Whether the placeholder-mode page-data warning has already been logged. */
62
64
  private warnedPageDataPlaceholder;
63
65
  /** `readPageData` companions this SDK registered, so cleanup only removes its own. */
@@ -94,6 +96,8 @@ declare class AgoClient {
94
96
  proactive: ProactiveController | null;
95
97
  /** Removes the mirrored WebMCP tools; `null` when the bridge is off. */
96
98
  private detachWebMCP;
99
+ /** The `listPages` companion is live. */
100
+ private listPagesRegistered;
97
101
  constructor(config: AgoConfig);
98
102
  private attachWebMCPBridge;
99
103
  /**
@@ -208,6 +212,11 @@ declare class AgoClient {
208
212
  */
209
213
  rejectFunction(invocationId: string): Promise<void>;
210
214
  /* Excluded from this release type: runExternalFunction */
215
+ /**
216
+ * Best-effort analytics for one WebMCP call. No agent: the caller is someone
217
+ * else's agent and cannot be known from `execute`.
218
+ */
219
+ private reportExternalCall;
211
220
  /**
212
221
  * Get a page of conversations, newest-first. `pageSize` is capped at 100 by
213
222
  * the backend (default 50). Returns the `{ data, has_more, total }` envelope
@@ -402,14 +411,15 @@ declare class AgoClient {
402
411
  * page of an entity. Flat arguments only: nested object parameters are not
403
412
  * reliably rendered to the model, so placeholders must not be named `page`.
404
413
  *
414
+ * For a large table, `{ catalogue: "onDemand" }` moves the route descriptions
415
+ * into a read-only `listPages` companion, leaving only the page names in the
416
+ * per-message schema. Routes may carry a `section` to group that companion.
417
+ *
405
418
  * @param navigate - A callback that performs the navigation (e.g. react-router's navigate)
406
419
  * @param routes - Map of route names to paths, with descriptions for the LLM
420
+ * @param opts - Where the catalogue lives; `"inline"` by default
407
421
  */
408
- registerNavigationFunction(navigate: (path: string) => void, routes: Array<{
409
- name: string;
410
- path: string;
411
- description: string;
412
- }>): void;
422
+ registerNavigationFunction(navigate: (path: string) => void, routes: NavRoute[], opts?: AgoNavigationOptions): void;
413
423
  /**
414
424
  * Unregister the navigation function and its `current-page` context provider.
415
425
  */
@@ -904,6 +914,16 @@ declare interface AgoMessage {
904
914
  createdAt: Date;
905
915
  }
906
916
 
917
+ /**
918
+ * Where the route catalogue lives: `"inline"` (default) in `navigateToPage`'s
919
+ * description, or `"onDemand"` in a `listPages` companion's result.
920
+ */
921
+ declare type AgoNavigationOptions = {
922
+ catalogue?: "inline";
923
+ } | {
924
+ catalogue: "onDemand";
925
+ };
926
+
907
927
  /**
908
928
  * What the page currently displays, returned to the agent as the *result* of
909
929
  * `setPageState` instead of only as context on the next message.
@@ -1994,6 +2014,15 @@ export declare interface MountChatWidgetOptions {
1994
2014
  }) => void;
1995
2015
  }
1996
2016
 
2017
+ /** A navigable page. `path` may carry `:param` placeholders. */
2018
+ declare interface NavRoute {
2019
+ name: string;
2020
+ path: string;
2021
+ description: string;
2022
+ /** Only read under `catalogue: "onDemand"`. */
2023
+ section?: string;
2024
+ }
2025
+
1997
2026
  /**
1998
2027
  * Optional action attached to a nudge. Accepting a `functionName` action
1999
2028
  * executes the registered client function (same `FunctionRegistry` path as
package/dist/widget.d.ts CHANGED
@@ -58,6 +58,8 @@ declare class AgoClient {
58
58
  private config;
59
59
  /** Conversations already warned about an empty reply (one warning each). */
60
60
  private warnedEmptyConversations;
61
+ /** Client functions the backend has accepted from a WebMCP call report. */
62
+ private declaredExternally;
61
63
  /** Whether the placeholder-mode page-data warning has already been logged. */
62
64
  private warnedPageDataPlaceholder;
63
65
  /** `readPageData` companions this SDK registered, so cleanup only removes its own. */
@@ -94,6 +96,8 @@ declare class AgoClient {
94
96
  proactive: ProactiveController | null;
95
97
  /** Removes the mirrored WebMCP tools; `null` when the bridge is off. */
96
98
  private detachWebMCP;
99
+ /** The `listPages` companion is live. */
100
+ private listPagesRegistered;
97
101
  constructor(config: AgoConfig);
98
102
  private attachWebMCPBridge;
99
103
  /**
@@ -208,6 +212,11 @@ declare class AgoClient {
208
212
  */
209
213
  rejectFunction(invocationId: string): Promise<void>;
210
214
  /* Excluded from this release type: runExternalFunction */
215
+ /**
216
+ * Best-effort analytics for one WebMCP call. No agent: the caller is someone
217
+ * else's agent and cannot be known from `execute`.
218
+ */
219
+ private reportExternalCall;
211
220
  /**
212
221
  * Get a page of conversations, newest-first. `pageSize` is capped at 100 by
213
222
  * the backend (default 50). Returns the `{ data, has_more, total }` envelope
@@ -402,14 +411,15 @@ declare class AgoClient {
402
411
  * page of an entity. Flat arguments only: nested object parameters are not
403
412
  * reliably rendered to the model, so placeholders must not be named `page`.
404
413
  *
414
+ * For a large table, `{ catalogue: "onDemand" }` moves the route descriptions
415
+ * into a read-only `listPages` companion, leaving only the page names in the
416
+ * per-message schema. Routes may carry a `section` to group that companion.
417
+ *
405
418
  * @param navigate - A callback that performs the navigation (e.g. react-router's navigate)
406
419
  * @param routes - Map of route names to paths, with descriptions for the LLM
420
+ * @param opts - Where the catalogue lives; `"inline"` by default
407
421
  */
408
- registerNavigationFunction(navigate: (path: string) => void, routes: Array<{
409
- name: string;
410
- path: string;
411
- description: string;
412
- }>): void;
422
+ registerNavigationFunction(navigate: (path: string) => void, routes: NavRoute[], opts?: AgoNavigationOptions): void;
413
423
  /**
414
424
  * Unregister the navigation function and its `current-page` context provider.
415
425
  */
@@ -904,6 +914,16 @@ declare interface AgoMessage {
904
914
  createdAt: Date;
905
915
  }
906
916
 
917
+ /**
918
+ * Where the route catalogue lives: `"inline"` (default) in `navigateToPage`'s
919
+ * description, or `"onDemand"` in a `listPages` companion's result.
920
+ */
921
+ declare type AgoNavigationOptions = {
922
+ catalogue?: "inline";
923
+ } | {
924
+ catalogue: "onDemand";
925
+ };
926
+
907
927
  /**
908
928
  * What the page currently displays, returned to the agent as the *result* of
909
929
  * `setPageState` instead of only as context on the next message.
@@ -1994,6 +2014,15 @@ export declare interface MountChatWidgetOptions {
1994
2014
  }) => void;
1995
2015
  }
1996
2016
 
2017
+ /** A navigable page. `path` may carry `:param` placeholders. */
2018
+ declare interface NavRoute {
2019
+ name: string;
2020
+ path: string;
2021
+ description: string;
2022
+ /** Only read under `catalogue: "onDemand"`. */
2023
+ section?: string;
2024
+ }
2025
+
1997
2026
  /**
1998
2027
  * Optional action attached to a nudge. Accepting a `functionName` action
1999
2028
  * executes the registered client function (same `FunctionRegistry` path as