@meetkai/mka1 0.54.82 → 0.54.83
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 +3429 -3033
- package/bin/mcp-server.js.map +16 -8
- 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 +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- 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/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 +2 -2
- package/dist/esm/lib/config.js +2 -2
- 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/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 +2 -2
- 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/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,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
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type CreateAgentRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* Optional external end-user identifier forwarded by the API gateway.
|
|
15
|
+
*/
|
|
16
|
+
xOnBehalfOf?: string | undefined;
|
|
17
|
+
createAgentRequest: components.CreateAgentRequest;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const CreateAgentRequest$inboundSchema: z.ZodType<
|
|
22
|
+
CreateAgentRequest,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
"X-On-Behalf-Of": z.string().optional(),
|
|
27
|
+
CreateAgentRequest: components.CreateAgentRequest$inboundSchema,
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"X-On-Behalf-Of": "xOnBehalfOf",
|
|
31
|
+
"CreateAgentRequest": "createAgentRequest",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type CreateAgentRequest$Outbound = {
|
|
36
|
+
"X-On-Behalf-Of"?: string | undefined;
|
|
37
|
+
CreateAgentRequest: components.CreateAgentRequest$Outbound;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const CreateAgentRequest$outboundSchema: z.ZodType<
|
|
42
|
+
CreateAgentRequest$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
CreateAgentRequest
|
|
45
|
+
> = z.object({
|
|
46
|
+
xOnBehalfOf: z.string().optional(),
|
|
47
|
+
createAgentRequest: components.CreateAgentRequest$outboundSchema,
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
xOnBehalfOf: "X-On-Behalf-Of",
|
|
51
|
+
createAgentRequest: "CreateAgentRequest",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function createAgentRequestToJSON(
|
|
56
|
+
createAgentRequest: CreateAgentRequest,
|
|
57
|
+
): string {
|
|
58
|
+
return JSON.stringify(
|
|
59
|
+
CreateAgentRequest$outboundSchema.parse(createAgentRequest),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
export function createAgentRequestFromJSON(
|
|
63
|
+
jsonString: string,
|
|
64
|
+
): SafeParseResult<CreateAgentRequest, SDKValidationError> {
|
|
65
|
+
return safeParse(
|
|
66
|
+
jsonString,
|
|
67
|
+
(x) => CreateAgentRequest$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'CreateAgentRequest' from JSON`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -45,6 +45,7 @@ export * from "./conversationsitemsretrieve.js";
|
|
|
45
45
|
export * from "./conversationslist.js";
|
|
46
46
|
export * from "./conversationsretrieve.js";
|
|
47
47
|
export * from "./conversationsupdate.js";
|
|
48
|
+
export * from "./createagent.js";
|
|
48
49
|
export * from "./createagentconnector.js";
|
|
49
50
|
export * from "./createagentrun.js";
|
|
50
51
|
export * from "./createagentschedule.js";
|
|
@@ -412,6 +413,7 @@ export * from "./transcribe.js";
|
|
|
412
413
|
export * from "./triggerevalschedule.js";
|
|
413
414
|
export * from "./unarchivefeatureflag.js";
|
|
414
415
|
export * from "./unsuspendclusterorg.js";
|
|
416
|
+
export * from "./updateagent.js";
|
|
415
417
|
export * from "./updateagentschedule.js";
|
|
416
418
|
export * from "./updateclusterinvite.js";
|
|
417
419
|
export * from "./updatecompletionfeedback.js";
|
|
@@ -0,0 +1,76 @@
|
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type UpdateAgentRequest = {
|
|
13
|
+
agentId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional external end-user identifier forwarded by the API gateway.
|
|
16
|
+
*/
|
|
17
|
+
xOnBehalfOf?: string | undefined;
|
|
18
|
+
updateAgentRequest: components.UpdateAgentRequest;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const UpdateAgentRequest$inboundSchema: z.ZodType<
|
|
23
|
+
UpdateAgentRequest,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
agent_id: z.string(),
|
|
28
|
+
"X-On-Behalf-Of": z.string().optional(),
|
|
29
|
+
UpdateAgentRequest: components.UpdateAgentRequest$inboundSchema,
|
|
30
|
+
}).transform((v) => {
|
|
31
|
+
return remap$(v, {
|
|
32
|
+
"agent_id": "agentId",
|
|
33
|
+
"X-On-Behalf-Of": "xOnBehalfOf",
|
|
34
|
+
"UpdateAgentRequest": "updateAgentRequest",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type UpdateAgentRequest$Outbound = {
|
|
39
|
+
agent_id: string;
|
|
40
|
+
"X-On-Behalf-Of"?: string | undefined;
|
|
41
|
+
UpdateAgentRequest: components.UpdateAgentRequest$Outbound;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const UpdateAgentRequest$outboundSchema: z.ZodType<
|
|
46
|
+
UpdateAgentRequest$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
UpdateAgentRequest
|
|
49
|
+
> = z.object({
|
|
50
|
+
agentId: z.string(),
|
|
51
|
+
xOnBehalfOf: z.string().optional(),
|
|
52
|
+
updateAgentRequest: components.UpdateAgentRequest$outboundSchema,
|
|
53
|
+
}).transform((v) => {
|
|
54
|
+
return remap$(v, {
|
|
55
|
+
agentId: "agent_id",
|
|
56
|
+
xOnBehalfOf: "X-On-Behalf-Of",
|
|
57
|
+
updateAgentRequest: "UpdateAgentRequest",
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
export function updateAgentRequestToJSON(
|
|
62
|
+
updateAgentRequest: UpdateAgentRequest,
|
|
63
|
+
): string {
|
|
64
|
+
return JSON.stringify(
|
|
65
|
+
UpdateAgentRequest$outboundSchema.parse(updateAgentRequest),
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
export function updateAgentRequestFromJSON(
|
|
69
|
+
jsonString: string,
|
|
70
|
+
): SafeParseResult<UpdateAgentRequest, SDKValidationError> {
|
|
71
|
+
return safeParse(
|
|
72
|
+
jsonString,
|
|
73
|
+
(x) => UpdateAgentRequest$inboundSchema.parse(JSON.parse(x)),
|
|
74
|
+
`Failed to parse 'UpdateAgentRequest' from JSON`,
|
|
75
|
+
);
|
|
76
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
MutationKey,
|
|
7
|
+
useMutation,
|
|
8
|
+
UseMutationResult,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { SDKCore } from "../core.js";
|
|
11
|
+
import { agentsCreateAgent } from "../funcs/agentsCreateAgent.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.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 { unwrapAsync } from "../types/fp.js";
|
|
28
|
+
import { useSDKContext } from "./_context.js";
|
|
29
|
+
import { MutationHookOptions } from "./_types.js";
|
|
30
|
+
|
|
31
|
+
export type AgentsCreateAgentMutationVariables = {
|
|
32
|
+
request: operations.CreateAgentRequest;
|
|
33
|
+
options?: RequestOptions;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type AgentsCreateAgentMutationData = components.Agent;
|
|
37
|
+
|
|
38
|
+
export type AgentsCreateAgentMutationError =
|
|
39
|
+
| errors.ErrorEnvelope
|
|
40
|
+
| SDKError
|
|
41
|
+
| ResponseValidationError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
| RequestAbortedError
|
|
44
|
+
| RequestTimeoutError
|
|
45
|
+
| InvalidRequestError
|
|
46
|
+
| UnexpectedClientError
|
|
47
|
+
| SDKValidationError;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Create an agent
|
|
51
|
+
*/
|
|
52
|
+
export function useAgentsCreateAgentMutation(
|
|
53
|
+
options?: MutationHookOptions<
|
|
54
|
+
AgentsCreateAgentMutationData,
|
|
55
|
+
AgentsCreateAgentMutationError,
|
|
56
|
+
AgentsCreateAgentMutationVariables
|
|
57
|
+
>,
|
|
58
|
+
): UseMutationResult<
|
|
59
|
+
AgentsCreateAgentMutationData,
|
|
60
|
+
AgentsCreateAgentMutationError,
|
|
61
|
+
AgentsCreateAgentMutationVariables
|
|
62
|
+
> {
|
|
63
|
+
const client = useSDKContext();
|
|
64
|
+
return useMutation({
|
|
65
|
+
...buildAgentsCreateAgentMutation(client, options),
|
|
66
|
+
...options,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function mutationKeyAgentsCreateAgent(): MutationKey {
|
|
71
|
+
return ["@meetkai/mka1", "Agents", "createAgent"];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function buildAgentsCreateAgentMutation(
|
|
75
|
+
client$: SDKCore,
|
|
76
|
+
hookOptions?: RequestOptions,
|
|
77
|
+
): {
|
|
78
|
+
mutationKey: MutationKey;
|
|
79
|
+
mutationFn: (
|
|
80
|
+
variables: AgentsCreateAgentMutationVariables,
|
|
81
|
+
) => Promise<AgentsCreateAgentMutationData>;
|
|
82
|
+
} {
|
|
83
|
+
return {
|
|
84
|
+
mutationKey: mutationKeyAgentsCreateAgent(),
|
|
85
|
+
mutationFn: function agentsCreateAgentMutationFn({
|
|
86
|
+
request,
|
|
87
|
+
options,
|
|
88
|
+
}): Promise<AgentsCreateAgentMutationData> {
|
|
89
|
+
const mergedOptions = {
|
|
90
|
+
...hookOptions,
|
|
91
|
+
...options,
|
|
92
|
+
fetchOptions: {
|
|
93
|
+
...hookOptions?.fetchOptions,
|
|
94
|
+
...options?.fetchOptions,
|
|
95
|
+
signal: combineSignals(
|
|
96
|
+
hookOptions?.fetchOptions?.signal,
|
|
97
|
+
options?.fetchOptions?.signal,
|
|
98
|
+
),
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
return unwrapAsync(agentsCreateAgent(
|
|
102
|
+
client$,
|
|
103
|
+
request,
|
|
104
|
+
mergedOptions,
|
|
105
|
+
));
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
MutationKey,
|
|
7
|
+
useMutation,
|
|
8
|
+
UseMutationResult,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { SDKCore } from "../core.js";
|
|
11
|
+
import { agentsUpdateAgent } from "../funcs/agentsUpdateAgent.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.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 { unwrapAsync } from "../types/fp.js";
|
|
28
|
+
import { useSDKContext } from "./_context.js";
|
|
29
|
+
import { MutationHookOptions } from "./_types.js";
|
|
30
|
+
|
|
31
|
+
export type AgentsUpdateAgentMutationVariables = {
|
|
32
|
+
request: operations.UpdateAgentRequest;
|
|
33
|
+
options?: RequestOptions;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type AgentsUpdateAgentMutationData = components.Agent;
|
|
37
|
+
|
|
38
|
+
export type AgentsUpdateAgentMutationError =
|
|
39
|
+
| errors.ErrorEnvelope
|
|
40
|
+
| SDKError
|
|
41
|
+
| ResponseValidationError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
| RequestAbortedError
|
|
44
|
+
| RequestTimeoutError
|
|
45
|
+
| InvalidRequestError
|
|
46
|
+
| UnexpectedClientError
|
|
47
|
+
| SDKValidationError;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Update an agent
|
|
51
|
+
*/
|
|
52
|
+
export function useAgentsUpdateAgentMutation(
|
|
53
|
+
options?: MutationHookOptions<
|
|
54
|
+
AgentsUpdateAgentMutationData,
|
|
55
|
+
AgentsUpdateAgentMutationError,
|
|
56
|
+
AgentsUpdateAgentMutationVariables
|
|
57
|
+
>,
|
|
58
|
+
): UseMutationResult<
|
|
59
|
+
AgentsUpdateAgentMutationData,
|
|
60
|
+
AgentsUpdateAgentMutationError,
|
|
61
|
+
AgentsUpdateAgentMutationVariables
|
|
62
|
+
> {
|
|
63
|
+
const client = useSDKContext();
|
|
64
|
+
return useMutation({
|
|
65
|
+
...buildAgentsUpdateAgentMutation(client, options),
|
|
66
|
+
...options,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function mutationKeyAgentsUpdateAgent(): MutationKey {
|
|
71
|
+
return ["@meetkai/mka1", "Agents", "updateAgent"];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function buildAgentsUpdateAgentMutation(
|
|
75
|
+
client$: SDKCore,
|
|
76
|
+
hookOptions?: RequestOptions,
|
|
77
|
+
): {
|
|
78
|
+
mutationKey: MutationKey;
|
|
79
|
+
mutationFn: (
|
|
80
|
+
variables: AgentsUpdateAgentMutationVariables,
|
|
81
|
+
) => Promise<AgentsUpdateAgentMutationData>;
|
|
82
|
+
} {
|
|
83
|
+
return {
|
|
84
|
+
mutationKey: mutationKeyAgentsUpdateAgent(),
|
|
85
|
+
mutationFn: function agentsUpdateAgentMutationFn({
|
|
86
|
+
request,
|
|
87
|
+
options,
|
|
88
|
+
}): Promise<AgentsUpdateAgentMutationData> {
|
|
89
|
+
const mergedOptions = {
|
|
90
|
+
...hookOptions,
|
|
91
|
+
...options,
|
|
92
|
+
fetchOptions: {
|
|
93
|
+
...hookOptions?.fetchOptions,
|
|
94
|
+
...options?.fetchOptions,
|
|
95
|
+
signal: combineSignals(
|
|
96
|
+
hookOptions?.fetchOptions?.signal,
|
|
97
|
+
options?.fetchOptions?.signal,
|
|
98
|
+
),
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
return unwrapAsync(agentsUpdateAgent(
|
|
102
|
+
client$,
|
|
103
|
+
request,
|
|
104
|
+
mergedOptions,
|
|
105
|
+
));
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
}
|
package/src/react-query/index.ts
CHANGED
|
@@ -24,9 +24,11 @@ export * from "./agentSchedulesListAgentSchedules.js";
|
|
|
24
24
|
export * from "./agentSchedulesPauseAgentSchedule.js";
|
|
25
25
|
export * from "./agentSchedulesResumeAgentSchedule.js";
|
|
26
26
|
export * from "./agentSchedulesUpdateAgentSchedule.js";
|
|
27
|
+
export * from "./agentsCreateAgent.js";
|
|
27
28
|
export * from "./agentsDeleteAgent.js";
|
|
28
29
|
export * from "./agentsGetAgent.js";
|
|
29
30
|
export * from "./agentsListAgents.js";
|
|
31
|
+
export * from "./agentsUpdateAgent.js";
|
|
30
32
|
export * from "./agentVersionsGetAgentVersion.js";
|
|
31
33
|
export * from "./agentVersionsListAgentVersions.js";
|
|
32
34
|
export * from "./agentVersionsRollbackAgentVersion.js";
|
package/src/sdk/agents.ts
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { agentsCreateAgent } from "../funcs/agentsCreateAgent.js";
|
|
5
6
|
import { agentsDeleteAgent } from "../funcs/agentsDeleteAgent.js";
|
|
6
7
|
import { agentsGetAgent } from "../funcs/agentsGetAgent.js";
|
|
7
8
|
import { agentsListAgents } from "../funcs/agentsListAgents.js";
|
|
9
|
+
import { agentsUpdateAgent } from "../funcs/agentsUpdateAgent.js";
|
|
8
10
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
11
|
import * as components from "../models/components/index.js";
|
|
10
12
|
import * as operations from "../models/operations/index.js";
|
|
@@ -25,6 +27,20 @@ export class Agents extends ClientSDK {
|
|
|
25
27
|
));
|
|
26
28
|
}
|
|
27
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Create an agent
|
|
32
|
+
*/
|
|
33
|
+
async createAgent(
|
|
34
|
+
request: operations.CreateAgentRequest,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): Promise<components.Agent> {
|
|
37
|
+
return unwrapAsync(agentsCreateAgent(
|
|
38
|
+
this,
|
|
39
|
+
request,
|
|
40
|
+
options,
|
|
41
|
+
));
|
|
42
|
+
}
|
|
43
|
+
|
|
28
44
|
/**
|
|
29
45
|
* Retrieve an agent
|
|
30
46
|
*/
|
|
@@ -39,6 +55,20 @@ export class Agents extends ClientSDK {
|
|
|
39
55
|
));
|
|
40
56
|
}
|
|
41
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Update an agent
|
|
60
|
+
*/
|
|
61
|
+
async updateAgent(
|
|
62
|
+
request: operations.UpdateAgentRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<components.Agent> {
|
|
65
|
+
return unwrapAsync(agentsUpdateAgent(
|
|
66
|
+
this,
|
|
67
|
+
request,
|
|
68
|
+
options,
|
|
69
|
+
));
|
|
70
|
+
}
|
|
71
|
+
|
|
42
72
|
/**
|
|
43
73
|
* Delete an agent
|
|
44
74
|
*/
|