gleap 16.2.2 → 16.2.3
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/build/browser/index.js +1 -1
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.js +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.mjs +1 -1
- package/build/esm/index.mjs.map +1 -1
- package/index.d.ts +20 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -65,6 +65,10 @@ export namespace Gleap {
|
|
|
65
65
|
function startNetworkLogger(): void;
|
|
66
66
|
function setNetworkLogsBlacklist(networkLogBlacklist: string[]): void;
|
|
67
67
|
function setNetworkLogPropsToIgnore(filters: string[]): void;
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated Use registerAgentTool(name, handler) with a dashboard-defined
|
|
70
|
+
* Frontend tool instead.
|
|
71
|
+
*/
|
|
68
72
|
function registerAgentToolAction(
|
|
69
73
|
callback: (toolAction: {
|
|
70
74
|
name: string;
|
|
@@ -74,6 +78,18 @@ export namespace Gleap {
|
|
|
74
78
|
toolCallId: string;
|
|
75
79
|
}) => void
|
|
76
80
|
): void;
|
|
81
|
+
/**
|
|
82
|
+
* Register the handler for a Frontend tool defined on an AI agent in the
|
|
83
|
+
* Gleap dashboard. The agent calls the handler with the configured
|
|
84
|
+
* parameters and waits for its return value (string or JSON — JSON is
|
|
85
|
+
* stringified). Thrown errors are caught and reported back to the AI.
|
|
86
|
+
*/
|
|
87
|
+
function registerAgentTool(
|
|
88
|
+
name: string,
|
|
89
|
+
handler: (
|
|
90
|
+
params: Record<string, any>
|
|
91
|
+
) => string | object | Promise<string | object>
|
|
92
|
+
): void;
|
|
77
93
|
function registerCustomAction(
|
|
78
94
|
customAction: (action: { name: string }) => void
|
|
79
95
|
): void;
|
|
@@ -100,6 +116,10 @@ export namespace Gleap {
|
|
|
100
116
|
function enableShortcuts(enabled: boolean): void;
|
|
101
117
|
function setLanguage(language: string): void;
|
|
102
118
|
function preFillForm(data: object): void;
|
|
119
|
+
/**
|
|
120
|
+
* @deprecated Define Frontend tools on your AI agent in the Gleap dashboard
|
|
121
|
+
* and register their handlers via registerAgentTool(name, handler) instead.
|
|
122
|
+
*/
|
|
103
123
|
function setAiTools(tools: {
|
|
104
124
|
name: string;
|
|
105
125
|
description: string;
|