@meetkai/mka1 0.55.24 → 0.55.25
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/bin/mcp-server.js +58 -15
- package/bin/mcp-server.js.map +13 -13
- package/dist/commonjs/funcs/agentRunsCancelAgentRun.d.ts +1 -1
- package/dist/commonjs/funcs/agentRunsCancelAgentRun.js +1 -1
- package/dist/commonjs/funcs/agentRunsCreateAgentRun.d.ts +1 -1
- package/dist/commonjs/funcs/agentRunsCreateAgentRun.js +2 -2
- package/dist/commonjs/funcs/agentRunsCreateAgentRun.js.map +1 -1
- 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.js +1 -1
- package/dist/commonjs/mcp-server/tools/agentRunsCancelAgentRun.js +1 -1
- package/dist/commonjs/mcp-server/tools/agentRunsCancelAgentRun.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/agentRunsCreateAgentRun.js +1 -1
- package/dist/commonjs/mcp-server/tools/agentRunsCreateAgentRun.js.map +1 -1
- package/dist/commonjs/models/components/agent.d.ts +13 -0
- package/dist/commonjs/models/components/agent.d.ts.map +1 -1
- package/dist/commonjs/models/components/agent.js +17 -1
- package/dist/commonjs/models/components/agent.js.map +1 -1
- package/dist/commonjs/models/components/agentrun.d.ts +4 -3
- package/dist/commonjs/models/components/agentrun.d.ts.map +1 -1
- package/dist/commonjs/models/components/agentrun.js +2 -1
- package/dist/commonjs/models/components/agentrun.js.map +1 -1
- package/dist/commonjs/models/components/createagentrequest.d.ts +26 -0
- package/dist/commonjs/models/components/createagentrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/createagentrequest.js +22 -1
- package/dist/commonjs/models/components/createagentrequest.js.map +1 -1
- package/dist/commonjs/models/components/updateagentrequest.d.ts +26 -0
- package/dist/commonjs/models/components/updateagentrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/updateagentrequest.js +22 -1
- package/dist/commonjs/models/components/updateagentrequest.js.map +1 -1
- package/dist/commonjs/react-query/agentRunsCancelAgentRun.d.ts +1 -1
- package/dist/commonjs/react-query/agentRunsCancelAgentRun.js +1 -1
- package/dist/commonjs/react-query/agentRunsCreateAgentRun.d.ts +1 -1
- package/dist/commonjs/react-query/agentRunsCreateAgentRun.js +1 -1
- package/dist/commonjs/sdk/agentruns.d.ts +2 -2
- package/dist/commonjs/sdk/agentruns.js +2 -2
- package/dist/esm/funcs/agentRunsCancelAgentRun.d.ts +1 -1
- package/dist/esm/funcs/agentRunsCancelAgentRun.js +1 -1
- package/dist/esm/funcs/agentRunsCreateAgentRun.d.ts +1 -1
- package/dist/esm/funcs/agentRunsCreateAgentRun.js +2 -2
- package/dist/esm/funcs/agentRunsCreateAgentRun.js.map +1 -1
- 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.js +1 -1
- package/dist/esm/mcp-server/tools/agentRunsCancelAgentRun.js +1 -1
- package/dist/esm/mcp-server/tools/agentRunsCancelAgentRun.js.map +1 -1
- package/dist/esm/mcp-server/tools/agentRunsCreateAgentRun.js +1 -1
- package/dist/esm/mcp-server/tools/agentRunsCreateAgentRun.js.map +1 -1
- package/dist/esm/models/components/agent.d.ts +13 -0
- package/dist/esm/models/components/agent.d.ts.map +1 -1
- package/dist/esm/models/components/agent.js +16 -0
- package/dist/esm/models/components/agent.js.map +1 -1
- package/dist/esm/models/components/agentrun.d.ts +4 -3
- package/dist/esm/models/components/agentrun.d.ts.map +1 -1
- package/dist/esm/models/components/agentrun.js +2 -1
- package/dist/esm/models/components/agentrun.js.map +1 -1
- package/dist/esm/models/components/createagentrequest.d.ts +26 -0
- package/dist/esm/models/components/createagentrequest.d.ts.map +1 -1
- package/dist/esm/models/components/createagentrequest.js +21 -0
- package/dist/esm/models/components/createagentrequest.js.map +1 -1
- package/dist/esm/models/components/updateagentrequest.d.ts +26 -0
- package/dist/esm/models/components/updateagentrequest.d.ts.map +1 -1
- package/dist/esm/models/components/updateagentrequest.js +21 -0
- package/dist/esm/models/components/updateagentrequest.js.map +1 -1
- package/dist/esm/react-query/agentRunsCancelAgentRun.d.ts +1 -1
- package/dist/esm/react-query/agentRunsCancelAgentRun.js +1 -1
- package/dist/esm/react-query/agentRunsCreateAgentRun.d.ts +1 -1
- package/dist/esm/react-query/agentRunsCreateAgentRun.js +1 -1
- package/dist/esm/sdk/agentruns.d.ts +2 -2
- package/dist/esm/sdk/agentruns.js +2 -2
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/agentRunsCancelAgentRun.ts +1 -1
- package/src/funcs/agentRunsCreateAgentRun.ts +4 -4
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/agentRunsCancelAgentRun.ts +1 -1
- package/src/mcp-server/tools/agentRunsCreateAgentRun.ts +1 -1
- package/src/models/components/agent.ts +27 -0
- package/src/models/components/agentrun.ts +4 -3
- package/src/models/components/createagentrequest.ts +45 -0
- package/src/models/components/updateagentrequest.ts +45 -0
- package/src/react-query/agentRunsCancelAgentRun.ts +1 -1
- package/src/react-query/agentRunsCreateAgentRun.ts +1 -1
- package/src/sdk/agentruns.ts +2 -2
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
5
|
import { AgentReasoningConfiguration, AgentReasoningConfiguration$Outbound } from "./agentreasoningconfiguration.js";
|
|
5
6
|
import { AgentTextConfiguration, AgentTextConfiguration$Outbound } from "./agenttextconfiguration.js";
|
|
6
7
|
import { ToolDefinition, ToolDefinition$Outbound } from "./tooldefinition.js";
|
|
8
|
+
/**
|
|
9
|
+
* What a run beyond max_concurrent_runs gets. reject (the default) refuses it with 429 and error code agent_concurrency_limit. queue stores it as waiting and starts it, oldest first, when a run finishes, with the agent configuration current at that time.
|
|
10
|
+
*/
|
|
11
|
+
export declare const CreateAgentRequestConcurrencyOverflow: {
|
|
12
|
+
readonly Reject: "reject";
|
|
13
|
+
readonly Queue: "queue";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* What a run beyond max_concurrent_runs gets. reject (the default) refuses it with 429 and error code agent_concurrency_limit. queue stores it as waiting and starts it, oldest first, when a run finishes, with the agent configuration current at that time.
|
|
17
|
+
*/
|
|
18
|
+
export type CreateAgentRequestConcurrencyOverflow = ClosedEnum<typeof CreateAgentRequestConcurrencyOverflow>;
|
|
7
19
|
export type CreateAgentRequest = {
|
|
8
20
|
name: string;
|
|
9
21
|
description?: string | null | undefined;
|
|
@@ -20,6 +32,14 @@ export type CreateAgentRequest = {
|
|
|
20
32
|
* Ordered chain of model IDs the gateway tries when a model call fails on the model before it; forwarded unchanged to the Responses API, which validates it. Empty (the default) means the run keeps the gateway's own fallback rules for the model.
|
|
21
33
|
*/
|
|
22
34
|
fallbackModels?: Array<string> | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Most runs of this agent that may execute at once. Null (the default) means no limit. Not part of the versioned configuration: a rollback keeps the current limit, and changing only this field or concurrency_overflow creates no new version.
|
|
37
|
+
*/
|
|
38
|
+
maxConcurrentRuns?: number | null | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* What a run beyond max_concurrent_runs gets. reject (the default) refuses it with 429 and error code agent_concurrency_limit. queue stores it as waiting and starts it, oldest first, when a run finishes, with the agent configuration current at that time.
|
|
41
|
+
*/
|
|
42
|
+
concurrencyOverflow?: CreateAgentRequestConcurrencyOverflow | undefined;
|
|
23
43
|
text?: AgentTextConfiguration | null | undefined;
|
|
24
44
|
reasoning?: AgentReasoningConfiguration | null | undefined;
|
|
25
45
|
metadata?: {
|
|
@@ -27,6 +47,10 @@ export type CreateAgentRequest = {
|
|
|
27
47
|
} | undefined;
|
|
28
48
|
};
|
|
29
49
|
/** @internal */
|
|
50
|
+
export declare const CreateAgentRequestConcurrencyOverflow$inboundSchema: z.ZodNativeEnum<typeof CreateAgentRequestConcurrencyOverflow>;
|
|
51
|
+
/** @internal */
|
|
52
|
+
export declare const CreateAgentRequestConcurrencyOverflow$outboundSchema: z.ZodNativeEnum<typeof CreateAgentRequestConcurrencyOverflow>;
|
|
53
|
+
/** @internal */
|
|
30
54
|
export declare const CreateAgentRequest$inboundSchema: z.ZodType<CreateAgentRequest, z.ZodTypeDef, unknown>;
|
|
31
55
|
/** @internal */
|
|
32
56
|
export type CreateAgentRequest$Outbound = {
|
|
@@ -39,6 +63,8 @@ export type CreateAgentRequest$Outbound = {
|
|
|
39
63
|
parallel_tool_calls: boolean;
|
|
40
64
|
max_tool_calls?: number | null | undefined;
|
|
41
65
|
fallback_models?: Array<string> | undefined;
|
|
66
|
+
max_concurrent_runs?: number | null | undefined;
|
|
67
|
+
concurrency_overflow?: string | undefined;
|
|
42
68
|
text?: AgentTextConfiguration$Outbound | null | undefined;
|
|
43
69
|
reasoning?: AgentReasoningConfiguration$Outbound | null | undefined;
|
|
44
70
|
metadata?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createagentrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/createagentrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,2BAA2B,EAE3B,oCAAoC,EAErC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,sBAAsB,EAEtB,+BAA+B,EAEhC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,cAAc,EAEd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AE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CA0BlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR;AACD,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAMzD"}
|
|
@@ -7,6 +7,17 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { AgentReasoningConfiguration$inboundSchema, AgentReasoningConfiguration$outboundSchema, } from "./agentreasoningconfiguration.js";
|
|
8
8
|
import { AgentTextConfiguration$inboundSchema, AgentTextConfiguration$outboundSchema, } from "./agenttextconfiguration.js";
|
|
9
9
|
import { ToolDefinition$inboundSchema, ToolDefinition$outboundSchema, } from "./tooldefinition.js";
|
|
10
|
+
/**
|
|
11
|
+
* What a run beyond max_concurrent_runs gets. reject (the default) refuses it with 429 and error code agent_concurrency_limit. queue stores it as waiting and starts it, oldest first, when a run finishes, with the agent configuration current at that time.
|
|
12
|
+
*/
|
|
13
|
+
export const CreateAgentRequestConcurrencyOverflow = {
|
|
14
|
+
Reject: "reject",
|
|
15
|
+
Queue: "queue",
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const CreateAgentRequestConcurrencyOverflow$inboundSchema = z.nativeEnum(CreateAgentRequestConcurrencyOverflow);
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const CreateAgentRequestConcurrencyOverflow$outboundSchema = CreateAgentRequestConcurrencyOverflow$inboundSchema;
|
|
10
21
|
/** @internal */
|
|
11
22
|
export const CreateAgentRequest$inboundSchema = z.object({
|
|
12
23
|
name: z.string(),
|
|
@@ -18,6 +29,9 @@ export const CreateAgentRequest$inboundSchema = z.object({
|
|
|
18
29
|
parallel_tool_calls: z.boolean().default(true),
|
|
19
30
|
max_tool_calls: z.nullable(z.number().int()).optional(),
|
|
20
31
|
fallback_models: z.array(z.string()).optional(),
|
|
32
|
+
max_concurrent_runs: z.nullable(z.number().int()).optional(),
|
|
33
|
+
concurrency_overflow: CreateAgentRequestConcurrencyOverflow$inboundSchema
|
|
34
|
+
.optional(),
|
|
21
35
|
text: z.nullable(AgentTextConfiguration$inboundSchema).optional(),
|
|
22
36
|
reasoning: z.nullable(AgentReasoningConfiguration$inboundSchema).optional(),
|
|
23
37
|
metadata: z.record(z.string()).optional(),
|
|
@@ -27,6 +41,8 @@ export const CreateAgentRequest$inboundSchema = z.object({
|
|
|
27
41
|
"parallel_tool_calls": "parallelToolCalls",
|
|
28
42
|
"max_tool_calls": "maxToolCalls",
|
|
29
43
|
"fallback_models": "fallbackModels",
|
|
44
|
+
"max_concurrent_runs": "maxConcurrentRuns",
|
|
45
|
+
"concurrency_overflow": "concurrencyOverflow",
|
|
30
46
|
});
|
|
31
47
|
});
|
|
32
48
|
/** @internal */
|
|
@@ -40,6 +56,9 @@ export const CreateAgentRequest$outboundSchema = z.object({
|
|
|
40
56
|
parallelToolCalls: z.boolean().default(true),
|
|
41
57
|
maxToolCalls: z.nullable(z.number().int()).optional(),
|
|
42
58
|
fallbackModels: z.array(z.string()).optional(),
|
|
59
|
+
maxConcurrentRuns: z.nullable(z.number().int()).optional(),
|
|
60
|
+
concurrencyOverflow: CreateAgentRequestConcurrencyOverflow$outboundSchema
|
|
61
|
+
.optional(),
|
|
43
62
|
text: z.nullable(AgentTextConfiguration$outboundSchema).optional(),
|
|
44
63
|
reasoning: z.nullable(AgentReasoningConfiguration$outboundSchema).optional(),
|
|
45
64
|
metadata: z.record(z.string()).optional(),
|
|
@@ -49,6 +68,8 @@ export const CreateAgentRequest$outboundSchema = z.object({
|
|
|
49
68
|
parallelToolCalls: "parallel_tool_calls",
|
|
50
69
|
maxToolCalls: "max_tool_calls",
|
|
51
70
|
fallbackModels: "fallback_models",
|
|
71
|
+
maxConcurrentRuns: "max_concurrent_runs",
|
|
72
|
+
concurrencyOverflow: "concurrency_overflow",
|
|
52
73
|
});
|
|
53
74
|
});
|
|
54
75
|
export function createAgentRequestToJSON(createAgentRequest) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createagentrequest.js","sourceRoot":"","sources":["../../../../src/models/components/createagentrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"createagentrequest.js","sourceRoot":"","sources":["../../../../src/models/components/createagentrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAIjD,OAAO,EAEL,yCAAyC,EAEzC,0CAA0C,GAC3C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,oCAAoC,EAEpC,qCAAqC,GACtC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,4BAA4B,EAE5B,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACN,CAAC;AAqCX,gBAAgB;AAChB,MAAM,CAAC,MAAM,mDAAmD,GACE,CAAC,CAAC,UAAU,CAC1E,qCAAqC,CACtC,CAAC;AACJ,gBAAgB;AAChB,MAAM,CAAC,MAAM,oDAAoD,GAE7D,mDAAmD,CAAC;AAExD,gBAAgB;AAChB,MAAM,CAAC,MAAM,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,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AC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;QACzB,iBAAiB,EAAE,qBAAqB;QACxC,YAAY,EAAE,gBAAgB;QAC9B,cAAc,EAAE,iBAAiB;QACjC,iBAAiB,EAAE,qBAAqB;QACxC,mBAAmB,EAAE,sBAAsB;KAC5C,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,iCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,CAAC;AACD,MAAM,UAAU,0BAA0B,CACxC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC5D,gDAAgD,CACjD,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
5
|
import { AgentReasoningConfiguration, AgentReasoningConfiguration$Outbound } from "./agentreasoningconfiguration.js";
|
|
5
6
|
import { AgentTextConfiguration, AgentTextConfiguration$Outbound } from "./agenttextconfiguration.js";
|
|
6
7
|
import { ToolDefinition, ToolDefinition$Outbound } from "./tooldefinition.js";
|
|
8
|
+
/**
|
|
9
|
+
* What a run beyond max_concurrent_runs gets. reject (the default) refuses it with 429 and error code agent_concurrency_limit. queue stores it as waiting and starts it, oldest first, when a run finishes, with the agent configuration current at that time.
|
|
10
|
+
*/
|
|
11
|
+
export declare const UpdateAgentRequestConcurrencyOverflow: {
|
|
12
|
+
readonly Reject: "reject";
|
|
13
|
+
readonly Queue: "queue";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* What a run beyond max_concurrent_runs gets. reject (the default) refuses it with 429 and error code agent_concurrency_limit. queue stores it as waiting and starts it, oldest first, when a run finishes, with the agent configuration current at that time.
|
|
17
|
+
*/
|
|
18
|
+
export type UpdateAgentRequestConcurrencyOverflow = ClosedEnum<typeof UpdateAgentRequestConcurrencyOverflow>;
|
|
7
19
|
/**
|
|
8
20
|
* Updates only provided fields. Omitted fields preserve their saved values; empty updates are rejected.
|
|
9
21
|
*/
|
|
@@ -23,6 +35,14 @@ export type UpdateAgentRequest = {
|
|
|
23
35
|
* Ordered chain of model IDs the gateway tries when a model call fails on the model before it; forwarded unchanged to the Responses API, which validates it. Empty (the default) means the run keeps the gateway's own fallback rules for the model.
|
|
24
36
|
*/
|
|
25
37
|
fallbackModels?: Array<string> | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Most runs of this agent that may execute at once. Null (the default) means no limit. Not part of the versioned configuration: a rollback keeps the current limit, and changing only this field or concurrency_overflow creates no new version.
|
|
40
|
+
*/
|
|
41
|
+
maxConcurrentRuns?: number | null | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* What a run beyond max_concurrent_runs gets. reject (the default) refuses it with 429 and error code agent_concurrency_limit. queue stores it as waiting and starts it, oldest first, when a run finishes, with the agent configuration current at that time.
|
|
44
|
+
*/
|
|
45
|
+
concurrencyOverflow?: UpdateAgentRequestConcurrencyOverflow | undefined;
|
|
26
46
|
text?: AgentTextConfiguration | null | undefined;
|
|
27
47
|
reasoning?: AgentReasoningConfiguration | null | undefined;
|
|
28
48
|
metadata?: {
|
|
@@ -30,6 +50,10 @@ export type UpdateAgentRequest = {
|
|
|
30
50
|
} | undefined;
|
|
31
51
|
};
|
|
32
52
|
/** @internal */
|
|
53
|
+
export declare const UpdateAgentRequestConcurrencyOverflow$inboundSchema: z.ZodNativeEnum<typeof UpdateAgentRequestConcurrencyOverflow>;
|
|
54
|
+
/** @internal */
|
|
55
|
+
export declare const UpdateAgentRequestConcurrencyOverflow$outboundSchema: z.ZodNativeEnum<typeof UpdateAgentRequestConcurrencyOverflow>;
|
|
56
|
+
/** @internal */
|
|
33
57
|
export declare const UpdateAgentRequest$inboundSchema: z.ZodType<UpdateAgentRequest, z.ZodTypeDef, unknown>;
|
|
34
58
|
/** @internal */
|
|
35
59
|
export type UpdateAgentRequest$Outbound = {
|
|
@@ -42,6 +66,8 @@ export type UpdateAgentRequest$Outbound = {
|
|
|
42
66
|
parallel_tool_calls?: boolean | undefined;
|
|
43
67
|
max_tool_calls?: number | null | undefined;
|
|
44
68
|
fallback_models?: Array<string> | undefined;
|
|
69
|
+
max_concurrent_runs?: number | null | undefined;
|
|
70
|
+
concurrency_overflow?: string | undefined;
|
|
45
71
|
text?: AgentTextConfiguration$Outbound | null | undefined;
|
|
46
72
|
reasoning?: AgentReasoningConfiguration$Outbound | null | undefined;
|
|
47
73
|
metadata?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateagentrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/updateagentrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,2BAA2B,EAE3B,oCAAoC,EAErC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,sBAAsB,EAEtB,+BAA+B,EAEhC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,cAAc,EAEd,uBAAuB,EAExB,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE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CAAC;CAChD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CA0BlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR;AACD,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAMzD"}
|
|
@@ -7,6 +7,17 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { AgentReasoningConfiguration$inboundSchema, AgentReasoningConfiguration$outboundSchema, } from "./agentreasoningconfiguration.js";
|
|
8
8
|
import { AgentTextConfiguration$inboundSchema, AgentTextConfiguration$outboundSchema, } from "./agenttextconfiguration.js";
|
|
9
9
|
import { ToolDefinition$inboundSchema, ToolDefinition$outboundSchema, } from "./tooldefinition.js";
|
|
10
|
+
/**
|
|
11
|
+
* What a run beyond max_concurrent_runs gets. reject (the default) refuses it with 429 and error code agent_concurrency_limit. queue stores it as waiting and starts it, oldest first, when a run finishes, with the agent configuration current at that time.
|
|
12
|
+
*/
|
|
13
|
+
export const UpdateAgentRequestConcurrencyOverflow = {
|
|
14
|
+
Reject: "reject",
|
|
15
|
+
Queue: "queue",
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const UpdateAgentRequestConcurrencyOverflow$inboundSchema = z.nativeEnum(UpdateAgentRequestConcurrencyOverflow);
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const UpdateAgentRequestConcurrencyOverflow$outboundSchema = UpdateAgentRequestConcurrencyOverflow$inboundSchema;
|
|
10
21
|
/** @internal */
|
|
11
22
|
export const UpdateAgentRequest$inboundSchema = z.object({
|
|
12
23
|
name: z.string().optional(),
|
|
@@ -18,6 +29,9 @@ export const UpdateAgentRequest$inboundSchema = z.object({
|
|
|
18
29
|
parallel_tool_calls: z.boolean().optional(),
|
|
19
30
|
max_tool_calls: z.nullable(z.number().int()).optional(),
|
|
20
31
|
fallback_models: z.array(z.string()).optional(),
|
|
32
|
+
max_concurrent_runs: z.nullable(z.number().int()).optional(),
|
|
33
|
+
concurrency_overflow: UpdateAgentRequestConcurrencyOverflow$inboundSchema
|
|
34
|
+
.optional(),
|
|
21
35
|
text: z.nullable(AgentTextConfiguration$inboundSchema).optional(),
|
|
22
36
|
reasoning: z.nullable(AgentReasoningConfiguration$inboundSchema).optional(),
|
|
23
37
|
metadata: z.record(z.string()).optional(),
|
|
@@ -27,6 +41,8 @@ export const UpdateAgentRequest$inboundSchema = z.object({
|
|
|
27
41
|
"parallel_tool_calls": "parallelToolCalls",
|
|
28
42
|
"max_tool_calls": "maxToolCalls",
|
|
29
43
|
"fallback_models": "fallbackModels",
|
|
44
|
+
"max_concurrent_runs": "maxConcurrentRuns",
|
|
45
|
+
"concurrency_overflow": "concurrencyOverflow",
|
|
30
46
|
});
|
|
31
47
|
});
|
|
32
48
|
/** @internal */
|
|
@@ -40,6 +56,9 @@ export const UpdateAgentRequest$outboundSchema = z.object({
|
|
|
40
56
|
parallelToolCalls: z.boolean().optional(),
|
|
41
57
|
maxToolCalls: z.nullable(z.number().int()).optional(),
|
|
42
58
|
fallbackModels: z.array(z.string()).optional(),
|
|
59
|
+
maxConcurrentRuns: z.nullable(z.number().int()).optional(),
|
|
60
|
+
concurrencyOverflow: UpdateAgentRequestConcurrencyOverflow$outboundSchema
|
|
61
|
+
.optional(),
|
|
43
62
|
text: z.nullable(AgentTextConfiguration$outboundSchema).optional(),
|
|
44
63
|
reasoning: z.nullable(AgentReasoningConfiguration$outboundSchema).optional(),
|
|
45
64
|
metadata: z.record(z.string()).optional(),
|
|
@@ -49,6 +68,8 @@ export const UpdateAgentRequest$outboundSchema = z.object({
|
|
|
49
68
|
parallelToolCalls: "parallel_tool_calls",
|
|
50
69
|
maxToolCalls: "max_tool_calls",
|
|
51
70
|
fallbackModels: "fallback_models",
|
|
71
|
+
maxConcurrentRuns: "max_concurrent_runs",
|
|
72
|
+
concurrencyOverflow: "concurrency_overflow",
|
|
52
73
|
});
|
|
53
74
|
});
|
|
54
75
|
export function updateAgentRequestToJSON(updateAgentRequest) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateagentrequest.js","sourceRoot":"","sources":["../../../../src/models/components/updateagentrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"updateagentrequest.js","sourceRoot":"","sources":["../../../../src/models/components/updateagentrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAIjD,OAAO,EAEL,yCAAyC,EAEzC,0CAA0C,GAC3C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,oCAAoC,EAEpC,qCAAqC,GACtC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,4BAA4B,EAE5B,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACN,CAAC;AAwCX,gBAAgB;AAChB,MAAM,CAAC,MAAM,mDAAmD,GACE,CAAC,CAAC,UAAU,CAC1E,qCAAqC,CACtC,CAAC;AACJ,gBAAgB;AAChB,MAAM,CAAC,MAAM,oDAAoD,GAE7D,mDAAmD,CAAC;AAExD,gBAAgB;AAChB,MAAM,CAAC,MAAM,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CAAC,qCAAqC,CAAC,CAAC,QAAQ,EAAE;IAClE,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,0CAA0C,CAAC,CAAC,QAAQ,EAAE;IAC5E,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;QACzB,iBAAiB,EAAE,qBAAqB;QACxC,YAAY,EAAE,gBAAgB;QAC9B,cAAc,EAAE,iBAAiB;QACjC,iBAAiB,EAAE,qBAAqB;QACxC,mBAAmB,EAAE,sBAAsB;KAC5C,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,iCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,CAAC;AACD,MAAM,UAAU,0BAA0B,CACxC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC5D,gDAAgD,CACjD,CAAC;AACJ,CAAC"}
|
|
@@ -19,7 +19,7 @@ export type AgentRunsCancelAgentRunMutationError = errors.ErrorEnvelope | SDKErr
|
|
|
19
19
|
* Cancel a saved-agent run
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
22
|
-
* Cancels a queued run locally before dispatch, or forwards cancellation to its linked gateway response. Locally failed linked runs with an active or missing gateway snapshot are checked upstream before cancellation; genuine terminal work is never relabelled cancelled. Fresh incomplete gateway snapshots are presented as incomplete on subsequent reads while preserving the connector error and completion timestamp, even if cancel returns 409. Repeated cancellation is idempotent. Returns 409 if submission has no linked response yet or a genuine terminal outcome already won. Uses the run's organization, team and delegated-user mutation scope; operator read access does not grant cancellation access. API-key callers also need write:responses for linked cancellation and read:responses to inspect locally failed runs or reconcile a completion race.
|
|
22
|
+
* Cancels a waiting or queued run locally before dispatch, or forwards cancellation to its linked gateway response. Locally failed linked runs with an active or missing gateway snapshot are checked upstream before cancellation; genuine terminal work is never relabelled cancelled. Fresh incomplete gateway snapshots are presented as incomplete on subsequent reads while preserving the connector error and completion timestamp, even if cancel returns 409. Repeated cancellation is idempotent. Returns 409 if submission has no linked response yet or a genuine terminal outcome already won. Uses the run's organization, team and delegated-user mutation scope; operator read access does not grant cancellation access. API-key callers also need write:responses for linked cancellation and read:responses to inspect locally failed runs or reconcile a completion race.
|
|
23
23
|
*/
|
|
24
24
|
export declare function useAgentRunsCancelAgentRunMutation(options?: MutationHookOptions<AgentRunsCancelAgentRunMutationData, AgentRunsCancelAgentRunMutationError, AgentRunsCancelAgentRunMutationVariables>): UseMutationResult<AgentRunsCancelAgentRunMutationData, AgentRunsCancelAgentRunMutationError, AgentRunsCancelAgentRunMutationVariables>;
|
|
25
25
|
export declare function mutationKeyAgentRunsCancelAgentRun(): MutationKey;
|
|
@@ -10,7 +10,7 @@ import { useSDKContext } from "./_context.js";
|
|
|
10
10
|
* Cancel a saved-agent run
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
|
-
* Cancels a queued run locally before dispatch, or forwards cancellation to its linked gateway response. Locally failed linked runs with an active or missing gateway snapshot are checked upstream before cancellation; genuine terminal work is never relabelled cancelled. Fresh incomplete gateway snapshots are presented as incomplete on subsequent reads while preserving the connector error and completion timestamp, even if cancel returns 409. Repeated cancellation is idempotent. Returns 409 if submission has no linked response yet or a genuine terminal outcome already won. Uses the run's organization, team and delegated-user mutation scope; operator read access does not grant cancellation access. API-key callers also need write:responses for linked cancellation and read:responses to inspect locally failed runs or reconcile a completion race.
|
|
13
|
+
* Cancels a waiting or queued run locally before dispatch, or forwards cancellation to its linked gateway response. Locally failed linked runs with an active or missing gateway snapshot are checked upstream before cancellation; genuine terminal work is never relabelled cancelled. Fresh incomplete gateway snapshots are presented as incomplete on subsequent reads while preserving the connector error and completion timestamp, even if cancel returns 409. Repeated cancellation is idempotent. Returns 409 if submission has no linked response yet or a genuine terminal outcome already won. Uses the run's organization, team and delegated-user mutation scope; operator read access does not grant cancellation access. API-key callers also need write:responses for linked cancellation and read:responses to inspect locally failed runs or reconcile a completion race.
|
|
14
14
|
*/
|
|
15
15
|
export function useAgentRunsCancelAgentRunMutation(options) {
|
|
16
16
|
const client = useSDKContext();
|
|
@@ -19,7 +19,7 @@ export type AgentRunsCreateAgentRunMutationError = errors.ErrorEnvelope | SDKErr
|
|
|
19
19
|
* Start a saved agent run
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
22
|
-
* Starts an asynchronous background run for a saved agent and returns the queued run record. Use the run retrieval endpoint to poll status or the events endpoint to stream progress.
|
|
22
|
+
* Starts an asynchronous background run for a saved agent and returns the queued run record. Use the run retrieval endpoint to poll status or the events endpoint to stream progress. When the agent is already running max_concurrent_runs runs, concurrency_overflow decides: reject returns 429 with error code agent_concurrency_limit and creates no run; queue returns 202 with a waiting run that starts when a slot frees.
|
|
23
23
|
*/
|
|
24
24
|
export declare function useAgentRunsCreateAgentRunMutation(options?: MutationHookOptions<AgentRunsCreateAgentRunMutationData, AgentRunsCreateAgentRunMutationError, AgentRunsCreateAgentRunMutationVariables>): UseMutationResult<AgentRunsCreateAgentRunMutationData, AgentRunsCreateAgentRunMutationError, AgentRunsCreateAgentRunMutationVariables>;
|
|
25
25
|
export declare function mutationKeyAgentRunsCreateAgentRun(): MutationKey;
|
|
@@ -10,7 +10,7 @@ import { useSDKContext } from "./_context.js";
|
|
|
10
10
|
* Start a saved agent run
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
|
-
* Starts an asynchronous background run for a saved agent and returns the queued run record. Use the run retrieval endpoint to poll status or the events endpoint to stream progress.
|
|
13
|
+
* Starts an asynchronous background run for a saved agent and returns the queued run record. Use the run retrieval endpoint to poll status or the events endpoint to stream progress. When the agent is already running max_concurrent_runs runs, concurrency_overflow decides: reject returns 429 with error code agent_concurrency_limit and creates no run; queue returns 202 with a waiting run that starts when a slot frees.
|
|
14
14
|
*/
|
|
15
15
|
export function useAgentRunsCreateAgentRunMutation(options) {
|
|
16
16
|
const client = useSDKContext();
|
|
@@ -10,7 +10,7 @@ export declare class AgentRuns extends ClientSDK {
|
|
|
10
10
|
* Start a saved agent run
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
|
-
* Starts an asynchronous background run for a saved agent and returns the queued run record. Use the run retrieval endpoint to poll status or the events endpoint to stream progress.
|
|
13
|
+
* Starts an asynchronous background run for a saved agent and returns the queued run record. Use the run retrieval endpoint to poll status or the events endpoint to stream progress. When the agent is already running max_concurrent_runs runs, concurrency_overflow decides: reject returns 429 with error code agent_concurrency_limit and creates no run; queue returns 202 with a waiting run that starts when a slot frees.
|
|
14
14
|
*/
|
|
15
15
|
createAgentRun(request: operations.CreateAgentRunRequest, options?: RequestOptions): Promise<components.AgentRun>;
|
|
16
16
|
/**
|
|
@@ -24,7 +24,7 @@ export declare class AgentRuns extends ClientSDK {
|
|
|
24
24
|
* Cancel a saved-agent run
|
|
25
25
|
*
|
|
26
26
|
* @remarks
|
|
27
|
-
* Cancels a queued run locally before dispatch, or forwards cancellation to its linked gateway response. Locally failed linked runs with an active or missing gateway snapshot are checked upstream before cancellation; genuine terminal work is never relabelled cancelled. Fresh incomplete gateway snapshots are presented as incomplete on subsequent reads while preserving the connector error and completion timestamp, even if cancel returns 409. Repeated cancellation is idempotent. Returns 409 if submission has no linked response yet or a genuine terminal outcome already won. Uses the run's organization, team and delegated-user mutation scope; operator read access does not grant cancellation access. API-key callers also need write:responses for linked cancellation and read:responses to inspect locally failed runs or reconcile a completion race.
|
|
27
|
+
* Cancels a waiting or queued run locally before dispatch, or forwards cancellation to its linked gateway response. Locally failed linked runs with an active or missing gateway snapshot are checked upstream before cancellation; genuine terminal work is never relabelled cancelled. Fresh incomplete gateway snapshots are presented as incomplete on subsequent reads while preserving the connector error and completion timestamp, even if cancel returns 409. Repeated cancellation is idempotent. Returns 409 if submission has no linked response yet or a genuine terminal outcome already won. Uses the run's organization, team and delegated-user mutation scope; operator read access does not grant cancellation access. API-key callers also need write:responses for linked cancellation and read:responses to inspect locally failed runs or reconcile a completion race.
|
|
28
28
|
*/
|
|
29
29
|
cancelAgentRun(request: operations.CancelAgentRunRequest, options?: RequestOptions): Promise<components.AgentRun>;
|
|
30
30
|
/**
|
|
@@ -21,7 +21,7 @@ export class AgentRuns extends ClientSDK {
|
|
|
21
21
|
* Start a saved agent run
|
|
22
22
|
*
|
|
23
23
|
* @remarks
|
|
24
|
-
* Starts an asynchronous background run for a saved agent and returns the queued run record. Use the run retrieval endpoint to poll status or the events endpoint to stream progress.
|
|
24
|
+
* Starts an asynchronous background run for a saved agent and returns the queued run record. Use the run retrieval endpoint to poll status or the events endpoint to stream progress. When the agent is already running max_concurrent_runs runs, concurrency_overflow decides: reject returns 429 with error code agent_concurrency_limit and creates no run; queue returns 202 with a waiting run that starts when a slot frees.
|
|
25
25
|
*/
|
|
26
26
|
async createAgentRun(request, options) {
|
|
27
27
|
return unwrapAsync(agentRunsCreateAgentRun(this, request, options));
|
|
@@ -39,7 +39,7 @@ export class AgentRuns extends ClientSDK {
|
|
|
39
39
|
* Cancel a saved-agent run
|
|
40
40
|
*
|
|
41
41
|
* @remarks
|
|
42
|
-
* Cancels a queued run locally before dispatch, or forwards cancellation to its linked gateway response. Locally failed linked runs with an active or missing gateway snapshot are checked upstream before cancellation; genuine terminal work is never relabelled cancelled. Fresh incomplete gateway snapshots are presented as incomplete on subsequent reads while preserving the connector error and completion timestamp, even if cancel returns 409. Repeated cancellation is idempotent. Returns 409 if submission has no linked response yet or a genuine terminal outcome already won. Uses the run's organization, team and delegated-user mutation scope; operator read access does not grant cancellation access. API-key callers also need write:responses for linked cancellation and read:responses to inspect locally failed runs or reconcile a completion race.
|
|
42
|
+
* Cancels a waiting or queued run locally before dispatch, or forwards cancellation to its linked gateway response. Locally failed linked runs with an active or missing gateway snapshot are checked upstream before cancellation; genuine terminal work is never relabelled cancelled. Fresh incomplete gateway snapshots are presented as incomplete on subsequent reads while preserving the connector error and completion timestamp, even if cancel returns 409. Repeated cancellation is idempotent. Returns 409 if submission has no linked response yet or a genuine terminal outcome already won. Uses the run's organization, team and delegated-user mutation scope; operator read access does not grant cancellation access. API-key callers also need write:responses for linked cancellation and read:responses to inspect locally failed runs or reconcile a completion race.
|
|
43
43
|
*/
|
|
44
44
|
async cancelAgentRun(request, options) {
|
|
45
45
|
return unwrapAsync(agentRunsCancelAgentRun(this, request, options));
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -31,7 +31,7 @@ import { Result } from "../types/fp.js";
|
|
|
31
31
|
* Cancel a saved-agent run
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
* Cancels a queued run locally before dispatch, or forwards cancellation to its linked gateway response. Locally failed linked runs with an active or missing gateway snapshot are checked upstream before cancellation; genuine terminal work is never relabelled cancelled. Fresh incomplete gateway snapshots are presented as incomplete on subsequent reads while preserving the connector error and completion timestamp, even if cancel returns 409. Repeated cancellation is idempotent. Returns 409 if submission has no linked response yet or a genuine terminal outcome already won. Uses the run's organization, team and delegated-user mutation scope; operator read access does not grant cancellation access. API-key callers also need write:responses for linked cancellation and read:responses to inspect locally failed runs or reconcile a completion race.
|
|
34
|
+
* Cancels a waiting or queued run locally before dispatch, or forwards cancellation to its linked gateway response. Locally failed linked runs with an active or missing gateway snapshot are checked upstream before cancellation; genuine terminal work is never relabelled cancelled. Fresh incomplete gateway snapshots are presented as incomplete on subsequent reads while preserving the connector error and completion timestamp, even if cancel returns 409. Repeated cancellation is idempotent. Returns 409 if submission has no linked response yet or a genuine terminal outcome already won. Uses the run's organization, team and delegated-user mutation scope; operator read access does not grant cancellation access. API-key callers also need write:responses for linked cancellation and read:responses to inspect locally failed runs or reconcile a completion race.
|
|
35
35
|
*
|
|
36
36
|
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
37
37
|
*/
|
|
@@ -31,7 +31,7 @@ import { Result } from "../types/fp.js";
|
|
|
31
31
|
* Start a saved agent run
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
* Starts an asynchronous background run for a saved agent and returns the queued run record. Use the run retrieval endpoint to poll status or the events endpoint to stream progress.
|
|
34
|
+
* Starts an asynchronous background run for a saved agent and returns the queued run record. Use the run retrieval endpoint to poll status or the events endpoint to stream progress. When the agent is already running max_concurrent_runs runs, concurrency_overflow decides: reject returns 429 with error code agent_concurrency_limit and creates no run; queue returns 202 with a waiting run that starts when a slot frees.
|
|
35
35
|
*
|
|
36
36
|
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
37
37
|
*/
|
|
@@ -184,9 +184,9 @@ async function $do(
|
|
|
184
184
|
| UnexpectedClientError
|
|
185
185
|
| SDKValidationError
|
|
186
186
|
>(
|
|
187
|
-
M.json(201, components.AgentRun$inboundSchema),
|
|
188
|
-
M.jsonErr([400, 401, 404], errors.ErrorEnvelope$inboundSchema),
|
|
189
|
-
M.jsonErr(502, errors.ErrorEnvelope$inboundSchema),
|
|
187
|
+
M.json([201, 202], components.AgentRun$inboundSchema),
|
|
188
|
+
M.jsonErr([400, 401, 404, 429], errors.ErrorEnvelope$inboundSchema),
|
|
189
|
+
M.jsonErr([502, 503], errors.ErrorEnvelope$inboundSchema),
|
|
190
190
|
M.fail("4XX"),
|
|
191
191
|
M.fail("5XX"),
|
|
192
192
|
)(response, req, { extraFields: responseFields });
|
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.55.
|
|
68
|
+
sdkVersion: "0.55.25",
|
|
69
69
|
genVersion: "2.950.2",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.55.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.55.25 2.950.2 1.1.0 @meetkai/mka1",
|
|
71
71
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -14,7 +14,7 @@ export const tool$agentRunsCancelAgentRun: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "agent-runs-cancel-agent-run",
|
|
15
15
|
description: `Cancel a saved-agent run
|
|
16
16
|
|
|
17
|
-
Cancels a queued run locally before dispatch, or forwards cancellation to its linked gateway response. Locally failed linked runs with an active or missing gateway snapshot are checked upstream before cancellation; genuine terminal work is never relabelled cancelled. Fresh incomplete gateway snapshots are presented as incomplete on subsequent reads while preserving the connector error and completion timestamp, even if cancel returns 409. Repeated cancellation is idempotent. Returns 409 if submission has no linked response yet or a genuine terminal outcome already won. Uses the run's organization, team and delegated-user mutation scope; operator read access does not grant cancellation access. API-key callers also need write:responses for linked cancellation and read:responses to inspect locally failed runs or reconcile a completion race.`,
|
|
17
|
+
Cancels a waiting or queued run locally before dispatch, or forwards cancellation to its linked gateway response. Locally failed linked runs with an active or missing gateway snapshot are checked upstream before cancellation; genuine terminal work is never relabelled cancelled. Fresh incomplete gateway snapshots are presented as incomplete on subsequent reads while preserving the connector error and completion timestamp, even if cancel returns 409. Repeated cancellation is idempotent. Returns 409 if submission has no linked response yet or a genuine terminal outcome already won. Uses the run's organization, team and delegated-user mutation scope; operator read access does not grant cancellation access. API-key callers also need write:responses for linked cancellation and read:responses to inspect locally failed runs or reconcile a completion race.`,
|
|
18
18
|
args,
|
|
19
19
|
tool: async (client, args, ctx) => {
|
|
20
20
|
const [result, apiCall] = await agentRunsCancelAgentRun(
|
|
@@ -14,7 +14,7 @@ export const tool$agentRunsCreateAgentRun: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "agent-runs-create-agent-run",
|
|
15
15
|
description: `Start a saved agent run
|
|
16
16
|
|
|
17
|
-
Starts an asynchronous background run for a saved agent and returns the queued run record. Use the run retrieval endpoint to poll status or the events endpoint to stream progress.`,
|
|
17
|
+
Starts an asynchronous background run for a saved agent and returns the queued run record. Use the run retrieval endpoint to poll status or the events endpoint to stream progress. When the agent is already running max_concurrent_runs runs, concurrency_overflow decides: reject returns 429 with error code agent_concurrency_limit and creates no run; queue returns 202 with a waiting run that starts when a slot frees.`,
|
|
18
18
|
args,
|
|
19
19
|
tool: async (client, args, ctx) => {
|
|
20
20
|
const [result, apiCall] = await agentRunsCreateAgentRun(
|
|
@@ -32,6 +32,12 @@ export const AgentObject = {
|
|
|
32
32
|
} as const;
|
|
33
33
|
export type AgentObject = ClosedEnum<typeof AgentObject>;
|
|
34
34
|
|
|
35
|
+
export const ConcurrencyOverflow = {
|
|
36
|
+
Reject: "reject",
|
|
37
|
+
Queue: "queue",
|
|
38
|
+
} as const;
|
|
39
|
+
export type ConcurrencyOverflow = ClosedEnum<typeof ConcurrencyOverflow>;
|
|
40
|
+
|
|
35
41
|
export type Agent = {
|
|
36
42
|
object: AgentObject;
|
|
37
43
|
id: string;
|
|
@@ -47,6 +53,8 @@ export type Agent = {
|
|
|
47
53
|
parallelToolCalls: boolean;
|
|
48
54
|
maxToolCalls: number | null;
|
|
49
55
|
fallbackModels: Array<string>;
|
|
56
|
+
maxConcurrentRuns: number | null;
|
|
57
|
+
concurrencyOverflow: ConcurrencyOverflow;
|
|
50
58
|
text: AgentTextConfiguration | null;
|
|
51
59
|
reasoning: AgentReasoningConfiguration | null;
|
|
52
60
|
metadata: { [k: string]: string };
|
|
@@ -75,6 +83,15 @@ export const AgentObject$inboundSchema: z.ZodNativeEnum<typeof AgentObject> = z
|
|
|
75
83
|
export const AgentObject$outboundSchema: z.ZodNativeEnum<typeof AgentObject> =
|
|
76
84
|
AgentObject$inboundSchema;
|
|
77
85
|
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const ConcurrencyOverflow$inboundSchema: z.ZodNativeEnum<
|
|
88
|
+
typeof ConcurrencyOverflow
|
|
89
|
+
> = z.nativeEnum(ConcurrencyOverflow);
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const ConcurrencyOverflow$outboundSchema: z.ZodNativeEnum<
|
|
92
|
+
typeof ConcurrencyOverflow
|
|
93
|
+
> = ConcurrencyOverflow$inboundSchema;
|
|
94
|
+
|
|
78
95
|
/** @internal */
|
|
79
96
|
export const Agent$inboundSchema: z.ZodType<Agent, z.ZodTypeDef, unknown> = z
|
|
80
97
|
.object({
|
|
@@ -89,6 +106,8 @@ export const Agent$inboundSchema: z.ZodType<Agent, z.ZodTypeDef, unknown> = z
|
|
|
89
106
|
parallel_tool_calls: z.boolean(),
|
|
90
107
|
max_tool_calls: z.nullable(z.number().int()),
|
|
91
108
|
fallback_models: z.array(z.string()),
|
|
109
|
+
max_concurrent_runs: z.nullable(z.number().int()),
|
|
110
|
+
concurrency_overflow: ConcurrencyOverflow$inboundSchema,
|
|
92
111
|
text: z.nullable(AgentTextConfiguration$inboundSchema),
|
|
93
112
|
reasoning: z.nullable(AgentReasoningConfiguration$inboundSchema),
|
|
94
113
|
metadata: z.record(z.string()),
|
|
@@ -113,6 +132,8 @@ export const Agent$inboundSchema: z.ZodType<Agent, z.ZodTypeDef, unknown> = z
|
|
|
113
132
|
"parallel_tool_calls": "parallelToolCalls",
|
|
114
133
|
"max_tool_calls": "maxToolCalls",
|
|
115
134
|
"fallback_models": "fallbackModels",
|
|
135
|
+
"max_concurrent_runs": "maxConcurrentRuns",
|
|
136
|
+
"concurrency_overflow": "concurrencyOverflow",
|
|
116
137
|
"created_at": "createdAt",
|
|
117
138
|
"updated_at": "updatedAt",
|
|
118
139
|
"deleted_at": "deletedAt",
|
|
@@ -134,6 +155,8 @@ export type Agent$Outbound = {
|
|
|
134
155
|
parallel_tool_calls: boolean;
|
|
135
156
|
max_tool_calls: number | null;
|
|
136
157
|
fallback_models: Array<string>;
|
|
158
|
+
max_concurrent_runs: number | null;
|
|
159
|
+
concurrency_overflow: string;
|
|
137
160
|
text: AgentTextConfiguration$Outbound | null;
|
|
138
161
|
reasoning: AgentReasoningConfiguration$Outbound | null;
|
|
139
162
|
metadata: { [k: string]: string };
|
|
@@ -163,6 +186,8 @@ export const Agent$outboundSchema: z.ZodType<
|
|
|
163
186
|
parallelToolCalls: z.boolean(),
|
|
164
187
|
maxToolCalls: z.nullable(z.number().int()),
|
|
165
188
|
fallbackModels: z.array(z.string()),
|
|
189
|
+
maxConcurrentRuns: z.nullable(z.number().int()),
|
|
190
|
+
concurrencyOverflow: ConcurrencyOverflow$outboundSchema,
|
|
166
191
|
text: z.nullable(AgentTextConfiguration$outboundSchema),
|
|
167
192
|
reasoning: z.nullable(AgentReasoningConfiguration$outboundSchema),
|
|
168
193
|
metadata: z.record(z.string()),
|
|
@@ -179,6 +204,8 @@ export const Agent$outboundSchema: z.ZodType<
|
|
|
179
204
|
parallelToolCalls: "parallel_tool_calls",
|
|
180
205
|
maxToolCalls: "max_tool_calls",
|
|
181
206
|
fallbackModels: "fallback_models",
|
|
207
|
+
maxConcurrentRuns: "max_concurrent_runs",
|
|
208
|
+
concurrencyOverflow: "concurrency_overflow",
|
|
182
209
|
createdAt: "created_at",
|
|
183
210
|
updatedAt: "updated_at",
|
|
184
211
|
deletedAt: "deleted_at",
|
|
@@ -15,9 +15,10 @@ export const AgentRunObject = {
|
|
|
15
15
|
export type AgentRunObject = ClosedEnum<typeof AgentRunObject>;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Terminal outcomes stay distinct: cancelled is caller-requested; incomplete means a limit or interruption stopped the run. gateway_response.incomplete_details records the reason, including max_tokens or max_tool_calls. Stored failed rows with one of these gateway outcomes are serialized with the gateway outcome, retaining any connector error and completion timestamp.
|
|
18
|
+
* waiting means the run is held for one of the agent's max_concurrent_runs slots and has not been sent to the model; it can be cancelled. Terminal outcomes stay distinct: cancelled is caller-requested; incomplete means a limit or interruption stopped the run. gateway_response.incomplete_details records the reason, including max_tokens or max_tool_calls. Stored failed rows with one of these gateway outcomes are serialized with the gateway outcome, retaining any connector error and completion timestamp.
|
|
19
19
|
*/
|
|
20
20
|
export const AgentRunStatus = {
|
|
21
|
+
Waiting: "waiting",
|
|
21
22
|
Queued: "queued",
|
|
22
23
|
Submitting: "submitting",
|
|
23
24
|
Completed: "completed",
|
|
@@ -26,7 +27,7 @@ export const AgentRunStatus = {
|
|
|
26
27
|
Incomplete: "incomplete",
|
|
27
28
|
} as const;
|
|
28
29
|
/**
|
|
29
|
-
* Terminal outcomes stay distinct: cancelled is caller-requested; incomplete means a limit or interruption stopped the run. gateway_response.incomplete_details records the reason, including max_tokens or max_tool_calls. Stored failed rows with one of these gateway outcomes are serialized with the gateway outcome, retaining any connector error and completion timestamp.
|
|
30
|
+
* waiting means the run is held for one of the agent's max_concurrent_runs slots and has not been sent to the model; it can be cancelled. Terminal outcomes stay distinct: cancelled is caller-requested; incomplete means a limit or interruption stopped the run. gateway_response.incomplete_details records the reason, including max_tokens or max_tool_calls. Stored failed rows with one of these gateway outcomes are serialized with the gateway outcome, retaining any connector error and completion timestamp.
|
|
30
31
|
*/
|
|
31
32
|
export type AgentRunStatus = ClosedEnum<typeof AgentRunStatus>;
|
|
32
33
|
|
|
@@ -39,7 +40,7 @@ export type AgentRun = {
|
|
|
39
40
|
*/
|
|
40
41
|
agentVersion: number | null;
|
|
41
42
|
/**
|
|
42
|
-
* Terminal outcomes stay distinct: cancelled is caller-requested; incomplete means a limit or interruption stopped the run. gateway_response.incomplete_details records the reason, including max_tokens or max_tool_calls. Stored failed rows with one of these gateway outcomes are serialized with the gateway outcome, retaining any connector error and completion timestamp.
|
|
43
|
+
* waiting means the run is held for one of the agent's max_concurrent_runs slots and has not been sent to the model; it can be cancelled. Terminal outcomes stay distinct: cancelled is caller-requested; incomplete means a limit or interruption stopped the run. gateway_response.incomplete_details records the reason, including max_tokens or max_tool_calls. Stored failed rows with one of these gateway outcomes are serialized with the gateway outcome, retaining any connector error and completion timestamp.
|
|
43
44
|
*/
|
|
44
45
|
status: AgentRunStatus;
|
|
45
46
|
/**
|