@gleanwork/api-client 0.19.0 → 0.19.1
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/__tests__/agents.test.js +6 -1
- package/dist/commonjs/__tests__/agents.test.js.map +1 -1
- package/dist/commonjs/__tests__/chat.test.js +1 -1
- package/dist/commonjs/__tests__/chat.test.js.map +1 -1
- package/dist/commonjs/__tests__/skills.test.js +3 -3
- package/dist/commonjs/__tests__/skills.test.js.map +1 -1
- package/dist/commonjs/__tests__/summarize.test.js +4 -2
- package/dist/commonjs/__tests__/summarize.test.js.map +1 -1
- package/dist/commonjs/funcs/clientAgentsList.d.ts +2 -0
- package/dist/commonjs/funcs/clientAgentsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/clientAgentsList.js +2 -0
- package/dist/commonjs/funcs/clientAgentsList.js.map +1 -1
- package/dist/commonjs/funcs/clientAgentsRetrieve.d.ts +2 -0
- package/dist/commonjs/funcs/clientAgentsRetrieve.d.ts.map +1 -1
- package/dist/commonjs/funcs/clientAgentsRetrieve.js +2 -0
- package/dist/commonjs/funcs/clientAgentsRetrieve.js.map +1 -1
- package/dist/commonjs/funcs/clientAgentsRetrieveSchemas.d.ts +2 -0
- package/dist/commonjs/funcs/clientAgentsRetrieveSchemas.d.ts.map +1 -1
- package/dist/commonjs/funcs/clientAgentsRetrieveSchemas.js +2 -0
- package/dist/commonjs/funcs/clientAgentsRetrieveSchemas.js.map +1 -1
- package/dist/commonjs/funcs/clientAgentsRun.d.ts +2 -0
- package/dist/commonjs/funcs/clientAgentsRun.d.ts.map +1 -1
- package/dist/commonjs/funcs/clientAgentsRun.js +2 -0
- package/dist/commonjs/funcs/clientAgentsRun.js.map +1 -1
- package/dist/commonjs/funcs/clientAgentsRunStream.d.ts +2 -0
- package/dist/commonjs/funcs/clientAgentsRunStream.d.ts.map +1 -1
- package/dist/commonjs/funcs/clientAgentsRunStream.js +2 -0
- package/dist/commonjs/funcs/clientAgentsRunStream.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/encodings.d.ts +10 -9
- package/dist/commonjs/lib/encodings.d.ts.map +1 -1
- package/dist/commonjs/lib/encodings.js +29 -13
- package/dist/commonjs/lib/encodings.js.map +1 -1
- package/dist/commonjs/models/components/chatmessagefragment.d.ts +3 -0
- package/dist/commonjs/models/components/chatmessagefragment.d.ts.map +1 -1
- package/dist/commonjs/models/components/chatmessagefragment.js.map +1 -1
- package/dist/commonjs/models/components/importagentrequest.d.ts +1 -1
- package/dist/commonjs/models/components/servertoolrequest.d.ts +4 -0
- package/dist/commonjs/models/components/servertoolrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/servertoolrequest.js +4 -0
- package/dist/commonjs/models/components/servertoolrequest.js.map +1 -1
- package/dist/commonjs/models/components/servertoolresponse.d.ts +7 -0
- package/dist/commonjs/models/components/servertoolresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/servertoolresponse.js +4 -0
- package/dist/commonjs/models/components/servertoolresponse.js.map +1 -1
- package/dist/commonjs/react-query/clientAgentsList.d.ts +2 -0
- package/dist/commonjs/react-query/clientAgentsList.d.ts.map +1 -1
- package/dist/commonjs/react-query/clientAgentsList.js +2 -0
- package/dist/commonjs/react-query/clientAgentsList.js.map +1 -1
- package/dist/commonjs/react-query/clientAgentsRetrieve.d.ts +4 -0
- package/dist/commonjs/react-query/clientAgentsRetrieve.d.ts.map +1 -1
- package/dist/commonjs/react-query/clientAgentsRetrieve.js +4 -0
- package/dist/commonjs/react-query/clientAgentsRetrieve.js.map +1 -1
- package/dist/commonjs/react-query/clientAgentsRetrieveSchemas.d.ts +4 -0
- package/dist/commonjs/react-query/clientAgentsRetrieveSchemas.d.ts.map +1 -1
- package/dist/commonjs/react-query/clientAgentsRetrieveSchemas.js +4 -0
- package/dist/commonjs/react-query/clientAgentsRetrieveSchemas.js.map +1 -1
- package/dist/commonjs/react-query/clientAgentsRun.d.ts +2 -0
- package/dist/commonjs/react-query/clientAgentsRun.d.ts.map +1 -1
- package/dist/commonjs/react-query/clientAgentsRun.js +2 -0
- package/dist/commonjs/react-query/clientAgentsRun.js.map +1 -1
- package/dist/commonjs/react-query/clientAgentsRunStream.d.ts +2 -0
- package/dist/commonjs/react-query/clientAgentsRunStream.d.ts.map +1 -1
- package/dist/commonjs/react-query/clientAgentsRunStream.js +2 -0
- package/dist/commonjs/react-query/clientAgentsRunStream.js.map +1 -1
- package/dist/commonjs/sdk/clientagents.d.ts +10 -0
- package/dist/commonjs/sdk/clientagents.d.ts.map +1 -1
- package/dist/commonjs/sdk/clientagents.js +10 -0
- package/dist/commonjs/sdk/clientagents.js.map +1 -1
- package/dist/esm/__tests__/agents.test.js +6 -1
- package/dist/esm/__tests__/agents.test.js.map +1 -1
- package/dist/esm/__tests__/chat.test.js +1 -1
- package/dist/esm/__tests__/chat.test.js.map +1 -1
- package/dist/esm/__tests__/skills.test.js +3 -3
- package/dist/esm/__tests__/skills.test.js.map +1 -1
- package/dist/esm/__tests__/summarize.test.js +4 -2
- package/dist/esm/__tests__/summarize.test.js.map +1 -1
- package/dist/esm/funcs/clientAgentsList.d.ts +2 -0
- package/dist/esm/funcs/clientAgentsList.d.ts.map +1 -1
- package/dist/esm/funcs/clientAgentsList.js +2 -0
- package/dist/esm/funcs/clientAgentsList.js.map +1 -1
- package/dist/esm/funcs/clientAgentsRetrieve.d.ts +2 -0
- package/dist/esm/funcs/clientAgentsRetrieve.d.ts.map +1 -1
- package/dist/esm/funcs/clientAgentsRetrieve.js +2 -0
- package/dist/esm/funcs/clientAgentsRetrieve.js.map +1 -1
- package/dist/esm/funcs/clientAgentsRetrieveSchemas.d.ts +2 -0
- package/dist/esm/funcs/clientAgentsRetrieveSchemas.d.ts.map +1 -1
- package/dist/esm/funcs/clientAgentsRetrieveSchemas.js +2 -0
- package/dist/esm/funcs/clientAgentsRetrieveSchemas.js.map +1 -1
- package/dist/esm/funcs/clientAgentsRun.d.ts +2 -0
- package/dist/esm/funcs/clientAgentsRun.d.ts.map +1 -1
- package/dist/esm/funcs/clientAgentsRun.js +2 -0
- package/dist/esm/funcs/clientAgentsRun.js.map +1 -1
- package/dist/esm/funcs/clientAgentsRunStream.d.ts +2 -0
- package/dist/esm/funcs/clientAgentsRunStream.d.ts.map +1 -1
- package/dist/esm/funcs/clientAgentsRunStream.js +2 -0
- package/dist/esm/funcs/clientAgentsRunStream.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/encodings.d.ts +10 -9
- package/dist/esm/lib/encodings.d.ts.map +1 -1
- package/dist/esm/lib/encodings.js +29 -13
- package/dist/esm/lib/encodings.js.map +1 -1
- package/dist/esm/models/components/chatmessagefragment.d.ts +3 -0
- package/dist/esm/models/components/chatmessagefragment.d.ts.map +1 -1
- package/dist/esm/models/components/chatmessagefragment.js.map +1 -1
- package/dist/esm/models/components/importagentrequest.d.ts +1 -1
- package/dist/esm/models/components/servertoolrequest.d.ts +4 -0
- package/dist/esm/models/components/servertoolrequest.d.ts.map +1 -1
- package/dist/esm/models/components/servertoolrequest.js +4 -0
- package/dist/esm/models/components/servertoolrequest.js.map +1 -1
- package/dist/esm/models/components/servertoolresponse.d.ts +7 -0
- package/dist/esm/models/components/servertoolresponse.d.ts.map +1 -1
- package/dist/esm/models/components/servertoolresponse.js +4 -0
- package/dist/esm/models/components/servertoolresponse.js.map +1 -1
- package/dist/esm/react-query/clientAgentsList.d.ts +2 -0
- package/dist/esm/react-query/clientAgentsList.d.ts.map +1 -1
- package/dist/esm/react-query/clientAgentsList.js +2 -0
- package/dist/esm/react-query/clientAgentsList.js.map +1 -1
- package/dist/esm/react-query/clientAgentsRetrieve.d.ts +4 -0
- package/dist/esm/react-query/clientAgentsRetrieve.d.ts.map +1 -1
- package/dist/esm/react-query/clientAgentsRetrieve.js +4 -0
- package/dist/esm/react-query/clientAgentsRetrieve.js.map +1 -1
- package/dist/esm/react-query/clientAgentsRetrieveSchemas.d.ts +4 -0
- package/dist/esm/react-query/clientAgentsRetrieveSchemas.d.ts.map +1 -1
- package/dist/esm/react-query/clientAgentsRetrieveSchemas.js +4 -0
- package/dist/esm/react-query/clientAgentsRetrieveSchemas.js.map +1 -1
- package/dist/esm/react-query/clientAgentsRun.d.ts +2 -0
- package/dist/esm/react-query/clientAgentsRun.d.ts.map +1 -1
- package/dist/esm/react-query/clientAgentsRun.js +2 -0
- package/dist/esm/react-query/clientAgentsRun.js.map +1 -1
- package/dist/esm/react-query/clientAgentsRunStream.d.ts +2 -0
- package/dist/esm/react-query/clientAgentsRunStream.d.ts.map +1 -1
- package/dist/esm/react-query/clientAgentsRunStream.js +2 -0
- package/dist/esm/react-query/clientAgentsRunStream.js.map +1 -1
- package/dist/esm/sdk/clientagents.d.ts +10 -0
- package/dist/esm/sdk/clientagents.d.ts.map +1 -1
- package/dist/esm/sdk/clientagents.js +10 -0
- package/dist/esm/sdk/clientagents.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/agents.test.ts +6 -1
- package/src/__tests__/chat.test.ts +1 -1
- package/src/__tests__/skills.test.ts +3 -3
- package/src/__tests__/summarize.test.ts +4 -2
- package/src/funcs/clientAgentsList.ts +2 -0
- package/src/funcs/clientAgentsRetrieve.ts +2 -0
- package/src/funcs/clientAgentsRetrieveSchemas.ts +2 -0
- package/src/funcs/clientAgentsRun.ts +2 -0
- package/src/funcs/clientAgentsRunStream.ts +2 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +58 -23
- package/src/models/components/chatmessagefragment.ts +3 -0
- package/src/models/components/importagentrequest.ts +1 -1
- package/src/models/components/servertoolrequest.ts +4 -0
- package/src/models/components/servertoolresponse.ts +7 -0
- package/src/react-query/clientAgentsList.ts +2 -0
- package/src/react-query/clientAgentsRetrieve.ts +4 -0
- package/src/react-query/clientAgentsRetrieveSchemas.ts +4 -0
- package/src/react-query/clientAgentsRun.ts +2 -0
- package/src/react-query/clientAgentsRunStream.ts +2 -0
- package/src/sdk/clientagents.ts +10 -0
|
@@ -13,6 +13,8 @@ export declare class ClientAgents extends ClientSDK {
|
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
16
|
+
*
|
|
17
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use GET /api/agents/{agent_id} instead..
|
|
16
18
|
*/
|
|
17
19
|
retrieve(agentId: string, locale?: string | undefined, timezoneOffset?: number | undefined, options?: RequestOptions): Promise<components.Agent>;
|
|
18
20
|
/**
|
|
@@ -27,6 +29,8 @@ export declare class ClientAgents extends ClientSDK {
|
|
|
27
29
|
*
|
|
28
30
|
* @remarks
|
|
29
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
|
+
*
|
|
33
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use GET /api/agents/{agent_id}/schemas instead..
|
|
30
34
|
*/
|
|
31
35
|
retrieveSchemas(agentId: string, locale?: string | undefined, timezoneOffset?: number | undefined, options?: RequestOptions): Promise<components.AgentSchemas>;
|
|
32
36
|
/**
|
|
@@ -41,6 +45,8 @@ export declare class ClientAgents extends ClientSDK {
|
|
|
41
45
|
*
|
|
42
46
|
* @remarks
|
|
43
47
|
* Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
|
|
48
|
+
*
|
|
49
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use POST /api/agents/search instead..
|
|
44
50
|
*/
|
|
45
51
|
list(request: components.SearchAgentsRequest, options?: RequestOptions): Promise<components.SearchAgentsResponse>;
|
|
46
52
|
/**
|
|
@@ -48,6 +54,8 @@ export declare class ClientAgents extends ClientSDK {
|
|
|
48
54
|
*
|
|
49
55
|
* @remarks
|
|
50
56
|
* 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.
|
|
57
|
+
*
|
|
58
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use POST /api/agents/{agent_id}/runs with stream=true instead..
|
|
51
59
|
*/
|
|
52
60
|
runStream(request: components.AgentRunCreate, options?: RequestOptions): Promise<string>;
|
|
53
61
|
/**
|
|
@@ -55,6 +63,8 @@ export declare class ClientAgents extends ClientSDK {
|
|
|
55
63
|
*
|
|
56
64
|
* @remarks
|
|
57
65
|
* 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.
|
|
66
|
+
*
|
|
67
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use POST /api/agents/{agent_id}/runs instead..
|
|
58
68
|
*/
|
|
59
69
|
run(request: components.AgentRunCreate, options?: RequestOptions): Promise<components.AgentRunWaitResponse>;
|
|
60
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientagents.d.ts","sourceRoot":"","sources":["../../../src/sdk/clientagents.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,YAAa,SAAQ,SAAS;IACzC;;;;;OAKG;IACG,MAAM,CACV,qBAAqB,EAAE,UAAU,CAAC,qBAAqB,EACvD,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,EAC3B,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;IAUrC
|
|
1
|
+
{"version":3,"file":"clientagents.d.ts","sourceRoot":"","sources":["../../../src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AS,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAW1C;;;;;;;OAOG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAQ3C;;;;;;;OAOG;IACG,SAAS,CACb,OAAO,EAAE,UAAU,CAAC,cAAc,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC;IAQlB;;;;;;;OAOG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,cAAc,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC;CAO5C"}
|
|
@@ -27,6 +27,8 @@ export class ClientAgents extends ClientSDK {
|
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
29
|
* Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
30
|
+
*
|
|
31
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use GET /api/agents/{agent_id} instead..
|
|
30
32
|
*/
|
|
31
33
|
async retrieve(agentId, locale, timezoneOffset, options) {
|
|
32
34
|
return unwrapAsync(clientAgentsRetrieve(this, agentId, locale, timezoneOffset, options));
|
|
@@ -45,6 +47,8 @@ export class ClientAgents extends ClientSDK {
|
|
|
45
47
|
*
|
|
46
48
|
* @remarks
|
|
47
49
|
* 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.
|
|
50
|
+
*
|
|
51
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use GET /api/agents/{agent_id}/schemas instead..
|
|
48
52
|
*/
|
|
49
53
|
async retrieveSchemas(agentId, locale, timezoneOffset, options) {
|
|
50
54
|
return unwrapAsync(clientAgentsRetrieveSchemas(this, agentId, locale, timezoneOffset, options));
|
|
@@ -63,6 +67,8 @@ export class ClientAgents extends ClientSDK {
|
|
|
63
67
|
*
|
|
64
68
|
* @remarks
|
|
65
69
|
* Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
|
|
70
|
+
*
|
|
71
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use POST /api/agents/search instead..
|
|
66
72
|
*/
|
|
67
73
|
async list(request, options) {
|
|
68
74
|
return unwrapAsync(clientAgentsList(this, request, options));
|
|
@@ -72,6 +78,8 @@ export class ClientAgents extends ClientSDK {
|
|
|
72
78
|
*
|
|
73
79
|
* @remarks
|
|
74
80
|
* 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.
|
|
81
|
+
*
|
|
82
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use POST /api/agents/{agent_id}/runs with stream=true instead..
|
|
75
83
|
*/
|
|
76
84
|
async runStream(request, options) {
|
|
77
85
|
return unwrapAsync(clientAgentsRunStream(this, request, options));
|
|
@@ -81,6 +89,8 @@ export class ClientAgents extends ClientSDK {
|
|
|
81
89
|
*
|
|
82
90
|
* @remarks
|
|
83
91
|
* 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.
|
|
92
|
+
*
|
|
93
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use POST /api/agents/{agent_id}/runs instead..
|
|
84
94
|
*/
|
|
85
95
|
async run(request, options) {
|
|
86
96
|
return unwrapAsync(clientAgentsRun(this, request, options));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientagents.js","sourceRoot":"","sources":["../../../src/sdk/clientagents.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAA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cAAc,EACd,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,IAAI,CACR,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,gBAAgB,CACjC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,SAAS,CACb,OAAkC,EAClC,OAAwB;QAExB,OAAO,WAAW,CAAC,qBAAqB,CACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,GAAG,CACP,OAAkC,EAClC,OAAwB;QAExB,OAAO,WAAW,CAAC,eAAe,CAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -123,7 +123,12 @@ test("Agents Platform Agents Create Run", async () => {
|
|
|
123
123
|
messages: [
|
|
124
124
|
{
|
|
125
125
|
role: "USER",
|
|
126
|
-
content: [
|
|
126
|
+
content: [
|
|
127
|
+
{
|
|
128
|
+
text: "What is our parental leave policy?",
|
|
129
|
+
type: "text",
|
|
130
|
+
},
|
|
131
|
+
],
|
|
127
132
|
},
|
|
128
133
|
],
|
|
129
134
|
}, "<id>");
|
|
@@ -153,7 +153,7 @@ test("Skills Platform Skills Import", async () => {
|
|
|
153
153
|
|
|
154
154
|
const result = await glean.skills.import({
|
|
155
155
|
source_urls: [
|
|
156
|
-
"
|
|
156
|
+
"https://github.com/anthropics/skills/tree/main/skills/skill-creator",
|
|
157
157
|
],
|
|
158
158
|
});
|
|
159
159
|
expect(result).toBeDefined();
|
|
@@ -169,7 +169,7 @@ test("Skills Platform Skills Preview Source", async () => {
|
|
|
169
169
|
});
|
|
170
170
|
|
|
171
171
|
const result = await glean.skills.previewSource({
|
|
172
|
-
source_url: "https://
|
|
172
|
+
source_url: "https://github.com/anthropics/skills",
|
|
173
173
|
});
|
|
174
174
|
expect(result).toBeDefined();
|
|
175
175
|
});
|
|
@@ -184,7 +184,7 @@ test("Skills Platform Skills Update", async () => {
|
|
|
184
184
|
});
|
|
185
185
|
|
|
186
186
|
const result = await glean.skills.update({
|
|
187
|
-
status: "
|
|
187
|
+
status: "ENABLED",
|
|
188
188
|
}, "<id>");
|
|
189
189
|
expect(result).toBeDefined();
|
|
190
190
|
});
|
|
@@ -19,10 +19,12 @@ test("Summarize Summarize", async () => {
|
|
|
19
19
|
const result = await glean.client.documents.summarize({
|
|
20
20
|
documentSpecs: [
|
|
21
21
|
{
|
|
22
|
-
|
|
22
|
+
ugcType: "CHATS",
|
|
23
|
+
ugcId: "<id>",
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
|
-
|
|
26
|
+
ugcType: "ANSWERS",
|
|
27
|
+
contentId: 206423,
|
|
26
28
|
},
|
|
27
29
|
],
|
|
28
30
|
});
|
|
@@ -32,6 +32,8 @@ import { Result } from "../types/fp.js";
|
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
34
|
* Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
|
|
35
|
+
*
|
|
36
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use POST /api/agents/search instead..
|
|
35
37
|
*/
|
|
36
38
|
export function clientAgentsList(
|
|
37
39
|
client: GleanCore,
|
|
@@ -33,6 +33,8 @@ import { Result } from "../types/fp.js";
|
|
|
33
33
|
*
|
|
34
34
|
* @remarks
|
|
35
35
|
* Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
36
|
+
*
|
|
37
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use GET /api/agents/{agent_id} instead..
|
|
36
38
|
*/
|
|
37
39
|
export function clientAgentsRetrieve(
|
|
38
40
|
client: GleanCore,
|
|
@@ -33,6 +33,8 @@ import { Result } from "../types/fp.js";
|
|
|
33
33
|
*
|
|
34
34
|
* @remarks
|
|
35
35
|
* 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.
|
|
36
|
+
*
|
|
37
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use GET /api/agents/{agent_id}/schemas instead..
|
|
36
38
|
*/
|
|
37
39
|
export function clientAgentsRetrieveSchemas(
|
|
38
40
|
client: GleanCore,
|
|
@@ -32,6 +32,8 @@ import { Result } from "../types/fp.js";
|
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
34
|
* 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.
|
|
35
|
+
*
|
|
36
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use POST /api/agents/{agent_id}/runs instead..
|
|
35
37
|
*/
|
|
36
38
|
export function clientAgentsRun(
|
|
37
39
|
client: GleanCore,
|
|
@@ -33,6 +33,8 @@ import { Result } from "../types/fp.js";
|
|
|
33
33
|
*
|
|
34
34
|
* @remarks
|
|
35
35
|
* 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.
|
|
36
|
+
*
|
|
37
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use POST /api/agents/{agent_id}/runs with stream=true instead..
|
|
36
38
|
*/
|
|
37
39
|
export function clientAgentsRunStream(
|
|
38
40
|
client: GleanCore,
|
package/src/lib/config.ts
CHANGED
|
@@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
73
73
|
export const SDK_METADATA = {
|
|
74
74
|
language: "typescript",
|
|
75
75
|
openapiDocVersion: "0.9.0",
|
|
76
|
-
sdkVersion: "0.19.
|
|
77
|
-
genVersion: "2.
|
|
76
|
+
sdkVersion: "0.19.1",
|
|
77
|
+
genVersion: "2.933.0",
|
|
78
78
|
userAgent:
|
|
79
|
-
"speakeasy-sdk/typescript 0.19.
|
|
79
|
+
"speakeasy-sdk/typescript 0.19.1 2.933.0 0.9.0 @gleanwork/api-client",
|
|
80
80
|
} as const;
|
package/src/lib/encodings.ts
CHANGED
|
@@ -13,10 +13,41 @@ export class EncodingError extends Error {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
export type CharEncoding = "percent" | "percentExceptReserved" | "none";
|
|
17
|
+
|
|
18
|
+
const reservedEscapes = /%(2[346bcf]|3[abdf]|40|5[bd])/gi;
|
|
19
|
+
|
|
20
|
+
function encodeKeyChars(
|
|
21
|
+
v: string,
|
|
22
|
+
charEncoding: CharEncoding | undefined,
|
|
23
|
+
): string {
|
|
24
|
+
return encodeChars(
|
|
25
|
+
v,
|
|
26
|
+
charEncoding === "percentExceptReserved" ? "percent" : charEncoding,
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function encodeChars(
|
|
31
|
+
v: string,
|
|
32
|
+
charEncoding: CharEncoding | undefined,
|
|
33
|
+
): string {
|
|
34
|
+
switch (charEncoding) {
|
|
35
|
+
case "percent":
|
|
36
|
+
return encodeURIComponent(v);
|
|
37
|
+
case "percentExceptReserved":
|
|
38
|
+
return encodeURIComponent(v).replace(
|
|
39
|
+
reservedEscapes,
|
|
40
|
+
(m) => decodeURIComponent(m),
|
|
41
|
+
);
|
|
42
|
+
default:
|
|
43
|
+
return v;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
16
47
|
export function encodeMatrix(
|
|
17
48
|
key: string,
|
|
18
49
|
value: unknown,
|
|
19
|
-
options?: { explode?: boolean; charEncoding?:
|
|
50
|
+
options?: { explode?: boolean; charEncoding?: CharEncoding },
|
|
20
51
|
): string | undefined {
|
|
21
52
|
let out = "";
|
|
22
53
|
const pairs: [string, unknown][] = options?.explode
|
|
@@ -28,7 +59,7 @@ export function encodeMatrix(
|
|
|
28
59
|
}
|
|
29
60
|
|
|
30
61
|
const encodeString = (v: string) => {
|
|
31
|
-
return options?.charEncoding
|
|
62
|
+
return encodeChars(v, options?.charEncoding);
|
|
32
63
|
};
|
|
33
64
|
const encodeValue = (v: unknown) => encodeString(serializeValue(v));
|
|
34
65
|
|
|
@@ -53,7 +84,7 @@ export function encodeMatrix(
|
|
|
53
84
|
return;
|
|
54
85
|
}
|
|
55
86
|
|
|
56
|
-
const keyPrefix =
|
|
87
|
+
const keyPrefix = encodeKeyChars(pk, options?.charEncoding);
|
|
57
88
|
tmp = `${keyPrefix}=${encValue}`;
|
|
58
89
|
// trim trailing '=' if value was empty
|
|
59
90
|
if (tmp === `${keyPrefix}=`) {
|
|
@@ -74,7 +105,7 @@ export function encodeMatrix(
|
|
|
74
105
|
export function encodeLabel(
|
|
75
106
|
key: string,
|
|
76
107
|
value: unknown,
|
|
77
|
-
options?: { explode?: boolean; charEncoding?:
|
|
108
|
+
options?: { explode?: boolean; charEncoding?: CharEncoding },
|
|
78
109
|
): string | undefined {
|
|
79
110
|
let out = "";
|
|
80
111
|
const pairs: [string, unknown][] = options?.explode
|
|
@@ -86,7 +117,7 @@ export function encodeLabel(
|
|
|
86
117
|
}
|
|
87
118
|
|
|
88
119
|
const encodeString = (v: string) => {
|
|
89
|
-
return options?.charEncoding
|
|
120
|
+
return encodeChars(v, options?.charEncoding);
|
|
90
121
|
};
|
|
91
122
|
const encodeValue = (v: unknown) => encodeString(serializeValue(v));
|
|
92
123
|
|
|
@@ -104,7 +135,7 @@ export function encodeLabel(
|
|
|
104
135
|
encValue = mapped?.join("").slice(1);
|
|
105
136
|
} else {
|
|
106
137
|
const k = options?.explode && isPlainObject(value)
|
|
107
|
-
? `${
|
|
138
|
+
? `${encodeKeyChars(pk, options?.charEncoding)}=`
|
|
108
139
|
: "";
|
|
109
140
|
encValue = `${k}${encodeValue(pv)}`;
|
|
110
141
|
}
|
|
@@ -118,14 +149,14 @@ export function encodeLabel(
|
|
|
118
149
|
type FormEncoder = (
|
|
119
150
|
key: string,
|
|
120
151
|
value: unknown,
|
|
121
|
-
options?: { explode?: boolean; charEncoding?:
|
|
152
|
+
options?: { explode?: boolean; charEncoding?: CharEncoding },
|
|
122
153
|
) => string | undefined;
|
|
123
154
|
|
|
124
155
|
function formEncoder(sep: string): FormEncoder {
|
|
125
156
|
return (
|
|
126
157
|
key: string,
|
|
127
158
|
value: unknown,
|
|
128
|
-
options?: { explode?: boolean; charEncoding?:
|
|
159
|
+
options?: { explode?: boolean; charEncoding?: CharEncoding },
|
|
129
160
|
) => {
|
|
130
161
|
let out = "";
|
|
131
162
|
const pairs: [string, unknown][] = options?.explode
|
|
@@ -137,7 +168,7 @@ function formEncoder(sep: string): FormEncoder {
|
|
|
137
168
|
}
|
|
138
169
|
|
|
139
170
|
const encodeString = (v: string) => {
|
|
140
|
-
return options?.charEncoding
|
|
171
|
+
return encodeChars(v, options?.charEncoding);
|
|
141
172
|
};
|
|
142
173
|
|
|
143
174
|
const encodeValue = (v: unknown) => encodeString(serializeValue(v));
|
|
@@ -164,7 +195,7 @@ function formEncoder(sep: string): FormEncoder {
|
|
|
164
195
|
return;
|
|
165
196
|
}
|
|
166
197
|
|
|
167
|
-
tmp = `${
|
|
198
|
+
tmp = `${encodeKeyChars(pk, options?.charEncoding)}=${encValue}`;
|
|
168
199
|
|
|
169
200
|
// If we end up with the nothing then skip forward
|
|
170
201
|
if (!tmp || tmp === "=") {
|
|
@@ -185,7 +216,7 @@ export const encodePipeDelimited = formEncoder("|");
|
|
|
185
216
|
export function encodeBodyForm(
|
|
186
217
|
key: string,
|
|
187
218
|
value: unknown,
|
|
188
|
-
options?: { explode?: boolean; charEncoding?:
|
|
219
|
+
options?: { explode?: boolean; charEncoding?: CharEncoding },
|
|
189
220
|
): string {
|
|
190
221
|
let out = "";
|
|
191
222
|
const pairs: [string, unknown][] = options?.explode
|
|
@@ -193,7 +224,7 @@ export function encodeBodyForm(
|
|
|
193
224
|
: [[key, value]];
|
|
194
225
|
|
|
195
226
|
const encodeString = (v: string) => {
|
|
196
|
-
return options?.charEncoding
|
|
227
|
+
return encodeChars(v, options?.charEncoding);
|
|
197
228
|
};
|
|
198
229
|
|
|
199
230
|
const encodeValue = (v: unknown) => encodeString(serializeValue(v));
|
|
@@ -212,7 +243,7 @@ export function encodeBodyForm(
|
|
|
212
243
|
encValue = `${encodeValue(pv)}`;
|
|
213
244
|
}
|
|
214
245
|
|
|
215
|
-
tmp = `${
|
|
246
|
+
tmp = `${encodeKeyChars(pk, options?.charEncoding)}=${encValue}`;
|
|
216
247
|
|
|
217
248
|
// If we end up with the nothing then skip forward
|
|
218
249
|
if (!tmp || tmp === "=") {
|
|
@@ -228,7 +259,7 @@ export function encodeBodyForm(
|
|
|
228
259
|
export function encodeDeepObject(
|
|
229
260
|
key: string,
|
|
230
261
|
value: unknown,
|
|
231
|
-
options?: { charEncoding?:
|
|
262
|
+
options?: { charEncoding?: CharEncoding },
|
|
232
263
|
): string | undefined {
|
|
233
264
|
if (value == null) {
|
|
234
265
|
return;
|
|
@@ -246,7 +277,7 @@ export function encodeDeepObject(
|
|
|
246
277
|
export function encodeDeepObjectObject(
|
|
247
278
|
key: string,
|
|
248
279
|
value: unknown,
|
|
249
|
-
options?: { charEncoding?:
|
|
280
|
+
options?: { charEncoding?: CharEncoding },
|
|
250
281
|
): string | undefined {
|
|
251
282
|
if (value == null) {
|
|
252
283
|
return;
|
|
@@ -255,7 +286,7 @@ export function encodeDeepObjectObject(
|
|
|
255
286
|
let out = "";
|
|
256
287
|
|
|
257
288
|
const encodeString = (v: string) => {
|
|
258
|
-
return options?.charEncoding
|
|
289
|
+
return encodeChars(v, options?.charEncoding);
|
|
259
290
|
};
|
|
260
291
|
|
|
261
292
|
if (!isPlainObject(value)) {
|
|
@@ -279,7 +310,9 @@ export function encodeDeepObjectObject(
|
|
|
279
310
|
|
|
280
311
|
const pairs: unknown[] = Array.isArray(cv) ? cv : [cv];
|
|
281
312
|
const encoded = mapDefined(pairs, (v) => {
|
|
282
|
-
return `${
|
|
313
|
+
return `${encodeKeyChars(pk, options?.charEncoding)}=${
|
|
314
|
+
encodeString(serializeValue(v))
|
|
315
|
+
}`;
|
|
283
316
|
})?.join("&");
|
|
284
317
|
|
|
285
318
|
out += encoded == null ? "" : `&${encoded}`;
|
|
@@ -291,25 +324,27 @@ export function encodeDeepObjectObject(
|
|
|
291
324
|
export function encodeJSON(
|
|
292
325
|
key: string,
|
|
293
326
|
value: unknown,
|
|
294
|
-
options?: { explode?: boolean; charEncoding?:
|
|
327
|
+
options?: { explode?: boolean; charEncoding?: CharEncoding },
|
|
295
328
|
): string | undefined {
|
|
296
329
|
if (typeof value === "undefined") {
|
|
297
330
|
return;
|
|
298
331
|
}
|
|
299
332
|
|
|
300
333
|
const encodeString = (v: string) => {
|
|
301
|
-
return options?.charEncoding
|
|
334
|
+
return encodeChars(v, options?.charEncoding);
|
|
302
335
|
};
|
|
303
336
|
|
|
304
337
|
const encVal = encodeString(JSON.stringify(value, jsonReplacer));
|
|
305
338
|
|
|
306
|
-
return options?.explode
|
|
339
|
+
return options?.explode
|
|
340
|
+
? encVal
|
|
341
|
+
: `${encodeKeyChars(key, options?.charEncoding)}=${encVal}`;
|
|
307
342
|
}
|
|
308
343
|
|
|
309
344
|
export const encodeSimple = (
|
|
310
345
|
key: string,
|
|
311
346
|
value: unknown,
|
|
312
|
-
options?: { explode?: boolean; charEncoding?:
|
|
347
|
+
options?: { explode?: boolean; charEncoding?: CharEncoding },
|
|
313
348
|
): string | undefined => {
|
|
314
349
|
let out = "";
|
|
315
350
|
const pairs: [string, unknown][] = options?.explode
|
|
@@ -321,7 +356,7 @@ export const encodeSimple = (
|
|
|
321
356
|
}
|
|
322
357
|
|
|
323
358
|
const encodeString = (v: string) => {
|
|
324
|
-
return options?.charEncoding
|
|
359
|
+
return encodeChars(v, options?.charEncoding);
|
|
325
360
|
};
|
|
326
361
|
const encodeValue = (v: unknown) => encodeString(serializeValue(v));
|
|
327
362
|
|
|
@@ -427,7 +462,7 @@ export function queryJoin(...args: (string | undefined)[]): string {
|
|
|
427
462
|
|
|
428
463
|
type QueryEncoderOptions = {
|
|
429
464
|
explode?: boolean;
|
|
430
|
-
charEncoding?:
|
|
465
|
+
charEncoding?: CharEncoding;
|
|
431
466
|
allowEmptyValue?: string[];
|
|
432
467
|
};
|
|
433
468
|
|
|
@@ -90,6 +90,9 @@ export type ChatMessageFragment = {
|
|
|
90
90
|
*
|
|
91
91
|
* For VOTE_SUGGESTION requests:
|
|
92
92
|
* - voted: whether the user voted for this tool
|
|
93
|
+
*
|
|
94
|
+
* For SANDBOX_EGRESS requests:
|
|
95
|
+
* - isGranted: whether the sandbox egress call is approved
|
|
93
96
|
*/
|
|
94
97
|
serverToolResponse?: ServerToolResponse | undefined;
|
|
95
98
|
};
|
|
@@ -41,7 +41,7 @@ export type ImportAgentRequest = {
|
|
|
41
41
|
*/
|
|
42
42
|
syncMode?: ImportAgentSyncMode | undefined;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Deprecated. Draft mutation semantics are not supported for transient previews. Use transient and parentWorkflowId instead.
|
|
45
45
|
*
|
|
46
46
|
* @remarks
|
|
47
47
|
*/
|
|
@@ -32,6 +32,10 @@ export const ServerToolRequestRequestType = {
|
|
|
32
32
|
* Suggestion to vote for enabling an available-but-not-enabled tool.
|
|
33
33
|
*/
|
|
34
34
|
VoteSuggestion: "VOTE_SUGGESTION",
|
|
35
|
+
/**
|
|
36
|
+
* Request to approve an outbound/egress call from the sandbox.
|
|
37
|
+
*/
|
|
38
|
+
SandboxEgress: "SANDBOX_EGRESS",
|
|
35
39
|
} as const;
|
|
36
40
|
/**
|
|
37
41
|
* The type of request made to the user.
|
|
@@ -32,6 +32,10 @@ export const ServerToolResponseRequestType = {
|
|
|
32
32
|
* Suggestion to vote for enabling an available-but-not-enabled tool.
|
|
33
33
|
*/
|
|
34
34
|
VoteSuggestion: "VOTE_SUGGESTION",
|
|
35
|
+
/**
|
|
36
|
+
* Request to approve an outbound/egress call from the sandbox.
|
|
37
|
+
*/
|
|
38
|
+
SandboxEgress: "SANDBOX_EGRESS",
|
|
35
39
|
} as const;
|
|
36
40
|
/**
|
|
37
41
|
* The type of request made to the user.
|
|
@@ -82,6 +86,9 @@ export type GrantScope = OpenEnum<typeof GrantScope>;
|
|
|
82
86
|
*
|
|
83
87
|
* For VOTE_SUGGESTION requests:
|
|
84
88
|
* - voted: whether the user voted for this tool
|
|
89
|
+
*
|
|
90
|
+
* For SANDBOX_EGRESS requests:
|
|
91
|
+
* - isGranted: whether the sandbox egress call is approved
|
|
85
92
|
*/
|
|
86
93
|
export type ServerToolResponse = {
|
|
87
94
|
/**
|
|
@@ -51,6 +51,8 @@ export type ClientAgentsListMutationError =
|
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
53
|
* Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
|
|
54
|
+
*
|
|
55
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use POST /api/agents/search instead..
|
|
54
56
|
*/
|
|
55
57
|
export function useClientAgentsListMutation(
|
|
56
58
|
options?: MutationHookOptions<
|
|
@@ -57,6 +57,8 @@ export type ClientAgentsRetrieveQueryError =
|
|
|
57
57
|
*
|
|
58
58
|
* @remarks
|
|
59
59
|
* Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
60
|
+
*
|
|
61
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use GET /api/agents/{agent_id} instead..
|
|
60
62
|
*/
|
|
61
63
|
export function useClientAgentsRetrieve(
|
|
62
64
|
agentId: string,
|
|
@@ -88,6 +90,8 @@ export function useClientAgentsRetrieve(
|
|
|
88
90
|
*
|
|
89
91
|
* @remarks
|
|
90
92
|
* Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
93
|
+
*
|
|
94
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use GET /api/agents/{agent_id} instead..
|
|
91
95
|
*/
|
|
92
96
|
export function useClientAgentsRetrieveSuspense(
|
|
93
97
|
agentId: string,
|
|
@@ -57,6 +57,8 @@ export type ClientAgentsRetrieveSchemasQueryError =
|
|
|
57
57
|
*
|
|
58
58
|
* @remarks
|
|
59
59
|
* 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.
|
|
60
|
+
*
|
|
61
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use GET /api/agents/{agent_id}/schemas instead..
|
|
60
62
|
*/
|
|
61
63
|
export function useClientAgentsRetrieveSchemas(
|
|
62
64
|
agentId: string,
|
|
@@ -88,6 +90,8 @@ export function useClientAgentsRetrieveSchemas(
|
|
|
88
90
|
*
|
|
89
91
|
* @remarks
|
|
90
92
|
* 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.
|
|
93
|
+
*
|
|
94
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use GET /api/agents/{agent_id}/schemas instead..
|
|
91
95
|
*/
|
|
92
96
|
export function useClientAgentsRetrieveSchemasSuspense(
|
|
93
97
|
agentId: string,
|
|
@@ -51,6 +51,8 @@ export type ClientAgentsRunMutationError =
|
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
53
|
* 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.
|
|
54
|
+
*
|
|
55
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use POST /api/agents/{agent_id}/runs instead..
|
|
54
56
|
*/
|
|
55
57
|
export function useClientAgentsRunMutation(
|
|
56
58
|
options?: MutationHookOptions<
|
|
@@ -52,6 +52,8 @@ export type ClientAgentsRunStreamMutationError =
|
|
|
52
52
|
*
|
|
53
53
|
* @remarks
|
|
54
54
|
* 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.
|
|
55
|
+
*
|
|
56
|
+
* @deprecated method: Deprecated on 2026-08-25, removal scheduled for 2027-04-15: Use POST /api/agents/{agent_id}/runs with stream=true instead..
|
|
55
57
|
*/
|
|
56
58
|
export function useClientAgentsRunStreamMutation(
|
|
57
59
|
options?: MutationHookOptions<
|