@gleanwork/api-client 0.5.1 → 0.5.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/README.md +15 -15
- package/dist/commonjs/funcs/clientAgentsList.d.ts +2 -2
- package/dist/commonjs/funcs/clientAgentsList.js +2 -2
- package/dist/commonjs/funcs/clientAgentsRetrieve.d.ts +2 -2
- package/dist/commonjs/funcs/clientAgentsRetrieve.js +2 -2
- package/dist/commonjs/funcs/clientAgentsRetrieveSchemas.d.ts +2 -2
- package/dist/commonjs/funcs/clientAgentsRetrieveSchemas.js +2 -2
- package/dist/commonjs/funcs/clientAgentsRun.d.ts +2 -2
- package/dist/commonjs/funcs/clientAgentsRun.js +2 -2
- package/dist/commonjs/funcs/clientAgentsRunStream.d.ts +2 -2
- package/dist/commonjs/funcs/clientAgentsRunStream.js +2 -2
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/agent.d.ts +16 -6
- package/dist/commonjs/models/components/agent.d.ts.map +1 -1
- package/dist/commonjs/models/components/agent.js.map +1 -1
- package/dist/commonjs/models/components/agentschemas.d.ts +4 -4
- package/dist/commonjs/models/components/searchagentsrequest.d.ts +1 -1
- package/dist/commonjs/models/components/workflow.d.ts +5 -5
- package/dist/commonjs/models/components/workflow.d.ts.map +1 -1
- package/dist/commonjs/models/components/workflow.js +2 -2
- package/dist/commonjs/models/components/workflow.js.map +1 -1
- package/dist/commonjs/react-query/clientAgentsList.d.ts +2 -2
- package/dist/commonjs/react-query/clientAgentsList.js +2 -2
- package/dist/commonjs/react-query/clientAgentsRetrieve.d.ts +4 -4
- package/dist/commonjs/react-query/clientAgentsRetrieve.js +4 -4
- package/dist/commonjs/react-query/clientAgentsRetrieveSchemas.d.ts +4 -4
- package/dist/commonjs/react-query/clientAgentsRetrieveSchemas.js +4 -4
- package/dist/commonjs/react-query/clientAgentsRun.d.ts +2 -2
- package/dist/commonjs/react-query/clientAgentsRun.js +2 -2
- package/dist/commonjs/react-query/clientAgentsRunStream.d.ts +2 -2
- package/dist/commonjs/react-query/clientAgentsRunStream.js +2 -2
- package/dist/commonjs/sdk/agents.d.ts +10 -10
- package/dist/commonjs/sdk/agents.js +10 -10
- package/dist/esm/funcs/clientAgentsList.d.ts +2 -2
- package/dist/esm/funcs/clientAgentsList.js +2 -2
- package/dist/esm/funcs/clientAgentsRetrieve.d.ts +2 -2
- package/dist/esm/funcs/clientAgentsRetrieve.js +2 -2
- package/dist/esm/funcs/clientAgentsRetrieveSchemas.d.ts +2 -2
- package/dist/esm/funcs/clientAgentsRetrieveSchemas.js +2 -2
- package/dist/esm/funcs/clientAgentsRun.d.ts +2 -2
- package/dist/esm/funcs/clientAgentsRun.js +2 -2
- package/dist/esm/funcs/clientAgentsRunStream.d.ts +2 -2
- package/dist/esm/funcs/clientAgentsRunStream.js +2 -2
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/agent.d.ts +16 -6
- package/dist/esm/models/components/agent.d.ts.map +1 -1
- package/dist/esm/models/components/agent.js.map +1 -1
- package/dist/esm/models/components/agentschemas.d.ts +4 -4
- package/dist/esm/models/components/searchagentsrequest.d.ts +1 -1
- package/dist/esm/models/components/workflow.d.ts +5 -5
- package/dist/esm/models/components/workflow.d.ts.map +1 -1
- package/dist/esm/models/components/workflow.js +2 -2
- package/dist/esm/models/components/workflow.js.map +1 -1
- package/dist/esm/react-query/clientAgentsList.d.ts +2 -2
- package/dist/esm/react-query/clientAgentsList.js +2 -2
- package/dist/esm/react-query/clientAgentsRetrieve.d.ts +4 -4
- package/dist/esm/react-query/clientAgentsRetrieve.js +4 -4
- package/dist/esm/react-query/clientAgentsRetrieveSchemas.d.ts +4 -4
- package/dist/esm/react-query/clientAgentsRetrieveSchemas.js +4 -4
- package/dist/esm/react-query/clientAgentsRun.d.ts +2 -2
- package/dist/esm/react-query/clientAgentsRun.js +2 -2
- package/dist/esm/react-query/clientAgentsRunStream.d.ts +2 -2
- package/dist/esm/react-query/clientAgentsRunStream.js +2 -2
- package/dist/esm/sdk/agents.d.ts +10 -10
- package/dist/esm/sdk/agents.js +10 -10
- package/docs/sdks/agents/README.md +16 -12
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/clientAgentsList.ts +2 -2
- package/src/funcs/clientAgentsRetrieve.ts +2 -2
- package/src/funcs/clientAgentsRetrieveSchemas.ts +2 -2
- package/src/funcs/clientAgentsRun.ts +2 -2
- package/src/funcs/clientAgentsRunStream.ts +2 -2
- package/src/lib/config.ts +2 -2
- package/src/models/components/agent.ts +16 -6
- package/src/models/components/agentschemas.ts +4 -4
- package/src/models/components/searchagentsrequest.ts +1 -1
- package/src/models/components/workflow.ts +7 -7
- package/src/react-query/clientAgentsList.ts +2 -2
- package/src/react-query/clientAgentsRetrieve.ts +4 -4
- package/src/react-query/clientAgentsRetrieveSchemas.ts +4 -4
- package/src/react-query/clientAgentsRun.ts +2 -2
- package/src/react-query/clientAgentsRunStream.ts +2 -2
- package/src/sdk/agents.ts +10 -10
|
@@ -7,10 +7,10 @@ import { combineSignals } from "../lib/primitives.js";
|
|
|
7
7
|
import { unwrapAsync } from "../types/fp.js";
|
|
8
8
|
import { useGleanContext } from "./_context.js";
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Retrieve an agent
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
|
-
*
|
|
13
|
+
* Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
14
14
|
*/
|
|
15
15
|
export function useClientAgentsRetrieve(agentId, timezoneOffset, options) {
|
|
16
16
|
const client = useGleanContext();
|
|
@@ -20,10 +20,10 @@ export function useClientAgentsRetrieve(agentId, timezoneOffset, options) {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Retrieve an agent
|
|
24
24
|
*
|
|
25
25
|
* @remarks
|
|
26
|
-
*
|
|
26
|
+
* Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
27
27
|
*/
|
|
28
28
|
export function useClientAgentsRetrieveSuspense(agentId, timezoneOffset, options) {
|
|
29
29
|
const client = useGleanContext();
|
|
@@ -5,17 +5,17 @@ import * as components from "../models/components/index.js";
|
|
|
5
5
|
import { QueryHookOptions, SuspenseQueryHookOptions, TupleToPrefixes } from "./_types.js";
|
|
6
6
|
export type ClientAgentsRetrieveSchemasQueryData = components.AgentSchemas;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* List an agent's schemas
|
|
9
9
|
*
|
|
10
10
|
* @remarks
|
|
11
|
-
*
|
|
11
|
+
* Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
|
|
12
12
|
*/
|
|
13
13
|
export declare function useClientAgentsRetrieveSchemas(agentId: string, timezoneOffset?: number | undefined, options?: QueryHookOptions<ClientAgentsRetrieveSchemasQueryData>): UseQueryResult<ClientAgentsRetrieveSchemasQueryData, Error>;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* List an agent's schemas
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
|
-
*
|
|
18
|
+
* Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
|
|
19
19
|
*/
|
|
20
20
|
export declare function useClientAgentsRetrieveSchemasSuspense(agentId: string, timezoneOffset?: number | undefined, options?: SuspenseQueryHookOptions<ClientAgentsRetrieveSchemasQueryData>): UseSuspenseQueryResult<ClientAgentsRetrieveSchemasQueryData, Error>;
|
|
21
21
|
export declare function prefetchClientAgentsRetrieveSchemas(queryClient: QueryClient, client$: GleanCore, agentId: string, timezoneOffset?: number | undefined): Promise<void>;
|
|
@@ -7,10 +7,10 @@ import { combineSignals } from "../lib/primitives.js";
|
|
|
7
7
|
import { unwrapAsync } from "../types/fp.js";
|
|
8
8
|
import { useGleanContext } from "./_context.js";
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* List an agent's schemas
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
|
-
*
|
|
13
|
+
* Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
|
|
14
14
|
*/
|
|
15
15
|
export function useClientAgentsRetrieveSchemas(agentId, timezoneOffset, options) {
|
|
16
16
|
const client = useGleanContext();
|
|
@@ -20,10 +20,10 @@ export function useClientAgentsRetrieveSchemas(agentId, timezoneOffset, options)
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* List an agent's schemas
|
|
24
24
|
*
|
|
25
25
|
* @remarks
|
|
26
|
-
*
|
|
26
|
+
* Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
|
|
27
27
|
*/
|
|
28
28
|
export function useClientAgentsRetrieveSchemasSuspense(agentId, timezoneOffset, options) {
|
|
29
29
|
const client = useGleanContext();
|
|
@@ -9,10 +9,10 @@ export type ClientAgentsRunMutationVariables = {
|
|
|
9
9
|
};
|
|
10
10
|
export type ClientAgentsRunMutationData = components.AgentRunWaitResponse;
|
|
11
11
|
/**
|
|
12
|
-
* Create
|
|
12
|
+
* Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
*
|
|
15
|
+
* Executes an agent run and returns the final response.
|
|
16
16
|
*/
|
|
17
17
|
export declare function useClientAgentsRunMutation(options?: MutationHookOptions<ClientAgentsRunMutationData, Error, ClientAgentsRunMutationVariables>): UseMutationResult<ClientAgentsRunMutationData, Error, ClientAgentsRunMutationVariables>;
|
|
18
18
|
export declare function mutationKeyClientAgentsRun(): MutationKey;
|
|
@@ -7,10 +7,10 @@ import { combineSignals } from "../lib/primitives.js";
|
|
|
7
7
|
import { unwrapAsync } from "../types/fp.js";
|
|
8
8
|
import { useGleanContext } from "./_context.js";
|
|
9
9
|
/**
|
|
10
|
-
* Create
|
|
10
|
+
* Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
|
-
*
|
|
13
|
+
* Executes an agent run and returns the final response.
|
|
14
14
|
*/
|
|
15
15
|
export function useClientAgentsRunMutation(options) {
|
|
16
16
|
const client = useGleanContext();
|
|
@@ -9,10 +9,10 @@ export type ClientAgentsRunStreamMutationVariables = {
|
|
|
9
9
|
};
|
|
10
10
|
export type ClientAgentsRunStreamMutationData = string;
|
|
11
11
|
/**
|
|
12
|
-
* Create
|
|
12
|
+
* Create an agent run and stream the response
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
*
|
|
15
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
16
16
|
*/
|
|
17
17
|
export declare function useClientAgentsRunStreamMutation(options?: MutationHookOptions<ClientAgentsRunStreamMutationData, Error, ClientAgentsRunStreamMutationVariables>): UseMutationResult<ClientAgentsRunStreamMutationData, Error, ClientAgentsRunStreamMutationVariables>;
|
|
18
18
|
export declare function mutationKeyClientAgentsRunStream(): MutationKey;
|
|
@@ -7,10 +7,10 @@ import { combineSignals } from "../lib/primitives.js";
|
|
|
7
7
|
import { unwrapAsync } from "../types/fp.js";
|
|
8
8
|
import { useGleanContext } from "./_context.js";
|
|
9
9
|
/**
|
|
10
|
-
* Create
|
|
10
|
+
* Create an agent run and stream the response
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
|
-
*
|
|
13
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
14
14
|
*/
|
|
15
15
|
export function useClientAgentsRunStreamMutation(options) {
|
|
16
16
|
const client = useGleanContext();
|
package/dist/esm/sdk/agents.d.ts
CHANGED
|
@@ -2,38 +2,38 @@ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
|
2
2
|
import * as components from "../models/components/index.js";
|
|
3
3
|
export declare class Agents extends ClientSDK {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Retrieve an agent
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
*
|
|
8
|
+
* Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
9
9
|
*/
|
|
10
10
|
retrieve(agentId: string, timezoneOffset?: number | undefined, options?: RequestOptions): Promise<components.Agent>;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* List an agent's schemas
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
*
|
|
15
|
+
* Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
|
|
16
16
|
*/
|
|
17
17
|
retrieveSchemas(agentId: string, timezoneOffset?: number | undefined, options?: RequestOptions): Promise<components.AgentSchemas>;
|
|
18
18
|
/**
|
|
19
|
-
* Search
|
|
19
|
+
* Search agents
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
22
|
-
*
|
|
22
|
+
* Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
|
|
23
23
|
*/
|
|
24
24
|
list(request: components.SearchAgentsRequest, options?: RequestOptions): Promise<components.SearchAgentsResponse>;
|
|
25
25
|
/**
|
|
26
|
-
* Create
|
|
26
|
+
* Create an agent run and stream the response
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
|
-
*
|
|
29
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
30
30
|
*/
|
|
31
31
|
runStream(request: components.AgentRunCreate, options?: RequestOptions): Promise<string>;
|
|
32
32
|
/**
|
|
33
|
-
* Create
|
|
33
|
+
* Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
|
|
34
34
|
*
|
|
35
35
|
* @remarks
|
|
36
|
-
*
|
|
36
|
+
* Executes an agent run and returns the final response.
|
|
37
37
|
*/
|
|
38
38
|
run(request: components.AgentRunCreate, options?: RequestOptions): Promise<components.AgentRunWaitResponse>;
|
|
39
39
|
}
|
package/dist/esm/sdk/agents.js
CHANGED
|
@@ -10,46 +10,46 @@ import { ClientSDK } from "../lib/sdks.js";
|
|
|
10
10
|
import { unwrapAsync } from "../types/fp.js";
|
|
11
11
|
export class Agents extends ClientSDK {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Retrieve an agent
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
*
|
|
16
|
+
* Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
17
17
|
*/
|
|
18
18
|
async retrieve(agentId, timezoneOffset, options) {
|
|
19
19
|
return unwrapAsync(clientAgentsRetrieve(this, agentId, timezoneOffset, options));
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* List an agent's schemas
|
|
23
23
|
*
|
|
24
24
|
* @remarks
|
|
25
|
-
*
|
|
25
|
+
* Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
|
|
26
26
|
*/
|
|
27
27
|
async retrieveSchemas(agentId, timezoneOffset, options) {
|
|
28
28
|
return unwrapAsync(clientAgentsRetrieveSchemas(this, agentId, timezoneOffset, options));
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* Search
|
|
31
|
+
* Search agents
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
*
|
|
34
|
+
* Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
|
|
35
35
|
*/
|
|
36
36
|
async list(request, options) {
|
|
37
37
|
return unwrapAsync(clientAgentsList(this, request, options));
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
* Create
|
|
40
|
+
* Create an agent run and stream the response
|
|
41
41
|
*
|
|
42
42
|
* @remarks
|
|
43
|
-
*
|
|
43
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
44
44
|
*/
|
|
45
45
|
async runStream(request, options) {
|
|
46
46
|
return unwrapAsync(clientAgentsRunStream(this, request, options));
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
* Create
|
|
49
|
+
* Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
|
|
50
50
|
*
|
|
51
51
|
* @remarks
|
|
52
|
-
*
|
|
52
|
+
* Executes an agent run and returns the final response.
|
|
53
53
|
*/
|
|
54
54
|
async run(request, options) {
|
|
55
55
|
return unwrapAsync(clientAgentsRun(this, request, options));
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
|
-
* [retrieve](#retrieve) -
|
|
9
|
-
* [retrieveSchemas](#retrieveschemas) -
|
|
10
|
-
* [list](#list) - Search
|
|
11
|
-
* [runStream](#runstream) - Create
|
|
12
|
-
* [run](#run) - Create
|
|
8
|
+
* [retrieve](#retrieve) - Retrieve an agent
|
|
9
|
+
* [retrieveSchemas](#retrieveschemas) - List an agent's schemas
|
|
10
|
+
* [list](#list) - Search agents
|
|
11
|
+
* [runStream](#runstream) - Create an agent run and stream the response
|
|
12
|
+
* [run](#run) - Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
|
|
13
13
|
|
|
14
14
|
## retrieve
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
17
17
|
|
|
18
18
|
### Example Usage
|
|
19
19
|
|
|
@@ -114,7 +114,7 @@ import {
|
|
|
114
114
|
|
|
115
115
|
## retrieveSchemas
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
|
|
118
118
|
|
|
119
119
|
### Example Usage
|
|
120
120
|
|
|
@@ -215,7 +215,7 @@ import {
|
|
|
215
215
|
|
|
216
216
|
## list
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
|
|
219
219
|
|
|
220
220
|
### Example Usage
|
|
221
221
|
|
|
@@ -227,7 +227,9 @@ const glean = new Glean({
|
|
|
227
227
|
});
|
|
228
228
|
|
|
229
229
|
async function run() {
|
|
230
|
-
const result = await glean.client.agents.list({
|
|
230
|
+
const result = await glean.client.agents.list({
|
|
231
|
+
name: "HR Policy Agent",
|
|
232
|
+
});
|
|
231
233
|
|
|
232
234
|
// Handle the result
|
|
233
235
|
console.log(result);
|
|
@@ -251,7 +253,9 @@ const glean = new GleanCore({
|
|
|
251
253
|
});
|
|
252
254
|
|
|
253
255
|
async function run() {
|
|
254
|
-
const res = await clientAgentsList(glean, {
|
|
256
|
+
const res = await clientAgentsList(glean, {
|
|
257
|
+
name: "HR Policy Agent",
|
|
258
|
+
});
|
|
255
259
|
|
|
256
260
|
if (!res.ok) {
|
|
257
261
|
throw res.error;
|
|
@@ -304,7 +308,7 @@ import {
|
|
|
304
308
|
|
|
305
309
|
## runStream
|
|
306
310
|
|
|
307
|
-
|
|
311
|
+
Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
308
312
|
|
|
309
313
|
### Example Usage
|
|
310
314
|
|
|
@@ -397,7 +401,7 @@ import {
|
|
|
397
401
|
|
|
398
402
|
## run
|
|
399
403
|
|
|
400
|
-
|
|
404
|
+
Executes an agent run and returns the final response.
|
|
401
405
|
|
|
402
406
|
### Example Usage
|
|
403
407
|
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -24,10 +24,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
24
24
|
import { Result } from "../types/fp.js";
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Search
|
|
27
|
+
* Search agents
|
|
28
28
|
*
|
|
29
29
|
* @remarks
|
|
30
|
-
*
|
|
30
|
+
* Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
|
|
31
31
|
*/
|
|
32
32
|
export function clientAgentsList(
|
|
33
33
|
client: GleanCore,
|
|
@@ -25,10 +25,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Retrieve an agent
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
*
|
|
31
|
+
* Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
32
32
|
*/
|
|
33
33
|
export function clientAgentsRetrieve(
|
|
34
34
|
client: GleanCore,
|
|
@@ -25,10 +25,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* List an agent's schemas
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
*
|
|
31
|
+
* Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
|
|
32
32
|
*/
|
|
33
33
|
export function clientAgentsRetrieveSchemas(
|
|
34
34
|
client: GleanCore,
|
|
@@ -24,10 +24,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
24
24
|
import { Result } from "../types/fp.js";
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Create
|
|
27
|
+
* Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
|
|
28
28
|
*
|
|
29
29
|
* @remarks
|
|
30
|
-
*
|
|
30
|
+
* Executes an agent run and returns the final response.
|
|
31
31
|
*/
|
|
32
32
|
export function clientAgentsRun(
|
|
33
33
|
client: GleanCore,
|
|
@@ -25,10 +25,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* Create
|
|
28
|
+
* Create an agent run and stream the response
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
*
|
|
31
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
32
32
|
*/
|
|
33
33
|
export function clientAgentsRunStream(
|
|
34
34
|
client: GleanCore,
|
package/src/lib/config.ts
CHANGED
|
@@ -64,8 +64,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
64
64
|
export const SDK_METADATA = {
|
|
65
65
|
language: "typescript",
|
|
66
66
|
openapiDocVersion: "0.9.0",
|
|
67
|
-
sdkVersion: "0.5.
|
|
67
|
+
sdkVersion: "0.5.3",
|
|
68
68
|
genVersion: "2.610.0",
|
|
69
69
|
userAgent:
|
|
70
|
-
"speakeasy-sdk/typescript 0.5.
|
|
70
|
+
"speakeasy-sdk/typescript 0.5.3 2.610.0 0.9.0 @gleanwork/api-client",
|
|
71
71
|
} as const;
|
|
@@ -12,20 +12,25 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
12
12
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* The agent metadata.
|
|
15
|
+
* The agent metadata. Currently not implemented.
|
|
16
16
|
*/
|
|
17
17
|
export type AgentMetadata = {};
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* Describes
|
|
20
|
+
* Describes features that the agent supports. example: {
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* "ap.io.messages": true,
|
|
24
|
+
* "ap.io.streaming": true
|
|
25
|
+
* }
|
|
21
26
|
*/
|
|
22
27
|
export type AgentCapabilities = {
|
|
23
28
|
/**
|
|
24
|
-
* Whether the agent supports
|
|
29
|
+
* Whether the agent supports messages as an input. If true, you'll pass `messages` as an input when running the agent.
|
|
25
30
|
*/
|
|
26
31
|
apIoMessages?: boolean | undefined;
|
|
27
32
|
/**
|
|
28
|
-
* Whether the agent supports streaming output.
|
|
33
|
+
* Whether the agent supports streaming output. If true, you you can stream agent ouput. All agents currently support streaming.
|
|
29
34
|
*/
|
|
30
35
|
apIoStreaming?: boolean | undefined;
|
|
31
36
|
additionalProperties?: { [k: string]: any };
|
|
@@ -45,11 +50,16 @@ export type Agent = {
|
|
|
45
50
|
*/
|
|
46
51
|
description?: string | undefined;
|
|
47
52
|
/**
|
|
48
|
-
* The agent metadata.
|
|
53
|
+
* The agent metadata. Currently not implemented.
|
|
49
54
|
*/
|
|
50
55
|
metadata?: AgentMetadata | undefined;
|
|
51
56
|
/**
|
|
52
|
-
* Describes
|
|
57
|
+
* Describes features that the agent supports. example: {
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* "ap.io.messages": true,
|
|
61
|
+
* "ap.io.streaming": true
|
|
62
|
+
* }
|
|
53
63
|
*/
|
|
54
64
|
capabilities: AgentCapabilities;
|
|
55
65
|
};
|
|
@@ -9,12 +9,12 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* The schema for the agent input. In JSON
|
|
12
|
+
* The schema for the agent input. In JSON schema format.
|
|
13
13
|
*/
|
|
14
14
|
export type InputSchema = {};
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* The schema for the agent output. In JSON
|
|
17
|
+
* The schema for the agent output. In JSON schema format.
|
|
18
18
|
*/
|
|
19
19
|
export type OutputSchema = {};
|
|
20
20
|
|
|
@@ -27,11 +27,11 @@ export type AgentSchemas = {
|
|
|
27
27
|
*/
|
|
28
28
|
agentId: string;
|
|
29
29
|
/**
|
|
30
|
-
* The schema for the agent input. In JSON
|
|
30
|
+
* The schema for the agent input. In JSON schema format.
|
|
31
31
|
*/
|
|
32
32
|
inputSchema: InputSchema;
|
|
33
33
|
/**
|
|
34
|
-
* The schema for the agent output. In JSON
|
|
34
|
+
* The schema for the agent output. In JSON schema format.
|
|
35
35
|
*/
|
|
36
36
|
outputSchema: OutputSchema;
|
|
37
37
|
};
|
|
@@ -9,7 +9,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
9
9
|
|
|
10
10
|
export type SearchAgentsRequest = {
|
|
11
11
|
/**
|
|
12
|
-
* Filters on the name of the agent. If empty, acts as no filter.
|
|
12
|
+
* Filters on the name of the agent. The keyword search is case-insensitive. If search string is ommited or empty, acts as no filter.
|
|
13
13
|
*/
|
|
14
14
|
name?: string | undefined;
|
|
15
15
|
};
|
|
@@ -20,6 +20,10 @@ import {
|
|
|
20
20
|
} from "./person.js";
|
|
21
21
|
|
|
22
22
|
export type Workflow = {
|
|
23
|
+
/**
|
|
24
|
+
* The name of the workflow.
|
|
25
|
+
*/
|
|
26
|
+
name?: string | undefined;
|
|
23
27
|
author?: Person | undefined;
|
|
24
28
|
/**
|
|
25
29
|
* Server Unix timestamp of the creation time.
|
|
@@ -31,10 +35,6 @@ export type Workflow = {
|
|
|
31
35
|
lastUpdateTimestamp?: number | undefined;
|
|
32
36
|
lastUpdatedBy?: Person | undefined;
|
|
33
37
|
permissions?: ObjectPermissions | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* The name of the workflow.
|
|
36
|
-
*/
|
|
37
|
-
name?: string | undefined;
|
|
38
38
|
/**
|
|
39
39
|
* The ID of the workflow.
|
|
40
40
|
*/
|
|
@@ -47,23 +47,23 @@ export const Workflow$inboundSchema: z.ZodType<
|
|
|
47
47
|
z.ZodTypeDef,
|
|
48
48
|
unknown
|
|
49
49
|
> = z.object({
|
|
50
|
+
name: z.string().optional(),
|
|
50
51
|
author: Person$inboundSchema.optional(),
|
|
51
52
|
createTimestamp: z.number().int().optional(),
|
|
52
53
|
lastUpdateTimestamp: z.number().int().optional(),
|
|
53
54
|
lastUpdatedBy: Person$inboundSchema.optional(),
|
|
54
55
|
permissions: ObjectPermissions$inboundSchema.optional(),
|
|
55
|
-
name: z.string().optional(),
|
|
56
56
|
id: z.string().optional(),
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
/** @internal */
|
|
60
60
|
export type Workflow$Outbound = {
|
|
61
|
+
name?: string | undefined;
|
|
61
62
|
author?: Person$Outbound | undefined;
|
|
62
63
|
createTimestamp?: number | undefined;
|
|
63
64
|
lastUpdateTimestamp?: number | undefined;
|
|
64
65
|
lastUpdatedBy?: Person$Outbound | undefined;
|
|
65
66
|
permissions?: ObjectPermissions$Outbound | undefined;
|
|
66
|
-
name?: string | undefined;
|
|
67
67
|
id?: string | undefined;
|
|
68
68
|
};
|
|
69
69
|
|
|
@@ -73,12 +73,12 @@ export const Workflow$outboundSchema: z.ZodType<
|
|
|
73
73
|
z.ZodTypeDef,
|
|
74
74
|
Workflow
|
|
75
75
|
> = z.object({
|
|
76
|
+
name: z.string().optional(),
|
|
76
77
|
author: Person$outboundSchema.optional(),
|
|
77
78
|
createTimestamp: z.number().int().optional(),
|
|
78
79
|
lastUpdateTimestamp: z.number().int().optional(),
|
|
79
80
|
lastUpdatedBy: Person$outboundSchema.optional(),
|
|
80
81
|
permissions: ObjectPermissions$outboundSchema.optional(),
|
|
81
|
-
name: z.string().optional(),
|
|
82
82
|
id: z.string().optional(),
|
|
83
83
|
});
|
|
84
84
|
|
|
@@ -24,10 +24,10 @@ export type ClientAgentsListMutationVariables = {
|
|
|
24
24
|
export type ClientAgentsListMutationData = components.SearchAgentsResponse;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Search
|
|
27
|
+
* Search agents
|
|
28
28
|
*
|
|
29
29
|
* @remarks
|
|
30
|
-
*
|
|
30
|
+
* Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
|
|
31
31
|
*/
|
|
32
32
|
export function useClientAgentsListMutation(
|
|
33
33
|
options?: MutationHookOptions<
|