@gleanwork/api-client 0.14.0 → 0.14.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/dist/commonjs/__tests__/summarize.test.js +4 -2
- package/dist/commonjs/__tests__/summarize.test.js.map +1 -1
- package/dist/commonjs/funcs/clientAgentsRun.d.ts +1 -1
- package/dist/commonjs/funcs/clientAgentsRun.js +1 -1
- package/dist/commonjs/funcs/clientAgentsRunStream.d.ts +1 -1
- package/dist/commonjs/funcs/clientAgentsRunStream.js +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/components/agentrun.d.ts +2 -2
- package/dist/commonjs/models/components/agentruncreate.d.ts +2 -2
- package/dist/commonjs/react-query/clientAgentsRun.d.ts +1 -1
- package/dist/commonjs/react-query/clientAgentsRun.js +1 -1
- package/dist/commonjs/react-query/clientAgentsRunStream.d.ts +1 -1
- package/dist/commonjs/react-query/clientAgentsRunStream.js +1 -1
- package/dist/commonjs/sdk/agents.d.ts +2 -2
- package/dist/commonjs/sdk/agents.js +2 -2
- package/dist/esm/__tests__/summarize.test.js +4 -2
- package/dist/esm/__tests__/summarize.test.js.map +1 -1
- package/dist/esm/funcs/clientAgentsRun.d.ts +1 -1
- package/dist/esm/funcs/clientAgentsRun.js +1 -1
- package/dist/esm/funcs/clientAgentsRunStream.d.ts +1 -1
- package/dist/esm/funcs/clientAgentsRunStream.js +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/components/agentrun.d.ts +2 -2
- package/dist/esm/models/components/agentruncreate.d.ts +2 -2
- package/dist/esm/react-query/clientAgentsRun.d.ts +1 -1
- package/dist/esm/react-query/clientAgentsRun.js +1 -1
- package/dist/esm/react-query/clientAgentsRunStream.d.ts +1 -1
- package/dist/esm/react-query/clientAgentsRunStream.js +1 -1
- package/dist/esm/sdk/agents.d.ts +2 -2
- package/dist/esm/sdk/agents.js +2 -2
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/summarize.test.ts +4 -2
- package/src/funcs/clientAgentsRun.ts +1 -1
- package/src/funcs/clientAgentsRunStream.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/agentrun.ts +2 -2
- package/src/models/components/agentruncreate.ts +2 -2
- package/src/react-query/clientAgentsRun.ts +1 -1
- package/src/react-query/clientAgentsRunStream.ts +1 -1
- package/src/sdk/agents.ts +2 -2
|
@@ -16,10 +16,12 @@ const testclient_js_1 = require("./testclient.js");
|
|
|
16
16
|
const result = await glean.client.documents.summarize({
|
|
17
17
|
documentSpecs: [
|
|
18
18
|
{
|
|
19
|
-
|
|
19
|
+
ugcType: "SHORTCUTS",
|
|
20
|
+
contentId: 602763,
|
|
20
21
|
},
|
|
21
22
|
{
|
|
22
|
-
|
|
23
|
+
ugcType: "SHORTCUTS",
|
|
24
|
+
contentId: 602763,
|
|
23
25
|
},
|
|
24
26
|
],
|
|
25
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summarize.test.js","sourceRoot":"","sources":["../../../src/__tests__/summarize.test.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,mCAAsC;AACtC,0CAAoC;AACpC,mDAAuD;AAEvD,IAAA,aAAI,EAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;IACrC,MAAM,cAAc,GAAG,IAAA,oCAAoB,EAAC,WAAW,CAAC,CAAC;IAEzD,MAAM,KAAK,GAAG,IAAI,gBAAK,CAAC;QACtB,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,wBAAwB;QACrE,UAAU,EAAE,cAAc;QAC1B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,OAAO;KACpD,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;QACpD,aAAa,EAAE;YACb;gBACE,
|
|
1
|
+
{"version":3,"file":"summarize.test.js","sourceRoot":"","sources":["../../../src/__tests__/summarize.test.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,mCAAsC;AACtC,0CAAoC;AACpC,mDAAuD;AAEvD,IAAA,aAAI,EAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;IACrC,MAAM,cAAc,GAAG,IAAA,oCAAoB,EAAC,WAAW,CAAC,CAAC;IAEzD,MAAM,KAAK,GAAG,IAAI,gBAAK,CAAC;QACtB,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,wBAAwB;QACrE,UAAU,EAAE,cAAc;QAC1B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,OAAO;KACpD,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;QACpD,aAAa,EAAE;YACb;gBACE,OAAO,EAAE,WAAW;gBACpB,SAAS,EAAE,MAAM;aAClB;YACD;gBACE,OAAO,EAAE,WAAW;gBACpB,SAAS,EAAE,MAAM;aAClB;SACF;KACF,CAAC,CAAC;IACH,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;AAC/B,CAAC,CAAC,CAAC"}
|
|
@@ -11,7 +11,7 @@ import { Result } from "../types/fp.js";
|
|
|
11
11
|
* Create an agent run and wait for the response
|
|
12
12
|
*
|
|
13
13
|
* @remarks
|
|
14
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
14
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
15
15
|
*/
|
|
16
16
|
export declare function clientAgentsRun(client: GleanCore, request: components.AgentRunCreate, options?: RequestOptions): APIPromise<Result<components.AgentRunWaitResponse, GleanBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
17
|
//# sourceMappingURL=clientAgentsRun.d.ts.map
|
|
@@ -49,7 +49,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
49
49
|
* Create an agent run and wait for the response
|
|
50
50
|
*
|
|
51
51
|
* @remarks
|
|
52
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
52
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
53
53
|
*/
|
|
54
54
|
function clientAgentsRun(client, request, options) {
|
|
55
55
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -11,7 +11,7 @@ import { Result } from "../types/fp.js";
|
|
|
11
11
|
* Create an agent run and stream the response
|
|
12
12
|
*
|
|
13
13
|
* @remarks
|
|
14
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
14
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
15
15
|
*/
|
|
16
16
|
export declare function clientAgentsRunStream(client: GleanCore, request: components.AgentRunCreate, options?: RequestOptions): APIPromise<Result<string, GleanBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
17
|
//# sourceMappingURL=clientAgentsRunStream.d.ts.map
|
|
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
50
50
|
* Create an agent run and stream the response
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
53
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
54
54
|
*/
|
|
55
55
|
function clientAgentsRunStream(client, request, options) {
|
|
56
56
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -35,8 +35,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
35
35
|
export declare const SDK_METADATA: {
|
|
36
36
|
readonly language: "typescript";
|
|
37
37
|
readonly openapiDocVersion: "0.9.0";
|
|
38
|
-
readonly sdkVersion: "0.14.
|
|
39
|
-
readonly genVersion: "2.
|
|
40
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.14.
|
|
38
|
+
readonly sdkVersion: "0.14.2";
|
|
39
|
+
readonly genVersion: "2.811.2";
|
|
40
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.14.2 2.811.2 0.9.0 @gleanwork/api-client";
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -34,8 +34,8 @@ function serverURLFromOptions(options) {
|
|
|
34
34
|
exports.SDK_METADATA = {
|
|
35
35
|
language: "typescript",
|
|
36
36
|
openapiDocVersion: "0.9.0",
|
|
37
|
-
sdkVersion: "0.14.
|
|
38
|
-
genVersion: "2.
|
|
39
|
-
userAgent: "speakeasy-sdk/typescript 0.14.
|
|
37
|
+
sdkVersion: "0.14.2",
|
|
38
|
+
genVersion: "2.811.2",
|
|
39
|
+
userAgent: "speakeasy-sdk/typescript 0.14.2 2.811.2 0.9.0 @gleanwork/api-client",
|
|
40
40
|
};
|
|
41
41
|
//# sourceMappingURL=config.js.map
|
|
@@ -4,7 +4,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
4
4
|
import { AgentExecutionStatus } from "./agentexecutionstatus.js";
|
|
5
5
|
import { Message } from "./message.js";
|
|
6
6
|
/**
|
|
7
|
-
* Payload for creating a run.
|
|
7
|
+
* Payload for creating a run. **Important**: If the agent uses an input form trigger, the `input` field is required and must include all fields defined in the form schema. Even fields marked as optional in the UI must be included in the request—use an empty string (`""`) for optional fields without values. Omitting required form fields will result in a 500 error.
|
|
8
8
|
*/
|
|
9
9
|
export type AgentRun = {
|
|
10
10
|
/**
|
|
@@ -12,7 +12,7 @@ export type AgentRun = {
|
|
|
12
12
|
*/
|
|
13
13
|
agentId: string;
|
|
14
14
|
/**
|
|
15
|
-
* The input to the agent.
|
|
15
|
+
* The input to the agent. Required when the agent uses an input form trigger.
|
|
16
16
|
*/
|
|
17
17
|
input?: {
|
|
18
18
|
[k: string]: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
2
|
import { Message, Message$Outbound } from "./message.js";
|
|
3
3
|
/**
|
|
4
|
-
* Payload for creating a run.
|
|
4
|
+
* Payload for creating a run. **Important**: If the agent uses an input form trigger, the `input` field is required and must include all fields defined in the form schema. Even fields marked as optional in the UI must be included in the request—use an empty string (`""`) for optional fields without values. Omitting required form fields will result in a 500 error.
|
|
5
5
|
*/
|
|
6
6
|
export type AgentRunCreate = {
|
|
7
7
|
/**
|
|
@@ -9,7 +9,7 @@ export type AgentRunCreate = {
|
|
|
9
9
|
*/
|
|
10
10
|
agentId: string;
|
|
11
11
|
/**
|
|
12
|
-
* The input to the agent.
|
|
12
|
+
* The input to the agent. Required when the agent uses an input form trigger.
|
|
13
13
|
*/
|
|
14
14
|
input?: {
|
|
15
15
|
[k: string]: any;
|
|
@@ -17,7 +17,7 @@ export type ClientAgentsRunMutationError = GleanBaseError | ResponseValidationEr
|
|
|
17
17
|
* Create an agent run and wait for the response
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
20
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
21
21
|
*/
|
|
22
22
|
export declare function useClientAgentsRunMutation(options?: MutationHookOptions<ClientAgentsRunMutationData, ClientAgentsRunMutationError, ClientAgentsRunMutationVariables>): UseMutationResult<ClientAgentsRunMutationData, ClientAgentsRunMutationError, ClientAgentsRunMutationVariables>;
|
|
23
23
|
export declare function mutationKeyClientAgentsRun(): MutationKey;
|
|
@@ -15,7 +15,7 @@ const _context_js_1 = require("./_context.js");
|
|
|
15
15
|
* Create an agent run and wait for the response
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
18
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
19
19
|
*/
|
|
20
20
|
function useClientAgentsRunMutation(options) {
|
|
21
21
|
const client = (0, _context_js_1.useGleanContext)();
|
|
@@ -17,7 +17,7 @@ export type ClientAgentsRunStreamMutationError = GleanBaseError | ResponseValida
|
|
|
17
17
|
* Create an agent run and stream the response
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
20
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
21
21
|
*/
|
|
22
22
|
export declare function useClientAgentsRunStreamMutation(options?: MutationHookOptions<ClientAgentsRunStreamMutationData, ClientAgentsRunStreamMutationError, ClientAgentsRunStreamMutationVariables>): UseMutationResult<ClientAgentsRunStreamMutationData, ClientAgentsRunStreamMutationError, ClientAgentsRunStreamMutationVariables>;
|
|
23
23
|
export declare function mutationKeyClientAgentsRunStream(): MutationKey;
|
|
@@ -15,7 +15,7 @@ const _context_js_1 = require("./_context.js");
|
|
|
15
15
|
* Create an agent run and stream the response
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
18
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
19
19
|
*/
|
|
20
20
|
function useClientAgentsRunStreamMutation(options) {
|
|
21
21
|
const client = (0, _context_js_1.useGleanContext)();
|
|
@@ -26,14 +26,14 @@ export declare class Agents extends ClientSDK {
|
|
|
26
26
|
* Create an agent run and stream the response
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
29
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
30
30
|
*/
|
|
31
31
|
runStream(request: components.AgentRunCreate, options?: RequestOptions): Promise<string>;
|
|
32
32
|
/**
|
|
33
33
|
* Create an agent run and wait for the response
|
|
34
34
|
*
|
|
35
35
|
* @remarks
|
|
36
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
36
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
37
37
|
*/
|
|
38
38
|
run(request: components.AgentRunCreate, options?: RequestOptions): Promise<components.AgentRunWaitResponse>;
|
|
39
39
|
}
|
|
@@ -43,7 +43,7 @@ class Agents extends sdks_js_1.ClientSDK {
|
|
|
43
43
|
* Create an agent run and stream the response
|
|
44
44
|
*
|
|
45
45
|
* @remarks
|
|
46
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
46
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
47
47
|
*/
|
|
48
48
|
async runStream(request, options) {
|
|
49
49
|
return (0, fp_js_1.unwrapAsync)((0, clientAgentsRunStream_js_1.clientAgentsRunStream)(this, request, options));
|
|
@@ -52,7 +52,7 @@ class Agents extends sdks_js_1.ClientSDK {
|
|
|
52
52
|
* Create an agent run and wait for the response
|
|
53
53
|
*
|
|
54
54
|
* @remarks
|
|
55
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
55
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
56
56
|
*/
|
|
57
57
|
async run(request, options) {
|
|
58
58
|
return (0, fp_js_1.unwrapAsync)((0, clientAgentsRun_js_1.clientAgentsRun)(this, request, options));
|
|
@@ -14,10 +14,12 @@ test("Summarize Summarize", async () => {
|
|
|
14
14
|
const result = await glean.client.documents.summarize({
|
|
15
15
|
documentSpecs: [
|
|
16
16
|
{
|
|
17
|
-
|
|
17
|
+
ugcType: "SHORTCUTS",
|
|
18
|
+
contentId: 602763,
|
|
18
19
|
},
|
|
19
20
|
{
|
|
20
|
-
|
|
21
|
+
ugcType: "SHORTCUTS",
|
|
22
|
+
contentId: 602763,
|
|
21
23
|
},
|
|
22
24
|
],
|
|
23
25
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summarize.test.js","sourceRoot":"","sources":["../../../src/__tests__/summarize.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,IAAI,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;IACrC,MAAM,cAAc,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;IAEzD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC;QACtB,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,wBAAwB;QACrE,UAAU,EAAE,cAAc;QAC1B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,OAAO;KACpD,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;QACpD,aAAa,EAAE;YACb;gBACE,
|
|
1
|
+
{"version":3,"file":"summarize.test.js","sourceRoot":"","sources":["../../../src/__tests__/summarize.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,IAAI,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;IACrC,MAAM,cAAc,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;IAEzD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC;QACtB,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,wBAAwB;QACrE,UAAU,EAAE,cAAc;QAC1B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,OAAO;KACpD,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;QACpD,aAAa,EAAE;YACb;gBACE,OAAO,EAAE,WAAW;gBACpB,SAAS,EAAE,MAAM;aAClB;YACD;gBACE,OAAO,EAAE,WAAW;gBACpB,SAAS,EAAE,MAAM;aAClB;SACF;KACF,CAAC,CAAC;IACH,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;AAC/B,CAAC,CAAC,CAAC"}
|
|
@@ -11,7 +11,7 @@ import { Result } from "../types/fp.js";
|
|
|
11
11
|
* Create an agent run and wait for the response
|
|
12
12
|
*
|
|
13
13
|
* @remarks
|
|
14
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
14
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
15
15
|
*/
|
|
16
16
|
export declare function clientAgentsRun(client: GleanCore, request: components.AgentRunCreate, options?: RequestOptions): APIPromise<Result<components.AgentRunWaitResponse, GleanBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
17
|
//# sourceMappingURL=clientAgentsRun.d.ts.map
|
|
@@ -13,7 +13,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
13
13
|
* Create an agent run and wait for the response
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
16
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
17
17
|
*/
|
|
18
18
|
export function clientAgentsRun(client, request, options) {
|
|
19
19
|
return new APIPromise($do(client, request, options));
|
|
@@ -11,7 +11,7 @@ import { Result } from "../types/fp.js";
|
|
|
11
11
|
* Create an agent run and stream the response
|
|
12
12
|
*
|
|
13
13
|
* @remarks
|
|
14
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
14
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
15
15
|
*/
|
|
16
16
|
export declare function clientAgentsRunStream(client: GleanCore, request: components.AgentRunCreate, options?: RequestOptions): APIPromise<Result<string, GleanBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
17
|
//# sourceMappingURL=clientAgentsRunStream.d.ts.map
|
|
@@ -14,7 +14,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
14
14
|
* Create an agent run and stream the response
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
17
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
18
18
|
*/
|
|
19
19
|
export function clientAgentsRunStream(client, request, options) {
|
|
20
20
|
return new APIPromise($do(client, request, options));
|
package/dist/esm/lib/config.d.ts
CHANGED
|
@@ -35,8 +35,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
35
35
|
export declare const SDK_METADATA: {
|
|
36
36
|
readonly language: "typescript";
|
|
37
37
|
readonly openapiDocVersion: "0.9.0";
|
|
38
|
-
readonly sdkVersion: "0.14.
|
|
39
|
-
readonly genVersion: "2.
|
|
40
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.14.
|
|
38
|
+
readonly sdkVersion: "0.14.2";
|
|
39
|
+
readonly genVersion: "2.811.2";
|
|
40
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.14.2 2.811.2 0.9.0 @gleanwork/api-client";
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/esm/lib/config.js
CHANGED
|
@@ -30,8 +30,8 @@ export function serverURLFromOptions(options) {
|
|
|
30
30
|
export const SDK_METADATA = {
|
|
31
31
|
language: "typescript",
|
|
32
32
|
openapiDocVersion: "0.9.0",
|
|
33
|
-
sdkVersion: "0.14.
|
|
34
|
-
genVersion: "2.
|
|
35
|
-
userAgent: "speakeasy-sdk/typescript 0.14.
|
|
33
|
+
sdkVersion: "0.14.2",
|
|
34
|
+
genVersion: "2.811.2",
|
|
35
|
+
userAgent: "speakeasy-sdk/typescript 0.14.2 2.811.2 0.9.0 @gleanwork/api-client",
|
|
36
36
|
};
|
|
37
37
|
//# sourceMappingURL=config.js.map
|
|
@@ -4,7 +4,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
4
4
|
import { AgentExecutionStatus } from "./agentexecutionstatus.js";
|
|
5
5
|
import { Message } from "./message.js";
|
|
6
6
|
/**
|
|
7
|
-
* Payload for creating a run.
|
|
7
|
+
* Payload for creating a run. **Important**: If the agent uses an input form trigger, the `input` field is required and must include all fields defined in the form schema. Even fields marked as optional in the UI must be included in the request—use an empty string (`""`) for optional fields without values. Omitting required form fields will result in a 500 error.
|
|
8
8
|
*/
|
|
9
9
|
export type AgentRun = {
|
|
10
10
|
/**
|
|
@@ -12,7 +12,7 @@ export type AgentRun = {
|
|
|
12
12
|
*/
|
|
13
13
|
agentId: string;
|
|
14
14
|
/**
|
|
15
|
-
* The input to the agent.
|
|
15
|
+
* The input to the agent. Required when the agent uses an input form trigger.
|
|
16
16
|
*/
|
|
17
17
|
input?: {
|
|
18
18
|
[k: string]: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
2
|
import { Message, Message$Outbound } from "./message.js";
|
|
3
3
|
/**
|
|
4
|
-
* Payload for creating a run.
|
|
4
|
+
* Payload for creating a run. **Important**: If the agent uses an input form trigger, the `input` field is required and must include all fields defined in the form schema. Even fields marked as optional in the UI must be included in the request—use an empty string (`""`) for optional fields without values. Omitting required form fields will result in a 500 error.
|
|
5
5
|
*/
|
|
6
6
|
export type AgentRunCreate = {
|
|
7
7
|
/**
|
|
@@ -9,7 +9,7 @@ export type AgentRunCreate = {
|
|
|
9
9
|
*/
|
|
10
10
|
agentId: string;
|
|
11
11
|
/**
|
|
12
|
-
* The input to the agent.
|
|
12
|
+
* The input to the agent. Required when the agent uses an input form trigger.
|
|
13
13
|
*/
|
|
14
14
|
input?: {
|
|
15
15
|
[k: string]: any;
|
|
@@ -17,7 +17,7 @@ export type ClientAgentsRunMutationError = GleanBaseError | ResponseValidationEr
|
|
|
17
17
|
* Create an agent run and wait for the response
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
20
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
21
21
|
*/
|
|
22
22
|
export declare function useClientAgentsRunMutation(options?: MutationHookOptions<ClientAgentsRunMutationData, ClientAgentsRunMutationError, ClientAgentsRunMutationVariables>): UseMutationResult<ClientAgentsRunMutationData, ClientAgentsRunMutationError, ClientAgentsRunMutationVariables>;
|
|
23
23
|
export declare function mutationKeyClientAgentsRun(): MutationKey;
|
|
@@ -10,7 +10,7 @@ import { useGleanContext } from "./_context.js";
|
|
|
10
10
|
* Create an agent run and wait for the response
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
13
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
14
14
|
*/
|
|
15
15
|
export function useClientAgentsRunMutation(options) {
|
|
16
16
|
const client = useGleanContext();
|
|
@@ -17,7 +17,7 @@ export type ClientAgentsRunStreamMutationError = GleanBaseError | ResponseValida
|
|
|
17
17
|
* Create an agent run and stream the response
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
20
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
21
21
|
*/
|
|
22
22
|
export declare function useClientAgentsRunStreamMutation(options?: MutationHookOptions<ClientAgentsRunStreamMutationData, ClientAgentsRunStreamMutationError, ClientAgentsRunStreamMutationVariables>): UseMutationResult<ClientAgentsRunStreamMutationData, ClientAgentsRunStreamMutationError, ClientAgentsRunStreamMutationVariables>;
|
|
23
23
|
export declare function mutationKeyClientAgentsRunStream(): MutationKey;
|
|
@@ -10,7 +10,7 @@ import { useGleanContext } from "./_context.js";
|
|
|
10
10
|
* Create an agent run and stream the response
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
13
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
14
14
|
*/
|
|
15
15
|
export function useClientAgentsRunStreamMutation(options) {
|
|
16
16
|
const client = useGleanContext();
|
package/dist/esm/sdk/agents.d.ts
CHANGED
|
@@ -26,14 +26,14 @@ export declare class Agents extends ClientSDK {
|
|
|
26
26
|
* Create an agent run and stream the response
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
29
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
30
30
|
*/
|
|
31
31
|
runStream(request: components.AgentRunCreate, options?: RequestOptions): Promise<string>;
|
|
32
32
|
/**
|
|
33
33
|
* Create an agent run and wait for the response
|
|
34
34
|
*
|
|
35
35
|
* @remarks
|
|
36
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
36
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
37
37
|
*/
|
|
38
38
|
run(request: components.AgentRunCreate, options?: RequestOptions): Promise<components.AgentRunWaitResponse>;
|
|
39
39
|
}
|
package/dist/esm/sdk/agents.js
CHANGED
|
@@ -40,7 +40,7 @@ export class Agents extends ClientSDK {
|
|
|
40
40
|
* Create an agent run and stream the response
|
|
41
41
|
*
|
|
42
42
|
* @remarks
|
|
43
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
43
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
44
44
|
*/
|
|
45
45
|
async runStream(request, options) {
|
|
46
46
|
return unwrapAsync(clientAgentsRunStream(this, request, options));
|
|
@@ -49,7 +49,7 @@ export class Agents extends ClientSDK {
|
|
|
49
49
|
* Create an agent run and wait for the response
|
|
50
50
|
*
|
|
51
51
|
* @remarks
|
|
52
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
52
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
53
53
|
*/
|
|
54
54
|
async run(request, options) {
|
|
55
55
|
return unwrapAsync(clientAgentsRun(this, request, options));
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -18,10 +18,12 @@ test("Summarize Summarize", async () => {
|
|
|
18
18
|
const result = await glean.client.documents.summarize({
|
|
19
19
|
documentSpecs: [
|
|
20
20
|
{
|
|
21
|
-
|
|
21
|
+
ugcType: "SHORTCUTS",
|
|
22
|
+
contentId: 602763,
|
|
22
23
|
},
|
|
23
24
|
{
|
|
24
|
-
|
|
25
|
+
ugcType: "SHORTCUTS",
|
|
26
|
+
contentId: 602763,
|
|
25
27
|
},
|
|
26
28
|
],
|
|
27
29
|
});
|
|
@@ -28,7 +28,7 @@ import { Result } from "../types/fp.js";
|
|
|
28
28
|
* Create an agent run and wait for the response
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
31
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
32
32
|
*/
|
|
33
33
|
export function clientAgentsRun(
|
|
34
34
|
client: GleanCore,
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Create an agent run and stream the response
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
32
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
33
33
|
*/
|
|
34
34
|
export function clientAgentsRunStream(
|
|
35
35
|
client: GleanCore,
|
package/src/lib/config.ts
CHANGED
|
@@ -68,8 +68,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
68
68
|
export const SDK_METADATA = {
|
|
69
69
|
language: "typescript",
|
|
70
70
|
openapiDocVersion: "0.9.0",
|
|
71
|
-
sdkVersion: "0.14.
|
|
72
|
-
genVersion: "2.
|
|
71
|
+
sdkVersion: "0.14.2",
|
|
72
|
+
genVersion: "2.811.2",
|
|
73
73
|
userAgent:
|
|
74
|
-
"speakeasy-sdk/typescript 0.14.
|
|
74
|
+
"speakeasy-sdk/typescript 0.14.2 2.811.2 0.9.0 @gleanwork/api-client",
|
|
75
75
|
} as const;
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import { Message, Message$inboundSchema } from "./message.js";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* Payload for creating a run.
|
|
17
|
+
* Payload for creating a run. **Important**: If the agent uses an input form trigger, the `input` field is required and must include all fields defined in the form schema. Even fields marked as optional in the UI must be included in the request—use an empty string (`""`) for optional fields without values. Omitting required form fields will result in a 500 error.
|
|
18
18
|
*/
|
|
19
19
|
export type AgentRun = {
|
|
20
20
|
/**
|
|
@@ -22,7 +22,7 @@ export type AgentRun = {
|
|
|
22
22
|
*/
|
|
23
23
|
agentId: string;
|
|
24
24
|
/**
|
|
25
|
-
* The input to the agent.
|
|
25
|
+
* The input to the agent. Required when the agent uses an input form trigger.
|
|
26
26
|
*/
|
|
27
27
|
input?: { [k: string]: any } | undefined;
|
|
28
28
|
/**
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./message.js";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Payload for creating a run.
|
|
14
|
+
* Payload for creating a run. **Important**: If the agent uses an input form trigger, the `input` field is required and must include all fields defined in the form schema. Even fields marked as optional in the UI must be included in the request—use an empty string (`""`) for optional fields without values. Omitting required form fields will result in a 500 error.
|
|
15
15
|
*/
|
|
16
16
|
export type AgentRunCreate = {
|
|
17
17
|
/**
|
|
@@ -19,7 +19,7 @@ export type AgentRunCreate = {
|
|
|
19
19
|
*/
|
|
20
20
|
agentId: string;
|
|
21
21
|
/**
|
|
22
|
-
* The input to the agent.
|
|
22
|
+
* The input to the agent. Required when the agent uses an input form trigger.
|
|
23
23
|
*/
|
|
24
24
|
input?: { [k: string]: any } | undefined;
|
|
25
25
|
/**
|
|
@@ -47,7 +47,7 @@ export type ClientAgentsRunMutationError =
|
|
|
47
47
|
* Create an agent run and wait for the response
|
|
48
48
|
*
|
|
49
49
|
* @remarks
|
|
50
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
50
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
51
51
|
*/
|
|
52
52
|
export function useClientAgentsRunMutation(
|
|
53
53
|
options?: MutationHookOptions<
|
|
@@ -47,7 +47,7 @@ export type ClientAgentsRunStreamMutationError =
|
|
|
47
47
|
* Create an agent run and stream the response
|
|
48
48
|
*
|
|
49
49
|
* @remarks
|
|
50
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
50
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
51
51
|
*/
|
|
52
52
|
export function useClientAgentsRunStreamMutation(
|
|
53
53
|
options?: MutationHookOptions<
|
package/src/sdk/agents.ts
CHANGED
|
@@ -75,7 +75,7 @@ export class Agents extends ClientSDK {
|
|
|
75
75
|
* Create an agent run and stream the response
|
|
76
76
|
*
|
|
77
77
|
* @remarks
|
|
78
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
78
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE). **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
79
79
|
*/
|
|
80
80
|
async runStream(
|
|
81
81
|
request: components.AgentRunCreate,
|
|
@@ -92,7 +92,7 @@ export class Agents extends ClientSDK {
|
|
|
92
92
|
* Create an agent run and wait for the response
|
|
93
93
|
*
|
|
94
94
|
* @remarks
|
|
95
|
-
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response.
|
|
95
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the final response. **Note**: If the agent uses an input form trigger, all form fields (including optional fields) must be included in the `input` object.
|
|
96
96
|
*/
|
|
97
97
|
async run(
|
|
98
98
|
request: components.AgentRunCreate,
|