@meetkai/mka1 0.54.82 → 0.54.84
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 +310 -304
- package/bin/mcp-server.js +3377 -2975
- package/bin/mcp-server.js.map +18 -10
- package/dist/commonjs/funcs/agentsCreateAgent.d.ts +18 -0
- package/dist/commonjs/funcs/agentsCreateAgent.d.ts.map +1 -0
- package/dist/commonjs/funcs/agentsCreateAgent.js +132 -0
- package/dist/commonjs/funcs/agentsCreateAgent.js.map +1 -0
- package/dist/commonjs/funcs/agentsUpdateAgent.d.ts +18 -0
- package/dist/commonjs/funcs/agentsUpdateAgent.d.ts.map +1 -0
- package/dist/commonjs/funcs/agentsUpdateAgent.js +138 -0
- package/dist/commonjs/funcs/agentsUpdateAgent.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +5 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/agentsCreateAgent.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/agentsCreateAgent.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/agentsCreateAgent.js +62 -0
- package/dist/commonjs/mcp-server/tools/agentsCreateAgent.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/agentsUpdateAgent.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/agentsUpdateAgent.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/agentsUpdateAgent.js +62 -0
- package/dist/commonjs/mcp-server/tools/agentsUpdateAgent.js.map +1 -0
- package/dist/commonjs/models/components/computestandalonevolume.d.ts +6 -0
- package/dist/commonjs/models/components/computestandalonevolume.d.ts.map +1 -1
- package/dist/commonjs/models/components/computestandalonevolume.js +3 -0
- package/dist/commonjs/models/components/computestandalonevolume.js.map +1 -1
- package/dist/commonjs/models/components/computestandalonevolumecreate.d.ts +6 -0
- package/dist/commonjs/models/components/computestandalonevolumecreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/computestandalonevolumecreate.js +3 -0
- package/dist/commonjs/models/components/computestandalonevolumecreate.js.map +1 -1
- package/dist/commonjs/models/components/createagentrequest.d.ts +47 -0
- package/dist/commonjs/models/components/createagentrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/createagentrequest.js +94 -0
- package/dist/commonjs/models/components/createagentrequest.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +2 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/updateagentrequest.d.ts +50 -0
- package/dist/commonjs/models/components/updateagentrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/updateagentrequest.js +94 -0
- package/dist/commonjs/models/components/updateagentrequest.js.map +1 -0
- package/dist/commonjs/models/operations/createagent.d.ts +23 -0
- package/dist/commonjs/models/operations/createagent.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createagent.js +72 -0
- package/dist/commonjs/models/operations/createagent.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/updateagent.d.ts +25 -0
- package/dist/commonjs/models/operations/updateagent.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updateagent.js +76 -0
- package/dist/commonjs/models/operations/updateagent.js.map +1 -0
- package/dist/commonjs/react-query/agentsCreateAgent.d.ts +27 -0
- package/dist/commonjs/react-query/agentsCreateAgent.d.ts.map +1 -0
- package/dist/commonjs/react-query/agentsCreateAgent.js +44 -0
- package/dist/commonjs/react-query/agentsCreateAgent.js.map +1 -0
- package/dist/commonjs/react-query/agentsUpdateAgent.d.ts +27 -0
- package/dist/commonjs/react-query/agentsUpdateAgent.d.ts.map +1 -0
- package/dist/commonjs/react-query/agentsUpdateAgent.js +44 -0
- package/dist/commonjs/react-query/agentsUpdateAgent.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +2 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +2 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/sdk/agents.d.ts +8 -0
- package/dist/commonjs/sdk/agents.d.ts.map +1 -1
- package/dist/commonjs/sdk/agents.js +14 -0
- package/dist/commonjs/sdk/agents.js.map +1 -1
- package/dist/esm/funcs/agentsCreateAgent.d.ts +18 -0
- package/dist/esm/funcs/agentsCreateAgent.d.ts.map +1 -0
- package/dist/esm/funcs/agentsCreateAgent.js +96 -0
- package/dist/esm/funcs/agentsCreateAgent.js.map +1 -0
- package/dist/esm/funcs/agentsUpdateAgent.d.ts +18 -0
- package/dist/esm/funcs/agentsUpdateAgent.d.ts.map +1 -0
- package/dist/esm/funcs/agentsUpdateAgent.js +102 -0
- package/dist/esm/funcs/agentsUpdateAgent.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +5 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/agentsCreateAgent.d.ts +8 -0
- package/dist/esm/mcp-server/tools/agentsCreateAgent.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/agentsCreateAgent.js +26 -0
- package/dist/esm/mcp-server/tools/agentsCreateAgent.js.map +1 -0
- package/dist/esm/mcp-server/tools/agentsUpdateAgent.d.ts +8 -0
- package/dist/esm/mcp-server/tools/agentsUpdateAgent.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/agentsUpdateAgent.js +26 -0
- package/dist/esm/mcp-server/tools/agentsUpdateAgent.js.map +1 -0
- package/dist/esm/models/components/computestandalonevolume.d.ts +6 -0
- package/dist/esm/models/components/computestandalonevolume.d.ts.map +1 -1
- package/dist/esm/models/components/computestandalonevolume.js +3 -0
- package/dist/esm/models/components/computestandalonevolume.js.map +1 -1
- package/dist/esm/models/components/computestandalonevolumecreate.d.ts +6 -0
- package/dist/esm/models/components/computestandalonevolumecreate.d.ts.map +1 -1
- package/dist/esm/models/components/computestandalonevolumecreate.js +3 -0
- package/dist/esm/models/components/computestandalonevolumecreate.js.map +1 -1
- package/dist/esm/models/components/createagentrequest.d.ts +47 -0
- package/dist/esm/models/components/createagentrequest.d.ts.map +1 -0
- package/dist/esm/models/components/createagentrequest.js +56 -0
- package/dist/esm/models/components/createagentrequest.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +2 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/updateagentrequest.d.ts +50 -0
- package/dist/esm/models/components/updateagentrequest.d.ts.map +1 -0
- package/dist/esm/models/components/updateagentrequest.js +56 -0
- package/dist/esm/models/components/updateagentrequest.js.map +1 -0
- package/dist/esm/models/operations/createagent.d.ts +23 -0
- package/dist/esm/models/operations/createagent.d.ts.map +1 -0
- package/dist/esm/models/operations/createagent.js +34 -0
- package/dist/esm/models/operations/createagent.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/updateagent.d.ts +25 -0
- package/dist/esm/models/operations/updateagent.d.ts.map +1 -0
- package/dist/esm/models/operations/updateagent.js +38 -0
- package/dist/esm/models/operations/updateagent.js.map +1 -0
- package/dist/esm/react-query/agentsCreateAgent.d.ts +27 -0
- package/dist/esm/react-query/agentsCreateAgent.d.ts.map +1 -0
- package/dist/esm/react-query/agentsCreateAgent.js +39 -0
- package/dist/esm/react-query/agentsCreateAgent.js.map +1 -0
- package/dist/esm/react-query/agentsUpdateAgent.d.ts +27 -0
- package/dist/esm/react-query/agentsUpdateAgent.d.ts.map +1 -0
- package/dist/esm/react-query/agentsUpdateAgent.js +39 -0
- package/dist/esm/react-query/agentsUpdateAgent.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +2 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +2 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/sdk/agents.d.ts +8 -0
- package/dist/esm/sdk/agents.d.ts.map +1 -1
- package/dist/esm/sdk/agents.js +14 -0
- package/dist/esm/sdk/agents.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/agentsCreateAgent.ts +188 -0
- package/src/funcs/agentsUpdateAgent.ts +194 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -1
- package/src/mcp-server/tools/agentsCreateAgent.ts +35 -0
- package/src/mcp-server/tools/agentsUpdateAgent.ts +35 -0
- package/src/models/components/computestandalonevolume.ts +13 -0
- package/src/models/components/computestandalonevolumecreate.ts +13 -0
- package/src/models/components/createagentrequest.ts +125 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/updateagentrequest.ts +128 -0
- package/src/models/operations/createagent.ts +70 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/updateagent.ts +76 -0
- package/src/react-query/agentsCreateAgent.ts +108 -0
- package/src/react-query/agentsUpdateAgent.ts +108 -0
- package/src/react-query/index.ts +2 -0
- package/src/sdk/agents.ts +30 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Update an agent
|
|
32
|
+
*
|
|
33
|
+
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
34
|
+
*/
|
|
35
|
+
export function agentsUpdateAgent(
|
|
36
|
+
client: SDKCore,
|
|
37
|
+
request: operations.UpdateAgentRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<
|
|
40
|
+
Result<
|
|
41
|
+
components.Agent,
|
|
42
|
+
| errors.ErrorEnvelope
|
|
43
|
+
| SDKError
|
|
44
|
+
| ResponseValidationError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| InvalidRequestError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| SDKValidationError
|
|
51
|
+
>
|
|
52
|
+
> {
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client,
|
|
55
|
+
request,
|
|
56
|
+
options,
|
|
57
|
+
));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function $do(
|
|
61
|
+
client: SDKCore,
|
|
62
|
+
request: operations.UpdateAgentRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
components.Agent,
|
|
68
|
+
| errors.ErrorEnvelope
|
|
69
|
+
| SDKError
|
|
70
|
+
| ResponseValidationError
|
|
71
|
+
| ConnectionError
|
|
72
|
+
| RequestAbortedError
|
|
73
|
+
| RequestTimeoutError
|
|
74
|
+
| InvalidRequestError
|
|
75
|
+
| UnexpectedClientError
|
|
76
|
+
| SDKValidationError
|
|
77
|
+
>,
|
|
78
|
+
APICall,
|
|
79
|
+
]
|
|
80
|
+
> {
|
|
81
|
+
const parsed = safeParse(
|
|
82
|
+
request,
|
|
83
|
+
(value) => operations.UpdateAgentRequest$outboundSchema.parse(value),
|
|
84
|
+
"Input validation failed",
|
|
85
|
+
);
|
|
86
|
+
if (!parsed.ok) {
|
|
87
|
+
return [parsed, { status: "invalid" }];
|
|
88
|
+
}
|
|
89
|
+
const payload = parsed.value;
|
|
90
|
+
const body = encodeJSON("body", payload.UpdateAgentRequest, {
|
|
91
|
+
explode: true,
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const pathParams = {
|
|
95
|
+
agent_id: encodeSimple("agent_id", payload.agent_id, {
|
|
96
|
+
explode: false,
|
|
97
|
+
charEncoding: "percent",
|
|
98
|
+
}),
|
|
99
|
+
};
|
|
100
|
+
const path = pathToFunc("/api/v1/agents/{agent_id}")(pathParams);
|
|
101
|
+
|
|
102
|
+
const headers = new Headers(compactMap({
|
|
103
|
+
"Content-Type": "application/json",
|
|
104
|
+
Accept: "application/json",
|
|
105
|
+
"X-On-Behalf-Of": encodeSimple(
|
|
106
|
+
"X-On-Behalf-Of",
|
|
107
|
+
payload["X-On-Behalf-Of"],
|
|
108
|
+
{ explode: false, charEncoding: "none" },
|
|
109
|
+
),
|
|
110
|
+
}));
|
|
111
|
+
|
|
112
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
113
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
114
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
115
|
+
|
|
116
|
+
const context = {
|
|
117
|
+
options: client._options,
|
|
118
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
119
|
+
operationID: "updateAgent",
|
|
120
|
+
oAuth2Scopes: null,
|
|
121
|
+
|
|
122
|
+
resolvedSecurity: requestSecurity,
|
|
123
|
+
|
|
124
|
+
securitySource: client._options.bearerAuth,
|
|
125
|
+
retryConfig: options?.retries
|
|
126
|
+
|| client._options.retryConfig
|
|
127
|
+
|| {
|
|
128
|
+
strategy: "backoff",
|
|
129
|
+
backoff: {
|
|
130
|
+
initialInterval: 500,
|
|
131
|
+
maxInterval: 5000,
|
|
132
|
+
exponent: 1.5,
|
|
133
|
+
maxElapsedTime: 15000,
|
|
134
|
+
},
|
|
135
|
+
retryConnectionErrors: true,
|
|
136
|
+
}
|
|
137
|
+
|| { strategy: "none" },
|
|
138
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const requestRes = client._createRequest(context, {
|
|
142
|
+
security: requestSecurity,
|
|
143
|
+
method: "POST",
|
|
144
|
+
baseURL: options?.serverURL,
|
|
145
|
+
path: path,
|
|
146
|
+
headers: headers,
|
|
147
|
+
body: body,
|
|
148
|
+
userAgent: client._options.userAgent,
|
|
149
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
150
|
+
}, options);
|
|
151
|
+
if (!requestRes.ok) {
|
|
152
|
+
return [requestRes, { status: "invalid" }];
|
|
153
|
+
}
|
|
154
|
+
const req = requestRes.value;
|
|
155
|
+
|
|
156
|
+
const doResult = await client._do(req, {
|
|
157
|
+
context,
|
|
158
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
159
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
160
|
+
retryConfig: context.retryConfig,
|
|
161
|
+
retryCodes: context.retryCodes,
|
|
162
|
+
});
|
|
163
|
+
if (!doResult.ok) {
|
|
164
|
+
return [doResult, { status: "request-error", request: req }];
|
|
165
|
+
}
|
|
166
|
+
const response = doResult.value;
|
|
167
|
+
|
|
168
|
+
const responseFields = {
|
|
169
|
+
HttpMeta: { Response: response, Request: req },
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const [result] = await M.match<
|
|
173
|
+
components.Agent,
|
|
174
|
+
| errors.ErrorEnvelope
|
|
175
|
+
| SDKError
|
|
176
|
+
| ResponseValidationError
|
|
177
|
+
| ConnectionError
|
|
178
|
+
| RequestAbortedError
|
|
179
|
+
| RequestTimeoutError
|
|
180
|
+
| InvalidRequestError
|
|
181
|
+
| UnexpectedClientError
|
|
182
|
+
| SDKValidationError
|
|
183
|
+
>(
|
|
184
|
+
M.json(200, components.Agent$inboundSchema),
|
|
185
|
+
M.jsonErr([400, 401, 404], errors.ErrorEnvelope$inboundSchema),
|
|
186
|
+
M.fail("4XX"),
|
|
187
|
+
M.fail("5XX"),
|
|
188
|
+
)(response, req, { extraFields: responseFields });
|
|
189
|
+
if (!result.ok) {
|
|
190
|
+
return [result, { status: "complete", request: req, response }];
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return [result, { status: "complete", request: req, response }];
|
|
194
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.1.0",
|
|
68
|
-
sdkVersion: "0.54.
|
|
69
|
-
genVersion: "2.
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.54.
|
|
68
|
+
sdkVersion: "0.54.84",
|
|
69
|
+
genVersion: "2.948.4",
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.54.84 2.948.4 1.1.0 @meetkai/mka1",
|
|
71
71
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -32,9 +32,11 @@ import { tool$agentSchedulesListAgentSchedules } from "./tools/agentSchedulesLis
|
|
|
32
32
|
import { tool$agentSchedulesPauseAgentSchedule } from "./tools/agentSchedulesPauseAgentSchedule.js";
|
|
33
33
|
import { tool$agentSchedulesResumeAgentSchedule } from "./tools/agentSchedulesResumeAgentSchedule.js";
|
|
34
34
|
import { tool$agentSchedulesUpdateAgentSchedule } from "./tools/agentSchedulesUpdateAgentSchedule.js";
|
|
35
|
+
import { tool$agentsCreateAgent } from "./tools/agentsCreateAgent.js";
|
|
35
36
|
import { tool$agentsDeleteAgent } from "./tools/agentsDeleteAgent.js";
|
|
36
37
|
import { tool$agentsGetAgent } from "./tools/agentsGetAgent.js";
|
|
37
38
|
import { tool$agentsListAgents } from "./tools/agentsListAgents.js";
|
|
39
|
+
import { tool$agentsUpdateAgent } from "./tools/agentsUpdateAgent.js";
|
|
38
40
|
import { tool$agentVersionsGetAgentVersion } from "./tools/agentVersionsGetAgentVersion.js";
|
|
39
41
|
import { tool$agentVersionsListAgentVersions } from "./tools/agentVersionsListAgentVersions.js";
|
|
40
42
|
import { tool$agentVersionsRollbackAgentVersion } from "./tools/agentVersionsRollbackAgentVersion.js";
|
|
@@ -472,7 +474,7 @@ export function createMCPServer(deps: {
|
|
|
472
474
|
}) {
|
|
473
475
|
const server = new McpServer({
|
|
474
476
|
name: "SDK",
|
|
475
|
-
version: "0.54.
|
|
477
|
+
version: "0.54.84",
|
|
476
478
|
});
|
|
477
479
|
|
|
478
480
|
const client = new SDKCore({
|
|
@@ -525,7 +527,9 @@ export function createMCPServer(deps: {
|
|
|
525
527
|
tool(tool$usageSandbox);
|
|
526
528
|
tool(tool$usageCosts);
|
|
527
529
|
tool(tool$agentsListAgents);
|
|
530
|
+
tool(tool$agentsCreateAgent);
|
|
528
531
|
tool(tool$agentsGetAgent);
|
|
532
|
+
tool(tool$agentsUpdateAgent);
|
|
529
533
|
tool(tool$agentsDeleteAgent);
|
|
530
534
|
tool(tool$agentConnectorsListAgentConnectors);
|
|
531
535
|
tool(tool$agentConnectorsCreateAgentConnector);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { agentsCreateAgent } from "../../funcs/agentsCreateAgent.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.CreateAgentRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$agentsCreateAgent: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "agents-create-agent",
|
|
15
|
+
description: `Create an agent`,
|
|
16
|
+
args,
|
|
17
|
+
tool: async (client, args, ctx) => {
|
|
18
|
+
const [result, apiCall] = await agentsCreateAgent(
|
|
19
|
+
client,
|
|
20
|
+
args.request,
|
|
21
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
22
|
+
).$inspect();
|
|
23
|
+
|
|
24
|
+
if (!result.ok) {
|
|
25
|
+
return {
|
|
26
|
+
content: [{ type: "text", text: result.error.message }],
|
|
27
|
+
isError: true,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const value = result.value;
|
|
32
|
+
|
|
33
|
+
return formatResult(value, apiCall);
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { agentsUpdateAgent } from "../../funcs/agentsUpdateAgent.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.UpdateAgentRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$agentsUpdateAgent: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "agents-update-agent",
|
|
15
|
+
description: `Update an agent`,
|
|
16
|
+
args,
|
|
17
|
+
tool: async (client, args, ctx) => {
|
|
18
|
+
const [result, apiCall] = await agentsUpdateAgent(
|
|
19
|
+
client,
|
|
20
|
+
args.request,
|
|
21
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
22
|
+
).$inspect();
|
|
23
|
+
|
|
24
|
+
if (!result.ok) {
|
|
25
|
+
return {
|
|
26
|
+
content: [{ type: "text", text: result.error.message }],
|
|
27
|
+
isError: true,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const value = result.value;
|
|
32
|
+
|
|
33
|
+
return formatResult(value, apiCall);
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -18,6 +18,12 @@ import {
|
|
|
18
18
|
ComputeStandaloneVolumeState$inboundSchema,
|
|
19
19
|
ComputeStandaloneVolumeState$outboundSchema,
|
|
20
20
|
} from "./computestandalonevolumestate.js";
|
|
21
|
+
import {
|
|
22
|
+
ComputeVolumeData,
|
|
23
|
+
ComputeVolumeData$inboundSchema,
|
|
24
|
+
ComputeVolumeData$Outbound,
|
|
25
|
+
ComputeVolumeData$outboundSchema,
|
|
26
|
+
} from "./computevolumedata.js";
|
|
21
27
|
|
|
22
28
|
export type ComputeStandaloneVolume = {
|
|
23
29
|
accruedCostUsd: number;
|
|
@@ -25,6 +31,10 @@ export type ComputeStandaloneVolume = {
|
|
|
25
31
|
cleanupFailure: ComputeReason | null;
|
|
26
32
|
createdAt: Date;
|
|
27
33
|
currentStoragePriceUsdHr: number;
|
|
34
|
+
/**
|
|
35
|
+
* The volume's downloaded repositories; resolved_revision is set once the volume is ready.
|
|
36
|
+
*/
|
|
37
|
+
data: Array<ComputeVolumeData>;
|
|
28
38
|
deletedAt: Date | null;
|
|
29
39
|
failure: ComputeReason | null;
|
|
30
40
|
id: string;
|
|
@@ -48,6 +58,7 @@ export const ComputeStandaloneVolume$inboundSchema: z.ZodType<
|
|
|
48
58
|
cleanup_failure: z.nullable(ComputeReason$inboundSchema),
|
|
49
59
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
50
60
|
current_storage_price_usd_hr: z.number(),
|
|
61
|
+
data: z.array(ComputeVolumeData$inboundSchema),
|
|
51
62
|
deleted_at: z.nullable(
|
|
52
63
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
53
64
|
),
|
|
@@ -86,6 +97,7 @@ export type ComputeStandaloneVolume$Outbound = {
|
|
|
86
97
|
cleanup_failure: ComputeReason$Outbound | null;
|
|
87
98
|
created_at: string;
|
|
88
99
|
current_storage_price_usd_hr: number;
|
|
100
|
+
data: Array<ComputeVolumeData$Outbound>;
|
|
89
101
|
deleted_at: string | null;
|
|
90
102
|
failure: ComputeReason$Outbound | null;
|
|
91
103
|
id: string;
|
|
@@ -109,6 +121,7 @@ export const ComputeStandaloneVolume$outboundSchema: z.ZodType<
|
|
|
109
121
|
cleanupFailure: z.nullable(ComputeReason$outboundSchema),
|
|
110
122
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
111
123
|
currentStoragePriceUsdHr: z.number(),
|
|
124
|
+
data: z.array(ComputeVolumeData$outboundSchema),
|
|
112
125
|
deletedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
113
126
|
failure: z.nullable(ComputeReason$outboundSchema),
|
|
114
127
|
id: z.string(),
|
|
@@ -6,8 +6,18 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
ComputeVolumeDataInput,
|
|
11
|
+
ComputeVolumeDataInput$inboundSchema,
|
|
12
|
+
ComputeVolumeDataInput$Outbound,
|
|
13
|
+
ComputeVolumeDataInput$outboundSchema,
|
|
14
|
+
} from "./computevolumedatainput.js";
|
|
9
15
|
|
|
10
16
|
export type ComputeStandaloneVolumeCreate = {
|
|
17
|
+
/**
|
|
18
|
+
* Repositories downloaded into the volume once, before it becomes ready. Each entry needs its own path. Entries on the organization's repositories are read with a short-lived token for the creating credential, which must carry read:repos; other sources are fetched anonymously. A failed download fails the volume, naming the entry; create a new volume to retry.
|
|
19
|
+
*/
|
|
20
|
+
data?: Array<ComputeVolumeDataInput> | undefined;
|
|
11
21
|
name: string;
|
|
12
22
|
};
|
|
13
23
|
|
|
@@ -17,10 +27,12 @@ export const ComputeStandaloneVolumeCreate$inboundSchema: z.ZodType<
|
|
|
17
27
|
z.ZodTypeDef,
|
|
18
28
|
unknown
|
|
19
29
|
> = z.object({
|
|
30
|
+
data: z.array(ComputeVolumeDataInput$inboundSchema).optional(),
|
|
20
31
|
name: z.string(),
|
|
21
32
|
});
|
|
22
33
|
/** @internal */
|
|
23
34
|
export type ComputeStandaloneVolumeCreate$Outbound = {
|
|
35
|
+
data?: Array<ComputeVolumeDataInput$Outbound> | undefined;
|
|
24
36
|
name: string;
|
|
25
37
|
};
|
|
26
38
|
|
|
@@ -30,6 +42,7 @@ export const ComputeStandaloneVolumeCreate$outboundSchema: z.ZodType<
|
|
|
30
42
|
z.ZodTypeDef,
|
|
31
43
|
ComputeStandaloneVolumeCreate
|
|
32
44
|
> = z.object({
|
|
45
|
+
data: z.array(ComputeVolumeDataInput$outboundSchema).optional(),
|
|
33
46
|
name: z.string(),
|
|
34
47
|
});
|
|
35
48
|
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
AgentReasoningConfiguration,
|
|
12
|
+
AgentReasoningConfiguration$inboundSchema,
|
|
13
|
+
AgentReasoningConfiguration$Outbound,
|
|
14
|
+
AgentReasoningConfiguration$outboundSchema,
|
|
15
|
+
} from "./agentreasoningconfiguration.js";
|
|
16
|
+
import {
|
|
17
|
+
AgentTextConfiguration,
|
|
18
|
+
AgentTextConfiguration$inboundSchema,
|
|
19
|
+
AgentTextConfiguration$Outbound,
|
|
20
|
+
AgentTextConfiguration$outboundSchema,
|
|
21
|
+
} from "./agenttextconfiguration.js";
|
|
22
|
+
import {
|
|
23
|
+
ToolDefinition,
|
|
24
|
+
ToolDefinition$inboundSchema,
|
|
25
|
+
ToolDefinition$Outbound,
|
|
26
|
+
ToolDefinition$outboundSchema,
|
|
27
|
+
} from "./tooldefinition.js";
|
|
28
|
+
|
|
29
|
+
export type CreateAgentRequest = {
|
|
30
|
+
name: string;
|
|
31
|
+
description?: string | null | undefined;
|
|
32
|
+
model: string;
|
|
33
|
+
instructions?: string | null | undefined;
|
|
34
|
+
tools?: Array<ToolDefinition> | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Arbitrary JSON value.
|
|
37
|
+
*/
|
|
38
|
+
toolChoice?: any | undefined;
|
|
39
|
+
parallelToolCalls?: boolean | undefined;
|
|
40
|
+
maxToolCalls?: number | null | undefined;
|
|
41
|
+
text?: AgentTextConfiguration | null | undefined;
|
|
42
|
+
reasoning?: AgentReasoningConfiguration | null | undefined;
|
|
43
|
+
metadata?: { [k: string]: string } | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const CreateAgentRequest$inboundSchema: z.ZodType<
|
|
48
|
+
CreateAgentRequest,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
unknown
|
|
51
|
+
> = z.object({
|
|
52
|
+
name: z.string(),
|
|
53
|
+
description: z.nullable(z.string()).optional(),
|
|
54
|
+
model: z.string(),
|
|
55
|
+
instructions: z.nullable(z.string()).optional(),
|
|
56
|
+
tools: z.array(ToolDefinition$inboundSchema).optional(),
|
|
57
|
+
tool_choice: z.any().optional(),
|
|
58
|
+
parallel_tool_calls: z.boolean().default(true),
|
|
59
|
+
max_tool_calls: z.nullable(z.number().int()).optional(),
|
|
60
|
+
text: z.nullable(AgentTextConfiguration$inboundSchema).optional(),
|
|
61
|
+
reasoning: z.nullable(AgentReasoningConfiguration$inboundSchema).optional(),
|
|
62
|
+
metadata: z.record(z.string()).optional(),
|
|
63
|
+
}).transform((v) => {
|
|
64
|
+
return remap$(v, {
|
|
65
|
+
"tool_choice": "toolChoice",
|
|
66
|
+
"parallel_tool_calls": "parallelToolCalls",
|
|
67
|
+
"max_tool_calls": "maxToolCalls",
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
/** @internal */
|
|
71
|
+
export type CreateAgentRequest$Outbound = {
|
|
72
|
+
name: string;
|
|
73
|
+
description?: string | null | undefined;
|
|
74
|
+
model: string;
|
|
75
|
+
instructions?: string | null | undefined;
|
|
76
|
+
tools?: Array<ToolDefinition$Outbound> | undefined;
|
|
77
|
+
tool_choice?: any | undefined;
|
|
78
|
+
parallel_tool_calls: boolean;
|
|
79
|
+
max_tool_calls?: number | null | undefined;
|
|
80
|
+
text?: AgentTextConfiguration$Outbound | null | undefined;
|
|
81
|
+
reasoning?: AgentReasoningConfiguration$Outbound | null | undefined;
|
|
82
|
+
metadata?: { [k: string]: string } | undefined;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const CreateAgentRequest$outboundSchema: z.ZodType<
|
|
87
|
+
CreateAgentRequest$Outbound,
|
|
88
|
+
z.ZodTypeDef,
|
|
89
|
+
CreateAgentRequest
|
|
90
|
+
> = z.object({
|
|
91
|
+
name: z.string(),
|
|
92
|
+
description: z.nullable(z.string()).optional(),
|
|
93
|
+
model: z.string(),
|
|
94
|
+
instructions: z.nullable(z.string()).optional(),
|
|
95
|
+
tools: z.array(ToolDefinition$outboundSchema).optional(),
|
|
96
|
+
toolChoice: z.any().optional(),
|
|
97
|
+
parallelToolCalls: z.boolean().default(true),
|
|
98
|
+
maxToolCalls: z.nullable(z.number().int()).optional(),
|
|
99
|
+
text: z.nullable(AgentTextConfiguration$outboundSchema).optional(),
|
|
100
|
+
reasoning: z.nullable(AgentReasoningConfiguration$outboundSchema).optional(),
|
|
101
|
+
metadata: z.record(z.string()).optional(),
|
|
102
|
+
}).transform((v) => {
|
|
103
|
+
return remap$(v, {
|
|
104
|
+
toolChoice: "tool_choice",
|
|
105
|
+
parallelToolCalls: "parallel_tool_calls",
|
|
106
|
+
maxToolCalls: "max_tool_calls",
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
export function createAgentRequestToJSON(
|
|
111
|
+
createAgentRequest: CreateAgentRequest,
|
|
112
|
+
): string {
|
|
113
|
+
return JSON.stringify(
|
|
114
|
+
CreateAgentRequest$outboundSchema.parse(createAgentRequest),
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
export function createAgentRequestFromJSON(
|
|
118
|
+
jsonString: string,
|
|
119
|
+
): SafeParseResult<CreateAgentRequest, SDKValidationError> {
|
|
120
|
+
return safeParse(
|
|
121
|
+
jsonString,
|
|
122
|
+
(x) => CreateAgentRequest$inboundSchema.parse(JSON.parse(x)),
|
|
123
|
+
`Failed to parse 'CreateAgentRequest' from JSON`,
|
|
124
|
+
);
|
|
125
|
+
}
|
|
@@ -189,6 +189,7 @@ export * from "./conversationsgroupby.js";
|
|
|
189
189
|
export * from "./costgrouprow.js";
|
|
190
190
|
export * from "./costsusagegroupby.js";
|
|
191
191
|
export * from "./createagentconnectorrequest.js";
|
|
192
|
+
export * from "./createagentrequest.js";
|
|
192
193
|
export * from "./createagentrunrequest.js";
|
|
193
194
|
export * from "./createagentschedulerequest.js";
|
|
194
195
|
export * from "./createbatchrequest.js";
|
|
@@ -705,6 +706,7 @@ export * from "./toplogprob.js";
|
|
|
705
706
|
export * from "./transcriptionresponse.js";
|
|
706
707
|
export * from "./typeaction.js";
|
|
707
708
|
export * from "./update.js";
|
|
709
|
+
export * from "./updateagentrequest.js";
|
|
708
710
|
export * from "./updateagentschedulerequest.js";
|
|
709
711
|
export * from "./updatecatalogmodelrequest.js";
|
|
710
712
|
export * from "./updateevalschedulerequest.js";
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
AgentReasoningConfiguration,
|
|
12
|
+
AgentReasoningConfiguration$inboundSchema,
|
|
13
|
+
AgentReasoningConfiguration$Outbound,
|
|
14
|
+
AgentReasoningConfiguration$outboundSchema,
|
|
15
|
+
} from "./agentreasoningconfiguration.js";
|
|
16
|
+
import {
|
|
17
|
+
AgentTextConfiguration,
|
|
18
|
+
AgentTextConfiguration$inboundSchema,
|
|
19
|
+
AgentTextConfiguration$Outbound,
|
|
20
|
+
AgentTextConfiguration$outboundSchema,
|
|
21
|
+
} from "./agenttextconfiguration.js";
|
|
22
|
+
import {
|
|
23
|
+
ToolDefinition,
|
|
24
|
+
ToolDefinition$inboundSchema,
|
|
25
|
+
ToolDefinition$Outbound,
|
|
26
|
+
ToolDefinition$outboundSchema,
|
|
27
|
+
} from "./tooldefinition.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Updates only provided fields. Omitted fields preserve their saved values; empty updates are rejected.
|
|
31
|
+
*/
|
|
32
|
+
export type UpdateAgentRequest = {
|
|
33
|
+
name?: string | undefined;
|
|
34
|
+
description?: string | null | undefined;
|
|
35
|
+
model?: string | undefined;
|
|
36
|
+
instructions?: string | null | undefined;
|
|
37
|
+
tools?: Array<ToolDefinition> | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Arbitrary JSON value.
|
|
40
|
+
*/
|
|
41
|
+
toolChoice?: any | undefined;
|
|
42
|
+
parallelToolCalls?: boolean | undefined;
|
|
43
|
+
maxToolCalls?: number | null | undefined;
|
|
44
|
+
text?: AgentTextConfiguration | null | undefined;
|
|
45
|
+
reasoning?: AgentReasoningConfiguration | null | undefined;
|
|
46
|
+
metadata?: { [k: string]: string } | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const UpdateAgentRequest$inboundSchema: z.ZodType<
|
|
51
|
+
UpdateAgentRequest,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
unknown
|
|
54
|
+
> = z.object({
|
|
55
|
+
name: z.string().optional(),
|
|
56
|
+
description: z.nullable(z.string()).optional(),
|
|
57
|
+
model: z.string().optional(),
|
|
58
|
+
instructions: z.nullable(z.string()).optional(),
|
|
59
|
+
tools: z.array(ToolDefinition$inboundSchema).optional(),
|
|
60
|
+
tool_choice: z.any().optional(),
|
|
61
|
+
parallel_tool_calls: z.boolean().optional(),
|
|
62
|
+
max_tool_calls: z.nullable(z.number().int()).optional(),
|
|
63
|
+
text: z.nullable(AgentTextConfiguration$inboundSchema).optional(),
|
|
64
|
+
reasoning: z.nullable(AgentReasoningConfiguration$inboundSchema).optional(),
|
|
65
|
+
metadata: z.record(z.string()).optional(),
|
|
66
|
+
}).transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
"tool_choice": "toolChoice",
|
|
69
|
+
"parallel_tool_calls": "parallelToolCalls",
|
|
70
|
+
"max_tool_calls": "maxToolCalls",
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
/** @internal */
|
|
74
|
+
export type UpdateAgentRequest$Outbound = {
|
|
75
|
+
name?: string | undefined;
|
|
76
|
+
description?: string | null | undefined;
|
|
77
|
+
model?: string | undefined;
|
|
78
|
+
instructions?: string | null | undefined;
|
|
79
|
+
tools?: Array<ToolDefinition$Outbound> | undefined;
|
|
80
|
+
tool_choice?: any | undefined;
|
|
81
|
+
parallel_tool_calls?: boolean | undefined;
|
|
82
|
+
max_tool_calls?: number | null | undefined;
|
|
83
|
+
text?: AgentTextConfiguration$Outbound | null | undefined;
|
|
84
|
+
reasoning?: AgentReasoningConfiguration$Outbound | null | undefined;
|
|
85
|
+
metadata?: { [k: string]: string } | undefined;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const UpdateAgentRequest$outboundSchema: z.ZodType<
|
|
90
|
+
UpdateAgentRequest$Outbound,
|
|
91
|
+
z.ZodTypeDef,
|
|
92
|
+
UpdateAgentRequest
|
|
93
|
+
> = z.object({
|
|
94
|
+
name: z.string().optional(),
|
|
95
|
+
description: z.nullable(z.string()).optional(),
|
|
96
|
+
model: z.string().optional(),
|
|
97
|
+
instructions: z.nullable(z.string()).optional(),
|
|
98
|
+
tools: z.array(ToolDefinition$outboundSchema).optional(),
|
|
99
|
+
toolChoice: z.any().optional(),
|
|
100
|
+
parallelToolCalls: z.boolean().optional(),
|
|
101
|
+
maxToolCalls: z.nullable(z.number().int()).optional(),
|
|
102
|
+
text: z.nullable(AgentTextConfiguration$outboundSchema).optional(),
|
|
103
|
+
reasoning: z.nullable(AgentReasoningConfiguration$outboundSchema).optional(),
|
|
104
|
+
metadata: z.record(z.string()).optional(),
|
|
105
|
+
}).transform((v) => {
|
|
106
|
+
return remap$(v, {
|
|
107
|
+
toolChoice: "tool_choice",
|
|
108
|
+
parallelToolCalls: "parallel_tool_calls",
|
|
109
|
+
maxToolCalls: "max_tool_calls",
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
export function updateAgentRequestToJSON(
|
|
114
|
+
updateAgentRequest: UpdateAgentRequest,
|
|
115
|
+
): string {
|
|
116
|
+
return JSON.stringify(
|
|
117
|
+
UpdateAgentRequest$outboundSchema.parse(updateAgentRequest),
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
export function updateAgentRequestFromJSON(
|
|
121
|
+
jsonString: string,
|
|
122
|
+
): SafeParseResult<UpdateAgentRequest, SDKValidationError> {
|
|
123
|
+
return safeParse(
|
|
124
|
+
jsonString,
|
|
125
|
+
(x) => UpdateAgentRequest$inboundSchema.parse(JSON.parse(x)),
|
|
126
|
+
`Failed to parse 'UpdateAgentRequest' from JSON`,
|
|
127
|
+
);
|
|
128
|
+
}
|