@useago/sdk 1.13.2 → 1.14.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.
- package/CHANGELOG.md +24 -0
- package/dist/angular.cjs +1 -1
- package/dist/angular.d.cts +21 -4
- package/dist/angular.d.ts +21 -4
- package/dist/angular.js +1 -1
- package/dist/{createConversationSession-DrmOaZdO.js → createConversationSession-CybQdMpK.js} +1 -1
- package/dist/{createConversationSession-Digvn0GQ.cjs → createConversationSession-jwSXhTLe.cjs} +1 -1
- package/dist/createFormCollector-B_hSKcLd.cjs +1 -0
- package/dist/{createFormCollector-ki_GTlp9.js → createFormCollector-DJjms78E.js} +49 -47
- package/dist/devtools.d.cts +21 -4
- package/dist/devtools.d.ts +21 -4
- package/dist/helpers.d.cts +9 -4
- package/dist/helpers.d.ts +9 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +24 -4
- package/dist/index.d.ts +24 -4
- package/dist/index.js +42 -38
- package/dist/react.cjs +4 -4
- package/dist/react.d.cts +22 -5
- package/dist/react.d.ts +22 -5
- package/dist/react.js +901 -912
- package/dist/speechToText-BB25_zVM.cjs +7 -0
- package/dist/speechToText-BLvTis4S.js +1496 -0
- package/dist/testing.d.cts +21 -4
- package/dist/testing.d.ts +21 -4
- package/dist/{types-D1ZrqVhr.js → types-C39MJUE3.js} +284 -259
- package/dist/{types-DNr6XEwI.cjs → types-PGXnhAmQ.cjs} +7 -7
- package/dist/vue.cjs +1 -1
- package/dist/vue.d.cts +21 -4
- package/dist/vue.d.ts +21 -4
- package/dist/vue.js +1 -1
- package/dist/widget.cjs +5 -6
- package/dist/widget.d.cts +31 -8
- package/dist/widget.d.ts +31 -8
- package/dist/widget.js +1875 -1848
- package/llms-full.txt +43 -4
- package/package.json +1 -1
- package/dist/createFormCollector-Cq7HWjtU.cjs +0 -1
- package/dist/speechToText-BV7qxqPF.js +0 -704
- package/dist/speechToText-ZciRyyJE.cjs +0 -1
package/dist/widget.d.cts
CHANGED
|
@@ -245,6 +245,8 @@ declare class AgoClient {
|
|
|
245
245
|
* Show the returned text as a draft; call `sendMessage` when the user sends it.
|
|
246
246
|
*/
|
|
247
247
|
transcribeAudio(file: File, options?: TranscribeAudioOptions): Promise<AudioTranscription>;
|
|
248
|
+
/** The requested language, before UI fallback. */
|
|
249
|
+
getLanguage(): string | null;
|
|
248
250
|
/**
|
|
249
251
|
* The tenant's SDK configuration (`GET /api/sdk/v1/config`): per-permission
|
|
250
252
|
* agents, the ticket form the agent's `ago_ticketing` tool opens, and the
|
|
@@ -620,6 +622,9 @@ declare class AgoClient {
|
|
|
620
622
|
* SDK Events
|
|
621
623
|
*/
|
|
622
624
|
declare interface AgoClientEvents {
|
|
625
|
+
"config:changed": {
|
|
626
|
+
language: string | null;
|
|
627
|
+
};
|
|
623
628
|
/**
|
|
624
629
|
* The client-side context changed: a context entry or dynamic provider was
|
|
625
630
|
* added/removed, or a stateful helper (e.g. `createFormCollector`) updated its
|
|
@@ -729,6 +734,11 @@ declare interface AgoClientEvents {
|
|
|
729
734
|
result: unknown;
|
|
730
735
|
error?: string;
|
|
731
736
|
};
|
|
737
|
+
/** A validated form collector submission is about to call its submit target. */
|
|
738
|
+
"form:submitting": {
|
|
739
|
+
name: string;
|
|
740
|
+
values: Record<string, unknown>;
|
|
741
|
+
};
|
|
732
742
|
/**
|
|
733
743
|
* A form collector submitted successfully. `result` is the raw submit response
|
|
734
744
|
* (POST body / handler return value / backend relay result) — the third-party
|
|
@@ -1951,7 +1961,7 @@ export declare interface MountChatWidgetOptions {
|
|
|
1951
1961
|
* under each finished answer, and after a thumbs-down a small panel to say
|
|
1952
1962
|
* what went wrong (reason chips plus a free-text comment).
|
|
1953
1963
|
*
|
|
1954
|
-
* `true` turns it on with
|
|
1964
|
+
* `true` turns it on with localized labels. Pass an object to translate the
|
|
1955
1965
|
* strings, skip the "why" panel, or observe what was sent. Off by default.
|
|
1956
1966
|
*
|
|
1957
1967
|
* ```ts
|
|
@@ -1993,6 +2003,11 @@ export declare interface MountChatWidgetOptions {
|
|
|
1993
2003
|
id: string;
|
|
1994
2004
|
content: string;
|
|
1995
2005
|
}) => void;
|
|
2006
|
+
/** Called after validation, just before the form submission starts. */
|
|
2007
|
+
onFormSubmitting?: (data: {
|
|
2008
|
+
name: string;
|
|
2009
|
+
values: Record<string, unknown>;
|
|
2010
|
+
}) => void;
|
|
1996
2011
|
/**
|
|
1997
2012
|
* Called when a form collector submits successfully. `result` is the raw submit
|
|
1998
2013
|
* response (the third-party API's answer); `values` are the submitted fields.
|
|
@@ -2628,6 +2643,7 @@ declare interface SubmitToolCallResult {
|
|
|
2628
2643
|
|
|
2629
2644
|
/** A custom field of a ticket form. */
|
|
2630
2645
|
declare interface TicketField {
|
|
2646
|
+
prefillAliases?: string[];
|
|
2631
2647
|
id: string;
|
|
2632
2648
|
/** The key the ticketing backend expects; used as the submit key when set. */
|
|
2633
2649
|
externalId?: string;
|
|
@@ -2674,6 +2690,7 @@ declare interface TicketFieldOption {
|
|
|
2674
2690
|
|
|
2675
2691
|
/** The ticket form an agent's `ago_ticketing` tool opens in the conversation. */
|
|
2676
2692
|
declare interface TicketForm {
|
|
2693
|
+
embedDescription?: string;
|
|
2677
2694
|
id: string;
|
|
2678
2695
|
name?: string;
|
|
2679
2696
|
/** `"form"` renders the SDK's own fields; `"embed"` hosts third-party HTML. */
|
|
@@ -2721,9 +2738,8 @@ declare interface ToolCallData {
|
|
|
2721
2738
|
}
|
|
2722
2739
|
|
|
2723
2740
|
/**
|
|
2724
|
-
*
|
|
2725
|
-
*
|
|
2726
|
-
* through `toolCallForm.labels`.
|
|
2741
|
+
* Client-owned wording for the ticket form and its surrounding chrome.
|
|
2742
|
+
* Hosts can customize individual strings through `toolCallForm.labels`.
|
|
2727
2743
|
*/
|
|
2728
2744
|
export declare interface ToolCallFormLabels {
|
|
2729
2745
|
useFormToCreateTicket: string;
|
|
@@ -2763,6 +2779,8 @@ export declare interface ToolCallFormLabels {
|
|
|
2763
2779
|
submissionFailed: string;
|
|
2764
2780
|
submissionFailedDescription: string;
|
|
2765
2781
|
fileTooLarge: string;
|
|
2782
|
+
fileSize: string;
|
|
2783
|
+
removeFile: string;
|
|
2766
2784
|
permissionDenied: string;
|
|
2767
2785
|
validationFailed: string;
|
|
2768
2786
|
pleaseCheckFields: string;
|
|
@@ -2799,16 +2817,21 @@ declare interface TranscribeAudioOptions {
|
|
|
2799
2817
|
signal?: AbortSignal;
|
|
2800
2818
|
}
|
|
2801
2819
|
|
|
2802
|
-
/**
|
|
2820
|
+
/** Metadata for tools exposed through the WebMCP bridge. */
|
|
2803
2821
|
declare interface WebMCPToolMeta {
|
|
2804
2822
|
/**
|
|
2805
|
-
*
|
|
2806
|
-
*
|
|
2807
|
-
* carry third-party text.
|
|
2823
|
+
* Optional WebMCP metadata; all fields default to `false` in WebMCP.
|
|
2824
|
+
* These annotations do not affect AGO's in-app agent or approval behavior.
|
|
2808
2825
|
*/
|
|
2809
2826
|
annotations?: {
|
|
2827
|
+
/** The tool only reads data and does not change state. */
|
|
2810
2828
|
readOnlyHint?: boolean;
|
|
2829
|
+
/** The output contains content untrusted by the tool author. */
|
|
2811
2830
|
untrustedContentHint?: boolean;
|
|
2831
|
+
/** Significant, real-world, or irreversible effects; independent of requiresApproval. */
|
|
2832
|
+
consequentialHint?: boolean;
|
|
2833
|
+
/** Intended for debugging and developer tooling. */
|
|
2834
|
+
debugging?: boolean;
|
|
2812
2835
|
};
|
|
2813
2836
|
/**
|
|
2814
2837
|
* This function navigates. The WebMCP call is held open until the function
|
package/dist/widget.d.ts
CHANGED
|
@@ -245,6 +245,8 @@ declare class AgoClient {
|
|
|
245
245
|
* Show the returned text as a draft; call `sendMessage` when the user sends it.
|
|
246
246
|
*/
|
|
247
247
|
transcribeAudio(file: File, options?: TranscribeAudioOptions): Promise<AudioTranscription>;
|
|
248
|
+
/** The requested language, before UI fallback. */
|
|
249
|
+
getLanguage(): string | null;
|
|
248
250
|
/**
|
|
249
251
|
* The tenant's SDK configuration (`GET /api/sdk/v1/config`): per-permission
|
|
250
252
|
* agents, the ticket form the agent's `ago_ticketing` tool opens, and the
|
|
@@ -620,6 +622,9 @@ declare class AgoClient {
|
|
|
620
622
|
* SDK Events
|
|
621
623
|
*/
|
|
622
624
|
declare interface AgoClientEvents {
|
|
625
|
+
"config:changed": {
|
|
626
|
+
language: string | null;
|
|
627
|
+
};
|
|
623
628
|
/**
|
|
624
629
|
* The client-side context changed: a context entry or dynamic provider was
|
|
625
630
|
* added/removed, or a stateful helper (e.g. `createFormCollector`) updated its
|
|
@@ -729,6 +734,11 @@ declare interface AgoClientEvents {
|
|
|
729
734
|
result: unknown;
|
|
730
735
|
error?: string;
|
|
731
736
|
};
|
|
737
|
+
/** A validated form collector submission is about to call its submit target. */
|
|
738
|
+
"form:submitting": {
|
|
739
|
+
name: string;
|
|
740
|
+
values: Record<string, unknown>;
|
|
741
|
+
};
|
|
732
742
|
/**
|
|
733
743
|
* A form collector submitted successfully. `result` is the raw submit response
|
|
734
744
|
* (POST body / handler return value / backend relay result) — the third-party
|
|
@@ -1951,7 +1961,7 @@ export declare interface MountChatWidgetOptions {
|
|
|
1951
1961
|
* under each finished answer, and after a thumbs-down a small panel to say
|
|
1952
1962
|
* what went wrong (reason chips plus a free-text comment).
|
|
1953
1963
|
*
|
|
1954
|
-
* `true` turns it on with
|
|
1964
|
+
* `true` turns it on with localized labels. Pass an object to translate the
|
|
1955
1965
|
* strings, skip the "why" panel, or observe what was sent. Off by default.
|
|
1956
1966
|
*
|
|
1957
1967
|
* ```ts
|
|
@@ -1993,6 +2003,11 @@ export declare interface MountChatWidgetOptions {
|
|
|
1993
2003
|
id: string;
|
|
1994
2004
|
content: string;
|
|
1995
2005
|
}) => void;
|
|
2006
|
+
/** Called after validation, just before the form submission starts. */
|
|
2007
|
+
onFormSubmitting?: (data: {
|
|
2008
|
+
name: string;
|
|
2009
|
+
values: Record<string, unknown>;
|
|
2010
|
+
}) => void;
|
|
1996
2011
|
/**
|
|
1997
2012
|
* Called when a form collector submits successfully. `result` is the raw submit
|
|
1998
2013
|
* response (the third-party API's answer); `values` are the submitted fields.
|
|
@@ -2628,6 +2643,7 @@ declare interface SubmitToolCallResult {
|
|
|
2628
2643
|
|
|
2629
2644
|
/** A custom field of a ticket form. */
|
|
2630
2645
|
declare interface TicketField {
|
|
2646
|
+
prefillAliases?: string[];
|
|
2631
2647
|
id: string;
|
|
2632
2648
|
/** The key the ticketing backend expects; used as the submit key when set. */
|
|
2633
2649
|
externalId?: string;
|
|
@@ -2674,6 +2690,7 @@ declare interface TicketFieldOption {
|
|
|
2674
2690
|
|
|
2675
2691
|
/** The ticket form an agent's `ago_ticketing` tool opens in the conversation. */
|
|
2676
2692
|
declare interface TicketForm {
|
|
2693
|
+
embedDescription?: string;
|
|
2677
2694
|
id: string;
|
|
2678
2695
|
name?: string;
|
|
2679
2696
|
/** `"form"` renders the SDK's own fields; `"embed"` hosts third-party HTML. */
|
|
@@ -2721,9 +2738,8 @@ declare interface ToolCallData {
|
|
|
2721
2738
|
}
|
|
2722
2739
|
|
|
2723
2740
|
/**
|
|
2724
|
-
*
|
|
2725
|
-
*
|
|
2726
|
-
* through `toolCallForm.labels`.
|
|
2741
|
+
* Client-owned wording for the ticket form and its surrounding chrome.
|
|
2742
|
+
* Hosts can customize individual strings through `toolCallForm.labels`.
|
|
2727
2743
|
*/
|
|
2728
2744
|
export declare interface ToolCallFormLabels {
|
|
2729
2745
|
useFormToCreateTicket: string;
|
|
@@ -2763,6 +2779,8 @@ export declare interface ToolCallFormLabels {
|
|
|
2763
2779
|
submissionFailed: string;
|
|
2764
2780
|
submissionFailedDescription: string;
|
|
2765
2781
|
fileTooLarge: string;
|
|
2782
|
+
fileSize: string;
|
|
2783
|
+
removeFile: string;
|
|
2766
2784
|
permissionDenied: string;
|
|
2767
2785
|
validationFailed: string;
|
|
2768
2786
|
pleaseCheckFields: string;
|
|
@@ -2799,16 +2817,21 @@ declare interface TranscribeAudioOptions {
|
|
|
2799
2817
|
signal?: AbortSignal;
|
|
2800
2818
|
}
|
|
2801
2819
|
|
|
2802
|
-
/**
|
|
2820
|
+
/** Metadata for tools exposed through the WebMCP bridge. */
|
|
2803
2821
|
declare interface WebMCPToolMeta {
|
|
2804
2822
|
/**
|
|
2805
|
-
*
|
|
2806
|
-
*
|
|
2807
|
-
* carry third-party text.
|
|
2823
|
+
* Optional WebMCP metadata; all fields default to `false` in WebMCP.
|
|
2824
|
+
* These annotations do not affect AGO's in-app agent or approval behavior.
|
|
2808
2825
|
*/
|
|
2809
2826
|
annotations?: {
|
|
2827
|
+
/** The tool only reads data and does not change state. */
|
|
2810
2828
|
readOnlyHint?: boolean;
|
|
2829
|
+
/** The output contains content untrusted by the tool author. */
|
|
2811
2830
|
untrustedContentHint?: boolean;
|
|
2831
|
+
/** Significant, real-world, or irreversible effects; independent of requiresApproval. */
|
|
2832
|
+
consequentialHint?: boolean;
|
|
2833
|
+
/** Intended for debugging and developer tooling. */
|
|
2834
|
+
debugging?: boolean;
|
|
2812
2835
|
};
|
|
2813
2836
|
/**
|
|
2814
2837
|
* This function navigates. The WebMCP call is held open until the function
|